diff --git a/targets/4J.Input/4J_Input.cpp b/targets/4J.Input/4J_Input.cpp index f1732744b..0f740ab94 100644 --- a/targets/4J.Input/4J_Input.cpp +++ b/targets/4J.Input/4J_Input.cpp @@ -1,9 +1,6 @@ #include "4J_Input.h" #include -#include -#include -#include #include #include #include @@ -13,6 +10,10 @@ #include #include #include +#include +#include +#include + #include #include "../4J.Common/4J_InputActions.h" diff --git a/targets/4J.Profile/4J_Profile.h b/targets/4J.Profile/4J_Profile.h index 3794cfff8..e5104fee9 100644 --- a/targets/4J.Profile/4J_Profile.h +++ b/targets/4J.Profile/4J_Profile.h @@ -5,7 +5,6 @@ #include "../4J.Common/4J_Compat.h" #include "../platform/IPlatformProfile.h" -#include "../4J.Common/4J_Compat.h" #include "../platform/PlatformTypes.h" #define TITLEID_MINECRAFT 0x584111F7 diff --git a/targets/4J.Render/4J_Render.cpp b/targets/4J.Render/4J_Render.cpp index 6b455606c..bcf428fde 100644 --- a/targets/4J.Render/4J_Render.cpp +++ b/targets/4J.Render/4J_Render.cpp @@ -1,12 +1,12 @@ #include "4J_Render.h" -#include "gl3_loader.h" #include "../platform/PlatformTypes.h" #include "SDL.h" #include "SDL_error.h" #include "SDL_events.h" #include "SDL_stdinc.h" #include "SDL_video.h" +#include "gl3_loader.h" // undefine macros from header to avoid argument mismatch #undef glGenTextures @@ -30,15 +30,16 @@ #define GLM_FORCE_RADIANS #include #include + +#include +#include +#include #include #include #include -#include -#include #include -#include -#include #include +#include C4JRender RenderManager; diff --git a/targets/4J.Render/4J_Render.h b/targets/4J.Render/4J_Render.h index a6c0c3b11..73332f1cb 100644 --- a/targets/4J.Render/4J_Render.h +++ b/targets/4J.Render/4J_Render.h @@ -4,6 +4,7 @@ // NOTE: gl3_loader.h must be included before these two #include #include + #include #include diff --git a/targets/4J.Storage/4J_Storage.cpp b/targets/4J.Storage/4J_Storage.cpp index 084640d3a..cf5677c2a 100644 --- a/targets/4J.Storage/4J_Storage.cpp +++ b/targets/4J.Storage/4J_Storage.cpp @@ -1,6 +1,7 @@ #include "4J_Storage.h" #include + #include #include #include diff --git a/targets/4J.Storage/4J_Storage.h b/targets/4J.Storage/4J_Storage.h index b4286bb25..1531740eb 100644 --- a/targets/4J.Storage/4J_Storage.h +++ b/targets/4J.Storage/4J_Storage.h @@ -8,7 +8,6 @@ #include "../4J.Common/4J_Compat.h" #include "../platform/IPlatformStorage.h" -#include "../4J.Common/4J_Compat.h" class C4JStringTable; diff --git a/targets/Minecraft.Client/Common/Consoles_App.cpp b/targets/Minecraft.Client/Common/Consoles_App.cpp index e9a170b21..181625fa0 100644 --- a/targets/Minecraft.Client/Common/Consoles_App.cpp +++ b/targets/Minecraft.Client/Common/Consoles_App.cpp @@ -1,17 +1,5 @@ -#include "console_helpers/PathHelper.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/Options.h" -#include "minecraft/client/ProgressRenderer.h" -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/client/multiplayer/MultiPlayerLevel.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/renderer/GameRenderer.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/stats/StatsCounter.h" -#include "minecraft/world/Container.h" -#include "minecraft/world/entity/player/Player.h" -#include "minecraft/world/item/crafting/Recipy.h" -#include "minecraft/world/level/tile/entity/HopperTileEntity.h" +#include "Common/Consoles_App.h" + #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" @@ -20,7 +8,6 @@ #include "Common/App_Defines.h" #include "Common/App_enums.h" #include "Common/App_structs.h" -#include "Common/Consoles_App.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" #include "Minecraft.Client/Common/src/DLC/DLCSkinFile.h" @@ -37,17 +24,31 @@ #include "Minecraft.Client/include/NetTypes.h" #include "SkinBox.h" #include "XboxStubs.h" +#include "console_helpers/PathHelper.h" #include "java/Class.h" #include "java/File.h" #include "java/Random.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/Options.h" +#include "minecraft/client/ProgressRenderer.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 "strings.h" #if defined(_WINDOWS64) #include "Minecraft.Client/Windows64/XML/ATGXmlParser.h" @@ -58,15 +59,16 @@ #include #include #include -#include + #include -#include #include #include +#include #include #include #include #include +#include #include #include #include @@ -77,6 +79,7 @@ #include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Common/src/Localisation/StringTable.h" #include "Minecraft.Client/Common/src/UI/All Platforms/ArchiveFile.h" +#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" #include "Minecraft_Macros.h" #include "console_helpers/PlatformTime.h" #include "console_helpers/StringHelpers.h" @@ -88,7 +91,6 @@ #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerPlayer.h" -#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" class BeaconTileEntity; class BrewingStandTileEntity; diff --git a/targets/Minecraft.Client/Common/src/Colours/ColourTable.cpp b/targets/Minecraft.Client/Common/src/Colours/ColourTable.cpp index ad08467d1..3d259b5e9 100644 --- a/targets/Minecraft.Client/Common/src/Colours/ColourTable.cpp +++ b/targets/Minecraft.Client/Common/src/Colours/ColourTable.cpp @@ -4,10 +4,10 @@ #include #include +#include "Common/App_enums.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/DataInputStream.h" -#include "Common/App_enums.h" std::unordered_map ColourTable::s_colourNamesMap; diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCAudioFile.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCAudioFile.cpp index 576a332a3..74287ebe1 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCAudioFile.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCAudioFile.cpp @@ -8,9 +8,9 @@ #include "4J_Render.h" #include "4J_Storage.h" #include "DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCFile.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/include/XboxStubs.h" -#include "Minecraft.Client/Common/src/DLC/DLCFile.h" #if defined(_WINDOWS64) #include "Minecraft.Client/Windows64/XML/ATGXmlParser.h" #include "Minecraft.Client/Windows64/XML/xmlFilesCallback.h" diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCCapeFile.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCCapeFile.cpp index 32bbe15eb..33e73e83a 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCCapeFile.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCCapeFile.cpp @@ -1,8 +1,8 @@ #include "DLCCapeFile.h" #include "DLCManager.h" -#include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Common/src/DLC/DLCFile.h" +#include "Minecraft.Client/Linux/Linux_App.h" DLCCapeFile::DLCCapeFile(const std::wstring& path) : DLCFile(DLCManager::e_DLCType_Cape, path) {} diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCColourTableFile.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCColourTableFile.cpp index e4215b7cd..2c1ebb236 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCColourTableFile.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCColourTableFile.cpp @@ -2,11 +2,11 @@ #include "DLCManager.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" +#include "Minecraft.Client/Common/src/DLC/DLCFile.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "Minecraft.Client/Common/src/DLC/DLCFile.h" DLCColourTableFile::DLCColourTableFile(const std::wstring& path) : DLCFile(DLCManager::e_DLCType_ColourTable, path) { diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCGameRulesHeader.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCGameRulesHeader.cpp index be3896fa9..8c7ddec5a 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCGameRulesHeader.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCGameRulesHeader.cpp @@ -3,9 +3,9 @@ #include #include "DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCGameRules.h" #include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Common/src/DLC/DLCGameRules.h" class StringTable; diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCLocalisationFile.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCLocalisationFile.cpp index afb2c3383..39009c54e 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCLocalisationFile.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCLocalisationFile.cpp @@ -1,8 +1,8 @@ #include "DLCLocalisationFile.h" #include "DLCManager.h" -#include "Minecraft.Client/Common/src/Localisation/StringTable.h" #include "Minecraft.Client/Common/src/DLC/DLCFile.h" +#include "Minecraft.Client/Common/src/Localisation/StringTable.h" DLCLocalisationFile::DLCLocalisationFile(const std::wstring& path) : DLCFile(DLCManager::e_DLCType_LocalisationData, path) { diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCManager.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCManager.cpp index cb9e4af08..d08faab39 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCManager.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCManager.cpp @@ -1,28 +1,29 @@ #include "DLCManager.h" #include + #include #include #include #include +#include #include #include -#include #include #include #include +#include "4J_Profile.h" +#include "4J_Storage.h" #include "DLCFile.h" #include "DLCPack.h" +#include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" #include "console_helpers/PortableFileIO.h" #include "console_helpers/StringHelpers.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "4J_Profile.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" #include "strings.h" // 4jcraft, this is the size of wchar_t on disk diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCPack.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCPack.cpp index ca85c398a..0f6319b51 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCPack.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCPack.cpp @@ -1,6 +1,7 @@ #include "DLCPack.h" #include + #include #include #include @@ -16,12 +17,12 @@ #include "DLCUIDataFile.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Common/src/DLC/DLCFile.h" +#include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCSkinFile.h" #include "Minecraft.Client/Common/src/Localisation/StringTable.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "console_helpers/StringHelpers.h" -#include "Minecraft.Client/Common/src/DLC/DLCManager.h" -#include "Minecraft.Client/Common/src/DLC/DLCSkinFile.h" DLCPack::DLCPack(const std::wstring& name, std::uint32_t dwLicenseMask) { m_dataPath = L""; diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.cpp index ccd9fd6a3..d969b5d8c 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.cpp @@ -1,14 +1,14 @@ #include "DLCSkinFile.h" -#include #include +#include #include "4J_Render.h" #include "DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCFile.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/include/SkinBox.h" #include "Minecraft.Client/include/XboxStubs.h" -#include "Minecraft.Client/Common/src/DLC/DLCFile.h" DLCSkinFile::DLCSkinFile(const std::wstring& path) : DLCFile(DLCManager::e_DLCType_Skin, path) { diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.h b/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.h index 49ce260af..0027ce59c 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.h +++ b/targets/Minecraft.Client/Common/src/DLC/DLCSkinFile.h @@ -8,7 +8,6 @@ #include "Minecraft.Client/Common/src/DLC/DLCManager.h" #include "Minecraft.Client/include/SkinBox.h" #include "minecraft/client/model/HumanoidModel.h" -#include "Minecraft.Client/Common/src/DLC/DLCManager.h" class DLCSkinFile : public DLCFile { private: diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCTextureFile.h b/targets/Minecraft.Client/Common/src/DLC/DLCTextureFile.h index b39e04037..b17d3ad9f 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCTextureFile.h +++ b/targets/Minecraft.Client/Common/src/DLC/DLCTextureFile.h @@ -4,7 +4,6 @@ #include "DLCFile.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" -#include "Minecraft.Client/Common/src/DLC/DLCManager.h" class DLCTextureFile : public DLCFile { private: diff --git a/targets/Minecraft.Client/Common/src/DLC/DLCUIDataFile.cpp b/targets/Minecraft.Client/Common/src/DLC/DLCUIDataFile.cpp index 5821e2be2..3175d72b6 100644 --- a/targets/Minecraft.Client/Common/src/DLC/DLCUIDataFile.cpp +++ b/targets/Minecraft.Client/Common/src/DLC/DLCUIDataFile.cpp @@ -1,8 +1,8 @@ #include "DLCUIDataFile.h" #include "DLCManager.h" -#include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Common/src/DLC/DLCFile.h" +#include "Minecraft.Client/Linux/Linux_App.h" DLCUIDataFile::DLCUIDataFile(const std::wstring& path) : DLCFile(DLCManager::e_DLCType_UIData, path) { diff --git a/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.cpp b/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.cpp index 6d571eb31..74d2fc7c3 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -9,18 +10,18 @@ #include "Minecraft.Client/Common/src/DLC/DLCGameRulesFile.h" #include "Minecraft.Client/Common/src/DLC/DLCGameRulesHeader.h" #include "Minecraft.Client/Common/src/DLC/DLCLocalisationFile.h" -#include "Minecraft.Client/Common/src/DLC/DLCPack.h" -#include "Minecraft.Client/Common/src/Localisation/StringTable.h" -#include "console_helpers/compression.h" -#include "java/File.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerators.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/LevelRules.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" +#include "Minecraft.Client/Common/src/Localisation/StringTable.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "console_helpers/compression.h" +#include "java/File.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataInputStream.h" diff --git a/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.h b/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.h index e43f62fe4..84affa6b1 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.h +++ b/targets/Minecraft.Client/Common/src/GameRules/GameRuleManager.h @@ -2,14 +2,15 @@ ////using namespace std; #include + #include #include #include #include "Minecraft.Client/Common/src/DLC/DLCGameRulesHeader.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerators.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/LevelRules.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" class LevelGenerationOptions; class RootGameRulesDefinition; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp index 8a0b0b4ed..27c212cc6 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp @@ -5,6 +5,7 @@ #include "ConsoleSchematicFile.h" #include "LevelGenerationOptions.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" @@ -13,7 +14,6 @@ #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/phys/AABB.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" ApplySchematicRuleDefinition::ApplySchematicRuleDefinition( LevelGenerationOptions* levelGenOptions) { diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h index fe9758eac..f2ca030b6 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/BiomeOverride.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/BiomeOverride.cpp index 6aebd7e49..f259abd06 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/BiomeOverride.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/BiomeOverride.cpp @@ -1,10 +1,10 @@ #include "BiomeOverride.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" BiomeOverride::BiomeOverride() { m_tile = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp index df282d3a5..d093c2ebe 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp @@ -1,8 +1,10 @@ #include "ConsoleGenerateStructure.h" #include + #include +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h" @@ -16,7 +18,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/levelgen/structure/BoundingBox.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" ConsoleGenerateStructure::ConsoleGenerateStructure() : StructurePiece(0) { m_x = m_y = m_z = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.cpp index babd97139..cb506f5b7 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.cpp @@ -2,12 +2,14 @@ #include #include + #include #include #include #include #include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "console_helpers/compression.h" #include "java/Class.h" #include "java/InputOutputStream/DataInputStream.h" @@ -29,7 +31,6 @@ #include "nbt/ListTag.h" #include "nbt/NbtIo.h" #include "nbt/Tag.h" -#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" ConsoleSchematicFile::ConsoleSchematicFile() { m_xSize = m_ySize = m_zSize = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.h b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.h index 0bb20ad9e..6dafad2c8 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.h +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.h @@ -6,6 +6,7 @@ #include #include + #include #include #include diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.cpp index ba5107132..87ea3f01c 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.cpp @@ -2,20 +2,18 @@ #include #include + #include #include #include #include -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/DLC/DLCPack.h" -#include "Minecraft.Client/Common/src/Localisation/StringTable.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/Pos.h" #include "4J_Profile.h" +#include "4J_Storage.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/DLC/DLCGameRulesHeader.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/BiomeOverride.h" @@ -23,12 +21,15 @@ #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/StartFeature.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" +#include "Minecraft.Client/Common/src/Localisation/StringTable.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" +#include "console_helpers/StringHelpers.h" #include "java/File.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/Pos.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/levelgen/structure/BoundingBox.h" diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h index 967901ce0..683a68331 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h @@ -9,10 +9,10 @@ #include #include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Common/src/Localisation/StringTable.h" #include "minecraft/world/level/levelgen/structure/StructureFeature.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" class ApplySchematicRuleDefinition; class LevelChunk; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StartFeature.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StartFeature.cpp index 93b95a463..4ff005a41 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StartFeature.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StartFeature.cpp @@ -1,10 +1,10 @@ #include "StartFeature.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" StartFeature::StartFeature() { m_chunkX = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp index 75624f2a1..02c9d339c 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp @@ -1,12 +1,12 @@ #include "XboxStructureActionGenerateBox.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" XboxStructureActionGenerateBox::XboxStructureActionGenerateBox() { m_x0 = m_y0 = m_z0 = m_x1 = m_y1 = m_z1 = m_edgeTile = m_fillTile = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp index 5cb47f00f..e0c8b7f01 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp @@ -1,12 +1,12 @@ #include "XboxStructureActionPlaceBlock.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" XboxStructureActionPlaceBlock::XboxStructureActionPlaceBlock() { m_x = m_y = m_z = m_tile = m_data = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp index 2cb2ea7d6..ceedea7b2 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp @@ -1,8 +1,11 @@ #include "XboxStructureActionPlaceContainer.h" #include + #include +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" +#include "Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" @@ -12,8 +15,6 @@ #include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h" XboxStructureActionPlaceContainer::XboxStructureActionPlaceContainer() { m_tile = Tile::chest_Id; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.cpp index bf4ef4818..9404f0485 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.cpp @@ -1,16 +1,17 @@ #include "XboxStructureActionPlaceSpawner.h" #include + #include +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" +#include "Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/levelgen/structure/BoundingBox.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/MobSpawnerTileEntity.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h" XboxStructureActionPlaceSpawner::XboxStructureActionPlaceSpawner() { m_tile = Tile::mobSpawner_Id; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddEnchantmentRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddEnchantmentRuleDefinition.cpp index d666f6c39..5e1e22b82 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddEnchantmentRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddEnchantmentRuleDefinition.cpp @@ -3,6 +3,8 @@ #include #include +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" @@ -12,8 +14,6 @@ #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" #include "minecraft/world/item/enchantment/EnchantmentInstance.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" AddEnchantmentRuleDefinition::AddEnchantmentRuleDefinition() { m_enchantmentId = m_enchantmentLevel = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.cpp index 5137e938d..80df735b0 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.cpp @@ -3,14 +3,14 @@ #include #include "AddEnchantmentRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" AddItemRuleDefinition::AddItemRuleDefinition() { m_itemId = m_quantity = m_auxValue = m_dataTag = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.cpp index 32045504f..78ee127f6 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.cpp @@ -1,15 +1,15 @@ #include "CollectItemRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRule.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRulesInstance.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/network/Connection.h" #include "minecraft/network/packet/UpdateGameRuleProgressPacket.h" #include "minecraft/world/item/ItemInstance.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRulesInstance.h" CollectItemRuleDefinition::CollectItemRuleDefinition() { m_itemId = 0; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp index 05b531508..0b9e95d4b 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp @@ -4,13 +4,13 @@ #include #include +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRule.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "minecraft/network/Connection.h" #include "minecraft/network/packet/UpdateGameRuleProgressPacket.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" void CompleteAllRuleDefinition::getChildren( std::vector* children) { diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.cpp index b72f51a2c..da47bd417 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.cpp @@ -1,20 +1,21 @@ #include "CompoundGameRuleDefinition.h" #include + #include #include #include #include +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CollectItemRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRule.h" -#include "console_helpers/StringHelpers.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRulesInstance.h" +#include "console_helpers/StringHelpers.h" CompoundGameRuleDefinition::CompoundGameRuleDefinition() { m_lastRuleStatusChanged = nullptr; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp index 8fd1653d8..9625e0858 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.cpp index 807eb9e39..8ed7b3b62 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.cpp @@ -1,9 +1,9 @@ #include "LevelRuleset.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h" -#include "Minecraft.Client/Common/src/Localisation/StringTable.h" #include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.h" +#include "Minecraft.Client/Common/src/Localisation/StringTable.h" class AABB; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.cpp index fe68485f9..43aa326b0 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/NamedAreaRuleDefinition.cpp @@ -2,11 +2,11 @@ #include +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" NamedAreaRuleDefinition::NamedAreaRuleDefinition() { m_name = L""; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp index 14ffa4e34..a4b0f8721 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp @@ -1,9 +1,12 @@ #include "UpdatePlayerRuleDefinition.h" #include + #include +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" @@ -11,8 +14,6 @@ #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/food/FoodData.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition() { m_bUpdateHealth = m_bUpdateFood = m_bUpdateYRot = false; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.cpp b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.cpp index e1ad41799..c0169d5eb 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.cpp +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/UseTileRuleDefinition.cpp @@ -1,10 +1,10 @@ #include "UseTileRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "Minecraft.Client/Common/src/GameRules/ConsoleGameRulesConstants.h" -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" UseTileRuleDefinition::UseTileRuleDefinition() { m_tileId = -1; diff --git a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRule.h b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRule.h index af85a5fdf..193dcc2e2 100644 --- a/targets/Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRule.h +++ b/targets/Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRule.h @@ -2,6 +2,7 @@ // using namespace std; #include + #include #include #include diff --git a/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.cpp b/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.cpp index 8acd74f4f..d1e087df2 100644 --- a/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.cpp +++ b/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.cpp @@ -1,38 +1,17 @@ #include "GameNetworkManager.h" #include + +#include #include +#include #include #include -#include -#include -#include #include +#include #include #include "4J_Input.h" -#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" -#include "Socket.h" -#include "console_helpers/StringHelpers.h" -#include "console_helpers/ThreadName.h" -#include "console_helpers/compression.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/ProgressRenderer.h" -#include "minecraft/client/User.h" -#include "minecraft/client/gui/Gui.h" -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/renderer/LevelRenderer.h" -#include "minecraft/client/skins/TexturePack.h" -#include "minecraft/client/skins/TexturePackRepository.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/server/network/PlayerConnection.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/item/crafting/FireworksRecipe.h" -#include "minecraft/world/level/chunk/storage/OldChunkStorage.h" #include "4J_Profile.h" #include "4J_Render.h" #include "4J_Storage.h" @@ -44,14 +23,36 @@ #include "Minecraft.Client/Common/src/Network/PlatformNetworkManagerStub.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" +#include "Socket.h" #include "XboxStubs.h" +#include "console_helpers/StringHelpers.h" +#include "console_helpers/ThreadName.h" +#include "console_helpers/compression.h" #include "java/File.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/ProgressRenderer.h" +#include "minecraft/client/User.h" +#include "minecraft/client/gui/Gui.h" +#include "minecraft/client/multiplayer/ClientConnection.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/client/renderer/LevelRenderer.h" +#include "minecraft/client/skins/TexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/network/Connection.h" +#include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/PreLoginPacket.h" +#include "minecraft/server/MinecraftServer.h" +#include "minecraft/server/PlayerList.h" +#include "minecraft/server/level/ServerPlayer.h" +#include "minecraft/server/network/PlayerConnection.h" +#include "minecraft/world/entity/Entity.h" +#include "minecraft/world/item/crafting/FireworksRecipe.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/chunk/storage/OldChunkStorage.h" #include "minecraft/world/level/tile/Tile.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.h b/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.h index f847c89b2..027344312 100644 --- a/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.h +++ b/targets/Minecraft.Client/Common/src/Network/GameNetworkManager.h @@ -1,19 +1,19 @@ #pragma once #include // using namespace std; -#include #include #include +#include #if !defined(__linux__) #include #endif +#include "4J.Common/4J_Compat.h" +#include "Minecraft.Client/Common/src/Network/PlatformNetworkManagerInterface.h" +#include "Minecraft.Client/include/NetTypes.h" #include "NetworkPlayerInterface.h" #include "PlatformNetworkManagerStub.h" #include "SessionInfo.h" #include "console_helpers/C4JThread.h" -#include "4J.Common/4J_Compat.h" -#include "Minecraft.Client/Common/src/Network/PlatformNetworkManagerInterface.h" -#include "Minecraft.Client/include/NetTypes.h" class ClientConnection; class Minecraft; diff --git a/targets/Minecraft.Client/Common/src/Network/PlatformNetworkManagerStub.cpp b/targets/Minecraft.Client/Common/src/Network/PlatformNetworkManagerStub.cpp index baa366c5a..432b95d32 100644 --- a/targets/Minecraft.Client/Common/src/Network/PlatformNetworkManagerStub.cpp +++ b/targets/Minecraft.Client/Common/src/Network/PlatformNetworkManagerStub.cpp @@ -2,16 +2,17 @@ #include #include + #include #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" +#include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" +#include "Minecraft.Client/include/NetTypes.h" #include "NetworkPlayerQNet.h" #include "Socket.h" #include "console_helpers/C4JThread.h" -#include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" -#include "Minecraft.Client/include/NetTypes.h" CPlatformNetworkManagerStub* g_pPlatformNetworkManager; diff --git a/targets/Minecraft.Client/Common/src/Network/Socket.cpp b/targets/Minecraft.Client/Common/src/Network/Socket.cpp index adc7f9f44..fdf3cd387 100644 --- a/targets/Minecraft.Client/Common/src/Network/Socket.cpp +++ b/targets/Minecraft.Client/Common/src/Network/Socket.cpp @@ -1,6 +1,7 @@ #include "Socket.h" #include + #include #include #include diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Constraints/AreaConstraint.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Constraints/AreaConstraint.cpp index d739473e9..c0992c8f7 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Constraints/AreaConstraint.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Constraints/AreaConstraint.cpp @@ -2,11 +2,11 @@ #include +#include "Minecraft.Client/Common/src/Tutorial/Constraints/TutorialConstraint.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.Client/Common/src/Tutorial/Constraints/TutorialConstraint.h" AreaConstraint::AreaConstraint(int descriptionId, double x0, double y0, double z0, double x1, double y1, double z1, diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Constraints/ChangeStateConstraint.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Constraints/ChangeStateConstraint.cpp index 4517d23f2..b8fb0c241 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Constraints/ChangeStateConstraint.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Constraints/ChangeStateConstraint.cpp @@ -3,6 +3,7 @@ #include #include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" +#include "Minecraft.Client/Common/src/Tutorial/Constraints/TutorialConstraint.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "minecraft/client/Minecraft.h" @@ -14,7 +15,6 @@ #include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" -#include "Minecraft.Client/Common/src/Tutorial/Constraints/TutorialConstraint.h" ChangeStateConstraint::ChangeStateConstraint( Tutorial* tutorial, eTutorial_State targetState, diff --git a/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.cpp b/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.cpp index ac07299da..cac2e1585 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.cpp @@ -4,11 +4,10 @@ #include #include "4J.Common/4J_InputActions.h" -#include "Minecraft.Client/Common/src/Tutorial/Hints/AreaHint.h" -#include "minecraft/world/item/alchemy/PotionMacros.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" #include "Minecraft.Client/Common/src/Tutorial/Constraints/AreaConstraint.h" #include "Minecraft.Client/Common/src/Tutorial/Constraints/ChangeStateConstraint.h" +#include "Minecraft.Client/Common/src/Tutorial/Hints/AreaHint.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/AreaTask.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/ChoiceTask.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/CompleteUsingItemTask.h" @@ -28,6 +27,7 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/alchemy/PotionMacros.h" #include "minecraft/world/item/crafting/Recipy.h" #include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/level/tile/Tile.h" diff --git a/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.h b/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.h index 243015542..7b8406385 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.h +++ b/targets/Minecraft.Client/Common/src/Tutorial/FullTutorial.h @@ -1,6 +1,6 @@ #pragma once -#include "Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" +#include "Tutorial.h" #define FULL_TUTORIAL_PROGRESS_2_X_2_Crafting 1 #define FULL_TUTORIAL_PROGRESS_3_X_3_Crafting 2 diff --git a/targets/Minecraft.Client/Common/src/Tutorial/FullTutorialMode.cpp b/targets/Minecraft.Client/Common/src/Tutorial/FullTutorialMode.cpp index 752237ec1..d60e7df91 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/FullTutorialMode.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/FullTutorialMode.cpp @@ -1,9 +1,9 @@ #include "FullTutorialMode.h" #include "FullTutorial.h" -#include "minecraft/client/Minecraft.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" +#include "minecraft/client/Minecraft.h" class ClientConnection; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Hints/AreaHint.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Hints/AreaHint.cpp index 488ccee79..6286fb683 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Hints/AreaHint.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Hints/AreaHint.cpp @@ -2,13 +2,13 @@ #include +#include "Minecraft.Client/Common/src/Tutorial/Hints/TutorialHint.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/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.Client/Common/src/Tutorial/Hints/TutorialHint.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" AreaHint::AreaHint(eTutorial_Hint id, Tutorial* tutorial, eTutorial_State displayState, eTutorial_State completeState, diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.cpp index f5fb02cc4..911701805 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.cpp @@ -3,8 +3,8 @@ #include -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/Hints/TutorialHint.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "java/Class.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/item/ItemInstance.h" diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.h b/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.h index 8452848cb..5a7928ef6 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.h +++ b/targets/Minecraft.Client/Common/src/Tutorial/Hints/DiggerItemHint.h @@ -1,7 +1,7 @@ #pragma once -#include "TutorialHint.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" +#include "TutorialHint.h" class DiggerItem; class Level; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtEntityHint.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtEntityHint.cpp index 481967a28..7f4dcec2e 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtEntityHint.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtEntityHint.cpp @@ -1,7 +1,7 @@ #include "LookAtEntityHint.h" -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/Hints/TutorialHint.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" LookAtEntityHint::LookAtEntityHint(eTutorial_Hint id, Tutorial* tutorial, diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtTileHint.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtTileHint.cpp index cb677e8b3..a390d325d 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtTileHint.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Hints/LookAtTileHint.cpp @@ -2,10 +2,10 @@ #include -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" -#include "minecraft/world/item/Item.h" #include "Minecraft.Client/Common/src/Tutorial/Hints/TutorialHint.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" +#include "minecraft/world/item/Item.h" LookAtTileHint::LookAtTileHint(eTutorial_Hint id, Tutorial* tutorial, int tiles[], unsigned int tilesLength, diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Hints/TakeItemHint.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Hints/TakeItemHint.cpp index 959fbb05d..6ae25b0b9 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Hints/TakeItemHint.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Hints/TakeItemHint.cpp @@ -2,10 +2,10 @@ #include -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" -#include "minecraft/world/item/ItemInstance.h" #include "Minecraft.Client/Common/src/Tutorial/Hints/TutorialHint.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" +#include "minecraft/world/item/ItemInstance.h" TakeItemHint::TakeItemHint(eTutorial_Hint id, Tutorial* tutorial, int items[], unsigned int itemsLength) diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/AreaTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/AreaTask.cpp index 0a113b80e..44e8ed6ca 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/AreaTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/AreaTask.cpp @@ -3,8 +3,8 @@ #include #include "Minecraft.Client/Common/src/Tutorial/Constraints/TutorialConstraint.h" -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" AreaTask::AreaTask(eTutorial_State state, Tutorial* tutorial, diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ChoiceTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ChoiceTask.cpp index 6a5f751f4..1e227954b 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ChoiceTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ChoiceTask.cpp @@ -5,13 +5,13 @@ #include "4J_Input.h" #include "Minecraft.Client/Common/src/Tutorial/Constraints/InputConstraint.h" +#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/level/material/Material.h" -#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" ChoiceTask::ChoiceTask( Tutorial* tutorial, int descriptionId, int promptId /*= -1*/, diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CompleteUsingItemTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CompleteUsingItemTask.cpp index 876a0f5e6..911c833c2 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CompleteUsingItemTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CompleteUsingItemTask.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/item/ItemInstance.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" +#include "minecraft/world/item/ItemInstance.h" class Tutorial; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ControllerTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ControllerTask.cpp index 57d3efaef..20b43e774 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ControllerTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ControllerTask.cpp @@ -9,10 +9,10 @@ #include "4J_Input.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Tutorial/Constraints/InputConstraint.h" +#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" class Tutorial; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CraftTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CraftTask.cpp index 9c5c347ba..45a240f0b 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CraftTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/CraftTask.cpp @@ -1,11 +1,12 @@ #include "CraftTask.h" #include + #include #include -#include "minecraft/world/item/ItemInstance.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" +#include "minecraft/world/item/ItemInstance.h" class Tutorial; class TutorialConstraint; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/FullTutorialActiveTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/FullTutorialActiveTask.cpp index 05eced5d4..bb34fba39 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/FullTutorialActiveTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/FullTutorialActiveTask.cpp @@ -1,7 +1,7 @@ #include "FullTutorialActiveTask.h" -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" FullTutorialActiveTask::FullTutorialActiveTask( diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/HorseChoiceTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/HorseChoiceTask.cpp index c2e026995..6ffb72905 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/HorseChoiceTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/HorseChoiceTask.cpp @@ -2,11 +2,11 @@ #include +#include "Minecraft.Client/Common/src/Tutorial/Tasks/ChoiceTask.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "java/Class.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/animal/EntityHorse.h" -#include "Minecraft.Client/Common/src/Tutorial/Tasks/ChoiceTask.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" class Tutorial; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/InfoTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/InfoTask.cpp index 84703c836..06d8694bd 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/InfoTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/InfoTask.cpp @@ -7,12 +7,12 @@ #include "4J_Input.h" #include "Minecraft.Client/Common/src/Tutorial/Constraints/InputConstraint.h" +#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/level/material/Material.h" -#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" InfoTask::InfoTask(Tutorial* tutorial, int descriptionId, int promptId /*= -1*/, bool requiresUserInput /*= false*/, int iMapping /*= 0*/) diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ProgressFlagTask.h b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ProgressFlagTask.h index 0498d801b..9c30901ab 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ProgressFlagTask.h +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/ProgressFlagTask.h @@ -1,8 +1,8 @@ #pragma once // using namespace std; +#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "TutorialTask.h" -#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" class Tutorial; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/RideEntityTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/RideEntityTask.cpp index c485966d3..c7f4f1158 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/RideEntityTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/RideEntityTask.cpp @@ -2,9 +2,9 @@ #include +#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" #include "java/Class.h" #include "minecraft/world/entity/Entity.h" -#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" class Tutorial; class TutorialConstraint; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/StatTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/StatTask.cpp index 21663eadc..74a6cb989 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/StatTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/StatTask.cpp @@ -1,9 +1,9 @@ #include "StatTask.h" #include "4J_Profile.h" +#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" #include "minecraft/client/Minecraft.h" #include "minecraft/stats/StatsCounter.h" -#include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" class Tutorial; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseItemTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseItemTask.cpp index 6321858f6..0da47ee1d 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseItemTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseItemTask.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/item/ItemInstance.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" +#include "minecraft/world/item/ItemInstance.h" class Tutorial; class TutorialConstraint; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseTileTask.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseTileTask.cpp index f1c17075b..49469a07e 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseTileTask.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tasks/UseTileTask.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/level/Level.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" +#include "minecraft/world/level/Level.h" class Tutorial; class TutorialConstraint; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.cpp b/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.cpp index 5026d2dbf..87d271f75 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.cpp @@ -2,18 +2,11 @@ #include #include + #include #include #include "4J.Common/4J_InputActions.h" -#include "TutorialMessage.h" -#include "console_helpers/PlatformTime.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLevel.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/world/entity/Entity.h" #include "4J_Profile.h" #include "Common/App_enums.h" #include "Common/App_structs.h" @@ -31,7 +24,15 @@ #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "TutorialMessage.h" +#include "console_helpers/PlatformTime.h" +#include "console_helpers/StringHelpers.h" #include "java/Class.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLevel.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/server/MinecraftServer.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/DyePowderItem.h" diff --git a/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.h b/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.h index 52c78c3e4..20e274e20 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.h +++ b/targets/Minecraft.Client/Common/src/Tutorial/Tutorial.h @@ -1,19 +1,19 @@ #pragma once // using namespace std; #include -#include #include #include #include +#include #include #include #include "Minecraft.Client/Common/src/Tutorial/Constraints/TutorialConstraint.h" #include "Minecraft.Client/Common/src/Tutorial/Hints/TutorialHint.h" #include "Minecraft.Client/Common/src/Tutorial/Tasks/TutorialTask.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "TutorialEnum.h" #include "TutorialMessage.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" class Entity; class ItemInstance; diff --git a/targets/Minecraft.Client/Common/src/Tutorial/TutorialMode.cpp b/targets/Minecraft.Client/Common/src/Tutorial/TutorialMode.cpp index eed1199f2..845260c65 100644 --- a/targets/Minecraft.Client/Common/src/Tutorial/TutorialMode.cpp +++ b/targets/Minecraft.Client/Common/src/Tutorial/TutorialMode.cpp @@ -2,6 +2,7 @@ #include +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/multiplayer/MultiPlayerLevel.h" @@ -9,7 +10,6 @@ #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" class ClientConnection; diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/ArchiveFile.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/ArchiveFile.cpp index 382856c07..22ab6ed4a 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/ArchiveFile.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/ArchiveFile.cpp @@ -1,6 +1,7 @@ #include "ArchiveFile.h" #include + #include #include diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp index 8f7feaf8e..726a66e1a 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp @@ -1,24 +1,24 @@ #include "IUIScene_AbstractContainerMenu.h" #include -#include + #include +#include #include #include #include "4J.Common/4J_InputActions.h" #include "4J_Input.h" -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/world/phys/Vec3.h" #include "4J_Render.h" #include "Common/App_enums.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.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 "minecraft/sounds/SoundTypes.h" #include "minecraft/util/HtmlString.h" @@ -32,6 +32,7 @@ #include "minecraft/world/item/crafting/ArmorRecipes.h" #include "minecraft/world/item/crafting/FurnaceRecipes.h" #include "minecraft/world/level/tile/entity/FurnaceTileEntity.h" +#include "minecraft/world/phys/Vec3.h" #include "strings.h" IUIScene_AbstractContainerMenu::IUIScene_AbstractContainerMenu() { diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h index a90dd0125..824d7876f 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h @@ -4,8 +4,8 @@ #include #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" -#include "UIStructs.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "UIStructs.h" class HtmlString; class ItemInstance; diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AnvilMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AnvilMenu.cpp index 75d22cf9c..24e3d3817 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AnvilMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AnvilMenu.cpp @@ -3,13 +3,13 @@ #include #include -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/ClientConnection.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/network/packet/CustomPayloadPacket.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BeaconMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BeaconMenu.cpp index d320ae8cf..539636dc8 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BeaconMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BeaconMenu.cpp @@ -1,10 +1,12 @@ #include "IUIScene_BeaconMenu.h" #include + #include #include #include "Minecraft.Client/Common/App_enums.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataOutputStream.h" @@ -16,7 +18,6 @@ #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/inventory/BeaconMenu.h" #include "minecraft/world/level/tile/entity/BeaconTileEntity.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" IUIScene_BeaconMenu::IUIScene_BeaconMenu() { m_beacon = nullptr; diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BrewingMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BrewingMenu.cpp index db3ab1fff..8303bd207 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BrewingMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BrewingMenu.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/inventory/BrewingStandMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "minecraft/world/inventory/BrewingStandMenu.h" IUIScene_AbstractContainerMenu::ESceneSection IUIScene_BrewingMenu::GetSectionAndSlotInDirection(ESceneSection eSection, diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_ContainerMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_ContainerMenu.cpp index 1ddd60f87..7f4727623 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_ContainerMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_ContainerMenu.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" IUIScene_AbstractContainerMenu::ESceneSection IUIScene_ContainerMenu::GetSectionAndSlotInDirection(ESceneSection eSection, diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.cpp index 4e2001843..570ab7dca 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.cpp @@ -3,22 +3,23 @@ #include #include #include + #include #include #include "4J.Common/4J_InputActions.h" -#include "Minecraft.Client/Common/src/Console_Debug_enum.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/player/LocalPlayer.h" #include "4J_Profile.h" #include "4J_Render.h" #include "Common/App_enums.h" +#include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" +#include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" +#include "minecraft/client/player/LocalPlayer.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Inventory.h" diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.h b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.h index 2a43ecd42..0e554974e 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.h @@ -2,10 +2,10 @@ #include #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/crafting/Recipy.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" class LocalPlayer; class ItemInstance; diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.cpp index d35693b8d..c5a2cffbf 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.cpp @@ -1,19 +1,19 @@ #include "IUIScene_CreativeMenu.h" #include + #include #include #include #include "4J.Common/4J_InputActions.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" #include "java/JavaMath.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/world/item/alchemy/PotionMacros.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/SimpleContainer.h" #include "minecraft/world/entity/Painting.h" @@ -27,6 +27,7 @@ #include "minecraft/world/item/FireworksItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/alchemy/PotionMacros.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentInstance.h" #include "minecraft/world/level/tile/LeafTile.h" diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.h b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.h index 8f37a524b..fe23c535b 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.h @@ -1,12 +1,13 @@ #pragma once #include + #include #include #include "IUIScene_AbstractContainerMenu.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" class Inventory; class ItemInstance; diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_EnchantingMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_EnchantingMenu.cpp index 56a6c89ab..78f3960d8 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_EnchantingMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_EnchantingMenu.cpp @@ -1,14 +1,15 @@ #include "IUIScene_EnchantingMenu.h" #include + #include +#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/EnchantmentMenu.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" class Player; diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FireworksMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FireworksMenu.cpp index b20f0c2f1..f42a769f6 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FireworksMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FireworksMenu.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/inventory/FireworksMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "minecraft/world/inventory/FireworksMenu.h" IUIScene_AbstractContainerMenu::ESceneSection IUIScene_FireworksMenu::GetSectionAndSlotInDirection(ESceneSection eSection, diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FurnaceMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FurnaceMenu.cpp index f0333cd44..eeb8a9845 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FurnaceMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FurnaceMenu.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/inventory/FurnaceMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "minecraft/world/inventory/FurnaceMenu.h" IUIScene_AbstractContainerMenu::ESceneSection IUIScene_FurnaceMenu::GetSectionAndSlotInDirection(ESceneSection eSection, diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HUD.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HUD.cpp index f743d9741..f9d7737b5 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HUD.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HUD.cpp @@ -3,8 +3,8 @@ #include #include -#include "4J_Render.h" #include "4J_Profile.h" +#include "4J_Render.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HopperMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HopperMenu.cpp index dc601cec7..077582066 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HopperMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HopperMenu.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/inventory/HopperMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "minecraft/world/inventory/HopperMenu.h" IUIScene_AbstractContainerMenu::ESceneSection IUIScene_HopperMenu::GetSectionAndSlotInDirection(ESceneSection eSection, diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HorseInventoryMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HorseInventoryMenu.cpp index f954c264e..fc7b664a7 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HorseInventoryMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HorseInventoryMenu.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/entity/animal/EntityHorse.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "minecraft/world/entity/animal/EntityHorse.h" IUIScene_AbstractContainerMenu::ESceneSection IUIScene_HorseInventoryMenu::GetSectionAndSlotInDirection( diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_InventoryMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_InventoryMenu.cpp index e44e2f8f0..c8afa4a59 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_InventoryMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_InventoryMenu.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/inventory/InventoryMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "minecraft/world/inventory/InventoryMenu.h" IUIScene_AbstractContainerMenu::ESceneSection IUIScene_InventoryMenu::GetSectionAndSlotInDirection(ESceneSection eSection, diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.cpp index 1b967cada..739cd745e 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.cpp @@ -1,31 +1,32 @@ #include "IUIScene_PauseMenu.h" #include + #include -#include #include #include #include +#include #include +#include "4J_Profile.h" +#include "Common/App_enums.h" +#include "Minecraft.Client/Common/src/DLC/DLCManager.h" #include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" +#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "console_helpers/compression.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/ProgressRenderer.h" #include "minecraft/client/multiplayer/MultiPlayerLevel.h" #include "minecraft/client/skins/DLCTexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "minecraft/server/MinecraftServer.h" -#include "4J_Profile.h" -#include "Common/App_enums.h" -#include "Minecraft.Client/Common/src/DLC/DLCManager.h" -#include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "minecraft/network/packet/DisconnectPacket.h" +#include "minecraft/server/MinecraftServer.h" #include "strings.h" class TexturePack; diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.cpp b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.cpp index d78d11d41..49230666a 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.cpp @@ -1,20 +1,21 @@ #include "IUIScene_TradingMenu.h" #include + #include #include "4J.Common/4J_InputActions.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" #include "console_helpers/StringHelpers.h" +#include "java/InputOutputStream/ByteArrayOutputStream.h" +#include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "java/InputOutputStream/ByteArrayOutputStream.h" -#include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/network/packet/CustomPayloadPacket.h" #include "minecraft/network/packet/TradeItemPacket.h" #include "minecraft/util/HtmlString.h" diff --git a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.h b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.h index d3998101a..f27f68bb7 100644 --- a/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.h @@ -6,10 +6,10 @@ #include #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/inventory/MerchantMenu.h" #include "minecraft/world/item/Rarity.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "minecraft/world/item/trading/Merchant.h" class MerchantRecipe; diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Chat.cpp b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Chat.cpp index 3a690eb5a..e5ecc4078 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Chat.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Chat.cpp @@ -2,16 +2,16 @@ #include -#include "Minecraft.Client/Common/src/UI/UILayer.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/gui/Gui.h" #include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/UILayer.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/gui/Gui.h" UIComponent_Chat::UIComponent_Chat(int iPad, void* initData, UILayer* parentLayer) diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_DebugUIMarketingGuide.cpp b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_DebugUIMarketingGuide.cpp index d5d991c1b..06a37b014 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_DebugUIMarketingGuide.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_DebugUIMarketingGuide.cpp @@ -1,8 +1,8 @@ #include "UIComponent_DebugUIMarketingGuide.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_MenuBackground.cpp b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_MenuBackground.cpp index 5c2fe3cac..e1914da12 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_MenuBackground.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_MenuBackground.cpp @@ -1,11 +1,11 @@ #include "UIComponent_MenuBackground.h" +#include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "4J_Render.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" UIComponent_MenuBackground::UIComponent_MenuBackground(int iPad, void* initData, UILayer* parentLayer) diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Panorama.cpp b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Panorama.cpp index 0df156127..a34e8bea6 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Panorama.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Panorama.cpp @@ -1,18 +1,19 @@ #include "UIComponent_Panorama.h" #include + #include +#include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLevel.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/storage/LevelData.h" -#include "4J_Render.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" UIComponent_Panorama::UIComponent_Panorama(int iPad, void* initData, UILayer* parentLayer) diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_PressStartToPlay.h b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_PressStartToPlay.h index ad4523f67..50e377f6a 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_PressStartToPlay.h +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_PressStartToPlay.h @@ -2,11 +2,11 @@ #include -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "4J.Common/4J_Compat.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Tooltips.cpp b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Tooltips.cpp index 030f31455..7d0e60143 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Tooltips.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_Tooltips.cpp @@ -1,17 +1,17 @@ #include "UIComponent_Tooltips.h" #include "4J_Profile.h" -#include "Minecraft.Client/Common/src/UI/UILayer.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "console_helpers/StringHelpers.h" #include "4J_Render.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/UILayer.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" UIComponent_Tooltips::UIComponent_Tooltips(int iPad, void* initData, UILayer* parentLayer) diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.cpp b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.cpp index 68a82b575..4c5ad7e01 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.cpp @@ -1,20 +1,21 @@ #include "UIComponent_TutorialPopup.h" #include + #include -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J_Profile.h" #include "Common/App_enums.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.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" diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.h b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.h index 94604cdd1..b7fabff4a 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.h +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIComponent_TutorialPopup.h @@ -3,12 +3,12 @@ #include #include -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.cpp b/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.cpp index ab3105080..3e575d8ce 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.cpp @@ -4,11 +4,6 @@ #include #include -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/gui/Gui.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/renderer/BossMobGuiInfo.h" #include "4J_Profile.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/UI/Components/UIComponent_Chat.h" @@ -17,7 +12,12 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" #include "minecraft/SharedConstants.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/gui/Gui.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/client/renderer/BossMobGuiInfo.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/InventoryMenu.h" #include "minecraft/world/inventory/Slot.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.h b/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.h index 4611444b2..038832c38 100644 --- a/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.h +++ b/targets/Minecraft.Client/Common/src/UI/Components/UIScene_HUD.h @@ -2,12 +2,12 @@ #include -#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HUD.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "4J_Render.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_HUD.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl.cpp index bb82bb278..7a755d3fe 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl.cpp @@ -1,10 +1,10 @@ #include "UIControl.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "java/JavaMath.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "java/JavaMath.h" #ifndef _ENABLESHIGGY #include "Minecraft.Client/Linux/Stubs/iggy_stubs.h" #endif diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Base.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Base.cpp index 938a95bf9..4e0e7c50d 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Base.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Base.cpp @@ -3,12 +3,12 @@ #include #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "console_helpers/StringHelpers.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" UIControl_Base::UIControl_Base() { m_bLabelChanged = false; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h index 2fff805d9..51fa03235 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h @@ -2,12 +2,11 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h" class UIControl_BeaconEffectButton : public UIControl { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.cpp index 47350b742..4ead03123 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.cpp @@ -2,8 +2,8 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "console_helpers/StringHelpers.h" bool UIControl_BitmapIcon::setupControl(UIScene* scene, IggyValuePath* parent, const std::string& controlName) { diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h index 7a2c4369b..30872c64e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h @@ -2,12 +2,11 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" class UIControl_BitmapIcon : public UIControl { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.cpp index 52a8fdd7a..2055b1359 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.cpp @@ -3,9 +3,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "console_helpers/StringHelpers.h" UIControl_Button::UIControl_Button() {} diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h index 58c2b3477..10bc98d06 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h @@ -2,13 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" class UIControl_Button : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.cpp index 36761fae8..54c8aa911 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.cpp @@ -3,10 +3,10 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "console_helpers/StringHelpers.h" UIControl_ButtonList::UIControl_ButtonList() { m_itemCount = 0; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h index a723680b9..e09cb166a 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h @@ -3,13 +3,12 @@ #include #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" class UIControl_ButtonList : public UIControl_Base { protected: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.cpp index b2e9a31b6..106529933 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.cpp @@ -3,10 +3,10 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "console_helpers/StringHelpers.h" UIControl_CheckBox::UIControl_CheckBox() {} diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h index 8ab410ceb..825da8030 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h @@ -2,13 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" class UIControl_CheckBox : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h index 927e401d8..03603dca2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h @@ -2,12 +2,11 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h" class UIControl_Cursor : public UIControl_Base { public: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.cpp index 7dbd18d87..886f8ed9b 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.cpp @@ -1,11 +1,11 @@ #include "UIControl_DLCList.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "console_helpers/StringHelpers.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" bool UIControl_DLCList::setupControl(UIScene* scene, IggyValuePath* parent, const std::string& controlName) { diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.h index 2d7ee6681..055990762 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.h @@ -6,7 +6,6 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_ButtonList.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.h" class UIControl_DLCList : public UIControl_ButtonList { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.cpp index 14eacabaf..29b4796e8 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.cpp @@ -3,9 +3,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "console_helpers/StringHelpers.h" UIControl_DynamicLabel::UIControl_DynamicLabel() {} diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h index 0ec259e8d..7c4f35395 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h @@ -8,7 +8,6 @@ #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h" class UIControl_DynamicLabel : public UIControl_Label { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.cpp index 7a3f851a2..1106e03aa 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.cpp @@ -5,6 +5,8 @@ #include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "gl3_loader.h" #include "java/Class.h" #include "minecraft/client/Lighting.h" #include "minecraft/client/Minecraft.h" @@ -15,8 +17,6 @@ #include "minecraft/world/inventory/EnchantmentMenu.h" #include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "gl3_loader.h" UIControl_EnchantmentBook::UIControl_EnchantmentBook() { UIControl::setControlType(UIControl::eEnchantmentBook); diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.h index 0f4598199..86769affc 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.h @@ -2,13 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl.h" #include "java/Random.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.h" class UIScene_EnchantingMenu; class BookModel; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.cpp index 93153f1da..4c9490ed2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.cpp @@ -8,18 +8,18 @@ #include "4J_Render.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" +#include "gl3_loader.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Font.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/inventory/EnchantmentMenu.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "gl3_loader.h" UIControl_EnchantmentButton::UIControl_EnchantmentButton() { m_index = 0; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.h index 39dbc2ed0..c05781592 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.h @@ -8,7 +8,6 @@ #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Button.h" #include "java/Random.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.h" class UIControl_EnchantmentButton : public UIControl_Button { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h index 9d6bb672c..7110f58a5 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h @@ -2,14 +2,13 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h" class UIControl_HTMLLabel : public UIControl_Label { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.cpp index 5d969034f..a2fe34f8c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.cpp @@ -3,9 +3,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "console_helpers/StringHelpers.h" UIControl_Label::UIControl_Label() {} diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h index 41cbc95bc..4633cebe9 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h @@ -2,13 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" class UIControl_Label : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.cpp index 733de2a3e..9c4364345 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.cpp @@ -3,8 +3,8 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "console_helpers/StringHelpers.h" UIControl_LeaderboardList::UIControl_LeaderboardList() {} diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h index d3e65e352..088c72f5e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h @@ -2,12 +2,11 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h" class UIControl_LeaderboardList : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.cpp index aab938401..089e7de1d 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.cpp @@ -1,12 +1,14 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h" #include + #include #include #include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "minecraft/client/Lighting.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/Options.h" @@ -14,7 +16,6 @@ #include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/EntityHorse.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" // #include // "../../../minecraft/net.minecraft.world.entity.animal.EntityHorse.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h index f5cf3deb6..f500748f2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h @@ -1,10 +1,8 @@ #pragma once #include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h" - #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h" class UIControl_MinecraftHorse : public UIControl { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.cpp index fcfcb5838..40e2fc49f 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.cpp @@ -1,19 +1,20 @@ #include "UIControl_MinecraftPlayer.h" #include + #include #include #include "4J_Render.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "minecraft/client/Lighting.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/Options.h" #include "minecraft/client/gui/ScreenSizeCalculator.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" UIControl_MinecraftPlayer::UIControl_MinecraftPlayer() { UIControl::setControlType(UIControl::eMinecraftPlayer); diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h index c09ca795e..5bfb23ad4 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h @@ -1,10 +1,8 @@ #pragma once #include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h" - #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h" class UIControl_MinecraftPlayer : public UIControl { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.cpp index f910d8d31..bc2172e03 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.cpp @@ -1,11 +1,11 @@ #include "UIControl_PlayerList.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "console_helpers/StringHelpers.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" bool UIControl_PlayerList::setupControl(UIScene* scene, IggyValuePath* parent, const std::string& controlName) { diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.h index 393f66a2f..635cd9127 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.h @@ -6,7 +6,6 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_ButtonList.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.h" class UIControl_PlayerList : public UIControl_ButtonList { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.cpp index ea80cb0ee..12f201def 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.cpp @@ -1,13 +1,17 @@ #include "UIControl_PlayerSkinPreview.h" #include + #include #include #include #include "4J_Render.h" #include "Minecraft.Client/Common/App_enums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "gl3_loader.h" #include "java/Class.h" #include "minecraft/client/Lighting.h" #include "minecraft/client/Minecraft.h" @@ -19,9 +23,6 @@ #include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" #include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/world/entity/player/Player.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "gl3_loader.h" // #define SKIN_PREVIEW_BOB_ANIM #define SKIN_PREVIEW_WALKING_ANIM diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.h index ef9349b9b..478c24b07 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.h @@ -9,7 +9,6 @@ #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl.h" #include "minecraft/client/renderer/Textures.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.h" class ModelPart; class EntityRenderer; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.cpp index 62155c532..6e7af2966 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.cpp @@ -3,9 +3,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "console_helpers/StringHelpers.h" UIControl_Progress::UIControl_Progress() { m_min = 0; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h index 415966001..62c0c995e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h @@ -2,13 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" class UIControl_Progress : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.cpp index 1e38f7145..e61974bf7 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.cpp @@ -1,11 +1,11 @@ #include "UIControl_SaveList.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "console_helpers/StringHelpers.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" bool UIControl_SaveList::setupControl(UIScene* scene, IggyValuePath* parent, const std::string& controlName) { diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h index 3bc0b46c9..a19e5822f 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h @@ -6,7 +6,6 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_ButtonList.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h" class UIControl_SaveList : public UIControl_ButtonList { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.cpp index 9f5b95bd6..1acb18cb8 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.cpp @@ -3,12 +3,12 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/sounds/SoundTypes.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" +#include "minecraft/sounds/SoundTypes.h" UIControl_Slider::UIControl_Slider() { m_id = 0; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h index c09ab6996..84941bfd2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h @@ -3,14 +3,13 @@ #include #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" class UIControl_Slider : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h index c579cfd66..973a29938 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h @@ -2,12 +2,11 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" class UIControl_SlotList : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.cpp index df1570877..e06cf18bd 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.cpp @@ -3,9 +3,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "console_helpers/StringHelpers.h" UIControl_SpaceIndicatorBar::UIControl_SpaceIndicatorBar() { m_min = 0; diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.h index cea14b406..0a4876a22 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.h @@ -1,18 +1,18 @@ #pragma once #include + #include #include #include #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SpaceIndicatorBar.h" class UIControl_SpaceIndicatorBar : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.cpp index d94c8a099..a8e8a481a 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.cpp @@ -3,9 +3,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "console_helpers/StringHelpers.h" UIControl_TextInput::UIControl_TextInput() { m_bHasFocus = false; } diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h index 46719d56d..23c0c73da 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h @@ -2,13 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" class UIControl_TextInput : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.cpp b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.cpp index 801bcb779..5b1334f2d 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.cpp @@ -4,9 +4,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/UIString.h" -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "console_helpers/StringHelpers.h" UIControl_TexturePackList::UIControl_TexturePackList() {} diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h index 42074f6e3..c97336ab5 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h @@ -2,13 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h" class UIControl_TexturePackList : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Touch.h b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Touch.h index 3e4682a0e..6a3f8beee 100644 --- a/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Touch.h +++ b/targets/Minecraft.Client/Common/src/UI/Controls/UIControl_Touch.h @@ -2,12 +2,11 @@ #include +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Touch.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Touch.h" class UIControl_Touch : public UIControl_Base { private: diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp index 597c80ce5..96a2276d4 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp @@ -3,22 +3,22 @@ #include +#include "4J.Common/4J_InputActions.h" #include "4J_Input.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/ConsoleSchematicFile.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "console_helpers/compression.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/ChunkSource.h" -#include "4J.Common/4J_InputActions.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; #ifdef _DEBUG_MENUS_ENABLED diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOptions.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOptions.cpp index ce5fb0ece..90a26896b 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOptions.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOptions.cpp @@ -1,11 +1,11 @@ #include "UIScene_DebugOptions.h" #include "4J.Common/4J_InputActions.h" +#include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Common/src/Console_Debug_enum.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOverlay.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOverlay.cpp index d9e1ba23a..e9f22a25e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOverlay.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOverlay.cpp @@ -2,13 +2,20 @@ #include "Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugOverlay.h" #include + #include +#include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/commands/common/EnchantItemCommand.h" @@ -20,12 +27,6 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/level/storage/LevelData.h" -#include "4J.Common/4J_InputActions.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class Player; class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp index 8730e5f32..1d4fd5b9c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp @@ -2,22 +2,23 @@ #include "Minecraft.Client/Common/src/UI/Scenes/Debug/UIScene_DebugSetCamera.h" #include + #include +#include "4J.Common/4J_InputActions.h" #include "4J_Input.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/App_enums.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "minecraft/world/phys/Vec3.h" -#include "4J.Common/4J_InputActions.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/world/phys/Vec3.h" class UILayer; #ifdef _DEBUG_MENUS_ENABLED diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp index dd8a8e0a7..0abd576bd 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp @@ -1,20 +1,21 @@ #include "IUIScene_StartGame.h" #include + #include #include "4J_Profile.h" #include "Minecraft.Client/Common/App_structs.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp index dfcbc259f..85d8b2923 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp @@ -2,18 +2,10 @@ #include "UIScene_CreateWorldMenu.h" #include + #include #include -#include "Minecraft.Client/Common/src/DLC/DLCPack.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/Options.h" -#include "minecraft/client/skins/DLCTexturePack.h" -#include "minecraft/client/skins/TexturePack.h" -#include "minecraft/client/skins/TexturePackRepository.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/world/level/LevelSettings.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Input.h" @@ -21,6 +13,7 @@ #include "Common/App_Defines.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" @@ -33,7 +26,15 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/include/NetTypes.h" +#include "console_helpers/StringHelpers.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/Options.h" +#include "minecraft/client/skins/DLCTexturePack.h" +#include "minecraft/client/skins/TexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" +#include "minecraft/server/MinecraftServer.h" #include "minecraft/sounds/SoundTypes.h" +#include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/level/chunk/ChunkSource.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h index a7b7e2a19..c542bcf36 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h @@ -1,19 +1,20 @@ #pragma once #include + #include +#include "4J_Storage.h" #include "IUIScene_StartGame.h" #include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h index d1ed1d2c9..b4cf8c7a0 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h @@ -2,12 +2,12 @@ #include -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "4J_Storage.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h index 55d855c25..1abfae84c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h @@ -2,14 +2,14 @@ #include +#include "4J_Storage.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_DLCList.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_EULA.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_EULA.h index cc69c59bb..fa00a45ab 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_EULA.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_EULA.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp index 11c0f5130..5bc9ba0a8 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp @@ -1,10 +1,10 @@ #include "UIScene_Intro.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" #include "4J.Common/4J_InputActions.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h index bae837f49..5e8db2f43 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h @@ -2,12 +2,12 @@ #include +#include "4J_Storage.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class FriendSessionInfo; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp index 6385d6d1e..14c47a17d 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp @@ -1,11 +1,11 @@ #include "UIScene_LaunchMoreOptionsMenu.h" #include + #include -#include "4J_Input.h" -#include "console_helpers/StringHelpers.h" #include "4J.Common/4J_InputActions.h" +#include "4J_Input.h" #include "4J_Profile.h" #include "4J_Render.h" #include "Common/App_Defines.h" @@ -19,6 +19,7 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" #include "minecraft/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h index c0a81a400..dbd83f257 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h @@ -2,6 +2,8 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h" @@ -9,8 +11,6 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp index 6d101187a..b40ccb204 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp @@ -5,13 +5,14 @@ #include #include #include + #include -#include "Minecraft.Client/Common/src/Leaderboards/LeaderboardManager.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Common/src/Leaderboards/LeaderboardInterface.h" +#include "Minecraft.Client/Common/src/Leaderboards/LeaderboardManager.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h index db8308206..6e49a472b 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h @@ -3,14 +3,14 @@ #include #include +#include "4J.Common/4J_Compat.h" +#include "4J_Storage.h" #include "Minecraft.Client/Common/src/Leaderboards/LeaderboardInterface.h" +#include "Minecraft.Client/Common/src/Leaderboards/LeaderboardManager.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_LeaderboardList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J.Common/4J_Compat.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/Leaderboards/LeaderboardManager.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp index e503c1d32..86621d2d0 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp @@ -4,13 +4,6 @@ #include #include -#include "Minecraft.Client/Common/src/DLC/DLCPack.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/Options.h" -#include "minecraft/client/skins/DLCTexturePack.h" -#include "minecraft/client/skins/TexturePackRepository.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/world/level/LevelSettings.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" @@ -18,6 +11,7 @@ #include "Common/App_Defines.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" @@ -31,8 +25,14 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/include/NetTypes.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/Options.h" +#include "minecraft/client/skins/DLCTexturePack.h" #include "minecraft/client/skins/TexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" +#include "minecraft/server/MinecraftServer.h" #include "minecraft/sounds/SoundTypes.h" +#include "minecraft/world/level/LevelSettings.h" #include "strings.h" #define GAME_CREATE_ONLINE_TIMER_ID 0 diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h index fd68e8347..3fa3ceb1f 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h @@ -3,16 +3,16 @@ #include #include +#include "4J_Storage.h" #include "IUIScene_StartGame.h" #include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TexturePackList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp index 2d2df546b..8f07cf0ef 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp @@ -3,12 +3,9 @@ #include #include #include + #include -#include "Minecraft.Client/Common/src/Network/SessionInfo.h" -#include "minecraft/client/skins/TexturePack.h" -#include "minecraft/client/skins/TexturePackRepository.h" -#include "minecraft/server/MinecraftServer.h" #include "4J.Common/4J_InputActions.h" #include "4J_Input.h" #include "4J_Profile.h" @@ -17,6 +14,7 @@ #include "Minecraft.Client/Common/src/DLC/DLCManager.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" +#include "Minecraft.Client/Common/src/Network/SessionInfo.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" @@ -27,6 +25,9 @@ #include "java/File.h" #include "java/InputOutputStream/FileInputStream.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/skins/TexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" +#include "minecraft/server/MinecraftServer.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/level/LevelSettings.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h index 12e1e8c2a..2f8695a54 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h @@ -1,21 +1,21 @@ #pragma once -#include -#include #include #include +#include +#include #include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "java/File.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SaveList.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "java/File.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" class LevelGenerationOptions; class File; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp index e35cb5a4f..b2ed1a255 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp @@ -5,13 +5,6 @@ #include #include -#include "console_helpers/StringHelpers.h" -#include "java/Random.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/User.h" -#include "minecraft/client/gui/Font.h" -#include "minecraft/client/gui/ScreenSizeCalculator.h" -#include "minecraft/server/MinecraftServer.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" @@ -28,11 +21,18 @@ #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "Minecraft.Client/include/NetTypes.h" +#include "console_helpers/StringHelpers.h" #include "gl3_loader.h" #include "java/InputOutputStream/BufferedReader.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/InputStreamReader.h" +#include "java/Random.h" #include "java/System.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/User.h" +#include "minecraft/client/gui/Font.h" +#include "minecraft/client/gui/ScreenSizeCalculator.h" +#include "minecraft/server/MinecraftServer.h" #include "minecraft/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h index e2863f365..e5d27a998 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h @@ -1,17 +1,18 @@ #pragma once #include + #include #include -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "java/Random.h" #include "4J_Storage.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "java/Random.h" class Random; class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp index 01bace163..0a905c6bb 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp @@ -34,7 +34,8 @@ UIScene_NewUpdateMessage::UIScene_NewUpdateMessage(int iPad, void* initData, std::vector paragraphs; int lastIndex = 0; for (int index = message.find(L"\r\n", lastIndex, 2); - index != std::wstring::npos; index = message.find(L"\r\n", lastIndex, 2)) { + index != std::wstring::npos; + index = message.find(L"\r\n", lastIndex, 2)) { paragraphs.push_back(message.substr(lastIndex, index - lastIndex) + L" "); lastIndex = index + 2; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h index 9a923a506..ccb2739bc 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h index 8afbd979b..111879294 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.h index a3034ec34..791bfd85e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.h @@ -2,8 +2,8 @@ #include -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp index fd37850b8..3232fbc73 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp @@ -1,20 +1,21 @@ #include "UIScene_ControlsMenu.h" #include + #include -#include "4J_Input.h" -#include "Minecraft.Client/Common/src/BuildVer/BuildVer.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_InputActions.h" +#include "4J_Input.h" #include "Common/App_enums.h" +#include "Minecraft.Client/Common/src/BuildVer/BuildVer.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/entity/player/Abilities.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.h index 910bbf952..243be55d2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ControlsMenu.h @@ -2,12 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.cpp index e2887770f..5c98ee2d2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.cpp @@ -4,12 +4,12 @@ #include #include -#include "console_helpers/StringHelpers.h" #include "4J.Common/4J_InputActions.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" #include "strings.h" #define CREDIT_ICON -2 diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.h index e2dc70e39..995df1d73 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_Credits.h @@ -2,9 +2,9 @@ #include -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp index 2ec3f02a2..bc15ae2e0 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp @@ -1,7 +1,6 @@ #include "UIScene_HelpAndOptionsMenu.h" -#include "minecraft/client/Minecraft.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" @@ -9,6 +8,7 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" #include "minecraft/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h index 6f31e2ba2..95214bb2f 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h @@ -2,9 +2,9 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp index 392530f30..385c2acc5 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp @@ -3,15 +3,16 @@ #include #include + #include -#include "console_helpers/StringHelpers.h" #include "4J.Common/4J_InputActions.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" #include "minecraft/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.h index 91ade7e42..dc33483bd 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlay.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_DynamicLabel.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h index cc2ca51e1..4909e3cfc 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h @@ -2,9 +2,9 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_LanguageSelector.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_LanguageSelector.h index 49dd5fd46..bb9efeed2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_LanguageSelector.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_LanguageSelector.h @@ -3,14 +3,14 @@ #include #include "Minecraft.Client/Common/App_Defines.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_ButtonList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/include/NetTypes.h" #include "Minecraft.Client/include/SkinBox.h" #include "Minecraft.Client/include/XboxStubs.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h index d9d95a229..0e7dadc8d 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h @@ -2,9 +2,9 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h index 5767fc092..c1c569db3 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h @@ -2,9 +2,9 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp index 510ee8d01..8b4a7ad26 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp @@ -2,7 +2,6 @@ #include -#include "minecraft/client/Minecraft.h" #include "4J.Common/4J_InputActions.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" @@ -10,6 +9,7 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" #include "strings.h" UIScene_SettingsControlMenu::UIScene_SettingsControlMenu(int iPad, diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h index 245ab3662..27677b683 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h @@ -2,9 +2,9 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h index 19d5cc07c..ec2e4110e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp index 4a410f053..7a9e43105 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp @@ -1,7 +1,6 @@ #include "UIScene_SettingsMenu.h" -#include "minecraft/client/Minecraft.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" @@ -9,6 +8,7 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" #include "minecraft/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.h index 80bdc83db..422ec4059 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsMenu.h @@ -2,10 +2,10 @@ #include -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "4J_Storage.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h index bdf8093c7..109449aac 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h @@ -2,12 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h index de2a367df..a7eb97477 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Slider.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp index 5858dc78c..741c0b067 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp @@ -2,17 +2,17 @@ #include "UIScene_SkinSelectMenu.h" #include + #include -#include "Minecraft.Client/Common/Minecraft_Macros.h" -#include "Minecraft.Client/Common/src/DLC/DLCPack.h" -#include "Minecraft.Client/Common/src/DLC/DLCSkinFile.h" -#include "console_helpers/StringHelpers.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "4J_Render.h" #include "Common/App_Defines.h" +#include "Minecraft.Client/Common/Minecraft_Macros.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Common/src/DLC/DLCSkinFile.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.h" @@ -21,6 +21,7 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "SkinBox.h" +#include "console_helpers/StringHelpers.h" #include "gl3_loader.h" #include "minecraft/client/Minecraft.h" #include "minecraft/sounds/SoundTypes.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h index e7efbac08..51ce3e1f6 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h @@ -3,17 +3,17 @@ #include #include +#include "4J_Storage.h" #include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerSkinPreview.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/include/SkinBox.h" -#include "console_helpers/Definitions.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/include/SkinBox.h" +#include "console_helpers/Definitions.h" #include "minecraft/client/renderer/Textures.h" class DLCPack; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp index bd7c33fa4..0f0527fc6 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp @@ -4,10 +4,9 @@ #include #include -#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_InputActions.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" @@ -17,6 +16,7 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h index 914905443..6ccff65cd 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h @@ -2,13 +2,13 @@ #include +#include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Cursor.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J_Render.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp index be242dbfd..7cbda5a5c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp @@ -3,12 +3,10 @@ #include #include + #include #include -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J_Input.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" @@ -19,6 +17,9 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "console_helpers/StringHelpers.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h index 53d94386c..fd8e5e2f2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h @@ -5,16 +5,16 @@ #include "4J_Input.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_AnvilMenu.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" -#include "UIScene_AbstractContainerMenu.h" -#include "minecraft/world/inventory/MerchantMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "UIScene_AbstractContainerMenu.h" +#include "minecraft/world/inventory/MerchantMenu.h" class InventoryMenu; class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp index 56d10ebc0..6e2fa42a0 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp @@ -1,17 +1,18 @@ #include "UIScene_BeaconMenu.h" #include + #include -#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" -#include "minecraft/client/Minecraft.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.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" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h index b1653ffdd..633472e32 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h @@ -3,15 +3,15 @@ #include #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_BeaconMenu.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BeaconEffectButton.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "UIScene_AbstractContainerMenu.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp index da1aa6903..3a6ffeb32 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp @@ -6,17 +6,17 @@ #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" +#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.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.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp index 57c4395d1..d45b4ba6f 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp @@ -1,20 +1,21 @@ #include "UIScene_ContainerMenu.h" #include + #include #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" +#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.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.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp index ac0935f6f..6ca8b4391 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp @@ -1,12 +1,18 @@ #include "UIScene_CreativeMenu.h" #include + #include #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" +#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" @@ -15,11 +21,6 @@ #include "minecraft/client/player/LocalPlayer.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/SimpleContainer.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp index a220d62f0..4a78fd510 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp @@ -1,19 +1,20 @@ #include "UIScene_DispenserMenu.h" #include + #include #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/world/inventory/TrapMenu.h" -#include "minecraft/world/level/tile/entity/DispenserTileEntity.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/world/inventory/TrapMenu.h" +#include "minecraft/world/level/tile/entity/DispenserTileEntity.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp index 76ca3f06f..6c5f3ab58 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp @@ -2,9 +2,9 @@ #include "UIScene_EnchantingMenu.h" #include + #include -#include "minecraft/client/Minecraft.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" @@ -16,6 +16,7 @@ #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" #include "minecraft/world/inventory/EnchantmentMenu.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h index 8ee0593d8..ae17acb11 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h @@ -3,16 +3,16 @@ #include #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_EnchantingMenu.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentBook.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_EnchantmentButton.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "UIScene_AbstractContainerMenu.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "UIScene_AbstractContainerMenu.h" class InventoryMenu; class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp index 95b4562ef..48dc6abb6 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp @@ -1,10 +1,9 @@ #include "UIScene_FireworksMenu.h" #include + #include -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/player/LocalPlayer.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" @@ -12,6 +11,8 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/player/LocalPlayer.h" #include "minecraft/world/inventory/FireworksMenu.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h index 66f2b2d00..714a18587 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h @@ -3,14 +3,14 @@ #include #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FireworksMenu.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "UIScene_AbstractContainerMenu.h" class InventoryMenu; class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp index 4e7516b3d..1e6867a41 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp @@ -4,7 +4,6 @@ #include #include "4J_Profile.h" -#include "minecraft/client/Minecraft.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" @@ -13,6 +12,7 @@ #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "minecraft/client/Minecraft.h" #include "minecraft/world/inventory/FurnaceMenu.h" #include "minecraft/world/level/tile/entity/FurnaceTileEntity.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.h index 0d6c8f32e..e2363d86b 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.h @@ -4,14 +4,14 @@ #include #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_FurnaceMenu.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" +#include "UIScene_AbstractContainerMenu.h" class InventoryMenu; class FurnaceTileEntity; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp index 7e238aa44..7b019b4bf 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp @@ -1,20 +1,21 @@ #include "UIScene_HopperMenu.h" #include + #include #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" +#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.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.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp index 10f426c8c..338e48490 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp @@ -1,11 +1,18 @@ #include "UIScene_HorseInventoryMenu.h" #include + #include #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" +#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/Minecraft.h" @@ -13,12 +20,6 @@ #include "minecraft/world/entity/animal/EntityHorse.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/HorseInventoryMenu.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftHorse.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp index 37ecf2f4d..7e526002b 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp @@ -2,6 +2,7 @@ #include "UIScene_InventoryMenu.h" #include + #include #include #include @@ -9,15 +10,15 @@ #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" #include "minecraft/SharedConstants.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/player/LocalPlayer.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/effect/MobEffectInstance.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h index 864fa4af0..c50d575a8 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h @@ -3,15 +3,15 @@ #include #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_InventoryMenu.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" -#include "UIScene_AbstractContainerMenu.h" -#include "minecraft/world/effect/MobEffect.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_MinecraftPlayer.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "UIScene_AbstractContainerMenu.h" +#include "minecraft/world/effect/MobEffect.h" class InventoryMenu; class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp index f9fea16b8..3e099e431 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp @@ -5,10 +5,6 @@ #include #include -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/util/HtmlString.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" @@ -20,6 +16,10 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/util/HtmlString.h" #include "minecraft/world/inventory/MerchantMenu.h" #include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h index 93480bbe5..48f3139d0 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h @@ -3,12 +3,12 @@ #include #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_TradingMenu.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" class InventoryMenu; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp index 17f7cb07e..1fb26f82c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp @@ -1,8 +1,6 @@ #include "UIScene_CraftingMenu.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" @@ -15,6 +13,8 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/player/LocalPlayer.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/CraftingMenu.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h index e37c77f3b..bba54b8d7 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h @@ -4,12 +4,12 @@ #include #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CraftingMenu.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_HTMLLabel.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_SlotList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" class AbstractContainerMenu; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp index 24f28ee54..ded6b8f23 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp @@ -3,9 +3,6 @@ #include -#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "4J_Storage.h" @@ -13,11 +10,14 @@ #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "strings.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h index f45b34884..7b6d0b299 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp index f170bfd1e..67441f40c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp @@ -3,12 +3,9 @@ #include #include + #include -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/gui/Font.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" @@ -17,9 +14,13 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/gui/Font.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "strings.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h index d6c3f6de0..e36a06cc9 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h @@ -3,8 +3,8 @@ #include #include -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp index 4efb5e9bc..9c976fc8e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp @@ -3,9 +3,6 @@ #include -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_InputActions.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" @@ -16,6 +13,9 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.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 "minecraft/world/entity/player/Player.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h index e04d2c46c..9679425ca 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h @@ -2,10 +2,10 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp index edc0c7caa..4305c1221 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp @@ -2,9 +2,6 @@ #include -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" @@ -21,6 +18,9 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.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/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h index c27454102..54d7201ff 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h @@ -4,13 +4,13 @@ #include #include +#include "4J_Storage.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class INetworkPlayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp index 604f16a54..fe446005e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp @@ -3,9 +3,6 @@ #include -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "4J.Common/4J_InputActions.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" @@ -18,6 +15,9 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.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 "minecraft/world/entity/player/Player.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h index e4cf3b2b1..a73f388e6 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h @@ -3,13 +3,13 @@ #include #include +#include "4J_Storage.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_CheckBox.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp index 2c1c6b878..67edbbee8 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp @@ -2,19 +2,17 @@ #include "UIScene_PauseMenu.h" #include + #include -#include "Minecraft.Client/Common/src/DLC/DLCPack.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/skins/DLCTexturePack.h" -#include "minecraft/client/skins/TexturePackRepository.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" @@ -22,6 +20,9 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/client/skins/DLCTexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h index 6db366e3f..f01b81f75 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h @@ -2,11 +2,11 @@ #include +#include "4J_Storage.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_PauseMenu.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp index e0555638a..8a96c244c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp @@ -1,13 +1,8 @@ #include "UIScene_SignEntryMenu.h" -#include "4J_Input.h" -#include "console_helpers/StringHelpers.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 "4J.Common/4J_InputActions.h" +#include "4J_Input.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" @@ -16,6 +11,11 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.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 "minecraft/sounds/SoundTypes.h" #include "minecraft/world/level/tile/entity/SignTileEntity.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h index 460e79f39..1a5f9faa4 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h @@ -3,11 +3,11 @@ #include #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class SignTileEntity; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp index 3794656d8..199373c19 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp @@ -3,8 +3,6 @@ #include -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/server/commands/TeleportCommand.h" #include "4J.Common/4J_InputActions.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" @@ -17,7 +15,9 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/network/packet/GameCommandPacket.h" +#include "minecraft/server/commands/TeleportCommand.h" #include "minecraft/sounds/SoundTypes.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h index 7df137bcc..a6e567baf 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h @@ -4,10 +4,10 @@ #include #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_PlayerList.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/include/NetTypes.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.cpp index f201a116b..19cb3795a 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.cpp @@ -1,7 +1,6 @@ #include "UIScene_ConnectingProgress.h" -#include "minecraft/client/Minecraft.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "Common/App_enums.h" @@ -15,6 +14,7 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "java/System.h" +#include "minecraft/client/Minecraft.h" #include "minecraft/network/packet/DisconnectPacket.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.h b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.h index ac353f037..287d24829 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_ConnectingProgress.h @@ -2,12 +2,12 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.cpp index c87266a3d..981b8949d 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.cpp @@ -4,8 +4,6 @@ #include #include -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/ProgressRenderer.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" @@ -21,6 +19,8 @@ #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "console_helpers/C4JThread.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/ProgressRenderer.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.h b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.h index 4c96fecb9..14b05d8c2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_FullscreenProgress.h @@ -2,13 +2,13 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Progress.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class C4JThread; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.cpp index 742f8df64..3fd01247e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.cpp @@ -1,6 +1,5 @@ #include "UIScene_Keyboard.h" -#include "console_helpers/StringHelpers.h" #include "4J.Common/4J_InputActions.h" #include "Common/App_Defines.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" @@ -10,6 +9,7 @@ #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "console_helpers/StringHelpers.h" #include "strings.h" #define KEYBOARD_DONE_TIMER_ID 0 diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.h b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.h index 740091e2f..3da8be9df 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Keyboard.h @@ -2,11 +2,11 @@ #include +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_TextInput.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.cpp index 0a93ee884..9e4ea45e2 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.cpp @@ -1,9 +1,9 @@ #include "UIScene_MessageBox.h" -#include "4J_Profile.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" +#include "4J_Profile.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.h b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.h index 70ec09e58..f5a4291ee 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_MessageBox.h @@ -2,11 +2,11 @@ #include +#include "4J_Storage.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Button.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.cpp index 51a30e80c..7902d5e2e 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.cpp @@ -3,9 +3,9 @@ #include -#include "4J_Input.h" #include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" +#include "4J_Input.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.h b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.h index 316ec6b31..ebfb43d78 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.h +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.h @@ -3,12 +3,12 @@ #include #include -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" -#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_BitmapIcon.h" +#include "Minecraft.Client/Common/src/UI/Controls/UIControl_Label.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Timer.cpp b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Timer.cpp index 9833c7166..df25a4b3c 100644 --- a/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Timer.cpp +++ b/targets/Minecraft.Client/Common/src/UI/Scenes/UIScene_Timer.cpp @@ -1,7 +1,7 @@ #include "UIScene_Timer.h" -#include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" +#include "Minecraft.Client/Common/src/UI/UIScene.h" class UILayer; diff --git a/targets/Minecraft.Client/Common/src/UI/UIBitmapFont.cpp b/targets/Minecraft.Client/Common/src/UI/UIBitmapFont.cpp index 57c80364f..fdeee3fa0 100644 --- a/targets/Minecraft.Client/Common/src/UI/UIBitmapFont.cpp +++ b/targets/Minecraft.Client/Common/src/UI/UIBitmapFont.cpp @@ -1,9 +1,9 @@ #include "UIBitmapFont.h" -#include "Minecraft.Client/include/BufferedImage.h" -#include "UIFontData.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/include/BufferedImage.h" +#include "UIFontData.h" ///////////////////////////// // UI Abstract Bitmap Font // diff --git a/targets/Minecraft.Client/Common/src/UI/UIController.cpp b/targets/Minecraft.Client/Common/src/UI/UIController.cpp index 4ab06ff52..882af6f95 100644 --- a/targets/Minecraft.Client/Common/src/UI/UIController.cpp +++ b/targets/Minecraft.Client/Common/src/UI/UIController.cpp @@ -5,20 +5,12 @@ #include #include #include + #include #include #include #include "4J_Input.h" -#include "Minecraft.Client/include/BufferedImage.h" -#include "UIFontData.h" -#include "console_helpers/PerformanceTimer.h" -#include "console_helpers/PlatformTime.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/skins/DLCTexturePack.h" -#include "minecraft/client/skins/TexturePackRepository.h" #include "4J_Profile.h" #include "Common/App_enums.h" #include "Minecraft.Client/Common/src/Audio/SoundEngine.h" @@ -40,12 +32,21 @@ #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" +#include "Minecraft.Client/include/BufferedImage.h" +#include "UIFontData.h" #include "XboxStubs.h" #include "console_helpers/C4JThread.h" +#include "console_helpers/PerformanceTimer.h" +#include "console_helpers/PlatformTime.h" +#include "console_helpers/StringHelpers.h" #include "gl3_loader.h" #include "java/System.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/skins/DLCTexturePack.h" #include "minecraft/client/skins/TexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" #include "strings.h" class Tutorial; diff --git a/targets/Minecraft.Client/Common/src/UI/UIController.h b/targets/Minecraft.Client/Common/src/UI/UIController.h index 505dd0510..2ff6c826a 100644 --- a/targets/Minecraft.Client/Common/src/UI/UIController.h +++ b/targets/Minecraft.Client/Common/src/UI/UIController.h @@ -2,8 +2,8 @@ #include // using namespace std; #include -#include #include +#include #include #include #include @@ -15,16 +15,16 @@ #include "Minecraft.Client/Windows64/Iggy/include/iggy.h" #endif +#include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" +#include "4J_Render.h" #include "4J_Storage.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIController.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" -#include "UIGroup.h" -#include "4J.Common/4J_Compat.h" -#include "4J_Render.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "UIGroup.h" #include "minecraft/sounds/SoundTypes.h" class UIAbstractBitmapFont; diff --git a/targets/Minecraft.Client/Common/src/UI/UIGroup.cpp b/targets/Minecraft.Client/Common/src/UI/UIGroup.cpp index b0d5575d5..8c7bfc849 100644 --- a/targets/Minecraft.Client/Common/src/UI/UIGroup.cpp +++ b/targets/Minecraft.Client/Common/src/UI/UIGroup.cpp @@ -1,16 +1,16 @@ #include "UIGroup.h" #include "4J_Profile.h" +#include "4J_Render.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/UILayer.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/MemoryTracker.h" #include "minecraft/client/Minecraft.h" -#include "4J_Render.h" -#include "Minecraft.Client/Common/src/UI/UILayer.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" class UIScene; diff --git a/targets/Minecraft.Client/Common/src/UI/UILayer.cpp b/targets/Minecraft.Client/Common/src/UI/UILayer.cpp index 5ae941a6b..4f9f08132 100644 --- a/targets/Minecraft.Client/Common/src/UI/UILayer.cpp +++ b/targets/Minecraft.Client/Common/src/UI/UILayer.cpp @@ -2,6 +2,7 @@ #include +#include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/Components/UIComponent_Chat.h" #include "Minecraft.Client/Common/src/UI/Components/UIComponent_DebugUIConsole.h" @@ -74,11 +75,10 @@ #include "Minecraft.Client/Common/src/UI/Scenes/UIScene_QuadrantSignin.h" #include "Minecraft.Client/Common/src/UI/Scenes/UIScene_Timer.h" #include "Minecraft.Client/Common/src/UI/UIGroup.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" -#include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/UIScene.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" UILayer::UILayer(UIGroup* parent) { m_parentGroup = parent; diff --git a/targets/Minecraft.Client/Common/src/UI/UIScene.cpp b/targets/Minecraft.Client/Common/src/UI/UIScene.cpp index 2058cb4d7..6f1f4530b 100644 --- a/targets/Minecraft.Client/Common/src/UI/UIScene.cpp +++ b/targets/Minecraft.Client/Common/src/UI/UIScene.cpp @@ -5,16 +5,22 @@ #include #include "4J.Common/4J_Compat.h" +#include "4J.Common/4J_InputActions.h" +#include "4J_Render.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" +#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl.h" #include "Minecraft.Client/Common/src/UI/Controls/UIControl_Base.h" #include "Minecraft.Client/Common/src/UI/UIController.h" #include "Minecraft.Client/Common/src/UI/UIGroup.h" #include "Minecraft.Client/Common/src/UI/UILayer.h" +#include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "console_helpers/StringHelpers.h" +#include "gl3_loader.h" #include "java/System.h" #include "minecraft/client/Lighting.h" #include "minecraft/client/Minecraft.h" @@ -22,12 +28,6 @@ #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/item/ItemInstance.h" -#include "4J.Common/4J_InputActions.h" -#include "4J_Render.h" -#include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" -#include "Minecraft.Client/Linux/Iggy/include/iggy.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" -#include "gl3_loader.h" class MultiplayerLocalPlayer; diff --git a/targets/Minecraft.Client/Common/src/UI/UIScene.h b/targets/Minecraft.Client/Common/src/UI/UIScene.h index 735f3ed55..1078848fc 100644 --- a/targets/Minecraft.Client/Common/src/UI/UIScene.h +++ b/targets/Minecraft.Client/Common/src/UI/UIScene.h @@ -6,6 +6,7 @@ // different sized movies) #include + #include #include #include diff --git a/targets/Minecraft.Client/Common/src/UI/UITTFFont.cpp b/targets/Minecraft.Client/Common/src/UI/UITTFFont.cpp index e086596cf..d7d67be4c 100644 --- a/targets/Minecraft.Client/Common/src/UI/UITTFFont.cpp +++ b/targets/Minecraft.Client/Common/src/UI/UITTFFont.cpp @@ -1,13 +1,14 @@ #include "UITTFFont.h" #include + #include #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/PortableFileIO.h" #include "console_helpers/StringHelpers.h" -#include "Minecraft.Client/Linux/Iggy/include/rrCore.h" UITTFFont::UITTFFont(const std::string& name, const std::string& path, S32 fallbackCharacter) diff --git a/targets/Minecraft.Client/Linux/Iggy/gdraw/gdraw.c b/targets/Minecraft.Client/Linux/Iggy/gdraw/gdraw.c index 6f20abaa0..2788af8f1 100644 --- a/targets/Minecraft.Client/Linux/Iggy/gdraw/gdraw.c +++ b/targets/Minecraft.Client/Linux/Iggy/gdraw/gdraw.c @@ -10,9 +10,9 @@ #include #include -#include "SDL_video.h" #include "Minecraft.Client/Linux/Iggy/gdraw/gdraw.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" +#include "SDL_video.h" #ifndef _ENABLEIGGY void* IggyGDrawMallocAnnotated(SINTa size, const char* file, int line) { diff --git a/targets/Minecraft.Client/Linux/LinuxGL.cpp b/targets/Minecraft.Client/Linux/LinuxGL.cpp index 4e0c86f58..8339558bf 100644 --- a/targets/Minecraft.Client/Linux/LinuxGL.cpp +++ b/targets/Minecraft.Client/Linux/LinuxGL.cpp @@ -2,10 +2,10 @@ #include "4J_Render.h" #include "Minecraft.Client/include/stubs.h" +#include "gl3_loader.h" #include "java/ByteBuffer.h" #include "java/FloatBuffer.h" #include "java/IntBuffer.h" -#include "gl3_loader.h" extern C4JRender RenderManager; diff --git a/targets/Minecraft.Client/Linux/Linux_App.cpp b/targets/Minecraft.Client/Linux/Linux_App.cpp index 398ca97cf..6fb17ad33 100644 --- a/targets/Minecraft.Client/Linux/Linux_App.cpp +++ b/targets/Minecraft.Client/Linux/Linux_App.cpp @@ -1,11 +1,13 @@ #include "Linux_App.h" #include + #include -#include "4J_Render.h" #include "4J_Profile.h" +#include "4J_Render.h" #include "4J_Storage.h" +#include "Common/App_enums.h" #include "Minecraft.Client/Common/Consoles_App.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" @@ -14,7 +16,6 @@ #include "minecraft/client/User.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/world/level/LevelSettings.h" -#include "Common/App_enums.h" CConsoleMinecraftApp app; diff --git a/targets/Minecraft.Client/Linux/Linux_Minecraft.cpp b/targets/Minecraft.Client/Linux/Linux_Minecraft.cpp index 2d500f628..324803de4 100644 --- a/targets/Minecraft.Client/Linux/Linux_Minecraft.cpp +++ b/targets/Minecraft.Client/Linux/Linux_Minecraft.cpp @@ -1,7 +1,6 @@ // Minecraft.cpp : Defines the entry point for the application. // - // #include #include @@ -41,6 +40,7 @@ static void sigsegv_handler(int sig) { #include #include #include + #include #include @@ -49,22 +49,22 @@ static void sigsegv_handler(int sig) { // #include "Minecraft.Client/Common/src/Leaderboards/LeaderboardManager.h" // #include "../Common/XUI/XUI_Scene_Container.h" // #include "NetworkManager.h" +#include "4J.Common/4J_Compat.h" #include "4J.Common/4J_InputActions.h" #include "4J_Input.h" #include "4J_Profile.h" +#include "4J_Render.h" +#include "4J_Storage.h" #include "Minecraft.Client/Common/App_Defines.h" +#include "Minecraft.Client/Common/src/Audio/SoundEngine.h" +#include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" #include "console_helpers/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 "4J.Common/4J_Compat.h" -#include "4J_Render.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/Audio/SoundEngine.h" -#include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/world/level/tile/Tile.h" #include "strings.h" diff --git a/targets/Minecraft.Client/Linux/Linux_UIController.cpp b/targets/Minecraft.Client/Linux/Linux_UIController.cpp index e8f46ce67..5d212ff6f 100644 --- a/targets/Minecraft.Client/Linux/Linux_UIController.cpp +++ b/targets/Minecraft.Client/Linux/Linux_UIController.cpp @@ -3,11 +3,11 @@ // GDraw GL backend for Linux #include "4J_Render.h" #include "Linux_UIController.h" -#include "Minecraft.Client/Linux/Iggy/gdraw/gdraw.h" -#include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" +#include "Minecraft.Client/Linux/Iggy/gdraw/gdraw.h" #include "Minecraft.Client/Linux/Iggy/include/iggy.h" #include "Minecraft.Client/Linux/Iggy/include/rrCore.h" +#include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Windows64/Iggy/include/gdraw.h" ConsoleUIController ui; diff --git a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.inl b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.inl index 39bb5ac7c..f2db42359 100644 --- a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.inl +++ b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXCollision.inl @@ -9,510 +9,506 @@ #pragma once -XMGLOBALCONST XMVECTORF32 g_BoxOffset[8] = -{ - { { { -1.0f, -1.0f, 1.0f, 0.0f } } }, - { { { 1.0f, -1.0f, 1.0f, 0.0f } } }, - { { { 1.0f, 1.0f, 1.0f, 0.0f } } }, - { { { -1.0f, 1.0f, 1.0f, 0.0f } } }, - { { { -1.0f, -1.0f, -1.0f, 0.0f } } }, - { { { 1.0f, -1.0f, -1.0f, 0.0f } } }, - { { { 1.0f, 1.0f, -1.0f, 0.0f } } }, - { { { -1.0f, 1.0f, -1.0f, 0.0f } } }, +XMGLOBALCONST XMVECTORF32 g_BoxOffset[8] = { + {{{-1.0f, -1.0f, 1.0f, 0.0f}}}, {{{1.0f, -1.0f, 1.0f, 0.0f}}}, + {{{1.0f, 1.0f, 1.0f, 0.0f}}}, {{{-1.0f, 1.0f, 1.0f, 0.0f}}}, + {{{-1.0f, -1.0f, -1.0f, 0.0f}}}, {{{1.0f, -1.0f, -1.0f, 0.0f}}}, + {{{1.0f, 1.0f, -1.0f, 0.0f}}}, {{{-1.0f, 1.0f, -1.0f, 0.0f}}}, }; -XMGLOBALCONST XMVECTORF32 g_RayEpsilon = { { { 1e-20f, 1e-20f, 1e-20f, 1e-20f } } }; -XMGLOBALCONST XMVECTORF32 g_RayNegEpsilon = { { { -1e-20f, -1e-20f, -1e-20f, -1e-20f } } }; -XMGLOBALCONST XMVECTORF32 g_FltMin = { { { -FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX } } }; -XMGLOBALCONST XMVECTORF32 g_FltMax = { { { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX } } }; +XMGLOBALCONST XMVECTORF32 g_RayEpsilon = {{{1e-20f, 1e-20f, 1e-20f, 1e-20f}}}; +XMGLOBALCONST XMVECTORF32 g_RayNegEpsilon = { + {{-1e-20f, -1e-20f, -1e-20f, -1e-20f}}}; +XMGLOBALCONST XMVECTORF32 g_FltMin = { + {{-FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX}}}; +XMGLOBALCONST XMVECTORF32 g_FltMax = {{{FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX}}}; -namespace MathInternal -{ +namespace MathInternal { - //----------------------------------------------------------------------------- - // Return true if any of the elements of a 3 vector are equal to 0xffffffff. - // Slightly more efficient than using XMVector3EqualInt. - //----------------------------------------------------------------------------- - inline bool XMVector3AnyTrue(_In_ FXMVECTOR V) noexcept - { - // Duplicate the fourth element from the first element. - XMVECTOR C = XMVectorSwizzle(V); +//----------------------------------------------------------------------------- +// Return true if any of the elements of a 3 vector are equal to 0xffffffff. +// Slightly more efficient than using XMVector3EqualInt. +//----------------------------------------------------------------------------- +inline bool XMVector3AnyTrue(_In_ FXMVECTOR V) noexcept { + // Duplicate the fourth element from the first element. + XMVECTOR C = + XMVectorSwizzle( + V); - return XMComparisonAnyTrue(XMVector4EqualIntR(C, XMVectorTrueInt())); - } + return XMComparisonAnyTrue(XMVector4EqualIntR(C, XMVectorTrueInt())); +} +//----------------------------------------------------------------------------- +// Return true if all of the elements of a 3 vector are equal to 0xffffffff. +// Slightly more efficient than using XMVector3EqualInt. +//----------------------------------------------------------------------------- +inline bool XMVector3AllTrue(_In_ FXMVECTOR V) noexcept { + // Duplicate the fourth element from the first element. + XMVECTOR C = + XMVectorSwizzle( + V); - //----------------------------------------------------------------------------- - // Return true if all of the elements of a 3 vector are equal to 0xffffffff. - // Slightly more efficient than using XMVector3EqualInt. - //----------------------------------------------------------------------------- - inline bool XMVector3AllTrue(_In_ FXMVECTOR V) noexcept - { - // Duplicate the fourth element from the first element. - XMVECTOR C = XMVectorSwizzle(V); - - return XMComparisonAllTrue(XMVector4EqualIntR(C, XMVectorTrueInt())); - } + return XMComparisonAllTrue(XMVector4EqualIntR(C, XMVectorTrueInt())); +} #if defined(_PREFAST_) || !defined(NDEBUG) - XMGLOBALCONST XMVECTORF32 g_UnitVectorEpsilon = { { { 1.0e-4f, 1.0e-4f, 1.0e-4f, 1.0e-4f } } }; - XMGLOBALCONST XMVECTORF32 g_UnitQuaternionEpsilon = { { { 1.0e-4f, 1.0e-4f, 1.0e-4f, 1.0e-4f } } }; - XMGLOBALCONST XMVECTORF32 g_UnitPlaneEpsilon = { { { 1.0e-4f, 1.0e-4f, 1.0e-4f, 1.0e-4f } } }; +XMGLOBALCONST XMVECTORF32 g_UnitVectorEpsilon = { + {{1.0e-4f, 1.0e-4f, 1.0e-4f, 1.0e-4f}}}; +XMGLOBALCONST XMVECTORF32 g_UnitQuaternionEpsilon = { + {{1.0e-4f, 1.0e-4f, 1.0e-4f, 1.0e-4f}}}; +XMGLOBALCONST XMVECTORF32 g_UnitPlaneEpsilon = { + {{1.0e-4f, 1.0e-4f, 1.0e-4f, 1.0e-4f}}}; - //----------------------------------------------------------------------------- - // Return true if the vector is a unit vector (length == 1). - //----------------------------------------------------------------------------- - inline bool XMVector3IsUnit(_In_ FXMVECTOR V) noexcept - { - XMVECTOR Difference = XMVectorSubtract(XMVector3Length(V), XMVectorSplatOne()); - return XMVector4Less(XMVectorAbs(Difference), g_UnitVectorEpsilon); +//----------------------------------------------------------------------------- +// Return true if the vector is a unit vector (length == 1). +//----------------------------------------------------------------------------- +inline bool XMVector3IsUnit(_In_ FXMVECTOR V) noexcept { + XMVECTOR Difference = + XMVectorSubtract(XMVector3Length(V), XMVectorSplatOne()); + return XMVector4Less(XMVectorAbs(Difference), g_UnitVectorEpsilon); +} + +//----------------------------------------------------------------------------- +// Return true if the quaterion is a unit quaternion. +//----------------------------------------------------------------------------- +inline bool XMQuaternionIsUnit(_In_ FXMVECTOR Q) noexcept { + XMVECTOR Difference = + XMVectorSubtract(XMVector4Length(Q), XMVectorSplatOne()); + return XMVector4Less(XMVectorAbs(Difference), g_UnitQuaternionEpsilon); +} + +//----------------------------------------------------------------------------- +// Return true if the plane is a unit plane. +//----------------------------------------------------------------------------- +inline bool XMPlaneIsUnit(_In_ FXMVECTOR Plane) noexcept { + XMVECTOR Difference = + XMVectorSubtract(XMVector3Length(Plane), XMVectorSplatOne()); + return XMVector4Less(XMVectorAbs(Difference), g_UnitPlaneEpsilon); +} + +#endif // _PREFAST_ || !NDEBUG + +//----------------------------------------------------------------------------- +inline XMVECTOR XMPlaneTransform(_In_ FXMVECTOR Plane, _In_ FXMVECTOR Rotation, + _In_ FXMVECTOR Translation) noexcept { + XMVECTOR vNormal = XMVector3Rotate(Plane, Rotation); + XMVECTOR vD = XMVectorSubtract(XMVectorSplatW(Plane), + XMVector3Dot(vNormal, Translation)); + + return XMVectorInsert<0, 0, 0, 0, 1>(vNormal, vD); +} + +//----------------------------------------------------------------------------- +// Return the point on the line segement (S1, S2) nearest the point P. +//----------------------------------------------------------------------------- +inline XMVECTOR PointOnLineSegmentNearestPoint(_In_ FXMVECTOR S1, + _In_ FXMVECTOR S2, + _In_ FXMVECTOR P) noexcept { + XMVECTOR Dir = XMVectorSubtract(S2, S1); + XMVECTOR Projection = + XMVectorSubtract(XMVector3Dot(P, Dir), XMVector3Dot(S1, Dir)); + XMVECTOR LengthSq = XMVector3Dot(Dir, Dir); + + XMVECTOR t = XMVectorMultiply(Projection, XMVectorReciprocal(LengthSq)); + XMVECTOR Point = XMVectorMultiplyAdd(t, Dir, S1); + + // t < 0 + XMVECTOR SelectS1 = XMVectorLess(Projection, XMVectorZero()); + Point = XMVectorSelect(Point, S1, SelectS1); + + // t > 1 + XMVECTOR SelectS2 = XMVectorGreater(Projection, LengthSq); + Point = XMVectorSelect(Point, S2, SelectS2); + + return Point; +} + +//----------------------------------------------------------------------------- +// Test if the point (P) on the plane of the triangle is inside the triangle +// (V0, V1, V2). +//----------------------------------------------------------------------------- +inline XMVECTOR XM_CALLCONV +PointOnPlaneInsideTriangle(_In_ FXMVECTOR P, _In_ FXMVECTOR V0, + _In_ FXMVECTOR V1, _In_ GXMVECTOR V2) noexcept { + // Compute the triangle normal. + XMVECTOR N = + XMVector3Cross(XMVectorSubtract(V2, V0), XMVectorSubtract(V1, V0)); + + // Compute the cross products of the vector from the base of each edge to + // the point with each edge vector. + XMVECTOR C0 = + XMVector3Cross(XMVectorSubtract(P, V0), XMVectorSubtract(V1, V0)); + XMVECTOR C1 = + XMVector3Cross(XMVectorSubtract(P, V1), XMVectorSubtract(V2, V1)); + XMVECTOR C2 = + XMVector3Cross(XMVectorSubtract(P, V2), XMVectorSubtract(V0, V2)); + + // If the cross product points in the same direction as the normal the the + // point is inside the edge (it is zero if is on the edge). + XMVECTOR Zero = XMVectorZero(); + XMVECTOR Inside0 = XMVectorGreaterOrEqual(XMVector3Dot(C0, N), Zero); + XMVECTOR Inside1 = XMVectorGreaterOrEqual(XMVector3Dot(C1, N), Zero); + XMVECTOR Inside2 = XMVectorGreaterOrEqual(XMVector3Dot(C2, N), Zero); + + // If the point inside all of the edges it is inside. + return XMVectorAndInt(XMVectorAndInt(Inside0, Inside1), Inside2); +} + +//----------------------------------------------------------------------------- +inline bool SolveCubic(_In_ float e, _In_ float f, _In_ float g, _Out_ float* t, + _Out_ float* u, _Out_ float* v) noexcept { + float p, q, h, rc, d, theta, costh3, sinth3; + + p = f - e * e / 3.0f; + q = g - e * f / 3.0f + e * e * e * 2.0f / 27.0f; + h = q * q / 4.0f + p * p * p / 27.0f; + + if (h > 0) { + *t = *u = *v = 0.f; + return false; // only one real root } - //----------------------------------------------------------------------------- - // Return true if the quaterion is a unit quaternion. - //----------------------------------------------------------------------------- - inline bool XMQuaternionIsUnit(_In_ FXMVECTOR Q) noexcept + if ((h == 0) && (q == 0)) // all the same root { - XMVECTOR Difference = XMVectorSubtract(XMVector4Length(Q), XMVectorSplatOne()); - return XMVector4Less(XMVectorAbs(Difference), g_UnitQuaternionEpsilon); - } - - //----------------------------------------------------------------------------- - // Return true if the plane is a unit plane. - //----------------------------------------------------------------------------- - inline bool XMPlaneIsUnit(_In_ FXMVECTOR Plane) noexcept - { - XMVECTOR Difference = XMVectorSubtract(XMVector3Length(Plane), XMVectorSplatOne()); - return XMVector4Less(XMVectorAbs(Difference), g_UnitPlaneEpsilon); - } - -#endif // _PREFAST_ || !NDEBUG - - //----------------------------------------------------------------------------- - inline XMVECTOR XMPlaneTransform(_In_ FXMVECTOR Plane, _In_ FXMVECTOR Rotation, _In_ FXMVECTOR Translation) noexcept - { - XMVECTOR vNormal = XMVector3Rotate(Plane, Rotation); - XMVECTOR vD = XMVectorSubtract(XMVectorSplatW(Plane), XMVector3Dot(vNormal, Translation)); - - return XMVectorInsert<0, 0, 0, 0, 1>(vNormal, vD); - } - - //----------------------------------------------------------------------------- - // Return the point on the line segement (S1, S2) nearest the point P. - //----------------------------------------------------------------------------- - inline XMVECTOR PointOnLineSegmentNearestPoint(_In_ FXMVECTOR S1, _In_ FXMVECTOR S2, _In_ FXMVECTOR P) noexcept - { - XMVECTOR Dir = XMVectorSubtract(S2, S1); - XMVECTOR Projection = XMVectorSubtract(XMVector3Dot(P, Dir), XMVector3Dot(S1, Dir)); - XMVECTOR LengthSq = XMVector3Dot(Dir, Dir); - - XMVECTOR t = XMVectorMultiply(Projection, XMVectorReciprocal(LengthSq)); - XMVECTOR Point = XMVectorMultiplyAdd(t, Dir, S1); - - // t < 0 - XMVECTOR SelectS1 = XMVectorLess(Projection, XMVectorZero()); - Point = XMVectorSelect(Point, S1, SelectS1); - - // t > 1 - XMVECTOR SelectS2 = XMVectorGreater(Projection, LengthSq); - Point = XMVectorSelect(Point, S2, SelectS2); - - return Point; - } - - //----------------------------------------------------------------------------- - // Test if the point (P) on the plane of the triangle is inside the triangle - // (V0, V1, V2). - //----------------------------------------------------------------------------- - inline XMVECTOR XM_CALLCONV PointOnPlaneInsideTriangle(_In_ FXMVECTOR P, _In_ FXMVECTOR V0, _In_ FXMVECTOR V1, _In_ GXMVECTOR V2) noexcept - { - // Compute the triangle normal. - XMVECTOR N = XMVector3Cross(XMVectorSubtract(V2, V0), XMVectorSubtract(V1, V0)); - - // Compute the cross products of the vector from the base of each edge to - // the point with each edge vector. - XMVECTOR C0 = XMVector3Cross(XMVectorSubtract(P, V0), XMVectorSubtract(V1, V0)); - XMVECTOR C1 = XMVector3Cross(XMVectorSubtract(P, V1), XMVectorSubtract(V2, V1)); - XMVECTOR C2 = XMVector3Cross(XMVectorSubtract(P, V2), XMVectorSubtract(V0, V2)); - - // If the cross product points in the same direction as the normal the the - // point is inside the edge (it is zero if is on the edge). - XMVECTOR Zero = XMVectorZero(); - XMVECTOR Inside0 = XMVectorGreaterOrEqual(XMVector3Dot(C0, N), Zero); - XMVECTOR Inside1 = XMVectorGreaterOrEqual(XMVector3Dot(C1, N), Zero); - XMVECTOR Inside2 = XMVectorGreaterOrEqual(XMVector3Dot(C2, N), Zero); - - // If the point inside all of the edges it is inside. - return XMVectorAndInt(XMVectorAndInt(Inside0, Inside1), Inside2); - } - - //----------------------------------------------------------------------------- - inline bool SolveCubic(_In_ float e, _In_ float f, _In_ float g, _Out_ float* t, _Out_ float* u, _Out_ float* v) noexcept - { - float p, q, h, rc, d, theta, costh3, sinth3; - - p = f - e * e / 3.0f; - q = g - e * f / 3.0f + e * e * e * 2.0f / 27.0f; - h = q * q / 4.0f + p * p * p / 27.0f; - - if (h > 0) - { - *t = *u = *v = 0.f; - return false; // only one real root - } - - if ((h == 0) && (q == 0)) // all the same root - { - *t = -e / 3; - *u = -e / 3; - *v = -e / 3; - - return true; - } - - d = sqrtf(q * q / 4.0f - h); - if (d < 0) - rc = -powf(-d, 1.0f / 3.0f); - else - rc = powf(d, 1.0f / 3.0f); - - theta = XMScalarACos(-q / (2.0f * d)); - costh3 = XMScalarCos(theta / 3.0f); - sinth3 = sqrtf(3.0f) * XMScalarSin(theta / 3.0f); - *t = 2.0f * rc * costh3 - e / 3.0f; - *u = -rc * (costh3 + sinth3) - e / 3.0f; - *v = -rc * (costh3 - sinth3) - e / 3.0f; + *t = -e / 3; + *u = -e / 3; + *v = -e / 3; return true; } - //----------------------------------------------------------------------------- - inline XMVECTOR CalculateEigenVector(_In_ float m11, _In_ float m12, _In_ float m13, - _In_ float m22, _In_ float m23, _In_ float m33, _In_ float e) noexcept + d = sqrtf(q * q / 4.0f - h); + if (d < 0) + rc = -powf(-d, 1.0f / 3.0f); + else + rc = powf(d, 1.0f / 3.0f); + + theta = XMScalarACos(-q / (2.0f * d)); + costh3 = XMScalarCos(theta / 3.0f); + sinth3 = sqrtf(3.0f) * XMScalarSin(theta / 3.0f); + *t = 2.0f * rc * costh3 - e / 3.0f; + *u = -rc * (costh3 + sinth3) - e / 3.0f; + *v = -rc * (costh3 - sinth3) - e / 3.0f; + + return true; +} + +//----------------------------------------------------------------------------- +inline XMVECTOR CalculateEigenVector(_In_ float m11, _In_ float m12, + _In_ float m13, _In_ float m22, + _In_ float m23, _In_ float m33, + _In_ float e) noexcept { + float fTmp[3]; + fTmp[0] = m12 * m23 - m13 * (m22 - e); + fTmp[1] = m13 * m12 - m23 * (m11 - e); + fTmp[2] = (m11 - e) * (m22 - e) - m12 * m12; + + XMVECTOR vTmp = XMLoadFloat3(reinterpret_cast(fTmp)); + + if (XMVector3Equal(vTmp, XMVectorZero())) // planar or linear { - float fTmp[3]; - fTmp[0] = m12 * m23 - m13 * (m22 - e); - fTmp[1] = m13 * m12 - m23 * (m11 - e); - fTmp[2] = (m11 - e) * (m22 - e) - m12 * m12; + float f1, f2, f3; - XMVECTOR vTmp = XMLoadFloat3(reinterpret_cast(fTmp)); - - if (XMVector3Equal(vTmp, XMVectorZero())) // planar or linear - { - float f1, f2, f3; - - // we only have one equation - find a valid one - if ((m11 - e != 0) || (m12 != 0) || (m13 != 0)) - { - f1 = m11 - e; f2 = m12; f3 = m13; - } - else if ((m12 != 0) || (m22 - e != 0) || (m23 != 0)) - { - f1 = m12; f2 = m22 - e; f3 = m23; - } - else if ((m13 != 0) || (m23 != 0) || (m33 - e != 0)) - { - f1 = m13; f2 = m23; f3 = m33 - e; - } - else - { - // error, we'll just make something up - we have NO context - f1 = 1.0f; f2 = 0.0f; f3 = 0.0f; - } - - if (f1 == 0) - vTmp = XMVectorSetX(vTmp, 0.0f); - else - vTmp = XMVectorSetX(vTmp, 1.0f); - - if (f2 == 0) - vTmp = XMVectorSetY(vTmp, 0.0f); - else - vTmp = XMVectorSetY(vTmp, 1.0f); - - if (f3 == 0) - { - vTmp = XMVectorSetZ(vTmp, 0.0f); - // recalculate y to make equation work - if (m12 != 0) - vTmp = XMVectorSetY(vTmp, -f1 / f2); - } - else - { - vTmp = XMVectorSetZ(vTmp, (f2 - f1) / f3); - } + // we only have one equation - find a valid one + if ((m11 - e != 0) || (m12 != 0) || (m13 != 0)) { + f1 = m11 - e; + f2 = m12; + f3 = m13; + } else if ((m12 != 0) || (m22 - e != 0) || (m23 != 0)) { + f1 = m12; + f2 = m22 - e; + f3 = m23; + } else if ((m13 != 0) || (m23 != 0) || (m33 - e != 0)) { + f1 = m13; + f2 = m23; + f3 = m33 - e; + } else { + // error, we'll just make something up - we have NO context + f1 = 1.0f; + f2 = 0.0f; + f3 = 0.0f; } - if (XMVectorGetX(XMVector3LengthSq(vTmp)) > 1e-5f) - { - return XMVector3Normalize(vTmp); - } + if (f1 == 0) + vTmp = XMVectorSetX(vTmp, 0.0f); else - { - // Multiply by a value large enough to make the vector non-zero. - vTmp = XMVectorScale(vTmp, 1e5f); - return XMVector3Normalize(vTmp); + vTmp = XMVectorSetX(vTmp, 1.0f); + + if (f2 == 0) + vTmp = XMVectorSetY(vTmp, 0.0f); + else + vTmp = XMVectorSetY(vTmp, 1.0f); + + if (f3 == 0) { + vTmp = XMVectorSetZ(vTmp, 0.0f); + // recalculate y to make equation work + if (m12 != 0) vTmp = XMVectorSetY(vTmp, -f1 / f2); + } else { + vTmp = XMVectorSetZ(vTmp, (f2 - f1) / f3); } } - //----------------------------------------------------------------------------- - inline bool CalculateEigenVectors(_In_ float m11, _In_ float m12, _In_ float m13, - _In_ float m22, _In_ float m23, _In_ float m33, - _In_ float e1, _In_ float e2, _In_ float e3, - _Out_ XMVECTOR* pV1, _Out_ XMVECTOR* pV2, _Out_ XMVECTOR* pV3) noexcept + if (XMVectorGetX(XMVector3LengthSq(vTmp)) > 1e-5f) { + return XMVector3Normalize(vTmp); + } else { + // Multiply by a value large enough to make the vector non-zero. + vTmp = XMVectorScale(vTmp, 1e5f); + return XMVector3Normalize(vTmp); + } +} + +//----------------------------------------------------------------------------- +inline bool CalculateEigenVectors(_In_ float m11, _In_ float m12, + _In_ float m13, _In_ float m22, + _In_ float m23, _In_ float m33, _In_ float e1, + _In_ float e2, _In_ float e3, + _Out_ XMVECTOR* pV1, _Out_ XMVECTOR* pV2, + _Out_ XMVECTOR* pV3) noexcept { + *pV1 = DirectX::MathInternal::CalculateEigenVector(m11, m12, m13, m22, m23, + m33, e1); + *pV2 = DirectX::MathInternal::CalculateEigenVector(m11, m12, m13, m22, m23, + m33, e2); + *pV3 = DirectX::MathInternal::CalculateEigenVector(m11, m12, m13, m22, m23, + m33, e3); + + bool v1z = false; + bool v2z = false; + bool v3z = false; + + XMVECTOR Zero = XMVectorZero(); + + if (XMVector3Equal(*pV1, Zero)) v1z = true; + + if (XMVector3Equal(*pV2, Zero)) v2z = true; + + if (XMVector3Equal(*pV3, Zero)) v3z = true; + + bool e12 = (fabsf(XMVectorGetX(XMVector3Dot(*pV1, *pV2))) > + 0.1f); // check for non-orthogonal vectors + bool e13 = (fabsf(XMVectorGetX(XMVector3Dot(*pV1, *pV3))) > 0.1f); + bool e23 = (fabsf(XMVectorGetX(XMVector3Dot(*pV2, *pV3))) > 0.1f); + + if ((v1z && v2z && v3z) || (e12 && e13 && e23) || (e12 && v3z) || + (e13 && v2z) || (e23 && v1z)) // all eigenvectors are 0- any basis set { - *pV1 = DirectX::MathInternal::CalculateEigenVector(m11, m12, m13, m22, m23, m33, e1); - *pV2 = DirectX::MathInternal::CalculateEigenVector(m11, m12, m13, m22, m23, m33, e2); - *pV3 = DirectX::MathInternal::CalculateEigenVector(m11, m12, m13, m22, m23, m33, e3); - - bool v1z = false; - bool v2z = false; - bool v3z = false; - - XMVECTOR Zero = XMVectorZero(); - - if (XMVector3Equal(*pV1, Zero)) - v1z = true; - - if (XMVector3Equal(*pV2, Zero)) - v2z = true; - - if (XMVector3Equal(*pV3, Zero)) - v3z = true; - - bool e12 = (fabsf(XMVectorGetX(XMVector3Dot(*pV1, *pV2))) > 0.1f); // check for non-orthogonal vectors - bool e13 = (fabsf(XMVectorGetX(XMVector3Dot(*pV1, *pV3))) > 0.1f); - bool e23 = (fabsf(XMVectorGetX(XMVector3Dot(*pV2, *pV3))) > 0.1f); - - if ((v1z && v2z && v3z) || (e12 && e13 && e23) || - (e12 && v3z) || (e13 && v2z) || (e23 && v1z)) // all eigenvectors are 0- any basis set - { - *pV1 = g_XMIdentityR0.v; - *pV2 = g_XMIdentityR1.v; - *pV3 = g_XMIdentityR2.v; - return true; - } - - if (v1z && v2z) - { - XMVECTOR vTmp = XMVector3Cross(g_XMIdentityR1, *pV3); - if (XMVectorGetX(XMVector3LengthSq(vTmp)) < 1e-5f) - { - vTmp = XMVector3Cross(g_XMIdentityR0, *pV3); - } - *pV1 = XMVector3Normalize(vTmp); - *pV2 = XMVector3Cross(*pV3, *pV1); - return true; - } - - if (v3z && v1z) - { - XMVECTOR vTmp = XMVector3Cross(g_XMIdentityR1, *pV2); - if (XMVectorGetX(XMVector3LengthSq(vTmp)) < 1e-5f) - { - vTmp = XMVector3Cross(g_XMIdentityR0, *pV2); - } - *pV3 = XMVector3Normalize(vTmp); - *pV1 = XMVector3Cross(*pV2, *pV3); - return true; - } - - if (v2z && v3z) - { - XMVECTOR vTmp = XMVector3Cross(g_XMIdentityR1, *pV1); - if (XMVectorGetX(XMVector3LengthSq(vTmp)) < 1e-5f) - { - vTmp = XMVector3Cross(g_XMIdentityR0, *pV1); - } - *pV2 = XMVector3Normalize(vTmp); - *pV3 = XMVector3Cross(*pV1, *pV2); - return true; - } - - if ((v1z) || e12) - { - *pV1 = XMVector3Cross(*pV2, *pV3); - return true; - } - - if ((v2z) || e23) - { - *pV2 = XMVector3Cross(*pV3, *pV1); - return true; - } - - if ((v3z) || e13) - { - *pV3 = XMVector3Cross(*pV1, *pV2); - return true; - } - + *pV1 = g_XMIdentityR0.v; + *pV2 = g_XMIdentityR1.v; + *pV3 = g_XMIdentityR2.v; return true; } - //----------------------------------------------------------------------------- - inline bool CalculateEigenVectorsFromCovarianceMatrix(_In_ float Cxx, _In_ float Cyy, _In_ float Czz, - _In_ float Cxy, _In_ float Cxz, _In_ float Cyz, - _Out_ XMVECTOR* pV1, _Out_ XMVECTOR* pV2, _Out_ XMVECTOR* pV3) noexcept - { - // Calculate the eigenvalues by solving a cubic equation. - float e = -(Cxx + Cyy + Czz); - float f = Cxx * Cyy + Cyy * Czz + Czz * Cxx - Cxy * Cxy - Cxz * Cxz - Cyz * Cyz; - float g = Cxy * Cxy * Czz + Cxz * Cxz * Cyy + Cyz * Cyz * Cxx - Cxy * Cyz * Cxz * 2.0f - Cxx * Cyy * Czz; - - float ev1, ev2, ev3; - if (!DirectX::MathInternal::SolveCubic(e, f, g, &ev1, &ev2, &ev3)) - { - // set them to arbitrary orthonormal basis set - *pV1 = g_XMIdentityR0.v; - *pV2 = g_XMIdentityR1.v; - *pV3 = g_XMIdentityR2.v; - return false; + if (v1z && v2z) { + XMVECTOR vTmp = XMVector3Cross(g_XMIdentityR1, *pV3); + if (XMVectorGetX(XMVector3LengthSq(vTmp)) < 1e-5f) { + vTmp = XMVector3Cross(g_XMIdentityR0, *pV3); } - - return DirectX::MathInternal::CalculateEigenVectors(Cxx, Cxy, Cxz, Cyy, Cyz, Czz, ev1, ev2, ev3, pV1, pV2, pV3); + *pV1 = XMVector3Normalize(vTmp); + *pV2 = XMVector3Cross(*pV3, *pV1); + return true; } - //----------------------------------------------------------------------------- - inline void XM_CALLCONV FastIntersectTrianglePlane( - FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2, - GXMVECTOR Plane, - XMVECTOR& Outside, XMVECTOR& Inside) noexcept - { - // Plane0 - XMVECTOR Dist0 = XMVector4Dot(V0, Plane); - XMVECTOR Dist1 = XMVector4Dot(V1, Plane); - XMVECTOR Dist2 = XMVector4Dot(V2, Plane); - - XMVECTOR MinDist = XMVectorMin(Dist0, Dist1); - MinDist = XMVectorMin(MinDist, Dist2); - - XMVECTOR MaxDist = XMVectorMax(Dist0, Dist1); - MaxDist = XMVectorMax(MaxDist, Dist2); - - XMVECTOR Zero = XMVectorZero(); - - // Outside the plane? - Outside = XMVectorGreater(MinDist, Zero); - - // Fully inside the plane? - Inside = XMVectorLess(MaxDist, Zero); + if (v3z && v1z) { + XMVECTOR vTmp = XMVector3Cross(g_XMIdentityR1, *pV2); + if (XMVectorGetX(XMVector3LengthSq(vTmp)) < 1e-5f) { + vTmp = XMVector3Cross(g_XMIdentityR0, *pV2); + } + *pV3 = XMVector3Normalize(vTmp); + *pV1 = XMVector3Cross(*pV2, *pV3); + return true; } - //----------------------------------------------------------------------------- - inline void FastIntersectSpherePlane(_In_ FXMVECTOR Center, _In_ FXMVECTOR Radius, _In_ FXMVECTOR Plane, - _Out_ XMVECTOR& Outside, _Out_ XMVECTOR& Inside) noexcept - { - XMVECTOR Dist = XMVector4Dot(Center, Plane); - - // Outside the plane? - Outside = XMVectorGreater(Dist, Radius); - - // Fully inside the plane? - Inside = XMVectorLess(Dist, XMVectorNegate(Radius)); + if (v2z && v3z) { + XMVECTOR vTmp = XMVector3Cross(g_XMIdentityR1, *pV1); + if (XMVectorGetX(XMVector3LengthSq(vTmp)) < 1e-5f) { + vTmp = XMVector3Cross(g_XMIdentityR0, *pV1); + } + *pV2 = XMVector3Normalize(vTmp); + *pV3 = XMVector3Cross(*pV1, *pV2); + return true; } - //----------------------------------------------------------------------------- - inline void FastIntersectAxisAlignedBoxPlane(_In_ FXMVECTOR Center, _In_ FXMVECTOR Extents, _In_ FXMVECTOR Plane, - _Out_ XMVECTOR& Outside, _Out_ XMVECTOR& Inside) noexcept - { - // Compute the distance to the center of the box. - XMVECTOR Dist = XMVector4Dot(Center, Plane); - - // Project the axes of the box onto the normal of the plane. Half the - // length of the projection (sometime called the "radius") is equal to - // h(u) * abs(n dot b(u))) + h(v) * abs(n dot b(v)) + h(w) * abs(n dot b(w)) - // where h(i) are extents of the box, n is the plane normal, and b(i) are the - // axes of the box. In this case b(i) = [(1,0,0), (0,1,0), (0,0,1)]. - XMVECTOR Radius = XMVector3Dot(Extents, XMVectorAbs(Plane)); - - // Outside the plane? - Outside = XMVectorGreater(Dist, Radius); - - // Fully inside the plane? - Inside = XMVectorLess(Dist, XMVectorNegate(Radius)); + if ((v1z) || e12) { + *pV1 = XMVector3Cross(*pV2, *pV3); + return true; } - //----------------------------------------------------------------------------- - inline void XM_CALLCONV FastIntersectOrientedBoxPlane( - _In_ FXMVECTOR Center, _In_ FXMVECTOR Extents, _In_ FXMVECTOR Axis0, - _In_ GXMVECTOR Axis1, - _In_ HXMVECTOR Axis2, _In_ HXMVECTOR Plane, - _Out_ XMVECTOR& Outside, _Out_ XMVECTOR& Inside) noexcept - { - // Compute the distance to the center of the box. - XMVECTOR Dist = XMVector4Dot(Center, Plane); - - // Project the axes of the box onto the normal of the plane. Half the - // length of the projection (sometime called the "radius") is equal to - // h(u) * abs(n dot b(u))) + h(v) * abs(n dot b(v)) + h(w) * abs(n dot b(w)) - // where h(i) are extents of the box, n is the plane normal, and b(i) are the - // axes of the box. - XMVECTOR Radius = XMVector3Dot(Plane, Axis0); - Radius = XMVectorInsert<0, 0, 1, 0, 0>(Radius, XMVector3Dot(Plane, Axis1)); - Radius = XMVectorInsert<0, 0, 0, 1, 0>(Radius, XMVector3Dot(Plane, Axis2)); - Radius = XMVector3Dot(Extents, XMVectorAbs(Radius)); - - // Outside the plane? - Outside = XMVectorGreater(Dist, Radius); - - // Fully inside the plane? - Inside = XMVectorLess(Dist, XMVectorNegate(Radius)); + if ((v2z) || e23) { + *pV2 = XMVector3Cross(*pV3, *pV1); + return true; } - //----------------------------------------------------------------------------- - inline void XM_CALLCONV FastIntersectFrustumPlane( - _In_ FXMVECTOR Point0, _In_ FXMVECTOR Point1, _In_ FXMVECTOR Point2, - _In_ GXMVECTOR Point3, - _In_ HXMVECTOR Point4, _In_ HXMVECTOR Point5, - _In_ CXMVECTOR Point6, _In_ CXMVECTOR Point7, _In_ CXMVECTOR Plane, - _Out_ XMVECTOR& Outside, _Out_ XMVECTOR& Inside) noexcept - { - // Find the min/max projection of the frustum onto the plane normal. - XMVECTOR Min, Max, Dist; - - Min = Max = XMVector3Dot(Plane, Point0); - - Dist = XMVector3Dot(Plane, Point1); - Min = XMVectorMin(Min, Dist); - Max = XMVectorMax(Max, Dist); - - Dist = XMVector3Dot(Plane, Point2); - Min = XMVectorMin(Min, Dist); - Max = XMVectorMax(Max, Dist); - - Dist = XMVector3Dot(Plane, Point3); - Min = XMVectorMin(Min, Dist); - Max = XMVectorMax(Max, Dist); - - Dist = XMVector3Dot(Plane, Point4); - Min = XMVectorMin(Min, Dist); - Max = XMVectorMax(Max, Dist); - - Dist = XMVector3Dot(Plane, Point5); - Min = XMVectorMin(Min, Dist); - Max = XMVectorMax(Max, Dist); - - Dist = XMVector3Dot(Plane, Point6); - Min = XMVectorMin(Min, Dist); - Max = XMVectorMax(Max, Dist); - - Dist = XMVector3Dot(Plane, Point7); - Min = XMVectorMin(Min, Dist); - Max = XMVectorMax(Max, Dist); - - XMVECTOR PlaneDist = XMVectorNegate(XMVectorSplatW(Plane)); - - // Outside the plane? - Outside = XMVectorGreater(Min, PlaneDist); - - // Fully inside the plane? - Inside = XMVectorLess(Max, PlaneDist); + if ((v3z) || e13) { + *pV3 = XMVector3Cross(*pV1, *pV2); + return true; } -} // namespace MathInternal + return true; +} +//----------------------------------------------------------------------------- +inline bool CalculateEigenVectorsFromCovarianceMatrix( + _In_ float Cxx, _In_ float Cyy, _In_ float Czz, _In_ float Cxy, + _In_ float Cxz, _In_ float Cyz, _Out_ XMVECTOR* pV1, _Out_ XMVECTOR* pV2, + _Out_ XMVECTOR* pV3) noexcept { + // Calculate the eigenvalues by solving a cubic equation. + float e = -(Cxx + Cyy + Czz); + float f = + Cxx * Cyy + Cyy * Czz + Czz * Cxx - Cxy * Cxy - Cxz * Cxz - Cyz * Cyz; + float g = Cxy * Cxy * Czz + Cxz * Cxz * Cyy + Cyz * Cyz * Cxx - + Cxy * Cyz * Cxz * 2.0f - Cxx * Cyy * Czz; + + float ev1, ev2, ev3; + if (!DirectX::MathInternal::SolveCubic(e, f, g, &ev1, &ev2, &ev3)) { + // set them to arbitrary orthonormal basis set + *pV1 = g_XMIdentityR0.v; + *pV2 = g_XMIdentityR1.v; + *pV3 = g_XMIdentityR2.v; + return false; + } + + return DirectX::MathInternal::CalculateEigenVectors( + Cxx, Cxy, Cxz, Cyy, Cyz, Czz, ev1, ev2, ev3, pV1, pV2, pV3); +} + +//----------------------------------------------------------------------------- +inline void XM_CALLCONV FastIntersectTrianglePlane(FXMVECTOR V0, FXMVECTOR V1, + FXMVECTOR V2, + GXMVECTOR Plane, + XMVECTOR& Outside, + XMVECTOR& Inside) noexcept { + // Plane0 + XMVECTOR Dist0 = XMVector4Dot(V0, Plane); + XMVECTOR Dist1 = XMVector4Dot(V1, Plane); + XMVECTOR Dist2 = XMVector4Dot(V2, Plane); + + XMVECTOR MinDist = XMVectorMin(Dist0, Dist1); + MinDist = XMVectorMin(MinDist, Dist2); + + XMVECTOR MaxDist = XMVectorMax(Dist0, Dist1); + MaxDist = XMVectorMax(MaxDist, Dist2); + + XMVECTOR Zero = XMVectorZero(); + + // Outside the plane? + Outside = XMVectorGreater(MinDist, Zero); + + // Fully inside the plane? + Inside = XMVectorLess(MaxDist, Zero); +} + +//----------------------------------------------------------------------------- +inline void FastIntersectSpherePlane(_In_ FXMVECTOR Center, + _In_ FXMVECTOR Radius, + _In_ FXMVECTOR Plane, + _Out_ XMVECTOR& Outside, + _Out_ XMVECTOR& Inside) noexcept { + XMVECTOR Dist = XMVector4Dot(Center, Plane); + + // Outside the plane? + Outside = XMVectorGreater(Dist, Radius); + + // Fully inside the plane? + Inside = XMVectorLess(Dist, XMVectorNegate(Radius)); +} + +//----------------------------------------------------------------------------- +inline void FastIntersectAxisAlignedBoxPlane(_In_ FXMVECTOR Center, + _In_ FXMVECTOR Extents, + _In_ FXMVECTOR Plane, + _Out_ XMVECTOR& Outside, + _Out_ XMVECTOR& Inside) noexcept { + // Compute the distance to the center of the box. + XMVECTOR Dist = XMVector4Dot(Center, Plane); + + // Project the axes of the box onto the normal of the plane. Half the + // length of the projection (sometime called the "radius") is equal to + // h(u) * abs(n dot b(u))) + h(v) * abs(n dot b(v)) + h(w) * abs(n dot b(w)) + // where h(i) are extents of the box, n is the plane normal, and b(i) are + // the axes of the box. In this case b(i) = [(1,0,0), (0,1,0), (0,0,1)]. + XMVECTOR Radius = XMVector3Dot(Extents, XMVectorAbs(Plane)); + + // Outside the plane? + Outside = XMVectorGreater(Dist, Radius); + + // Fully inside the plane? + Inside = XMVectorLess(Dist, XMVectorNegate(Radius)); +} + +//----------------------------------------------------------------------------- +inline void XM_CALLCONV FastIntersectOrientedBoxPlane( + _In_ FXMVECTOR Center, _In_ FXMVECTOR Extents, _In_ FXMVECTOR Axis0, + _In_ GXMVECTOR Axis1, _In_ HXMVECTOR Axis2, _In_ HXMVECTOR Plane, + _Out_ XMVECTOR& Outside, _Out_ XMVECTOR& Inside) noexcept { + // Compute the distance to the center of the box. + XMVECTOR Dist = XMVector4Dot(Center, Plane); + + // Project the axes of the box onto the normal of the plane. Half the + // length of the projection (sometime called the "radius") is equal to + // h(u) * abs(n dot b(u))) + h(v) * abs(n dot b(v)) + h(w) * abs(n dot b(w)) + // where h(i) are extents of the box, n is the plane normal, and b(i) are + // the axes of the box. + XMVECTOR Radius = XMVector3Dot(Plane, Axis0); + Radius = XMVectorInsert<0, 0, 1, 0, 0>(Radius, XMVector3Dot(Plane, Axis1)); + Radius = XMVectorInsert<0, 0, 0, 1, 0>(Radius, XMVector3Dot(Plane, Axis2)); + Radius = XMVector3Dot(Extents, XMVectorAbs(Radius)); + + // Outside the plane? + Outside = XMVectorGreater(Dist, Radius); + + // Fully inside the plane? + Inside = XMVectorLess(Dist, XMVectorNegate(Radius)); +} + +//----------------------------------------------------------------------------- +inline void XM_CALLCONV FastIntersectFrustumPlane( + _In_ FXMVECTOR Point0, _In_ FXMVECTOR Point1, _In_ FXMVECTOR Point2, + _In_ GXMVECTOR Point3, _In_ HXMVECTOR Point4, _In_ HXMVECTOR Point5, + _In_ CXMVECTOR Point6, _In_ CXMVECTOR Point7, _In_ CXMVECTOR Plane, + _Out_ XMVECTOR& Outside, _Out_ XMVECTOR& Inside) noexcept { + // Find the min/max projection of the frustum onto the plane normal. + XMVECTOR Min, Max, Dist; + + Min = Max = XMVector3Dot(Plane, Point0); + + Dist = XMVector3Dot(Plane, Point1); + Min = XMVectorMin(Min, Dist); + Max = XMVectorMax(Max, Dist); + + Dist = XMVector3Dot(Plane, Point2); + Min = XMVectorMin(Min, Dist); + Max = XMVectorMax(Max, Dist); + + Dist = XMVector3Dot(Plane, Point3); + Min = XMVectorMin(Min, Dist); + Max = XMVectorMax(Max, Dist); + + Dist = XMVector3Dot(Plane, Point4); + Min = XMVectorMin(Min, Dist); + Max = XMVectorMax(Max, Dist); + + Dist = XMVector3Dot(Plane, Point5); + Min = XMVectorMin(Min, Dist); + Max = XMVectorMax(Max, Dist); + + Dist = XMVector3Dot(Plane, Point6); + Min = XMVectorMin(Min, Dist); + Max = XMVectorMax(Max, Dist); + + Dist = XMVector3Dot(Plane, Point7); + Min = XMVectorMin(Min, Dist); + Max = XMVectorMax(Max, Dist); + + XMVECTOR PlaneDist = XMVectorNegate(XMVectorSplatW(Plane)); + + // Outside the plane? + Outside = XMVectorGreater(Min, PlaneDist); + + // Fully inside the plane? + Inside = XMVectorLess(Max, PlaneDist); +} + +} // namespace MathInternal /**************************************************************************** * @@ -523,9 +519,8 @@ namespace MathInternal //----------------------------------------------------------------------------- // Transform a sphere by an angle preserving transform. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingSphere::Transform(BoundingSphere& Out, FXMMATRIX M) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +BoundingSphere::Transform(BoundingSphere& Out, FXMMATRIX M) const noexcept { // Load the center of the sphere. XMVECTOR vCenter = XMLoadFloat3(&Center); @@ -546,14 +541,15 @@ inline void XM_CALLCONV BoundingSphere::Transform(BoundingSphere& Out, FXMMATRIX Out.Radius = Radius * Scale; } -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingSphere::Transform(BoundingSphere& Out, float Scale, FXMVECTOR Rotation, FXMVECTOR Translation) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +BoundingSphere::Transform(BoundingSphere& Out, float Scale, FXMVECTOR Rotation, + FXMVECTOR Translation) const noexcept { // Load the center of the sphere. XMVECTOR vCenter = XMLoadFloat3(&Center); // Transform the center of the sphere. - vCenter = XMVectorAdd(XMVector3Rotate(XMVectorScale(vCenter, Scale), Rotation), Translation); + vCenter = XMVectorAdd( + XMVector3Rotate(XMVectorScale(vCenter, Scale), Rotation), Translation); // Store the center sphere. XMStoreFloat3(&Out.Center, vCenter); @@ -562,31 +558,29 @@ inline void XM_CALLCONV BoundingSphere::Transform(BoundingSphere& Out, float Sca Out.Radius = Radius * Scale; } - //----------------------------------------------------------------------------- // Point in sphere test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingSphere::Contains(FXMVECTOR Point) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingSphere::Contains(FXMVECTOR Point) const noexcept { XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vRadius = XMVectorReplicatePtr(&Radius); - XMVECTOR DistanceSquared = XMVector3LengthSq(XMVectorSubtract(Point, vCenter)); + XMVECTOR DistanceSquared = + XMVector3LengthSq(XMVectorSubtract(Point, vCenter)); XMVECTOR RadiusSquared = XMVectorMultiply(vRadius, vRadius); - return XMVector3LessOrEqual(DistanceSquared, RadiusSquared) ? CONTAINS : DISJOINT; + return XMVector3LessOrEqual(DistanceSquared, RadiusSquared) ? CONTAINS + : DISJOINT; } - //----------------------------------------------------------------------------- // Triangle in sphere test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingSphere::Contains(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ - if (!Intersects(V0, V1, V2)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingSphere::Contains(FXMVECTOR V0, FXMVECTOR V1, + FXMVECTOR V2) const noexcept { + if (!Intersects(V0, V1, V2)) return DISJOINT; XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vRadius = XMVectorReplicatePtr(&Radius); @@ -596,21 +590,22 @@ inline ContainmentType XM_CALLCONV BoundingSphere::Contains(FXMVECTOR V0, FXMVEC XMVECTOR Inside = XMVectorLessOrEqual(DistanceSquared, RadiusSquared); DistanceSquared = XMVector3LengthSq(XMVectorSubtract(V1, vCenter)); - Inside = XMVectorAndInt(Inside, XMVectorLessOrEqual(DistanceSquared, RadiusSquared)); + Inside = XMVectorAndInt( + Inside, XMVectorLessOrEqual(DistanceSquared, RadiusSquared)); DistanceSquared = XMVector3LengthSq(XMVectorSubtract(V2, vCenter)); - Inside = XMVectorAndInt(Inside, XMVectorLessOrEqual(DistanceSquared, RadiusSquared)); + Inside = XMVectorAndInt( + Inside, XMVectorLessOrEqual(DistanceSquared, RadiusSquared)); - return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; + return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Sphere in sphere test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingSphere::Contains(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingSphere::Contains( + const BoundingSphere& sh) const noexcept { XMVECTOR Center1 = XMLoadFloat3(&Center); float r1 = Radius; @@ -626,15 +621,12 @@ inline ContainmentType BoundingSphere::Contains(const BoundingSphere& sh) const return (r1 + r2 >= d) ? ((r1 - r2 >= d) ? CONTAINS : INTERSECTS) : DISJOINT; } - //----------------------------------------------------------------------------- // Axis-aligned box in sphere test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingSphere::Contains(const BoundingBox& box) const noexcept -{ - if (!box.Intersects(*this)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType BoundingSphere::Contains( + const BoundingBox& box) const noexcept { + if (!box.Intersects(*this)) return DISJOINT; XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vRadius = XMVectorReplicatePtr(&Radius); @@ -647,25 +639,22 @@ inline ContainmentType BoundingSphere::Contains(const BoundingBox& box) const no XMVECTOR offset = XMVectorSubtract(boxCenter, vCenter); - for (size_t i = 0; i < BoundingBox::CORNER_COUNT; ++i) - { + for (size_t i = 0; i < BoundingBox::CORNER_COUNT; ++i) { XMVECTOR C = XMVectorMultiplyAdd(boxExtents, g_BoxOffset[i], offset); XMVECTOR d = XMVector3LengthSq(C); InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(d, RadiusSq)); } - return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; + return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Oriented box in sphere test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingSphere::Contains(const BoundingOrientedBox& box) const noexcept -{ - if (!box.Intersects(*this)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType BoundingSphere::Contains( + const BoundingOrientedBox& box) const noexcept { + if (!box.Intersects(*this)) return DISJOINT; XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vRadius = XMVectorReplicatePtr(&Radius); @@ -679,26 +668,25 @@ inline ContainmentType BoundingSphere::Contains(const BoundingOrientedBox& box) XMVECTOR InsideAll = XMVectorTrueInt(); - for (size_t i = 0; i < BoundingOrientedBox::CORNER_COUNT; ++i) - { - XMVECTOR C = XMVectorAdd(XMVector3Rotate(XMVectorMultiply(boxExtents, g_BoxOffset[i]), boxOrientation), boxCenter); + for (size_t i = 0; i < BoundingOrientedBox::CORNER_COUNT; ++i) { + XMVECTOR C = XMVectorAdd( + XMVector3Rotate(XMVectorMultiply(boxExtents, g_BoxOffset[i]), + boxOrientation), + boxCenter); XMVECTOR d = XMVector3LengthSq(XMVectorSubtract(vCenter, C)); InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(d, RadiusSq)); } - return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; - + return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Frustum in sphere test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingSphere::Contains(const BoundingFrustum& fr) const noexcept -{ - if (!fr.Intersects(*this)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType BoundingSphere::Contains( + const BoundingFrustum& fr) const noexcept { + if (!fr.Intersects(*this)) return DISJOINT; XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vRadius = XMVectorReplicatePtr(&Radius); @@ -711,9 +699,11 @@ inline ContainmentType BoundingSphere::Contains(const BoundingFrustum& fr) const // Build the corners of the frustum. XMVECTOR vRightTop = XMVectorSet(fr.RightSlope, fr.TopSlope, 1.0f, 0.0f); - XMVECTOR vRightBottom = XMVectorSet(fr.RightSlope, fr.BottomSlope, 1.0f, 0.0f); + XMVECTOR vRightBottom = + XMVectorSet(fr.RightSlope, fr.BottomSlope, 1.0f, 0.0f); XMVECTOR vLeftTop = XMVectorSet(fr.LeftSlope, fr.TopSlope, 1.0f, 0.0f); - XMVECTOR vLeftBottom = XMVectorSet(fr.LeftSlope, fr.BottomSlope, 1.0f, 0.0f); + XMVECTOR vLeftBottom = + XMVectorSet(fr.LeftSlope, fr.BottomSlope, 1.0f, 0.0f); XMVECTOR vNear = XMVectorReplicatePtr(&fr.Near); XMVECTOR vFar = XMVectorReplicatePtr(&fr.Far); @@ -728,23 +718,22 @@ inline ContainmentType BoundingSphere::Contains(const BoundingFrustum& fr) const Corners[7] = XMVectorMultiply(vLeftBottom, vFar); XMVECTOR InsideAll = XMVectorTrueInt(); - for (size_t i = 0; i < BoundingFrustum::CORNER_COUNT; ++i) - { - XMVECTOR C = XMVectorAdd(XMVector3Rotate(Corners[i], vOrientation), vOrigin); + for (size_t i = 0; i < BoundingFrustum::CORNER_COUNT; ++i) { + XMVECTOR C = + XMVectorAdd(XMVector3Rotate(Corners[i], vOrientation), vOrigin); XMVECTOR d = XMVector3LengthSq(XMVectorSubtract(vCenter, C)); InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(d, RadiusSq)); } - return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; + return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Sphere vs. sphere test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingSphere::Intersects(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingSphere::Intersects( + const BoundingSphere& sh) const noexcept { // Load A. XMVECTOR vCenterA = XMLoadFloat3(&Center); XMVECTOR vRadiusA = XMVectorReplicatePtr(&Radius); @@ -764,45 +753,39 @@ inline bool BoundingSphere::Intersects(const BoundingSphere& sh) const noexcept return XMVector3LessOrEqual(DistanceSquared, RadiusSquared); } - //----------------------------------------------------------------------------- // Box vs. sphere test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingSphere::Intersects(const BoundingBox& box) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingSphere::Intersects( + const BoundingBox& box) const noexcept { return box.Intersects(*this); } -_Use_decl_annotations_ -inline bool BoundingSphere::Intersects(const BoundingOrientedBox& box) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingSphere::Intersects( + const BoundingOrientedBox& box) const noexcept { return box.Intersects(*this); } - //----------------------------------------------------------------------------- // Frustum vs. sphere test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingSphere::Intersects(const BoundingFrustum& fr) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingSphere::Intersects( + const BoundingFrustum& fr) const noexcept { return fr.Intersects(*this); } - //----------------------------------------------------------------------------- // Triangle vs sphere test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingSphere::Intersects( + FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept { // Load the sphere. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vRadius = XMVectorReplicatePtr(&Radius); // Compute the plane of the triangle (has to be normalized). - XMVECTOR N = XMVector3Normalize(XMVector3Cross(XMVectorSubtract(V1, V0), XMVectorSubtract(V2, V0))); + XMVECTOR N = XMVector3Normalize( + XMVector3Cross(XMVectorSubtract(V1, V0), XMVectorSubtract(V2, V0))); // Assert that the triangle is not degenerate. assert(!XMVector3Equal(N, XMVectorZero())); @@ -810,52 +793,65 @@ inline bool XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR V0, FXMVECTOR V1, F // Find the nearest feature on the triangle to the sphere. XMVECTOR Dist = XMVector3Dot(XMVectorSubtract(vCenter, V0), N); - // If the center of the sphere is farther from the plane of the triangle than - // the radius of the sphere, then there cannot be an intersection. + // If the center of the sphere is farther from the plane of the triangle + // than the radius of the sphere, then there cannot be an intersection. XMVECTOR NoIntersection = XMVectorLess(Dist, XMVectorNegate(vRadius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Dist, vRadius)); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Dist, vRadius)); // Project the center of the sphere onto the plane of the triangle. XMVECTOR Point = XMVectorNegativeMultiplySubtract(N, Dist, vCenter); // Is it inside all the edges? If so we intersect because the distance // to the plane is less than the radius. - XMVECTOR Intersection = DirectX::MathInternal::PointOnPlaneInsideTriangle(Point, V0, V1, V2); + XMVECTOR Intersection = + DirectX::MathInternal::PointOnPlaneInsideTriangle(Point, V0, V1, V2); // Find the nearest point on each edge. XMVECTOR RadiusSq = XMVectorMultiply(vRadius, vRadius); // Edge 0,1 - Point = DirectX::MathInternal::PointOnLineSegmentNearestPoint(V0, V1, vCenter); + Point = + DirectX::MathInternal::PointOnLineSegmentNearestPoint(V0, V1, vCenter); // If the distance to the center of the sphere to the point is less than // the radius of the sphere then it must intersect. - Intersection = XMVectorOrInt(Intersection, XMVectorLessOrEqual(XMVector3LengthSq(XMVectorSubtract(vCenter, Point)), RadiusSq)); + Intersection = XMVectorOrInt( + Intersection, + XMVectorLessOrEqual(XMVector3LengthSq(XMVectorSubtract(vCenter, Point)), + RadiusSq)); // Edge 1,2 - Point = DirectX::MathInternal::PointOnLineSegmentNearestPoint(V1, V2, vCenter); + Point = + DirectX::MathInternal::PointOnLineSegmentNearestPoint(V1, V2, vCenter); // If the distance to the center of the sphere to the point is less than // the radius of the sphere then it must intersect. - Intersection = XMVectorOrInt(Intersection, XMVectorLessOrEqual(XMVector3LengthSq(XMVectorSubtract(vCenter, Point)), RadiusSq)); + Intersection = XMVectorOrInt( + Intersection, + XMVectorLessOrEqual(XMVector3LengthSq(XMVectorSubtract(vCenter, Point)), + RadiusSq)); // Edge 2,0 - Point = DirectX::MathInternal::PointOnLineSegmentNearestPoint(V2, V0, vCenter); + Point = + DirectX::MathInternal::PointOnLineSegmentNearestPoint(V2, V0, vCenter); // If the distance to the center of the sphere to the point is less than // the radius of the sphere then it must intersect. - Intersection = XMVectorOrInt(Intersection, XMVectorLessOrEqual(XMVector3LengthSq(XMVectorSubtract(vCenter, Point)), RadiusSq)); + Intersection = XMVectorOrInt( + Intersection, + XMVectorLessOrEqual(XMVector3LengthSq(XMVectorSubtract(vCenter, Point)), + RadiusSq)); - return XMVector4EqualInt(XMVectorAndCInt(Intersection, NoIntersection), XMVectorTrueInt()); + return XMVector4EqualInt(XMVectorAndCInt(Intersection, NoIntersection), + XMVectorTrueInt()); } - //----------------------------------------------------------------------------- // Sphere-plane intersection //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline PlaneIntersectionType XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR Plane) const noexcept -{ +_Use_decl_annotations_ inline PlaneIntersectionType XM_CALLCONV +BoundingSphere::Intersects(FXMVECTOR Plane) const noexcept { assert(DirectX::MathInternal::XMPlaneIsUnit(Plane)); // Load the sphere. @@ -866,27 +862,24 @@ inline PlaneIntersectionType XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR Pl vCenter = XMVectorInsert<0, 0, 0, 0, 1>(vCenter, XMVectorSplatOne()); XMVECTOR Outside, Inside; - DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane, Outside, Inside); + DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane, + Outside, Inside); // If the sphere is outside any plane it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return FRONT; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return FRONT; // If the sphere is inside all planes it is inside. - if (XMVector4EqualInt(Inside, XMVectorTrueInt())) - return BACK; + if (XMVector4EqualInt(Inside, XMVectorTrueInt())) return BACK; // The sphere is not inside all planes or outside a plane it intersects. return INTERSECTING; } - //----------------------------------------------------------------------------- // Compute the intersection of a ray (Origin, Direction) with a sphere. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR Origin, FXMVECTOR Direction, float& Dist) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingSphere::Intersects( + FXMVECTOR Origin, FXMVECTOR Direction, float& Dist) const noexcept { assert(DirectX::MathInternal::XMVector3IsUnit(Direction)); XMVECTOR vCenter = XMLoadFloat3(&Center); @@ -909,7 +902,8 @@ inline bool XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR Origin, FXMVECTOR D // If the ray origin is outside the sphere and the center of the sphere is // behind the ray origin there is no intersection. - NoIntersection = XMVectorAndInt(XMVectorLess(s, XMVectorZero()), XMVectorGreater(l2, r2)); + NoIntersection = XMVectorAndInt(XMVectorLess(s, XMVectorZero()), + XMVectorGreater(l2, r2)); // If the squared distance from the center of the sphere to the projection // is greater than the radius squared the ray will miss the sphere. @@ -923,8 +917,7 @@ inline bool XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR Origin, FXMVECTOR D XMVECTOR OriginInside = XMVectorLessOrEqual(l2, r2); XMVECTOR t = XMVectorSelect(t1, t2, OriginInside); - if (XMVector4NotEqualInt(NoIntersection, XMVectorTrueInt())) - { + if (XMVector4NotEqualInt(NoIntersection, XMVectorTrueInt())) { // Store the x-component to *pDist. XMStoreFloat(&Dist, t); return true; @@ -934,16 +927,13 @@ inline bool XM_CALLCONV BoundingSphere::Intersects(FXMVECTOR Origin, FXMVECTOR D return false; } - //----------------------------------------------------------------------------- // Test a sphere vs 6 planes (typically forming a frustum). //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingSphere::ContainedBy( - FXMVECTOR Plane0, FXMVECTOR Plane1, FXMVECTOR Plane2, - GXMVECTOR Plane3, - HXMVECTOR Plane4, HXMVECTOR Plane5) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingSphere::ContainedBy(FXMVECTOR Plane0, FXMVECTOR Plane1, + FXMVECTOR Plane2, GXMVECTOR Plane3, + HXMVECTOR Plane4, HXMVECTOR Plane5) const noexcept { // Load the sphere. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vRadius = XMVectorReplicatePtr(&Radius); @@ -954,50 +944,53 @@ inline ContainmentType XM_CALLCONV BoundingSphere::ContainedBy( XMVECTOR Outside, Inside; // Test against each plane. - DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane0, Outside, Inside); + DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane0, + Outside, Inside); XMVECTOR AnyOutside = Outside; XMVECTOR AllInside = Inside; - DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane1, Outside, Inside); + DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane1, + Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane2, Outside, Inside); + DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane2, + Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane3, Outside, Inside); + DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane3, + Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane4, Outside, Inside); + DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane4, + Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane5, Outside, Inside); + DirectX::MathInternal::FastIntersectSpherePlane(vCenter, vRadius, Plane5, + Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); // If the sphere is outside any plane it is outside. - if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) - return DISJOINT; + if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) return DISJOINT; // If the sphere is inside all planes it is inside. - if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) - return CONTAINS; + if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) return CONTAINS; // The sphere is not inside all planes or outside a plane, it may intersect. return INTERSECTS; } - //----------------------------------------------------------------------------- // Creates a bounding sphere that contains two other bounding spheres //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingSphere::CreateMerged(BoundingSphere& Out, const BoundingSphere& S1, const BoundingSphere& S2) noexcept -{ +_Use_decl_annotations_ inline void BoundingSphere::CreateMerged( + BoundingSphere& Out, const BoundingSphere& S1, + const BoundingSphere& S2) noexcept { XMVECTOR Center1 = XMLoadFloat3(&S1.Center); float r1 = S1.Radius; @@ -1010,15 +1003,11 @@ inline void BoundingSphere::CreateMerged(BoundingSphere& Out, const BoundingSphe float d = XMVectorGetX(Dist); - if (r1 + r2 >= d) - { - if (r1 - r2 >= d) - { + if (r1 + r2 >= d) { + if (r1 - r2 >= d) { Out = S1; return; - } - else if (r2 - r1 >= d) - { + } else if (r2 - r1 >= d) { Out = S2; return; } @@ -1030,34 +1019,32 @@ inline void BoundingSphere::CreateMerged(BoundingSphere& Out, const BoundingSphe float t2 = XMMax(r1, d + r2); float t_5 = (t2 - t1) * 0.5f; - XMVECTOR NCenter = XMVectorAdd(Center1, XMVectorMultiply(N, XMVectorReplicate(t_5 + t1))); + XMVECTOR NCenter = + XMVectorAdd(Center1, XMVectorMultiply(N, XMVectorReplicate(t_5 + t1))); XMStoreFloat3(&Out.Center, NCenter); Out.Radius = t_5; } - //----------------------------------------------------------------------------- // Create sphere enscribing bounding box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingSphere::CreateFromBoundingBox(BoundingSphere& Out, const BoundingBox& box) noexcept -{ +_Use_decl_annotations_ inline void BoundingSphere::CreateFromBoundingBox( + BoundingSphere& Out, const BoundingBox& box) noexcept { Out.Center = box.Center; XMVECTOR vExtents = XMLoadFloat3(&box.Extents); Out.Radius = XMVectorGetX(XMVector3Length(vExtents)); } -_Use_decl_annotations_ -inline void BoundingSphere::CreateFromBoundingBox(BoundingSphere& Out, const BoundingOrientedBox& box) noexcept -{ - // Bounding box orientation is irrelevant because a sphere is rotationally invariant +_Use_decl_annotations_ inline void BoundingSphere::CreateFromBoundingBox( + BoundingSphere& Out, const BoundingOrientedBox& box) noexcept { + // Bounding box orientation is irrelevant because a sphere is rotationally + // invariant Out.Center = box.Center; XMVECTOR vExtents = XMLoadFloat3(&box.Extents); Out.Radius = XMVectorGetX(XMVector3Length(vExtents)); } - //----------------------------------------------------------------------------- // Find the approximate smallest enclosing bounding sphere for a set of // points. Exact computation of the smallest enclosing bounding sphere is @@ -1065,9 +1052,9 @@ inline void BoundingSphere::CreateFromBoundingBox(BoundingSphere& Out, const Bou // The algorithm is based on Jack Ritter, "An Efficient Bounding Sphere", // Graphics Gems. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingSphere::CreateFromPoints(BoundingSphere& Out, size_t Count, const XMFLOAT3* pPoints, size_t Stride) noexcept -{ +_Use_decl_annotations_ inline void BoundingSphere::CreateFromPoints( + BoundingSphere& Out, size_t Count, const XMFLOAT3* pPoints, + size_t Stride) noexcept { assert(Count > 0); assert(pPoints); @@ -1076,31 +1063,25 @@ inline void BoundingSphere::CreateFromPoints(BoundingSphere& Out, size_t Count, MinX = MaxX = MinY = MaxY = MinZ = MaxZ = XMLoadFloat3(pPoints); - for (size_t i = 1; i < Count; ++i) - { - XMVECTOR Point = XMLoadFloat3(reinterpret_cast(reinterpret_cast(pPoints) + i * Stride)); + for (size_t i = 1; i < Count; ++i) { + XMVECTOR Point = XMLoadFloat3(reinterpret_cast( + reinterpret_cast(pPoints) + i * Stride)); float px = XMVectorGetX(Point); float py = XMVectorGetY(Point); float pz = XMVectorGetZ(Point); - if (px < XMVectorGetX(MinX)) - MinX = Point; + if (px < XMVectorGetX(MinX)) MinX = Point; - if (px > XMVectorGetX(MaxX)) - MaxX = Point; + if (px > XMVectorGetX(MaxX)) MaxX = Point; - if (py < XMVectorGetY(MinY)) - MinY = Point; + if (py < XMVectorGetY(MinY)) MinY = Point; - if (py > XMVectorGetY(MaxY)) - MaxY = Point; + if (py > XMVectorGetY(MaxY)) MaxY = Point; - if (pz < XMVectorGetZ(MinZ)) - MinZ = Point; + if (pz < XMVectorGetZ(MinZ)) MinZ = Point; - if (pz > XMVectorGetZ(MaxZ)) - MaxZ = Point; + if (pz > XMVectorGetZ(MaxZ)) MaxZ = Point; } // Use the min/max pair that are farthest apart to form the initial sphere. @@ -1116,31 +1097,23 @@ inline void BoundingSphere::CreateFromPoints(BoundingSphere& Out, size_t Count, XMVECTOR vCenter; XMVECTOR vRadius; - if (XMVector3Greater(DistX, DistY)) - { - if (XMVector3Greater(DistX, DistZ)) - { + if (XMVector3Greater(DistX, DistY)) { + if (XMVector3Greater(DistX, DistZ)) { // Use min/max x. vCenter = XMVectorLerp(MaxX, MinX, 0.5f); vRadius = XMVectorScale(DistX, 0.5f); - } - else - { + } else { // Use min/max z. vCenter = XMVectorLerp(MaxZ, MinZ, 0.5f); vRadius = XMVectorScale(DistZ, 0.5f); } - } - else // Y >= X + } else // Y >= X { - if (XMVector3Greater(DistY, DistZ)) - { + if (XMVector3Greater(DistY, DistZ)) { // Use min/max y. vCenter = XMVectorLerp(MaxY, MinY, 0.5f); vRadius = XMVectorScale(DistY, 0.5f); - } - else - { + } else { // Use min/max z. vCenter = XMVectorLerp(MaxZ, MinZ, 0.5f); vRadius = XMVectorScale(DistZ, 0.5f); @@ -1148,19 +1121,22 @@ inline void BoundingSphere::CreateFromPoints(BoundingSphere& Out, size_t Count, } // Add any points not inside the sphere. - for (size_t i = 0; i < Count; ++i) - { - XMVECTOR Point = XMLoadFloat3(reinterpret_cast(reinterpret_cast(pPoints) + i * Stride)); + for (size_t i = 0; i < Count; ++i) { + XMVECTOR Point = XMLoadFloat3(reinterpret_cast( + reinterpret_cast(pPoints) + i * Stride)); XMVECTOR Delta = XMVectorSubtract(Point, vCenter); XMVECTOR Dist = XMVector3Length(Delta); - if (XMVector3Greater(Dist, vRadius)) - { + if (XMVector3Greater(Dist, vRadius)) { // Adjust sphere to include the new point. vRadius = XMVectorScale(XMVectorAdd(vRadius, Dist), 0.5f); - vCenter = XMVectorAdd(vCenter, XMVectorMultiply(XMVectorSubtract(XMVectorReplicate(1.0f), XMVectorDivide(vRadius, Dist)), Delta)); + vCenter = XMVectorAdd( + vCenter, XMVectorMultiply( + XMVectorSubtract(XMVectorReplicate(1.0f), + XMVectorDivide(vRadius, Dist)), + Delta)); } } @@ -1168,19 +1144,17 @@ inline void BoundingSphere::CreateFromPoints(BoundingSphere& Out, size_t Count, XMStoreFloat(&Out.Radius, vRadius); } - //----------------------------------------------------------------------------- // Create sphere containing frustum //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingSphere::CreateFromFrustum(BoundingSphere& Out, const BoundingFrustum& fr) noexcept -{ +_Use_decl_annotations_ inline void BoundingSphere::CreateFromFrustum( + BoundingSphere& Out, const BoundingFrustum& fr) noexcept { XMFLOAT3 Corners[BoundingFrustum::CORNER_COUNT]; fr.GetCorners(Corners); - CreateFromPoints(Out, BoundingFrustum::CORNER_COUNT, Corners, sizeof(XMFLOAT3)); + CreateFromPoints(Out, BoundingFrustum::CORNER_COUNT, Corners, + sizeof(XMFLOAT3)); } - /**************************************************************************** * * BoundingBox @@ -1190,9 +1164,8 @@ inline void BoundingSphere::CreateFromFrustum(BoundingSphere& Out, const Boundin //----------------------------------------------------------------------------- // Transform an axis aligned box by an angle preserving transform. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingBox::Transform(BoundingBox& Out, FXMMATRIX M) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +BoundingBox::Transform(BoundingBox& Out, FXMMATRIX M) const noexcept { // Load center and extents. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); @@ -1204,8 +1177,7 @@ inline void XM_CALLCONV BoundingBox::Transform(BoundingBox& Out, FXMMATRIX M) co XMVECTOR Min, Max; Min = Max = Corner; - for (size_t i = 1; i < CORNER_COUNT; ++i) - { + for (size_t i = 1; i < CORNER_COUNT; ++i) { Corner = XMVectorMultiplyAdd(vExtents, g_BoxOffset[i], vCenter); Corner = XMVector3Transform(Corner, M); @@ -1215,12 +1187,13 @@ inline void XM_CALLCONV BoundingBox::Transform(BoundingBox& Out, FXMMATRIX M) co // Store center and extents. XMStoreFloat3(&Out.Center, XMVectorScale(XMVectorAdd(Min, Max), 0.5f)); - XMStoreFloat3(&Out.Extents, XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); + XMStoreFloat3(&Out.Extents, + XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); } -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingBox::Transform(BoundingBox& Out, float Scale, FXMVECTOR Rotation, FXMVECTOR Translation) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +BoundingBox::Transform(BoundingBox& Out, float Scale, FXMVECTOR Rotation, + FXMVECTOR Translation) const noexcept { assert(DirectX::MathInternal::XMQuaternionIsUnit(Rotation)); // Load center and extents. @@ -1231,15 +1204,18 @@ inline void XM_CALLCONV BoundingBox::Transform(BoundingBox& Out, float Scale, FX // Compute and transform the corners and find new min/max bounds. XMVECTOR Corner = XMVectorMultiplyAdd(vExtents, g_BoxOffset[0], vCenter); - Corner = XMVectorAdd(XMVector3Rotate(XMVectorMultiply(Corner, VectorScale), Rotation), Translation); + Corner = XMVectorAdd( + XMVector3Rotate(XMVectorMultiply(Corner, VectorScale), Rotation), + Translation); XMVECTOR Min, Max; Min = Max = Corner; - for (size_t i = 1; i < CORNER_COUNT; ++i) - { + for (size_t i = 1; i < CORNER_COUNT; ++i) { Corner = XMVectorMultiplyAdd(vExtents, g_BoxOffset[i], vCenter); - Corner = XMVectorAdd(XMVector3Rotate(XMVectorMultiply(Corner, VectorScale), Rotation), Translation); + Corner = XMVectorAdd( + XMVector3Rotate(XMVectorMultiply(Corner, VectorScale), Rotation), + Translation); Min = XMVectorMin(Min, Corner); Max = XMVectorMax(Max, Corner); @@ -1247,51 +1223,46 @@ inline void XM_CALLCONV BoundingBox::Transform(BoundingBox& Out, float Scale, FX // Store center and extents. XMStoreFloat3(&Out.Center, XMVectorScale(XMVectorAdd(Min, Max), 0.5f)); - XMStoreFloat3(&Out.Extents, XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); + XMStoreFloat3(&Out.Extents, + XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); } - //----------------------------------------------------------------------------- // Get the corner points of the box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingBox::GetCorners(XMFLOAT3* Corners) const noexcept -{ +_Use_decl_annotations_ inline void BoundingBox::GetCorners( + XMFLOAT3* Corners) const noexcept { assert(Corners != nullptr); // Load the box XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); - for (size_t i = 0; i < CORNER_COUNT; ++i) - { + for (size_t i = 0; i < CORNER_COUNT; ++i) { XMVECTOR C = XMVectorMultiplyAdd(vExtents, g_BoxOffset[i], vCenter); XMStoreFloat3(&Corners[i], C); } } - //----------------------------------------------------------------------------- // Point in axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingBox::Contains(FXMVECTOR Point) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingBox::Contains(FXMVECTOR Point) const noexcept { XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); - return XMVector3InBounds(XMVectorSubtract(Point, vCenter), vExtents) ? CONTAINS : DISJOINT; + return XMVector3InBounds(XMVectorSubtract(Point, vCenter), vExtents) + ? CONTAINS + : DISJOINT; } - //----------------------------------------------------------------------------- // Triangle in axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingBox::Contains(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ - if (!Intersects(V0, V1, V2)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingBox::Contains(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept { + if (!Intersects(V0, V1, V2)) return DISJOINT; XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); @@ -1305,16 +1276,15 @@ inline ContainmentType XM_CALLCONV BoundingBox::Contains(FXMVECTOR V0, FXMVECTOR d = XMVectorAbs(XMVectorSubtract(V2, vCenter)); Inside = XMVectorAndInt(Inside, XMVectorLessOrEqual(d, vExtents)); - return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; + return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Sphere in axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingBox::Contains(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingBox::Contains( + const BoundingSphere& sh) const noexcept { XMVECTOR SphereCenter = XMLoadFloat3(&sh.Center); XMVECTOR SphereRadius = XMVectorReplicatePtr(&sh.Radius); @@ -1327,7 +1297,8 @@ inline ContainmentType BoundingBox::Contains(const BoundingSphere& sh) const noe // Find the distance to the nearest point on the box. // for each i in (x, y, z) // if (SphereCenter(i) < BoxMin(i)) d2 += (SphereCenter(i) - BoxMin(i)) ^ 2 - // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) ^ 2 + // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) + // ^ 2 XMVECTOR d = XMVectorZero(); @@ -1348,20 +1319,24 @@ inline ContainmentType BoundingBox::Contains(const BoundingSphere& sh) const noe if (XMVector3Greater(d2, XMVectorMultiply(SphereRadius, SphereRadius))) return DISJOINT; - XMVECTOR InsideAll = XMVectorLessOrEqual(XMVectorAdd(BoxMin, SphereRadius), SphereCenter); - InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(SphereCenter, XMVectorSubtract(BoxMax, SphereRadius))); - InsideAll = XMVectorAndInt(InsideAll, XMVectorGreater(XMVectorSubtract(BoxMax, BoxMin), SphereRadius)); + XMVECTOR InsideAll = + XMVectorLessOrEqual(XMVectorAdd(BoxMin, SphereRadius), SphereCenter); + InsideAll = XMVectorAndInt( + InsideAll, XMVectorLessOrEqual(SphereCenter, + XMVectorSubtract(BoxMax, SphereRadius))); + InsideAll = XMVectorAndInt( + InsideAll, + XMVectorGreater(XMVectorSubtract(BoxMax, BoxMin), SphereRadius)); - return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; + return (XMVector3EqualInt(InsideAll, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Axis-aligned box in axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingBox::Contains(const BoundingBox& box) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingBox::Contains( + const BoundingBox& box) const noexcept { XMVECTOR CenterA = XMLoadFloat3(&Center); XMVECTOR ExtentsA = XMLoadFloat3(&Extents); @@ -1374,27 +1349,28 @@ inline ContainmentType BoundingBox::Contains(const BoundingBox& box) const noexc XMVECTOR MinB = XMVectorSubtract(CenterB, ExtentsB); XMVECTOR MaxB = XMVectorAdd(CenterB, ExtentsB); - // for each i in (x, y, z) if a_min(i) > b_max(i) or b_min(i) > a_max(i) then return false - XMVECTOR Disjoint = XMVectorOrInt(XMVectorGreater(MinA, MaxB), XMVectorGreater(MinB, MaxA)); + // for each i in (x, y, z) if a_min(i) > b_max(i) or b_min(i) > a_max(i) + // then return false + XMVECTOR Disjoint = + XMVectorOrInt(XMVectorGreater(MinA, MaxB), XMVectorGreater(MinB, MaxA)); - if (DirectX::MathInternal::XMVector3AnyTrue(Disjoint)) - return DISJOINT; + if (DirectX::MathInternal::XMVector3AnyTrue(Disjoint)) return DISJOINT; - // for each i in (x, y, z) if a_min(i) <= b_min(i) and b_max(i) <= a_max(i) then A contains B - XMVECTOR Inside = XMVectorAndInt(XMVectorLessOrEqual(MinA, MinB), XMVectorLessOrEqual(MaxB, MaxA)); + // for each i in (x, y, z) if a_min(i) <= b_min(i) and b_max(i) <= a_max(i) + // then A contains B + XMVECTOR Inside = XMVectorAndInt(XMVectorLessOrEqual(MinA, MinB), + XMVectorLessOrEqual(MaxB, MaxA)); - return DirectX::MathInternal::XMVector3AllTrue(Inside) ? CONTAINS : INTERSECTS; + return DirectX::MathInternal::XMVector3AllTrue(Inside) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Oriented box in axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingBox::Contains(const BoundingOrientedBox& box) const noexcept -{ - if (!box.Intersects(*this)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType BoundingBox::Contains( + const BoundingOrientedBox& box) const noexcept { + if (!box.Intersects(*this)) return DISJOINT; XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); @@ -1409,25 +1385,25 @@ inline ContainmentType BoundingBox::Contains(const BoundingOrientedBox& box) con XMVECTOR Inside = XMVectorTrueInt(); - for (size_t i = 0; i < BoundingOrientedBox::CORNER_COUNT; ++i) - { - XMVECTOR C = XMVectorAdd(XMVector3Rotate(XMVectorMultiply(oExtents, g_BoxOffset[i]), oOrientation), oCenter); + for (size_t i = 0; i < BoundingOrientedBox::CORNER_COUNT; ++i) { + XMVECTOR C = XMVectorAdd( + XMVector3Rotate(XMVectorMultiply(oExtents, g_BoxOffset[i]), + oOrientation), + oCenter); XMVECTOR d = XMVectorAbs(C); Inside = XMVectorAndInt(Inside, XMVectorLessOrEqual(d, vExtents)); } - return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; + return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Frustum in axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingBox::Contains(const BoundingFrustum& fr) const noexcept -{ - if (!fr.Intersects(*this)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType BoundingBox::Contains( + const BoundingFrustum& fr) const noexcept { + if (!fr.Intersects(*this)) return DISJOINT; XMFLOAT3 Corners[BoundingFrustum::CORNER_COUNT]; fr.GetCorners(Corners); @@ -1437,23 +1413,21 @@ inline ContainmentType BoundingBox::Contains(const BoundingFrustum& fr) const no XMVECTOR Inside = XMVectorTrueInt(); - for (size_t i = 0; i < BoundingFrustum::CORNER_COUNT; ++i) - { + for (size_t i = 0; i < BoundingFrustum::CORNER_COUNT; ++i) { XMVECTOR Point = XMLoadFloat3(&Corners[i]); XMVECTOR d = XMVectorAbs(XMVectorSubtract(Point, vCenter)); Inside = XMVectorAndInt(Inside, XMVectorLessOrEqual(d, vExtents)); } - return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS : INTERSECTS; + return (XMVector3EqualInt(Inside, XMVectorTrueInt())) ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Sphere vs axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingBox::Intersects(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingBox::Intersects( + const BoundingSphere& sh) const noexcept { XMVECTOR SphereCenter = XMLoadFloat3(&sh.Center); XMVECTOR SphereRadius = XMVectorReplicatePtr(&sh.Radius); @@ -1466,7 +1440,8 @@ inline bool BoundingBox::Intersects(const BoundingSphere& sh) const noexcept // Find the distance to the nearest point on the box. // for each i in (x, y, z) // if (SphereCenter(i) < BoxMin(i)) d2 += (SphereCenter(i) - BoxMin(i)) ^ 2 - // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) ^ 2 + // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) + // ^ 2 XMVECTOR d = XMVectorZero(); @@ -1484,16 +1459,15 @@ inline bool BoundingBox::Intersects(const BoundingSphere& sh) const noexcept // Use a dot-product to square them and sum them together. XMVECTOR d2 = XMVector3Dot(d, d); - return XMVector3LessOrEqual(d2, XMVectorMultiply(SphereRadius, SphereRadius)); + return XMVector3LessOrEqual(d2, + XMVectorMultiply(SphereRadius, SphereRadius)); } - //----------------------------------------------------------------------------- // Axis-aligned box vs. axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingBox::Intersects(const BoundingBox& box) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingBox::Intersects( + const BoundingBox& box) const noexcept { XMVECTOR CenterA = XMLoadFloat3(&Center); XMVECTOR ExtentsA = XMLoadFloat3(&Extents); @@ -1506,39 +1480,35 @@ inline bool BoundingBox::Intersects(const BoundingBox& box) const noexcept XMVECTOR MinB = XMVectorSubtract(CenterB, ExtentsB); XMVECTOR MaxB = XMVectorAdd(CenterB, ExtentsB); - // for each i in (x, y, z) if a_min(i) > b_max(i) or b_min(i) > a_max(i) then return false - XMVECTOR Disjoint = XMVectorOrInt(XMVectorGreater(MinA, MaxB), XMVectorGreater(MinB, MaxA)); + // for each i in (x, y, z) if a_min(i) > b_max(i) or b_min(i) > a_max(i) + // then return false + XMVECTOR Disjoint = + XMVectorOrInt(XMVectorGreater(MinA, MaxB), XMVectorGreater(MinB, MaxA)); return !DirectX::MathInternal::XMVector3AnyTrue(Disjoint); } - //----------------------------------------------------------------------------- // Oriented box vs. axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingBox::Intersects(const BoundingOrientedBox& box) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingBox::Intersects( + const BoundingOrientedBox& box) const noexcept { return box.Intersects(*this); } - //----------------------------------------------------------------------------- // Frustum vs. axis-aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingBox::Intersects(const BoundingFrustum& fr) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingBox::Intersects( + const BoundingFrustum& fr) const noexcept { return fr.Intersects(*this); } - //----------------------------------------------------------------------------- // Triangle vs. axis aligned box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingBox::Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingBox::Intersects( + FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept { XMVECTOR Zero = XMVectorZero(); // Load the box. @@ -1553,20 +1523,22 @@ inline bool XM_CALLCONV BoundingBox::Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMV XMVECTOR TriMin = XMVectorMin(XMVectorMin(V0, V1), V2); XMVECTOR TriMax = XMVectorMax(XMVectorMax(V0, V1), V2); - // for each i in (x, y, z) if a_min(i) > b_max(i) or b_min(i) > a_max(i) then disjoint - XMVECTOR Disjoint = XMVectorOrInt(XMVectorGreater(TriMin, BoxMax), XMVectorGreater(BoxMin, TriMax)); - if (DirectX::MathInternal::XMVector3AnyTrue(Disjoint)) - return false; + // for each i in (x, y, z) if a_min(i) > b_max(i) or b_min(i) > a_max(i) + // then disjoint + XMVECTOR Disjoint = XMVectorOrInt(XMVectorGreater(TriMin, BoxMax), + XMVectorGreater(BoxMin, TriMax)); + if (DirectX::MathInternal::XMVector3AnyTrue(Disjoint)) return false; // Test the plane of the triangle. - XMVECTOR Normal = XMVector3Cross(XMVectorSubtract(V1, V0), XMVectorSubtract(V2, V0)); + XMVECTOR Normal = + XMVector3Cross(XMVectorSubtract(V1, V0), XMVectorSubtract(V2, V0)); XMVECTOR Dist = XMVector3Dot(Normal, V0); // Assert that the triangle is not degenerate. assert(!XMVector3Equal(Normal, Zero)); - // for each i in (x, y, z) if n(i) >= 0 then v_min(i)=b_min(i), v_max(i)=b_max(i) - // else v_min(i)=b_max(i), v_max(i)=b_min(i) + // for each i in (x, y, z) if n(i) >= 0 then v_min(i)=b_min(i), + // v_max(i)=b_max(i) else v_min(i)=b_max(i), v_max(i)=b_min(i) XMVECTOR NormalSelect = XMVectorGreater(Normal, Zero); XMVECTOR V_Min = XMVectorSelect(BoxMax, BoxMin, NormalSelect); XMVECTOR V_Max = XMVectorSelect(BoxMin, BoxMax, NormalSelect); @@ -1599,112 +1571,137 @@ inline bool XM_CALLCONV BoundingBox::Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMV XMVECTOR Radius; // Axis == (1,0,0) x e0 = (0, -e0.z, e0.y) - Axis = XMVectorPermute(e0, XMVectorNegate(e0)); + Axis = XMVectorPermute(e0, XMVectorNegate(e0)); p0 = XMVector3Dot(TV0, Axis); // p1 = XMVector3Dot( V1, Axis ); // p1 = p0; p2 = XMVector3Dot(TV2, Axis); Min = XMVectorMin(p0, p2); Max = XMVectorMax(p0, p2); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (1,0,0) x e1 = (0, -e1.z, e1.y) - Axis = XMVectorPermute(e1, XMVectorNegate(e1)); + Axis = XMVectorPermute(e1, XMVectorNegate(e1)); p0 = XMVector3Dot(TV0, Axis); p1 = XMVector3Dot(TV1, Axis); // p2 = XMVector3Dot( V2, Axis ); // p2 = p1; Min = XMVectorMin(p0, p1); Max = XMVectorMax(p0, p1); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (1,0,0) x e2 = (0, -e2.z, e2.y) - Axis = XMVectorPermute(e2, XMVectorNegate(e2)); + Axis = XMVectorPermute(e2, XMVectorNegate(e2)); p0 = XMVector3Dot(TV0, Axis); p1 = XMVector3Dot(TV1, Axis); // p2 = XMVector3Dot( V2, Axis ); // p2 = p0; Min = XMVectorMin(p0, p1); Max = XMVectorMax(p0, p1); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (0,1,0) x e0 = (e0.z, 0, -e0.x) - Axis = XMVectorPermute(e0, XMVectorNegate(e0)); + Axis = XMVectorPermute(e0, XMVectorNegate(e0)); p0 = XMVector3Dot(TV0, Axis); // p1 = XMVector3Dot( V1, Axis ); // p1 = p0; p2 = XMVector3Dot(TV2, Axis); Min = XMVectorMin(p0, p2); Max = XMVectorMax(p0, p2); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (0,1,0) x e1 = (e1.z, 0, -e1.x) - Axis = XMVectorPermute(e1, XMVectorNegate(e1)); + Axis = XMVectorPermute(e1, XMVectorNegate(e1)); p0 = XMVector3Dot(TV0, Axis); p1 = XMVector3Dot(TV1, Axis); // p2 = XMVector3Dot( V2, Axis ); // p2 = p1; Min = XMVectorMin(p0, p1); Max = XMVectorMax(p0, p1); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (0,0,1) x e2 = (e2.z, 0, -e2.x) - Axis = XMVectorPermute(e2, XMVectorNegate(e2)); + Axis = XMVectorPermute(e2, XMVectorNegate(e2)); p0 = XMVector3Dot(TV0, Axis); p1 = XMVector3Dot(TV1, Axis); // p2 = XMVector3Dot( V2, Axis ); // p2 = p0; Min = XMVectorMin(p0, p1); Max = XMVectorMax(p0, p1); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (0,0,1) x e0 = (-e0.y, e0.x, 0) - Axis = XMVectorPermute(e0, XMVectorNegate(e0)); + Axis = XMVectorPermute(e0, XMVectorNegate(e0)); p0 = XMVector3Dot(TV0, Axis); // p1 = XMVector3Dot( V1, Axis ); // p1 = p0; p2 = XMVector3Dot(TV2, Axis); Min = XMVectorMin(p0, p2); Max = XMVectorMax(p0, p2); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (0,0,1) x e1 = (-e1.y, e1.x, 0) - Axis = XMVectorPermute(e1, XMVectorNegate(e1)); + Axis = XMVectorPermute(e1, XMVectorNegate(e1)); p0 = XMVector3Dot(TV0, Axis); p1 = XMVector3Dot(TV1, Axis); // p2 = XMVector3Dot( V2, Axis ); // p2 = p1; Min = XMVectorMin(p0, p1); Max = XMVectorMax(p0, p1); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); // Axis == (0,0,1) x e2 = (-e2.y, e2.x, 0) - Axis = XMVectorPermute(e2, XMVectorNegate(e2)); + Axis = XMVectorPermute(e2, XMVectorNegate(e2)); p0 = XMVector3Dot(TV0, Axis); p1 = XMVector3Dot(TV1, Axis); // p2 = XMVector3Dot( V2, Axis ); // p2 = p0; Min = XMVectorMin(p0, p1); Max = XMVectorMax(p0, p1); Radius = XMVector3Dot(vExtents, XMVectorAbs(Axis)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(Max, XMVectorNegate(Radius))); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(Min, Radius)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorLess(Max, XMVectorNegate(Radius))); return XMVector4NotEqualInt(NoIntersection, XMVectorTrueInt()); } - //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline PlaneIntersectionType XM_CALLCONV BoundingBox::Intersects(FXMVECTOR Plane) const noexcept -{ +_Use_decl_annotations_ inline PlaneIntersectionType XM_CALLCONV +BoundingBox::Intersects(FXMVECTOR Plane) const noexcept { assert(DirectX::MathInternal::XMPlaneIsUnit(Plane)); // Load the box. @@ -1715,28 +1712,25 @@ inline PlaneIntersectionType XM_CALLCONV BoundingBox::Intersects(FXMVECTOR Plane vCenter = XMVectorInsert<0, 0, 0, 0, 1>(vCenter, XMVectorSplatOne()); XMVECTOR Outside, Inside; - DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane(vCenter, vExtents, Plane, Outside, Inside); + DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane( + vCenter, vExtents, Plane, Outside, Inside); // If the box is outside any plane it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return FRONT; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return FRONT; // If the box is inside all planes it is inside. - if (XMVector4EqualInt(Inside, XMVectorTrueInt())) - return BACK; + if (XMVector4EqualInt(Inside, XMVectorTrueInt())) return BACK; // The box is not inside all planes or outside a plane it intersects. return INTERSECTING; } - //----------------------------------------------------------------------------- // Compute the intersection of a ray (Origin, Direction) with an axis aligned // box using the slabs method. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingBox::Intersects(FXMVECTOR Origin, FXMVECTOR Direction, float& Dist) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingBox::Intersects( + FXMVECTOR Origin, FXMVECTOR Direction, float& Dist) const noexcept { assert(DirectX::MathInternal::XMVector3IsUnit(Direction)); // Load the box. @@ -1751,13 +1745,17 @@ inline bool XM_CALLCONV BoundingBox::Intersects(FXMVECTOR Origin, FXMVECTOR Dire XMVECTOR AxisDotOrigin = TOrigin; XMVECTOR AxisDotDirection = Direction; - // if (fabs(AxisDotDirection) <= Epsilon) the ray is nearly parallel to the slab. - XMVECTOR IsParallel = XMVectorLessOrEqual(XMVectorAbs(AxisDotDirection), g_RayEpsilon); + // if (fabs(AxisDotDirection) <= Epsilon) the ray is nearly parallel to the + // slab. + XMVECTOR IsParallel = + XMVectorLessOrEqual(XMVectorAbs(AxisDotDirection), g_RayEpsilon); // Test against all three axii simultaneously. XMVECTOR InverseAxisDotDirection = XMVectorReciprocal(AxisDotDirection); - XMVECTOR t1 = XMVectorMultiply(XMVectorSubtract(AxisDotOrigin, vExtents), InverseAxisDotDirection); - XMVECTOR t2 = XMVectorMultiply(XMVectorAdd(AxisDotOrigin, vExtents), InverseAxisDotDirection); + XMVECTOR t1 = XMVectorMultiply(XMVectorSubtract(AxisDotOrigin, vExtents), + InverseAxisDotDirection); + XMVECTOR t2 = XMVectorMultiply(XMVectorAdd(AxisDotOrigin, vExtents), + InverseAxisDotDirection); // Compute the max of min(t1,t2) and the min of max(t1,t2) ensuring we don't // use the results from any directions parallel to the slab. @@ -1772,17 +1770,20 @@ inline bool XM_CALLCONV BoundingBox::Intersects(FXMVECTOR Origin, FXMVECTOR Dire t_max = XMVectorMin(t_max, XMVectorSplatZ(t_max)); // x = min(min(x,y),z) // if ( t_min > t_max ) return false; - XMVECTOR NoIntersection = XMVectorGreater(XMVectorSplatX(t_min), XMVectorSplatX(t_max)); + XMVECTOR NoIntersection = + XMVectorGreater(XMVectorSplatX(t_min), XMVectorSplatX(t_max)); // if ( t_max < 0.0f ) return false; - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(XMVectorSplatX(t_max), XMVectorZero())); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorLess(XMVectorSplatX(t_max), XMVectorZero())); - // if (IsParallel && (-Extents > AxisDotOrigin || Extents < AxisDotOrigin)) return false; + // if (IsParallel && (-Extents > AxisDotOrigin || Extents < AxisDotOrigin)) + // return false; XMVECTOR ParallelOverlap = XMVectorInBounds(AxisDotOrigin, vExtents); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorAndCInt(IsParallel, ParallelOverlap)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorAndCInt(IsParallel, ParallelOverlap)); - if (!DirectX::MathInternal::XMVector3AnyTrue(NoIntersection)) - { + if (!DirectX::MathInternal::XMVector3AnyTrue(NoIntersection)) { // Store the x-component to *pDist XMStoreFloat(&Dist, t_min); return true; @@ -1792,16 +1793,13 @@ inline bool XM_CALLCONV BoundingBox::Intersects(FXMVECTOR Origin, FXMVECTOR Dire return false; } - //----------------------------------------------------------------------------- // Test an axis alinged box vs 6 planes (typically forming a frustum). //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingBox::ContainedBy( - FXMVECTOR Plane0, FXMVECTOR Plane1, FXMVECTOR Plane2, - GXMVECTOR Plane3, - HXMVECTOR Plane4, HXMVECTOR Plane5) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingBox::ContainedBy(FXMVECTOR Plane0, FXMVECTOR Plane1, FXMVECTOR Plane2, + GXMVECTOR Plane3, HXMVECTOR Plane4, + HXMVECTOR Plane5) const noexcept { // Load the box. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); @@ -1812,50 +1810,52 @@ inline ContainmentType XM_CALLCONV BoundingBox::ContainedBy( XMVECTOR Outside, Inside; // Test against each plane. - DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane(vCenter, vExtents, Plane0, Outside, Inside); + DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane( + vCenter, vExtents, Plane0, Outside, Inside); XMVECTOR AnyOutside = Outside; XMVECTOR AllInside = Inside; - DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane(vCenter, vExtents, Plane1, Outside, Inside); + DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane( + vCenter, vExtents, Plane1, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane(vCenter, vExtents, Plane2, Outside, Inside); + DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane( + vCenter, vExtents, Plane2, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane(vCenter, vExtents, Plane3, Outside, Inside); + DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane( + vCenter, vExtents, Plane3, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane(vCenter, vExtents, Plane4, Outside, Inside); + DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane( + vCenter, vExtents, Plane4, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane(vCenter, vExtents, Plane5, Outside, Inside); + DirectX::MathInternal::FastIntersectAxisAlignedBoxPlane( + vCenter, vExtents, Plane5, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); // If the box is outside any plane it is outside. - if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) - return DISJOINT; + if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) return DISJOINT; // If the box is inside all planes it is inside. - if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) - return CONTAINS; + if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) return CONTAINS; // The box is not inside all planes or outside a plane, it may intersect. return INTERSECTS; } - //----------------------------------------------------------------------------- // Create axis-aligned box that contains two other bounding boxes //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingBox::CreateMerged(BoundingBox& Out, const BoundingBox& b1, const BoundingBox& b2) noexcept -{ +_Use_decl_annotations_ inline void BoundingBox::CreateMerged( + BoundingBox& Out, const BoundingBox& b1, const BoundingBox& b2) noexcept { XMVECTOR b1Center = XMLoadFloat3(&b1.Center); XMVECTOR b1Extents = XMLoadFloat3(&b1.Extents); @@ -1871,16 +1871,15 @@ inline void BoundingBox::CreateMerged(BoundingBox& Out, const BoundingBox& b1, c assert(XMVector3LessOrEqual(Min, Max)); XMStoreFloat3(&Out.Center, XMVectorScale(XMVectorAdd(Min, Max), 0.5f)); - XMStoreFloat3(&Out.Extents, XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); + XMStoreFloat3(&Out.Extents, + XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); } - //----------------------------------------------------------------------------- // Create axis-aligned box that contains a bounding sphere //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingBox::CreateFromSphere(BoundingBox& Out, const BoundingSphere& sh) noexcept -{ +_Use_decl_annotations_ inline void BoundingBox::CreateFromSphere( + BoundingBox& Out, const BoundingSphere& sh) noexcept { XMVECTOR spCenter = XMLoadFloat3(&sh.Center); XMVECTOR shRadius = XMVectorReplicatePtr(&sh.Radius); @@ -1890,31 +1889,30 @@ inline void BoundingBox::CreateFromSphere(BoundingBox& Out, const BoundingSphere assert(XMVector3LessOrEqual(Min, Max)); XMStoreFloat3(&Out.Center, XMVectorScale(XMVectorAdd(Min, Max), 0.5f)); - XMStoreFloat3(&Out.Extents, XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); + XMStoreFloat3(&Out.Extents, + XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); } - //----------------------------------------------------------------------------- // Create axis-aligned box from min/max points //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingBox::CreateFromPoints(BoundingBox& Out, FXMVECTOR pt1, FXMVECTOR pt2) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV BoundingBox::CreateFromPoints( + BoundingBox& Out, FXMVECTOR pt1, FXMVECTOR pt2) noexcept { XMVECTOR Min = XMVectorMin(pt1, pt2); XMVECTOR Max = XMVectorMax(pt1, pt2); // Store center and extents. XMStoreFloat3(&Out.Center, XMVectorScale(XMVectorAdd(Min, Max), 0.5f)); - XMStoreFloat3(&Out.Extents, XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); + XMStoreFloat3(&Out.Extents, + XMVectorScale(XMVectorSubtract(Max, Min), 0.5f)); } - //----------------------------------------------------------------------------- // Find the minimum axis aligned bounding box containing a set of points. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingBox::CreateFromPoints(BoundingBox& Out, size_t Count, const XMFLOAT3* pPoints, size_t Stride) noexcept -{ +_Use_decl_annotations_ inline void BoundingBox::CreateFromPoints( + BoundingBox& Out, size_t Count, const XMFLOAT3* pPoints, + size_t Stride) noexcept { assert(Count > 0); assert(pPoints); @@ -1923,9 +1921,9 @@ inline void BoundingBox::CreateFromPoints(BoundingBox& Out, size_t Count, const vMin = vMax = XMLoadFloat3(pPoints); - for (size_t i = 1; i < Count; ++i) - { - XMVECTOR Point = XMLoadFloat3(reinterpret_cast(reinterpret_cast(pPoints) + i * Stride)); + for (size_t i = 1; i < Count; ++i) { + XMVECTOR Point = XMLoadFloat3(reinterpret_cast( + reinterpret_cast(pPoints) + i * Stride)); vMin = XMVectorMin(vMin, Point); vMax = XMVectorMax(vMax, Point); @@ -1933,10 +1931,10 @@ inline void BoundingBox::CreateFromPoints(BoundingBox& Out, size_t Count, const // Store center and extents. XMStoreFloat3(&Out.Center, XMVectorScale(XMVectorAdd(vMin, vMax), 0.5f)); - XMStoreFloat3(&Out.Extents, XMVectorScale(XMVectorSubtract(vMax, vMin), 0.5f)); + XMStoreFloat3(&Out.Extents, + XMVectorScale(XMVectorSubtract(vMax, vMin), 0.5f)); } - /**************************************************************************** * * BoundingOrientedBox @@ -1946,9 +1944,8 @@ inline void BoundingBox::CreateFromPoints(BoundingBox& Out, size_t Count, const //----------------------------------------------------------------------------- // Transform an oriented box by an angle preserving transform. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingOrientedBox::Transform(BoundingOrientedBox& Out, FXMMATRIX M) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV BoundingOrientedBox::Transform( + BoundingOrientedBox& Out, FXMMATRIX M) const noexcept { // Load the box. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); @@ -1983,9 +1980,9 @@ inline void XM_CALLCONV BoundingOrientedBox::Transform(BoundingOrientedBox& Out, XMStoreFloat4(&Out.Orientation, vOrientation); } -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingOrientedBox::Transform(BoundingOrientedBox& Out, float Scale, FXMVECTOR Rotation, FXMVECTOR Translation) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV BoundingOrientedBox::Transform( + BoundingOrientedBox& Out, float Scale, FXMVECTOR Rotation, + FXMVECTOR Translation) const noexcept { assert(DirectX::MathInternal::XMQuaternionIsUnit(Rotation)); // Load the box. @@ -2000,7 +1997,9 @@ inline void XM_CALLCONV BoundingOrientedBox::Transform(BoundingOrientedBox& Out, // Transform the center. XMVECTOR VectorScale = XMVectorReplicate(Scale); - vCenter = XMVectorAdd(XMVector3Rotate(XMVectorMultiply(vCenter, VectorScale), Rotation), Translation); + vCenter = XMVectorAdd( + XMVector3Rotate(XMVectorMultiply(vCenter, VectorScale), Rotation), + Translation); // Scale the box extents. vExtents = XMVectorMultiply(vExtents, VectorScale); @@ -2011,13 +2010,11 @@ inline void XM_CALLCONV BoundingOrientedBox::Transform(BoundingOrientedBox& Out, XMStoreFloat4(&Out.Orientation, vOrientation); } - //----------------------------------------------------------------------------- // Get the corner points of the box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingOrientedBox::GetCorners(XMFLOAT3* Corners) const noexcept -{ +_Use_decl_annotations_ inline void BoundingOrientedBox::GetCorners( + XMFLOAT3* Corners) const noexcept { assert(Corners != nullptr); // Load the box @@ -2027,45 +2024,48 @@ inline void BoundingOrientedBox::GetCorners(XMFLOAT3* Corners) const noexcept assert(DirectX::MathInternal::XMQuaternionIsUnit(vOrientation)); - for (size_t i = 0; i < CORNER_COUNT; ++i) - { - XMVECTOR C = XMVectorAdd(XMVector3Rotate(XMVectorMultiply(vExtents, g_BoxOffset[i]), vOrientation), vCenter); + for (size_t i = 0; i < CORNER_COUNT; ++i) { + XMVECTOR C = XMVectorAdd( + XMVector3Rotate(XMVectorMultiply(vExtents, g_BoxOffset[i]), + vOrientation), + vCenter); XMStoreFloat3(&Corners[i], C); } } - //----------------------------------------------------------------------------- // Point in oriented box test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingOrientedBox::Contains(FXMVECTOR Point) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingOrientedBox::Contains(FXMVECTOR Point) const noexcept { XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Transform the point to be local to the box. - XMVECTOR TPoint = XMVector3InverseRotate(XMVectorSubtract(Point, vCenter), vOrientation); + XMVECTOR TPoint = + XMVector3InverseRotate(XMVectorSubtract(Point, vCenter), vOrientation); return XMVector3InBounds(TPoint, vExtents) ? CONTAINS : DISJOINT; } - //----------------------------------------------------------------------------- // Triangle in oriented bounding box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingOrientedBox::Contains(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingOrientedBox::Contains(FXMVECTOR V0, FXMVECTOR V1, + FXMVECTOR V2) const noexcept { // Load the box center & orientation. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Transform the triangle vertices into the space of the box. - XMVECTOR TV0 = XMVector3InverseRotate(XMVectorSubtract(V0, vCenter), vOrientation); - XMVECTOR TV1 = XMVector3InverseRotate(XMVectorSubtract(V1, vCenter), vOrientation); - XMVECTOR TV2 = XMVector3InverseRotate(XMVectorSubtract(V2, vCenter), vOrientation); + XMVECTOR TV0 = + XMVector3InverseRotate(XMVectorSubtract(V0, vCenter), vOrientation); + XMVECTOR TV1 = + XMVector3InverseRotate(XMVectorSubtract(V1, vCenter), vOrientation); + XMVECTOR TV2 = + XMVector3InverseRotate(XMVectorSubtract(V2, vCenter), vOrientation); BoundingBox box; box.Center = XMFLOAT3(0.0f, 0.0f, 0.0f); @@ -2075,13 +2075,11 @@ inline ContainmentType XM_CALLCONV BoundingOrientedBox::Contains(FXMVECTOR V0, F return box.Contains(TV0, TV1, TV2); } - //----------------------------------------------------------------------------- // Sphere in oriented bounding box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingOrientedBox::Contains(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingOrientedBox::Contains( + const BoundingSphere& sh) const noexcept { XMVECTOR SphereCenter = XMLoadFloat3(&sh.Center); XMVECTOR SphereRadius = XMVectorReplicatePtr(&sh.Radius); @@ -2094,17 +2092,20 @@ inline ContainmentType BoundingOrientedBox::Contains(const BoundingSphere& sh) c // Transform the center of the sphere to be local to the box. // BoxMin = -BoxExtents // BoxMax = +BoxExtents - SphereCenter = XMVector3InverseRotate(XMVectorSubtract(SphereCenter, BoxCenter), BoxOrientation); + SphereCenter = XMVector3InverseRotate( + XMVectorSubtract(SphereCenter, BoxCenter), BoxOrientation); // Find the distance to the nearest point on the box. // for each i in (x, y, z) // if (SphereCenter(i) < BoxMin(i)) d2 += (SphereCenter(i) - BoxMin(i)) ^ 2 - // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) ^ 2 + // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) + // ^ 2 XMVECTOR d = XMVectorZero(); // Compute d for each dimension. - XMVECTOR LessThanMin = XMVectorLess(SphereCenter, XMVectorNegate(BoxExtents)); + XMVECTOR LessThanMin = + XMVectorLess(SphereCenter, XMVectorNegate(BoxExtents)); XMVECTOR GreaterThanMax = XMVectorGreater(SphereCenter, BoxExtents); XMVECTOR MinDelta = XMVectorAdd(SphereCenter, BoxExtents); @@ -2118,38 +2119,36 @@ inline ContainmentType BoundingOrientedBox::Contains(const BoundingSphere& sh) c XMVECTOR d2 = XMVector3Dot(d, d); XMVECTOR SphereRadiusSq = XMVectorMultiply(SphereRadius, SphereRadius); - if (XMVector4Greater(d2, SphereRadiusSq)) - return DISJOINT; + if (XMVector4Greater(d2, SphereRadiusSq)) return DISJOINT; // See if we are completely inside the box XMVECTOR SMin = XMVectorSubtract(SphereCenter, SphereRadius); XMVECTOR SMax = XMVectorAdd(SphereCenter, SphereRadius); - return (XMVector3InBounds(SMin, BoxExtents) && XMVector3InBounds(SMax, BoxExtents)) ? CONTAINS : INTERSECTS; + return (XMVector3InBounds(SMin, BoxExtents) && + XMVector3InBounds(SMax, BoxExtents)) + ? CONTAINS + : INTERSECTS; } - //----------------------------------------------------------------------------- // Axis aligned box vs. oriented box. Constructs an oriented box and uses // the oriented box vs. oriented box test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingOrientedBox::Contains(const BoundingBox& box) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingOrientedBox::Contains( + const BoundingBox& box) const noexcept { // Make the axis aligned box oriented and do an OBB vs OBB test. - BoundingOrientedBox obox(box.Center, box.Extents, XMFLOAT4(0.f, 0.f, 0.f, 1.f)); + BoundingOrientedBox obox(box.Center, box.Extents, + XMFLOAT4(0.f, 0.f, 0.f, 1.f)); return Contains(obox); } - //----------------------------------------------------------------------------- // Oriented bounding box in oriented bounding box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingOrientedBox::Contains(const BoundingOrientedBox& box) const noexcept -{ - if (!Intersects(box)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType BoundingOrientedBox::Contains( + const BoundingOrientedBox& box) const noexcept { + if (!Intersects(box)) return DISJOINT; // Load the boxes XMVECTOR aCenter = XMLoadFloat3(&Center); @@ -2166,30 +2165,28 @@ inline ContainmentType BoundingOrientedBox::Contains(const BoundingOrientedBox& XMVECTOR offset = XMVectorSubtract(bCenter, aCenter); - for (size_t i = 0; i < CORNER_COUNT; ++i) - { + for (size_t i = 0; i < CORNER_COUNT; ++i) { // Cb = rotate( bExtents * corneroffset[i], bOrientation ) + bcenter // Ca = invrotate( Cb - aCenter, aOrientation ) - XMVECTOR C = XMVectorAdd(XMVector3Rotate(XMVectorMultiply(bExtents, g_BoxOffset[i]), bOrientation), offset); + XMVECTOR C = XMVectorAdd( + XMVector3Rotate(XMVectorMultiply(bExtents, g_BoxOffset[i]), + bOrientation), + offset); C = XMVector3InverseRotate(C, aOrientation); - if (!XMVector3InBounds(C, aExtents)) - return INTERSECTS; + if (!XMVector3InBounds(C, aExtents)) return INTERSECTS; } return CONTAINS; } - //----------------------------------------------------------------------------- // Frustum in oriented bounding box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingOrientedBox::Contains(const BoundingFrustum& fr) const noexcept -{ - if (!fr.Intersects(*this)) - return DISJOINT; +_Use_decl_annotations_ inline ContainmentType BoundingOrientedBox::Contains( + const BoundingFrustum& fr) const noexcept { + if (!fr.Intersects(*this)) return DISJOINT; XMFLOAT3 Corners[BoundingFrustum::CORNER_COUNT]; fr.GetCorners(Corners); @@ -2201,24 +2198,21 @@ inline ContainmentType BoundingOrientedBox::Contains(const BoundingFrustum& fr) assert(DirectX::MathInternal::XMQuaternionIsUnit(vOrientation)); - for (size_t i = 0; i < BoundingFrustum::CORNER_COUNT; ++i) - { - XMVECTOR C = XMVector3InverseRotate(XMVectorSubtract(XMLoadFloat3(&Corners[i]), vCenter), vOrientation); + for (size_t i = 0; i < BoundingFrustum::CORNER_COUNT; ++i) { + XMVECTOR C = XMVector3InverseRotate( + XMVectorSubtract(XMLoadFloat3(&Corners[i]), vCenter), vOrientation); - if (!XMVector3InBounds(C, vExtents)) - return INTERSECTS; + if (!XMVector3InBounds(C, vExtents)) return INTERSECTS; } return CONTAINS; } - //----------------------------------------------------------------------------- // Sphere vs. oriented box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingOrientedBox::Intersects(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingOrientedBox::Intersects( + const BoundingSphere& sh) const noexcept { XMVECTOR SphereCenter = XMLoadFloat3(&sh.Center); XMVECTOR SphereRadius = XMVectorReplicatePtr(&sh.Radius); @@ -2231,17 +2225,20 @@ inline bool BoundingOrientedBox::Intersects(const BoundingSphere& sh) const noex // Transform the center of the sphere to be local to the box. // BoxMin = -BoxExtents // BoxMax = +BoxExtents - SphereCenter = XMVector3InverseRotate(XMVectorSubtract(SphereCenter, BoxCenter), BoxOrientation); + SphereCenter = XMVector3InverseRotate( + XMVectorSubtract(SphereCenter, BoxCenter), BoxOrientation); // Find the distance to the nearest point on the box. // for each i in (x, y, z) // if (SphereCenter(i) < BoxMin(i)) d2 += (SphereCenter(i) - BoxMin(i)) ^ 2 - // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) ^ 2 + // else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) + // ^ 2 XMVECTOR d = XMVectorZero(); // Compute d for each dimension. - XMVECTOR LessThanMin = XMVectorLess(SphereCenter, XMVectorNegate(BoxExtents)); + XMVECTOR LessThanMin = + XMVectorLess(SphereCenter, XMVectorNegate(BoxExtents)); XMVECTOR GreaterThanMax = XMVectorGreater(SphereCenter, BoxExtents); XMVECTOR MinDelta = XMVectorAdd(SphereCenter, BoxExtents); @@ -2254,31 +2251,32 @@ inline bool BoundingOrientedBox::Intersects(const BoundingSphere& sh) const noex // Use a dot-product to square them and sum them together. XMVECTOR d2 = XMVector3Dot(d, d); - return XMVector4LessOrEqual(d2, XMVectorMultiply(SphereRadius, SphereRadius)) ? true : false; + return XMVector4LessOrEqual(d2, + XMVectorMultiply(SphereRadius, SphereRadius)) + ? true + : false; } - //----------------------------------------------------------------------------- // Axis aligned box vs. oriented box. Constructs an oriented box and uses // the oriented box vs. oriented box test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingOrientedBox::Intersects(const BoundingBox& box) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingOrientedBox::Intersects( + const BoundingBox& box) const noexcept { // Make the axis aligned box oriented and do an OBB vs OBB test. - BoundingOrientedBox obox(box.Center, box.Extents, XMFLOAT4(0.f, 0.f, 0.f, 1.f)); + BoundingOrientedBox obox(box.Center, box.Extents, + XMFLOAT4(0.f, 0.f, 0.f, 1.f)); return Intersects(obox); } - //----------------------------------------------------------------------------- // Fast oriented box / oriented box intersection test using the separating axis // theorem. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) const noexcept -{ - // Build the 3x3 rotation matrix that defines the orientation of B relative to A. +_Use_decl_annotations_ inline bool BoundingOrientedBox::Intersects( + const BoundingOrientedBox& box) const noexcept { + // Build the 3x3 rotation matrix that defines the orientation of B relative + // to A. XMVECTOR A_quat = XMLoadFloat4(&Orientation); XMVECTOR B_quat = XMLoadFloat4(&box.Orientation); @@ -2291,14 +2289,16 @@ inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) cons // Compute the translation of B relative to A. XMVECTOR A_cent = XMLoadFloat3(&Center); XMVECTOR B_cent = XMLoadFloat3(&box.Center); - XMVECTOR t = XMVector3InverseRotate(XMVectorSubtract(B_cent, A_cent), A_quat); + XMVECTOR t = + XMVector3InverseRotate(XMVectorSubtract(B_cent, A_cent), A_quat); // // h(A) = extents of A. // h(B) = extents of B. // // a(u) = axes of A = (1,0,0), (0,1,0), (0,0,1) - // b(u) = axes of B relative to A = (r00,r10,r20), (r01,r11,r21), (r02,r12,r22) + // b(u) = axes of B relative to A = (r00,r10,r20), (r01,r11,r21), + // (r02,r12,r22) // // For each possible separating axis l: // d(A) = sum (for i = u,v,w) h(A)(i) * abs( a(i) dot l ) @@ -2342,7 +2342,8 @@ inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) cons d = XMVectorSplatX(t); d_A = XMVectorSplatX(h_A); d_B = XMVector3Dot(h_B, AR0X); - XMVECTOR NoIntersection = XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B)); + XMVECTOR NoIntersection = + XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B)); // l = a(v) = (0, 1, 0) // t dot l = t.y @@ -2351,8 +2352,8 @@ inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) cons d = XMVectorSplatY(t); d_A = XMVectorSplatY(h_A); d_B = XMVector3Dot(h_B, AR1X); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(w) = (0, 0, 1) // t dot l = t.z @@ -2361,8 +2362,8 @@ inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) cons d = XMVectorSplatZ(t); d_A = XMVectorSplatZ(h_A); d_B = XMVector3Dot(h_B, AR2X); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = b(u) = (r00, r10, r20) // d(A) = h(A) dot abs(r00, r10, r20) @@ -2370,8 +2371,8 @@ inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) cons d = XMVector3Dot(t, RX0); d_A = XMVector3Dot(h_A, ARX0); d_B = XMVectorSplatX(h_B); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = b(v) = (r01, r11, r21) // d(A) = h(A) dot abs(r01, r11, r21) @@ -2379,8 +2380,8 @@ inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) cons d = XMVector3Dot(t, RX1); d_A = XMVector3Dot(h_A, ARX1); d_B = XMVectorSplatY(h_B); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = b(w) = (r02, r12, r22) // d(A) = h(A) dot abs(r02, r12, r22) @@ -2388,119 +2389,191 @@ inline bool BoundingOrientedBox::Intersects(const BoundingOrientedBox& box) cons d = XMVector3Dot(t, RX2); d_A = XMVector3Dot(h_A, ARX2); d_B = XMVectorSplatZ(h_B); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(u) x b(u) = (0, -r20, r10) // d(A) = h(A) dot abs(0, r20, r10) // d(B) = h(B) dot abs(0, r02, r01) - d = XMVector3Dot(t, XMVectorPermute(RX0, XMVectorNegate(RX0))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX0)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR0X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX0, XMVectorNegate(RX0))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX0)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR0X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(u) x b(v) = (0, -r21, r11) // d(A) = h(A) dot abs(0, r21, r11) // d(B) = h(B) dot abs(r02, 0, r00) - d = XMVector3Dot(t, XMVectorPermute(RX1, XMVectorNegate(RX1))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX1)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR0X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX1, XMVectorNegate(RX1))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX1)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR0X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(u) x b(w) = (0, -r22, r12) // d(A) = h(A) dot abs(0, r22, r12) // d(B) = h(B) dot abs(r01, r00, 0) - d = XMVector3Dot(t, XMVectorPermute(RX2, XMVectorNegate(RX2))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX2)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR0X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX2, XMVectorNegate(RX2))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX2)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR0X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(v) x b(u) = (r20, 0, -r00) // d(A) = h(A) dot abs(r20, 0, r00) // d(B) = h(B) dot abs(0, r12, r11) - d = XMVector3Dot(t, XMVectorPermute(RX0, XMVectorNegate(RX0))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX0)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR1X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX0, XMVectorNegate(RX0))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX0)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR1X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(v) x b(v) = (r21, 0, -r01) // d(A) = h(A) dot abs(r21, 0, r01) // d(B) = h(B) dot abs(r12, 0, r10) - d = XMVector3Dot(t, XMVectorPermute(RX1, XMVectorNegate(RX1))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX1)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR1X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX1, XMVectorNegate(RX1))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX1)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR1X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(v) x b(w) = (r22, 0, -r02) // d(A) = h(A) dot abs(r22, 0, r02) // d(B) = h(B) dot abs(r11, r10, 0) - d = XMVector3Dot(t, XMVectorPermute(RX2, XMVectorNegate(RX2))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX2)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR1X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX2, XMVectorNegate(RX2))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX2)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR1X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(w) x b(u) = (-r10, r00, 0) // d(A) = h(A) dot abs(r10, r00, 0) // d(B) = h(B) dot abs(0, r22, r21) - d = XMVector3Dot(t, XMVectorPermute(RX0, XMVectorNegate(RX0))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX0)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR2X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX0, XMVectorNegate(RX0))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX0)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR2X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(w) x b(v) = (-r11, r01, 0) // d(A) = h(A) dot abs(r11, r01, 0) // d(B) = h(B) dot abs(r22, 0, r20) - d = XMVector3Dot(t, XMVectorPermute(RX1, XMVectorNegate(RX1))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX1)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR2X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX1, XMVectorNegate(RX1))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX1)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR2X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // l = a(w) x b(w) = (-r12, r02, 0) // d(A) = h(A) dot abs(r12, r02, 0) // d(B) = h(B) dot abs(r21, r20, 0) - d = XMVector3Dot(t, XMVectorPermute(RX2, XMVectorNegate(RX2))); - d_A = XMVector3Dot(h_A, XMVectorSwizzle(ARX2)); - d_B = XMVector3Dot(h_B, XMVectorSwizzle(AR2X)); - NoIntersection = XMVectorOrInt(NoIntersection, - XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); + d = XMVector3Dot( + t, XMVectorPermute(RX2, XMVectorNegate(RX2))); + d_A = XMVector3Dot( + h_A, + XMVectorSwizzle( + ARX2)); + d_B = XMVector3Dot( + h_B, + XMVectorSwizzle( + AR2X)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorGreater(XMVectorAbs(d), XMVectorAdd(d_A, d_B))); // No seperating axis found, boxes must intersect. - return XMVector4NotEqualInt(NoIntersection, XMVectorTrueInt()) ? true : false; + return XMVector4NotEqualInt(NoIntersection, XMVectorTrueInt()) ? true + : false; } - //----------------------------------------------------------------------------- // Frustum vs. oriented box test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingOrientedBox::Intersects(const BoundingFrustum& fr) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingOrientedBox::Intersects( + const BoundingFrustum& fr) const noexcept { return fr.Intersects(*this); } - //----------------------------------------------------------------------------- // Triangle vs. oriented box test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingOrientedBox::Intersects( + FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept { // Load the box center & orientation. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Transform the triangle vertices into the space of the box. - XMVECTOR TV0 = XMVector3InverseRotate(XMVectorSubtract(V0, vCenter), vOrientation); - XMVECTOR TV1 = XMVector3InverseRotate(XMVectorSubtract(V1, vCenter), vOrientation); - XMVECTOR TV2 = XMVector3InverseRotate(XMVectorSubtract(V2, vCenter), vOrientation); + XMVECTOR TV0 = + XMVector3InverseRotate(XMVectorSubtract(V0, vCenter), vOrientation); + XMVECTOR TV1 = + XMVector3InverseRotate(XMVectorSubtract(V1, vCenter), vOrientation); + XMVECTOR TV2 = + XMVector3InverseRotate(XMVectorSubtract(V2, vCenter), vOrientation); BoundingBox box; box.Center = XMFLOAT3(0.0f, 0.0f, 0.0f); @@ -2510,11 +2583,9 @@ inline bool XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECTOR V0, FXMVECTOR return box.Intersects(TV0, TV1, TV2); } - //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline PlaneIntersectionType XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECTOR Plane) const noexcept -{ +_Use_decl_annotations_ inline PlaneIntersectionType XM_CALLCONV +BoundingOrientedBox::Intersects(FXMVECTOR Plane) const noexcept { assert(DirectX::MathInternal::XMPlaneIsUnit(Plane)); // Load the box. @@ -2531,32 +2602,31 @@ inline PlaneIntersectionType XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECT XMMATRIX R = XMMatrixRotationQuaternion(BoxOrientation); XMVECTOR Outside, Inside; - DirectX::MathInternal::FastIntersectOrientedBoxPlane(vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane, Outside, Inside); + DirectX::MathInternal::FastIntersectOrientedBoxPlane( + vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane, Outside, Inside); // If the box is outside any plane it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return FRONT; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return FRONT; // If the box is inside all planes it is inside. - if (XMVector4EqualInt(Inside, XMVectorTrueInt())) - return BACK; + if (XMVector4EqualInt(Inside, XMVectorTrueInt())) return BACK; // The box is not inside all planes or outside a plane it intersects. return INTERSECTING; } - //----------------------------------------------------------------------------- // Compute the intersection of a ray (Origin, Direction) with an oriented box // using the slabs method. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECTOR Origin, FXMVECTOR Direction, float& Dist) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingOrientedBox::Intersects( + FXMVECTOR Origin, FXMVECTOR Direction, float& Dist) const noexcept { assert(DirectX::MathInternal::XMVector3IsUnit(Direction)); - static const XMVECTORU32 SelectY = { { { XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0 } } }; - static const XMVECTORU32 SelectZ = { { { XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0 } } }; + static const XMVECTORU32 SelectY = { + {{XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0}}}; + static const XMVECTORU32 SelectZ = { + {{XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0}}}; // Load the box. XMVECTOR vCenter = XMLoadFloat3(&Center); @@ -2573,20 +2643,28 @@ inline bool XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECTOR Origin, FXMVEC // Compute the dot product againt each axis of the box. XMVECTOR AxisDotOrigin = XMVector3Dot(R.r[0], TOrigin); - AxisDotOrigin = XMVectorSelect(AxisDotOrigin, XMVector3Dot(R.r[1], TOrigin), SelectY); - AxisDotOrigin = XMVectorSelect(AxisDotOrigin, XMVector3Dot(R.r[2], TOrigin), SelectZ); + AxisDotOrigin = + XMVectorSelect(AxisDotOrigin, XMVector3Dot(R.r[1], TOrigin), SelectY); + AxisDotOrigin = + XMVectorSelect(AxisDotOrigin, XMVector3Dot(R.r[2], TOrigin), SelectZ); XMVECTOR AxisDotDirection = XMVector3Dot(R.r[0], Direction); - AxisDotDirection = XMVectorSelect(AxisDotDirection, XMVector3Dot(R.r[1], Direction), SelectY); - AxisDotDirection = XMVectorSelect(AxisDotDirection, XMVector3Dot(R.r[2], Direction), SelectZ); + AxisDotDirection = XMVectorSelect(AxisDotDirection, + XMVector3Dot(R.r[1], Direction), SelectY); + AxisDotDirection = XMVectorSelect(AxisDotDirection, + XMVector3Dot(R.r[2], Direction), SelectZ); - // if (fabs(AxisDotDirection) <= Epsilon) the ray is nearly parallel to the slab. - XMVECTOR IsParallel = XMVectorLessOrEqual(XMVectorAbs(AxisDotDirection), g_RayEpsilon); + // if (fabs(AxisDotDirection) <= Epsilon) the ray is nearly parallel to the + // slab. + XMVECTOR IsParallel = + XMVectorLessOrEqual(XMVectorAbs(AxisDotDirection), g_RayEpsilon); // Test against all three axes simultaneously. XMVECTOR InverseAxisDotDirection = XMVectorReciprocal(AxisDotDirection); - XMVECTOR t1 = XMVectorMultiply(XMVectorSubtract(AxisDotOrigin, vExtents), InverseAxisDotDirection); - XMVECTOR t2 = XMVectorMultiply(XMVectorAdd(AxisDotOrigin, vExtents), InverseAxisDotDirection); + XMVECTOR t1 = XMVectorMultiply(XMVectorSubtract(AxisDotOrigin, vExtents), + InverseAxisDotDirection); + XMVECTOR t2 = XMVectorMultiply(XMVectorAdd(AxisDotOrigin, vExtents), + InverseAxisDotDirection); // Compute the max of min(t1,t2) and the min of max(t1,t2) ensuring we don't // use the results from any directions parallel to the slab. @@ -2596,22 +2674,27 @@ inline bool XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECTOR Origin, FXMVEC // t_min.x = maximum( t_min.x, t_min.y, t_min.z ); // t_max.x = minimum( t_max.x, t_max.y, t_max.z ); t_min = XMVectorMax(t_min, XMVectorSplatY(t_min)); // x = max(x,y) - t_min = XMVectorMax(t_min, XMVectorSplatZ(t_min)); // x = max(std::max(x,y),z) + t_min = + XMVectorMax(t_min, XMVectorSplatZ(t_min)); // x = max(std::max(x,y),z) t_max = XMVectorMin(t_max, XMVectorSplatY(t_max)); // x = min(x,y) - t_max = XMVectorMin(t_max, XMVectorSplatZ(t_max)); // x = min(std::min(x,y),z) + t_max = + XMVectorMin(t_max, XMVectorSplatZ(t_max)); // x = min(std::min(x,y),z) // if ( t_min > t_max ) return false; - XMVECTOR NoIntersection = XMVectorGreater(XMVectorSplatX(t_min), XMVectorSplatX(t_max)); + XMVECTOR NoIntersection = + XMVectorGreater(XMVectorSplatX(t_min), XMVectorSplatX(t_max)); // if ( t_max < 0.0f ) return false; - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(XMVectorSplatX(t_max), XMVectorZero())); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorLess(XMVectorSplatX(t_max), XMVectorZero())); - // if (IsParallel && (-Extents > AxisDotOrigin || Extents < AxisDotOrigin)) return false; + // if (IsParallel && (-Extents > AxisDotOrigin || Extents < AxisDotOrigin)) + // return false; XMVECTOR ParallelOverlap = XMVectorInBounds(AxisDotOrigin, vExtents); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorAndCInt(IsParallel, ParallelOverlap)); + NoIntersection = XMVectorOrInt( + NoIntersection, XMVectorAndCInt(IsParallel, ParallelOverlap)); - if (!DirectX::MathInternal::XMVector3AnyTrue(NoIntersection)) - { + if (!DirectX::MathInternal::XMVector3AnyTrue(NoIntersection)) { // Store the x-component to *pDist XMStoreFloat(&Dist, t_min); return true; @@ -2621,16 +2704,14 @@ inline bool XM_CALLCONV BoundingOrientedBox::Intersects(FXMVECTOR Origin, FXMVEC return false; } - //----------------------------------------------------------------------------- // Test an oriented box vs 6 planes (typically forming a frustum). //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingOrientedBox::ContainedBy( - FXMVECTOR Plane0, FXMVECTOR Plane1, FXMVECTOR Plane2, - GXMVECTOR Plane3, - HXMVECTOR Plane4, HXMVECTOR Plane5) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingOrientedBox::ContainedBy(FXMVECTOR Plane0, FXMVECTOR Plane1, + FXMVECTOR Plane2, GXMVECTOR Plane3, + HXMVECTOR Plane4, + HXMVECTOR Plane5) const noexcept { // Load the box. XMVECTOR vCenter = XMLoadFloat3(&Center); XMVECTOR vExtents = XMLoadFloat3(&Extents); @@ -2647,56 +2728,57 @@ inline ContainmentType XM_CALLCONV BoundingOrientedBox::ContainedBy( XMVECTOR Outside, Inside; // Test against each plane. - DirectX::MathInternal::FastIntersectOrientedBoxPlane(vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane0, Outside, Inside); + DirectX::MathInternal::FastIntersectOrientedBoxPlane( + vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane0, Outside, Inside); XMVECTOR AnyOutside = Outside; XMVECTOR AllInside = Inside; - DirectX::MathInternal::FastIntersectOrientedBoxPlane(vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane1, Outside, Inside); + DirectX::MathInternal::FastIntersectOrientedBoxPlane( + vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane1, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectOrientedBoxPlane(vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane2, Outside, Inside); + DirectX::MathInternal::FastIntersectOrientedBoxPlane( + vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane2, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectOrientedBoxPlane(vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane3, Outside, Inside); + DirectX::MathInternal::FastIntersectOrientedBoxPlane( + vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane3, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectOrientedBoxPlane(vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane4, Outside, Inside); + DirectX::MathInternal::FastIntersectOrientedBoxPlane( + vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane4, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectOrientedBoxPlane(vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane5, Outside, Inside); + DirectX::MathInternal::FastIntersectOrientedBoxPlane( + vCenter, vExtents, R.r[0], R.r[1], R.r[2], Plane5, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); // If the box is outside any plane it is outside. - if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) - return DISJOINT; + if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) return DISJOINT; // If the box is inside all planes it is inside. - if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) - return CONTAINS; + if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) return CONTAINS; // The box is not inside all planes or outside a plane, it may intersect. return INTERSECTS; } - //----------------------------------------------------------------------------- // Create oriented bounding box from axis-aligned bounding box //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingOrientedBox::CreateFromBoundingBox(BoundingOrientedBox& Out, const BoundingBox& box) noexcept -{ +_Use_decl_annotations_ inline void BoundingOrientedBox::CreateFromBoundingBox( + BoundingOrientedBox& Out, const BoundingBox& box) noexcept { Out.Center = box.Center; Out.Extents = box.Extents; Out.Orientation = XMFLOAT4(0.f, 0.f, 0.f, 1.f); } - //----------------------------------------------------------------------------- // Find the approximate minimum oriented bounding box containing a set of // points. Exact computation of minimum oriented bounding box is possible but @@ -2708,23 +2790,24 @@ inline void BoundingOrientedBox::CreateFromBoundingBox(BoundingOrientedBox& Out, // Exact computation of the minimum oriented bounding box is possible but the // best know algorithm is O(N^3) and is significanly more complex to implement. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingOrientedBox::CreateFromPoints(BoundingOrientedBox& Out, size_t Count, const XMFLOAT3* pPoints, size_t Stride) noexcept -{ +_Use_decl_annotations_ inline void BoundingOrientedBox::CreateFromPoints( + BoundingOrientedBox& Out, size_t Count, const XMFLOAT3* pPoints, + size_t Stride) noexcept { assert(Count > 0); assert(pPoints != nullptr); XMVECTOR CenterOfMass = XMVectorZero(); // Compute the center of mass and inertia tensor of the points. - for (size_t i = 0; i < Count; ++i) - { - XMVECTOR Point = XMLoadFloat3(reinterpret_cast(reinterpret_cast(pPoints) + i * Stride)); + for (size_t i = 0; i < Count; ++i) { + XMVECTOR Point = XMLoadFloat3(reinterpret_cast( + reinterpret_cast(pPoints) + i * Stride)); CenterOfMass = XMVectorAdd(CenterOfMass, Point); } - CenterOfMass = XMVectorMultiply(CenterOfMass, XMVectorReciprocal(XMVectorReplicate(float(Count)))); + CenterOfMass = XMVectorMultiply( + CenterOfMass, XMVectorReciprocal(XMVectorReplicate(float(Count)))); // Compute the inertia tensor of the points around the center of mass. // Using the center of mass is not strictly necessary, but will hopefully @@ -2732,14 +2815,18 @@ inline void BoundingOrientedBox::CreateFromPoints(BoundingOrientedBox& Out, size XMVECTOR XX_YY_ZZ = XMVectorZero(); XMVECTOR XY_XZ_YZ = XMVectorZero(); - for (size_t i = 0; i < Count; ++i) - { - XMVECTOR Point = XMVectorSubtract(XMLoadFloat3(reinterpret_cast(reinterpret_cast(pPoints) + i * Stride)), CenterOfMass); + for (size_t i = 0; i < Count; ++i) { + XMVECTOR Point = XMVectorSubtract( + XMLoadFloat3(reinterpret_cast( + reinterpret_cast(pPoints) + i * Stride)), + CenterOfMass); XX_YY_ZZ = XMVectorAdd(XX_YY_ZZ, XMVectorMultiply(Point, Point)); - XMVECTOR XXY = XMVectorSwizzle(Point); - XMVECTOR YZZ = XMVectorSwizzle(Point); + XMVECTOR XXY = XMVectorSwizzle(Point); + XMVECTOR YZZ = XMVectorSwizzle(Point); XY_XZ_YZ = XMVectorAdd(XY_XZ_YZ, XMVectorMultiply(XXY, YZZ)); } @@ -2747,10 +2834,9 @@ inline void BoundingOrientedBox::CreateFromPoints(BoundingOrientedBox& Out, size XMVECTOR v1, v2, v3; // Compute the eigenvectors of the inertia tensor. - DirectX::MathInternal::CalculateEigenVectorsFromCovarianceMatrix(XMVectorGetX(XX_YY_ZZ), XMVectorGetY(XX_YY_ZZ), - XMVectorGetZ(XX_YY_ZZ), - XMVectorGetX(XY_XZ_YZ), XMVectorGetY(XY_XZ_YZ), - XMVectorGetZ(XY_XZ_YZ), + DirectX::MathInternal::CalculateEigenVectorsFromCovarianceMatrix( + XMVectorGetX(XX_YY_ZZ), XMVectorGetY(XX_YY_ZZ), XMVectorGetZ(XX_YY_ZZ), + XMVectorGetX(XY_XZ_YZ), XMVectorGetY(XY_XZ_YZ), XMVectorGetZ(XY_XZ_YZ), &v1, &v2, &v3); // Put them in a matrix. @@ -2767,8 +2853,7 @@ inline void BoundingOrientedBox::CreateFromPoints(BoundingOrientedBox& Out, size // works on right handed matrices. XMVECTOR Det = XMMatrixDeterminant(R); - if (XMVector4Less(Det, XMVectorZero())) - { + if (XMVector4Less(Det, XMVectorZero())) { R.r[0] = XMVectorMultiply(R.r[0], g_XMNegativeOne.v); R.r[1] = XMVectorMultiply(R.r[1], g_XMNegativeOne.v); R.r[2] = XMVectorMultiply(R.r[2], g_XMNegativeOne.v); @@ -2791,9 +2876,10 @@ inline void BoundingOrientedBox::CreateFromPoints(BoundingOrientedBox& Out, size vMin = vMax = XMVector3TransformNormal(XMLoadFloat3(pPoints), InverseR); - for (size_t i = 1; i < Count; ++i) - { - XMVECTOR Point = XMVector3TransformNormal(XMLoadFloat3(reinterpret_cast(reinterpret_cast(pPoints) + i * Stride)), + for (size_t i = 1; i < Count; ++i) { + XMVECTOR Point = XMVector3TransformNormal( + XMLoadFloat3(reinterpret_cast( + reinterpret_cast(pPoints) + i * Stride)), InverseR); vMin = XMVectorMin(vMin, Point); @@ -2806,30 +2892,27 @@ inline void BoundingOrientedBox::CreateFromPoints(BoundingOrientedBox& Out, size // Store center, extents, and orientation. XMStoreFloat3(&Out.Center, vCenter); - XMStoreFloat3(&Out.Extents, XMVectorScale(XMVectorSubtract(vMax, vMin), 0.5f)); + XMStoreFloat3(&Out.Extents, + XMVectorScale(XMVectorSubtract(vMax, vMin), 0.5f)); XMStoreFloat4(&Out.Orientation, vOrientation); } - /**************************************************************************** * * BoundingFrustum * ****************************************************************************/ -_Use_decl_annotations_ -inline BoundingFrustum::BoundingFrustum(CXMMATRIX Projection, bool rhcoords) noexcept -{ +_Use_decl_annotations_ inline BoundingFrustum::BoundingFrustum( + CXMMATRIX Projection, bool rhcoords) noexcept { CreateFromMatrix(*this, Projection, rhcoords); } - //----------------------------------------------------------------------------- // Transform a frustum by an angle preserving transform. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingFrustum::Transform(BoundingFrustum& Out, FXMMATRIX M) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +BoundingFrustum::Transform(BoundingFrustum& Out, FXMMATRIX M) const noexcept { // Load the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); @@ -2870,9 +2953,9 @@ inline void XM_CALLCONV BoundingFrustum::Transform(BoundingFrustum& Out, FXMMATR Out.BottomSlope = BottomSlope; } -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingFrustum::Transform(BoundingFrustum& Out, float Scale, FXMVECTOR Rotation, FXMVECTOR Translation) const noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV BoundingFrustum::Transform( + BoundingFrustum& Out, float Scale, FXMVECTOR Rotation, + FXMVECTOR Translation) const noexcept { assert(DirectX::MathInternal::XMQuaternionIsUnit(Rotation)); // Load the frustum. @@ -2885,7 +2968,8 @@ inline void XM_CALLCONV BoundingFrustum::Transform(BoundingFrustum& Out, float S vOrientation = XMQuaternionMultiply(vOrientation, Rotation); // Transform the origin. - vOrigin = XMVectorAdd(XMVector3Rotate(XMVectorScale(vOrigin, Scale), Rotation), Translation); + vOrigin = XMVectorAdd( + XMVector3Rotate(XMVectorScale(vOrigin, Scale), Rotation), Translation); // Store the frustum. XMStoreFloat3(&Out.Origin, vOrigin); @@ -2902,13 +2986,11 @@ inline void XM_CALLCONV BoundingFrustum::Transform(BoundingFrustum& Out, float S Out.BottomSlope = BottomSlope; } - //----------------------------------------------------------------------------- // Get the corner points of the frustum //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingFrustum::GetCorners(XMFLOAT3* Corners) const noexcept -{ +_Use_decl_annotations_ inline void BoundingFrustum::GetCorners( + XMFLOAT3* Corners) const noexcept { assert(Corners != nullptr); // Load origin and orientation of the frustum. @@ -2942,20 +3024,18 @@ inline void BoundingFrustum::GetCorners(XMFLOAT3* Corners) const noexcept vCorners[6] = XMVectorMultiply(vRightBottom, vFar); vCorners[7] = XMVectorMultiply(vLeftBottom, vFar); - for (size_t i = 0; i < CORNER_COUNT; ++i) - { - XMVECTOR C = XMVectorAdd(XMVector3Rotate(vCorners[i], vOrientation), vOrigin); + for (size_t i = 0; i < CORNER_COUNT; ++i) { + XMVECTOR C = + XMVectorAdd(XMVector3Rotate(vCorners[i], vOrientation), vOrigin); XMStoreFloat3(&Corners[i], C); } } - //----------------------------------------------------------------------------- // Point in frustum test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingFrustum::Contains(FXMVECTOR Point) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingFrustum::Contains(FXMVECTOR Point) const noexcept { // Build frustum planes. XMVECTOR Planes[6]; Planes[0] = XMVectorSet(0.0f, 0.0f, -1.0f, Near); @@ -2972,7 +3052,8 @@ inline ContainmentType XM_CALLCONV BoundingFrustum::Contains(FXMVECTOR Point) co assert(DirectX::MathInternal::XMQuaternionIsUnit(vOrientation)); // Transform point into local space of frustum. - XMVECTOR TPoint = XMVector3InverseRotate(XMVectorSubtract(Point, vOrigin), vOrientation); + XMVECTOR TPoint = + XMVector3InverseRotate(XMVectorSubtract(Point, vOrigin), vOrientation); // Set w to one. TPoint = XMVectorInsert<0, 0, 0, 0, 1>(TPoint, XMVectorSplatOne()); @@ -2981,203 +3062,229 @@ inline ContainmentType XM_CALLCONV BoundingFrustum::Contains(FXMVECTOR Point) co XMVECTOR Outside = Zero; // Test point against each plane of the frustum. - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { XMVECTOR Dot = XMVector4Dot(TPoint, Planes[i]); Outside = XMVectorOrInt(Outside, XMVectorGreater(Dot, Zero)); } - return XMVector4NotEqualInt(Outside, XMVectorTrueInt()) ? CONTAINS : DISJOINT; + return XMVector4NotEqualInt(Outside, XMVectorTrueInt()) ? CONTAINS + : DISJOINT; } - //----------------------------------------------------------------------------- // Triangle vs frustum test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingFrustum::Contains(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingFrustum::Contains(FXMVECTOR V0, FXMVECTOR V1, + FXMVECTOR V2) const noexcept { // Load origin and orientation of the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Create 6 planes (do it inline to encourage use of registers) XMVECTOR NearPlane = XMVectorSet(0.0f, 0.0f, -1.0f, Near); - NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, vOrigin); + NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, + vOrigin); NearPlane = XMPlaneNormalize(NearPlane); XMVECTOR FarPlane = XMVectorSet(0.0f, 0.0f, 1.0f, -Far); - FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, vOrigin); + FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, + vOrigin); FarPlane = XMPlaneNormalize(FarPlane); XMVECTOR RightPlane = XMVectorSet(1.0f, 0.0f, -RightSlope, 0.0f); - RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, vOrientation, vOrigin); + RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, + vOrientation, vOrigin); RightPlane = XMPlaneNormalize(RightPlane); XMVECTOR LeftPlane = XMVectorSet(-1.0f, 0.0f, LeftSlope, 0.0f); - LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, vOrigin); + LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, + vOrigin); LeftPlane = XMPlaneNormalize(LeftPlane); XMVECTOR TopPlane = XMVectorSet(0.0f, 1.0f, -TopSlope, 0.0f); - TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, vOrigin); + TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, + vOrigin); TopPlane = XMPlaneNormalize(TopPlane); XMVECTOR BottomPlane = XMVectorSet(0.0f, -1.0f, BottomSlope, 0.0f); - BottomPlane = DirectX::MathInternal::XMPlaneTransform(BottomPlane, vOrientation, vOrigin); + BottomPlane = DirectX::MathInternal::XMPlaneTransform( + BottomPlane, vOrientation, vOrigin); BottomPlane = XMPlaneNormalize(BottomPlane); - return TriangleTests::ContainedBy(V0, V1, V2, NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, BottomPlane); + return TriangleTests::ContainedBy(V0, V1, V2, NearPlane, FarPlane, + RightPlane, LeftPlane, TopPlane, + BottomPlane); } - //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingFrustum::Contains(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingFrustum::Contains( + const BoundingSphere& sh) const noexcept { // Load origin and orientation of the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Create 6 planes (do it inline to encourage use of registers) XMVECTOR NearPlane = XMVectorSet(0.0f, 0.0f, -1.0f, Near); - NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, vOrigin); + NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, + vOrigin); NearPlane = XMPlaneNormalize(NearPlane); XMVECTOR FarPlane = XMVectorSet(0.0f, 0.0f, 1.0f, -Far); - FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, vOrigin); + FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, + vOrigin); FarPlane = XMPlaneNormalize(FarPlane); XMVECTOR RightPlane = XMVectorSet(1.0f, 0.0f, -RightSlope, 0.0f); - RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, vOrientation, vOrigin); + RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, + vOrientation, vOrigin); RightPlane = XMPlaneNormalize(RightPlane); XMVECTOR LeftPlane = XMVectorSet(-1.0f, 0.0f, LeftSlope, 0.0f); - LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, vOrigin); + LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, + vOrigin); LeftPlane = XMPlaneNormalize(LeftPlane); XMVECTOR TopPlane = XMVectorSet(0.0f, 1.0f, -TopSlope, 0.0f); - TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, vOrigin); + TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, + vOrigin); TopPlane = XMPlaneNormalize(TopPlane); XMVECTOR BottomPlane = XMVectorSet(0.0f, -1.0f, BottomSlope, 0.0f); - BottomPlane = DirectX::MathInternal::XMPlaneTransform(BottomPlane, vOrientation, vOrigin); + BottomPlane = DirectX::MathInternal::XMPlaneTransform( + BottomPlane, vOrientation, vOrigin); BottomPlane = XMPlaneNormalize(BottomPlane); - return sh.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, BottomPlane); + return sh.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, + BottomPlane); } - //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingFrustum::Contains(const BoundingBox& box) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingFrustum::Contains( + const BoundingBox& box) const noexcept { // Load origin and orientation of the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Create 6 planes (do it inline to encourage use of registers) XMVECTOR NearPlane = XMVectorSet(0.0f, 0.0f, -1.0f, Near); - NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, vOrigin); + NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, + vOrigin); NearPlane = XMPlaneNormalize(NearPlane); XMVECTOR FarPlane = XMVectorSet(0.0f, 0.0f, 1.0f, -Far); - FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, vOrigin); + FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, + vOrigin); FarPlane = XMPlaneNormalize(FarPlane); XMVECTOR RightPlane = XMVectorSet(1.0f, 0.0f, -RightSlope, 0.0f); - RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, vOrientation, vOrigin); + RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, + vOrientation, vOrigin); RightPlane = XMPlaneNormalize(RightPlane); XMVECTOR LeftPlane = XMVectorSet(-1.0f, 0.0f, LeftSlope, 0.0f); - LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, vOrigin); + LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, + vOrigin); LeftPlane = XMPlaneNormalize(LeftPlane); XMVECTOR TopPlane = XMVectorSet(0.0f, 1.0f, -TopSlope, 0.0f); - TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, vOrigin); + TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, + vOrigin); TopPlane = XMPlaneNormalize(TopPlane); XMVECTOR BottomPlane = XMVectorSet(0.0f, -1.0f, BottomSlope, 0.0f); - BottomPlane = DirectX::MathInternal::XMPlaneTransform(BottomPlane, vOrientation, vOrigin); + BottomPlane = DirectX::MathInternal::XMPlaneTransform( + BottomPlane, vOrientation, vOrigin); BottomPlane = XMPlaneNormalize(BottomPlane); - return box.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, BottomPlane); + return box.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, + BottomPlane); } - //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingFrustum::Contains(const BoundingOrientedBox& box) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingFrustum::Contains( + const BoundingOrientedBox& box) const noexcept { // Load origin and orientation of the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Create 6 planes (do it inline to encourage use of registers) XMVECTOR NearPlane = XMVectorSet(0.0f, 0.0f, -1.0f, Near); - NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, vOrigin); + NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, + vOrigin); NearPlane = XMPlaneNormalize(NearPlane); XMVECTOR FarPlane = XMVectorSet(0.0f, 0.0f, 1.0f, -Far); - FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, vOrigin); + FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, + vOrigin); FarPlane = XMPlaneNormalize(FarPlane); XMVECTOR RightPlane = XMVectorSet(1.0f, 0.0f, -RightSlope, 0.0f); - RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, vOrientation, vOrigin); + RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, + vOrientation, vOrigin); RightPlane = XMPlaneNormalize(RightPlane); XMVECTOR LeftPlane = XMVectorSet(-1.0f, 0.0f, LeftSlope, 0.0f); - LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, vOrigin); + LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, + vOrigin); LeftPlane = XMPlaneNormalize(LeftPlane); XMVECTOR TopPlane = XMVectorSet(0.0f, 1.0f, -TopSlope, 0.0f); - TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, vOrigin); + TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, + vOrigin); TopPlane = XMPlaneNormalize(TopPlane); XMVECTOR BottomPlane = XMVectorSet(0.0f, -1.0f, BottomSlope, 0.0f); - BottomPlane = DirectX::MathInternal::XMPlaneTransform(BottomPlane, vOrientation, vOrigin); + BottomPlane = DirectX::MathInternal::XMPlaneTransform( + BottomPlane, vOrientation, vOrigin); BottomPlane = XMPlaneNormalize(BottomPlane); - return box.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, BottomPlane); + return box.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, + BottomPlane); } - //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType BoundingFrustum::Contains(const BoundingFrustum& fr) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType BoundingFrustum::Contains( + const BoundingFrustum& fr) const noexcept { // Load origin and orientation of the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); // Create 6 planes (do it inline to encourage use of registers) XMVECTOR NearPlane = XMVectorSet(0.0f, 0.0f, -1.0f, Near); - NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, vOrigin); + NearPlane = DirectX::MathInternal::XMPlaneTransform(NearPlane, vOrientation, + vOrigin); NearPlane = XMPlaneNormalize(NearPlane); XMVECTOR FarPlane = XMVectorSet(0.0f, 0.0f, 1.0f, -Far); - FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, vOrigin); + FarPlane = DirectX::MathInternal::XMPlaneTransform(FarPlane, vOrientation, + vOrigin); FarPlane = XMPlaneNormalize(FarPlane); XMVECTOR RightPlane = XMVectorSet(1.0f, 0.0f, -RightSlope, 0.0f); - RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, vOrientation, vOrigin); + RightPlane = DirectX::MathInternal::XMPlaneTransform(RightPlane, + vOrientation, vOrigin); RightPlane = XMPlaneNormalize(RightPlane); XMVECTOR LeftPlane = XMVectorSet(-1.0f, 0.0f, LeftSlope, 0.0f); - LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, vOrigin); + LeftPlane = DirectX::MathInternal::XMPlaneTransform(LeftPlane, vOrientation, + vOrigin); LeftPlane = XMPlaneNormalize(LeftPlane); XMVECTOR TopPlane = XMVectorSet(0.0f, 1.0f, -TopSlope, 0.0f); - TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, vOrigin); + TopPlane = DirectX::MathInternal::XMPlaneTransform(TopPlane, vOrientation, + vOrigin); TopPlane = XMPlaneNormalize(TopPlane); XMVECTOR BottomPlane = XMVectorSet(0.0f, -1.0f, BottomSlope, 0.0f); - BottomPlane = DirectX::MathInternal::XMPlaneTransform(BottomPlane, vOrientation, vOrigin); + BottomPlane = DirectX::MathInternal::XMPlaneTransform( + BottomPlane, vOrientation, vOrigin); BottomPlane = XMPlaneNormalize(BottomPlane); - return fr.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, BottomPlane); + return fr.ContainedBy(NearPlane, FarPlane, RightPlane, LeftPlane, TopPlane, + BottomPlane); } - //----------------------------------------------------------------------------- // Exact sphere vs frustum test. The algorithm first checks the sphere against // the planes of the frustum, then if the plane checks were indeterminate finds @@ -3185,9 +3292,8 @@ inline ContainmentType BoundingFrustum::Contains(const BoundingFrustum& fr) cons // sphere and compares the distance to the nearest feature to the radius of the // sphere //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingFrustum::Intersects(const BoundingSphere& sh) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingFrustum::Intersects( + const BoundingSphere& sh) const noexcept { XMVECTOR Zero = XMVectorZero(); // Build the frustum planes. @@ -3216,7 +3322,8 @@ inline bool BoundingFrustum::Intersects(const BoundingSphere& sh) const noexcept XMVECTOR vRadius = XMVectorReplicatePtr(&sh.Radius); // Transform the center of the sphere into the local space of frustum. - vCenter = XMVector3InverseRotate(XMVectorSubtract(vCenter, vOrigin), vOrientation); + vCenter = XMVector3InverseRotate(XMVectorSubtract(vCenter, vOrigin), + vOrientation); // Set w of the center to one so we can dot4 with the plane. vCenter = XMVectorInsert<0, 0, 0, 0, 1>(vCenter, XMVectorSplatOne()); @@ -3228,55 +3335,50 @@ inline bool BoundingFrustum::Intersects(const BoundingSphere& sh) const noexcept XMVECTOR Dist[6]; - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { Dist[i] = XMVector4Dot(vCenter, Planes[i]); // Outside the plane? Outside = XMVectorOrInt(Outside, XMVectorGreater(Dist[i], vRadius)); // Fully inside the plane? - InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(Dist[i], XMVectorNegate(vRadius))); + InsideAll = XMVectorAndInt( + InsideAll, XMVectorLessOrEqual(Dist[i], XMVectorNegate(vRadius))); // Check if the center is inside the plane. - CenterInsideAll = XMVectorAndInt(CenterInsideAll, XMVectorLessOrEqual(Dist[i], Zero)); + CenterInsideAll = + XMVectorAndInt(CenterInsideAll, XMVectorLessOrEqual(Dist[i], Zero)); } // If the sphere is outside any of the planes it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; // If the sphere is inside all planes it is fully inside. - if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) - return true; + if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) return true; - // If the center of the sphere is inside all planes and the sphere intersects - // one or more planes then it must intersect. - if (XMVector4EqualInt(CenterInsideAll, XMVectorTrueInt())) - return true; + // If the center of the sphere is inside all planes and the sphere + // intersects one or more planes then it must intersect. + if (XMVector4EqualInt(CenterInsideAll, XMVectorTrueInt())) return true; // The sphere may be outside the frustum or intersecting the frustum. // Find the nearest feature (face, edge, or corner) on the frustum // to the sphere. // The faces adjacent to each face are: - static const size_t adjacent_faces[6][4] = - { - { 2, 3, 4, 5 }, // 0 - { 2, 3, 4, 5 }, // 1 - { 0, 1, 4, 5 }, // 2 - { 0, 1, 4, 5 }, // 3 - { 0, 1, 2, 3 }, // 4 - { 0, 1, 2, 3 } - }; // 5 + static const size_t adjacent_faces[6][4] = {{2, 3, 4, 5}, // 0 + {2, 3, 4, 5}, // 1 + {0, 1, 4, 5}, // 2 + {0, 1, 4, 5}, // 3 + {0, 1, 2, 3}, // 4 + {0, 1, 2, 3}}; // 5 XMVECTOR Intersects = XMVectorFalseInt(); // Check to see if the nearest feature is one of the planes. - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { // Find the nearest point on the plane to the center of the sphere. - XMVECTOR Point = XMVectorNegativeMultiplySubtract(Planes[i], Dist[i], vCenter); + XMVECTOR Point = + XMVectorNegativeMultiplySubtract(Planes[i], Dist[i], vCenter); // Set w of the point to one. Point = XMVectorInsert<0, 0, 0, 0, 1>(Point, XMVectorSplatOne()); @@ -3285,22 +3387,23 @@ inline bool BoundingFrustum::Intersects(const BoundingSphere& sh) const noexcept // this plane is the nearest feature. XMVECTOR InsideFace = XMVectorTrueInt(); - for (size_t j = 0; j < 4; j++) - { + for (size_t j = 0; j < 4; j++) { size_t plane_index = adjacent_faces[i][j]; - InsideFace = XMVectorAndInt(InsideFace, - XMVectorLessOrEqual(XMVector4Dot(Point, Planes[plane_index]), Zero)); + InsideFace = XMVectorAndInt( + InsideFace, + XMVectorLessOrEqual(XMVector4Dot(Point, Planes[plane_index]), + Zero)); } - // Since we have already checked distance from the plane we know that the - // sphere must intersect if this plane is the nearest feature. - Intersects = XMVectorOrInt(Intersects, + // Since we have already checked distance from the plane we know that + // the sphere must intersect if this plane is the nearest feature. + Intersects = XMVectorOrInt( + Intersects, XMVectorAndInt(XMVectorGreater(Dist[i], Zero), InsideFace)); } - if (XMVector4EqualInt(Intersects, XMVectorTrueInt())) - return true; + if (XMVector4EqualInt(Intersects, XMVectorTrueInt())) return true; // Build the corners of the frustum. XMVECTOR vRightTop = XMVectorSet(RightSlope, TopSlope, 1.0f, 0.0f); @@ -3321,24 +3424,24 @@ inline bool BoundingFrustum::Intersects(const BoundingSphere& sh) const noexcept Corners[7] = XMVectorMultiply(vLeftBottom, vFar); // The Edges are: - static const size_t edges[12][2] = - { - { 0, 1 }, { 2, 3 }, { 0, 2 }, { 1, 3 }, // Near plane - { 4, 5 }, { 6, 7 }, { 4, 6 }, { 5, 7 }, // Far plane - { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 }, - }; // Near to far + static const size_t edges[12][2] = { + {0, 1}, {2, 3}, {0, 2}, {1, 3}, // Near plane + {4, 5}, {6, 7}, {4, 6}, {5, 7}, // Far plane + {0, 4}, {1, 5}, {2, 6}, {3, 7}, + }; // Near to far XMVECTOR RadiusSq = XMVectorMultiply(vRadius, vRadius); // Check to see if the nearest feature is one of the edges (or corners). - for (size_t i = 0; i < 12; ++i) - { + for (size_t i = 0; i < 12; ++i) { size_t ei0 = edges[i][0]; size_t ei1 = edges[i][1]; // Find the nearest point on the edge to the center of the sphere. - // The corners of the frustum are included as the endpoints of the edges. - XMVECTOR Point = DirectX::MathInternal::PointOnLineSegmentNearestPoint(Corners[ei0], Corners[ei1], vCenter); + // The corners of the frustum are included as the endpoints of the + // edges. + XMVECTOR Point = DirectX::MathInternal::PointOnLineSegmentNearestPoint( + Corners[ei0], Corners[ei1], vCenter); XMVECTOR Delta = XMVectorSubtract(vCenter, Point); @@ -3346,38 +3449,37 @@ inline bool BoundingFrustum::Intersects(const BoundingSphere& sh) const noexcept // If the distance to the center of the sphere to the point is less than // the radius of the sphere then it must intersect. - Intersects = XMVectorOrInt(Intersects, XMVectorLessOrEqual(DistSq, RadiusSq)); + Intersects = + XMVectorOrInt(Intersects, XMVectorLessOrEqual(DistSq, RadiusSq)); } - if (XMVector4EqualInt(Intersects, XMVectorTrueInt())) - return true; + if (XMVector4EqualInt(Intersects, XMVectorTrueInt())) return true; // The sphere must be outside the frustum. return false; } - //----------------------------------------------------------------------------- // Exact axis aligned box vs frustum test. Constructs an oriented box and uses // the oriented box vs frustum test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingFrustum::Intersects(const BoundingBox& box) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingFrustum::Intersects( + const BoundingBox& box) const noexcept { // Make the axis aligned box oriented and do an OBB vs frustum test. - BoundingOrientedBox obox(box.Center, box.Extents, XMFLOAT4(0.f, 0.f, 0.f, 1.f)); + BoundingOrientedBox obox(box.Center, box.Extents, + XMFLOAT4(0.f, 0.f, 0.f, 1.f)); return Intersects(obox); } - //----------------------------------------------------------------------------- // Exact oriented box vs frustum test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingFrustum::Intersects(const BoundingOrientedBox& box) const noexcept -{ - static const XMVECTORU32 SelectY = { { { XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0 } } }; - static const XMVECTORU32 SelectZ = { { { XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0 } } }; +_Use_decl_annotations_ inline bool BoundingFrustum::Intersects( + const BoundingOrientedBox& box) const noexcept { + static const XMVECTORU32 SelectY = { + {{XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0}}}; + static const XMVECTORU32 SelectZ = { + {{XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0}}}; XMVECTOR Zero = XMVectorZero(); @@ -3405,8 +3507,10 @@ inline bool BoundingFrustum::Intersects(const BoundingOrientedBox& box) const no // Transform the oriented box into the space of the frustum in order to // minimize the number of transforms we have to do. - Center = XMVector3InverseRotate(XMVectorSubtract(Center, vOrigin), FrustumOrientation); - BoxOrientation = XMQuaternionMultiply(BoxOrientation, XMQuaternionConjugate(FrustumOrientation)); + Center = XMVector3InverseRotate(XMVectorSubtract(Center, vOrigin), + FrustumOrientation); + BoxOrientation = XMQuaternionMultiply( + BoxOrientation, XMQuaternionConjugate(FrustumOrientation)); // Set w of the center to one so we can dot4 with the plane. Center = XMVectorInsert<0, 0, 0, 0, 1>(Center, XMVectorSplatOne()); @@ -3419,43 +3523,43 @@ inline bool BoundingFrustum::Intersects(const BoundingOrientedBox& box) const no XMVECTOR InsideAll = XMVectorTrueInt(); XMVECTOR CenterInsideAll = XMVectorTrueInt(); - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { // Compute the distance to the center of the box. XMVECTOR Dist = XMVector4Dot(Center, Planes[i]); // Project the axes of the box onto the normal of the plane. Half the // length of the projection (sometime called the "radius") is equal to - // h(u) * abs(n dot b(u))) + h(v) * abs(n dot b(v)) + h(w) * abs(n dot b(w)) - // where h(i) are extents of the box, n is the plane normal, and b(i) are the - // axes of the box. + // h(u) * abs(n dot b(u))) + h(v) * abs(n dot b(v)) + h(w) * abs(n dot + // b(w)) where h(i) are extents of the box, n is the plane normal, and + // b(i) are the axes of the box. XMVECTOR Radius = XMVector3Dot(Planes[i], R.r[0]); - Radius = XMVectorSelect(Radius, XMVector3Dot(Planes[i], R.r[1]), SelectY); - Radius = XMVectorSelect(Radius, XMVector3Dot(Planes[i], R.r[2]), SelectZ); + Radius = + XMVectorSelect(Radius, XMVector3Dot(Planes[i], R.r[1]), SelectY); + Radius = + XMVectorSelect(Radius, XMVector3Dot(Planes[i], R.r[2]), SelectZ); Radius = XMVector3Dot(Extents, XMVectorAbs(Radius)); // Outside the plane? Outside = XMVectorOrInt(Outside, XMVectorGreater(Dist, Radius)); // Fully inside the plane? - InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(Dist, XMVectorNegate(Radius))); + InsideAll = XMVectorAndInt( + InsideAll, XMVectorLessOrEqual(Dist, XMVectorNegate(Radius))); // Check if the center is inside the plane. - CenterInsideAll = XMVectorAndInt(CenterInsideAll, XMVectorLessOrEqual(Dist, Zero)); + CenterInsideAll = + XMVectorAndInt(CenterInsideAll, XMVectorLessOrEqual(Dist, Zero)); } // If the box is outside any of the planes it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; // If the box is inside all planes it is fully inside. - if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) - return true; + if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) return true; // If the center of the box is inside all planes and the box intersects // one or more planes then it must intersect. - if (XMVector4EqualInt(CenterInsideAll, XMVectorTrueInt())) - return true; + if (XMVector4EqualInt(CenterInsideAll, XMVectorTrueInt())) return true; // Build the corners of the frustum. XMVECTOR vRightTop = XMVectorSet(RightSlope, TopSlope, 1.0f, 0.0f); @@ -3477,19 +3581,23 @@ inline bool BoundingFrustum::Intersects(const BoundingOrientedBox& box) const no // Test against box axes (3) { - // Find the min/max values of the projection of the frustum onto each axis. + // Find the min/max values of the projection of the frustum onto each + // axis. XMVECTOR FrustumMin, FrustumMax; FrustumMin = XMVector3Dot(Corners[0], R.r[0]); - FrustumMin = XMVectorSelect(FrustumMin, XMVector3Dot(Corners[0], R.r[1]), SelectY); - FrustumMin = XMVectorSelect(FrustumMin, XMVector3Dot(Corners[0], R.r[2]), SelectZ); + FrustumMin = XMVectorSelect(FrustumMin, + XMVector3Dot(Corners[0], R.r[1]), SelectY); + FrustumMin = XMVectorSelect(FrustumMin, + XMVector3Dot(Corners[0], R.r[2]), SelectZ); FrustumMax = FrustumMin; - for (size_t i = 1; i < BoundingOrientedBox::CORNER_COUNT; ++i) - { + for (size_t i = 1; i < BoundingOrientedBox::CORNER_COUNT; ++i) { XMVECTOR Temp = XMVector3Dot(Corners[i], R.r[0]); - Temp = XMVectorSelect(Temp, XMVector3Dot(Corners[i], R.r[1]), SelectY); - Temp = XMVectorSelect(Temp, XMVector3Dot(Corners[i], R.r[2]), SelectZ); + Temp = + XMVectorSelect(Temp, XMVector3Dot(Corners[i], R.r[1]), SelectY); + Temp = + XMVectorSelect(Temp, XMVector3Dot(Corners[i], R.r[2]), SelectZ); FrustumMin = XMVectorMin(FrustumMin, Temp); FrustumMax = XMVectorMax(FrustumMax, Temp); @@ -3497,16 +3605,18 @@ inline bool BoundingFrustum::Intersects(const BoundingOrientedBox& box) const no // Project the center of the box onto the axes. XMVECTOR BoxDist = XMVector3Dot(Center, R.r[0]); - BoxDist = XMVectorSelect(BoxDist, XMVector3Dot(Center, R.r[1]), SelectY); - BoxDist = XMVectorSelect(BoxDist, XMVector3Dot(Center, R.r[2]), SelectZ); + BoxDist = + XMVectorSelect(BoxDist, XMVector3Dot(Center, R.r[1]), SelectY); + BoxDist = + XMVectorSelect(BoxDist, XMVector3Dot(Center, R.r[2]), SelectZ); - // The projection of the box onto the axis is just its Center and Extents. - // if (min > box_max || max < box_min) reject; - XMVECTOR Result = XMVectorOrInt(XMVectorGreater(FrustumMin, XMVectorAdd(BoxDist, Extents)), + // The projection of the box onto the axis is just its Center and + // Extents. if (min > box_max || max < box_min) reject; + XMVECTOR Result = XMVectorOrInt( + XMVectorGreater(FrustumMin, XMVectorAdd(BoxDist, Extents)), XMVectorLess(FrustumMax, XMVectorSubtract(BoxDist, Extents))); - if (DirectX::MathInternal::XMVector3AnyTrue(Result)) - return false; + if (DirectX::MathInternal::XMVector3AnyTrue(Result)) return false; } // Test against edge/edge axes (3*6). @@ -3519,20 +3629,18 @@ inline bool BoundingFrustum::Intersects(const BoundingOrientedBox& box) const no FrustumEdgeAxis[4] = XMVectorSubtract(vRightTop, vLeftTop); FrustumEdgeAxis[5] = XMVectorSubtract(vLeftBottom, vLeftTop); - for (size_t i = 0; i < 3; ++i) - { - for (size_t j = 0; j < 6; j++) - { + for (size_t i = 0; i < 3; ++i) { + for (size_t j = 0; j < 6; j++) { // Compute the axis we are going to test. XMVECTOR Axis = XMVector3Cross(R.r[i], FrustumEdgeAxis[j]); - // Find the min/max values of the projection of the frustum onto the axis. + // Find the min/max values of the projection of the frustum onto the + // axis. XMVECTOR FrustumMin, FrustumMax; FrustumMin = FrustumMax = XMVector3Dot(Axis, Corners[0]); - for (size_t k = 1; k < CORNER_COUNT; k++) - { + for (size_t k = 1; k < CORNER_COUNT; k++) { XMVECTOR Temp = XMVector3Dot(Axis, Corners[k]); FrustumMin = XMVectorMin(FrustumMin, Temp); FrustumMax = XMVectorMax(FrustumMax, Temp); @@ -3541,32 +3649,37 @@ inline bool BoundingFrustum::Intersects(const BoundingOrientedBox& box) const no // Project the center of the box onto the axis. XMVECTOR Dist = XMVector3Dot(Center, Axis); - // Project the axes of the box onto the axis to find the "radius" of the box. + // Project the axes of the box onto the axis to find the "radius" of + // the box. XMVECTOR Radius = XMVector3Dot(Axis, R.r[0]); - Radius = XMVectorSelect(Radius, XMVector3Dot(Axis, R.r[1]), SelectY); - Radius = XMVectorSelect(Radius, XMVector3Dot(Axis, R.r[2]), SelectZ); + Radius = + XMVectorSelect(Radius, XMVector3Dot(Axis, R.r[1]), SelectY); + Radius = + XMVectorSelect(Radius, XMVector3Dot(Axis, R.r[2]), SelectZ); Radius = XMVector3Dot(Extents, XMVectorAbs(Radius)); // if (center > max + radius || center < min - radius) reject; - Outside = XMVectorOrInt(Outside, XMVectorGreater(Dist, XMVectorAdd(FrustumMax, Radius))); - Outside = XMVectorOrInt(Outside, XMVectorLess(Dist, XMVectorSubtract(FrustumMin, Radius))); + Outside = XMVectorOrInt( + Outside, + XMVectorGreater(Dist, XMVectorAdd(FrustumMax, Radius))); + Outside = XMVectorOrInt( + Outside, + XMVectorLess(Dist, XMVectorSubtract(FrustumMin, Radius))); } } - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; - // If we did not find a separating plane then the box must intersect the frustum. + // If we did not find a separating plane then the box must intersect the + // frustum. return true; } - //----------------------------------------------------------------------------- // Exact frustum vs frustum test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcept -{ +_Use_decl_annotations_ inline bool BoundingFrustum::Intersects( + const BoundingFrustum& fr) const noexcept { // Load origin and orientation of frustum B. XMVECTOR OriginB = XMLoadFloat3(&Origin); XMVECTOR OrientationB = XMLoadFloat4(&Orientation); @@ -3598,14 +3711,18 @@ inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcep // Transform frustum A into the space of the frustum B in order to // minimize the number of transforms we have to do. - OriginA = XMVector3InverseRotate(XMVectorSubtract(OriginA, OriginB), OrientationB); - OrientationA = XMQuaternionMultiply(OrientationA, XMQuaternionConjugate(OrientationB)); + OriginA = XMVector3InverseRotate(XMVectorSubtract(OriginA, OriginB), + OrientationB); + OrientationA = + XMQuaternionMultiply(OrientationA, XMQuaternionConjugate(OrientationB)); // Build the corners of frustum A (in the local space of B). XMVECTOR RightTopA = XMVectorSet(fr.RightSlope, fr.TopSlope, 1.0f, 0.0f); - XMVECTOR RightBottomA = XMVectorSet(fr.RightSlope, fr.BottomSlope, 1.0f, 0.0f); + XMVECTOR RightBottomA = + XMVectorSet(fr.RightSlope, fr.BottomSlope, 1.0f, 0.0f); XMVECTOR LeftTopA = XMVectorSet(fr.LeftSlope, fr.TopSlope, 1.0f, 0.0f); - XMVECTOR LeftBottomA = XMVectorSet(fr.LeftSlope, fr.BottomSlope, 1.0f, 0.0f); + XMVECTOR LeftBottomA = + XMVectorSet(fr.LeftSlope, fr.BottomSlope, 1.0f, 0.0f); XMVECTOR NearA = XMVectorReplicatePtr(&fr.Near); XMVECTOR FarA = XMVectorReplicatePtr(&fr.Far); @@ -3628,15 +3745,13 @@ inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcep XMVECTOR Outside = XMVectorFalseInt(); XMVECTOR InsideAll = XMVectorTrueInt(); - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { // Find the min/max projection of the frustum onto the plane normal. XMVECTOR Min, Max; Min = Max = XMVector3Dot(AxisB[i], CornersA[0]); - for (size_t j = 1; j < CORNER_COUNT; j++) - { + for (size_t j = 1; j < CORNER_COUNT; j++) { XMVECTOR Temp = XMVector3Dot(AxisB[i], CornersA[j]); Min = XMVectorMin(Min, Temp); Max = XMVectorMax(Max, Temp); @@ -3646,16 +3761,15 @@ inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcep Outside = XMVectorOrInt(Outside, XMVectorGreater(Min, PlaneDistB[i])); // Fully inside the plane? - InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(Max, PlaneDistB[i])); + InsideAll = + XMVectorAndInt(InsideAll, XMVectorLessOrEqual(Max, PlaneDistB[i])); } // If the frustum A is outside any of the planes of frustum B it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; // If frustum A is inside all planes of frustum B it is fully inside. - if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) - return true; + if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) return true; // Build the corners of frustum B. XMVECTOR RightTopB = XMVectorSet(RightSlope, TopSlope, 1.0f, 0.0f); @@ -3693,23 +3807,23 @@ inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcep AxisA[4] = XMVector3Rotate(AxisA[4], OrientationA); AxisA[5] = XMVector3Rotate(AxisA[5], OrientationA); - PlaneDistA[0] = XMVector3Dot(AxisA[0], CornersA[0]); // Re-use corner on near plane. - PlaneDistA[1] = XMVector3Dot(AxisA[1], CornersA[4]); // Re-use corner on far plane. + PlaneDistA[0] = + XMVector3Dot(AxisA[0], CornersA[0]); // Re-use corner on near plane. + PlaneDistA[1] = + XMVector3Dot(AxisA[1], CornersA[4]); // Re-use corner on far plane. PlaneDistA[2] = XMVector3Dot(AxisA[2], OriginA); PlaneDistA[3] = XMVector3Dot(AxisA[3], OriginA); PlaneDistA[4] = XMVector3Dot(AxisA[4], OriginA); PlaneDistA[5] = XMVector3Dot(AxisA[5], OriginA); // Check each axis of frustum A for a seperating plane (5). - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { // Find the minimum projection of the frustum onto the plane normal. XMVECTOR Min; Min = XMVector3Dot(AxisA[i], CornersB[0]); - for (size_t j = 1; j < CORNER_COUNT; j++) - { + for (size_t j = 1; j < CORNER_COUNT; j++) { XMVECTOR Temp = XMVector3Dot(AxisA[i], CornersB[j]); Min = XMVectorMin(Min, Temp); } @@ -3719,8 +3833,7 @@ inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcep } // If the frustum B is outside any of the planes of frustum A it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; // Check edge/edge axes (6 * 6). XMVECTOR FrustumEdgeAxisA[6]; @@ -3739,22 +3852,21 @@ inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcep FrustumEdgeAxisB[4] = XMVectorSubtract(RightTopB, LeftTopB); FrustumEdgeAxisB[5] = XMVectorSubtract(LeftBottomB, LeftTopB); - for (size_t i = 0; i < 6; ++i) - { - for (size_t j = 0; j < 6; j++) - { + for (size_t i = 0; i < 6; ++i) { + for (size_t j = 0; j < 6; j++) { // Compute the axis we are going to test. - XMVECTOR Axis = XMVector3Cross(FrustumEdgeAxisA[i], FrustumEdgeAxisB[j]); + XMVECTOR Axis = + XMVector3Cross(FrustumEdgeAxisA[i], FrustumEdgeAxisB[j]); - // Find the min/max values of the projection of both frustums onto the axis. + // Find the min/max values of the projection of both frustums onto + // the axis. XMVECTOR MinA, MaxA; XMVECTOR MinB, MaxB; MinA = MaxA = XMVector3Dot(Axis, CornersA[0]); MinB = MaxB = XMVector3Dot(Axis, CornersB[0]); - for (size_t k = 1; k < CORNER_COUNT; k++) - { + for (size_t k = 1; k < CORNER_COUNT; k++) { XMVECTOR TempA = XMVector3Dot(Axis, CornersA[k]); MinA = XMVectorMin(MinA, TempA); MaxA = XMVectorMax(MaxA, TempA); @@ -3771,20 +3883,17 @@ inline bool BoundingFrustum::Intersects(const BoundingFrustum& fr) const noexcep } // If there is a seperating plane, then the frustums do not intersect. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; // If we did not find a separating plane then the frustums intersect. return true; } - //----------------------------------------------------------------------------- // Triangle vs frustum test. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingFrustum::Intersects( + FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2) const noexcept { // Build the frustum planes (NOTE: D is negated from the usual). XMVECTOR Planes[6]; Planes[0] = XMVectorSet(0.0f, 0.0f, -1.0f, -Near); @@ -3801,16 +3910,18 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR V0, FXMVECTOR V1, assert(DirectX::MathInternal::XMQuaternionIsUnit(vOrientation)); // Transform triangle into the local space of frustum. - XMVECTOR TV0 = XMVector3InverseRotate(XMVectorSubtract(V0, vOrigin), vOrientation); - XMVECTOR TV1 = XMVector3InverseRotate(XMVectorSubtract(V1, vOrigin), vOrientation); - XMVECTOR TV2 = XMVector3InverseRotate(XMVectorSubtract(V2, vOrigin), vOrientation); + XMVECTOR TV0 = + XMVector3InverseRotate(XMVectorSubtract(V0, vOrigin), vOrientation); + XMVECTOR TV1 = + XMVector3InverseRotate(XMVectorSubtract(V1, vOrigin), vOrientation); + XMVECTOR TV2 = + XMVector3InverseRotate(XMVectorSubtract(V2, vOrigin), vOrientation); // Test each vertex of the triangle against the frustum planes. XMVECTOR Outside = XMVectorFalseInt(); XMVECTOR InsideAll = XMVectorTrueInt(); - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { XMVECTOR Dist0 = XMVector3Dot(TV0, Planes[i]); XMVECTOR Dist1 = XMVector3Dot(TV1, Planes[i]); XMVECTOR Dist2 = XMVector3Dot(TV2, Planes[i]); @@ -3826,16 +3937,15 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR V0, FXMVECTOR V1, Outside = XMVectorOrInt(Outside, XMVectorGreater(MinDist, PlaneDist)); // Fully inside the plane? - InsideAll = XMVectorAndInt(InsideAll, XMVectorLessOrEqual(MaxDist, PlaneDist)); + InsideAll = + XMVectorAndInt(InsideAll, XMVectorLessOrEqual(MaxDist, PlaneDist)); } // If the triangle is outside any of the planes it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; // If the triangle is inside all planes it is fully inside. - if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) - return true; + if (XMVector4EqualInt(InsideAll, XMVectorTrueInt())) return true; // Build the corners of the frustum. XMVECTOR vRightTop = XMVectorSet(RightSlope, TopSlope, 1.0f, 0.0f); @@ -3856,21 +3966,21 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR V0, FXMVECTOR V1, Corners[7] = XMVectorMultiply(vLeftBottom, vFar); // Test the plane of the triangle. - XMVECTOR Normal = XMVector3Cross(XMVectorSubtract(V1, V0), XMVectorSubtract(V2, V0)); + XMVECTOR Normal = + XMVector3Cross(XMVectorSubtract(V1, V0), XMVectorSubtract(V2, V0)); XMVECTOR Dist = XMVector3Dot(Normal, V0); XMVECTOR MinDist, MaxDist; MinDist = MaxDist = XMVector3Dot(Corners[0], Normal); - for (size_t i = 1; i < CORNER_COUNT; ++i) - { + for (size_t i = 1; i < CORNER_COUNT; ++i) { XMVECTOR Temp = XMVector3Dot(Corners[i], Normal); MinDist = XMVectorMin(MinDist, Temp); MaxDist = XMVectorMax(MaxDist, Temp); } - Outside = XMVectorOrInt(XMVectorGreater(MinDist, Dist), XMVectorLess(MaxDist, Dist)); - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + Outside = XMVectorOrInt(XMVectorGreater(MinDist, Dist), + XMVectorLess(MaxDist, Dist)); + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; // Check the edge/edge axes (3*6). XMVECTOR TriangleEdgeAxis[3]; @@ -3886,12 +3996,11 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR V0, FXMVECTOR V1, FrustumEdgeAxis[4] = XMVectorSubtract(vRightTop, vLeftTop); FrustumEdgeAxis[5] = XMVectorSubtract(vLeftBottom, vLeftTop); - for (size_t i = 0; i < 3; ++i) - { - for (size_t j = 0; j < 6; j++) - { + for (size_t i = 0; i < 3; ++i) { + for (size_t j = 0; j < 6; j++) { // Compute the axis we are going to test. - XMVECTOR Axis = XMVector3Cross(TriangleEdgeAxis[i], FrustumEdgeAxis[j]); + XMVECTOR Axis = + XMVector3Cross(TriangleEdgeAxis[i], FrustumEdgeAxis[j]); // Find the min/max of the projection of the triangle onto the axis. XMVECTOR MinA, MaxA; @@ -3910,8 +4019,7 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR V0, FXMVECTOR V1, MinB = MaxB = XMVector3Dot(Axis, Corners[0]); - for (size_t k = 1; k < CORNER_COUNT; k++) - { + for (size_t k = 1; k < CORNER_COUNT; k++) { XMVECTOR Temp = XMVector3Dot(Axis, Corners[k]); MinB = XMVectorMin(MinB, Temp); MaxB = XMVectorMax(MaxB, Temp); @@ -3923,18 +4031,16 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR V0, FXMVECTOR V1, } } - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return false; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return false; - // If we did not find a separating plane then the triangle must intersect the frustum. + // If we did not find a separating plane then the triangle must intersect + // the frustum. return true; } - //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline PlaneIntersectionType XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR Plane) const noexcept -{ +_Use_decl_annotations_ inline PlaneIntersectionType XM_CALLCONV +BoundingFrustum::Intersects(FXMVECTOR Plane) const noexcept { assert(DirectX::MathInternal::XMPlaneIsUnit(Plane)); // Load origin and orientation of the frustum. @@ -3969,32 +4075,27 @@ inline PlaneIntersectionType XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR P XMVECTOR Corners7 = XMVectorMultiplyAdd(LeftBottom, vFar, vOrigin); XMVECTOR Outside, Inside; - DirectX::MathInternal::FastIntersectFrustumPlane(Corners0, Corners1, Corners2, Corners3, - Corners4, Corners5, Corners6, Corners7, - Plane, Outside, Inside); + DirectX::MathInternal::FastIntersectFrustumPlane( + Corners0, Corners1, Corners2, Corners3, Corners4, Corners5, Corners6, + Corners7, Plane, Outside, Inside); // If the frustum is outside any plane it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return FRONT; + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return FRONT; // If the frustum is inside all planes it is inside. - if (XMVector4EqualInt(Inside, XMVectorTrueInt())) - return BACK; + if (XMVector4EqualInt(Inside, XMVectorTrueInt())) return BACK; // The frustum is not inside all planes or outside a plane it intersects. return INTERSECTING; } - //----------------------------------------------------------------------------- // Ray vs. frustum test //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR rayOrigin, FXMVECTOR Direction, float& Dist) const noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV BoundingFrustum::Intersects( + FXMVECTOR rayOrigin, FXMVECTOR Direction, float& Dist) const noexcept { // If ray starts inside the frustum, return a distance of 0 for the hit - if (Contains(rayOrigin) == CONTAINS) - { + if (Contains(rayOrigin) == CONTAINS) { Dist = 0.0f; return true; } @@ -4012,58 +4113,48 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR rayOrigin, FXMVECT XMVECTOR frOrigin = XMLoadFloat3(&Origin); XMVECTOR frOrientation = XMLoadFloat4(&Orientation); - // This algorithm based on "Fast Ray-Convex Polyhedron Intersectin," in James Arvo, ed., Graphics Gems II pp. 247-250 + // This algorithm based on "Fast Ray-Convex Polyhedron Intersectin," in + // James Arvo, ed., Graphics Gems II pp. 247-250 float tnear = -FLT_MAX; float tfar = FLT_MAX; - for (size_t i = 0; i < 6; ++i) - { - XMVECTOR Plane = DirectX::MathInternal::XMPlaneTransform(Planes[i], frOrientation, frOrigin); + for (size_t i = 0; i < 6; ++i) { + XMVECTOR Plane = DirectX::MathInternal::XMPlaneTransform( + Planes[i], frOrientation, frOrigin); Plane = XMPlaneNormalize(Plane); XMVECTOR AxisDotOrigin = XMPlaneDotCoord(Plane, rayOrigin); XMVECTOR AxisDotDirection = XMVector3Dot(Plane, Direction); - if (XMVector3LessOrEqual(XMVectorAbs(AxisDotDirection), g_RayEpsilon)) - { + if (XMVector3LessOrEqual(XMVectorAbs(AxisDotDirection), g_RayEpsilon)) { // Ray is parallel to plane - check if ray origin is inside plane's - if (XMVector3Greater(AxisDotOrigin, g_XMZero)) - { + if (XMVector3Greater(AxisDotOrigin, g_XMZero)) { // Ray origin is outside half-space. Dist = 0.f; return false; } - } - else - { + } else { // Ray not parallel - get distance to plane. float vd = XMVectorGetX(AxisDotDirection); float vn = XMVectorGetX(AxisDotOrigin); float t = -vn / vd; - if (vd < 0.0f) - { + if (vd < 0.0f) { // Front face - T is a near point. - if (t > tfar) - { + if (t > tfar) { Dist = 0.f; return false; } - if (t > tnear) - { + if (t > tnear) { // Hit near face. tnear = t; } - } - else - { + } else { // back face - T is far point. - if (t < tnear) - { + if (t < tnear) { Dist = 0.f; return false; } - if (t < tfar) - { + if (t < tfar) { // Hit far face. tfar = t; } @@ -4075,8 +4166,7 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR rayOrigin, FXMVECT // Note: if ray originates on polyhedron, may want to change 0.0f to some // epsilon to avoid intersecting the originating face. float distance = (tnear >= 0.0f) ? tnear : tfar; - if (distance >= 0.0f) - { + if (distance >= 0.0f) { Dist = distance; return true; } @@ -4085,16 +4175,14 @@ inline bool XM_CALLCONV BoundingFrustum::Intersects(FXMVECTOR rayOrigin, FXMVECT return false; } - //----------------------------------------------------------------------------- // Test a frustum vs 6 planes (typically forming another frustum). //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline ContainmentType XM_CALLCONV BoundingFrustum::ContainedBy( - FXMVECTOR Plane0, FXMVECTOR Plane1, FXMVECTOR Plane2, - GXMVECTOR Plane3, - HXMVECTOR Plane4, HXMVECTOR Plane5) const noexcept -{ +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +BoundingFrustum::ContainedBy(FXMVECTOR Plane0, FXMVECTOR Plane1, + FXMVECTOR Plane2, GXMVECTOR Plane3, + HXMVECTOR Plane4, + HXMVECTOR Plane5) const noexcept { // Load origin and orientation of the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); @@ -4129,61 +4217,59 @@ inline ContainmentType XM_CALLCONV BoundingFrustum::ContainedBy( XMVECTOR Outside, Inside; // Test against each plane. - DirectX::MathInternal::FastIntersectFrustumPlane(Corners0, Corners1, Corners2, Corners3, - Corners4, Corners5, Corners6, Corners7, - Plane0, Outside, Inside); + DirectX::MathInternal::FastIntersectFrustumPlane( + Corners0, Corners1, Corners2, Corners3, Corners4, Corners5, Corners6, + Corners7, Plane0, Outside, Inside); XMVECTOR AnyOutside = Outside; XMVECTOR AllInside = Inside; - DirectX::MathInternal::FastIntersectFrustumPlane(Corners0, Corners1, Corners2, Corners3, - Corners4, Corners5, Corners6, Corners7, - Plane1, Outside, Inside); + DirectX::MathInternal::FastIntersectFrustumPlane( + Corners0, Corners1, Corners2, Corners3, Corners4, Corners5, Corners6, + Corners7, Plane1, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectFrustumPlane(Corners0, Corners1, Corners2, Corners3, - Corners4, Corners5, Corners6, Corners7, - Plane2, Outside, Inside); + DirectX::MathInternal::FastIntersectFrustumPlane( + Corners0, Corners1, Corners2, Corners3, Corners4, Corners5, Corners6, + Corners7, Plane2, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectFrustumPlane(Corners0, Corners1, Corners2, Corners3, - Corners4, Corners5, Corners6, Corners7, - Plane3, Outside, Inside); + DirectX::MathInternal::FastIntersectFrustumPlane( + Corners0, Corners1, Corners2, Corners3, Corners4, Corners5, Corners6, + Corners7, Plane3, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectFrustumPlane(Corners0, Corners1, Corners2, Corners3, - Corners4, Corners5, Corners6, Corners7, - Plane4, Outside, Inside); + DirectX::MathInternal::FastIntersectFrustumPlane( + Corners0, Corners1, Corners2, Corners3, Corners4, Corners5, Corners6, + Corners7, Plane4, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); - DirectX::MathInternal::FastIntersectFrustumPlane(Corners0, Corners1, Corners2, Corners3, - Corners4, Corners5, Corners6, Corners7, - Plane5, Outside, Inside); + DirectX::MathInternal::FastIntersectFrustumPlane( + Corners0, Corners1, Corners2, Corners3, Corners4, Corners5, Corners6, + Corners7, Plane5, Outside, Inside); AnyOutside = XMVectorOrInt(AnyOutside, Outside); AllInside = XMVectorAndInt(AllInside, Inside); // If the frustum is outside any plane it is outside. - if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) - return DISJOINT; + if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) return DISJOINT; // If the frustum is inside all planes it is inside. - if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) - return CONTAINS; + if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) return CONTAINS; - // The frustum is not inside all planes or outside a plane, it may intersect. + // The frustum is not inside all planes or outside a plane, it may + // intersect. return INTERSECTS; } - //----------------------------------------------------------------------------- // Build the 6 frustum planes from a frustum. // @@ -4194,76 +4280,74 @@ inline ContainmentType XM_CALLCONV BoundingFrustum::ContainedBy( // of these cases is true then it may or may not be intersecting the frustum // (INTERSECTS) //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void BoundingFrustum::GetPlanes(XMVECTOR* NearPlane, XMVECTOR* FarPlane, XMVECTOR* RightPlane, - XMVECTOR* LeftPlane, XMVECTOR* TopPlane, XMVECTOR* BottomPlane) const noexcept -{ +_Use_decl_annotations_ inline void BoundingFrustum::GetPlanes( + XMVECTOR* NearPlane, XMVECTOR* FarPlane, XMVECTOR* RightPlane, + XMVECTOR* LeftPlane, XMVECTOR* TopPlane, + XMVECTOR* BottomPlane) const noexcept { // Load origin and orientation of the frustum. XMVECTOR vOrigin = XMLoadFloat3(&Origin); XMVECTOR vOrientation = XMLoadFloat4(&Orientation); - if (NearPlane) - { + if (NearPlane) { XMVECTOR vNearPlane = XMVectorSet(0.0f, 0.0f, -1.0f, Near); - vNearPlane = DirectX::MathInternal::XMPlaneTransform(vNearPlane, vOrientation, vOrigin); + vNearPlane = DirectX::MathInternal::XMPlaneTransform( + vNearPlane, vOrientation, vOrigin); *NearPlane = XMPlaneNormalize(vNearPlane); } - if (FarPlane) - { + if (FarPlane) { XMVECTOR vFarPlane = XMVectorSet(0.0f, 0.0f, 1.0f, -Far); - vFarPlane = DirectX::MathInternal::XMPlaneTransform(vFarPlane, vOrientation, vOrigin); + vFarPlane = DirectX::MathInternal::XMPlaneTransform( + vFarPlane, vOrientation, vOrigin); *FarPlane = XMPlaneNormalize(vFarPlane); } - if (RightPlane) - { + if (RightPlane) { XMVECTOR vRightPlane = XMVectorSet(1.0f, 0.0f, -RightSlope, 0.0f); - vRightPlane = DirectX::MathInternal::XMPlaneTransform(vRightPlane, vOrientation, vOrigin); + vRightPlane = DirectX::MathInternal::XMPlaneTransform( + vRightPlane, vOrientation, vOrigin); *RightPlane = XMPlaneNormalize(vRightPlane); } - if (LeftPlane) - { + if (LeftPlane) { XMVECTOR vLeftPlane = XMVectorSet(-1.0f, 0.0f, LeftSlope, 0.0f); - vLeftPlane = DirectX::MathInternal::XMPlaneTransform(vLeftPlane, vOrientation, vOrigin); + vLeftPlane = DirectX::MathInternal::XMPlaneTransform( + vLeftPlane, vOrientation, vOrigin); *LeftPlane = XMPlaneNormalize(vLeftPlane); } - if (TopPlane) - { + if (TopPlane) { XMVECTOR vTopPlane = XMVectorSet(0.0f, 1.0f, -TopSlope, 0.0f); - vTopPlane = DirectX::MathInternal::XMPlaneTransform(vTopPlane, vOrientation, vOrigin); + vTopPlane = DirectX::MathInternal::XMPlaneTransform( + vTopPlane, vOrientation, vOrigin); *TopPlane = XMPlaneNormalize(vTopPlane); } - if (BottomPlane) - { + if (BottomPlane) { XMVECTOR vBottomPlane = XMVectorSet(0.0f, -1.0f, BottomSlope, 0.0f); - vBottomPlane = DirectX::MathInternal::XMPlaneTransform(vBottomPlane, vOrientation, vOrigin); + vBottomPlane = DirectX::MathInternal::XMPlaneTransform( + vBottomPlane, vOrientation, vOrigin); *BottomPlane = XMPlaneNormalize(vBottomPlane); } } - //----------------------------------------------------------------------------- // Build a frustum from a persepective projection matrix. The matrix may only // contain a projection; any rotation, translation or scale will cause the // constructed frustum to be incorrect. //----------------------------------------------------------------------------- -_Use_decl_annotations_ -inline void XM_CALLCONV BoundingFrustum::CreateFromMatrix(BoundingFrustum& Out, FXMMATRIX Projection, bool rhcoords) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +BoundingFrustum::CreateFromMatrix(BoundingFrustum& Out, FXMMATRIX Projection, + bool rhcoords) noexcept { // Corners of the projection frustum in NDC space. - static XMVECTORF32 NDCPoints[6] = - { - { { { 1.0f, 0.0f, 1.0f, 1.0f } } }, // right (at far plane) - { { { -1.0f, 0.0f, 1.0f, 1.0f } } }, // left - { { { 0.0f, 1.0f, 1.0f, 1.0f } } }, // top - { { { 0.0f, -1.0f, 1.0f, 1.0f } } }, // bottom + static XMVECTORF32 NDCPoints[6] = { + {{{1.0f, 0.0f, 1.0f, 1.0f}}}, // right (at far plane) + {{{-1.0f, 0.0f, 1.0f, 1.0f}}}, // left + {{{0.0f, 1.0f, 1.0f, 1.0f}}}, // top + {{{0.0f, -1.0f, 1.0f, 1.0f}}}, // bottom - { { { 0.0f, 0.0f, 0.0f, 1.0f } } }, // near - { { { 0.0f, 0.0f, 1.0f, 1.0f } } } // far + {{{0.0f, 0.0f, 0.0f, 1.0f}}}, // near + {{{0.0f, 0.0f, 1.0f, 1.0f}}} // far }; XMVECTOR Determinant; @@ -4272,8 +4356,7 @@ inline void XM_CALLCONV BoundingFrustum::CreateFromMatrix(BoundingFrustum& Out, // Compute the frustum corners in world space. XMVECTOR Points[6]; - for (size_t i = 0; i < 6; ++i) - { + for (size_t i = 0; i < 6; ++i) { // Transform point. Points[i] = XMVector4Transform(NDCPoints[i], matInverse); } @@ -4282,10 +4365,14 @@ inline void XM_CALLCONV BoundingFrustum::CreateFromMatrix(BoundingFrustum& Out, Out.Orientation = XMFLOAT4(0.0f, 0.0f, 0.0f, 1.0f); // Compute the slopes. - Points[0] = XMVectorMultiply(Points[0], XMVectorReciprocal(XMVectorSplatZ(Points[0]))); - Points[1] = XMVectorMultiply(Points[1], XMVectorReciprocal(XMVectorSplatZ(Points[1]))); - Points[2] = XMVectorMultiply(Points[2], XMVectorReciprocal(XMVectorSplatZ(Points[2]))); - Points[3] = XMVectorMultiply(Points[3], XMVectorReciprocal(XMVectorSplatZ(Points[3]))); + Points[0] = XMVectorMultiply(Points[0], + XMVectorReciprocal(XMVectorSplatZ(Points[0]))); + Points[1] = XMVectorMultiply(Points[1], + XMVectorReciprocal(XMVectorSplatZ(Points[1]))); + Points[2] = XMVectorMultiply(Points[2], + XMVectorReciprocal(XMVectorSplatZ(Points[2]))); + Points[3] = XMVectorMultiply(Points[3], + XMVectorReciprocal(XMVectorSplatZ(Points[3]))); Out.RightSlope = XMVectorGetX(Points[0]); Out.LeftSlope = XMVectorGetX(Points[1]); @@ -4293,524 +4380,542 @@ inline void XM_CALLCONV BoundingFrustum::CreateFromMatrix(BoundingFrustum& Out, Out.BottomSlope = XMVectorGetY(Points[3]); // Compute near and far. - Points[4] = XMVectorMultiply(Points[4], XMVectorReciprocal(XMVectorSplatW(Points[4]))); - Points[5] = XMVectorMultiply(Points[5], XMVectorReciprocal(XMVectorSplatW(Points[5]))); + Points[4] = XMVectorMultiply(Points[4], + XMVectorReciprocal(XMVectorSplatW(Points[4]))); + Points[5] = XMVectorMultiply(Points[5], + XMVectorReciprocal(XMVectorSplatW(Points[5]))); - if (rhcoords) - { + if (rhcoords) { Out.Near = XMVectorGetZ(Points[5]); Out.Far = XMVectorGetZ(Points[4]); - } - else - { + } else { Out.Near = XMVectorGetZ(Points[4]); Out.Far = XMVectorGetZ(Points[5]); } } - /**************************************************************************** * * TriangleTests * ****************************************************************************/ -namespace TriangleTests -{ +namespace TriangleTests { - //----------------------------------------------------------------------------- - // Compute the intersection of a ray (Origin, Direction) with a triangle - // (V0, V1, V2). Return true if there is an intersection and also set *pDist - // to the distance along the ray to the intersection. - // - // The algorithm is based on Moller, Tomas and Trumbore, "Fast, Minimum Storage - // Ray-Triangle Intersection", Journal of Graphics Tools, vol. 2, no. 1, - // pp 21-28, 1997. - //----------------------------------------------------------------------------- - _Use_decl_annotations_ - inline bool XM_CALLCONV Intersects( - FXMVECTOR Origin, FXMVECTOR Direction, FXMVECTOR V0, - GXMVECTOR V1, - HXMVECTOR V2, float& Dist) noexcept - { - assert(DirectX::MathInternal::XMVector3IsUnit(Direction)); +//----------------------------------------------------------------------------- +// Compute the intersection of a ray (Origin, Direction) with a triangle +// (V0, V1, V2). Return true if there is an intersection and also set *pDist +// to the distance along the ray to the intersection. +// +// The algorithm is based on Moller, Tomas and Trumbore, "Fast, Minimum Storage +// Ray-Triangle Intersection", Journal of Graphics Tools, vol. 2, no. 1, +// pp 21-28, 1997. +//----------------------------------------------------------------------------- +_Use_decl_annotations_ inline bool XM_CALLCONV +Intersects(FXMVECTOR Origin, FXMVECTOR Direction, FXMVECTOR V0, GXMVECTOR V1, + HXMVECTOR V2, float& Dist) noexcept { + assert(DirectX::MathInternal::XMVector3IsUnit(Direction)); - XMVECTOR Zero = XMVectorZero(); + XMVECTOR Zero = XMVectorZero(); - XMVECTOR e1 = XMVectorSubtract(V1, V0); - XMVECTOR e2 = XMVectorSubtract(V2, V0); + XMVECTOR e1 = XMVectorSubtract(V1, V0); + XMVECTOR e2 = XMVectorSubtract(V2, V0); - // p = Direction ^ e2; - XMVECTOR p = XMVector3Cross(Direction, e2); + // p = Direction ^ e2; + XMVECTOR p = XMVector3Cross(Direction, e2); - // det = e1 * p; - XMVECTOR det = XMVector3Dot(e1, p); + // det = e1 * p; + XMVECTOR det = XMVector3Dot(e1, p); - XMVECTOR u, v, t; + XMVECTOR u, v, t; - if (XMVector3GreaterOrEqual(det, g_RayEpsilon)) - { - // Determinate is positive (front side of the triangle). - XMVECTOR s = XMVectorSubtract(Origin, V0); + if (XMVector3GreaterOrEqual(det, g_RayEpsilon)) { + // Determinate is positive (front side of the triangle). + XMVECTOR s = XMVectorSubtract(Origin, V0); - // u = s * p; - u = XMVector3Dot(s, p); + // u = s * p; + u = XMVector3Dot(s, p); - XMVECTOR NoIntersection = XMVectorLess(u, Zero); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(u, det)); + XMVECTOR NoIntersection = XMVectorLess(u, Zero); + NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(u, det)); - // q = s ^ e1; - XMVECTOR q = XMVector3Cross(s, e1); + // q = s ^ e1; + XMVECTOR q = XMVector3Cross(s, e1); - // v = Direction * q; - v = XMVector3Dot(Direction, q); + // v = Direction * q; + v = XMVector3Dot(Direction, q); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(v, Zero)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(XMVectorAdd(u, v), det)); + NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(v, Zero)); + NoIntersection = XMVectorOrInt(NoIntersection, + XMVectorGreater(XMVectorAdd(u, v), det)); - // t = e2 * q; - t = XMVector3Dot(e2, q); + // t = e2 * q; + t = XMVector3Dot(e2, q); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(t, Zero)); + NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(t, Zero)); - if (XMVector4EqualInt(NoIntersection, XMVectorTrueInt())) - { - Dist = 0.f; - return false; - } - } - else if (XMVector3LessOrEqual(det, g_RayNegEpsilon)) - { - // Determinate is negative (back side of the triangle). - XMVECTOR s = XMVectorSubtract(Origin, V0); - - // u = s * p; - u = XMVector3Dot(s, p); - - XMVECTOR NoIntersection = XMVectorGreater(u, Zero); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(u, det)); - - // q = s ^ e1; - XMVECTOR q = XMVector3Cross(s, e1); - - // v = Direction * q; - v = XMVector3Dot(Direction, q); - - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(v, Zero)); - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(XMVectorAdd(u, v), det)); - - // t = e2 * q; - t = XMVector3Dot(e2, q); - - NoIntersection = XMVectorOrInt(NoIntersection, XMVectorGreater(t, Zero)); - - if (XMVector4EqualInt(NoIntersection, XMVectorTrueInt())) - { - Dist = 0.f; - return false; - } - } - else - { - // Parallel ray. + if (XMVector4EqualInt(NoIntersection, XMVectorTrueInt())) { Dist = 0.f; return false; } + } else if (XMVector3LessOrEqual(det, g_RayNegEpsilon)) { + // Determinate is negative (back side of the triangle). + XMVECTOR s = XMVectorSubtract(Origin, V0); - t = XMVectorDivide(t, det); + // u = s * p; + u = XMVector3Dot(s, p); - // (u / det) and (v / dev) are the barycentric cooridinates of the intersection. + XMVECTOR NoIntersection = XMVectorGreater(u, Zero); + NoIntersection = XMVectorOrInt(NoIntersection, XMVectorLess(u, det)); - // Store the x-component to *pDist - XMStoreFloat(&Dist, t); + // q = s ^ e1; + XMVECTOR q = XMVector3Cross(s, e1); + + // v = Direction * q; + v = XMVector3Dot(Direction, q); + + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(v, Zero)); + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorLess(XMVectorAdd(u, v), det)); + + // t = e2 * q; + t = XMVector3Dot(e2, q); + + NoIntersection = + XMVectorOrInt(NoIntersection, XMVectorGreater(t, Zero)); + + if (XMVector4EqualInt(NoIntersection, XMVectorTrueInt())) { + Dist = 0.f; + return false; + } + } else { + // Parallel ray. + Dist = 0.f; + return false; + } + + t = XMVectorDivide(t, det); + + // (u / det) and (v / dev) are the barycentric cooridinates of the + // intersection. + + // Store the x-component to *pDist + XMStoreFloat(&Dist, t); + + return true; +} + +//----------------------------------------------------------------------------- +// Test if two triangles intersect. +// +// The final test of algorithm is based on Shen, Heng, and Tang, "A Fast +// Triangle-Triangle Overlap Test Using Signed Distances", Journal of Graphics +// Tools, vol. 8, no. 1, pp 17-23, 2003 and Guigue and Devillers, "Fast and +// Robust Triangle-Triangle Overlap Test Using Orientation Predicates", Journal +// of Graphics Tools, vol. 8, no. 1, pp 25-32, 2003. +// +// The final test could be considered an edge-edge separating plane test with +// the 9 possible cases narrowed down to the only two pairs of edges that can +// actaully result in a seperation. +//----------------------------------------------------------------------------- +_Use_decl_annotations_ inline bool XM_CALLCONV +Intersects(FXMVECTOR A0, FXMVECTOR A1, FXMVECTOR A2, GXMVECTOR B0, HXMVECTOR B1, + HXMVECTOR B2) noexcept { + static const XMVECTORU32 SelectY = { + {{XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0}}}; + static const XMVECTORU32 SelectZ = { + {{XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0}}}; + static const XMVECTORU32 Select0111 = { + {{XM_SELECT_0, XM_SELECT_1, XM_SELECT_1, XM_SELECT_1}}}; + static const XMVECTORU32 Select1011 = { + {{XM_SELECT_1, XM_SELECT_0, XM_SELECT_1, XM_SELECT_1}}}; + static const XMVECTORU32 Select1101 = { + {{XM_SELECT_1, XM_SELECT_1, XM_SELECT_0, XM_SELECT_1}}}; + + XMVECTOR Zero = XMVectorZero(); + + // Compute the normal of triangle A. + XMVECTOR N1 = + XMVector3Cross(XMVectorSubtract(A1, A0), XMVectorSubtract(A2, A0)); + + // Assert that the triangle is not degenerate. + assert(!XMVector3Equal(N1, Zero)); + + // Test points of B against the plane of A. + XMVECTOR BDist = XMVector3Dot(N1, XMVectorSubtract(B0, A0)); + BDist = XMVectorSelect(BDist, XMVector3Dot(N1, XMVectorSubtract(B1, A0)), + SelectY); + BDist = XMVectorSelect(BDist, XMVector3Dot(N1, XMVectorSubtract(B2, A0)), + SelectZ); + + // Ensure robustness with co-planar triangles by zeroing small distances. + uint32_t BDistIsZeroCR; + XMVECTOR BDistIsZero = + XMVectorGreaterR(&BDistIsZeroCR, g_RayEpsilon, XMVectorAbs(BDist)); + BDist = XMVectorSelect(BDist, Zero, BDistIsZero); + + uint32_t BDistIsLessCR; + XMVECTOR BDistIsLess = XMVectorGreaterR(&BDistIsLessCR, Zero, BDist); + + uint32_t BDistIsGreaterCR; + XMVECTOR BDistIsGreater = XMVectorGreaterR(&BDistIsGreaterCR, BDist, Zero); + + // If all the points are on the same side we don't intersect. + if (XMComparisonAllTrue(BDistIsLessCR) || + XMComparisonAllTrue(BDistIsGreaterCR)) + return false; + + // Compute the normal of triangle B. + XMVECTOR N2 = + XMVector3Cross(XMVectorSubtract(B1, B0), XMVectorSubtract(B2, B0)); + + // Assert that the triangle is not degenerate. + assert(!XMVector3Equal(N2, Zero)); + + // Test points of A against the plane of B. + XMVECTOR ADist = XMVector3Dot(N2, XMVectorSubtract(A0, B0)); + ADist = XMVectorSelect(ADist, XMVector3Dot(N2, XMVectorSubtract(A1, B0)), + SelectY); + ADist = XMVectorSelect(ADist, XMVector3Dot(N2, XMVectorSubtract(A2, B0)), + SelectZ); + + // Ensure robustness with co-planar triangles by zeroing small distances. + uint32_t ADistIsZeroCR; + XMVECTOR ADistIsZero = + XMVectorGreaterR(&ADistIsZeroCR, g_RayEpsilon, XMVectorAbs(ADist)); + ADist = XMVectorSelect(ADist, Zero, ADistIsZero); + + uint32_t ADistIsLessCR; + XMVECTOR ADistIsLess = XMVectorGreaterR(&ADistIsLessCR, Zero, ADist); + + uint32_t ADistIsGreaterCR; + XMVECTOR ADistIsGreater = XMVectorGreaterR(&ADistIsGreaterCR, ADist, Zero); + + // If all the points are on the same side we don't intersect. + if (XMComparisonAllTrue(ADistIsLessCR) || + XMComparisonAllTrue(ADistIsGreaterCR)) + return false; + + // Special case for co-planar triangles. + if (XMComparisonAllTrue(ADistIsZeroCR) || + XMComparisonAllTrue(BDistIsZeroCR)) { + XMVECTOR Axis, Dist, MinDist; + + // Compute an axis perpindicular to the edge (points out). + Axis = XMVector3Cross(N1, XMVectorSubtract(A1, A0)); + Dist = XMVector3Dot(Axis, A0); + + // Test points of B against the axis. + MinDist = XMVector3Dot(B0, Axis); + MinDist = XMVectorMin(MinDist, XMVector3Dot(B1, Axis)); + MinDist = XMVectorMin(MinDist, XMVector3Dot(B2, Axis)); + if (XMVector4GreaterOrEqual(MinDist, Dist)) return false; + + // Edge (A1, A2) + Axis = XMVector3Cross(N1, XMVectorSubtract(A2, A1)); + Dist = XMVector3Dot(Axis, A1); + + MinDist = XMVector3Dot(B0, Axis); + MinDist = XMVectorMin(MinDist, XMVector3Dot(B1, Axis)); + MinDist = XMVectorMin(MinDist, XMVector3Dot(B2, Axis)); + if (XMVector4GreaterOrEqual(MinDist, Dist)) return false; + + // Edge (A2, A0) + Axis = XMVector3Cross(N1, XMVectorSubtract(A0, A2)); + Dist = XMVector3Dot(Axis, A2); + + MinDist = XMVector3Dot(B0, Axis); + MinDist = XMVectorMin(MinDist, XMVector3Dot(B1, Axis)); + MinDist = XMVectorMin(MinDist, XMVector3Dot(B2, Axis)); + if (XMVector4GreaterOrEqual(MinDist, Dist)) return false; + + // Edge (B0, B1) + Axis = XMVector3Cross(N2, XMVectorSubtract(B1, B0)); + Dist = XMVector3Dot(Axis, B0); + + MinDist = XMVector3Dot(A0, Axis); + MinDist = XMVectorMin(MinDist, XMVector3Dot(A1, Axis)); + MinDist = XMVectorMin(MinDist, XMVector3Dot(A2, Axis)); + if (XMVector4GreaterOrEqual(MinDist, Dist)) return false; + + // Edge (B1, B2) + Axis = XMVector3Cross(N2, XMVectorSubtract(B2, B1)); + Dist = XMVector3Dot(Axis, B1); + + MinDist = XMVector3Dot(A0, Axis); + MinDist = XMVectorMin(MinDist, XMVector3Dot(A1, Axis)); + MinDist = XMVectorMin(MinDist, XMVector3Dot(A2, Axis)); + if (XMVector4GreaterOrEqual(MinDist, Dist)) return false; + + // Edge (B2,B0) + Axis = XMVector3Cross(N2, XMVectorSubtract(B0, B2)); + Dist = XMVector3Dot(Axis, B2); + + MinDist = XMVector3Dot(A0, Axis); + MinDist = XMVectorMin(MinDist, XMVector3Dot(A1, Axis)); + MinDist = XMVectorMin(MinDist, XMVector3Dot(A2, Axis)); + if (XMVector4GreaterOrEqual(MinDist, Dist)) return false; return true; } - - //----------------------------------------------------------------------------- - // Test if two triangles intersect. // - // The final test of algorithm is based on Shen, Heng, and Tang, "A Fast - // Triangle-Triangle Overlap Test Using Signed Distances", Journal of Graphics - // Tools, vol. 8, no. 1, pp 17-23, 2003 and Guigue and Devillers, "Fast and - // Robust Triangle-Triangle Overlap Test Using Orientation Predicates", Journal - // of Graphics Tools, vol. 8, no. 1, pp 25-32, 2003. + // Find the single vertex of A and B (ie the vertex on the opposite side + // of the plane from the other two) and reorder the edges so we can compute + // the signed edge/edge distances. // - // The final test could be considered an edge-edge separating plane test with - // the 9 possible cases narrowed down to the only two pairs of edges that can - // actaully result in a seperation. - //----------------------------------------------------------------------------- - _Use_decl_annotations_ - inline bool XM_CALLCONV Intersects(FXMVECTOR A0, FXMVECTOR A1, FXMVECTOR A2, GXMVECTOR B0, HXMVECTOR B1, HXMVECTOR B2) noexcept - { - static const XMVECTORU32 SelectY = { { { XM_SELECT_0, XM_SELECT_1, XM_SELECT_0, XM_SELECT_0 } } }; - static const XMVECTORU32 SelectZ = { { { XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0 } } }; - static const XMVECTORU32 Select0111 = { { { XM_SELECT_0, XM_SELECT_1, XM_SELECT_1, XM_SELECT_1 } } }; - static const XMVECTORU32 Select1011 = { { { XM_SELECT_1, XM_SELECT_0, XM_SELECT_1, XM_SELECT_1 } } }; - static const XMVECTORU32 Select1101 = { { { XM_SELECT_1, XM_SELECT_1, XM_SELECT_0, XM_SELECT_1 } } }; + // if ( (V0 >= 0 && V1 < 0 && V2 < 0) || + // (V0 > 0 && V1 <= 0 && V2 <= 0) || + // (V0 <= 0 && V1 > 0 && V2 > 0) || + // (V0 < 0 && V1 >= 0 && V2 >= 0) ) then V0 is singular; + // + // If our singular vertex is not on the positive side of the plane we + // reverse the triangle winding so that the overlap comparisons will compare + // the correct edges with the correct signs. + // + XMVECTOR ADistIsLessEqual = XMVectorOrInt(ADistIsLess, ADistIsZero); + XMVECTOR ADistIsGreaterEqual = XMVectorOrInt(ADistIsGreater, ADistIsZero); - XMVECTOR Zero = XMVectorZero(); + XMVECTOR AA0, AA1, AA2; + bool bPositiveA; - // Compute the normal of triangle A. - XMVECTOR N1 = XMVector3Cross(XMVectorSubtract(A1, A0), XMVectorSubtract(A2, A0)); - - // Assert that the triangle is not degenerate. - assert(!XMVector3Equal(N1, Zero)); - - // Test points of B against the plane of A. - XMVECTOR BDist = XMVector3Dot(N1, XMVectorSubtract(B0, A0)); - BDist = XMVectorSelect(BDist, XMVector3Dot(N1, XMVectorSubtract(B1, A0)), SelectY); - BDist = XMVectorSelect(BDist, XMVector3Dot(N1, XMVectorSubtract(B2, A0)), SelectZ); - - // Ensure robustness with co-planar triangles by zeroing small distances. - uint32_t BDistIsZeroCR; - XMVECTOR BDistIsZero = XMVectorGreaterR(&BDistIsZeroCR, g_RayEpsilon, XMVectorAbs(BDist)); - BDist = XMVectorSelect(BDist, Zero, BDistIsZero); - - uint32_t BDistIsLessCR; - XMVECTOR BDistIsLess = XMVectorGreaterR(&BDistIsLessCR, Zero, BDist); - - uint32_t BDistIsGreaterCR; - XMVECTOR BDistIsGreater = XMVectorGreaterR(&BDistIsGreaterCR, BDist, Zero); - - // If all the points are on the same side we don't intersect. - if (XMComparisonAllTrue(BDistIsLessCR) || XMComparisonAllTrue(BDistIsGreaterCR)) - return false; - - // Compute the normal of triangle B. - XMVECTOR N2 = XMVector3Cross(XMVectorSubtract(B1, B0), XMVectorSubtract(B2, B0)); - - // Assert that the triangle is not degenerate. - assert(!XMVector3Equal(N2, Zero)); - - // Test points of A against the plane of B. - XMVECTOR ADist = XMVector3Dot(N2, XMVectorSubtract(A0, B0)); - ADist = XMVectorSelect(ADist, XMVector3Dot(N2, XMVectorSubtract(A1, B0)), SelectY); - ADist = XMVectorSelect(ADist, XMVector3Dot(N2, XMVectorSubtract(A2, B0)), SelectZ); - - // Ensure robustness with co-planar triangles by zeroing small distances. - uint32_t ADistIsZeroCR; - XMVECTOR ADistIsZero = XMVectorGreaterR(&ADistIsZeroCR, g_RayEpsilon, XMVectorAbs(ADist)); - ADist = XMVectorSelect(ADist, Zero, ADistIsZero); - - uint32_t ADistIsLessCR; - XMVECTOR ADistIsLess = XMVectorGreaterR(&ADistIsLessCR, Zero, ADist); - - uint32_t ADistIsGreaterCR; - XMVECTOR ADistIsGreater = XMVectorGreaterR(&ADistIsGreaterCR, ADist, Zero); - - // If all the points are on the same side we don't intersect. - if (XMComparisonAllTrue(ADistIsLessCR) || XMComparisonAllTrue(ADistIsGreaterCR)) - return false; - - // Special case for co-planar triangles. - if (XMComparisonAllTrue(ADistIsZeroCR) || XMComparisonAllTrue(BDistIsZeroCR)) - { - XMVECTOR Axis, Dist, MinDist; - - // Compute an axis perpindicular to the edge (points out). - Axis = XMVector3Cross(N1, XMVectorSubtract(A1, A0)); - Dist = XMVector3Dot(Axis, A0); - - // Test points of B against the axis. - MinDist = XMVector3Dot(B0, Axis); - MinDist = XMVectorMin(MinDist, XMVector3Dot(B1, Axis)); - MinDist = XMVectorMin(MinDist, XMVector3Dot(B2, Axis)); - if (XMVector4GreaterOrEqual(MinDist, Dist)) - return false; - - // Edge (A1, A2) - Axis = XMVector3Cross(N1, XMVectorSubtract(A2, A1)); - Dist = XMVector3Dot(Axis, A1); - - MinDist = XMVector3Dot(B0, Axis); - MinDist = XMVectorMin(MinDist, XMVector3Dot(B1, Axis)); - MinDist = XMVectorMin(MinDist, XMVector3Dot(B2, Axis)); - if (XMVector4GreaterOrEqual(MinDist, Dist)) - return false; - - // Edge (A2, A0) - Axis = XMVector3Cross(N1, XMVectorSubtract(A0, A2)); - Dist = XMVector3Dot(Axis, A2); - - MinDist = XMVector3Dot(B0, Axis); - MinDist = XMVectorMin(MinDist, XMVector3Dot(B1, Axis)); - MinDist = XMVectorMin(MinDist, XMVector3Dot(B2, Axis)); - if (XMVector4GreaterOrEqual(MinDist, Dist)) - return false; - - // Edge (B0, B1) - Axis = XMVector3Cross(N2, XMVectorSubtract(B1, B0)); - Dist = XMVector3Dot(Axis, B0); - - MinDist = XMVector3Dot(A0, Axis); - MinDist = XMVectorMin(MinDist, XMVector3Dot(A1, Axis)); - MinDist = XMVectorMin(MinDist, XMVector3Dot(A2, Axis)); - if (XMVector4GreaterOrEqual(MinDist, Dist)) - return false; - - // Edge (B1, B2) - Axis = XMVector3Cross(N2, XMVectorSubtract(B2, B1)); - Dist = XMVector3Dot(Axis, B1); - - MinDist = XMVector3Dot(A0, Axis); - MinDist = XMVectorMin(MinDist, XMVector3Dot(A1, Axis)); - MinDist = XMVectorMin(MinDist, XMVector3Dot(A2, Axis)); - if (XMVector4GreaterOrEqual(MinDist, Dist)) - return false; - - // Edge (B2,B0) - Axis = XMVector3Cross(N2, XMVectorSubtract(B0, B2)); - Dist = XMVector3Dot(Axis, B2); - - MinDist = XMVector3Dot(A0, Axis); - MinDist = XMVectorMin(MinDist, XMVector3Dot(A1, Axis)); - MinDist = XMVectorMin(MinDist, XMVector3Dot(A2, Axis)); - if (XMVector4GreaterOrEqual(MinDist, Dist)) - return false; - - return true; - } - - // - // Find the single vertex of A and B (ie the vertex on the opposite side - // of the plane from the other two) and reorder the edges so we can compute - // the signed edge/edge distances. - // - // if ( (V0 >= 0 && V1 < 0 && V2 < 0) || - // (V0 > 0 && V1 <= 0 && V2 <= 0) || - // (V0 <= 0 && V1 > 0 && V2 > 0) || - // (V0 < 0 && V1 >= 0 && V2 >= 0) ) then V0 is singular; - // - // If our singular vertex is not on the positive side of the plane we reverse - // the triangle winding so that the overlap comparisons will compare the - // correct edges with the correct signs. - // - XMVECTOR ADistIsLessEqual = XMVectorOrInt(ADistIsLess, ADistIsZero); - XMVECTOR ADistIsGreaterEqual = XMVectorOrInt(ADistIsGreater, ADistIsZero); - - XMVECTOR AA0, AA1, AA2; - bool bPositiveA; - - if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsGreaterEqual, ADistIsLess, Select0111)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsGreater, ADistIsLessEqual, Select0111))) - { - // A0 is singular, crossing from positive to negative. - AA0 = A0; AA1 = A1; AA2 = A2; - bPositiveA = true; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsLessEqual, ADistIsGreater, Select0111)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsLess, ADistIsGreaterEqual, Select0111))) - { - // A0 is singular, crossing from negative to positive. - AA0 = A0; AA1 = A2; AA2 = A1; - bPositiveA = false; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsGreaterEqual, ADistIsLess, Select1011)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsGreater, ADistIsLessEqual, Select1011))) - { - // A1 is singular, crossing from positive to negative. - AA0 = A1; AA1 = A2; AA2 = A0; - bPositiveA = true; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsLessEqual, ADistIsGreater, Select1011)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsLess, ADistIsGreaterEqual, Select1011))) - { - // A1 is singular, crossing from negative to positive. - AA0 = A1; AA1 = A0; AA2 = A2; - bPositiveA = false; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsGreaterEqual, ADistIsLess, Select1101)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsGreater, ADistIsLessEqual, Select1101))) - { - // A2 is singular, crossing from positive to negative. - AA0 = A2; AA1 = A0; AA2 = A1; - bPositiveA = true; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsLessEqual, ADistIsGreater, Select1101)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(ADistIsLess, ADistIsGreaterEqual, Select1101))) - { - // A2 is singular, crossing from negative to positive. - AA0 = A2; AA1 = A1; AA2 = A0; - bPositiveA = false; - } - else - { - assert(false); - return false; - } - - XMVECTOR BDistIsLessEqual = XMVectorOrInt(BDistIsLess, BDistIsZero); - XMVECTOR BDistIsGreaterEqual = XMVectorOrInt(BDistIsGreater, BDistIsZero); - - XMVECTOR BB0, BB1, BB2; - bool bPositiveB; - - if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsGreaterEqual, BDistIsLess, Select0111)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsGreater, BDistIsLessEqual, Select0111))) - { - // B0 is singular, crossing from positive to negative. - BB0 = B0; BB1 = B1; BB2 = B2; - bPositiveB = true; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsLessEqual, BDistIsGreater, Select0111)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsLess, BDistIsGreaterEqual, Select0111))) - { - // B0 is singular, crossing from negative to positive. - BB0 = B0; BB1 = B2; BB2 = B1; - bPositiveB = false; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsGreaterEqual, BDistIsLess, Select1011)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsGreater, BDistIsLessEqual, Select1011))) - { - // B1 is singular, crossing from positive to negative. - BB0 = B1; BB1 = B2; BB2 = B0; - bPositiveB = true; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsLessEqual, BDistIsGreater, Select1011)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsLess, BDistIsGreaterEqual, Select1011))) - { - // B1 is singular, crossing from negative to positive. - BB0 = B1; BB1 = B0; BB2 = B2; - bPositiveB = false; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsGreaterEqual, BDistIsLess, Select1101)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsGreater, BDistIsLessEqual, Select1101))) - { - // B2 is singular, crossing from positive to negative. - BB0 = B2; BB1 = B0; BB2 = B1; - bPositiveB = true; - } - else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsLessEqual, BDistIsGreater, Select1101)) || - DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect(BDistIsLess, BDistIsGreaterEqual, Select1101))) - { - // B2 is singular, crossing from negative to positive. - BB0 = B2; BB1 = B1; BB2 = B0; - bPositiveB = false; - } - else - { - assert(false); - return false; - } - - XMVECTOR Delta0, Delta1; - - // Reverse the direction of the test depending on whether the singular vertices are - // the same sign or different signs. - if (bPositiveA ^ bPositiveB) - { - Delta0 = XMVectorSubtract(BB0, AA0); - Delta1 = XMVectorSubtract(AA0, BB0); - } - else - { - Delta0 = XMVectorSubtract(AA0, BB0); - Delta1 = XMVectorSubtract(BB0, AA0); - } - - // Check if the triangles overlap on the line of intersection between the - // planes of the two triangles by finding the signed line distances. - XMVECTOR Dist0 = XMVector3Dot(Delta0, XMVector3Cross(XMVectorSubtract(BB2, BB0), XMVectorSubtract(AA2, AA0))); - if (XMVector4Greater(Dist0, Zero)) - return false; - - XMVECTOR Dist1 = XMVector3Dot(Delta1, XMVector3Cross(XMVectorSubtract(BB1, BB0), XMVectorSubtract(AA1, AA0))); - if (XMVector4Greater(Dist1, Zero)) - return false; - - return true; + if (DirectX::MathInternal::XMVector3AllTrue( + XMVectorSelect(ADistIsGreaterEqual, ADistIsLess, Select0111)) || + DirectX::MathInternal::XMVector3AllTrue( + XMVectorSelect(ADistIsGreater, ADistIsLessEqual, Select0111))) { + // A0 is singular, crossing from positive to negative. + AA0 = A0; + AA1 = A1; + AA2 = A2; + bPositiveA = true; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsLessEqual, ADistIsGreater, Select0111)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsLess, ADistIsGreaterEqual, Select0111))) { + // A0 is singular, crossing from negative to positive. + AA0 = A0; + AA1 = A2; + AA2 = A1; + bPositiveA = false; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsGreaterEqual, ADistIsLess, Select1011)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsGreater, ADistIsLessEqual, Select1011))) { + // A1 is singular, crossing from positive to negative. + AA0 = A1; + AA1 = A2; + AA2 = A0; + bPositiveA = true; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsLessEqual, ADistIsGreater, Select1011)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsLess, ADistIsGreaterEqual, Select1011))) { + // A1 is singular, crossing from negative to positive. + AA0 = A1; + AA1 = A0; + AA2 = A2; + bPositiveA = false; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsGreaterEqual, ADistIsLess, Select1101)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsGreater, ADistIsLessEqual, Select1101))) { + // A2 is singular, crossing from positive to negative. + AA0 = A2; + AA1 = A0; + AA2 = A1; + bPositiveA = true; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsLessEqual, ADistIsGreater, Select1101)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + ADistIsLess, ADistIsGreaterEqual, Select1101))) { + // A2 is singular, crossing from negative to positive. + AA0 = A2; + AA1 = A1; + AA2 = A0; + bPositiveA = false; + } else { + assert(false); + return false; } + XMVECTOR BDistIsLessEqual = XMVectorOrInt(BDistIsLess, BDistIsZero); + XMVECTOR BDistIsGreaterEqual = XMVectorOrInt(BDistIsGreater, BDistIsZero); - //----------------------------------------------------------------------------- - // Ray-triangle test - //----------------------------------------------------------------------------- - _Use_decl_annotations_ - inline PlaneIntersectionType XM_CALLCONV Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2, GXMVECTOR Plane) noexcept - { - XMVECTOR One = XMVectorSplatOne(); + XMVECTOR BB0, BB1, BB2; + bool bPositiveB; - assert(DirectX::MathInternal::XMPlaneIsUnit(Plane)); - - // Set w of the points to one so we can dot4 with a plane. - XMVECTOR TV0 = XMVectorInsert<0, 0, 0, 0, 1>(V0, One); - XMVECTOR TV1 = XMVectorInsert<0, 0, 0, 0, 1>(V1, One); - XMVECTOR TV2 = XMVectorInsert<0, 0, 0, 0, 1>(V2, One); - - XMVECTOR Outside, Inside; - DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane, Outside, Inside); - - // If the triangle is outside any plane it is outside. - if (XMVector4EqualInt(Outside, XMVectorTrueInt())) - return FRONT; - - // If the triangle is inside all planes it is inside. - if (XMVector4EqualInt(Inside, XMVectorTrueInt())) - return BACK; - - // The triangle is not inside all planes or outside a plane it intersects. - return INTERSECTING; + if (DirectX::MathInternal::XMVector3AllTrue( + XMVectorSelect(BDistIsGreaterEqual, BDistIsLess, Select0111)) || + DirectX::MathInternal::XMVector3AllTrue( + XMVectorSelect(BDistIsGreater, BDistIsLessEqual, Select0111))) { + // B0 is singular, crossing from positive to negative. + BB0 = B0; + BB1 = B1; + BB2 = B2; + bPositiveB = true; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsLessEqual, BDistIsGreater, Select0111)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsLess, BDistIsGreaterEqual, Select0111))) { + // B0 is singular, crossing from negative to positive. + BB0 = B0; + BB1 = B2; + BB2 = B1; + bPositiveB = false; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsGreaterEqual, BDistIsLess, Select1011)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsGreater, BDistIsLessEqual, Select1011))) { + // B1 is singular, crossing from positive to negative. + BB0 = B1; + BB1 = B2; + BB2 = B0; + bPositiveB = true; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsLessEqual, BDistIsGreater, Select1011)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsLess, BDistIsGreaterEqual, Select1011))) { + // B1 is singular, crossing from negative to positive. + BB0 = B1; + BB1 = B0; + BB2 = B2; + bPositiveB = false; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsGreaterEqual, BDistIsLess, Select1101)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsGreater, BDistIsLessEqual, Select1101))) { + // B2 is singular, crossing from positive to negative. + BB0 = B2; + BB1 = B0; + BB2 = B1; + bPositiveB = true; + } else if (DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsLessEqual, BDistIsGreater, Select1101)) || + DirectX::MathInternal::XMVector3AllTrue(XMVectorSelect( + BDistIsLess, BDistIsGreaterEqual, Select1101))) { + // B2 is singular, crossing from negative to positive. + BB0 = B2; + BB1 = B1; + BB2 = B0; + bPositiveB = false; + } else { + assert(false); + return false; } + XMVECTOR Delta0, Delta1; - //----------------------------------------------------------------------------- - // Test a triangle vs 6 planes (typically forming a frustum). - //----------------------------------------------------------------------------- - _Use_decl_annotations_ - inline ContainmentType XM_CALLCONV ContainedBy( - FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2, - GXMVECTOR Plane0, - HXMVECTOR Plane1, HXMVECTOR Plane2, - CXMVECTOR Plane3, CXMVECTOR Plane4, CXMVECTOR Plane5) noexcept - { - XMVECTOR One = XMVectorSplatOne(); - - // Set w of the points to one so we can dot4 with a plane. - XMVECTOR TV0 = XMVectorInsert<0, 0, 0, 0, 1>(V0, One); - XMVECTOR TV1 = XMVectorInsert<0, 0, 0, 0, 1>(V1, One); - XMVECTOR TV2 = XMVectorInsert<0, 0, 0, 0, 1>(V2, One); - - XMVECTOR Outside, Inside; - - // Test against each plane. - DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane0, Outside, Inside); - - XMVECTOR AnyOutside = Outside; - XMVECTOR AllInside = Inside; - - DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane1, Outside, Inside); - AnyOutside = XMVectorOrInt(AnyOutside, Outside); - AllInside = XMVectorAndInt(AllInside, Inside); - - DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane2, Outside, Inside); - AnyOutside = XMVectorOrInt(AnyOutside, Outside); - AllInside = XMVectorAndInt(AllInside, Inside); - - DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane3, Outside, Inside); - AnyOutside = XMVectorOrInt(AnyOutside, Outside); - AllInside = XMVectorAndInt(AllInside, Inside); - - DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane4, Outside, Inside); - AnyOutside = XMVectorOrInt(AnyOutside, Outside); - AllInside = XMVectorAndInt(AllInside, Inside); - - DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane5, Outside, Inside); - AnyOutside = XMVectorOrInt(AnyOutside, Outside); - AllInside = XMVectorAndInt(AllInside, Inside); - - // If the triangle is outside any plane it is outside. - if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) - return DISJOINT; - - // If the triangle is inside all planes it is inside. - if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) - return CONTAINS; - - // The triangle is not inside all planes or outside a plane, it may intersect. - return INTERSECTS; + // Reverse the direction of the test depending on whether the singular + // vertices are the same sign or different signs. + if (bPositiveA ^ bPositiveB) { + Delta0 = XMVectorSubtract(BB0, AA0); + Delta1 = XMVectorSubtract(AA0, BB0); + } else { + Delta0 = XMVectorSubtract(AA0, BB0); + Delta1 = XMVectorSubtract(BB0, AA0); } -} // namespace TriangleTests + // Check if the triangles overlap on the line of intersection between the + // planes of the two triangles by finding the signed line distances. + XMVECTOR Dist0 = XMVector3Dot( + Delta0, + XMVector3Cross(XMVectorSubtract(BB2, BB0), XMVectorSubtract(AA2, AA0))); + if (XMVector4Greater(Dist0, Zero)) return false; + XMVECTOR Dist1 = XMVector3Dot( + Delta1, + XMVector3Cross(XMVectorSubtract(BB1, BB0), XMVectorSubtract(AA1, AA0))); + if (XMVector4Greater(Dist1, Zero)) return false; + + return true; +} + +//----------------------------------------------------------------------------- +// Ray-triangle test +//----------------------------------------------------------------------------- +_Use_decl_annotations_ inline PlaneIntersectionType XM_CALLCONV +Intersects(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2, GXMVECTOR Plane) noexcept { + XMVECTOR One = XMVectorSplatOne(); + + assert(DirectX::MathInternal::XMPlaneIsUnit(Plane)); + + // Set w of the points to one so we can dot4 with a plane. + XMVECTOR TV0 = XMVectorInsert<0, 0, 0, 0, 1>(V0, One); + XMVECTOR TV1 = XMVectorInsert<0, 0, 0, 0, 1>(V1, One); + XMVECTOR TV2 = XMVectorInsert<0, 0, 0, 0, 1>(V2, One); + + XMVECTOR Outside, Inside; + DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane, + Outside, Inside); + + // If the triangle is outside any plane it is outside. + if (XMVector4EqualInt(Outside, XMVectorTrueInt())) return FRONT; + + // If the triangle is inside all planes it is inside. + if (XMVector4EqualInt(Inside, XMVectorTrueInt())) return BACK; + + // The triangle is not inside all planes or outside a plane it intersects. + return INTERSECTING; +} + +//----------------------------------------------------------------------------- +// Test a triangle vs 6 planes (typically forming a frustum). +//----------------------------------------------------------------------------- +_Use_decl_annotations_ inline ContainmentType XM_CALLCONV +ContainedBy(FXMVECTOR V0, FXMVECTOR V1, FXMVECTOR V2, GXMVECTOR Plane0, + HXMVECTOR Plane1, HXMVECTOR Plane2, CXMVECTOR Plane3, + CXMVECTOR Plane4, CXMVECTOR Plane5) noexcept { + XMVECTOR One = XMVectorSplatOne(); + + // Set w of the points to one so we can dot4 with a plane. + XMVECTOR TV0 = XMVectorInsert<0, 0, 0, 0, 1>(V0, One); + XMVECTOR TV1 = XMVectorInsert<0, 0, 0, 0, 1>(V1, One); + XMVECTOR TV2 = XMVectorInsert<0, 0, 0, 0, 1>(V2, One); + + XMVECTOR Outside, Inside; + + // Test against each plane. + DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane0, + Outside, Inside); + + XMVECTOR AnyOutside = Outside; + XMVECTOR AllInside = Inside; + + DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane1, + Outside, Inside); + AnyOutside = XMVectorOrInt(AnyOutside, Outside); + AllInside = XMVectorAndInt(AllInside, Inside); + + DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane2, + Outside, Inside); + AnyOutside = XMVectorOrInt(AnyOutside, Outside); + AllInside = XMVectorAndInt(AllInside, Inside); + + DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane3, + Outside, Inside); + AnyOutside = XMVectorOrInt(AnyOutside, Outside); + AllInside = XMVectorAndInt(AllInside, Inside); + + DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane4, + Outside, Inside); + AnyOutside = XMVectorOrInt(AnyOutside, Outside); + AllInside = XMVectorAndInt(AllInside, Inside); + + DirectX::MathInternal::FastIntersectTrianglePlane(TV0, TV1, TV2, Plane5, + Outside, Inside); + AnyOutside = XMVectorOrInt(AnyOutside, Outside); + AllInside = XMVectorAndInt(AllInside, Inside); + + // If the triangle is outside any plane it is outside. + if (XMVector4EqualInt(AnyOutside, XMVectorTrueInt())) return DISJOINT; + + // If the triangle is inside all planes it is inside. + if (XMVector4EqualInt(AllInside, XMVectorTrueInt())) return CONTAINS; + + // The triangle is not inside all planes or outside a plane, it may + // intersect. + return INTERSECTS; +} + +} // namespace TriangleTests diff --git a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathConvert.inl b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathConvert.inl index aaf9ef119..b68857896 100644 --- a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathConvert.inl +++ b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathConvert.inl @@ -19,33 +19,27 @@ #ifdef _MSC_VER #pragma warning(push) -#pragma warning(disable:4701) +#pragma warning(disable : 4701) // C4701: false positives #endif -inline XMVECTOR XM_CALLCONV XMConvertVectorIntToFloat -( - FXMVECTOR VInt, - uint32_t DivExponent -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMConvertVectorIntToFloat(FXMVECTOR VInt, uint32_t DivExponent) noexcept { assert(DivExponent < 32); #if defined(_XM_NO_INTRINSICS_) float fScale = 1.0f / static_cast(1U << DivExponent); uint32_t ElementIndex = 0; XMVECTOR Result; - do - { + do { auto iTemp = static_cast(VInt.vector4_u32[ElementIndex]); - Result.vector4_f32[ElementIndex] = static_cast(iTemp)* fScale; - } - while (++ElementIndex < 4); + Result.vector4_f32[ElementIndex] = static_cast(iTemp) * fScale; + } while (++ElementIndex < 4); return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) float fScale = 1.0f / static_cast(1U << DivExponent); float32x4_t vResult = vcvtq_f32_s32(vreinterpretq_s32_f32(VInt)); return vmulq_n_f32(vResult, fScale); -#else // _XM_SSE_INTRINSICS_ +#else // _XM_SSE_INTRINSICS_ // Convert to floats XMVECTOR vResult = _mm_cvtepi32_ps(_mm_castps_si128(VInt)); // Convert DivExponent into 1.0f/(1<(1U << MulExponent); uint32_t ElementIndex = 0; XMVECTOR Result; - do - { + do { int32_t iResult; float fTemp = VFloat.vector4_f32[ElementIndex] * fScale; - if (fTemp <= -(65536.0f * 32768.0f)) - { + if (fTemp <= -(65536.0f * 32768.0f)) { iResult = (-0x7FFFFFFF) - 1; - } - else if (fTemp > (65536.0f * 32768.0f) - 128.0f) - { + } else if (fTemp > (65536.0f * 32768.0f) - 128.0f) { iResult = 0x7FFFFFFF; - } - else - { + } else { iResult = static_cast(fTemp); } Result.vector4_u32[ElementIndex] = static_cast(iResult); - } - while (++ElementIndex < 4); + } while (++ElementIndex < 4); return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) - float32x4_t vResult = vmulq_n_f32(VFloat, static_cast(1U << MulExponent)); + float32x4_t vResult = + vmulq_n_f32(VFloat, static_cast(1U << MulExponent)); // In case of positive overflow, detect it uint32x4_t vOverflow = vcgtq_f32(vResult, g_XMMaxInt); // Float to int conversion @@ -102,7 +86,7 @@ inline XMVECTOR XM_CALLCONV XMConvertVectorFloatToInt vOverflow = vbicq_u32(vreinterpretq_u32_s32(vResulti), vOverflow); vOverflow = vorrq_u32(vOverflow, vreinterpretq_u32_f32(vResult)); return vreinterpretq_f32_u32(vOverflow); -#else // _XM_SSE_INTRINSICS_ +#else // _XM_SSE_INTRINSICS_ XMVECTOR vResult = _mm_set_ps1(static_cast(1U << MulExponent)); vResult = _mm_mul_ps(vResult, VFloat); // In case of positive overflow, detect it @@ -119,28 +103,23 @@ inline XMVECTOR XM_CALLCONV XMConvertVectorFloatToInt //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMConvertVectorUIntToFloat -( - FXMVECTOR VUInt, - uint32_t DivExponent -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMConvertVectorUIntToFloat(FXMVECTOR VUInt, uint32_t DivExponent) noexcept { assert(DivExponent < 32); #if defined(_XM_NO_INTRINSICS_) float fScale = 1.0f / static_cast(1U << DivExponent); uint32_t ElementIndex = 0; XMVECTOR Result; - do - { - Result.vector4_f32[ElementIndex] = static_cast(VUInt.vector4_u32[ElementIndex])* fScale; - } - while (++ElementIndex < 4); + do { + Result.vector4_f32[ElementIndex] = + static_cast(VUInt.vector4_u32[ElementIndex]) * fScale; + } while (++ElementIndex < 4); return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) float fScale = 1.0f / static_cast(1U << DivExponent); float32x4_t vResult = vcvtq_f32_u32(vreinterpretq_u32_f32(VUInt)); return vmulq_n_f32(vResult, fScale); -#else // _XM_SSE_INTRINSICS_ +#else // _XM_SSE_INTRINSICS_ // For the values that are higher than 0x7FFFFFFF, a fixup is needed // Determine which ones need the fix. XMVECTOR vMask = _mm_and_ps(VUInt, g_XMNegativeZero); @@ -164,40 +143,30 @@ inline XMVECTOR XM_CALLCONV XMConvertVectorUIntToFloat //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMConvertVectorFloatToUInt -( - FXMVECTOR VFloat, - uint32_t MulExponent -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMConvertVectorFloatToUInt(FXMVECTOR VFloat, uint32_t MulExponent) noexcept { assert(MulExponent < 32); #if defined(_XM_NO_INTRINSICS_) // Get the scalar factor. auto fScale = static_cast(1U << MulExponent); uint32_t ElementIndex = 0; XMVECTOR Result; - do - { + do { uint32_t uResult; float fTemp = VFloat.vector4_f32[ElementIndex] * fScale; - if (fTemp <= 0.0f) - { + if (fTemp <= 0.0f) { uResult = 0; - } - else if (fTemp >= (65536.0f * 65536.0f)) - { + } else if (fTemp >= (65536.0f * 65536.0f)) { uResult = 0xFFFFFFFFU; - } - else - { + } else { uResult = static_cast(fTemp); } Result.vector4_u32[ElementIndex] = uResult; - } - while (++ElementIndex < 4); + } while (++ElementIndex < 4); return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) - float32x4_t vResult = vmulq_n_f32(VFloat, static_cast(1U << MulExponent)); + float32x4_t vResult = + vmulq_n_f32(VFloat, static_cast(1U << MulExponent)); // In case of overflow, detect it uint32x4_t vOverflow = vcgtq_f32(vResult, g_XMMaxUInt); // Float to int conversion @@ -206,7 +175,7 @@ inline XMVECTOR XM_CALLCONV XMConvertVectorFloatToUInt vResult = vreinterpretq_f32_u32(vbicq_u32(vResulti, vOverflow)); vOverflow = vorrq_u32(vOverflow, vreinterpretq_u32_f32(vResult)); return vreinterpretq_f32_u32(vOverflow); -#else // _XM_SSE_INTRINSICS_ +#else // _XM_SSE_INTRINSICS_ XMVECTOR vResult = _mm_set_ps1(static_cast(1U << MulExponent)); vResult = _mm_mul_ps(vResult, VFloat); // Clamp to >=0 @@ -241,9 +210,8 @@ inline XMVECTOR XM_CALLCONV XMConvertVectorFloatToUInt ****************************************************************************/ //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadInt(const uint32_t* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadInt(const uint32_t* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -261,9 +229,8 @@ inline XMVECTOR XM_CALLCONV XMLoadInt(const uint32_t* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat(const float* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat(const float* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -281,9 +248,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat(const float* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadInt2(const uint32_t* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadInt2(const uint32_t* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -302,9 +268,8 @@ inline XMVECTOR XM_CALLCONV XMLoadInt2(const uint32_t* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadInt2A(const uint32_t* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadInt2A(const uint32_t* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -315,7 +280,8 @@ inline XMVECTOR XM_CALLCONV XMLoadInt2A(const uint32_t* pSource) noexcept V.vector4_u32[3] = 0; return V; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) uint32x2_t x = vld1_u32_ex(pSource, 64); #else uint32x2_t x = vld1_u32(pSource); @@ -328,9 +294,8 @@ inline XMVECTOR XM_CALLCONV XMLoadInt2A(const uint32_t* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat2(const XMFLOAT2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat2(const XMFLOAT2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -349,9 +314,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat2(const XMFLOAT2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat2A(const XMFLOAT2A* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat2A(const XMFLOAT2A* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -362,7 +326,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat2A(const XMFLOAT2A* pSource) noexcept V.vector4_f32[3] = 0.f; return V; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) float32x2_t x = vld1_f32_ex(reinterpret_cast(pSource), 64); #else float32x2_t x = vld1_f32(reinterpret_cast(pSource)); @@ -375,9 +340,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat2A(const XMFLOAT2A* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadSInt2(const XMINT2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadSInt2(const XMINT2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -392,15 +356,15 @@ inline XMVECTOR XM_CALLCONV XMLoadSInt2(const XMINT2* pSource) noexcept float32x2_t zero = vdup_n_f32(0); return vcombine_f32(v, zero); #elif defined(_XM_SSE_INTRINSICS_) - __m128 V = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 V = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); return _mm_cvtepi32_ps(_mm_castps_si128(V)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUInt2(const XMUINT2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUInt2(const XMUINT2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -415,7 +379,8 @@ inline XMVECTOR XM_CALLCONV XMLoadUInt2(const XMUINT2* pSource) noexcept float32x2_t zero = vdup_n_f32(0); return vcombine_f32(v, zero); #elif defined(_XM_SSE_INTRINSICS_) - __m128 V = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 V = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); // For the values that are higher than 0x7FFFFFFF, a fixup is needed // Determine which ones need the fix. XMVECTOR vMask = _mm_and_ps(V, g_XMNegativeZero); @@ -433,9 +398,8 @@ inline XMVECTOR XM_CALLCONV XMLoadUInt2(const XMUINT2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadInt3(const uint32_t* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadInt3(const uint32_t* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -450,20 +414,21 @@ inline XMVECTOR XM_CALLCONV XMLoadInt3(const uint32_t* pSource) noexcept uint32x2_t y = vld1_lane_u32(pSource + 2, zero, 0); return vreinterpretq_f32_u32(vcombine_u32(x, y)); #elif defined(_XM_SSE4_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(reinterpret_cast(pSource + 2)); return _mm_insert_ps(xy, z, 0x20); #elif defined(_XM_SSE_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(reinterpret_cast(pSource + 2)); return _mm_movelh_ps(xy, z); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadInt3A(const uint32_t* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadInt3A(const uint32_t* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -475,27 +440,29 @@ inline XMVECTOR XM_CALLCONV XMLoadInt3A(const uint32_t* pSource) noexcept return V; #elif defined(_XM_ARM_NEON_INTRINSICS_) // Reads an extra integer which is zero'd -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) uint32x4_t V = vld1q_u32_ex(pSource, 128); #else uint32x4_t V = vld1q_u32(pSource); #endif return vreinterpretq_f32_u32(vsetq_lane_u32(0, V, 3)); #elif defined(_XM_SSE4_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(reinterpret_cast(pSource + 2)); return _mm_insert_ps(xy, z, 0x20); #elif defined(_XM_SSE_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(reinterpret_cast(pSource + 2)); return _mm_movelh_ps(xy, z); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat3(const XMFLOAT3* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat3(const XMFLOAT3* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -507,23 +474,25 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3(const XMFLOAT3* pSource) noexcept #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t x = vld1_f32(reinterpret_cast(pSource)); float32x2_t zero = vdup_n_f32(0); - float32x2_t y = vld1_lane_f32(reinterpret_cast(pSource) + 2, zero, 0); + float32x2_t y = + vld1_lane_f32(reinterpret_cast(pSource) + 2, zero, 0); return vcombine_f32(x, y); #elif defined(_XM_SSE4_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(&pSource->z); return _mm_insert_ps(xy, z, 0x20); #elif defined(_XM_SSE_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(&pSource->z); return _mm_movelh_ps(xy, z); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat3A(const XMFLOAT3A* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat3A(const XMFLOAT3A* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -535,7 +504,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3A(const XMFLOAT3A* pSource) noexcept return V; #elif defined(_XM_ARM_NEON_INTRINSICS_) // Reads an extra float which is zero'd -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) float32x4_t V = vld1q_f32_ex(reinterpret_cast(pSource), 128); #else float32x4_t V = vld1q_f32(reinterpret_cast(pSource)); @@ -549,9 +519,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3A(const XMFLOAT3A* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadSInt3(const XMINT3* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadSInt3(const XMINT3* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -565,11 +534,13 @@ inline XMVECTOR XM_CALLCONV XMLoadSInt3(const XMINT3* pSource) noexcept #elif defined(_XM_ARM_NEON_INTRINSICS_) int32x2_t x = vld1_s32(reinterpret_cast(pSource)); int32x2_t zero = vdup_n_s32(0); - int32x2_t y = vld1_lane_s32(reinterpret_cast(pSource) + 2, zero, 0); + int32x2_t y = + vld1_lane_s32(reinterpret_cast(pSource) + 2, zero, 0); int32x4_t v = vcombine_s32(x, y); return vcvtq_f32_s32(v); #elif defined(_XM_SSE_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(reinterpret_cast(&pSource->z)); __m128 V = _mm_movelh_ps(xy, z); return _mm_cvtepi32_ps(_mm_castps_si128(V)); @@ -577,9 +548,8 @@ inline XMVECTOR XM_CALLCONV XMLoadSInt3(const XMINT3* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUInt3(const XMUINT3* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUInt3(const XMUINT3* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -591,11 +561,13 @@ inline XMVECTOR XM_CALLCONV XMLoadUInt3(const XMUINT3* pSource) noexcept #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t x = vld1_u32(reinterpret_cast(pSource)); uint32x2_t zero = vdup_n_u32(0); - uint32x2_t y = vld1_lane_u32(reinterpret_cast(pSource) + 2, zero, 0); + uint32x2_t y = + vld1_lane_u32(reinterpret_cast(pSource) + 2, zero, 0); uint32x4_t v = vcombine_u32(x, y); return vcvtq_f32_u32(v); #elif defined(_XM_SSE_INTRINSICS_) - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); + __m128 xy = + _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pSource))); __m128 z = _mm_load_ss(reinterpret_cast(&pSource->z)); __m128 V = _mm_movelh_ps(xy, z); // For the values that are higher than 0x7FFFFFFF, a fixup is needed @@ -615,9 +587,8 @@ inline XMVECTOR XM_CALLCONV XMLoadUInt3(const XMUINT3* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadInt4(const uint32_t* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadInt4(const uint32_t* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -636,9 +607,8 @@ inline XMVECTOR XM_CALLCONV XMLoadInt4(const uint32_t* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadInt4A(const uint32_t* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadInt4A(const uint32_t* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -649,7 +619,8 @@ inline XMVECTOR XM_CALLCONV XMLoadInt4A(const uint32_t* pSource) noexcept V.vector4_u32[3] = pSource[3]; return V; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) return vld1q_u32_ex(pSource, 128); #else return vreinterpretq_f32_u32(vld1q_u32(pSource)); @@ -661,9 +632,8 @@ inline XMVECTOR XM_CALLCONV XMLoadInt4A(const uint32_t* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat4(const XMFLOAT4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat4(const XMFLOAT4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -680,9 +650,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat4(const XMFLOAT4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat4A(const XMFLOAT4A* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat4A(const XMFLOAT4A* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -693,7 +662,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat4A(const XMFLOAT4A* pSource) noexcept V.vector4_f32[3] = pSource->w; return V; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) return vld1q_f32_ex(reinterpret_cast(pSource), 128); #else return vld1q_f32(reinterpret_cast(pSource)); @@ -704,9 +674,8 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat4A(const XMFLOAT4A* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadSInt4(const XMINT4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadSInt4(const XMINT4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -727,9 +696,8 @@ inline XMVECTOR XM_CALLCONV XMLoadSInt4(const XMINT4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUInt4(const XMUINT4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUInt4(const XMUINT4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -760,9 +728,8 @@ inline XMVECTOR XM_CALLCONV XMLoadUInt4(const XMUINT4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMLoadFloat3x3(const XMFLOAT3X3* pSource) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMLoadFloat3x3(const XMFLOAT3X3* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -790,12 +757,15 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat3x3(const XMFLOAT3X3* pSource) noexcept #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t v0 = vld1q_f32(&pSource->m[0][0]); float32x4_t v1 = vld1q_f32(&pSource->m[1][1]); - float32x2_t v2 = vcreate_f32(static_cast(*reinterpret_cast(&pSource->m[2][2]))); + float32x2_t v2 = vcreate_f32(static_cast( + *reinterpret_cast(&pSource->m[2][2]))); float32x4_t T = vextq_f32(v0, v1, 3); XMMATRIX M; - M.r[0] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(v0), g_XMMask3)); - M.r[1] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T), g_XMMask3)); + M.r[0] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(v0), g_XMMask3)); + M.r[1] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T), g_XMMask3)); M.r[2] = vcombine_f32(vget_high_f32(v1), v2); M.r[3] = g_XMIdentityR3; return M; @@ -822,9 +792,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat3x3(const XMFLOAT3X3* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMLoadFloat4x3(const XMFLOAT4X3* pSource) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMLoadFloat4x3(const XMFLOAT4X3* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -860,9 +829,12 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x3(const XMFLOAT4X3* pSource) noexcept float32x4_t T3 = vextq_f32(v2, v2, 1); XMMATRIX M; - M.r[0] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(v0), g_XMMask3)); - M.r[1] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); - M.r[2] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); + M.r[0] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(v0), g_XMMask3)); + M.r[1] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); + M.r[2] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); M.r[3] = vsetq_lane_f32(1.f, T3, 3); return M; #elif defined(_XM_SSE_INTRINSICS_) @@ -890,18 +862,14 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x3(const XMFLOAT4X3* pSource) noexcept __m128i vTemp4i = _mm_srli_si128(_mm_castps_si128(vTemp4), 32 / 8); // vTemp4i = x4,y4,z4,1.0f vTemp4i = _mm_or_si128(vTemp4i, g_XMIdentityR3); - XMMATRIX M(vTemp1, - vTemp2, - vTemp3, - _mm_castsi128_ps(vTemp4i)); + XMMATRIX M(vTemp1, vTemp2, vTemp3, _mm_castsi128_ps(vTemp4i)); return M; #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMLoadFloat4x3A(const XMFLOAT4X3A* pSource) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMLoadFloat4x3A(const XMFLOAT4X3A* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -929,7 +897,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x3A(const XMFLOAT4X3A* pSource) noexcept return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) float32x4_t v0 = vld1q_f32_ex(&pSource->m[0][0], 128); float32x4_t v1 = vld1q_f32_ex(&pSource->m[1][1], 128); float32x4_t v2 = vld1q_f32_ex(&pSource->m[2][2], 128); @@ -944,9 +913,12 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x3A(const XMFLOAT4X3A* pSource) noexcept float32x4_t T3 = vextq_f32(v2, v2, 1); XMMATRIX M; - M.r[0] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(v0), g_XMMask3)); - M.r[1] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); - M.r[2] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); + M.r[0] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(v0), g_XMMask3)); + M.r[1] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); + M.r[2] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); M.r[3] = vsetq_lane_f32(1.f, T3, 3); return M; #elif defined(_XM_SSE_INTRINSICS_) @@ -974,18 +946,14 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x3A(const XMFLOAT4X3A* pSource) noexcept __m128i vTemp4i = _mm_srli_si128(_mm_castps_si128(vTemp4), 32 / 8); // vTemp4i = x4,y4,z4,1.0f vTemp4i = _mm_or_si128(vTemp4i, g_XMIdentityR3); - XMMATRIX M(vTemp1, - vTemp2, - vTemp3, - _mm_castsi128_ps(vTemp4i)); + XMMATRIX M(vTemp1, vTemp2, vTemp3, _mm_castsi128_ps(vTemp4i)); return M; #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMLoadFloat3x4(const XMFLOAT3X4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMLoadFloat3x4(const XMFLOAT3X4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -1026,9 +994,12 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat3x4(const XMFLOAT3X4* pSource) noexcept float32x4_t T3 = vcombine_f32(vTemp0.val[3], rh); XMMATRIX M = {}; - M.r[0] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T0), g_XMMask3)); - M.r[1] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); - M.r[2] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); + M.r[0] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T0), g_XMMask3)); + M.r[1] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); + M.r[2] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); M.r[3] = vsetq_lane_f32(1.f, T3, 3); return M; #elif defined(_XM_SSE_INTRINSICS_) @@ -1061,9 +1032,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat3x4(const XMFLOAT3X4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMLoadFloat3x4A(const XMFLOAT3X4A* pSource) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMLoadFloat3x4A(const XMFLOAT3X4A* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1091,7 +1061,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat3x4A(const XMFLOAT3X4A* pSource) noexcept return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) float32x2x4_t vTemp0 = vld4_f32_ex(&pSource->_11, 128); float32x4_t vTemp1 = vld1q_f32_ex(&pSource->_31, 128); #else @@ -1110,9 +1081,12 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat3x4A(const XMFLOAT3X4A* pSource) noexcept float32x4_t T3 = vcombine_f32(vTemp0.val[3], rh); XMMATRIX M = {}; - M.r[0] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T0), g_XMMask3)); - M.r[1] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); - M.r[2] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); + M.r[0] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T0), g_XMMask3)); + M.r[1] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T1), g_XMMask3)); + M.r[2] = + vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(T2), g_XMMask3)); M.r[3] = vsetq_lane_f32(1.f, T3, 3); return M; #elif defined(_XM_SSE_INTRINSICS_) @@ -1145,9 +1119,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat3x4A(const XMFLOAT3X4A* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMLoadFloat4x4(const XMFLOAT4X4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMLoadFloat4x4(const XMFLOAT4X4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -1191,9 +1164,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x4(const XMFLOAT4X4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMLoadFloat4x4A(const XMFLOAT4X4A* pSource) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMLoadFloat4x4A(const XMFLOAT4X4A* pSource) noexcept { assert(pSource); assert((reinterpret_cast(pSource) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1222,7 +1194,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x4A(const XMFLOAT4X4A* pSource) noexcept #elif defined(_XM_ARM_NEON_INTRINSICS_) XMMATRIX M; -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) M.r[0] = vld1q_f32_ex(reinterpret_cast(&pSource->_11), 128); M.r[1] = vld1q_f32_ex(reinterpret_cast(&pSource->_21), 128); M.r[2] = vld1q_f32_ex(reinterpret_cast(&pSource->_31), 128); @@ -1249,13 +1222,8 @@ inline XMMATRIX XM_CALLCONV XMLoadFloat4x4A(const XMFLOAT4X4A* pSource) noexcept * Vector and matrix store operations * ****************************************************************************/ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreInt -( - uint32_t* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreInt(uint32_t* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) *pDestination = XMVectorGetIntX(V); @@ -1267,13 +1235,8 @@ inline void XM_CALLCONV XMStoreInt } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat -( - float* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat(float* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) *pDestination = XMVectorGetX(V); @@ -1285,13 +1248,8 @@ inline void XM_CALLCONV XMStoreFloat } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreInt2 -( - uint32_t* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreInt2(uint32_t* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination[0] = V.vector4_u32[0]; @@ -1305,13 +1263,8 @@ inline void XM_CALLCONV XMStoreInt2 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreInt2A -( - uint32_t* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreInt2A(uint32_t* pDestination, FXMVECTOR V) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1319,7 +1272,8 @@ inline void XM_CALLCONV XMStoreInt2A pDestination[1] = V.vector4_u32[1]; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t VL = vget_low_u32(vreinterpretq_u32_f32(V)); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1_u32_ex(pDestination, VL, 64); #else vst1_u32(pDestination, VL); @@ -1330,13 +1284,8 @@ inline void XM_CALLCONV XMStoreInt2A } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat2 -( - XMFLOAT2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat2(XMFLOAT2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = V.vector4_f32[0]; @@ -1350,13 +1299,8 @@ inline void XM_CALLCONV XMStoreFloat2 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat2A -( - XMFLOAT2A* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat2A(XMFLOAT2A* pDestination, FXMVECTOR V) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1364,7 +1308,8 @@ inline void XM_CALLCONV XMStoreFloat2A pDestination->y = V.vector4_f32[1]; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1_f32_ex(reinterpret_cast(pDestination), VL, 64); #else vst1_f32(reinterpret_cast(pDestination), VL); @@ -1375,13 +1320,8 @@ inline void XM_CALLCONV XMStoreFloat2A } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreSInt2 -( - XMINT2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreSInt2(XMINT2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = static_cast(V.vector4_f32[0]); @@ -1400,18 +1340,14 @@ inline void XM_CALLCONV XMStoreSInt2 vOverflow = _mm_andnot_ps(vOverflow, _mm_castsi128_ps(vResulti)); vOverflow = _mm_or_ps(vOverflow, vResult); // Write two ints - _mm_store_sd(reinterpret_cast(pDestination), _mm_castps_pd(vOverflow)); + _mm_store_sd(reinterpret_cast(pDestination), + _mm_castps_pd(vOverflow)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUInt2 -( - XMUINT2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUInt2(XMUINT2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = static_cast(V.vector4_f32[0]); @@ -1439,18 +1375,14 @@ inline void XM_CALLCONV XMStoreUInt2 // On those that are too large, set to 0xFFFFFFFF vResult = _mm_or_ps(vResult, vOverflow); // Write two uints - _mm_store_sd(reinterpret_cast(pDestination), _mm_castps_pd(vResult)); + _mm_store_sd(reinterpret_cast(pDestination), + _mm_castps_pd(vResult)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreInt3 -( - uint32_t* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreInt3(uint32_t* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination[0] = V.vector4_u32[0]; @@ -1459,7 +1391,8 @@ inline void XM_CALLCONV XMStoreInt3 #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t VL = vget_low_u32(vreinterpretq_u32_f32(V)); vst1_u32(pDestination, VL); - vst1q_lane_u32(pDestination + 2, *reinterpret_cast(&V), 2); + vst1q_lane_u32(pDestination + 2, *reinterpret_cast(&V), + 2); #elif defined(_XM_SSE_INTRINSICS_) _mm_store_sd(reinterpret_cast(pDestination), _mm_castps_pd(V)); __m128 z = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); @@ -1468,13 +1401,8 @@ inline void XM_CALLCONV XMStoreInt3 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreInt3A -( - uint32_t* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreInt3A(uint32_t* pDestination, FXMVECTOR V) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1483,12 +1411,14 @@ inline void XM_CALLCONV XMStoreInt3A pDestination[2] = V.vector4_u32[2]; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t VL = vget_low_u32(vreinterpretq_u32_f32(V)); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1_u32_ex(pDestination, VL, 64); #else vst1_u32(pDestination, VL); #endif - vst1q_lane_u32(pDestination + 2, *reinterpret_cast(&V), 2); + vst1q_lane_u32(pDestination + 2, *reinterpret_cast(&V), + 2); #elif defined(_XM_SSE_INTRINSICS_) _mm_store_sd(reinterpret_cast(pDestination), _mm_castps_pd(V)); __m128 z = _mm_movehl_ps(V, V); @@ -1497,13 +1427,8 @@ inline void XM_CALLCONV XMStoreInt3A } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat3 -( - XMFLOAT3* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat3(XMFLOAT3* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = V.vector4_f32[0]; @@ -1514,7 +1439,7 @@ inline void XM_CALLCONV XMStoreFloat3 vst1_f32(reinterpret_cast(pDestination), VL); vst1q_lane_f32(reinterpret_cast(pDestination) + 2, V, 2); #elif defined(_XM_SSE4_INTRINSICS_) - * reinterpret_cast(&pDestination->x) = _mm_extract_ps(V, 0); + *reinterpret_cast(&pDestination->x) = _mm_extract_ps(V, 0); *reinterpret_cast(&pDestination->y) = _mm_extract_ps(V, 1); *reinterpret_cast(&pDestination->z) = _mm_extract_ps(V, 2); #elif defined(_XM_SSE_INTRINSICS_) @@ -1525,13 +1450,8 @@ inline void XM_CALLCONV XMStoreFloat3 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat3A -( - XMFLOAT3A* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat3A(XMFLOAT3A* pDestination, FXMVECTOR V) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1540,7 +1460,8 @@ inline void XM_CALLCONV XMStoreFloat3A pDestination->z = V.vector4_f32[2]; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1_f32_ex(reinterpret_cast(pDestination), VL, 64); #else vst1_f32(reinterpret_cast(pDestination), VL); @@ -1557,13 +1478,8 @@ inline void XM_CALLCONV XMStoreFloat3A } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreSInt3 -( - XMINT3* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreSInt3(XMINT3* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = static_cast(V.vector4_f32[0]); @@ -1584,20 +1500,16 @@ inline void XM_CALLCONV XMStoreSInt3 vOverflow = _mm_andnot_ps(vOverflow, _mm_castsi128_ps(vResulti)); vOverflow = _mm_or_ps(vOverflow, vResult); // Write 3 uints - _mm_store_sd(reinterpret_cast(pDestination), _mm_castps_pd(vOverflow)); + _mm_store_sd(reinterpret_cast(pDestination), + _mm_castps_pd(vOverflow)); __m128 z = XM_PERMUTE_PS(vOverflow, _MM_SHUFFLE(2, 2, 2, 2)); _mm_store_ss(reinterpret_cast(&pDestination->z), z); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUInt3 -( - XMUINT3* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUInt3(XMUINT3* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = static_cast(V.vector4_f32[0]); @@ -1627,20 +1539,16 @@ inline void XM_CALLCONV XMStoreUInt3 // On those that are too large, set to 0xFFFFFFFF vResult = _mm_or_ps(vResult, vOverflow); // Write 3 uints - _mm_store_sd(reinterpret_cast(pDestination), _mm_castps_pd(vResult)); + _mm_store_sd(reinterpret_cast(pDestination), + _mm_castps_pd(vResult)); __m128 z = XM_PERMUTE_PS(vResult, _MM_SHUFFLE(2, 2, 2, 2)); _mm_store_ss(reinterpret_cast(&pDestination->z), z); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreInt4 -( - uint32_t* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreInt4(uint32_t* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination[0] = V.vector4_u32[0]; @@ -1650,18 +1558,14 @@ inline void XM_CALLCONV XMStoreInt4 #elif defined(_XM_ARM_NEON_INTRINSICS_) vst1q_u32(pDestination, vreinterpretq_u32_f32(V)); #elif defined(_XM_SSE_INTRINSICS_) - _mm_storeu_si128(reinterpret_cast<__m128i*>(pDestination), _mm_castps_si128(V)); + _mm_storeu_si128(reinterpret_cast<__m128i*>(pDestination), + _mm_castps_si128(V)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreInt4A -( - uint32_t* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreInt4A(uint32_t* pDestination, FXMVECTOR V) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1670,24 +1574,21 @@ inline void XM_CALLCONV XMStoreInt4A pDestination[2] = V.vector4_u32[2]; pDestination[3] = V.vector4_u32[3]; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1q_u32_ex(pDestination, V, 128); #else vst1q_u32(pDestination, vreinterpretq_u32_f32(V)); #endif #elif defined(_XM_SSE_INTRINSICS_) - _mm_store_si128(reinterpret_cast<__m128i*>(pDestination), _mm_castps_si128(V)); + _mm_store_si128(reinterpret_cast<__m128i*>(pDestination), + _mm_castps_si128(V)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat4 -( - XMFLOAT4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat4(XMFLOAT4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = V.vector4_f32[0]; @@ -1702,13 +1603,8 @@ inline void XM_CALLCONV XMStoreFloat4 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat4A -( - XMFLOAT4A* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat4A(XMFLOAT4A* pDestination, FXMVECTOR V) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1717,7 +1613,8 @@ inline void XM_CALLCONV XMStoreFloat4A pDestination->z = V.vector4_f32[2]; pDestination->w = V.vector4_f32[3]; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1q_f32_ex(reinterpret_cast(pDestination), V, 128); #else vst1q_f32(reinterpret_cast(pDestination), V); @@ -1728,13 +1625,8 @@ inline void XM_CALLCONV XMStoreFloat4A } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreSInt4 -( - XMINT4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreSInt4(XMINT4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = static_cast(V.vector4_f32[0]); @@ -1753,18 +1645,14 @@ inline void XM_CALLCONV XMStoreSInt4 XMVECTOR vResult = _mm_and_ps(vOverflow, g_XMAbsMask); vOverflow = _mm_andnot_ps(vOverflow, _mm_castsi128_ps(vResulti)); vOverflow = _mm_or_ps(vOverflow, vResult); - _mm_storeu_si128(reinterpret_cast<__m128i*>(pDestination), _mm_castps_si128(vOverflow)); + _mm_storeu_si128(reinterpret_cast<__m128i*>(pDestination), + _mm_castps_si128(vOverflow)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUInt4 -( - XMUINT4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUInt4(XMUINT4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination->x = static_cast(V.vector4_f32[0]); @@ -1792,18 +1680,14 @@ inline void XM_CALLCONV XMStoreUInt4 vResult = _mm_xor_ps(_mm_castsi128_ps(vResulti), vMask); // On those that are too large, set to 0xFFFFFFFF vResult = _mm_or_ps(vResult, vOverflow); - _mm_storeu_si128(reinterpret_cast<__m128i*>(pDestination), _mm_castps_si128(vResult)); + _mm_storeu_si128(reinterpret_cast<__m128i*>(pDestination), + _mm_castps_si128(vResult)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat3x3 -( - XMFLOAT3X3* pDestination, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat3x3(XMFLOAT3X3* pDestination, FXMMATRIX M) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -1844,13 +1728,8 @@ inline void XM_CALLCONV XMStoreFloat3x3 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat4x3 -( - XMFLOAT4X3* pDestination, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat4x3(XMFLOAT4X3* pDestination, FXMMATRIX M) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -1899,13 +1778,8 @@ inline void XM_CALLCONV XMStoreFloat4x3 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat4x3A -( - XMFLOAT4X3A* pDestination, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat4x3A(XMFLOAT4X3A* pDestination, FXMMATRIX M) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -1927,7 +1801,8 @@ inline void XM_CALLCONV XMStoreFloat4x3A pDestination->m[3][2] = M.r[3].vector4_f32[2]; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) float32x4_t T1 = vextq_f32(M.r[0], M.r[1], 1); float32x4_t T2 = vbslq_f32(g_XMMask3, M.r[0], T1); vst1q_f32_ex(&pDestination->m[0][0], T2, 128); @@ -1979,13 +1854,8 @@ inline void XM_CALLCONV XMStoreFloat4x3A } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat3x4 -( - XMFLOAT3X4* pDestination, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat3x4(XMFLOAT3X4* pDestination, FXMMATRIX M) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2038,13 +1908,8 @@ inline void XM_CALLCONV XMStoreFloat3x4 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat3x4A -( - XMFLOAT3X4A* pDestination, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat3x4A(XMFLOAT3X4A* pDestination, FXMMATRIX M) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -2071,7 +1936,8 @@ inline void XM_CALLCONV XMStoreFloat3x4A float32x4x2_t T0 = vzipq_f32(P0.val[0], P1.val[0]); float32x4x2_t T1 = vzipq_f32(P0.val[1], P1.val[1]); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1q_f32_ex(&pDestination->m[0][0], T0.val[0], 128); vst1q_f32_ex(&pDestination->m[1][0], T0.val[1], 128); vst1q_f32_ex(&pDestination->m[2][0], T1.val[0], 128); @@ -2104,13 +1970,8 @@ inline void XM_CALLCONV XMStoreFloat3x4A } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat4x4 -( - XMFLOAT4X4* pDestination, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat4x4(XMFLOAT4X4* pDestination, FXMMATRIX M) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2148,13 +2009,8 @@ inline void XM_CALLCONV XMStoreFloat4x4 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat4x4A -( - XMFLOAT4X4A* pDestination, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat4x4A(XMFLOAT4X4A* pDestination, FXMMATRIX M) noexcept { assert(pDestination); assert((reinterpret_cast(pDestination) & 0xF) == 0); #if defined(_XM_NO_INTRINSICS_) @@ -2180,7 +2036,8 @@ inline void XM_CALLCONV XMStoreFloat4x4A pDestination->m[3][3] = M.r[3].vector4_f32[3]; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) vst1q_f32_ex(reinterpret_cast(&pDestination->_11), M.r[0], 128); vst1q_f32_ex(reinterpret_cast(&pDestination->_21), M.r[1], 128); vst1q_f32_ex(reinterpret_cast(&pDestination->_31), M.r[2], 128); @@ -2198,4 +2055,3 @@ inline void XM_CALLCONV XMStoreFloat4x4A _mm_store_ps(&pDestination->_41, M.r[3]); #endif } - diff --git a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMatrix.inl b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMatrix.inl index 36f4f9a74..d4ff70e09 100644 --- a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMatrix.inl +++ b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMatrix.inl @@ -21,33 +21,30 @@ //------------------------------------------------------------------------------ -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(push) #pragma float_control(precise, on) #endif // Return true if any entry in the matrix is NaN -inline bool XM_CALLCONV XMMatrixIsNaN(FXMMATRIX M) noexcept -{ +inline bool XM_CALLCONV XMMatrixIsNaN(FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) size_t i = 16; auto pWork = reinterpret_cast(&M.m[0][0]); - do - { - // Fetch value into integer unit + do { + // Fetch value into integer unit uint32_t uTest = pWork[0]; // Remove sign uTest &= 0x7FFFFFFFU; // NaN is 0x7F800001 through 0x7FFFFFFF inclusive uTest -= 0x7F800001U; - if (uTest < 0x007FFFFFU) - { - break; // NaN found + if (uTest < 0x007FFFFFU) { + break; // NaN found } - ++pWork; // Next entry - } - while (--i); - return (i != 0); // i == 0 if nothing matched + ++pWork; // Next entry + } while (--i); + return (i != 0); // i == 0 if nothing matched #elif defined(_XM_ARM_NEON_INTRINSICS_) // Load in registers float32x4_t vX = M.r[0]; @@ -64,10 +61,10 @@ inline bool XM_CALLCONV XMMatrixIsNaN(FXMMATRIX M) noexcept ymask = vorrq_u32(ymask, wmask); xmask = vorrq_u32(xmask, ymask); // If any tested true, return true - uint8x8x2_t vTemp = vzip_u8( - vget_low_u8(vreinterpretq_u8_u32(xmask)), - vget_high_u8(vreinterpretq_u8_u32(xmask))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(xmask)), + vget_high_u8(vreinterpretq_u8_u32(xmask))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); return (r != 0); #elif defined(_XM_SSE_INTRINSICS_) @@ -91,33 +88,30 @@ inline bool XM_CALLCONV XMMatrixIsNaN(FXMMATRIX M) noexcept #endif } -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(pop) #endif //------------------------------------------------------------------------------ // Return true if any entry in the matrix is +/-INF -inline bool XM_CALLCONV XMMatrixIsInfinite(FXMMATRIX M) noexcept -{ +inline bool XM_CALLCONV XMMatrixIsInfinite(FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) size_t i = 16; auto pWork = reinterpret_cast(&M.m[0][0]); - do - { - // Fetch value into integer unit + do { + // Fetch value into integer unit uint32_t uTest = pWork[0]; // Remove sign uTest &= 0x7FFFFFFFU; // INF is 0x7F800000 - if (uTest == 0x7F800000U) - { - break; // INF found + if (uTest == 0x7F800000U) { + break; // INF found } - ++pWork; // Next entry - } - while (--i); - return (i != 0); // i == 0 if nothing matched + ++pWork; // Next entry + } while (--i); + return (i != 0); // i == 0 if nothing matched #elif defined(_XM_ARM_NEON_INTRINSICS_) // Load in registers float32x4_t vX = M.r[0]; @@ -125,10 +119,14 @@ inline bool XM_CALLCONV XMMatrixIsInfinite(FXMMATRIX M) noexcept float32x4_t vZ = M.r[2]; float32x4_t vW = M.r[3]; // Mask off the sign bits - vX = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(vX), g_XMAbsMask)); - vY = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(vY), g_XMAbsMask)); - vZ = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(vZ), g_XMAbsMask)); - vW = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(vW), g_XMAbsMask)); + vX = vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(vX), g_XMAbsMask)); + vY = vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(vY), g_XMAbsMask)); + vZ = vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(vZ), g_XMAbsMask)); + vW = vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(vW), g_XMAbsMask)); // Compare to infinity uint32x4_t xmask = vceqq_f32(vX, g_XMInfinity); uint32x4_t ymask = vceqq_f32(vY, g_XMInfinity); @@ -139,10 +137,10 @@ inline bool XM_CALLCONV XMMatrixIsInfinite(FXMMATRIX M) noexcept ymask = vorrq_u32(ymask, wmask); xmask = vorrq_u32(xmask, ymask); // If any tested true, return true - uint8x8x2_t vTemp = vzip_u8( - vget_low_u8(vreinterpretq_u8_u32(xmask)), - vget_high_u8(vreinterpretq_u8_u32(xmask))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(xmask)), + vget_high_u8(vreinterpretq_u8_u32(xmask))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); return (r != 0); #elif defined(_XM_SSE_INTRINSICS_) @@ -168,8 +166,7 @@ inline bool XM_CALLCONV XMMatrixIsInfinite(FXMMATRIX M) noexcept //------------------------------------------------------------------------------ // Return true if the XMMatrix is equal to identity -inline bool XM_CALLCONV XMMatrixIsIdentity(FXMMATRIX M) noexcept -{ +inline bool XM_CALLCONV XMMatrixIsIdentity(FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) // Use the integer pipeline to reduce branching to a minimum auto pWork = reinterpret_cast(&M.m[0][0]); @@ -195,7 +192,7 @@ inline bool XM_CALLCONV XMMatrixIsIdentity(FXMMATRIX M) noexcept uZero |= pWork[14]; uOne |= pWork[15] ^ 0x3F800000U; // If all zero entries are zero, the uZero==0 - uZero &= 0x7FFFFFFF; // Allow -0.0f + uZero &= 0x7FFFFFFF; // Allow -0.0f // If all 1.0f entries are 1.0f, then uOne==0 uOne |= uZero; return (uOne == 0); @@ -207,8 +204,10 @@ inline bool XM_CALLCONV XMMatrixIsIdentity(FXMMATRIX M) noexcept xmask = vandq_u32(xmask, zmask); ymask = vandq_u32(ymask, wmask); xmask = vandq_u32(xmask, ymask); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(xmask)), vget_high_u8(vreinterpretq_u8_u32(xmask))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(xmask)), + vget_high_u8(vreinterpretq_u8_u32(xmask))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); return (r == 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) @@ -229,12 +228,8 @@ inline bool XM_CALLCONV XMMatrixIsIdentity(FXMMATRIX M) noexcept //------------------------------------------------------------------------------ // Perform a 4x4 matrix multiply by a 4x4 matrix -inline XMMATRIX XM_CALLCONV XMMatrixMultiply -( - FXMMATRIX M1, - CXMMATRIX M2 -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixMultiply(FXMMATRIX M1, + CXMMATRIX M2) noexcept { #if defined(_XM_NO_INTRINSICS_) XMMATRIX mResult; // Cache the invariants in registers @@ -243,35 +238,51 @@ inline XMMATRIX XM_CALLCONV XMMatrixMultiply float z = M1.m[0][2]; float w = M1.m[0][3]; // Perform the operation on the first row - mResult.m[0][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + (M2.m[3][0] * w); - mResult.m[0][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + (M2.m[3][1] * w); - mResult.m[0][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + (M2.m[3][2] * w); - mResult.m[0][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + (M2.m[3][3] * w); + mResult.m[0][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + + (M2.m[3][0] * w); + mResult.m[0][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + + (M2.m[3][1] * w); + mResult.m[0][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + + (M2.m[3][2] * w); + mResult.m[0][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + + (M2.m[3][3] * w); // Repeat for all the other rows x = M1.m[1][0]; y = M1.m[1][1]; z = M1.m[1][2]; w = M1.m[1][3]; - mResult.m[1][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + (M2.m[3][0] * w); - mResult.m[1][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + (M2.m[3][1] * w); - mResult.m[1][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + (M2.m[3][2] * w); - mResult.m[1][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + (M2.m[3][3] * w); + mResult.m[1][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + + (M2.m[3][0] * w); + mResult.m[1][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + + (M2.m[3][1] * w); + mResult.m[1][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + + (M2.m[3][2] * w); + mResult.m[1][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + + (M2.m[3][3] * w); x = M1.m[2][0]; y = M1.m[2][1]; z = M1.m[2][2]; w = M1.m[2][3]; - mResult.m[2][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + (M2.m[3][0] * w); - mResult.m[2][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + (M2.m[3][1] * w); - mResult.m[2][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + (M2.m[3][2] * w); - mResult.m[2][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + (M2.m[3][3] * w); + mResult.m[2][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + + (M2.m[3][0] * w); + mResult.m[2][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + + (M2.m[3][1] * w); + mResult.m[2][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + + (M2.m[3][2] * w); + mResult.m[2][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + + (M2.m[3][3] * w); x = M1.m[3][0]; y = M1.m[3][1]; z = M1.m[3][2]; w = M1.m[3][3]; - mResult.m[3][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + (M2.m[3][0] * w); - mResult.m[3][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + (M2.m[3][1] * w); - mResult.m[3][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + (M2.m[3][2] * w); - mResult.m[3][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + (M2.m[3][3] * w); + mResult.m[3][0] = (M2.m[0][0] * x) + (M2.m[1][0] * y) + (M2.m[2][0] * z) + + (M2.m[3][0] * w); + mResult.m[3][1] = (M2.m[0][1] * x) + (M2.m[1][1] * y) + (M2.m[2][1] * z) + + (M2.m[3][1] * w); + mResult.m[3][2] = (M2.m[0][2] * x) + (M2.m[1][2] * y) + (M2.m[2][2] * z) + + (M2.m[3][2] * w); + mResult.m[3][3] = (M2.m[0][3] * x) + (M2.m[1][3] * y) + (M2.m[2][3] * z) + + (M2.m[3][3] * w); return mResult; #elif defined(_XM_ARM_NEON_INTRINSICS_) XMMATRIX mResult; @@ -354,10 +365,14 @@ inline XMMATRIX XM_CALLCONV XMMatrixMultiply XMMATRIX mResult; // Splat the component X,Y,Z then W #if defined(_XM_AVX_INTRINSICS_) - XMVECTOR vX = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 0); - XMVECTOR vY = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 1); - XMVECTOR vZ = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 2); - XMVECTOR vW = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 3); + XMVECTOR vX = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 0); + XMVECTOR vY = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 1); + XMVECTOR vZ = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 2); + XMVECTOR vW = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 3); #else // Use vW to hold the original row XMVECTOR vW = M1.r[0]; @@ -443,12 +458,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixMultiply //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixMultiplyTranspose -( - FXMMATRIX M1, - CXMMATRIX M2 -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixMultiplyTranspose(FXMMATRIX M1, + CXMMATRIX M2) noexcept { #if defined(_XM_NO_INTRINSICS_) XMMATRIX mResult; // Cache the invariants in registers @@ -457,35 +468,51 @@ inline XMMATRIX XM_CALLCONV XMMatrixMultiplyTranspose float z = M2.m[2][0]; float w = M2.m[3][0]; // Perform the operation on the first row - mResult.m[0][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + (M1.m[0][3] * w); - mResult.m[0][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + (M1.m[1][3] * w); - mResult.m[0][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + (M1.m[2][3] * w); - mResult.m[0][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + (M1.m[3][3] * w); + mResult.m[0][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + + (M1.m[0][3] * w); + mResult.m[0][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + + (M1.m[1][3] * w); + mResult.m[0][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + + (M1.m[2][3] * w); + mResult.m[0][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + + (M1.m[3][3] * w); // Repeat for all the other rows x = M2.m[0][1]; y = M2.m[1][1]; z = M2.m[2][1]; w = M2.m[3][1]; - mResult.m[1][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + (M1.m[0][3] * w); - mResult.m[1][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + (M1.m[1][3] * w); - mResult.m[1][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + (M1.m[2][3] * w); - mResult.m[1][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + (M1.m[3][3] * w); + mResult.m[1][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + + (M1.m[0][3] * w); + mResult.m[1][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + + (M1.m[1][3] * w); + mResult.m[1][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + + (M1.m[2][3] * w); + mResult.m[1][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + + (M1.m[3][3] * w); x = M2.m[0][2]; y = M2.m[1][2]; z = M2.m[2][2]; w = M2.m[3][2]; - mResult.m[2][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + (M1.m[0][3] * w); - mResult.m[2][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + (M1.m[1][3] * w); - mResult.m[2][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + (M1.m[2][3] * w); - mResult.m[2][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + (M1.m[3][3] * w); + mResult.m[2][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + + (M1.m[0][3] * w); + mResult.m[2][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + + (M1.m[1][3] * w); + mResult.m[2][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + + (M1.m[2][3] * w); + mResult.m[2][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + + (M1.m[3][3] * w); x = M2.m[0][3]; y = M2.m[1][3]; z = M2.m[2][3]; w = M2.m[3][3]; - mResult.m[3][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + (M1.m[0][3] * w); - mResult.m[3][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + (M1.m[1][3] * w); - mResult.m[3][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + (M1.m[2][3] * w); - mResult.m[3][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + (M1.m[3][3] * w); + mResult.m[3][0] = (M1.m[0][0] * x) + (M1.m[0][1] * y) + (M1.m[0][2] * z) + + (M1.m[0][3] * w); + mResult.m[3][1] = (M1.m[1][0] * x) + (M1.m[1][1] * y) + (M1.m[1][2] * z) + + (M1.m[1][3] * w); + mResult.m[3][2] = (M1.m[2][0] * x) + (M1.m[2][1] * y) + (M1.m[2][2] * z) + + (M1.m[2][3] * w); + mResult.m[3][3] = (M1.m[3][0] * x) + (M1.m[3][1] * y) + (M1.m[3][2] * z) + + (M1.m[3][3] * w); return mResult; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(M1.r[0]); @@ -589,10 +616,14 @@ inline XMMATRIX XM_CALLCONV XMMatrixMultiplyTranspose #elif defined(_XM_SSE_INTRINSICS_) // Splat the component X,Y,Z then W #if defined(_XM_AVX_INTRINSICS_) - XMVECTOR vX = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 0); - XMVECTOR vY = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 1); - XMVECTOR vZ = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 2); - XMVECTOR vW = _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 3); + XMVECTOR vX = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 0); + XMVECTOR vY = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 1); + XMVECTOR vZ = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 2); + XMVECTOR vW = + _mm_broadcast_ss(reinterpret_cast(&M1.r[0]) + 3); #else // Use vW to hold the original row XMVECTOR vW = M1.r[0]; @@ -698,8 +729,7 @@ inline XMMATRIX XM_CALLCONV XMMatrixMultiplyTranspose //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixTranspose(FXMMATRIX M) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixTranspose(FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) // Original matrix: @@ -710,16 +740,16 @@ inline XMMATRIX XM_CALLCONV XMMatrixTranspose(FXMMATRIX M) noexcept // m30m31m32m33 XMMATRIX P; - P.r[0] = XMVectorMergeXY(M.r[0], M.r[2]); // m00m20m01m21 - P.r[1] = XMVectorMergeXY(M.r[1], M.r[3]); // m10m30m11m31 - P.r[2] = XMVectorMergeZW(M.r[0], M.r[2]); // m02m22m03m23 - P.r[3] = XMVectorMergeZW(M.r[1], M.r[3]); // m12m32m13m33 + P.r[0] = XMVectorMergeXY(M.r[0], M.r[2]); // m00m20m01m21 + P.r[1] = XMVectorMergeXY(M.r[1], M.r[3]); // m10m30m11m31 + P.r[2] = XMVectorMergeZW(M.r[0], M.r[2]); // m02m22m03m23 + P.r[3] = XMVectorMergeZW(M.r[1], M.r[3]); // m12m32m13m33 XMMATRIX MT; - MT.r[0] = XMVectorMergeXY(P.r[0], P.r[1]); // m00m10m20m30 - MT.r[1] = XMVectorMergeZW(P.r[0], P.r[1]); // m01m11m21m31 - MT.r[2] = XMVectorMergeXY(P.r[2], P.r[3]); // m02m12m22m32 - MT.r[3] = XMVectorMergeZW(P.r[2], P.r[3]); // m03m13m23m33 + MT.r[0] = XMVectorMergeXY(P.r[0], P.r[1]); // m00m10m20m30 + MT.r[1] = XMVectorMergeZW(P.r[0], P.r[1]); // m01m11m21m31 + MT.r[2] = XMVectorMergeXY(P.r[2], P.r[3]); // m02m12m22m32 + MT.r[3] = XMVectorMergeZW(P.r[2], P.r[3]); // m03m13m23m33 return MT; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -781,76 +811,127 @@ inline XMMATRIX XM_CALLCONV XMMatrixTranspose(FXMMATRIX M) noexcept //------------------------------------------------------------------------------ // Return the inverse and the determinant of a 4x4 matrix -_Use_decl_annotations_ -inline XMMATRIX XM_CALLCONV XMMatrixInverse -( - XMVECTOR* pDeterminant, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX XM_CALLCONV +XMMatrixInverse(XMVECTOR* pDeterminant, FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) XMMATRIX MT = XMMatrixTranspose(M); XMVECTOR V0[4], V1[4]; - V0[0] = XMVectorSwizzle(MT.r[2]); - V1[0] = XMVectorSwizzle(MT.r[3]); - V0[1] = XMVectorSwizzle(MT.r[0]); - V1[1] = XMVectorSwizzle(MT.r[1]); - V0[2] = XMVectorPermute(MT.r[2], MT.r[0]); - V1[2] = XMVectorPermute(MT.r[3], MT.r[1]); + V0[0] = + XMVectorSwizzle( + MT.r[2]); + V1[0] = + XMVectorSwizzle( + MT.r[3]); + V0[1] = + XMVectorSwizzle( + MT.r[0]); + V1[1] = + XMVectorSwizzle( + MT.r[1]); + V0[2] = XMVectorPermute(MT.r[2], MT.r[0]); + V1[2] = XMVectorPermute(MT.r[3], MT.r[1]); XMVECTOR D0 = XMVectorMultiply(V0[0], V1[0]); XMVECTOR D1 = XMVectorMultiply(V0[1], V1[1]); XMVECTOR D2 = XMVectorMultiply(V0[2], V1[2]); - V0[0] = XMVectorSwizzle(MT.r[2]); - V1[0] = XMVectorSwizzle(MT.r[3]); - V0[1] = XMVectorSwizzle(MT.r[0]); - V1[1] = XMVectorSwizzle(MT.r[1]); - V0[2] = XMVectorPermute(MT.r[2], MT.r[0]); - V1[2] = XMVectorPermute(MT.r[3], MT.r[1]); + V0[0] = + XMVectorSwizzle( + MT.r[2]); + V1[0] = + XMVectorSwizzle( + MT.r[3]); + V0[1] = + XMVectorSwizzle( + MT.r[0]); + V1[1] = + XMVectorSwizzle( + MT.r[1]); + V0[2] = XMVectorPermute(MT.r[2], MT.r[0]); + V1[2] = XMVectorPermute(MT.r[3], MT.r[1]); D0 = XMVectorNegativeMultiplySubtract(V0[0], V1[0], D0); D1 = XMVectorNegativeMultiplySubtract(V0[1], V1[1], D1); D2 = XMVectorNegativeMultiplySubtract(V0[2], V1[2], D2); - V0[0] = XMVectorSwizzle(MT.r[1]); - V1[0] = XMVectorPermute(D0, D2); - V0[1] = XMVectorSwizzle(MT.r[0]); - V1[1] = XMVectorPermute(D0, D2); - V0[2] = XMVectorSwizzle(MT.r[3]); - V1[2] = XMVectorPermute(D1, D2); - V0[3] = XMVectorSwizzle(MT.r[2]); - V1[3] = XMVectorPermute(D1, D2); + V0[0] = + XMVectorSwizzle( + MT.r[1]); + V1[0] = XMVectorPermute(D0, D2); + V0[1] = + XMVectorSwizzle( + MT.r[0]); + V1[1] = XMVectorPermute(D0, D2); + V0[2] = + XMVectorSwizzle( + MT.r[3]); + V1[2] = XMVectorPermute(D1, D2); + V0[3] = + XMVectorSwizzle( + MT.r[2]); + V1[3] = XMVectorPermute(D1, D2); XMVECTOR C0 = XMVectorMultiply(V0[0], V1[0]); XMVECTOR C2 = XMVectorMultiply(V0[1], V1[1]); XMVECTOR C4 = XMVectorMultiply(V0[2], V1[2]); XMVECTOR C6 = XMVectorMultiply(V0[3], V1[3]); - V0[0] = XMVectorSwizzle(MT.r[1]); - V1[0] = XMVectorPermute(D0, D2); - V0[1] = XMVectorSwizzle(MT.r[0]); - V1[1] = XMVectorPermute(D0, D2); - V0[2] = XMVectorSwizzle(MT.r[3]); - V1[2] = XMVectorPermute(D1, D2); - V0[3] = XMVectorSwizzle(MT.r[2]); - V1[3] = XMVectorPermute(D1, D2); + V0[0] = + XMVectorSwizzle( + MT.r[1]); + V1[0] = XMVectorPermute(D0, D2); + V0[1] = + XMVectorSwizzle( + MT.r[0]); + V1[1] = XMVectorPermute(D0, D2); + V0[2] = + XMVectorSwizzle( + MT.r[3]); + V1[2] = XMVectorPermute(D1, D2); + V0[3] = + XMVectorSwizzle( + MT.r[2]); + V1[3] = XMVectorPermute(D1, D2); C0 = XMVectorNegativeMultiplySubtract(V0[0], V1[0], C0); C2 = XMVectorNegativeMultiplySubtract(V0[1], V1[1], C2); C4 = XMVectorNegativeMultiplySubtract(V0[2], V1[2], C4); C6 = XMVectorNegativeMultiplySubtract(V0[3], V1[3], C6); - V0[0] = XMVectorSwizzle(MT.r[1]); - V1[0] = XMVectorPermute(D0, D2); - V0[1] = XMVectorSwizzle(MT.r[0]); - V1[1] = XMVectorPermute(D0, D2); - V0[2] = XMVectorSwizzle(MT.r[3]); - V1[2] = XMVectorPermute(D1, D2); - V0[3] = XMVectorSwizzle(MT.r[2]); - V1[3] = XMVectorPermute(D1, D2); + V0[0] = + XMVectorSwizzle( + MT.r[1]); + V1[0] = XMVectorPermute(D0, D2); + V0[1] = + XMVectorSwizzle( + MT.r[0]); + V1[1] = XMVectorPermute(D0, D2); + V0[2] = + XMVectorSwizzle( + MT.r[3]); + V1[2] = XMVectorPermute(D1, D2); + V0[3] = + XMVectorSwizzle( + MT.r[2]); + V1[3] = XMVectorPermute(D1, D2); XMVECTOR C1 = XMVectorNegativeMultiplySubtract(V0[0], V1[0], C0); C0 = XMVectorMultiplyAdd(V0[0], V1[0], C0); @@ -869,8 +950,7 @@ inline XMMATRIX XM_CALLCONV XMMatrixInverse XMVECTOR Determinant = XMVector4Dot(R.r[0], MT.r[0]); - if (pDeterminant != nullptr) - *pDeterminant = Determinant; + if (pDeterminant != nullptr) *pDeterminant = Determinant; XMVECTOR Reciprocal = XMVectorReciprocal(Determinant); @@ -991,8 +1071,7 @@ inline XMMATRIX XM_CALLCONV XMMatrixInverse C6 = XM_PERMUTE_PS(C6, _MM_SHUFFLE(3, 1, 2, 0)); // Get the determinant XMVECTOR vTemp = XMVector4Dot(C0, MT.r[0]); - if (pDeterminant != nullptr) - *pDeterminant = vTemp; + if (pDeterminant != nullptr) *pDeterminant = vTemp; vTemp = _mm_div_ps(g_XMOne, vTemp); XMMATRIX mResult; mResult.r[0] = _mm_mul_ps(C0, vTemp); @@ -1005,12 +1084,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixInverse //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixVectorTensorProduct -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixVectorTensorProduct(FXMVECTOR V1, + FXMVECTOR V2) noexcept { XMMATRIX mResult; mResult.r[0] = XMVectorMultiply(XMVectorSwizzle<0, 0, 0, 0>(V1), V2); mResult.r[1] = XMVectorMultiply(XMVectorSwizzle<1, 1, 1, 1>(V1), V2); @@ -1021,35 +1096,64 @@ inline XMMATRIX XM_CALLCONV XMMatrixVectorTensorProduct //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMMatrixDeterminant(FXMMATRIX M) noexcept -{ - static const XMVECTORF32 Sign = { { { 1.0f, -1.0f, 1.0f, -1.0f } } }; +inline XMVECTOR XM_CALLCONV XMMatrixDeterminant(FXMMATRIX M) noexcept { + static const XMVECTORF32 Sign = {{{1.0f, -1.0f, 1.0f, -1.0f}}}; - XMVECTOR V0 = XMVectorSwizzle(M.r[2]); - XMVECTOR V1 = XMVectorSwizzle(M.r[3]); - XMVECTOR V2 = XMVectorSwizzle(M.r[2]); - XMVECTOR V3 = XMVectorSwizzle(M.r[3]); - XMVECTOR V4 = XMVectorSwizzle(M.r[2]); - XMVECTOR V5 = XMVectorSwizzle(M.r[3]); + XMVECTOR V0 = + XMVectorSwizzle( + M.r[2]); + XMVECTOR V1 = + XMVectorSwizzle( + M.r[3]); + XMVECTOR V2 = + XMVectorSwizzle( + M.r[2]); + XMVECTOR V3 = + XMVectorSwizzle( + M.r[3]); + XMVECTOR V4 = + XMVectorSwizzle( + M.r[2]); + XMVECTOR V5 = + XMVectorSwizzle( + M.r[3]); XMVECTOR P0 = XMVectorMultiply(V0, V1); XMVECTOR P1 = XMVectorMultiply(V2, V3); XMVECTOR P2 = XMVectorMultiply(V4, V5); - V0 = XMVectorSwizzle(M.r[2]); - V1 = XMVectorSwizzle(M.r[3]); - V2 = XMVectorSwizzle(M.r[2]); - V3 = XMVectorSwizzle(M.r[3]); - V4 = XMVectorSwizzle(M.r[2]); - V5 = XMVectorSwizzle(M.r[3]); + V0 = + XMVectorSwizzle( + M.r[2]); + V1 = + XMVectorSwizzle( + M.r[3]); + V2 = + XMVectorSwizzle( + M.r[2]); + V3 = + XMVectorSwizzle( + M.r[3]); + V4 = + XMVectorSwizzle( + M.r[2]); + V5 = + XMVectorSwizzle( + M.r[3]); P0 = XMVectorNegativeMultiplySubtract(V0, V1, P0); P1 = XMVectorNegativeMultiplySubtract(V2, V3, P1); P2 = XMVectorNegativeMultiplySubtract(V4, V5, P2); - V0 = XMVectorSwizzle(M.r[1]); - V1 = XMVectorSwizzle(M.r[1]); - V2 = XMVectorSwizzle(M.r[1]); + V0 = + XMVectorSwizzle( + M.r[1]); + V1 = + XMVectorSwizzle( + M.r[1]); + V2 = + XMVectorSwizzle( + M.r[1]); XMVECTOR S = XMVectorMultiply(M.r[0], Sign.v); XMVECTOR R = XMVectorMultiply(V0, P0); @@ -1059,72 +1163,48 @@ inline XMVECTOR XM_CALLCONV XMMatrixDeterminant(FXMMATRIX M) noexcept return XMVector4Dot(S, R); } -#define XM3RANKDECOMPOSE(a, b, c, x, y, z) \ - if((x) < (y)) \ - { \ - if((y) < (z)) \ - { \ - (a) = 2; \ - (b) = 1; \ - (c) = 0; \ - } \ - else \ - { \ - (a) = 1; \ - \ - if((x) < (z)) \ - { \ - (b) = 2; \ - (c) = 0; \ - } \ - else \ - { \ - (b) = 0; \ - (c) = 2; \ - } \ - } \ - } \ - else \ - { \ - if((x) < (z)) \ - { \ - (a) = 2; \ - (b) = 0; \ - (c) = 1; \ - } \ - else \ - { \ - (a) = 0; \ - \ - if((y) < (z)) \ - { \ - (b) = 2; \ - (c) = 1; \ - } \ - else \ - { \ - (b) = 1; \ - (c) = 2; \ - } \ - } \ +#define XM3RANKDECOMPOSE(a, b, c, x, y, z) \ + if ((x) < (y)) { \ + if ((y) < (z)) { \ + (a) = 2; \ + (b) = 1; \ + (c) = 0; \ + } else { \ + (a) = 1; \ + \ + if ((x) < (z)) { \ + (b) = 2; \ + (c) = 0; \ + } else { \ + (b) = 0; \ + (c) = 2; \ + } \ + } \ + } else { \ + if ((x) < (z)) { \ + (a) = 2; \ + (b) = 0; \ + (c) = 1; \ + } else { \ + (a) = 0; \ + \ + if ((y) < (z)) { \ + (b) = 2; \ + (c) = 1; \ + } else { \ + (b) = 1; \ + (c) = 2; \ + } \ + } \ } #define XM3_DECOMP_EPSILON 0.0001f -_Use_decl_annotations_ -inline bool XM_CALLCONV XMMatrixDecompose -( - XMVECTOR* outScale, - XMVECTOR* outRotQuat, - XMVECTOR* outTrans, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline bool XM_CALLCONV +XMMatrixDecompose(XMVECTOR* outScale, XMVECTOR* outRotQuat, XMVECTOR* outTrans, + FXMMATRIX M) noexcept { static const XMVECTOR* pvCanonicalBasis[3] = { - &g_XMIdentityR0.v, - &g_XMIdentityR1.v, - &g_XMIdentityR2.v - }; + &g_XMIdentityR0.v, &g_XMIdentityR1.v, &g_XMIdentityR2.v}; assert(outScale != nullptr); assert(outRotQuat != nullptr); @@ -1154,14 +1234,12 @@ inline bool XM_CALLCONV XMMatrixDecompose XM3RANKDECOMPOSE(a, b, c, pfScales[0], pfScales[1], pfScales[2]) - if (pfScales[a] < XM3_DECOMP_EPSILON) - { - ppvBasis[a][0] = pvCanonicalBasis[a][0]; - } + if (pfScales[a] < XM3_DECOMP_EPSILON) { + ppvBasis[a][0] = pvCanonicalBasis[a][0]; + } ppvBasis[a][0] = XMVector3Normalize(ppvBasis[a][0]); - if (pfScales[b] < XM3_DECOMP_EPSILON) - { + if (pfScales[b] < XM3_DECOMP_EPSILON) { size_t aa, bb, cc; float fAbsX, fAbsY, fAbsZ; @@ -1171,13 +1249,13 @@ inline bool XM_CALLCONV XMMatrixDecompose XM3RANKDECOMPOSE(aa, bb, cc, fAbsX, fAbsY, fAbsZ) - ppvBasis[b][0] = XMVector3Cross(ppvBasis[a][0], pvCanonicalBasis[cc][0]); + ppvBasis[b][0] = + XMVector3Cross(ppvBasis[a][0], pvCanonicalBasis[cc][0]); } ppvBasis[b][0] = XMVector3Normalize(ppvBasis[b][0]); - if (pfScales[c] < XM3_DECOMP_EPSILON) - { + if (pfScales[c] < XM3_DECOMP_EPSILON) { ppvBasis[c][0] = XMVector3Cross(ppvBasis[a][0], ppvBasis[b][0]); } @@ -1186,9 +1264,9 @@ inline bool XM_CALLCONV XMMatrixDecompose float fDet = XMVectorGetX(XMMatrixDeterminant(matTemp)); // use Kramer's rule to check for handedness of coordinate system - if (fDet < 0.0f) - { - // switch coordinate system by negating the scale and inverting the basis vector on the x-axis + if (fDet < 0.0f) { + // switch coordinate system by negating the scale and inverting the + // basis vector on the x-axis pfScales[a] = -pfScales[a]; ppvBasis[a][0] = XMVectorNegate(ppvBasis[a][0]); @@ -1198,8 +1276,7 @@ inline bool XM_CALLCONV XMMatrixDecompose fDet -= 1.0f; fDet *= fDet; - if (XM3_DECOMP_EPSILON < fDet) - { + if (XM3_DECOMP_EPSILON < fDet) { // Non-SRT matrix encountered return false; } @@ -1218,8 +1295,7 @@ inline bool XM_CALLCONV XMMatrixDecompose //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixIdentity() noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixIdentity() noexcept { XMMATRIX M; M.r[0] = g_XMIdentityR0.v; M.r[1] = g_XMIdentityR1.v; @@ -1230,20 +1306,30 @@ inline XMMATRIX XM_CALLCONV XMMatrixIdentity() noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixSet -( - float m00, float m01, float m02, float m03, - float m10, float m11, float m12, float m13, - float m20, float m21, float m22, float m23, - float m30, float m31, float m32, float m33 -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixSet(float m00, float m01, float m02, + float m03, float m10, float m11, + float m12, float m13, float m20, + float m21, float m22, float m23, + float m30, float m31, float m32, + float m33) noexcept { XMMATRIX M; #if defined(_XM_NO_INTRINSICS_) - M.m[0][0] = m00; M.m[0][1] = m01; M.m[0][2] = m02; M.m[0][3] = m03; - M.m[1][0] = m10; M.m[1][1] = m11; M.m[1][2] = m12; M.m[1][3] = m13; - M.m[2][0] = m20; M.m[2][1] = m21; M.m[2][2] = m22; M.m[2][3] = m23; - M.m[3][0] = m30; M.m[3][1] = m31; M.m[3][2] = m32; M.m[3][3] = m33; + M.m[0][0] = m00; + M.m[0][1] = m01; + M.m[0][2] = m02; + M.m[0][3] = m03; + M.m[1][0] = m10; + M.m[1][1] = m11; + M.m[1][2] = m12; + M.m[1][3] = m13; + M.m[2][0] = m20; + M.m[2][1] = m21; + M.m[2][2] = m22; + M.m[2][3] = m23; + M.m[3][0] = m30; + M.m[3][1] = m31; + M.m[3][2] = m32; + M.m[3][3] = m33; #else M.r[0] = XMVectorSet(m00, m01, m02, m03); M.r[1] = XMVectorSet(m10, m11, m12, m13); @@ -1255,13 +1341,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixSet //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixTranslation -( - float OffsetX, - float OffsetY, - float OffsetZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixTranslation(float OffsetX, float OffsetY, + float OffsetZ) noexcept { #if defined(_XM_NO_INTRINSICS_) XMMATRIX M; @@ -1296,11 +1377,10 @@ inline XMMATRIX XM_CALLCONV XMMatrixTranslation #endif } - //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixTranslationFromVector(FXMVECTOR Offset) noexcept -{ +inline XMMATRIX XM_CALLCONV +XMMatrixTranslationFromVector(FXMVECTOR Offset) noexcept { #if defined(_XM_NO_INTRINSICS_) XMMATRIX M; @@ -1337,13 +1417,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixTranslationFromVector(FXMVECTOR Offset) noex //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixScaling -( - float ScaleX, - float ScaleY, - float ScaleZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixScaling(float ScaleX, float ScaleY, + float ScaleZ) noexcept { #if defined(_XM_NO_INTRINSICS_) XMMATRIX M; @@ -1388,8 +1463,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixScaling //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixScalingFromVector(FXMVECTOR Scale) noexcept -{ +inline XMMATRIX XM_CALLCONV +XMMatrixScalingFromVector(FXMVECTOR Scale) noexcept { #if defined(_XM_NO_INTRINSICS_) XMMATRIX M; @@ -1416,9 +1491,12 @@ inline XMMATRIX XM_CALLCONV XMMatrixScalingFromVector(FXMVECTOR Scale) noexcept #elif defined(_XM_ARM_NEON_INTRINSICS_) XMMATRIX M; - M.r[0] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(Scale), g_XMMaskX)); - M.r[1] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(Scale), g_XMMaskY)); - M.r[2] = vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(Scale), g_XMMaskZ)); + M.r[0] = vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(Scale), g_XMMaskX)); + M.r[1] = vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(Scale), g_XMMaskY)); + M.r[2] = vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(Scale), g_XMMaskZ)); M.r[3] = g_XMIdentityR3.v; return M; #elif defined(_XM_SSE_INTRINSICS_) @@ -1433,12 +1511,11 @@ inline XMMATRIX XM_CALLCONV XMMatrixScalingFromVector(FXMVECTOR Scale) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationX(float Angle) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixRotationX(float Angle) noexcept { #if defined(_XM_NO_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); XMMATRIX M; @@ -1464,8 +1541,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationX(float Angle) noexcept return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); const float32x4_t Zero = vdupq_n_f32(0); @@ -1483,8 +1560,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationX(float Angle) noexcept M.r[3] = g_XMIdentityR3.v; return M; #elif defined(_XM_SSE_INTRINSICS_) - float SinAngle; - float CosAngle; + float SinAngle; + float CosAngle; XMScalarSinCos(&SinAngle, &CosAngle, Angle); XMVECTOR vSin = _mm_set_ss(SinAngle); @@ -1506,12 +1583,11 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationX(float Angle) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationY(float Angle) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixRotationY(float Angle) noexcept { #if defined(_XM_NO_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); XMMATRIX M; @@ -1537,8 +1613,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationY(float Angle) noexcept return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); const float32x4_t Zero = vdupq_n_f32(0); @@ -1556,8 +1632,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationY(float Angle) noexcept M.r[3] = g_XMIdentityR3.v; return M; #elif defined(_XM_SSE_INTRINSICS_) - float SinAngle; - float CosAngle; + float SinAngle; + float CosAngle; XMScalarSinCos(&SinAngle, &CosAngle, Angle); XMVECTOR vSin = _mm_set_ss(SinAngle); @@ -1579,12 +1655,11 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationY(float Angle) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationZ(float Angle) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixRotationZ(float Angle) noexcept { #if defined(_XM_NO_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); XMMATRIX M; @@ -1610,8 +1685,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationZ(float Angle) noexcept return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); const float32x4_t Zero = vdupq_n_f32(0); @@ -1629,8 +1704,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationZ(float Angle) noexcept M.r[3] = g_XMIdentityR3.v; return M; #elif defined(_XM_SSE_INTRINSICS_) - float SinAngle; - float CosAngle; + float SinAngle; + float CosAngle; XMScalarSinCos(&SinAngle, &CosAngle, Angle); XMVECTOR vSin = _mm_set_ss(SinAngle); @@ -1652,13 +1727,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationZ(float Angle) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYaw -( - float Pitch, - float Yaw, - float Roll -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYaw(float Pitch, float Yaw, + float Roll) noexcept { #if defined(_XM_NO_INTRINSICS_) float cp = cosf(Pitch); float sp = sinf(Pitch); @@ -1698,11 +1768,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYaw //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYawFromVector -( - FXMVECTOR Angles // -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYawFromVector( + FXMVECTOR Angles // + ) noexcept { #if defined(_XM_NO_INTRINSICS_) float cp = cosf(Angles.vector4_f32[0]); float sp = sinf(Angles.vector4_f32[0]); @@ -1735,17 +1803,23 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYawFromVector M.m[3][3] = 1.0f; return M; #else - static const XMVECTORF32 Sign = { { { 1.0f, -1.0f, -1.0f, 1.0f } } }; + static const XMVECTORF32 Sign = {{{1.0f, -1.0f, -1.0f, 1.0f}}}; XMVECTOR SinAngles, CosAngles; XMVectorSinCos(&SinAngles, &CosAngles, Angles); - XMVECTOR P0 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR Y0 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR P1 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR Y1 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR P2 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR P3 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR P0 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR Y0 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR P1 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR Y1 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR P2 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR P3 = XMVectorPermute(SinAngles, CosAngles); XMVECTOR Y2 = XMVectorSplatX(SinAngles); XMVECTOR NS = XMVectorNegate(SinAngles); @@ -1755,9 +1829,12 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYawFromVector XMVECTOR Q2 = XMVectorMultiply(P2, Y2); Q2 = XMVectorMultiplyAdd(Q2, P3, Q1); - XMVECTOR V0 = XMVectorPermute(Q0, Q2); - XMVECTOR V1 = XMVectorPermute(Q0, Q2); - XMVECTOR V2 = XMVectorPermute(Q0, NS); + XMVECTOR V0 = XMVectorPermute(Q0, Q2); + XMVECTOR V1 = XMVectorPermute(Q0, Q2); + XMVECTOR V2 = XMVectorPermute(Q0, NS); XMMATRIX M; M.r[0] = XMVectorSelect(g_XMZero, V0, g_XMSelect1110.v); @@ -1770,16 +1847,12 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationRollPitchYawFromVector //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationNormal -( - FXMVECTOR NormalAxis, - float Angle -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixRotationNormal(FXMVECTOR NormalAxis, + float Angle) noexcept { #if defined(_XM_NO_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); XMVECTOR A = XMVectorSet(fSinAngle, fCosAngle, 1.0f - fCosAngle, 0.0f); @@ -1788,8 +1861,12 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationNormal XMVECTOR C1 = XMVectorSplatY(A); XMVECTOR C0 = XMVectorSplatX(A); - XMVECTOR N0 = XMVectorSwizzle(NormalAxis); - XMVECTOR N1 = XMVectorSwizzle(NormalAxis); + XMVECTOR N0 = + XMVectorSwizzle( + NormalAxis); + XMVECTOR N1 = + XMVectorSwizzle( + NormalAxis); XMVECTOR V0 = XMVectorMultiply(C2, N0); V0 = XMVectorMultiply(V0, N1); @@ -1801,19 +1878,24 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationNormal XMVECTOR R2 = XMVectorNegativeMultiplySubtract(C0, NormalAxis, V0); V0 = XMVectorSelect(A, R0, g_XMSelect1110.v); - XMVECTOR V1 = XMVectorPermute(R1, R2); - XMVECTOR V2 = XMVectorPermute(R1, R2); + XMVECTOR V1 = XMVectorPermute(R1, R2); + XMVECTOR V2 = XMVectorPermute(R1, R2); XMMATRIX M; - M.r[0] = XMVectorPermute(V0, V1); - M.r[1] = XMVectorPermute(V0, V1); - M.r[2] = XMVectorPermute(V0, V2); + M.r[0] = XMVectorPermute(V0, V1); + M.r[1] = XMVectorPermute(V0, V1); + M.r[2] = XMVectorPermute(V0, V2); M.r[3] = g_XMIdentityR3.v; return M; #elif defined(_XM_SSE_INTRINSICS_) - float fSinAngle; - float fCosAngle; + float fSinAngle; + float fCosAngle; XMScalarSinCos(&fSinAngle, &fCosAngle, Angle); XMVECTOR C2 = _mm_set_ps1(1.0f - fCosAngle); @@ -1860,12 +1942,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationNormal //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationAxis -( - FXMVECTOR Axis, - float Angle -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixRotationAxis(FXMVECTOR Axis, + float Angle) noexcept { assert(!XMVector3Equal(Axis, XMVectorZero())); assert(!XMVector3IsInfinite(Axis)); @@ -1875,8 +1953,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationAxis //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixRotationQuaternion(FXMVECTOR Quaternion) noexcept -{ +inline XMMATRIX XM_CALLCONV +XMMatrixRotationQuaternion(FXMVECTOR Quaternion) noexcept { #if defined(_XM_NO_INTRINSICS_) float qx = Quaternion.vector4_f32[0]; @@ -1913,39 +1991,52 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationQuaternion(FXMVECTOR Quaternion) noe return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Constant1110 = { { { 1.0f, 1.0f, 1.0f, 0.0f } } }; + static const XMVECTORF32 Constant1110 = {{{1.0f, 1.0f, 1.0f, 0.0f}}}; XMVECTOR Q0 = XMVectorAdd(Quaternion, Quaternion); XMVECTOR Q1 = XMVectorMultiply(Quaternion, Q0); - XMVECTOR V0 = XMVectorPermute(Q1, Constant1110.v); - XMVECTOR V1 = XMVectorPermute(Q1, Constant1110.v); + XMVECTOR V0 = XMVectorPermute(Q1, Constant1110.v); + XMVECTOR V1 = XMVectorPermute(Q1, Constant1110.v); XMVECTOR R0 = XMVectorSubtract(Constant1110, V0); R0 = XMVectorSubtract(R0, V1); - V0 = XMVectorSwizzle(Quaternion); - V1 = XMVectorSwizzle(Q0); + V0 = + XMVectorSwizzle( + Quaternion); + V1 = + XMVectorSwizzle( + Q0); V0 = XMVectorMultiply(V0, V1); V1 = XMVectorSplatW(Quaternion); - XMVECTOR V2 = XMVectorSwizzle(Q0); + XMVECTOR V2 = + XMVectorSwizzle( + Q0); V1 = XMVectorMultiply(V1, V2); XMVECTOR R1 = XMVectorAdd(V0, V1); XMVECTOR R2 = XMVectorSubtract(V0, V1); - V0 = XMVectorPermute(R1, R2); - V1 = XMVectorPermute(R1, R2); + V0 = XMVectorPermute(R1, R2); + V1 = XMVectorPermute(R1, R2); XMMATRIX M; - M.r[0] = XMVectorPermute(R0, V0); - M.r[1] = XMVectorPermute(R0, V0); - M.r[2] = XMVectorPermute(R0, V1); + M.r[0] = XMVectorPermute(R0, V0); + M.r[1] = XMVectorPermute(R0, V0); + M.r[2] = XMVectorPermute(R0, V1); M.r[3] = g_XMIdentityR3.v; return M; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Constant1110 = { { { 1.0f, 1.0f, 1.0f, 0.0f } } }; + static const XMVECTORF32 Constant1110 = {{{1.0f, 1.0f, 1.0f, 0.0f}}}; XMVECTOR Q0 = _mm_add_ps(Quaternion, Quaternion); XMVECTOR Q1 = _mm_mul_ps(Quaternion, Q0); @@ -1992,20 +2083,16 @@ inline XMMATRIX XM_CALLCONV XMMatrixRotationQuaternion(FXMVECTOR Quaternion) noe //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixTransformation2D -( - FXMVECTOR ScalingOrigin, - float ScalingOrientation, - FXMVECTOR Scaling, - FXMVECTOR RotationOrigin, - float Rotation, - GXMVECTOR Translation -) noexcept -{ - // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * MScalingOrientation * - // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; +inline XMMATRIX XM_CALLCONV XMMatrixTransformation2D( + FXMVECTOR ScalingOrigin, float ScalingOrientation, FXMVECTOR Scaling, + FXMVECTOR RotationOrigin, float Rotation, GXMVECTOR Translation) noexcept { + // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * + // MScalingOrientation * + // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * + // MRotationOrigin * MTranslation; - XMVECTOR VScalingOrigin = XMVectorSelect(g_XMSelect1100.v, ScalingOrigin, g_XMSelect1100.v); + XMVECTOR VScalingOrigin = + XMVectorSelect(g_XMSelect1100.v, ScalingOrigin, g_XMSelect1100.v); XMVECTOR NegScalingOrigin = XMVectorNegate(VScalingOrigin); XMMATRIX MScalingOriginI = XMMatrixTranslationFromVector(NegScalingOrigin); @@ -2013,9 +2100,11 @@ inline XMMATRIX XM_CALLCONV XMMatrixTransformation2D XMMATRIX MScalingOrientationT = XMMatrixTranspose(MScalingOrientation); XMVECTOR VScaling = XMVectorSelect(g_XMOne.v, Scaling, g_XMSelect1100.v); XMMATRIX MScaling = XMMatrixScalingFromVector(VScaling); - XMVECTOR VRotationOrigin = XMVectorSelect(g_XMSelect1100.v, RotationOrigin, g_XMSelect1100.v); + XMVECTOR VRotationOrigin = + XMVectorSelect(g_XMSelect1100.v, RotationOrigin, g_XMSelect1100.v); XMMATRIX MRotation = XMMatrixRotationZ(Rotation); - XMVECTOR VTranslation = XMVectorSelect(g_XMSelect1100.v, Translation, g_XMSelect1100.v); + XMVECTOR VTranslation = + XMVectorSelect(g_XMSelect1100.v, Translation, g_XMSelect1100.v); XMMATRIX M = XMMatrixMultiply(MScalingOriginI, MScalingOrientationT); M = XMMatrixMultiply(M, MScaling); @@ -2031,29 +2120,29 @@ inline XMMATRIX XM_CALLCONV XMMatrixTransformation2D //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixTransformation -( - FXMVECTOR ScalingOrigin, - FXMVECTOR ScalingOrientationQuaternion, - FXMVECTOR Scaling, - GXMVECTOR RotationOrigin, - HXMVECTOR RotationQuaternion, - HXMVECTOR Translation -) noexcept -{ - // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * MScalingOrientation * - // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; +inline XMMATRIX XM_CALLCONV XMMatrixTransformation( + FXMVECTOR ScalingOrigin, FXMVECTOR ScalingOrientationQuaternion, + FXMVECTOR Scaling, GXMVECTOR RotationOrigin, HXMVECTOR RotationQuaternion, + HXMVECTOR Translation) noexcept { + // M = Inverse(MScalingOrigin) * Transpose(MScalingOrientation) * MScaling * + // MScalingOrientation * + // MScalingOrigin * Inverse(MRotationOrigin) * MRotation * + // MRotationOrigin * MTranslation; - XMVECTOR VScalingOrigin = XMVectorSelect(g_XMSelect1110.v, ScalingOrigin, g_XMSelect1110.v); + XMVECTOR VScalingOrigin = + XMVectorSelect(g_XMSelect1110.v, ScalingOrigin, g_XMSelect1110.v); XMVECTOR NegScalingOrigin = XMVectorNegate(ScalingOrigin); XMMATRIX MScalingOriginI = XMMatrixTranslationFromVector(NegScalingOrigin); - XMMATRIX MScalingOrientation = XMMatrixRotationQuaternion(ScalingOrientationQuaternion); + XMMATRIX MScalingOrientation = + XMMatrixRotationQuaternion(ScalingOrientationQuaternion); XMMATRIX MScalingOrientationT = XMMatrixTranspose(MScalingOrientation); XMMATRIX MScaling = XMMatrixScalingFromVector(Scaling); - XMVECTOR VRotationOrigin = XMVectorSelect(g_XMSelect1110.v, RotationOrigin, g_XMSelect1110.v); + XMVECTOR VRotationOrigin = + XMVectorSelect(g_XMSelect1110.v, RotationOrigin, g_XMSelect1110.v); XMMATRIX MRotation = XMMatrixRotationQuaternion(RotationQuaternion); - XMVECTOR VTranslation = XMVectorSelect(g_XMSelect1110.v, Translation, g_XMSelect1110.v); + XMVECTOR VTranslation = + XMVectorSelect(g_XMSelect1110.v, Translation, g_XMSelect1110.v); XMMATRIX M; M = XMMatrixMultiply(MScalingOriginI, MScalingOrientationT); @@ -2069,21 +2158,19 @@ inline XMMATRIX XM_CALLCONV XMMatrixTransformation //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixAffineTransformation2D -( - FXMVECTOR Scaling, - FXMVECTOR RotationOrigin, - float Rotation, - FXMVECTOR Translation -) noexcept -{ - // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; +inline XMMATRIX XM_CALLCONV +XMMatrixAffineTransformation2D(FXMVECTOR Scaling, FXMVECTOR RotationOrigin, + float Rotation, FXMVECTOR Translation) noexcept { + // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * + // MTranslation; XMVECTOR VScaling = XMVectorSelect(g_XMOne.v, Scaling, g_XMSelect1100.v); XMMATRIX MScaling = XMMatrixScalingFromVector(VScaling); - XMVECTOR VRotationOrigin = XMVectorSelect(g_XMSelect1100.v, RotationOrigin, g_XMSelect1100.v); + XMVECTOR VRotationOrigin = + XMVectorSelect(g_XMSelect1100.v, RotationOrigin, g_XMSelect1100.v); XMMATRIX MRotation = XMMatrixRotationZ(Rotation); - XMVECTOR VTranslation = XMVectorSelect(g_XMSelect1100.v, Translation, g_XMSelect1100.v); + XMVECTOR VTranslation = + XMVectorSelect(g_XMSelect1100.v, Translation, g_XMSelect1100.v); XMMATRIX M; M = MScaling; @@ -2096,20 +2183,18 @@ inline XMMATRIX XM_CALLCONV XMMatrixAffineTransformation2D //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixAffineTransformation -( - FXMVECTOR Scaling, - FXMVECTOR RotationOrigin, - FXMVECTOR RotationQuaternion, - GXMVECTOR Translation -) noexcept -{ - // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * MTranslation; +inline XMMATRIX XM_CALLCONV XMMatrixAffineTransformation( + FXMVECTOR Scaling, FXMVECTOR RotationOrigin, FXMVECTOR RotationQuaternion, + GXMVECTOR Translation) noexcept { + // M = MScaling * Inverse(MRotationOrigin) * MRotation * MRotationOrigin * + // MTranslation; XMMATRIX MScaling = XMMatrixScalingFromVector(Scaling); - XMVECTOR VRotationOrigin = XMVectorSelect(g_XMSelect1110.v, RotationOrigin, g_XMSelect1110.v); + XMVECTOR VRotationOrigin = + XMVectorSelect(g_XMSelect1110.v, RotationOrigin, g_XMSelect1110.v); XMMATRIX MRotation = XMMatrixRotationQuaternion(RotationQuaternion); - XMVECTOR VTranslation = XMVectorSelect(g_XMSelect1110.v, Translation, g_XMSelect1110.v); + XMVECTOR VTranslation = + XMVectorSelect(g_XMSelect1110.v, Translation, g_XMSelect1110.v); XMMATRIX M; M = MScaling; @@ -2122,12 +2207,12 @@ inline XMMATRIX XM_CALLCONV XMMatrixAffineTransformation //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixReflect(FXMVECTOR ReflectionPlane) noexcept -{ +inline XMMATRIX XM_CALLCONV +XMMatrixReflect(FXMVECTOR ReflectionPlane) noexcept { assert(!XMVector3Equal(ReflectionPlane, XMVectorZero())); assert(!XMPlaneIsInfinite(ReflectionPlane)); - static const XMVECTORF32 NegativeTwo = { { { -2.0f, -2.0f, -2.0f, 0.0f } } }; + static const XMVECTORF32 NegativeTwo = {{{-2.0f, -2.0f, -2.0f, 0.0f}}}; XMVECTOR P = XMPlaneNormalize(ReflectionPlane); XMVECTOR S = XMVectorMultiply(P, NegativeTwo); @@ -2147,13 +2232,10 @@ inline XMMATRIX XM_CALLCONV XMMatrixReflect(FXMVECTOR ReflectionPlane) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixShadow -( - FXMVECTOR ShadowPlane, - FXMVECTOR LightPosition -) noexcept -{ - static const XMVECTORU32 Select0001 = { { { XM_SELECT_0, XM_SELECT_0, XM_SELECT_0, XM_SELECT_1 } } }; +inline XMMATRIX XM_CALLCONV XMMatrixShadow(FXMVECTOR ShadowPlane, + FXMVECTOR LightPosition) noexcept { + static const XMVECTORU32 Select0001 = { + {{XM_SELECT_0, XM_SELECT_0, XM_SELECT_0, XM_SELECT_1}}}; assert(!XMVector3Equal(ShadowPlane, XMVectorZero())); assert(!XMPlaneIsInfinite(ShadowPlane)); @@ -2182,39 +2264,27 @@ inline XMMATRIX XM_CALLCONV XMMatrixShadow // View and projection initialization operations //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixLookAtLH -( - FXMVECTOR EyePosition, - FXMVECTOR FocusPosition, - FXMVECTOR UpDirection -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixLookAtLH(FXMVECTOR EyePosition, + FXMVECTOR FocusPosition, + FXMVECTOR UpDirection) noexcept { XMVECTOR EyeDirection = XMVectorSubtract(FocusPosition, EyePosition); return XMMatrixLookToLH(EyePosition, EyeDirection, UpDirection); } //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixLookAtRH -( - FXMVECTOR EyePosition, - FXMVECTOR FocusPosition, - FXMVECTOR UpDirection -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixLookAtRH(FXMVECTOR EyePosition, + FXMVECTOR FocusPosition, + FXMVECTOR UpDirection) noexcept { XMVECTOR NegEyeDirection = XMVectorSubtract(EyePosition, FocusPosition); return XMMatrixLookToLH(EyePosition, NegEyeDirection, UpDirection); } //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixLookToLH -( - FXMVECTOR EyePosition, - FXMVECTOR EyeDirection, - FXMVECTOR UpDirection -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixLookToLH(FXMVECTOR EyePosition, + FXMVECTOR EyeDirection, + FXMVECTOR UpDirection) noexcept { assert(!XMVector3Equal(EyeDirection, XMVectorZero())); assert(!XMVector3IsInfinite(EyeDirection)); assert(!XMVector3Equal(UpDirection, XMVectorZero())); @@ -2246,13 +2316,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixLookToLH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixLookToRH -( - FXMVECTOR EyePosition, - FXMVECTOR EyeDirection, - FXMVECTOR UpDirection -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixLookToRH(FXMVECTOR EyePosition, + FXMVECTOR EyeDirection, + FXMVECTOR UpDirection) noexcept { XMVECTOR NegEyeDirection = XMVectorNegate(EyeDirection); return XMMatrixLookToLH(EyePosition, NegEyeDirection, UpDirection); } @@ -2261,17 +2327,12 @@ inline XMMATRIX XM_CALLCONV XMMatrixLookToRH #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable:28931, "PREfast noise: Esp:1266") +#pragma prefast(disable : 28931, "PREfast noise: Esp:1266") #endif -inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveLH -( - float ViewWidth, - float ViewHeight, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveLH(float ViewWidth, + float ViewHeight, float NearZ, + float FarZ) noexcept { assert(NearZ > 0.f && FarZ > 0.f); assert(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); assert(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); @@ -2319,12 +2380,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveLH float TwoNearZ = NearZ + NearZ; float fRange = FarZ / (FarZ - NearZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - TwoNearZ / ViewWidth, - TwoNearZ / ViewHeight, - fRange, - -fRange * NearZ - }; + XMVECTOR rMem = {TwoNearZ / ViewWidth, TwoNearZ / ViewHeight, fRange, + -fRange * NearZ}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -2351,14 +2408,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveLH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveRH -( - float ViewWidth, - float ViewHeight, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveRH(float ViewWidth, + float ViewHeight, float NearZ, + float FarZ) noexcept { assert(NearZ > 0.f && FarZ > 0.f); assert(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); assert(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); @@ -2407,12 +2459,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveRH float TwoNearZ = NearZ + NearZ; float fRange = FarZ / (NearZ - FarZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - TwoNearZ / ViewWidth, - TwoNearZ / ViewHeight, - fRange, - fRange * NearZ - }; + XMVECTOR rMem = {TwoNearZ / ViewWidth, TwoNearZ / ViewHeight, fRange, + fRange * NearZ}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -2425,7 +2473,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveRH vTemp = _mm_and_ps(vTemp, g_XMMaskY); M.r[1] = vTemp; // x=fRange,y=-fRange * NearZ,0,-1.0f - vValues = _mm_shuffle_ps(vValues, g_XMNegIdentityR3, _MM_SHUFFLE(3, 2, 3, 2)); + vValues = + _mm_shuffle_ps(vValues, g_XMNegIdentityR3, _MM_SHUFFLE(3, 2, 3, 2)); // 0,0,fRange,-1.0f vTemp = _mm_setzero_ps(); vTemp = _mm_shuffle_ps(vTemp, vValues, _MM_SHUFFLE(3, 0, 0, 0)); @@ -2439,14 +2488,10 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveRH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovLH -( - float FovAngleY, - float AspectRatio, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovLH(float FovAngleY, + float AspectRatio, + float NearZ, + float FarZ) noexcept { assert(NearZ > 0.f && FarZ > 0.f); assert(!XMScalarNearEqual(FovAngleY, 0.0f, 0.00001f * 2.0f)); assert(!XMScalarNearEqual(AspectRatio, 0.0f, 0.00001f)); @@ -2454,8 +2499,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovLH #if defined(_XM_NO_INTRINSICS_) - float SinFov; - float CosFov; + float SinFov; + float CosFov; XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); float Height = CosFov / SinFov; @@ -2485,8 +2530,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovLH return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) - float SinFov; - float CosFov; + float SinFov; + float CosFov; XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); float fRange = FarZ / (FarZ - NearZ); @@ -2501,19 +2546,14 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovLH M.r[3] = vsetq_lane_f32(-fRange * NearZ, Zero, 2); return M; #elif defined(_XM_SSE_INTRINSICS_) - float SinFov; - float CosFov; + float SinFov; + float CosFov; XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); float fRange = FarZ / (FarZ - NearZ); // Note: This is recorded on the stack float Height = CosFov / SinFov; - XMVECTOR rMem = { - Height / AspectRatio, - Height, - fRange, - -fRange * NearZ - }; + XMVECTOR rMem = {Height / AspectRatio, Height, fRange, -fRange * NearZ}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -2541,14 +2581,10 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovLH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovRH -( - float FovAngleY, - float AspectRatio, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovRH(float FovAngleY, + float AspectRatio, + float NearZ, + float FarZ) noexcept { assert(NearZ > 0.f && FarZ > 0.f); assert(!XMScalarNearEqual(FovAngleY, 0.0f, 0.00001f * 2.0f)); assert(!XMScalarNearEqual(AspectRatio, 0.0f, 0.00001f)); @@ -2556,8 +2592,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovRH #if defined(_XM_NO_INTRINSICS_) - float SinFov; - float CosFov; + float SinFov; + float CosFov; XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); float Height = CosFov / SinFov; @@ -2587,8 +2623,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovRH return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) - float SinFov; - float CosFov; + float SinFov; + float CosFov; XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); float fRange = FarZ / (NearZ - FarZ); float Height = CosFov / SinFov; @@ -2602,18 +2638,13 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovRH M.r[3] = vsetq_lane_f32(fRange * NearZ, Zero, 2); return M; #elif defined(_XM_SSE_INTRINSICS_) - float SinFov; - float CosFov; + float SinFov; + float CosFov; XMScalarSinCos(&SinFov, &CosFov, 0.5f * FovAngleY); float fRange = FarZ / (NearZ - FarZ); // Note: This is recorded on the stack float Height = CosFov / SinFov; - XMVECTOR rMem = { - Height / AspectRatio, - Height, - fRange, - fRange * NearZ - }; + XMVECTOR rMem = {Height / AspectRatio, Height, fRange, fRange * NearZ}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -2628,7 +2659,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovRH M.r[1] = vTemp; // x=fRange,y=-fRange * NearZ,0,-1.0f vTemp = _mm_setzero_ps(); - vValues = _mm_shuffle_ps(vValues, g_XMNegIdentityR3, _MM_SHUFFLE(3, 2, 3, 2)); + vValues = + _mm_shuffle_ps(vValues, g_XMNegIdentityR3, _MM_SHUFFLE(3, 2, 3, 2)); // 0,0,fRange,-1.0f vTemp = _mm_shuffle_ps(vTemp, vValues, _MM_SHUFFLE(3, 0, 0, 0)); M.r[2] = vTemp; @@ -2641,16 +2673,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveFovRH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterLH -( - float ViewLeft, - float ViewRight, - float ViewBottom, - float ViewTop, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterLH( + float ViewLeft, float ViewRight, float ViewBottom, float ViewTop, + float NearZ, float FarZ) noexcept { assert(NearZ > 0.f && FarZ > 0.f); assert(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); assert(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); @@ -2695,10 +2720,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterLH XMMATRIX M; M.r[0] = vsetq_lane_f32(TwoNearZ * ReciprocalWidth, Zero, 0); M.r[1] = vsetq_lane_f32(TwoNearZ * ReciprocalHeight, Zero, 1); - M.r[2] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, - -(ViewTop + ViewBottom) * ReciprocalHeight, - fRange, - 1.0f); + M.r[2] = + XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, + -(ViewTop + ViewBottom) * ReciprocalHeight, fRange, 1.0f); M.r[3] = vsetq_lane_f32(-fRange * NearZ, Zero, 2); return M; #elif defined(_XM_SSE_INTRINSICS_) @@ -2708,12 +2732,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterLH float ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); float fRange = FarZ / (FarZ - NearZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - TwoNearZ * ReciprocalWidth, - TwoNearZ * ReciprocalHeight, - -fRange * NearZ, - 0 - }; + XMVECTOR rMem = {TwoNearZ * ReciprocalWidth, TwoNearZ * ReciprocalHeight, + -fRange * NearZ, 0}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -2726,10 +2746,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterLH vTemp = _mm_and_ps(vTemp, g_XMMaskY); M.r[1] = vTemp; // 0,0,fRange,1.0f - M.r[2] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, - -(ViewTop + ViewBottom) * ReciprocalHeight, - fRange, - 1.0f); + M.r[2] = + XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, + -(ViewTop + ViewBottom) * ReciprocalHeight, fRange, 1.0f); // 0,0,-fRange * NearZ,0.0f vValues = _mm_and_ps(vValues, g_XMMaskZ); M.r[3] = vValues; @@ -2739,16 +2758,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterLH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterRH -( - float ViewLeft, - float ViewRight, - float ViewBottom, - float ViewTop, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterRH( + float ViewLeft, float ViewRight, float ViewBottom, float ViewTop, + float NearZ, float FarZ) noexcept { assert(NearZ > 0.f && FarZ > 0.f); assert(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); assert(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); @@ -2793,10 +2805,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterRH XMMATRIX M; M.r[0] = vsetq_lane_f32(TwoNearZ * ReciprocalWidth, Zero, 0); M.r[1] = vsetq_lane_f32(TwoNearZ * ReciprocalHeight, Zero, 1); - M.r[2] = XMVectorSet((ViewLeft + ViewRight) * ReciprocalWidth, - (ViewTop + ViewBottom) * ReciprocalHeight, - fRange, - -1.0f); + M.r[2] = + XMVectorSet((ViewLeft + ViewRight) * ReciprocalWidth, + (ViewTop + ViewBottom) * ReciprocalHeight, fRange, -1.0f); M.r[3] = vsetq_lane_f32(fRange * NearZ, Zero, 2); return M; #elif defined(_XM_SSE_INTRINSICS_) @@ -2806,12 +2817,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterRH float ReciprocalHeight = 1.0f / (ViewTop - ViewBottom); float fRange = FarZ / (NearZ - FarZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - TwoNearZ * ReciprocalWidth, - TwoNearZ * ReciprocalHeight, - fRange * NearZ, - 0 - }; + XMVECTOR rMem = {TwoNearZ * ReciprocalWidth, TwoNearZ * ReciprocalHeight, + fRange * NearZ, 0}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -2824,10 +2831,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterRH vTemp = _mm_and_ps(vTemp, g_XMMaskY); M.r[1] = vTemp; // 0,0,fRange,1.0f - M.r[2] = XMVectorSet((ViewLeft + ViewRight) * ReciprocalWidth, - (ViewTop + ViewBottom) * ReciprocalHeight, - fRange, - -1.0f); + M.r[2] = + XMVectorSet((ViewLeft + ViewRight) * ReciprocalWidth, + (ViewTop + ViewBottom) * ReciprocalHeight, fRange, -1.0f); // 0,0,-fRange * NearZ,0.0f vValues = _mm_and_ps(vValues, g_XMMaskZ); M.r[3] = vValues; @@ -2837,14 +2843,10 @@ inline XMMATRIX XM_CALLCONV XMMatrixPerspectiveOffCenterRH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixOrthographicLH -( - float ViewWidth, - float ViewHeight, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixOrthographicLH(float ViewWidth, + float ViewHeight, + float NearZ, + float FarZ) noexcept { assert(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); assert(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); assert(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); @@ -2889,12 +2891,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicLH XMMATRIX M; float fRange = 1.0f / (FarZ - NearZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - 2.0f / ViewWidth, - 2.0f / ViewHeight, - fRange, - -fRange * NearZ - }; + XMVECTOR rMem = {2.0f / ViewWidth, 2.0f / ViewHeight, fRange, + -fRange * NearZ}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -2921,14 +2919,10 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicLH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixOrthographicRH -( - float ViewWidth, - float ViewHeight, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixOrthographicRH(float ViewWidth, + float ViewHeight, + float NearZ, + float FarZ) noexcept { assert(!XMScalarNearEqual(ViewWidth, 0.0f, 0.00001f)); assert(!XMScalarNearEqual(ViewHeight, 0.0f, 0.00001f)); assert(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); @@ -2973,12 +2967,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicRH XMMATRIX M; float fRange = 1.0f / (NearZ - FarZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - 2.0f / ViewWidth, - 2.0f / ViewHeight, - fRange, - fRange * NearZ - }; + XMVECTOR rMem = {2.0f / ViewWidth, 2.0f / ViewHeight, fRange, + fRange * NearZ}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -3005,16 +2995,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicRH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterLH -( - float ViewLeft, - float ViewRight, - float ViewBottom, - float ViewTop, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterLH( + float ViewLeft, float ViewRight, float ViewBottom, float ViewTop, + float NearZ, float FarZ) noexcept { assert(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); assert(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); assert(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); @@ -3057,9 +3040,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterLH M.r[1] = vsetq_lane_f32(ReciprocalHeight + ReciprocalHeight, Zero, 1); M.r[2] = vsetq_lane_f32(fRange, Zero, 2); M.r[3] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, - -(ViewTop + ViewBottom) * ReciprocalHeight, - -fRange * NearZ, - 1.0f); + -(ViewTop + ViewBottom) * ReciprocalHeight, + -fRange * NearZ, 1.0f); return M; #elif defined(_XM_SSE_INTRINSICS_) XMMATRIX M; @@ -3067,18 +3049,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterLH float fReciprocalHeight = 1.0f / (ViewTop - ViewBottom); float fRange = 1.0f / (FarZ - NearZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - fReciprocalWidth, - fReciprocalHeight, - fRange, - 1.0f - }; - XMVECTOR rMem2 = { - -(ViewLeft + ViewRight), - -(ViewTop + ViewBottom), - -NearZ, - 1.0f - }; + XMVECTOR rMem = {fReciprocalWidth, fReciprocalHeight, fRange, 1.0f}; + XMVECTOR rMem2 = {-(ViewLeft + ViewRight), -(ViewTop + ViewBottom), -NearZ, + 1.0f}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -3096,7 +3069,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterLH vTemp = vValues; vTemp = _mm_and_ps(vTemp, g_XMMaskZ); M.r[2] = vTemp; - // -(ViewLeft + ViewRight)*fReciprocalWidth,-(ViewTop + ViewBottom)*fReciprocalHeight,fRange*-NearZ,1.0f + // -(ViewLeft + ViewRight)*fReciprocalWidth,-(ViewTop + + // ViewBottom)*fReciprocalHeight,fRange*-NearZ,1.0f vValues = _mm_mul_ps(vValues, rMem2); M.r[3] = vValues; return M; @@ -3105,16 +3079,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterLH //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterRH -( - float ViewLeft, - float ViewRight, - float ViewBottom, - float ViewTop, - float NearZ, - float FarZ -) noexcept -{ +inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterRH( + float ViewLeft, float ViewRight, float ViewBottom, float ViewTop, + float NearZ, float FarZ) noexcept { assert(!XMScalarNearEqual(ViewRight, ViewLeft, 0.00001f)); assert(!XMScalarNearEqual(ViewTop, ViewBottom, 0.00001f)); assert(!XMScalarNearEqual(FarZ, NearZ, 0.00001f)); @@ -3142,9 +3109,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterRH M.m[2][3] = 0.0f; M.r[3] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, - -(ViewTop + ViewBottom) * ReciprocalHeight, - fRange * NearZ, - 1.0f); + -(ViewTop + ViewBottom) * ReciprocalHeight, + fRange * NearZ, 1.0f); return M; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -3157,9 +3123,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterRH M.r[1] = vsetq_lane_f32(ReciprocalHeight + ReciprocalHeight, Zero, 1); M.r[2] = vsetq_lane_f32(fRange, Zero, 2); M.r[3] = XMVectorSet(-(ViewLeft + ViewRight) * ReciprocalWidth, - -(ViewTop + ViewBottom) * ReciprocalHeight, - fRange * NearZ, - 1.0f); + -(ViewTop + ViewBottom) * ReciprocalHeight, + fRange * NearZ, 1.0f); return M; #elif defined(_XM_SSE_INTRINSICS_) XMMATRIX M; @@ -3167,18 +3132,9 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterRH float fReciprocalHeight = 1.0f / (ViewTop - ViewBottom); float fRange = 1.0f / (NearZ - FarZ); // Note: This is recorded on the stack - XMVECTOR rMem = { - fReciprocalWidth, - fReciprocalHeight, - fRange, - 1.0f - }; - XMVECTOR rMem2 = { - -(ViewLeft + ViewRight), - -(ViewTop + ViewBottom), - NearZ, - 1.0f - }; + XMVECTOR rMem = {fReciprocalWidth, fReciprocalHeight, fRange, 1.0f}; + XMVECTOR rMem2 = {-(ViewLeft + ViewRight), -(ViewTop + ViewBottom), NearZ, + 1.0f}; // Copy from memory to SSE register XMVECTOR vValues = rMem; XMVECTOR vTemp = _mm_setzero_ps(); @@ -3196,7 +3152,8 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterRH vTemp = vValues; vTemp = _mm_and_ps(vTemp, g_XMMaskZ); M.r[2] = vTemp; - // -(ViewLeft + ViewRight)*fReciprocalWidth,-(ViewTop + ViewBottom)*fReciprocalHeight,fRange*-NearZ,1.0f + // -(ViewLeft + ViewRight)*fReciprocalWidth,-(ViewTop + + // ViewBottom)*fReciprocalHeight,fRange*-NearZ,1.0f vValues = _mm_mul_ps(vValues, rMem2); M.r[3] = vValues; return M; @@ -3215,14 +3172,10 @@ inline XMMATRIX XM_CALLCONV XMMatrixOrthographicOffCenterRH //------------------------------------------------------------------------------ -inline XMMATRIX::XMMATRIX -( - float m00, float m01, float m02, float m03, - float m10, float m11, float m12, float m13, - float m20, float m21, float m22, float m23, - float m30, float m31, float m32, float m33 -) noexcept -{ +inline XMMATRIX::XMMATRIX(float m00, float m01, float m02, float m03, float m10, + float m11, float m12, float m13, float m20, float m21, + float m22, float m23, float m30, float m31, float m32, + float m33) noexcept { r[0] = XMVectorSet(m00, m01, m02, m03); r[1] = XMVectorSet(m10, m11, m12, m13); r[2] = XMVectorSet(m20, m21, m22, m23); @@ -3230,9 +3183,7 @@ inline XMMATRIX::XMMATRIX } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMMATRIX::XMMATRIX(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMMATRIX::XMMATRIX(const float* pArray) noexcept { assert(pArray != nullptr); r[0] = XMLoadFloat4(reinterpret_cast(pArray)); r[1] = XMLoadFloat4(reinterpret_cast(pArray + 4)); @@ -3242,8 +3193,7 @@ inline XMMATRIX::XMMATRIX(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XMMATRIX::operator- () const noexcept -{ +inline XMMATRIX XMMATRIX::operator-() const noexcept { XMMATRIX R; R.r[0] = XMVectorNegate(r[0]); R.r[1] = XMVectorNegate(r[1]); @@ -3254,8 +3204,7 @@ inline XMMATRIX XMMATRIX::operator- () const noexcept //------------------------------------------------------------------------------ -inline XMMATRIX& XM_CALLCONV XMMATRIX::operator+= (FXMMATRIX M) noexcept -{ +inline XMMATRIX& XM_CALLCONV XMMATRIX::operator+=(FXMMATRIX M) noexcept { r[0] = XMVectorAdd(r[0], M.r[0]); r[1] = XMVectorAdd(r[1], M.r[1]); r[2] = XMVectorAdd(r[2], M.r[2]); @@ -3265,8 +3214,7 @@ inline XMMATRIX& XM_CALLCONV XMMATRIX::operator+= (FXMMATRIX M) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX& XM_CALLCONV XMMATRIX::operator-= (FXMMATRIX M) noexcept -{ +inline XMMATRIX& XM_CALLCONV XMMATRIX::operator-=(FXMMATRIX M) noexcept { r[0] = XMVectorSubtract(r[0], M.r[0]); r[1] = XMVectorSubtract(r[1], M.r[1]); r[2] = XMVectorSubtract(r[2], M.r[2]); @@ -3276,16 +3224,14 @@ inline XMMATRIX& XM_CALLCONV XMMATRIX::operator-= (FXMMATRIX M) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX& XM_CALLCONV XMMATRIX::operator*=(FXMMATRIX M) noexcept -{ +inline XMMATRIX& XM_CALLCONV XMMATRIX::operator*=(FXMMATRIX M) noexcept { *this = XMMatrixMultiply(*this, M); return *this; } //------------------------------------------------------------------------------ -inline XMMATRIX& XMMATRIX::operator*= (float S) noexcept -{ +inline XMMATRIX& XMMATRIX::operator*=(float S) noexcept { r[0] = XMVectorScale(r[0], S); r[1] = XMVectorScale(r[1], S); r[2] = XMVectorScale(r[2], S); @@ -3295,8 +3241,7 @@ inline XMMATRIX& XMMATRIX::operator*= (float S) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX& XMMATRIX::operator/= (float S) noexcept -{ +inline XMMATRIX& XMMATRIX::operator/=(float S) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR vS = XMVectorReplicate(S); r[0] = XMVectorDivide(r[0], vS); @@ -3305,7 +3250,8 @@ inline XMMATRIX& XMMATRIX::operator/= (float S) noexcept r[3] = XMVectorDivide(r[3], vS); return *this; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ float32x4_t vS = vdupq_n_f32(S); r[0] = vdivq_f32(r[0], vS); r[1] = vdivq_f32(r[1], vS); @@ -3338,8 +3284,7 @@ inline XMMATRIX& XMMATRIX::operator/= (float S) noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMATRIX::operator+ (FXMMATRIX M) const noexcept -{ +inline XMMATRIX XM_CALLCONV XMMATRIX::operator+(FXMMATRIX M) const noexcept { XMMATRIX R; R.r[0] = XMVectorAdd(r[0], M.r[0]); R.r[1] = XMVectorAdd(r[1], M.r[1]); @@ -3350,8 +3295,7 @@ inline XMMATRIX XM_CALLCONV XMMATRIX::operator+ (FXMMATRIX M) const noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMATRIX::operator- (FXMMATRIX M) const noexcept -{ +inline XMMATRIX XM_CALLCONV XMMATRIX::operator-(FXMMATRIX M) const noexcept { XMMATRIX R; R.r[0] = XMVectorSubtract(r[0], M.r[0]); R.r[1] = XMVectorSubtract(r[1], M.r[1]); @@ -3362,15 +3306,13 @@ inline XMMATRIX XM_CALLCONV XMMATRIX::operator- (FXMMATRIX M) const noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV XMMATRIX::operator*(FXMMATRIX M) const noexcept -{ +inline XMMATRIX XM_CALLCONV XMMATRIX::operator*(FXMMATRIX M) const noexcept { return XMMatrixMultiply(*this, M); } //------------------------------------------------------------------------------ -inline XMMATRIX XMMATRIX::operator* (float S) const noexcept -{ +inline XMMATRIX XMMATRIX::operator*(float S) const noexcept { XMMATRIX R; R.r[0] = XMVectorScale(r[0], S); R.r[1] = XMVectorScale(r[1], S); @@ -3381,8 +3323,7 @@ inline XMMATRIX XMMATRIX::operator* (float S) const noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XMMATRIX::operator/ (float S) const noexcept -{ +inline XMMATRIX XMMATRIX::operator/(float S) const noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR vS = XMVectorReplicate(S); XMMATRIX R; @@ -3392,7 +3333,8 @@ inline XMMATRIX XMMATRIX::operator/ (float S) const noexcept R.r[3] = XMVectorDivide(r[3], vS); return R; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ float32x4_t vS = vdupq_n_f32(S); XMMATRIX R; R.r[0] = vdivq_f32(r[0], vS); @@ -3428,12 +3370,7 @@ inline XMMATRIX XMMATRIX::operator/ (float S) const noexcept //------------------------------------------------------------------------------ -inline XMMATRIX XM_CALLCONV operator* -( - float S, - FXMMATRIX M - ) noexcept -{ +inline XMMATRIX XM_CALLCONV operator*(float S, FXMMATRIX M) noexcept { XMMATRIX R; R.r[0] = XMVectorScale(M.r[0], S); R.r[1] = XMVectorScale(M.r[1], S); @@ -3449,14 +3386,11 @@ inline XMMATRIX XM_CALLCONV operator* ****************************************************************************/ //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT3X3::XMFLOAT3X3(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT3X3::XMFLOAT3X3( + const float* pArray) noexcept { assert(pArray != nullptr); - for (size_t Row = 0; Row < 3; Row++) - { - for (size_t Column = 0; Column < 3; Column++) - { + for (size_t Row = 0; Row < 3; Row++) { + for (size_t Column = 0; Column < 3; Column++) { m[Row][Column] = pArray[Row * 3 + Column]; } } @@ -3469,9 +3403,8 @@ inline XMFLOAT3X3::XMFLOAT3X3(const float* pArray) noexcept ****************************************************************************/ //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT4X3::XMFLOAT4X3(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT4X3::XMFLOAT4X3( + const float* pArray) noexcept { assert(pArray != nullptr); m[0][0] = pArray[0]; @@ -3492,15 +3425,14 @@ inline XMFLOAT4X3::XMFLOAT4X3(const float* pArray) noexcept } /**************************************************************************** -* -* XMFLOAT3X4 operators -* -****************************************************************************/ + * + * XMFLOAT3X4 operators + * + ****************************************************************************/ //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT3X4::XMFLOAT3X4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT3X4::XMFLOAT3X4( + const float* pArray) noexcept { assert(pArray != nullptr); m[0][0] = pArray[0]; @@ -3526,9 +3458,8 @@ inline XMFLOAT3X4::XMFLOAT3X4(const float* pArray) noexcept ****************************************************************************/ //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT4X4::XMFLOAT4X4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT4X4::XMFLOAT4X4( + const float* pArray) noexcept { assert(pArray != nullptr); m[0][0] = pArray[0]; @@ -3551,4 +3482,3 @@ inline XMFLOAT4X4::XMFLOAT4X4(const float* pArray) noexcept m[3][2] = pArray[14]; m[3][3] = pArray[15]; } - diff --git a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMisc.inl b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMisc.inl index 7a21dc8b8..1e2869428 100644 --- a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMisc.inl +++ b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathMisc.inl @@ -21,44 +21,32 @@ //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMQuaternionEqual -( - FXMVECTOR Q1, - FXMVECTOR Q2 -) noexcept -{ +inline bool XM_CALLCONV XMQuaternionEqual(FXMVECTOR Q1, FXMVECTOR Q2) noexcept { return XMVector4Equal(Q1, Q2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMQuaternionNotEqual -( - FXMVECTOR Q1, - FXMVECTOR Q2 -) noexcept -{ +inline bool XM_CALLCONV XMQuaternionNotEqual(FXMVECTOR Q1, + FXMVECTOR Q2) noexcept { return XMVector4NotEqual(Q1, Q2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMQuaternionIsNaN(FXMVECTOR Q) noexcept -{ +inline bool XM_CALLCONV XMQuaternionIsNaN(FXMVECTOR Q) noexcept { return XMVector4IsNaN(Q); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMQuaternionIsInfinite(FXMVECTOR Q) noexcept -{ +inline bool XM_CALLCONV XMQuaternionIsInfinite(FXMVECTOR Q) noexcept { return XMVector4IsInfinite(Q); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMQuaternionIsIdentity(FXMVECTOR Q) noexcept -{ +inline bool XM_CALLCONV XMQuaternionIsIdentity(FXMVECTOR Q) noexcept { return XMVector4Equal(Q, g_XMIdentityR3.v); } @@ -68,24 +56,17 @@ inline bool XM_CALLCONV XMQuaternionIsIdentity(FXMVECTOR Q) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionDot -( - FXMVECTOR Q1, - FXMVECTOR Q2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionDot(FXMVECTOR Q1, + FXMVECTOR Q2) noexcept { return XMVector4Dot(Q1, Q2); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionMultiply -( - FXMVECTOR Q1, - FXMVECTOR Q2 -) noexcept -{ - // Returns the product Q2*Q1 (which is the concatenation of a rotation Q1 followed by the rotation Q2) +inline XMVECTOR XM_CALLCONV XMQuaternionMultiply(FXMVECTOR Q1, + FXMVECTOR Q2) noexcept { + // Returns the product Q2*Q1 (which is the concatenation of a rotation Q1 + // followed by the rotation Q2) // [ (Q2.w * Q1.x) + (Q2.x * Q1.w) + (Q2.y * Q1.z) - (Q2.z * Q1.y), // (Q2.w * Q1.y) - (Q2.x * Q1.z) + (Q2.y * Q1.w) + (Q2.z * Q1.x), @@ -93,17 +74,27 @@ inline XMVECTOR XM_CALLCONV XMQuaternionMultiply // (Q2.w * Q1.w) - (Q2.x * Q1.x) - (Q2.y * Q1.y) - (Q2.z * Q1.z) ] #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - (Q2.vector4_f32[3] * Q1.vector4_f32[0]) + (Q2.vector4_f32[0] * Q1.vector4_f32[3]) + (Q2.vector4_f32[1] * Q1.vector4_f32[2]) - (Q2.vector4_f32[2] * Q1.vector4_f32[1]), - (Q2.vector4_f32[3] * Q1.vector4_f32[1]) - (Q2.vector4_f32[0] * Q1.vector4_f32[2]) + (Q2.vector4_f32[1] * Q1.vector4_f32[3]) + (Q2.vector4_f32[2] * Q1.vector4_f32[0]), - (Q2.vector4_f32[3] * Q1.vector4_f32[2]) + (Q2.vector4_f32[0] * Q1.vector4_f32[1]) - (Q2.vector4_f32[1] * Q1.vector4_f32[0]) + (Q2.vector4_f32[2] * Q1.vector4_f32[3]), - (Q2.vector4_f32[3] * Q1.vector4_f32[3]) - (Q2.vector4_f32[0] * Q1.vector4_f32[0]) - (Q2.vector4_f32[1] * Q1.vector4_f32[1]) - (Q2.vector4_f32[2] * Q1.vector4_f32[2]) - } } }; + XMVECTORF32 Result = {{{(Q2.vector4_f32[3] * Q1.vector4_f32[0]) + + (Q2.vector4_f32[0] * Q1.vector4_f32[3]) + + (Q2.vector4_f32[1] * Q1.vector4_f32[2]) - + (Q2.vector4_f32[2] * Q1.vector4_f32[1]), + (Q2.vector4_f32[3] * Q1.vector4_f32[1]) - + (Q2.vector4_f32[0] * Q1.vector4_f32[2]) + + (Q2.vector4_f32[1] * Q1.vector4_f32[3]) + + (Q2.vector4_f32[2] * Q1.vector4_f32[0]), + (Q2.vector4_f32[3] * Q1.vector4_f32[2]) + + (Q2.vector4_f32[0] * Q1.vector4_f32[1]) - + (Q2.vector4_f32[1] * Q1.vector4_f32[0]) + + (Q2.vector4_f32[2] * Q1.vector4_f32[3]), + (Q2.vector4_f32[3] * Q1.vector4_f32[3]) - + (Q2.vector4_f32[0] * Q1.vector4_f32[0]) - + (Q2.vector4_f32[1] * Q1.vector4_f32[1]) - + (Q2.vector4_f32[2] * Q1.vector4_f32[2])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 ControlWZYX = { { { 1.0f, -1.0f, 1.0f, -1.0f } } }; - static const XMVECTORF32 ControlZWXY = { { { 1.0f, 1.0f, -1.0f, -1.0f } } }; - static const XMVECTORF32 ControlYXWZ = { { { -1.0f, 1.0f, 1.0f, -1.0f } } }; + static const XMVECTORF32 ControlWZYX = {{{1.0f, -1.0f, 1.0f, -1.0f}}}; + static const XMVECTORF32 ControlZWXY = {{{1.0f, 1.0f, -1.0f, -1.0f}}}; + static const XMVECTORF32 ControlYXWZ = {{{-1.0f, 1.0f, 1.0f, -1.0f}}}; float32x2_t Q2L = vget_low_f32(Q2); float32x2_t Q2H = vget_high_f32(Q2); @@ -131,9 +122,9 @@ inline XMVECTOR XM_CALLCONV XMQuaternionMultiply vResult = vmlaq_f32(vResult, Q2Z, ControlYXWZ); return vResult; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ControlWZYX = { { { 1.0f, -1.0f, 1.0f, -1.0f } } }; - static const XMVECTORF32 ControlZWXY = { { { 1.0f, 1.0f, -1.0f, -1.0f } } }; - static const XMVECTORF32 ControlYXWZ = { { { -1.0f, 1.0f, 1.0f, -1.0f } } }; + static const XMVECTORF32 ControlWZYX = {{{1.0f, -1.0f, 1.0f, -1.0f}}}; + static const XMVECTORF32 ControlZWXY = {{{1.0f, 1.0f, -1.0f, -1.0f}}}; + static const XMVECTORF32 ControlYXWZ = {{{-1.0f, 1.0f, 1.0f, -1.0f}}}; // Copy to SSE registers and use as few as possible for x86 XMVECTOR Q2X = Q2; XMVECTOR Q2Y = Q2; @@ -170,64 +161,53 @@ inline XMVECTOR XM_CALLCONV XMQuaternionMultiply //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionLengthSq(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionLengthSq(FXMVECTOR Q) noexcept { return XMVector4LengthSq(Q); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionReciprocalLength(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionReciprocalLength(FXMVECTOR Q) noexcept { return XMVector4ReciprocalLength(Q); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionLength(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionLength(FXMVECTOR Q) noexcept { return XMVector4Length(Q); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionNormalizeEst(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionNormalizeEst(FXMVECTOR Q) noexcept { return XMVector4NormalizeEst(Q); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionNormalize(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionNormalize(FXMVECTOR Q) noexcept { return XMVector4Normalize(Q); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionConjugate(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionConjugate(FXMVECTOR Q) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - -Q.vector4_f32[0], - -Q.vector4_f32[1], - -Q.vector4_f32[2], - Q.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{-Q.vector4_f32[0], -Q.vector4_f32[1], + -Q.vector4_f32[2], Q.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 NegativeOne3 = { { { -1.0f, -1.0f, -1.0f, 1.0f } } }; + static const XMVECTORF32 NegativeOne3 = {{{-1.0f, -1.0f, -1.0f, 1.0f}}}; return vmulq_f32(Q, NegativeOne3.v); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 NegativeOne3 = { { { -1.0f, -1.0f, -1.0f, 1.0f } } }; + static const XMVECTORF32 NegativeOne3 = {{{-1.0f, -1.0f, -1.0f, 1.0f}}}; return _mm_mul_ps(Q, NegativeOne3); #endif } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionInverse(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionInverse(FXMVECTOR Q) noexcept { XMVECTOR L = XMVector4LengthSq(Q); XMVECTOR Conjugate = XMQuaternionConjugate(Q); @@ -242,9 +222,9 @@ inline XMVECTOR XM_CALLCONV XMQuaternionInverse(FXMVECTOR Q) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionLn(FXMVECTOR Q) noexcept -{ - static const XMVECTORF32 OneMinusEpsilon = { { { 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f } } }; +inline XMVECTOR XM_CALLCONV XMQuaternionLn(FXMVECTOR Q) noexcept { + static const XMVECTORF32 OneMinusEpsilon = { + {{1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f}}}; XMVECTOR QW = XMVectorSplatW(Q); XMVECTOR Q0 = XMVectorSelect(g_XMSelect1110.v, Q, g_XMSelect1110.v); @@ -264,8 +244,7 @@ inline XMVECTOR XM_CALLCONV XMQuaternionLn(FXMVECTOR Q) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionExp(FXMVECTOR Q) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionExp(FXMVECTOR Q) noexcept { XMVECTOR Theta = XMVector3Length(Q); XMVECTOR SinTheta, CosTheta; @@ -286,33 +265,27 @@ inline XMVECTOR XM_CALLCONV XMQuaternionExp(FXMVECTOR Q) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionSlerp -( - FXMVECTOR Q0, - FXMVECTOR Q1, - float t -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionSlerp(FXMVECTOR Q0, FXMVECTOR Q1, + float t) noexcept { XMVECTOR T = XMVectorReplicate(t); return XMQuaternionSlerpV(Q0, Q1, T); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionSlerpV -( - FXMVECTOR Q0, - FXMVECTOR Q1, - FXMVECTOR T -) noexcept -{ - assert((XMVectorGetY(T) == XMVectorGetX(T)) && (XMVectorGetZ(T) == XMVectorGetX(T)) && (XMVectorGetW(T) == XMVectorGetX(T))); +inline XMVECTOR XM_CALLCONV XMQuaternionSlerpV(FXMVECTOR Q0, FXMVECTOR Q1, + FXMVECTOR T) noexcept { + assert((XMVectorGetY(T) == XMVectorGetX(T)) && + (XMVectorGetZ(T) == XMVectorGetX(T)) && + (XMVectorGetW(T) == XMVectorGetX(T))); - // Result = Q0 * sin((1.0 - t) * Omega) / sin(Omega) + Q1 * sin(t * Omega) / sin(Omega) + // Result = Q0 * sin((1.0 - t) * Omega) / sin(Omega) + Q1 * sin(t * Omega) / + // sin(Omega) #if defined(_XM_NO_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) - const XMVECTORF32 OneMinusEpsilon = { { { 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f } } }; + const XMVECTORF32 OneMinusEpsilon = { + {{1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f}}}; XMVECTOR CosOmega = XMQuaternionDot(Q0, Q1); @@ -324,7 +297,8 @@ inline XMVECTOR XM_CALLCONV XMQuaternionSlerpV Control = XMVectorLess(CosOmega, OneMinusEpsilon); - XMVECTOR SinOmega = XMVectorNegativeMultiplySubtract(CosOmega, CosOmega, g_XMOne.v); + XMVECTOR SinOmega = + XMVectorNegativeMultiplySubtract(CosOmega, CosOmega, g_XMOne.v); SinOmega = XMVectorSqrt(SinOmega); XMVECTOR Omega = XMVectorATan2(SinOmega, CosOmega); @@ -354,8 +328,10 @@ inline XMVECTOR XM_CALLCONV XMQuaternionSlerpV return Result; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 OneMinusEpsilon = { { { 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f } } }; - static const XMVECTORU32 SignMask2 = { { { 0x80000000, 0x00000000, 0x00000000, 0x00000000 } } }; + static const XMVECTORF32 OneMinusEpsilon = { + {{1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f, 1.0f - 0.00001f}}}; + static const XMVECTORU32 SignMask2 = { + {{0x80000000, 0x00000000, 0x00000000, 0x00000000}}}; XMVECTOR CosOmega = XMQuaternionDot(Q0, Q1); @@ -397,31 +373,21 @@ inline XMVECTOR XM_CALLCONV XMQuaternionSlerpV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionSquad -( - FXMVECTOR Q0, - FXMVECTOR Q1, - FXMVECTOR Q2, - GXMVECTOR Q3, - float t -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionSquad(FXMVECTOR Q0, FXMVECTOR Q1, + FXMVECTOR Q2, GXMVECTOR Q3, + float t) noexcept { XMVECTOR T = XMVectorReplicate(t); return XMQuaternionSquadV(Q0, Q1, Q2, Q3, T); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionSquadV -( - FXMVECTOR Q0, - FXMVECTOR Q1, - FXMVECTOR Q2, - GXMVECTOR Q3, - HXMVECTOR T -) noexcept -{ - assert((XMVectorGetY(T) == XMVectorGetX(T)) && (XMVectorGetZ(T) == XMVectorGetX(T)) && (XMVectorGetW(T) == XMVectorGetX(T))); +inline XMVECTOR XM_CALLCONV XMQuaternionSquadV(FXMVECTOR Q0, FXMVECTOR Q1, + FXMVECTOR Q2, GXMVECTOR Q3, + HXMVECTOR T) noexcept { + assert((XMVectorGetY(T) == XMVectorGetX(T)) && + (XMVectorGetZ(T) == XMVectorGetX(T)) && + (XMVectorGetW(T) == XMVectorGetX(T))); XMVECTOR TP = T; const XMVECTOR Two = XMVectorSplatConstant(2, 0); @@ -438,18 +404,9 @@ inline XMVECTOR XM_CALLCONV XMQuaternionSquadV } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMQuaternionSquadSetup -( - XMVECTOR* pA, - XMVECTOR* pB, - XMVECTOR* pC, - FXMVECTOR Q0, - FXMVECTOR Q1, - FXMVECTOR Q2, - GXMVECTOR Q3 -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMQuaternionSquadSetup(XMVECTOR* pA, XMVECTOR* pB, XMVECTOR* pC, FXMVECTOR Q0, + FXMVECTOR Q1, FXMVECTOR Q2, GXMVECTOR Q3) noexcept { assert(pA); assert(pB); assert(pC); @@ -485,8 +442,10 @@ inline void XM_CALLCONV XMQuaternionSquadSetup const XMVECTOR NegativeOneQuarter = XMVectorSplatConstant(-1, 2); - XMVECTOR ExpQ02 = XMVectorMultiply(XMVectorAdd(LnQ0, LnQ2), NegativeOneQuarter); - XMVECTOR ExpQ13 = XMVectorMultiply(XMVectorAdd(LnQ1, LnQ3), NegativeOneQuarter); + XMVECTOR ExpQ02 = + XMVectorMultiply(XMVectorAdd(LnQ0, LnQ2), NegativeOneQuarter); + XMVECTOR ExpQ13 = + XMVectorMultiply(XMVectorAdd(LnQ1, LnQ3), NegativeOneQuarter); ExpQ02 = XMQuaternionExp(ExpQ02); ExpQ13 = XMQuaternionExp(ExpQ13); @@ -497,24 +456,15 @@ inline void XM_CALLCONV XMQuaternionSquadSetup //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionBaryCentric -( - FXMVECTOR Q0, - FXMVECTOR Q1, - FXMVECTOR Q2, - float f, - float g -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionBaryCentric(FXMVECTOR Q0, FXMVECTOR Q1, + FXMVECTOR Q2, float f, + float g) noexcept { float s = f + g; XMVECTOR Result; - if ((s < 0.00001f) && (s > -0.00001f)) - { + if ((s < 0.00001f) && (s > -0.00001f)) { Result = Q0; - } - else - { + } else { XMVECTOR Q01 = XMQuaternionSlerp(Q0, Q1, s); XMVECTOR Q02 = XMQuaternionSlerp(Q0, Q2, s); @@ -526,29 +476,24 @@ inline XMVECTOR XM_CALLCONV XMQuaternionBaryCentric //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionBaryCentricV -( - FXMVECTOR Q0, - FXMVECTOR Q1, - FXMVECTOR Q2, - GXMVECTOR F, - HXMVECTOR G -) noexcept -{ - assert((XMVectorGetY(F) == XMVectorGetX(F)) && (XMVectorGetZ(F) == XMVectorGetX(F)) && (XMVectorGetW(F) == XMVectorGetX(F))); - assert((XMVectorGetY(G) == XMVectorGetX(G)) && (XMVectorGetZ(G) == XMVectorGetX(G)) && (XMVectorGetW(G) == XMVectorGetX(G))); +inline XMVECTOR XM_CALLCONV XMQuaternionBaryCentricV(FXMVECTOR Q0, FXMVECTOR Q1, + FXMVECTOR Q2, GXMVECTOR F, + HXMVECTOR G) noexcept { + assert((XMVectorGetY(F) == XMVectorGetX(F)) && + (XMVectorGetZ(F) == XMVectorGetX(F)) && + (XMVectorGetW(F) == XMVectorGetX(F))); + assert((XMVectorGetY(G) == XMVectorGetX(G)) && + (XMVectorGetZ(G) == XMVectorGetX(G)) && + (XMVectorGetW(G) == XMVectorGetX(G))); const XMVECTOR Epsilon = XMVectorSplatConstant(1, 16); XMVECTOR S = XMVectorAdd(F, G); XMVECTOR Result; - if (XMVector4InBounds(S, Epsilon)) - { + if (XMVector4InBounds(S, Epsilon)) { Result = Q0; - } - else - { + } else { XMVECTOR Q01 = XMQuaternionSlerpV(Q0, Q1, S); XMVECTOR Q02 = XMQuaternionSlerpV(Q0, Q2, S); XMVECTOR GS = XMVectorReciprocal(S); @@ -566,20 +511,14 @@ inline XMVECTOR XM_CALLCONV XMQuaternionBaryCentricV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionIdentity() noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionIdentity() noexcept { return g_XMIdentityR3.v; } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionRotationRollPitchYaw -( - float Pitch, - float Yaw, - float Roll -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMQuaternionRotationRollPitchYaw(float Pitch, float Yaw, float Roll) noexcept { #if defined(_XM_NO_INTRINSICS_) const float halfpitch = Pitch * 0.5f; float cp = cosf(halfpitch); @@ -593,12 +532,9 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationRollPitchYaw float cr = cosf(halfroll); float sr = sinf(halfroll); - XMVECTORF32 vResult = { { { - cr * sp * cy + sr * cp * sy, - cr * cp * sy - sr * sp * cy, - sr * cp * cy - cr * sp * sy, - cr * cp * cy + sr * sp * sy - } } }; + XMVECTORF32 vResult = { + {{cr * sp * cy + sr * cp * sy, cr * cp * sy - sr * sp * cy, + sr * cp * cy - cr * sp * sy, cr * cp * cy + sr * sp * sy}}}; return vResult; #else XMVECTOR Angles = XMVectorSet(Pitch, Yaw, Roll, 0.0f); @@ -608,11 +544,9 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationRollPitchYaw //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionRotationRollPitchYawFromVector -( - FXMVECTOR Angles // -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionRotationRollPitchYawFromVector( + FXMVECTOR Angles // + ) noexcept { #if defined(_XM_NO_INTRINSICS_) const float halfpitch = Angles.vector4_f32[0] * 0.5f; float cp = cosf(halfpitch); @@ -626,27 +560,30 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationRollPitchYawFromVector float cr = cosf(halfroll); float sr = sinf(halfroll); - XMVECTORF32 vResult = { { { - cr * sp * cy + sr * cp * sy, - cr * cp * sy - sr * sp * cy, - sr * cp * cy - cr * sp * sy, - cr * cp * cy + sr * sp * sy - } } }; + XMVECTORF32 vResult = { + {{cr * sp * cy + sr * cp * sy, cr * cp * sy - sr * sp * cy, + sr * cp * cy - cr * sp * sy, cr * cp * cy + sr * sp * sy}}}; return vResult; #else - static const XMVECTORF32 Sign = { { { 1.0f, -1.0f, -1.0f, 1.0f } } }; + static const XMVECTORF32 Sign = {{{1.0f, -1.0f, -1.0f, 1.0f}}}; XMVECTOR HalfAngles = XMVectorMultiply(Angles, g_XMOneHalf.v); XMVECTOR SinAngles, CosAngles; XMVectorSinCos(&SinAngles, &CosAngles, HalfAngles); - XMVECTOR P0 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR Y0 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR R0 = XMVectorPermute(SinAngles, CosAngles); - XMVECTOR P1 = XMVectorPermute(CosAngles, SinAngles); - XMVECTOR Y1 = XMVectorPermute(CosAngles, SinAngles); - XMVECTOR R1 = XMVectorPermute(CosAngles, SinAngles); + XMVECTOR P0 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR Y0 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR R0 = XMVectorPermute(SinAngles, CosAngles); + XMVECTOR P1 = XMVectorPermute(CosAngles, SinAngles); + XMVECTOR Y1 = XMVectorPermute(CosAngles, SinAngles); + XMVECTOR R1 = XMVectorPermute(CosAngles, SinAngles); XMVECTOR Q1 = XMVectorMultiply(P1, Sign.v); XMVECTOR Q0 = XMVectorMultiply(P0, Y0); @@ -660,12 +597,8 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationRollPitchYawFromVector //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionRotationNormal -( - FXMVECTOR NormalAxis, - float Angle -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionRotationNormal(FXMVECTOR NormalAxis, + float Angle) noexcept { #if defined(_XM_NO_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) XMVECTOR N = XMVectorSelect(g_XMOne.v, NormalAxis, g_XMSelect1110.v); @@ -692,12 +625,8 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationNormal //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionRotationAxis -( - FXMVECTOR Axis, - float Angle -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionRotationAxis(FXMVECTOR Axis, + float Angle) noexcept { assert(!XMVector3Equal(Axis, XMVectorZero())); assert(!XMVector3IsInfinite(Axis)); @@ -708,8 +637,7 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationAxis //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept -{ +inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 q; @@ -726,8 +654,7 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept q.f[1] = (M.m[0][1] + M.m[1][0]) * inv4x; q.f[2] = (M.m[0][2] + M.m[2][0]) * inv4x; q.f[3] = (M.m[1][2] - M.m[2][1]) * inv4x; - } - else // y^2 >= x^2 + } else // y^2 >= x^2 { float fourYSqr = omr22 + dif10; float inv4y = 0.5f / sqrtf(fourYSqr); @@ -736,8 +663,7 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept q.f[2] = (M.m[1][2] + M.m[2][1]) * inv4y; q.f[3] = (M.m[2][0] - M.m[0][2]) * inv4y; } - } - else // z^2 + w^2 >= x^2 + y^2 + } else // z^2 + w^2 >= x^2 + y^2 { float sum10 = M.m[1][1] + M.m[0][0]; float opr22 = 1.f + r22; @@ -749,8 +675,7 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept q.f[1] = (M.m[1][2] + M.m[2][1]) * inv4z; q.f[2] = fourZSqr * inv4z; q.f[3] = (M.m[0][1] - M.m[1][0]) * inv4z; - } - else // w^2 >= z^2 + } else // w^2 >= z^2 { float fourWSqr = opr22 + sum10; float inv4w = 0.5f / sqrtf(fourWSqr); @@ -763,11 +688,13 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept return q.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 XMPMMP = { { { +1.0f, -1.0f, -1.0f, +1.0f } } }; - static const XMVECTORF32 XMMPMP = { { { -1.0f, +1.0f, -1.0f, +1.0f } } }; - static const XMVECTORF32 XMMMPP = { { { -1.0f, -1.0f, +1.0f, +1.0f } } }; - static const XMVECTORU32 Select0110 = { { { XM_SELECT_0, XM_SELECT_1, XM_SELECT_1, XM_SELECT_0 } } }; - static const XMVECTORU32 Select0010 = { { { XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0 } } }; + static const XMVECTORF32 XMPMMP = {{{+1.0f, -1.0f, -1.0f, +1.0f}}}; + static const XMVECTORF32 XMMPMP = {{{-1.0f, +1.0f, -1.0f, +1.0f}}}; + static const XMVECTORF32 XMMMPP = {{{-1.0f, -1.0f, +1.0f, +1.0f}}}; + static const XMVECTORU32 Select0110 = { + {{XM_SELECT_0, XM_SELECT_1, XM_SELECT_1, XM_SELECT_0}}}; + static const XMVECTORU32 Select0010 = { + {{XM_SELECT_0, XM_SELECT_0, XM_SELECT_1, XM_SELECT_0}}}; float32x4_t r0 = M.r[0]; float32x4_t r1 = M.r[1]; @@ -811,7 +738,8 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept t0 = vcombine_f32(vrev64_f32(vget_low_f32(r2)), vget_low_f32(r10)); // (r12, r02, r01, r12) - float32x4_t t2 = vcombine_f32(vrev64_f32(vget_high_f32(r0)), vrev64_f32(vget_low_f32(r0))); + float32x4_t t2 = vcombine_f32(vrev64_f32(vget_high_f32(r0)), + vrev64_f32(vget_low_f32(r0))); float32x4_t t3 = vdupq_lane_f32(vget_high_f32(r1), 0); t1 = vbslq_f32(Select0110, t2, t3); @@ -850,9 +778,9 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept t0 = XMVector4Length(t2); return XMVectorDivide(t2, t0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 XMPMMP = { { { +1.0f, -1.0f, -1.0f, +1.0f } } }; - static const XMVECTORF32 XMMPMP = { { { -1.0f, +1.0f, -1.0f, +1.0f } } }; - static const XMVECTORF32 XMMMPP = { { { -1.0f, -1.0f, +1.0f, +1.0f } } }; + static const XMVECTORF32 XMPMMP = {{{+1.0f, -1.0f, -1.0f, +1.0f}}}; + static const XMVECTORF32 XMMPMP = {{{-1.0f, +1.0f, -1.0f, +1.0f}}}; + static const XMVECTORF32 XMMMPP = {{{-1.0f, -1.0f, +1.0f, +1.0f}}}; XMVECTOR r0 = M.r[0]; // (r00, r01, r02, 0) XMVECTOR r1 = M.r[1]; // (r10, r11, r12, 0) @@ -944,14 +872,8 @@ inline XMVECTOR XM_CALLCONV XMQuaternionRotationMatrix(FXMMATRIX M) noexcept //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMQuaternionToAxisAngle -( - XMVECTOR* pAxis, - float* pAngle, - FXMVECTOR Q -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMQuaternionToAxisAngle(XMVECTOR* pAxis, float* pAngle, FXMVECTOR Q) noexcept { assert(pAxis); assert(pAngle); @@ -972,24 +894,14 @@ inline void XM_CALLCONV XMQuaternionToAxisAngle //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMPlaneEqual -( - FXMVECTOR P1, - FXMVECTOR P2 -) noexcept -{ +inline bool XM_CALLCONV XMPlaneEqual(FXMVECTOR P1, FXMVECTOR P2) noexcept { return XMVector4Equal(P1, P2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMPlaneNearEqual -( - FXMVECTOR P1, - FXMVECTOR P2, - FXMVECTOR Epsilon -) noexcept -{ +inline bool XM_CALLCONV XMPlaneNearEqual(FXMVECTOR P1, FXMVECTOR P2, + FXMVECTOR Epsilon) noexcept { XMVECTOR NP1 = XMPlaneNormalize(P1); XMVECTOR NP2 = XMPlaneNormalize(P2); return XMVector4NearEqual(NP1, NP2, Epsilon); @@ -997,26 +909,19 @@ inline bool XM_CALLCONV XMPlaneNearEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMPlaneNotEqual -( - FXMVECTOR P1, - FXMVECTOR P2 -) noexcept -{ +inline bool XM_CALLCONV XMPlaneNotEqual(FXMVECTOR P1, FXMVECTOR P2) noexcept { return XMVector4NotEqual(P1, P2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMPlaneIsNaN(FXMVECTOR P) noexcept -{ +inline bool XM_CALLCONV XMPlaneIsNaN(FXMVECTOR P) noexcept { return XMVector4IsNaN(P); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMPlaneIsInfinite(FXMVECTOR P) noexcept -{ +inline bool XM_CALLCONV XMPlaneIsInfinite(FXMVECTOR P) noexcept { return XMVector4IsInfinite(P); } @@ -1026,23 +931,13 @@ inline bool XM_CALLCONV XMPlaneIsInfinite(FXMVECTOR P) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneDot -( - FXMVECTOR P, - FXMVECTOR V -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneDot(FXMVECTOR P, FXMVECTOR V) noexcept { return XMVector4Dot(P, V); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneDotCoord -( - FXMVECTOR P, - FXMVECTOR V -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneDotCoord(FXMVECTOR P, FXMVECTOR V) noexcept { // Result = P[0] * V[0] + P[1] * V[1] + P[2] * V[2] + P[3] XMVECTOR V3 = XMVectorSelect(g_XMOne.v, V, g_XMSelect1110.v); @@ -1052,12 +947,8 @@ inline XMVECTOR XM_CALLCONV XMPlaneDotCoord //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneDotNormal -( - FXMVECTOR P, - FXMVECTOR V -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneDotNormal(FXMVECTOR P, + FXMVECTOR V) noexcept { return XMVector3Dot(P, V); } @@ -1065,8 +956,7 @@ inline XMVECTOR XM_CALLCONV XMPlaneDotNormal // XMPlaneNormalizeEst uses a reciprocal estimate and // returns QNaN on zero and infinite vectors. -inline XMVECTOR XM_CALLCONV XMPlaneNormalizeEst(FXMVECTOR P) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneNormalizeEst(FXMVECTOR P) noexcept { #if defined(_XM_NO_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) XMVECTOR Result = XMVector3ReciprocalLengthEst(P); @@ -1099,21 +989,18 @@ inline XMVECTOR XM_CALLCONV XMPlaneNormalizeEst(FXMVECTOR P) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneNormalize(FXMVECTOR P) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneNormalize(FXMVECTOR P) noexcept { #if defined(_XM_NO_INTRINSICS_) - float fLengthSq = sqrtf((P.vector4_f32[0] * P.vector4_f32[0]) + (P.vector4_f32[1] * P.vector4_f32[1]) + (P.vector4_f32[2] * P.vector4_f32[2])); + float fLengthSq = sqrtf((P.vector4_f32[0] * P.vector4_f32[0]) + + (P.vector4_f32[1] * P.vector4_f32[1]) + + (P.vector4_f32[2] * P.vector4_f32[2])); // Prevent divide by zero - if (fLengthSq > 0) - { + if (fLengthSq > 0) { fLengthSq = 1.0f / fLengthSq; } - XMVECTORF32 vResult = { { { - P.vector4_f32[0] * fLengthSq, - P.vector4_f32[1] * fLengthSq, - P.vector4_f32[2] * fLengthSq, - P.vector4_f32[3] * fLengthSq - } } }; + XMVECTORF32 vResult = { + {{P.vector4_f32[0] * fLengthSq, P.vector4_f32[1] * fLengthSq, + P.vector4_f32[2] * fLengthSq, P.vector4_f32[3] * fLengthSq}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) XMVECTOR vLength = XMVector3ReciprocalLength(P); @@ -1153,13 +1040,8 @@ inline XMVECTOR XM_CALLCONV XMPlaneNormalize(FXMVECTOR P) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneIntersectLine -( - FXMVECTOR P, - FXMVECTOR LinePoint1, - FXMVECTOR LinePoint2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneIntersectLine( + FXMVECTOR P, FXMVECTOR LinePoint1, FXMVECTOR LinePoint2) noexcept { XMVECTOR V1 = XMVector3Dot(P, LinePoint1); XMVECTOR V2 = XMVector3Dot(P, LinePoint2); XMVECTOR D = XMVectorSubtract(V1, V2); @@ -1177,15 +1059,9 @@ inline XMVECTOR XM_CALLCONV XMPlaneIntersectLine } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMPlaneIntersectPlane -( - XMVECTOR* pLinePoint1, - XMVECTOR* pLinePoint2, - FXMVECTOR P1, - FXMVECTOR P2 -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMPlaneIntersectPlane(XMVECTOR* pLinePoint1, XMVECTOR* pLinePoint2, + FXMVECTOR P1, FXMVECTOR P2) noexcept { assert(pLinePoint1); assert(pLinePoint2); @@ -1214,12 +1090,8 @@ inline void XM_CALLCONV XMPlaneIntersectPlane //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneTransform -( - FXMVECTOR P, - FXMMATRIX ITM -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneTransform(FXMVECTOR P, + FXMMATRIX ITM) noexcept { XMVECTOR W = XMVectorSplatW(P); XMVECTOR Z = XMVectorSplatZ(P); XMVECTOR Y = XMVectorSplatY(P); @@ -1233,23 +1105,11 @@ inline XMVECTOR XM_CALLCONV XMPlaneTransform } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT4* XM_CALLCONV XMPlaneTransformStream -( - XMFLOAT4* pOutputStream, - size_t OutputStride, - const XMFLOAT4* pInputStream, - size_t InputStride, - size_t PlaneCount, - FXMMATRIX ITM -) noexcept -{ - return XMVector4TransformStream(pOutputStream, - OutputStride, - pInputStream, - InputStride, - PlaneCount, - ITM); +_Use_decl_annotations_ inline XMFLOAT4* XM_CALLCONV XMPlaneTransformStream( + XMFLOAT4* pOutputStream, size_t OutputStride, const XMFLOAT4* pInputStream, + size_t InputStride, size_t PlaneCount, FXMMATRIX ITM) noexcept { + return XMVector4TransformStream(pOutputStream, OutputStride, pInputStream, + InputStride, PlaneCount, ITM); } //------------------------------------------------------------------------------ @@ -1258,12 +1118,8 @@ inline XMFLOAT4* XM_CALLCONV XMPlaneTransformStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneFromPointNormal -( - FXMVECTOR Point, - FXMVECTOR Normal -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneFromPointNormal(FXMVECTOR Point, + FXMVECTOR Normal) noexcept { XMVECTOR W = XMVector3Dot(Point, Normal); W = XMVectorNegate(W); return XMVectorSelect(W, Normal, g_XMSelect1110.v); @@ -1271,13 +1127,9 @@ inline XMVECTOR XM_CALLCONV XMPlaneFromPointNormal //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMPlaneFromPoints -( - FXMVECTOR Point1, - FXMVECTOR Point2, - FXMVECTOR Point3 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMPlaneFromPoints(FXMVECTOR Point1, + FXMVECTOR Point2, + FXMVECTOR Point3) noexcept { XMVECTOR V21 = XMVectorSubtract(Point1, Point2); XMVECTOR V31 = XMVectorSubtract(Point1, Point3); @@ -1304,81 +1156,51 @@ inline XMVECTOR XM_CALLCONV XMPlaneFromPoints //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorEqual -( - FXMVECTOR C1, - FXMVECTOR C2 -) noexcept -{ +inline bool XM_CALLCONV XMColorEqual(FXMVECTOR C1, FXMVECTOR C2) noexcept { return XMVector4Equal(C1, C2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorNotEqual -( - FXMVECTOR C1, - FXMVECTOR C2 -) noexcept -{ +inline bool XM_CALLCONV XMColorNotEqual(FXMVECTOR C1, FXMVECTOR C2) noexcept { return XMVector4NotEqual(C1, C2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorGreater -( - FXMVECTOR C1, - FXMVECTOR C2 -) noexcept -{ +inline bool XM_CALLCONV XMColorGreater(FXMVECTOR C1, FXMVECTOR C2) noexcept { return XMVector4Greater(C1, C2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorGreaterOrEqual -( - FXMVECTOR C1, - FXMVECTOR C2 -) noexcept -{ +inline bool XM_CALLCONV XMColorGreaterOrEqual(FXMVECTOR C1, + FXMVECTOR C2) noexcept { return XMVector4GreaterOrEqual(C1, C2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorLess -( - FXMVECTOR C1, - FXMVECTOR C2 -) noexcept -{ +inline bool XM_CALLCONV XMColorLess(FXMVECTOR C1, FXMVECTOR C2) noexcept { return XMVector4Less(C1, C2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorLessOrEqual -( - FXMVECTOR C1, - FXMVECTOR C2 -) noexcept -{ +inline bool XM_CALLCONV XMColorLessOrEqual(FXMVECTOR C1, + FXMVECTOR C2) noexcept { return XMVector4LessOrEqual(C1, C2); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorIsNaN(FXMVECTOR C) noexcept -{ +inline bool XM_CALLCONV XMColorIsNaN(FXMVECTOR C) noexcept { return XMVector4IsNaN(C); } //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMColorIsInfinite(FXMVECTOR C) noexcept -{ +inline bool XM_CALLCONV XMColorIsInfinite(FXMVECTOR C) noexcept { return XMVector4IsInfinite(C); } @@ -1388,15 +1210,11 @@ inline bool XM_CALLCONV XMColorIsInfinite(FXMVECTOR C) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorNegative(FXMVECTOR vColor) noexcept -{ +inline XMVECTOR XM_CALLCONV XMColorNegative(FXMVECTOR vColor) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - 1.0f - vColor.vector4_f32[0], - 1.0f - vColor.vector4_f32[1], - 1.0f - vColor.vector4_f32[2], - vColor.vector4_f32[3] - } } }; + XMVECTORF32 vResult = { + {{1.0f - vColor.vector4_f32[0], 1.0f - vColor.vector4_f32[1], + 1.0f - vColor.vector4_f32[2], vColor.vector4_f32[3]}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vTemp = veorq_u32(vreinterpretq_u32_f32(vColor), g_XMNegate3); @@ -1411,33 +1229,30 @@ inline XMVECTOR XM_CALLCONV XMColorNegative(FXMVECTOR vColor) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorModulate -( - FXMVECTOR C1, - FXMVECTOR C2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMColorModulate(FXMVECTOR C1, + FXMVECTOR C2) noexcept { return XMVectorMultiply(C1, C2); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorAdjustSaturation -( - FXMVECTOR vColor, - float fSaturation -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMColorAdjustSaturation(FXMVECTOR vColor, float fSaturation) noexcept { // Luminance = 0.2125f * C[0] + 0.7154f * C[1] + 0.0721f * C[2]; // Result = (C - Luminance) * Saturation + Luminance; - const XMVECTORF32 gvLuminance = { { { 0.2125f, 0.7154f, 0.0721f, 0.0f } } }; + const XMVECTORF32 gvLuminance = {{{0.2125f, 0.7154f, 0.0721f, 0.0f}}}; #if defined(_XM_NO_INTRINSICS_) - float fLuminance = (vColor.vector4_f32[0] * gvLuminance.f[0]) + (vColor.vector4_f32[1] * gvLuminance.f[1]) + (vColor.vector4_f32[2] * gvLuminance.f[2]); + float fLuminance = (vColor.vector4_f32[0] * gvLuminance.f[0]) + + (vColor.vector4_f32[1] * gvLuminance.f[1]) + + (vColor.vector4_f32[2] * gvLuminance.f[2]); XMVECTOR vResult; - vResult.vector4_f32[0] = ((vColor.vector4_f32[0] - fLuminance) * fSaturation) + fLuminance; - vResult.vector4_f32[1] = ((vColor.vector4_f32[1] - fLuminance) * fSaturation) + fLuminance; - vResult.vector4_f32[2] = ((vColor.vector4_f32[2] - fLuminance) * fSaturation) + fLuminance; + vResult.vector4_f32[0] = + ((vColor.vector4_f32[0] - fLuminance) * fSaturation) + fLuminance; + vResult.vector4_f32[1] = + ((vColor.vector4_f32[1] - fLuminance) * fSaturation) + fLuminance; + vResult.vector4_f32[2] = + ((vColor.vector4_f32[2] - fLuminance) * fSaturation) + fLuminance; vResult.vector4_f32[3] = vColor.vector4_f32[3]; return vResult; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1453,49 +1268,59 @@ inline XMVECTOR XM_CALLCONV XMColorAdjustSaturation XMVECTOR vResult = _mm_sub_ps(vColor, vLuminance); vResult = XM_FMADD_PS(vResult, vSaturation, vLuminance); // Retain w from the source color - vLuminance = _mm_shuffle_ps(vResult, vColor, _MM_SHUFFLE(3, 2, 2, 2)); // x = vResult.z,y = vResult.z,z = vColor.z,w=vColor.w - vResult = _mm_shuffle_ps(vResult, vLuminance, _MM_SHUFFLE(3, 0, 1, 0)); // x = vResult.x,y = vResult.y,z = vResult.z,w=vColor.w + vLuminance = _mm_shuffle_ps( + vResult, vColor, + _MM_SHUFFLE(3, 2, 2, + 2)); // x = vResult.z,y = vResult.z,z = vColor.z,w=vColor.w + vResult = _mm_shuffle_ps( + vResult, vLuminance, + _MM_SHUFFLE( + 3, 0, 1, + 0)); // x = vResult.x,y = vResult.y,z = vResult.z,w=vColor.w return vResult; #endif } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorAdjustContrast -( - FXMVECTOR vColor, - float fContrast -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMColorAdjustContrast(FXMVECTOR vColor, + float fContrast) noexcept { // Result = (vColor - 0.5f) * fContrast + 0.5f; #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - ((vColor.vector4_f32[0] - 0.5f) * fContrast) + 0.5f, - ((vColor.vector4_f32[1] - 0.5f) * fContrast) + 0.5f, - ((vColor.vector4_f32[2] - 0.5f) * fContrast) + 0.5f, - vColor.vector4_f32[3] // Leave W untouched - } } }; + XMVECTORF32 vResult = {{{ + ((vColor.vector4_f32[0] - 0.5f) * fContrast) + 0.5f, + ((vColor.vector4_f32[1] - 0.5f) * fContrast) + 0.5f, + ((vColor.vector4_f32[2] - 0.5f) * fContrast) + 0.5f, + vColor.vector4_f32[3] // Leave W untouched + }}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) XMVECTOR vResult = vsubq_f32(vColor, g_XMOneHalf.v); vResult = vmlaq_n_f32(g_XMOneHalf.v, vResult, fContrast); return vbslq_f32(g_XMSelect1110, vResult, vColor); #elif defined(_XM_SSE_INTRINSICS_) - XMVECTOR vScale = _mm_set_ps1(fContrast); // Splat the scale - XMVECTOR vResult = _mm_sub_ps(vColor, g_XMOneHalf); // Subtract 0.5f from the source (Saving source) + XMVECTOR vScale = _mm_set_ps1(fContrast); // Splat the scale + XMVECTOR vResult = _mm_sub_ps( + vColor, g_XMOneHalf); // Subtract 0.5f from the source (Saving source) vResult = XM_FMADD_PS(vResult, vScale, g_XMOneHalf); -// Retain w from the source color - vScale = _mm_shuffle_ps(vResult, vColor, _MM_SHUFFLE(3, 2, 2, 2)); // x = vResult.z,y = vResult.z,z = vColor.z,w=vColor.w - vResult = _mm_shuffle_ps(vResult, vScale, _MM_SHUFFLE(3, 0, 1, 0)); // x = vResult.x,y = vResult.y,z = vResult.z,w=vColor.w + // Retain w from the source color + vScale = _mm_shuffle_ps( + vResult, vColor, + _MM_SHUFFLE(3, 2, 2, + 2)); // x = vResult.z,y = vResult.z,z = vColor.z,w=vColor.w + vResult = _mm_shuffle_ps( + vResult, vScale, + _MM_SHUFFLE( + 3, 0, 1, + 0)); // x = vResult.x,y = vResult.y,z = vResult.z,w=vColor.w return vResult; #endif } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorRGBToHSL(FXMVECTOR rgb) noexcept -{ +inline XMVECTOR XM_CALLCONV XMColorRGBToHSL(FXMVECTOR rgb) noexcept { XMVECTOR r = XMVectorSplatX(rgb); XMVECTOR g = XMVectorSplatY(rgb); XMVECTOR b = XMVectorSplatZ(rgb); @@ -1509,41 +1334,30 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToHSL(FXMVECTOR rgb) noexcept XMVECTOR la = XMVectorSelect(rgb, l, g_XMSelect1110); - if (XMVector3Less(d, g_XMEpsilon)) - { + if (XMVector3Less(d, g_XMEpsilon)) { // Achromatic, assume H and S of 0 return XMVectorSelect(la, g_XMZero, g_XMSelect1100); - } - else - { + } else { XMVECTOR s, h; XMVECTOR d2 = XMVectorAdd(min, max); - if (XMVector3Greater(l, g_XMOneHalf)) - { + if (XMVector3Greater(l, g_XMOneHalf)) { // d / (2-max-min) s = XMVectorDivide(d, XMVectorSubtract(g_XMTwo, d2)); - } - else - { + } else { // d / (max+min) s = XMVectorDivide(d, d2); } - if (XMVector3Equal(r, max)) - { + if (XMVector3Equal(r, max)) { // Red is max h = XMVectorDivide(XMVectorSubtract(g, b), d); - } - else if (XMVector3Equal(g, max)) - { + } else if (XMVector3Equal(g, max)) { // Green is max h = XMVectorDivide(XMVectorSubtract(b, r), d); h = XMVectorAdd(h, g_XMTwo); - } - else - { + } else { // Blue is max h = XMVectorDivide(XMVectorSubtract(r, g), d); h = XMVectorAdd(h, g_XMFour); @@ -1551,8 +1365,7 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToHSL(FXMVECTOR rgb) noexcept h = XMVectorDivide(h, g_XMSix); - if (XMVector3Less(h, g_XMZero)) - h = XMVectorAdd(h, g_XMOne); + if (XMVector3Less(h, g_XMZero)) h = XMVectorAdd(h, g_XMOne); XMVECTOR lha = XMVectorSelect(la, h, g_XMSelect1100); return XMVectorSelect(s, lha, g_XMSelect1011); @@ -1561,77 +1374,69 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToHSL(FXMVECTOR rgb) noexcept //------------------------------------------------------------------------------ -namespace MathInternal -{ +namespace MathInternal { - inline XMVECTOR XM_CALLCONV XMColorHue2Clr(FXMVECTOR p, FXMVECTOR q, FXMVECTOR h) noexcept - { - static const XMVECTORF32 oneSixth = { { { 1.0f / 6.0f, 1.0f / 6.0f, 1.0f / 6.0f, 1.0f / 6.0f } } }; - static const XMVECTORF32 twoThirds = { { { 2.0f / 3.0f, 2.0f / 3.0f, 2.0f / 3.0f, 2.0f / 3.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorHue2Clr(FXMVECTOR p, FXMVECTOR q, + FXMVECTOR h) noexcept { + static const XMVECTORF32 oneSixth = { + {{1.0f / 6.0f, 1.0f / 6.0f, 1.0f / 6.0f, 1.0f / 6.0f}}}; + static const XMVECTORF32 twoThirds = { + {{2.0f / 3.0f, 2.0f / 3.0f, 2.0f / 3.0f, 2.0f / 3.0f}}}; - XMVECTOR t = h; + XMVECTOR t = h; - if (XMVector3Less(t, g_XMZero)) - t = XMVectorAdd(t, g_XMOne); + if (XMVector3Less(t, g_XMZero)) t = XMVectorAdd(t, g_XMOne); - if (XMVector3Greater(t, g_XMOne)) - t = XMVectorSubtract(t, g_XMOne); + if (XMVector3Greater(t, g_XMOne)) t = XMVectorSubtract(t, g_XMOne); - if (XMVector3Less(t, oneSixth)) - { - // p + (q - p) * 6 * t - XMVECTOR t1 = XMVectorSubtract(q, p); - XMVECTOR t2 = XMVectorMultiply(g_XMSix, t); - return XMVectorMultiplyAdd(t1, t2, p); - } - - if (XMVector3Less(t, g_XMOneHalf)) - return q; - - if (XMVector3Less(t, twoThirds)) - { - // p + (q - p) * 6 * (2/3 - t) - XMVECTOR t1 = XMVectorSubtract(q, p); - XMVECTOR t2 = XMVectorMultiply(g_XMSix, XMVectorSubtract(twoThirds, t)); - return XMVectorMultiplyAdd(t1, t2, p); - } - - return p; + if (XMVector3Less(t, oneSixth)) { + // p + (q - p) * 6 * t + XMVECTOR t1 = XMVectorSubtract(q, p); + XMVECTOR t2 = XMVectorMultiply(g_XMSix, t); + return XMVectorMultiplyAdd(t1, t2, p); } -} // namespace MathInternal + if (XMVector3Less(t, g_XMOneHalf)) return q; -inline XMVECTOR XM_CALLCONV XMColorHSLToRGB(FXMVECTOR hsl) noexcept -{ - static const XMVECTORF32 oneThird = { { { 1.0f / 3.0f, 1.0f / 3.0f, 1.0f / 3.0f, 1.0f / 3.0f } } }; + if (XMVector3Less(t, twoThirds)) { + // p + (q - p) * 6 * (2/3 - t) + XMVECTOR t1 = XMVectorSubtract(q, p); + XMVECTOR t2 = XMVectorMultiply(g_XMSix, XMVectorSubtract(twoThirds, t)); + return XMVectorMultiplyAdd(t1, t2, p); + } + + return p; +} + +} // namespace MathInternal + +inline XMVECTOR XM_CALLCONV XMColorHSLToRGB(FXMVECTOR hsl) noexcept { + static const XMVECTORF32 oneThird = { + {{1.0f / 3.0f, 1.0f / 3.0f, 1.0f / 3.0f, 1.0f / 3.0f}}}; XMVECTOR s = XMVectorSplatY(hsl); XMVECTOR l = XMVectorSplatZ(hsl); - if (XMVector3NearEqual(s, g_XMZero, g_XMEpsilon)) - { + if (XMVector3NearEqual(s, g_XMZero, g_XMEpsilon)) { // Achromatic return XMVectorSelect(hsl, l, g_XMSelect1110); - } - else - { + } else { XMVECTOR h = XMVectorSplatX(hsl); XMVECTOR q; - if (XMVector3Less(l, g_XMOneHalf)) - { + if (XMVector3Less(l, g_XMOneHalf)) { q = XMVectorMultiply(l, XMVectorAdd(g_XMOne, s)); - } - else - { + } else { q = XMVectorSubtract(XMVectorAdd(l, s), XMVectorMultiply(l, s)); } XMVECTOR p = XMVectorSubtract(XMVectorMultiply(g_XMTwo, l), q); - XMVECTOR r = DirectX::MathInternal::XMColorHue2Clr(p, q, XMVectorAdd(h, oneThird)); + XMVECTOR r = DirectX::MathInternal::XMColorHue2Clr( + p, q, XMVectorAdd(h, oneThird)); XMVECTOR g = DirectX::MathInternal::XMColorHue2Clr(p, q, h); - XMVECTOR b = DirectX::MathInternal::XMColorHue2Clr(p, q, XMVectorSubtract(h, oneThird)); + XMVECTOR b = DirectX::MathInternal::XMColorHue2Clr( + p, q, XMVectorSubtract(h, oneThird)); XMVECTOR rg = XMVectorSelect(g, r, g_XMSelect1000); XMVECTOR ba = XMVectorSelect(hsl, b, g_XMSelect1110); @@ -1642,8 +1447,7 @@ inline XMVECTOR XM_CALLCONV XMColorHSLToRGB(FXMVECTOR hsl) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorRGBToHSV(FXMVECTOR rgb) noexcept -{ +inline XMVECTOR XM_CALLCONV XMColorRGBToHSV(FXMVECTOR rgb) noexcept { XMVECTOR r = XMVectorSplatX(rgb); XMVECTOR g = XMVectorSplatY(rgb); XMVECTOR b = XMVectorSplatZ(rgb); @@ -1653,35 +1457,28 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToHSV(FXMVECTOR rgb) noexcept XMVECTOR d = XMVectorSubtract(v, min); - XMVECTOR s = (XMVector3NearEqual(v, g_XMZero, g_XMEpsilon)) ? g_XMZero : XMVectorDivide(d, v); + XMVECTOR s = (XMVector3NearEqual(v, g_XMZero, g_XMEpsilon)) + ? g_XMZero + : XMVectorDivide(d, v); - if (XMVector3Less(d, g_XMEpsilon)) - { + if (XMVector3Less(d, g_XMEpsilon)) { // Achromatic, assume H of 0 XMVECTOR hv = XMVectorSelect(v, g_XMZero, g_XMSelect1000); XMVECTOR hva = XMVectorSelect(rgb, hv, g_XMSelect1110); return XMVectorSelect(s, hva, g_XMSelect1011); - } - else - { + } else { XMVECTOR h; - if (XMVector3Equal(r, v)) - { + if (XMVector3Equal(r, v)) { // Red is max h = XMVectorDivide(XMVectorSubtract(g, b), d); - if (XMVector3Less(g, b)) - h = XMVectorAdd(h, g_XMSix); - } - else if (XMVector3Equal(g, v)) - { + if (XMVector3Less(g, b)) h = XMVectorAdd(h, g_XMSix); + } else if (XMVector3Equal(g, v)) { // Green is max h = XMVectorDivide(XMVectorSubtract(b, r), d); h = XMVectorAdd(h, g_XMTwo); - } - else - { + } else { // Blue is max h = XMVectorDivide(XMVectorSubtract(r, g), d); h = XMVectorAdd(h, g_XMFour); @@ -1697,8 +1494,7 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToHSV(FXMVECTOR rgb) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorHSVToRGB(FXMVECTOR hsv) noexcept -{ +inline XMVECTOR XM_CALLCONV XMColorHSVToRGB(FXMVECTOR hsv) noexcept { XMVECTOR h = XMVectorSplatX(hsv); XMVECTOR s = XMVectorSplatY(hsv); XMVECTOR v = XMVectorSplatZ(hsv); @@ -1712,53 +1508,49 @@ inline XMVECTOR XM_CALLCONV XMColorHSVToRGB(FXMVECTOR hsv) noexcept XMVECTOR p = XMVectorMultiply(v, XMVectorSubtract(g_XMOne, s)); // q = v*(1-f*s) - XMVECTOR q = XMVectorMultiply(v, XMVectorSubtract(g_XMOne, XMVectorMultiply(f, s))); + XMVECTOR q = + XMVectorMultiply(v, XMVectorSubtract(g_XMOne, XMVectorMultiply(f, s))); // t = v*(1 - (1-f)*s) - XMVECTOR t = XMVectorMultiply(v, XMVectorSubtract(g_XMOne, XMVectorMultiply(XMVectorSubtract(g_XMOne, f), s))); + XMVECTOR t = XMVectorMultiply( + v, XMVectorSubtract(g_XMOne, + XMVectorMultiply(XMVectorSubtract(g_XMOne, f), s))); auto ii = static_cast(XMVectorGetX(XMVectorMod(i, g_XMSix))); XMVECTOR _rgb; - switch (ii) - { - case 0: // rgb = vtp + switch (ii) { + case 0: // rgb = vtp { XMVECTOR vt = XMVectorSelect(t, v, g_XMSelect1000); _rgb = XMVectorSelect(p, vt, g_XMSelect1100); - } - break; - case 1: // rgb = qvp + } break; + case 1: // rgb = qvp { XMVECTOR qv = XMVectorSelect(v, q, g_XMSelect1000); _rgb = XMVectorSelect(p, qv, g_XMSelect1100); - } - break; - case 2: // rgb = pvt + } break; + case 2: // rgb = pvt { XMVECTOR pv = XMVectorSelect(v, p, g_XMSelect1000); _rgb = XMVectorSelect(t, pv, g_XMSelect1100); - } - break; - case 3: // rgb = pqv + } break; + case 3: // rgb = pqv { XMVECTOR pq = XMVectorSelect(q, p, g_XMSelect1000); _rgb = XMVectorSelect(v, pq, g_XMSelect1100); - } - break; - case 4: // rgb = tpv + } break; + case 4: // rgb = tpv { XMVECTOR tp = XMVectorSelect(p, t, g_XMSelect1000); _rgb = XMVectorSelect(v, tp, g_XMSelect1100); - } - break; - default: // rgb = vpq + } break; + default: // rgb = vpq { XMVECTOR vp = XMVectorSelect(p, v, g_XMSelect1000); _rgb = XMVectorSelect(q, vp, g_XMSelect1100); - } - break; + } break; } return XMVectorSelect(hsv, _rgb, g_XMSelect1110); @@ -1766,11 +1558,10 @@ inline XMVECTOR XM_CALLCONV XMColorHSVToRGB(FXMVECTOR hsv) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorRGBToYUV(FXMVECTOR rgb) noexcept -{ - static const XMVECTORF32 Scale0 = { { { 0.299f, -0.147f, 0.615f, 0.0f } } }; - static const XMVECTORF32 Scale1 = { { { 0.587f, -0.289f, -0.515f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 0.114f, 0.436f, -0.100f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorRGBToYUV(FXMVECTOR rgb) noexcept { + static const XMVECTORF32 Scale0 = {{{0.299f, -0.147f, 0.615f, 0.0f}}}; + static const XMVECTORF32 Scale1 = {{{0.587f, -0.289f, -0.515f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{0.114f, 0.436f, -0.100f, 0.0f}}}; XMMATRIX M(Scale0, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVector3Transform(rgb, M); @@ -1780,10 +1571,9 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToYUV(FXMVECTOR rgb) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorYUVToRGB(FXMVECTOR yuv) noexcept -{ - static const XMVECTORF32 Scale1 = { { { 0.0f, -0.395f, 2.032f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 1.140f, -0.581f, 0.0f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorYUVToRGB(FXMVECTOR yuv) noexcept { + static const XMVECTORF32 Scale1 = {{{0.0f, -0.395f, 2.032f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{1.140f, -0.581f, 0.0f, 0.0f}}}; XMMATRIX M(g_XMOne, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVector3Transform(yuv, M); @@ -1793,11 +1583,10 @@ inline XMVECTOR XM_CALLCONV XMColorYUVToRGB(FXMVECTOR yuv) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorRGBToYUV_HD(FXMVECTOR rgb) noexcept -{ - static const XMVECTORF32 Scale0 = { { { 0.2126f, -0.0997f, 0.6150f, 0.0f } } }; - static const XMVECTORF32 Scale1 = { { { 0.7152f, -0.3354f, -0.5586f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 0.0722f, 0.4351f, -0.0564f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorRGBToYUV_HD(FXMVECTOR rgb) noexcept { + static const XMVECTORF32 Scale0 = {{{0.2126f, -0.0997f, 0.6150f, 0.0f}}}; + static const XMVECTORF32 Scale1 = {{{0.7152f, -0.3354f, -0.5586f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{0.0722f, 0.4351f, -0.0564f, 0.0f}}}; XMMATRIX M(Scale0, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVector3Transform(rgb, M); @@ -1807,10 +1596,9 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToYUV_HD(FXMVECTOR rgb) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorYUVToRGB_HD(FXMVECTOR yuv) noexcept -{ - static const XMVECTORF32 Scale1 = { { { 0.0f, -0.2153f, 2.1324f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 1.2803f, -0.3806f, 0.0f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorYUVToRGB_HD(FXMVECTOR yuv) noexcept { + static const XMVECTORF32 Scale1 = {{{0.0f, -0.2153f, 2.1324f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{1.2803f, -0.3806f, 0.0f, 0.0f}}}; XMMATRIX M(g_XMOne, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVector3Transform(yuv, M); @@ -1820,11 +1608,10 @@ inline XMVECTOR XM_CALLCONV XMColorYUVToRGB_HD(FXMVECTOR yuv) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorRGBToYUV_UHD(FXMVECTOR rgb) noexcept -{ - static const XMVECTORF32 Scale0 = { { { 0.2627f, -0.1215f, 0.6150f, 0.0f } } }; - static const XMVECTORF32 Scale1 = { { { 0.6780f, -0.3136f, -0.5655f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 0.0593f, 0.4351f, -0.0495f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorRGBToYUV_UHD(FXMVECTOR rgb) noexcept { + static const XMVECTORF32 Scale0 = {{{0.2627f, -0.1215f, 0.6150f, 0.0f}}}; + static const XMVECTORF32 Scale1 = {{{0.6780f, -0.3136f, -0.5655f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{0.0593f, 0.4351f, -0.0495f, 0.0f}}}; XMMATRIX M(Scale0, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVector3Transform(rgb, M); @@ -1834,10 +1621,9 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToYUV_UHD(FXMVECTOR rgb) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorYUVToRGB_UHD(FXMVECTOR yuv) noexcept -{ - static const XMVECTORF32 Scale1 = { { { 0.0f, -0.1891f, 2.1620f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 1.1989f, -0.4645f, 0.0f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorYUVToRGB_UHD(FXMVECTOR yuv) noexcept { + static const XMVECTORF32 Scale1 = {{{0.0f, -0.1891f, 2.1620f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{1.1989f, -0.4645f, 0.0f, 0.0f}}}; XMMATRIX M(g_XMOne, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVector3Transform(yuv, M); @@ -1847,12 +1633,15 @@ inline XMVECTOR XM_CALLCONV XMColorYUVToRGB_UHD(FXMVECTOR yuv) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorRGBToXYZ(FXMVECTOR rgb) noexcept -{ - static const XMVECTORF32 Scale0 = { { { 0.4887180f, 0.1762044f, 0.0000000f, 0.0f } } }; - static const XMVECTORF32 Scale1 = { { { 0.3106803f, 0.8129847f, 0.0102048f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 0.2006017f, 0.0108109f, 0.9897952f, 0.0f } } }; - static const XMVECTORF32 Scale = { { { 1.f / 0.17697f, 1.f / 0.17697f, 1.f / 0.17697f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorRGBToXYZ(FXMVECTOR rgb) noexcept { + static const XMVECTORF32 Scale0 = { + {{0.4887180f, 0.1762044f, 0.0000000f, 0.0f}}}; + static const XMVECTORF32 Scale1 = { + {{0.3106803f, 0.8129847f, 0.0102048f, 0.0f}}}; + static const XMVECTORF32 Scale2 = { + {{0.2006017f, 0.0108109f, 0.9897952f, 0.0f}}}; + static const XMVECTORF32 Scale = { + {{1.f / 0.17697f, 1.f / 0.17697f, 1.f / 0.17697f, 0.0f}}}; XMMATRIX M(Scale0, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVectorMultiply(XMVector3Transform(rgb, M), Scale); @@ -1860,12 +1649,14 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToXYZ(FXMVECTOR rgb) noexcept return XMVectorSelect(rgb, clr, g_XMSelect1110); } -inline XMVECTOR XM_CALLCONV XMColorXYZToRGB(FXMVECTOR xyz) noexcept -{ - static const XMVECTORF32 Scale0 = { { { 2.3706743f, -0.5138850f, 0.0052982f, 0.0f } } }; - static const XMVECTORF32 Scale1 = { { { -0.9000405f, 1.4253036f, -0.0146949f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { -0.4706338f, 0.0885814f, 1.0093968f, 0.0f } } }; - static const XMVECTORF32 Scale = { { { 0.17697f, 0.17697f, 0.17697f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorXYZToRGB(FXMVECTOR xyz) noexcept { + static const XMVECTORF32 Scale0 = { + {{2.3706743f, -0.5138850f, 0.0052982f, 0.0f}}}; + static const XMVECTORF32 Scale1 = { + {{-0.9000405f, 1.4253036f, -0.0146949f, 0.0f}}}; + static const XMVECTORF32 Scale2 = { + {{-0.4706338f, 0.0885814f, 1.0093968f, 0.0f}}}; + static const XMVECTORF32 Scale = {{{0.17697f, 0.17697f, 0.17697f, 0.0f}}}; XMMATRIX M(Scale0, Scale1, Scale2, g_XMZero); XMVECTOR clr = XMVector3Transform(XMVectorMultiply(xyz, Scale), M); @@ -1875,13 +1666,14 @@ inline XMVECTOR XM_CALLCONV XMColorXYZToRGB(FXMVECTOR xyz) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorXYZToSRGB(FXMVECTOR xyz) noexcept -{ - static const XMVECTORF32 Scale0 = { { { 3.2406f, -0.9689f, 0.0557f, 0.0f } } }; - static const XMVECTORF32 Scale1 = { { { -1.5372f, 1.8758f, -0.2040f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { -0.4986f, 0.0415f, 1.0570f, 0.0f } } }; - static const XMVECTORF32 Cutoff = { { { 0.0031308f, 0.0031308f, 0.0031308f, 0.0f } } }; - static const XMVECTORF32 Exp = { { { 1.0f / 2.4f, 1.0f / 2.4f, 1.0f / 2.4f, 1.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorXYZToSRGB(FXMVECTOR xyz) noexcept { + static const XMVECTORF32 Scale0 = {{{3.2406f, -0.9689f, 0.0557f, 0.0f}}}; + static const XMVECTORF32 Scale1 = {{{-1.5372f, 1.8758f, -0.2040f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{-0.4986f, 0.0415f, 1.0570f, 0.0f}}}; + static const XMVECTORF32 Cutoff = { + {{0.0031308f, 0.0031308f, 0.0031308f, 0.0f}}}; + static const XMVECTORF32 Exp = { + {{1.0f / 2.4f, 1.0f / 2.4f, 1.0f / 2.4f, 1.0f}}}; XMMATRIX M(Scale0, Scale1, Scale2, g_XMZero); XMVECTOR lclr = XMVector3Transform(xyz, M); @@ -1892,7 +1684,8 @@ inline XMVECTOR XM_CALLCONV XMColorXYZToSRGB(FXMVECTOR xyz) noexcept XMVECTOR smallC = XMVectorMultiply(lclr, g_XMsrgbScale); // clr = (1+a)*pow(lclr, 1/2.4) - a for lclr > 0.0031308 (where a = 0.055) - XMVECTOR largeC = XMVectorSubtract(XMVectorMultiply(g_XMsrgbA1, XMVectorPow(lclr, Exp)), g_XMsrgbA); + XMVECTOR largeC = XMVectorSubtract( + XMVectorMultiply(g_XMsrgbA1, XMVectorPow(lclr, Exp)), g_XMsrgbA); XMVECTOR clr = XMVectorSelect(smallC, largeC, sel); @@ -1901,13 +1694,12 @@ inline XMVECTOR XM_CALLCONV XMColorXYZToSRGB(FXMVECTOR xyz) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorSRGBToXYZ(FXMVECTOR srgb) noexcept -{ - static const XMVECTORF32 Scale0 = { { { 0.4124f, 0.2126f, 0.0193f, 0.0f } } }; - static const XMVECTORF32 Scale1 = { { { 0.3576f, 0.7152f, 0.1192f, 0.0f } } }; - static const XMVECTORF32 Scale2 = { { { 0.1805f, 0.0722f, 0.9505f, 0.0f } } }; - static const XMVECTORF32 Cutoff = { { { 0.04045f, 0.04045f, 0.04045f, 0.0f } } }; - static const XMVECTORF32 Exp = { { { 2.4f, 2.4f, 2.4f, 1.0f } } }; +inline XMVECTOR XM_CALLCONV XMColorSRGBToXYZ(FXMVECTOR srgb) noexcept { + static const XMVECTORF32 Scale0 = {{{0.4124f, 0.2126f, 0.0193f, 0.0f}}}; + static const XMVECTORF32 Scale1 = {{{0.3576f, 0.7152f, 0.1192f, 0.0f}}}; + static const XMVECTORF32 Scale2 = {{{0.1805f, 0.0722f, 0.9505f, 0.0f}}}; + static const XMVECTORF32 Cutoff = {{{0.04045f, 0.04045f, 0.04045f, 0.0f}}}; + static const XMVECTORF32 Exp = {{{2.4f, 2.4f, 2.4f, 1.0f}}}; XMVECTOR sel = XMVectorGreater(srgb, Cutoff); @@ -1915,7 +1707,8 @@ inline XMVECTOR XM_CALLCONV XMColorSRGBToXYZ(FXMVECTOR srgb) noexcept XMVECTOR smallC = XMVectorDivide(srgb, g_XMsrgbScale); // lclr = pow( (clr + a) / (1+a), 2.4 ) - XMVECTOR largeC = XMVectorPow(XMVectorDivide(XMVectorAdd(srgb, g_XMsrgbA), g_XMsrgbA1), Exp); + XMVECTOR largeC = XMVectorPow( + XMVectorDivide(XMVectorAdd(srgb, g_XMsrgbA), g_XMsrgbA1), Exp); XMVECTOR lclr = XMVectorSelect(smallC, largeC, sel); @@ -1927,17 +1720,19 @@ inline XMVECTOR XM_CALLCONV XMColorSRGBToXYZ(FXMVECTOR srgb) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorRGBToSRGB(FXMVECTOR rgb) noexcept -{ - static const XMVECTORF32 Cutoff = { { { 0.0031308f, 0.0031308f, 0.0031308f, 1.f } } }; - static const XMVECTORF32 Linear = { { { 12.92f, 12.92f, 12.92f, 1.f } } }; - static const XMVECTORF32 Scale = { { { 1.055f, 1.055f, 1.055f, 1.f } } }; - static const XMVECTORF32 Bias = { { { 0.055f, 0.055f, 0.055f, 0.f } } }; - static const XMVECTORF32 InvGamma = { { { 1.0f / 2.4f, 1.0f / 2.4f, 1.0f / 2.4f, 1.f } } }; +inline XMVECTOR XM_CALLCONV XMColorRGBToSRGB(FXMVECTOR rgb) noexcept { + static const XMVECTORF32 Cutoff = { + {{0.0031308f, 0.0031308f, 0.0031308f, 1.f}}}; + static const XMVECTORF32 Linear = {{{12.92f, 12.92f, 12.92f, 1.f}}}; + static const XMVECTORF32 Scale = {{{1.055f, 1.055f, 1.055f, 1.f}}}; + static const XMVECTORF32 Bias = {{{0.055f, 0.055f, 0.055f, 0.f}}}; + static const XMVECTORF32 InvGamma = { + {{1.0f / 2.4f, 1.0f / 2.4f, 1.0f / 2.4f, 1.f}}}; XMVECTOR V = XMVectorSaturate(rgb); XMVECTOR V0 = XMVectorMultiply(V, Linear); - XMVECTOR V1 = XMVectorSubtract(XMVectorMultiply(Scale, XMVectorPow(V, InvGamma)), Bias); + XMVECTOR V1 = XMVectorSubtract( + XMVectorMultiply(Scale, XMVectorPow(V, InvGamma)), Bias); XMVECTOR select = XMVectorLess(V, Cutoff); V = XMVectorSelect(V1, V0, select); return XMVectorSelect(rgb, V, g_XMSelect1110); @@ -1945,17 +1740,19 @@ inline XMVECTOR XM_CALLCONV XMColorRGBToSRGB(FXMVECTOR rgb) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMColorSRGBToRGB(FXMVECTOR srgb) noexcept -{ - static const XMVECTORF32 Cutoff = { { { 0.04045f, 0.04045f, 0.04045f, 1.f } } }; - static const XMVECTORF32 ILinear = { { { 1.f / 12.92f, 1.f / 12.92f, 1.f / 12.92f, 1.f } } }; - static const XMVECTORF32 Scale = { { { 1.f / 1.055f, 1.f / 1.055f, 1.f / 1.055f, 1.f } } }; - static const XMVECTORF32 Bias = { { { 0.055f, 0.055f, 0.055f, 0.f } } }; - static const XMVECTORF32 Gamma = { { { 2.4f, 2.4f, 2.4f, 1.f } } }; +inline XMVECTOR XM_CALLCONV XMColorSRGBToRGB(FXMVECTOR srgb) noexcept { + static const XMVECTORF32 Cutoff = {{{0.04045f, 0.04045f, 0.04045f, 1.f}}}; + static const XMVECTORF32 ILinear = { + {{1.f / 12.92f, 1.f / 12.92f, 1.f / 12.92f, 1.f}}}; + static const XMVECTORF32 Scale = { + {{1.f / 1.055f, 1.f / 1.055f, 1.f / 1.055f, 1.f}}}; + static const XMVECTORF32 Bias = {{{0.055f, 0.055f, 0.055f, 0.f}}}; + static const XMVECTORF32 Gamma = {{{2.4f, 2.4f, 2.4f, 1.f}}}; XMVECTOR V = XMVectorSaturate(srgb); XMVECTOR V0 = XMVectorMultiply(V, ILinear); - XMVECTOR V1 = XMVectorPow(XMVectorMultiply(XMVectorAdd(V, Bias), Scale), Gamma); + XMVECTOR V1 = + XMVectorPow(XMVectorMultiply(XMVectorAdd(V, Bias), Scale), Gamma); XMVECTOR select = XMVectorGreater(V, Cutoff); V = XMVectorSelect(V0, V1, select); return XMVectorSelect(srgb, V, g_XMSelect1110); @@ -1969,10 +1766,9 @@ inline XMVECTOR XM_CALLCONV XMColorSRGBToRGB(FXMVECTOR srgb) noexcept //------------------------------------------------------------------------------ -inline bool XMVerifyCPUSupport() noexcept -{ +inline bool XMVerifyCPUSupport() noexcept { #if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) - int CPUInfo[4] = { -1 }; + int CPUInfo[4] = {-1}; #if (defined(__clang__) || defined(__GNUC__)) && defined(__cpuid) __cpuid(0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); #else @@ -1980,11 +1776,9 @@ inline bool XMVerifyCPUSupport() noexcept #endif #ifdef __AVX2__ - if (CPUInfo[0] < 7) - return false; + if (CPUInfo[0] < 7) return false; #else - if (CPUInfo[0] < 1) - return false; + if (CPUInfo[0] < 1) return false; #endif #if (defined(__clang__) || defined(__GNUC__)) && defined(__cpuid) @@ -1994,32 +1788,32 @@ inline bool XMVerifyCPUSupport() noexcept #endif #if defined(__AVX2__) || defined(_XM_AVX2_INTRINSICS_) - // The compiler can emit FMA3 instructions even without explicit intrinsics use + // The compiler can emit FMA3 instructions even without explicit intrinsics + // use if ((CPUInfo[2] & 0x38081001) != 0x38081001) - return false; // No F16C/AVX/OSXSAVE/SSE4.1/FMA3/SSE3 support + return false; // No F16C/AVX/OSXSAVE/SSE4.1/FMA3/SSE3 support #elif defined(_XM_FMA3_INTRINSICS_) && defined(_XM_F16C_INTRINSICS_) if ((CPUInfo[2] & 0x38081001) != 0x38081001) - return false; // No F16C/AVX/OSXSAVE/SSE4.1/FMA3/SSE3 support + return false; // No F16C/AVX/OSXSAVE/SSE4.1/FMA3/SSE3 support #elif defined(_XM_FMA3_INTRINSICS_) if ((CPUInfo[2] & 0x18081001) != 0x18081001) - return false; // No AVX/OSXSAVE/SSE4.1/FMA3/SSE3 support + return false; // No AVX/OSXSAVE/SSE4.1/FMA3/SSE3 support #elif defined(_XM_F16C_INTRINSICS_) if ((CPUInfo[2] & 0x38080001) != 0x38080001) - return false; // No F16C/AVX/OSXSAVE/SSE4.1/SSE3 support + return false; // No F16C/AVX/OSXSAVE/SSE4.1/SSE3 support #elif defined(__AVX__) || defined(_XM_AVX_INTRINSICS_) if ((CPUInfo[2] & 0x18080001) != 0x18080001) - return false; // No AVX/OSXSAVE/SSE4.1/SSE3 support + return false; // No AVX/OSXSAVE/SSE4.1/SSE3 support #elif defined(_XM_SSE4_INTRINSICS_) if ((CPUInfo[2] & 0x80001) != 0x80001) - return false; // No SSE3/SSE4.1 support + return false; // No SSE3/SSE4.1 support #elif defined(_XM_SSE3_INTRINSICS_) - if (!(CPUInfo[2] & 0x1)) - return false; // No SSE3 support + if (!(CPUInfo[2] & 0x1)) return false; // No SSE3 support #endif // The x64 processor model requires SSE2 support, but no harm in checking if ((CPUInfo[3] & 0x6000000) != 0x6000000) - return false; // No SSE2/SSE support + return false; // No SSE2/SSE support #if defined(__AVX2__) || defined(_XM_AVX2_INTRINSICS_) #if defined(__clang__) || defined(__GNUC__) @@ -2027,8 +1821,7 @@ inline bool XMVerifyCPUSupport() noexcept #else __cpuidex(CPUInfo, 7, 0); #endif - if (!(CPUInfo[1] & 0x20)) - return false; // No AVX2 support + if (!(CPUInfo[1] & 0x20)) return false; // No AVX2 support #endif return true; @@ -2043,21 +1836,18 @@ inline bool XMVerifyCPUSupport() noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMFresnelTerm -( - FXMVECTOR CosIncidentAngle, - FXMVECTOR RefractionIndex -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMFresnelTerm(FXMVECTOR CosIncidentAngle, + FXMVECTOR RefractionIndex) noexcept { assert(!XMVector4IsInfinite(CosIncidentAngle)); - // Result = 0.5f * (g - c)^2 / (g + c)^2 * ((c * (g + c) - 1)^2 / (c * (g - c) + 1)^2 + 1) where - // c = CosIncidentAngle - // g = sqrt(c^2 + RefractionIndex^2 - 1) + // Result = 0.5f * (g - c)^2 / (g + c)^2 * ((c * (g + c) - 1)^2 / (c * (g - + // c) + 1)^2 + 1) where c = CosIncidentAngle g = sqrt(c^2 + + // RefractionIndex^2 - 1) #if defined(_XM_NO_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) - XMVECTOR G = XMVectorMultiplyAdd(RefractionIndex, RefractionIndex, g_XMNegativeOne.v); + XMVECTOR G = XMVectorMultiplyAdd(RefractionIndex, RefractionIndex, + g_XMNegativeOne.v); G = XMVectorMultiplyAdd(CosIncidentAngle, CosIncidentAngle, G); G = XMVectorAbs(G); G = XMVectorSqrt(G); @@ -2126,21 +1916,14 @@ inline XMVECTOR XM_CALLCONV XMFresnelTerm //------------------------------------------------------------------------------ -inline bool XMScalarNearEqual -( - float S1, - float S2, - float Epsilon -) noexcept -{ +inline bool XMScalarNearEqual(float S1, float S2, float Epsilon) noexcept { float Delta = S1 - S2; return (fabsf(Delta) <= Epsilon); } //------------------------------------------------------------------------------ // Modulo the range of the given angle such that -XM_PI <= Angle < XM_PI -inline float XMScalarModAngle(float Angle) noexcept -{ +inline float XMScalarModAngle(float Angle) noexcept { // Note: The modulo is performed with unsigned math only to work // around a precision error on numbers that are close to PI @@ -2148,12 +1931,12 @@ inline float XMScalarModAngle(float Angle) noexcept Angle = Angle + XM_PI; // Perform the modulo, unsigned float fTemp = fabsf(Angle); - fTemp = fTemp - (XM_2PI * static_cast(static_cast(fTemp / XM_2PI))); + fTemp = fTemp - + (XM_2PI * static_cast(static_cast(fTemp / XM_2PI))); // Restore the number to the range of -XM_PI to XM_PI-epsilon fTemp = fTemp - XM_PI; // If the modulo'd value was negative, restore negation - if (Angle < 0.0f) - { + if (Angle < 0.0f) { fTemp = -fTemp; } return fTemp; @@ -2161,264 +1944,244 @@ inline float XMScalarModAngle(float Angle) noexcept //------------------------------------------------------------------------------ -inline float XMScalarSin(float Value) noexcept -{ +inline float XMScalarSin(float Value) noexcept { // Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder. float quotient = XM_1DIV2PI * Value; - if (Value >= 0.0f) - { + if (Value >= 0.0f) { quotient = static_cast(static_cast(quotient + 0.5f)); - } - else - { + } else { quotient = static_cast(static_cast(quotient - 0.5f)); } float y = Value - XM_2PI * quotient; // Map y to [-pi/2,pi/2] with sin(y) = sin(Value). - if (y > XM_PIDIV2) - { + if (y > XM_PIDIV2) { y = XM_PI - y; - } - else if (y < -XM_PIDIV2) - { + } else if (y < -XM_PIDIV2) { y = -XM_PI - y; } // 11-degree minimax approximation float y2 = y * y; - return (((((-2.3889859e-08f * y2 + 2.7525562e-06f) * y2 - 0.00019840874f) * y2 + 0.0083333310f) * y2 - 0.16666667f) * y2 + 1.0f) * y; + return (((((-2.3889859e-08f * y2 + 2.7525562e-06f) * y2 - 0.00019840874f) * + y2 + + 0.0083333310f) * + y2 - + 0.16666667f) * + y2 + + 1.0f) * + y; } //------------------------------------------------------------------------------ -inline float XMScalarSinEst(float Value) noexcept -{ +inline float XMScalarSinEst(float Value) noexcept { // Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder. float quotient = XM_1DIV2PI * Value; - if (Value >= 0.0f) - { + if (Value >= 0.0f) { quotient = static_cast(static_cast(quotient + 0.5f)); - } - else - { + } else { quotient = static_cast(static_cast(quotient - 0.5f)); } float y = Value - XM_2PI * quotient; // Map y to [-pi/2,pi/2] with sin(y) = sin(Value). - if (y > XM_PIDIV2) - { + if (y > XM_PIDIV2) { y = XM_PI - y; - } - else if (y < -XM_PIDIV2) - { + } else if (y < -XM_PIDIV2) { y = -XM_PI - y; } // 7-degree minimax approximation float y2 = y * y; - return (((-0.00018524670f * y2 + 0.0083139502f) * y2 - 0.16665852f) * y2 + 1.0f) * y; + return (((-0.00018524670f * y2 + 0.0083139502f) * y2 - 0.16665852f) * y2 + + 1.0f) * + y; } //------------------------------------------------------------------------------ -inline float XMScalarCos(float Value) noexcept -{ +inline float XMScalarCos(float Value) noexcept { // Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder. float quotient = XM_1DIV2PI * Value; - if (Value >= 0.0f) - { + if (Value >= 0.0f) { quotient = static_cast(static_cast(quotient + 0.5f)); - } - else - { + } else { quotient = static_cast(static_cast(quotient - 0.5f)); } float y = Value - XM_2PI * quotient; // Map y to [-pi/2,pi/2] with cos(y) = sign*cos(x). float sign; - if (y > XM_PIDIV2) - { + if (y > XM_PIDIV2) { y = XM_PI - y; sign = -1.0f; - } - else if (y < -XM_PIDIV2) - { + } else if (y < -XM_PIDIV2) { y = -XM_PI - y; sign = -1.0f; - } - else - { + } else { sign = +1.0f; } // 10-degree minimax approximation float y2 = y * y; - float p = ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + 0.041666638f) * y2 - 0.5f) * y2 + 1.0f; + float p = + ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + + 0.041666638f) * + y2 - + 0.5f) * + y2 + + 1.0f; return sign * p; } //------------------------------------------------------------------------------ -inline float XMScalarCosEst(float Value) noexcept -{ +inline float XMScalarCosEst(float Value) noexcept { // Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder. float quotient = XM_1DIV2PI * Value; - if (Value >= 0.0f) - { + if (Value >= 0.0f) { quotient = static_cast(static_cast(quotient + 0.5f)); - } - else - { + } else { quotient = static_cast(static_cast(quotient - 0.5f)); } float y = Value - XM_2PI * quotient; // Map y to [-pi/2,pi/2] with cos(y) = sign*cos(x). float sign; - if (y > XM_PIDIV2) - { + if (y > XM_PIDIV2) { y = XM_PI - y; sign = -1.0f; - } - else if (y < -XM_PIDIV2) - { + } else if (y < -XM_PIDIV2) { y = -XM_PI - y; sign = -1.0f; - } - else - { + } else { sign = +1.0f; } // 6-degree minimax approximation float y2 = y * y; - float p = ((-0.0012712436f * y2 + 0.041493919f) * y2 - 0.49992746f) * y2 + 1.0f; + float p = + ((-0.0012712436f * y2 + 0.041493919f) * y2 - 0.49992746f) * y2 + 1.0f; return sign * p; } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XMScalarSinCos -( - float* pSin, - float* pCos, - float Value -) noexcept -{ +_Use_decl_annotations_ inline void XMScalarSinCos(float* pSin, float* pCos, + float Value) noexcept { assert(pSin); assert(pCos); // Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder. float quotient = XM_1DIV2PI * Value; - if (Value >= 0.0f) - { + if (Value >= 0.0f) { quotient = static_cast(static_cast(quotient + 0.5f)); - } - else - { + } else { quotient = static_cast(static_cast(quotient - 0.5f)); } float y = Value - XM_2PI * quotient; // Map y to [-pi/2,pi/2] with sin(y) = sin(Value). float sign; - if (y > XM_PIDIV2) - { + if (y > XM_PIDIV2) { y = XM_PI - y; sign = -1.0f; - } - else if (y < -XM_PIDIV2) - { + } else if (y < -XM_PIDIV2) { y = -XM_PI - y; sign = -1.0f; - } - else - { + } else { sign = +1.0f; } float y2 = y * y; // 11-degree minimax approximation - *pSin = (((((-2.3889859e-08f * y2 + 2.7525562e-06f) * y2 - 0.00019840874f) * y2 + 0.0083333310f) * y2 - 0.16666667f) * y2 + 1.0f) * y; + *pSin = (((((-2.3889859e-08f * y2 + 2.7525562e-06f) * y2 - 0.00019840874f) * + y2 + + 0.0083333310f) * + y2 - + 0.16666667f) * + y2 + + 1.0f) * + y; // 10-degree minimax approximation - float p = ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + 0.041666638f) * y2 - 0.5f) * y2 + 1.0f; + float p = + ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + + 0.041666638f) * + y2 - + 0.5f) * + y2 + + 1.0f; *pCos = sign * p; } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XMScalarSinCosEst -( - float* pSin, - float* pCos, - float Value -) noexcept -{ +_Use_decl_annotations_ inline void XMScalarSinCosEst(float* pSin, float* pCos, + float Value) noexcept { assert(pSin); assert(pCos); // Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder. float quotient = XM_1DIV2PI * Value; - if (Value >= 0.0f) - { + if (Value >= 0.0f) { quotient = static_cast(static_cast(quotient + 0.5f)); - } - else - { + } else { quotient = static_cast(static_cast(quotient - 0.5f)); } float y = Value - XM_2PI * quotient; // Map y to [-pi/2,pi/2] with sin(y) = sin(Value). float sign; - if (y > XM_PIDIV2) - { + if (y > XM_PIDIV2) { y = XM_PI - y; sign = -1.0f; - } - else if (y < -XM_PIDIV2) - { + } else if (y < -XM_PIDIV2) { y = -XM_PI - y; sign = -1.0f; - } - else - { + } else { sign = +1.0f; } float y2 = y * y; // 7-degree minimax approximation - *pSin = (((-0.00018524670f * y2 + 0.0083139502f) * y2 - 0.16665852f) * y2 + 1.0f) * y; + *pSin = (((-0.00018524670f * y2 + 0.0083139502f) * y2 - 0.16665852f) * y2 + + 1.0f) * + y; // 6-degree minimax approximation - float p = ((-0.0012712436f * y2 + 0.041493919f) * y2 - 0.49992746f) * y2 + 1.0f; + float p = + ((-0.0012712436f * y2 + 0.041493919f) * y2 - 0.49992746f) * y2 + 1.0f; *pCos = sign * p; } //------------------------------------------------------------------------------ -inline float XMScalarASin(float Value) noexcept -{ +inline float XMScalarASin(float Value) noexcept { // Clamp input to [-1,1]. bool nonnegative = (Value >= 0.0f); float x = fabsf(Value); float omx = 1.0f - x; - if (omx < 0.0f) - { + if (omx < 0.0f) { omx = 0.0f; } float root = sqrtf(omx); // 7-degree minimax approximation - float result = ((((((-0.0012624911f * x + 0.0066700901f) * x - 0.0170881256f) * x + 0.0308918810f) * x - 0.0501743046f) * x + 0.0889789874f) * x - 0.2145988016f) * x + 1.5707963050f; + float result = + ((((((-0.0012624911f * x + 0.0066700901f) * x - 0.0170881256f) * x + + 0.0308918810f) * + x - + 0.0501743046f) * + x + + 0.0889789874f) * + x - + 0.2145988016f) * + x + + 1.5707963050f; result *= root; // acos(|x|) // acos(x) = pi - acos(-x) when x < 0, asin(x) = pi/2 - acos(x) @@ -2427,20 +2190,19 @@ inline float XMScalarASin(float Value) noexcept //------------------------------------------------------------------------------ -inline float XMScalarASinEst(float Value) noexcept -{ +inline float XMScalarASinEst(float Value) noexcept { // Clamp input to [-1,1]. bool nonnegative = (Value >= 0.0f); float x = fabsf(Value); float omx = 1.0f - x; - if (omx < 0.0f) - { + if (omx < 0.0f) { omx = 0.0f; } float root = sqrtf(omx); // 3-degree minimax approximation - float result = ((-0.0187293f * x + 0.0742610f) * x - 0.2121144f) * x + 1.5707288f; + float result = + ((-0.0187293f * x + 0.0742610f) * x - 0.2121144f) * x + 1.5707288f; result *= root; // acos(|x|) // acos(x) = pi - acos(-x) when x < 0, asin(x) = pi/2 - acos(x) @@ -2449,20 +2211,28 @@ inline float XMScalarASinEst(float Value) noexcept //------------------------------------------------------------------------------ -inline float XMScalarACos(float Value) noexcept -{ +inline float XMScalarACos(float Value) noexcept { // Clamp input to [-1,1]. bool nonnegative = (Value >= 0.0f); float x = fabsf(Value); float omx = 1.0f - x; - if (omx < 0.0f) - { + if (omx < 0.0f) { omx = 0.0f; } float root = sqrtf(omx); // 7-degree minimax approximation - float result = ((((((-0.0012624911f * x + 0.0066700901f) * x - 0.0170881256f) * x + 0.0308918810f) * x - 0.0501743046f) * x + 0.0889789874f) * x - 0.2145988016f) * x + 1.5707963050f; + float result = + ((((((-0.0012624911f * x + 0.0066700901f) * x - 0.0170881256f) * x + + 0.0308918810f) * + x - + 0.0501743046f) * + x + + 0.0889789874f) * + x - + 0.2145988016f) * + x + + 1.5707963050f; result *= root; // acos(x) = pi - acos(-x) when x < 0 @@ -2471,23 +2241,21 @@ inline float XMScalarACos(float Value) noexcept //------------------------------------------------------------------------------ -inline float XMScalarACosEst(float Value) noexcept -{ +inline float XMScalarACosEst(float Value) noexcept { // Clamp input to [-1,1]. bool nonnegative = (Value >= 0.0f); float x = fabsf(Value); float omx = 1.0f - x; - if (omx < 0.0f) - { + if (omx < 0.0f) { omx = 0.0f; } float root = sqrtf(omx); // 3-degree minimax approximation - float result = ((-0.0187293f * x + 0.0742610f) * x - 0.2121144f) * x + 1.5707288f; + float result = + ((-0.0187293f * x + 0.0742610f) * x - 0.2121144f) * x + 1.5707288f; result *= root; // acos(x) = pi - acos(-x) when x < 0 return (nonnegative ? result : XM_PI - result); } - diff --git a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathVector.inl b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathVector.inl index c25b902ca..be289e5a6 100644 --- a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathVector.inl +++ b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMathVector.inl @@ -10,23 +10,23 @@ #pragma once #if defined(_XM_NO_INTRINSICS_) -#define XMISNAN(x) isnan(x) -#define XMISINF(x) isinf(x) +#define XMISNAN(x) isnan(x) +#define XMISINF(x) isinf(x) #endif #if defined(_XM_SSE_INTRINSICS_) -#define XM3UNPACK3INTO4(l1, l2, l3) \ - XMVECTOR V3 = _mm_shuffle_ps(l2, l3, _MM_SHUFFLE(0, 0, 3, 2));\ - XMVECTOR V2 = _mm_shuffle_ps(l2, l1, _MM_SHUFFLE(3, 3, 1, 0));\ - V2 = XM_PERMUTE_PS(V2, _MM_SHUFFLE(1, 1, 0, 2));\ +#define XM3UNPACK3INTO4(l1, l2, l3) \ + XMVECTOR V3 = _mm_shuffle_ps(l2, l3, _MM_SHUFFLE(0, 0, 3, 2)); \ + XMVECTOR V2 = _mm_shuffle_ps(l2, l1, _MM_SHUFFLE(3, 3, 1, 0)); \ + V2 = XM_PERMUTE_PS(V2, _MM_SHUFFLE(1, 1, 0, 2)); \ XMVECTOR V4 = _mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(L3), 32 / 8)) -#define XM3PACK4INTO3(v2x) \ - v2x = _mm_shuffle_ps(V2, V3, _MM_SHUFFLE(1, 0, 2, 1));\ - V2 = _mm_shuffle_ps(V2, V1, _MM_SHUFFLE(2, 2, 0, 0));\ - V1 = _mm_shuffle_ps(V1, V2, _MM_SHUFFLE(0, 2, 1, 0));\ - V3 = _mm_shuffle_ps(V3, V4, _MM_SHUFFLE(0, 0, 2, 2));\ +#define XM3PACK4INTO3(v2x) \ + v2x = _mm_shuffle_ps(V2, V3, _MM_SHUFFLE(1, 0, 2, 1)); \ + V2 = _mm_shuffle_ps(V2, V1, _MM_SHUFFLE(2, 2, 0, 0)); \ + V1 = _mm_shuffle_ps(V1, V2, _MM_SHUFFLE(0, 2, 1, 0)); \ + V3 = _mm_shuffle_ps(V3, V4, _MM_SHUFFLE(0, 0, 2, 2)); \ V3 = _mm_shuffle_ps(V3, V4, _MM_SHUFFLE(2, 1, 2, 0)) #endif @@ -43,10 +43,9 @@ //------------------------------------------------------------------------------ // Return a vector with all elements equaling zero -inline XMVECTOR XM_CALLCONV XMVectorZero() noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorZero() noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { 0.0f, 0.0f, 0.0f, 0.0f } } }; + XMVECTORF32 vResult = {{{0.0f, 0.0f, 0.0f, 0.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vdupq_n_f32(0); @@ -57,24 +56,18 @@ inline XMVECTOR XM_CALLCONV XMVectorZero() noexcept //------------------------------------------------------------------------------ // Initialize a vector with four floating point values -inline XMVECTOR XM_CALLCONV XMVectorSet -( - float x, - float y, - float z, - float w -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSet(float x, float y, float z, + float w) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { x, y, z, w } } }; + XMVECTORF32 vResult = {{{x, y, z, w}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t V0 = vcreate_f32( - static_cast(*reinterpret_cast(&x)) - | (static_cast(*reinterpret_cast(&y)) << 32)); + static_cast(*reinterpret_cast(&x)) | + (static_cast(*reinterpret_cast(&y)) << 32)); float32x2_t V1 = vcreate_f32( - static_cast(*reinterpret_cast(&z)) - | (static_cast(*reinterpret_cast(&w)) << 32)); + static_cast(*reinterpret_cast(&z)) | + (static_cast(*reinterpret_cast(&w)) << 32)); return vcombine_f32(V0, V1); #elif defined(_XM_SSE_INTRINSICS_) return _mm_set_ps(w, z, y, x); @@ -83,37 +76,30 @@ inline XMVECTOR XM_CALLCONV XMVectorSet //------------------------------------------------------------------------------ // Initialize a vector with four integer values -inline XMVECTOR XM_CALLCONV XMVectorSetInt -( - uint32_t x, - uint32_t y, - uint32_t z, - uint32_t w -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetInt(uint32_t x, uint32_t y, uint32_t z, + uint32_t w) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 vResult = { { { x, y, z, w } } }; + XMVECTORU32 vResult = {{{x, y, z, w}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t V0 = vcreate_u32(static_cast(x) | (static_cast(y) << 32)); - uint32x2_t V1 = vcreate_u32(static_cast(z) | (static_cast(w) << 32)); + uint32x2_t V0 = vcreate_u32(static_cast(x) | + (static_cast(y) << 32)); + uint32x2_t V1 = vcreate_u32(static_cast(z) | + (static_cast(w) << 32)); return vreinterpretq_f32_u32(vcombine_u32(V0, V1)); #elif defined(_XM_SSE_INTRINSICS_) - __m128i V = _mm_set_epi32(static_cast(w), static_cast(z), static_cast(y), static_cast(x)); + __m128i V = _mm_set_epi32(static_cast(w), static_cast(z), + static_cast(y), static_cast(x)); return _mm_castsi128_ps(V); #endif } //------------------------------------------------------------------------------ // Initialize a vector with a replicated floating point value -inline XMVECTOR XM_CALLCONV XMVectorReplicate(float Value) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorReplicate(float Value) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = Value; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = Value; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vdupq_n_f32(Value); @@ -124,16 +110,12 @@ inline XMVECTOR XM_CALLCONV XMVectorReplicate(float Value) noexcept //------------------------------------------------------------------------------ // Initialize a vector with a replicated floating point value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorReplicatePtr(const float* pValue) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorReplicatePtr(const float* pValue) noexcept { #if defined(_XM_NO_INTRINSICS_) float Value = pValue[0]; XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = Value; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = Value; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vld1q_dup_f32(pValue); @@ -146,14 +128,10 @@ inline XMVECTOR XM_CALLCONV XMVectorReplicatePtr(const float* pValue) noexcept //------------------------------------------------------------------------------ // Initialize a vector with a replicated integer value -inline XMVECTOR XM_CALLCONV XMVectorReplicateInt(uint32_t Value) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorReplicateInt(uint32_t Value) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORU32 vResult; - vResult.u[0] = - vResult.u[1] = - vResult.u[2] = - vResult.u[3] = Value; + vResult.u[0] = vResult.u[1] = vResult.u[2] = vResult.u[3] = Value; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_u32(vdupq_n_u32(Value)); @@ -165,16 +143,12 @@ inline XMVECTOR XM_CALLCONV XMVectorReplicateInt(uint32_t Value) noexcept //------------------------------------------------------------------------------ // Initialize a vector with a replicated integer value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorReplicateIntPtr(const uint32_t* pValue) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorReplicateIntPtr(const uint32_t* pValue) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t Value = pValue[0]; XMVECTORU32 vResult; - vResult.u[0] = - vResult.u[1] = - vResult.u[2] = - vResult.u[3] = Value; + vResult.u[0] = vResult.u[1] = vResult.u[2] = vResult.u[3] = Value; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_u32(vld1q_dup_u32(pValue)); @@ -185,10 +159,10 @@ inline XMVECTOR XM_CALLCONV XMVectorReplicateIntPtr(const uint32_t* pValue) noex //------------------------------------------------------------------------------ // Initialize a vector with all bits set (true mask) -inline XMVECTOR XM_CALLCONV XMVectorTrueInt() noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorTrueInt() noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 vResult = { { { 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU } } }; + XMVECTORU32 vResult = { + {{0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_s32(vdupq_n_s32(-1)); @@ -200,10 +174,9 @@ inline XMVECTOR XM_CALLCONV XMVectorTrueInt() noexcept //------------------------------------------------------------------------------ // Initialize a vector with all bits clear (false mask) -inline XMVECTOR XM_CALLCONV XMVectorFalseInt() noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorFalseInt() noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { 0.0f, 0.0f, 0.0f, 0.0f } } }; + XMVECTORF32 vResult = {{{0.0f, 0.0f, 0.0f, 0.0f}}}; return vResult; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_u32(vdupq_n_u32(0)); @@ -214,14 +187,11 @@ inline XMVECTOR XM_CALLCONV XMVectorFalseInt() noexcept //------------------------------------------------------------------------------ // Replicate the x component of the vector -inline XMVECTOR XM_CALLCONV XMVectorSplatX(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatX(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = V.vector4_f32[0]; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = + V.vector4_f32[0]; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vdupq_lane_f32(vget_low_f32(V), 0); @@ -234,14 +204,11 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatX(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Replicate the y component of the vector -inline XMVECTOR XM_CALLCONV XMVectorSplatY(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatY(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = V.vector4_f32[1]; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = + V.vector4_f32[1]; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vdupq_lane_f32(vget_low_f32(V), 1); @@ -252,14 +219,11 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatY(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Replicate the z component of the vector -inline XMVECTOR XM_CALLCONV XMVectorSplatZ(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatZ(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = V.vector4_f32[2]; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = + V.vector4_f32[2]; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vdupq_lane_f32(vget_high_f32(V), 0); @@ -270,14 +234,11 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatZ(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Replicate the w component of the vector -inline XMVECTOR XM_CALLCONV XMVectorSplatW(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatW(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = V.vector4_f32[3]; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = + V.vector4_f32[3]; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vdupq_lane_f32(vget_high_f32(V), 1); @@ -288,14 +249,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatW(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Return a vector of 1.0f,1.0f,1.0f,1.0f -inline XMVECTOR XM_CALLCONV XMVectorSplatOne() noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatOne() noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = 1.0f; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = 1.0f; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vdupq_n_f32(1.0f); @@ -306,14 +263,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatOne() noexcept //------------------------------------------------------------------------------ // Return a vector of INF,INF,INF,INF -inline XMVECTOR XM_CALLCONV XMVectorSplatInfinity() noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatInfinity() noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORU32 vResult; - vResult.u[0] = - vResult.u[1] = - vResult.u[2] = - vResult.u[3] = 0x7F800000; + vResult.u[0] = vResult.u[1] = vResult.u[2] = vResult.u[3] = 0x7F800000; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_u32(vdupq_n_u32(0x7F800000)); @@ -324,14 +277,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatInfinity() noexcept //------------------------------------------------------------------------------ // Return a vector of Q_NAN,Q_NAN,Q_NAN,Q_NAN -inline XMVECTOR XM_CALLCONV XMVectorSplatQNaN() noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatQNaN() noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORU32 vResult; - vResult.u[0] = - vResult.u[1] = - vResult.u[2] = - vResult.u[3] = 0x7FC00000; + vResult.u[0] = vResult.u[1] = vResult.u[2] = vResult.u[3] = 0x7FC00000; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_u32(vdupq_n_u32(0x7FC00000)); @@ -341,15 +290,12 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatQNaN() noexcept } //------------------------------------------------------------------------------ -// Return a vector of 1.192092896e-7f,1.192092896e-7f,1.192092896e-7f,1.192092896e-7f -inline XMVECTOR XM_CALLCONV XMVectorSplatEpsilon() noexcept -{ +// Return a vector +// of 1.192092896e-7f,1.192092896e-7f,1.192092896e-7f,1.192092896e-7f +inline XMVECTOR XM_CALLCONV XMVectorSplatEpsilon() noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORU32 vResult; - vResult.u[0] = - vResult.u[1] = - vResult.u[2] = - vResult.u[3] = 0x34000000; + vResult.u[0] = vResult.u[1] = vResult.u[2] = vResult.u[3] = 0x34000000; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_u32(vdupq_n_u32(0x34000000)); @@ -360,14 +306,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatEpsilon() noexcept //------------------------------------------------------------------------------ // Return a vector of -0.0f (0x80000000),-0.0f,-0.0f,-0.0f -inline XMVECTOR XM_CALLCONV XMVectorSplatSignMask() noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSplatSignMask() noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORU32 vResult; - vResult.u[0] = - vResult.u[1] = - vResult.u[2] = - vResult.u[3] = 0x80000000U; + vResult.u[0] = vResult.u[1] = vResult.u[2] = vResult.u[3] = 0x80000000U; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vreinterpretq_f32_u32(vdupq_n_u32(0x80000000U)); @@ -380,8 +322,7 @@ inline XMVECTOR XM_CALLCONV XMVectorSplatSignMask() noexcept //------------------------------------------------------------------------------ // Return a floating point value via an index. This is not a recommended // function to use due to performance loss. -inline float XM_CALLCONV XMVectorGetByIndex(FXMVECTOR V, size_t i) noexcept -{ +inline float XM_CALLCONV XMVectorGetByIndex(FXMVECTOR V, size_t i) noexcept { assert(i < 4); _Analysis_assume_(i < 4); #if defined(_XM_NO_INTRINSICS_) @@ -395,8 +336,7 @@ inline float XM_CALLCONV XMVectorGetByIndex(FXMVECTOR V, size_t i) noexcept //------------------------------------------------------------------------------ // Return the X component in an FPU register. -inline float XM_CALLCONV XMVectorGetX(FXMVECTOR V) noexcept -{ +inline float XM_CALLCONV XMVectorGetX(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_f32[0]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -407,8 +347,7 @@ inline float XM_CALLCONV XMVectorGetX(FXMVECTOR V) noexcept } // Return the Y component in an FPU register. -inline float XM_CALLCONV XMVectorGetY(FXMVECTOR V) noexcept -{ +inline float XM_CALLCONV XMVectorGetY(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_f32[1]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -420,8 +359,7 @@ inline float XM_CALLCONV XMVectorGetY(FXMVECTOR V) noexcept } // Return the Z component in an FPU register. -inline float XM_CALLCONV XMVectorGetZ(FXMVECTOR V) noexcept -{ +inline float XM_CALLCONV XMVectorGetZ(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_f32[2]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -433,8 +371,7 @@ inline float XM_CALLCONV XMVectorGetZ(FXMVECTOR V) noexcept } // Return the W component in an FPU register. -inline float XM_CALLCONV XMVectorGetW(FXMVECTOR V) noexcept -{ +inline float XM_CALLCONV XMVectorGetW(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_f32[3]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -448,9 +385,8 @@ inline float XM_CALLCONV XMVectorGetW(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Store a component indexed by i into a 32 bit float location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetByIndexPtr(float* f, FXMVECTOR V, size_t i) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetByIndexPtr(float* f, FXMVECTOR V, size_t i) noexcept { assert(f != nullptr); assert(i < 4); _Analysis_assume_(i < 4); @@ -466,9 +402,8 @@ inline void XM_CALLCONV XMVectorGetByIndexPtr(float* f, FXMVECTOR V, size_t i) n //------------------------------------------------------------------------------ // Store the X component into a 32 bit float location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetXPtr(float* x, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetXPtr(float* x, FXMVECTOR V) noexcept { assert(x != nullptr); #if defined(_XM_NO_INTRINSICS_) *x = V.vector4_f32[0]; @@ -480,16 +415,15 @@ inline void XM_CALLCONV XMVectorGetXPtr(float* x, FXMVECTOR V) noexcept } // Store the Y component into a 32 bit float location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetYPtr(float* y, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetYPtr(float* y, FXMVECTOR V) noexcept { assert(y != nullptr); #if defined(_XM_NO_INTRINSICS_) *y = V.vector4_f32[1]; #elif defined(_XM_ARM_NEON_INTRINSICS_) vst1q_lane_f32(y, V, 1); #elif defined(_XM_SSE4_INTRINSICS_) - * (reinterpret_cast(y)) = _mm_extract_ps(V, 1); + *(reinterpret_cast(y)) = _mm_extract_ps(V, 1); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); _mm_store_ss(y, vResult); @@ -497,16 +431,15 @@ inline void XM_CALLCONV XMVectorGetYPtr(float* y, FXMVECTOR V) noexcept } // Store the Z component into a 32 bit float location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetZPtr(float* z, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetZPtr(float* z, FXMVECTOR V) noexcept { assert(z != nullptr); #if defined(_XM_NO_INTRINSICS_) *z = V.vector4_f32[2]; #elif defined(_XM_ARM_NEON_INTRINSICS_) vst1q_lane_f32(z, V, 2); #elif defined(_XM_SSE4_INTRINSICS_) - * (reinterpret_cast(z)) = _mm_extract_ps(V, 2); + *(reinterpret_cast(z)) = _mm_extract_ps(V, 2); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); _mm_store_ss(z, vResult); @@ -514,16 +447,15 @@ inline void XM_CALLCONV XMVectorGetZPtr(float* z, FXMVECTOR V) noexcept } // Store the W component into a 32 bit float location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetWPtr(float* w, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetWPtr(float* w, FXMVECTOR V) noexcept { assert(w != nullptr); #if defined(_XM_NO_INTRINSICS_) *w = V.vector4_f32[3]; #elif defined(_XM_ARM_NEON_INTRINSICS_) vst1q_lane_f32(w, V, 3); #elif defined(_XM_SSE4_INTRINSICS_) - * (reinterpret_cast(w)) = _mm_extract_ps(V, 3); + *(reinterpret_cast(w)) = _mm_extract_ps(V, 3); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(3, 3, 3, 3)); _mm_store_ss(w, vResult); @@ -534,8 +466,8 @@ inline void XM_CALLCONV XMVectorGetWPtr(float* w, FXMVECTOR V) noexcept // Return an integer value via an index. This is not a recommended // function to use due to performance loss. -inline uint32_t XM_CALLCONV XMVectorGetIntByIndex(FXMVECTOR V, size_t i) noexcept -{ +inline uint32_t XM_CALLCONV XMVectorGetIntByIndex(FXMVECTOR V, + size_t i) noexcept { assert(i < 4); _Analysis_assume_(i < 4); #if defined(_XM_NO_INTRINSICS_) @@ -550,8 +482,7 @@ inline uint32_t XM_CALLCONV XMVectorGetIntByIndex(FXMVECTOR V, size_t i) noexcep //------------------------------------------------------------------------------ // Return the X component in an integer register. -inline uint32_t XM_CALLCONV XMVectorGetIntX(FXMVECTOR V) noexcept -{ +inline uint32_t XM_CALLCONV XMVectorGetIntX(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_u32[0]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -562,8 +493,7 @@ inline uint32_t XM_CALLCONV XMVectorGetIntX(FXMVECTOR V) noexcept } // Return the Y component in an integer register. -inline uint32_t XM_CALLCONV XMVectorGetIntY(FXMVECTOR V) noexcept -{ +inline uint32_t XM_CALLCONV XMVectorGetIntY(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_u32[1]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -572,14 +502,14 @@ inline uint32_t XM_CALLCONV XMVectorGetIntY(FXMVECTOR V) noexcept __m128i V1 = _mm_castps_si128(V); return static_cast(_mm_extract_epi32(V1, 1)); #elif defined(_XM_SSE_INTRINSICS_) - __m128i vResulti = _mm_shuffle_epi32(_mm_castps_si128(V), _MM_SHUFFLE(1, 1, 1, 1)); + __m128i vResulti = + _mm_shuffle_epi32(_mm_castps_si128(V), _MM_SHUFFLE(1, 1, 1, 1)); return static_cast(_mm_cvtsi128_si32(vResulti)); #endif } // Return the Z component in an integer register. -inline uint32_t XM_CALLCONV XMVectorGetIntZ(FXMVECTOR V) noexcept -{ +inline uint32_t XM_CALLCONV XMVectorGetIntZ(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_u32[2]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -588,14 +518,14 @@ inline uint32_t XM_CALLCONV XMVectorGetIntZ(FXMVECTOR V) noexcept __m128i V1 = _mm_castps_si128(V); return static_cast(_mm_extract_epi32(V1, 2)); #elif defined(_XM_SSE_INTRINSICS_) - __m128i vResulti = _mm_shuffle_epi32(_mm_castps_si128(V), _MM_SHUFFLE(2, 2, 2, 2)); + __m128i vResulti = + _mm_shuffle_epi32(_mm_castps_si128(V), _MM_SHUFFLE(2, 2, 2, 2)); return static_cast(_mm_cvtsi128_si32(vResulti)); #endif } // Return the W component in an integer register. -inline uint32_t XM_CALLCONV XMVectorGetIntW(FXMVECTOR V) noexcept -{ +inline uint32_t XM_CALLCONV XMVectorGetIntW(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) return V.vector4_u32[3]; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -604,7 +534,8 @@ inline uint32_t XM_CALLCONV XMVectorGetIntW(FXMVECTOR V) noexcept __m128i V1 = _mm_castps_si128(V); return static_cast(_mm_extract_epi32(V1, 3)); #elif defined(_XM_SSE_INTRINSICS_) - __m128i vResulti = _mm_shuffle_epi32(_mm_castps_si128(V), _MM_SHUFFLE(3, 3, 3, 3)); + __m128i vResulti = + _mm_shuffle_epi32(_mm_castps_si128(V), _MM_SHUFFLE(3, 3, 3, 3)); return static_cast(_mm_cvtsi128_si32(vResulti)); #endif } @@ -612,9 +543,8 @@ inline uint32_t XM_CALLCONV XMVectorGetIntW(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Store a component indexed by i into a 32 bit integer location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetIntByIndexPtr(uint32_t* x, FXMVECTOR V, size_t i) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetIntByIndexPtr(uint32_t* x, FXMVECTOR V, size_t i) noexcept { assert(x != nullptr); assert(i < 4); _Analysis_assume_(i < 4); @@ -630,9 +560,8 @@ inline void XM_CALLCONV XMVectorGetIntByIndexPtr(uint32_t* x, FXMVECTOR V, size_ //------------------------------------------------------------------------------ // Store the X component into a 32 bit integer location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetIntXPtr(uint32_t* x, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetIntXPtr(uint32_t* x, FXMVECTOR V) noexcept { assert(x != nullptr); #if defined(_XM_NO_INTRINSICS_) *x = V.vector4_u32[0]; @@ -644,9 +573,8 @@ inline void XM_CALLCONV XMVectorGetIntXPtr(uint32_t* x, FXMVECTOR V) noexcept } // Store the Y component into a 32 bit integer location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetIntYPtr(uint32_t* y, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetIntYPtr(uint32_t* y, FXMVECTOR V) noexcept { assert(y != nullptr); #if defined(_XM_NO_INTRINSICS_) *y = V.vector4_u32[1]; @@ -662,9 +590,8 @@ inline void XM_CALLCONV XMVectorGetIntYPtr(uint32_t* y, FXMVECTOR V) noexcept } // Store the Z component into a 32 bit integer locaCantion in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetIntZPtr(uint32_t* z, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetIntZPtr(uint32_t* z, FXMVECTOR V) noexcept { assert(z != nullptr); #if defined(_XM_NO_INTRINSICS_) *z = V.vector4_u32[2]; @@ -680,9 +607,8 @@ inline void XM_CALLCONV XMVectorGetIntZPtr(uint32_t* z, FXMVECTOR V) noexcept } // Store the W component into a 32 bit integer location in memory. -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorGetIntWPtr(uint32_t* w, FXMVECTOR V) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorGetIntWPtr(uint32_t* w, FXMVECTOR V) noexcept { assert(w != nullptr); #if defined(_XM_NO_INTRINSICS_) *w = V.vector4_u32[3]; @@ -700,8 +626,8 @@ inline void XM_CALLCONV XMVectorGetIntWPtr(uint32_t* w, FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Set a single indexed floating point component -inline XMVECTOR XM_CALLCONV XMVectorSetByIndex(FXMVECTOR V, float f, size_t i) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetByIndex(FXMVECTOR V, float f, + size_t i) noexcept { assert(i < 4); _Analysis_assume_(i < 4); XMVECTORF32 U; @@ -713,15 +639,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSetByIndex(FXMVECTOR V, float f, size_t i) n //------------------------------------------------------------------------------ // Sets the X component of a vector to a passed floating point value -inline XMVECTOR XM_CALLCONV XMVectorSetX(FXMVECTOR V, float x) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetX(FXMVECTOR V, float x) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - x, - V.vector4_f32[1], - V.vector4_f32[2], - V.vector4_f32[3] - } } }; + XMVECTORF32 U = { + {{x, V.vector4_f32[1], V.vector4_f32[2], V.vector4_f32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vsetq_lane_f32(x, V, 0); @@ -733,15 +654,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSetX(FXMVECTOR V, float x) noexcept } // Sets the Y component of a vector to a passed floating point value -inline XMVECTOR XM_CALLCONV XMVectorSetY(FXMVECTOR V, float y) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetY(FXMVECTOR V, float y) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - V.vector4_f32[0], - y, - V.vector4_f32[2], - V.vector4_f32[3] - } } }; + XMVECTORF32 U = { + {{V.vector4_f32[0], y, V.vector4_f32[2], V.vector4_f32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vsetq_lane_f32(y, V, 1); @@ -762,15 +678,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSetY(FXMVECTOR V, float y) noexcept #endif } // Sets the Z component of a vector to a passed floating point value -inline XMVECTOR XM_CALLCONV XMVectorSetZ(FXMVECTOR V, float z) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetZ(FXMVECTOR V, float z) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - V.vector4_f32[0], - V.vector4_f32[1], - z, - V.vector4_f32[3] - } } }; + XMVECTORF32 U = { + {{V.vector4_f32[0], V.vector4_f32[1], z, V.vector4_f32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vsetq_lane_f32(z, V, 2); @@ -792,15 +703,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSetZ(FXMVECTOR V, float z) noexcept } // Sets the W component of a vector to a passed floating point value -inline XMVECTOR XM_CALLCONV XMVectorSetW(FXMVECTOR V, float w) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetW(FXMVECTOR V, float w) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - V.vector4_f32[0], - V.vector4_f32[1], - V.vector4_f32[2], - w - } } }; + XMVECTORF32 U = { + {{V.vector4_f32[0], V.vector4_f32[1], V.vector4_f32[2], w}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vsetq_lane_f32(w, V, 3); @@ -824,9 +730,8 @@ inline XMVECTOR XM_CALLCONV XMVectorSetW(FXMVECTOR V, float w) noexcept //------------------------------------------------------------------------------ // Sets a component of a vector to a floating point value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetByIndexPtr(FXMVECTOR V, const float* f, size_t i) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetByIndexPtr(FXMVECTOR V, const float* f, size_t i) noexcept { assert(f != nullptr); assert(i < 4); _Analysis_assume_(i < 4); @@ -839,17 +744,12 @@ inline XMVECTOR XM_CALLCONV XMVectorSetByIndexPtr(FXMVECTOR V, const float* f, s //------------------------------------------------------------------------------ // Sets the X component of a vector to a floating point value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetXPtr(FXMVECTOR V, const float* x) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetXPtr(FXMVECTOR V, const float* x) noexcept { assert(x != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - *x, - V.vector4_f32[1], - V.vector4_f32[2], - V.vector4_f32[3] - } } }; + XMVECTORF32 U = { + {{*x, V.vector4_f32[1], V.vector4_f32[2], V.vector4_f32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vld1q_lane_f32(x, V, 0); @@ -861,17 +761,12 @@ inline XMVECTOR XM_CALLCONV XMVectorSetXPtr(FXMVECTOR V, const float* x) noexcep } // Sets the Y component of a vector to a floating point value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetYPtr(FXMVECTOR V, const float* y) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetYPtr(FXMVECTOR V, const float* y) noexcept { assert(y != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - V.vector4_f32[0], - *y, - V.vector4_f32[2], - V.vector4_f32[3] - } } }; + XMVECTORF32 U = { + {{V.vector4_f32[0], *y, V.vector4_f32[2], V.vector4_f32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vld1q_lane_f32(y, V, 1); @@ -889,17 +784,12 @@ inline XMVECTOR XM_CALLCONV XMVectorSetYPtr(FXMVECTOR V, const float* y) noexcep } // Sets the Z component of a vector to a floating point value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetZPtr(FXMVECTOR V, const float* z) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetZPtr(FXMVECTOR V, const float* z) noexcept { assert(z != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - V.vector4_f32[0], - V.vector4_f32[1], - *z, - V.vector4_f32[3] - } } }; + XMVECTORF32 U = { + {{V.vector4_f32[0], V.vector4_f32[1], *z, V.vector4_f32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vld1q_lane_f32(z, V, 2); @@ -917,17 +807,12 @@ inline XMVECTOR XM_CALLCONV XMVectorSetZPtr(FXMVECTOR V, const float* z) noexcep } // Sets the W component of a vector to a floating point value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetWPtr(FXMVECTOR V, const float* w) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetWPtr(FXMVECTOR V, const float* w) noexcept { assert(w != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 U = { { { - V.vector4_f32[0], - V.vector4_f32[1], - V.vector4_f32[2], - *w - } } }; + XMVECTORF32 U = { + {{V.vector4_f32[0], V.vector4_f32[1], V.vector4_f32[2], *w}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vld1q_lane_f32(w, V, 3); @@ -947,8 +832,8 @@ inline XMVECTOR XM_CALLCONV XMVectorSetWPtr(FXMVECTOR V, const float* w) noexcep //------------------------------------------------------------------------------ // Sets a component of a vector to an integer passed by value -inline XMVECTOR XM_CALLCONV XMVectorSetIntByIndex(FXMVECTOR V, uint32_t x, size_t i) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetIntByIndex(FXMVECTOR V, uint32_t x, + size_t i) noexcept { assert(i < 4); _Analysis_assume_(i < 4); XMVECTORU32 tmp; @@ -960,18 +845,14 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntByIndex(FXMVECTOR V, uint32_t x, size_ //------------------------------------------------------------------------------ // Sets the X component of a vector to an integer passed by value -inline XMVECTOR XM_CALLCONV XMVectorSetIntX(FXMVECTOR V, uint32_t x) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetIntX(FXMVECTOR V, uint32_t x) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - x, - V.vector4_u32[1], - V.vector4_u32[2], - V.vector4_u32[3] - } } }; + XMVECTORU32 U = { + {{x, V.vector4_u32[1], V.vector4_u32[2], V.vector4_u32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vsetq_lane_u32(x, vreinterpretq_u32_f32(V), 0)); + return vreinterpretq_f32_u32( + vsetq_lane_u32(x, vreinterpretq_u32_f32(V), 0)); #elif defined(_XM_SSE_INTRINSICS_) __m128i vTemp = _mm_cvtsi32_si128(static_cast(x)); XMVECTOR vResult = _mm_move_ss(V, _mm_castsi128_ps(vTemp)); @@ -980,18 +861,14 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntX(FXMVECTOR V, uint32_t x) noexcept } // Sets the Y component of a vector to an integer passed by value -inline XMVECTOR XM_CALLCONV XMVectorSetIntY(FXMVECTOR V, uint32_t y) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetIntY(FXMVECTOR V, uint32_t y) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - V.vector4_u32[0], - y, - V.vector4_u32[2], - V.vector4_u32[3] - } } }; + XMVECTORU32 U = { + {{V.vector4_u32[0], y, V.vector4_u32[2], V.vector4_u32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vsetq_lane_u32(y, vreinterpretq_u32_f32(V), 1)); + return vreinterpretq_f32_u32( + vsetq_lane_u32(y, vreinterpretq_u32_f32(V), 1)); #elif defined(_XM_SSE4_INTRINSICS_) __m128i vResult = _mm_castps_si128(V); vResult = _mm_insert_epi32(vResult, static_cast(y), 1); @@ -1010,18 +887,14 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntY(FXMVECTOR V, uint32_t y) noexcept } // Sets the Z component of a vector to an integer passed by value -inline XMVECTOR XM_CALLCONV XMVectorSetIntZ(FXMVECTOR V, uint32_t z) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetIntZ(FXMVECTOR V, uint32_t z) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - V.vector4_u32[0], - V.vector4_u32[1], - z, - V.vector4_u32[3] - } } }; + XMVECTORU32 U = { + {{V.vector4_u32[0], V.vector4_u32[1], z, V.vector4_u32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vsetq_lane_u32(z, vreinterpretq_u32_f32(V), 2)); + return vreinterpretq_f32_u32( + vsetq_lane_u32(z, vreinterpretq_u32_f32(V), 2)); #elif defined(_XM_SSE4_INTRINSICS_) __m128i vResult = _mm_castps_si128(V); vResult = _mm_insert_epi32(vResult, static_cast(z), 2); @@ -1040,18 +913,14 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntZ(FXMVECTOR V, uint32_t z) noexcept } // Sets the W component of a vector to an integer passed by value -inline XMVECTOR XM_CALLCONV XMVectorSetIntW(FXMVECTOR V, uint32_t w) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSetIntW(FXMVECTOR V, uint32_t w) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - V.vector4_u32[0], - V.vector4_u32[1], - V.vector4_u32[2], - w - } } }; + XMVECTORU32 U = { + {{V.vector4_u32[0], V.vector4_u32[1], V.vector4_u32[2], w}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vsetq_lane_u32(w, vreinterpretq_u32_f32(V), 3)); + return vreinterpretq_f32_u32( + vsetq_lane_u32(w, vreinterpretq_u32_f32(V), 3)); #elif defined(_XM_SSE4_INTRINSICS_) __m128i vResult = _mm_castps_si128(V); vResult = _mm_insert_epi32(vResult, static_cast(w), 3); @@ -1072,9 +941,8 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntW(FXMVECTOR V, uint32_t w) noexcept //------------------------------------------------------------------------------ // Sets a component of a vector to an integer value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetIntByIndexPtr(FXMVECTOR V, const uint32_t* x, size_t i) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetIntByIndexPtr(FXMVECTOR V, const uint32_t* x, size_t i) noexcept { assert(x != nullptr); assert(i < 4); _Analysis_assume_(i < 4); @@ -1087,20 +955,16 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntByIndexPtr(FXMVECTOR V, const uint32_t //------------------------------------------------------------------------------ // Sets the X component of a vector to an integer value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetIntXPtr(FXMVECTOR V, const uint32_t* x) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetIntXPtr(FXMVECTOR V, const uint32_t* x) noexcept { assert(x != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - *x, - V.vector4_u32[1], - V.vector4_u32[2], - V.vector4_u32[3] - } } }; + XMVECTORU32 U = { + {{*x, V.vector4_u32[1], V.vector4_u32[2], V.vector4_u32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vld1q_lane_u32(x, *reinterpret_cast(&V), 0)); + return vreinterpretq_f32_u32( + vld1q_lane_u32(x, *reinterpret_cast(&V), 0)); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_load_ss(reinterpret_cast(x)); XMVECTOR vResult = _mm_move_ss(V, vTemp); @@ -1109,20 +973,16 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntXPtr(FXMVECTOR V, const uint32_t* x) n } // Sets the Y component of a vector to an integer value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetIntYPtr(FXMVECTOR V, const uint32_t* y) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetIntYPtr(FXMVECTOR V, const uint32_t* y) noexcept { assert(y != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - V.vector4_u32[0], - *y, - V.vector4_u32[2], - V.vector4_u32[3] - } } }; + XMVECTORU32 U = { + {{V.vector4_u32[0], *y, V.vector4_u32[2], V.vector4_u32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vld1q_lane_u32(y, *reinterpret_cast(&V), 1)); + return vreinterpretq_f32_u32( + vld1q_lane_u32(y, *reinterpret_cast(&V), 1)); #elif defined(_XM_SSE_INTRINSICS_) // Swap y and x XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(3, 2, 0, 1)); @@ -1137,20 +997,16 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntYPtr(FXMVECTOR V, const uint32_t* y) n } // Sets the Z component of a vector to an integer value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetIntZPtr(FXMVECTOR V, const uint32_t* z) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetIntZPtr(FXMVECTOR V, const uint32_t* z) noexcept { assert(z != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - V.vector4_u32[0], - V.vector4_u32[1], - *z, - V.vector4_u32[3] - } } }; + XMVECTORU32 U = { + {{V.vector4_u32[0], V.vector4_u32[1], *z, V.vector4_u32[3]}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vld1q_lane_u32(z, *reinterpret_cast(&V), 2)); + return vreinterpretq_f32_u32( + vld1q_lane_u32(z, *reinterpret_cast(&V), 2)); #elif defined(_XM_SSE_INTRINSICS_) // Swap z and x XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(3, 0, 1, 2)); @@ -1165,20 +1021,16 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntZPtr(FXMVECTOR V, const uint32_t* z) n } // Sets the W component of a vector to an integer value passed by pointer -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorSetIntWPtr(FXMVECTOR V, const uint32_t* w) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorSetIntWPtr(FXMVECTOR V, const uint32_t* w) noexcept { assert(w != nullptr); #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 U = { { { - V.vector4_u32[0], - V.vector4_u32[1], - V.vector4_u32[2], - *w - } } }; + XMVECTORU32 U = { + {{V.vector4_u32[0], V.vector4_u32[1], V.vector4_u32[2], *w}}}; return U.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vld1q_lane_u32(w, *reinterpret_cast(&V), 3)); + return vreinterpretq_f32_u32( + vld1q_lane_u32(w, *reinterpret_cast(&V), 3)); #elif defined(_XM_SSE_INTRINSICS_) // Swap w and x XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 2, 1, 3)); @@ -1194,50 +1046,43 @@ inline XMVECTOR XM_CALLCONV XMVectorSetIntWPtr(FXMVECTOR V, const uint32_t* w) n //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSwizzle -( - FXMVECTOR V, - uint32_t E0, - uint32_t E1, - uint32_t E2, - uint32_t E3 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSwizzle(FXMVECTOR V, uint32_t E0, + uint32_t E1, uint32_t E2, + uint32_t E3) noexcept { assert((E0 < 4) && (E1 < 4) && (E2 < 4) && (E3 < 4)); _Analysis_assume_((E0 < 4) && (E1 < 4) && (E2 < 4) && (E3 < 4)); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V.vector4_f32[E0], - V.vector4_f32[E1], - V.vector4_f32[E2], - V.vector4_f32[E3] - } } }; + XMVECTORF32 Result = {{{V.vector4_f32[E0], V.vector4_f32[E1], + V.vector4_f32[E2], V.vector4_f32[E3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const uint32_t ControlElement[4] = - { - 0x03020100, // XM_SWIZZLE_X - 0x07060504, // XM_SWIZZLE_Y - 0x0B0A0908, // XM_SWIZZLE_Z - 0x0F0E0D0C, // XM_SWIZZLE_W + static const uint32_t ControlElement[4] = { + 0x03020100, // XM_SWIZZLE_X + 0x07060504, // XM_SWIZZLE_Y + 0x0B0A0908, // XM_SWIZZLE_Z + 0x0F0E0D0C, // XM_SWIZZLE_W }; uint8x8x2_t tbl; tbl.val[0] = vreinterpret_u8_f32(vget_low_f32(V)); tbl.val[1] = vreinterpret_u8_f32(vget_high_f32(V)); - uint32x2_t idx = vcreate_u32(static_cast(ControlElement[E0]) | (static_cast(ControlElement[E1]) << 32)); + uint32x2_t idx = + vcreate_u32(static_cast(ControlElement[E0]) | + (static_cast(ControlElement[E1]) << 32)); const uint8x8_t rL = vtbl2_u8(tbl, vreinterpret_u8_u32(idx)); - idx = vcreate_u32(static_cast(ControlElement[E2]) | (static_cast(ControlElement[E3]) << 32)); + idx = vcreate_u32(static_cast(ControlElement[E2]) | + (static_cast(ControlElement[E3]) << 32)); const uint8x8_t rH = vtbl2_u8(tbl, vreinterpret_u8_u32(idx)); return vcombine_f32(vreinterpret_f32_u8(rL), vreinterpret_f32_u8(rH)); #elif defined(_XM_AVX_INTRINSICS_) - unsigned int elem[4] = { E0, E1, E2, E3 }; - __m128i vControl = _mm_loadu_si128(reinterpret_cast(&elem[0])); + unsigned int elem[4] = {E0, E1, E2, E3}; + __m128i vControl = + _mm_loadu_si128(reinterpret_cast(&elem[0])); return _mm_permutevar_ps(V, vControl); #else auto aPtr = reinterpret_cast(&V); @@ -1255,30 +1100,25 @@ inline XMVECTOR XM_CALLCONV XMVectorSwizzle } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorPermute -( - FXMVECTOR V1, - FXMVECTOR V2, - uint32_t PermuteX, - uint32_t PermuteY, - uint32_t PermuteZ, - uint32_t PermuteW -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorPermute(FXMVECTOR V1, FXMVECTOR V2, + uint32_t PermuteX, + uint32_t PermuteY, + uint32_t PermuteZ, + uint32_t PermuteW) noexcept { assert(PermuteX <= 7 && PermuteY <= 7 && PermuteZ <= 7 && PermuteW <= 7); - _Analysis_assume_(PermuteX <= 7 && PermuteY <= 7 && PermuteZ <= 7 && PermuteW <= 7); + _Analysis_assume_(PermuteX <= 7 && PermuteY <= 7 && PermuteZ <= 7 && + PermuteW <= 7); #if defined(_XM_ARM_NEON_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) - static const uint32_t ControlElement[8] = - { - 0x03020100, // XM_PERMUTE_0X - 0x07060504, // XM_PERMUTE_0Y - 0x0B0A0908, // XM_PERMUTE_0Z - 0x0F0E0D0C, // XM_PERMUTE_0W - 0x13121110, // XM_PERMUTE_1X - 0x17161514, // XM_PERMUTE_1Y - 0x1B1A1918, // XM_PERMUTE_1Z - 0x1F1E1D1C, // XM_PERMUTE_1W + static const uint32_t ControlElement[8] = { + 0x03020100, // XM_PERMUTE_0X + 0x07060504, // XM_PERMUTE_0Y + 0x0B0A0908, // XM_PERMUTE_0Z + 0x0F0E0D0C, // XM_PERMUTE_0W + 0x13121110, // XM_PERMUTE_1X + 0x17161514, // XM_PERMUTE_1Y + 0x1B1A1918, // XM_PERMUTE_1Z + 0x1F1E1D1C, // XM_PERMUTE_1W }; uint8x8x4_t tbl; @@ -1287,18 +1127,23 @@ inline XMVECTOR XM_CALLCONV XMVectorPermute tbl.val[2] = vreinterpret_u8_f32(vget_low_f32(V2)); tbl.val[3] = vreinterpret_u8_f32(vget_high_f32(V2)); - uint32x2_t idx = vcreate_u32(static_cast(ControlElement[PermuteX]) | (static_cast(ControlElement[PermuteY]) << 32)); + uint32x2_t idx = + vcreate_u32(static_cast(ControlElement[PermuteX]) | + (static_cast(ControlElement[PermuteY]) << 32)); const uint8x8_t rL = vtbl4_u8(tbl, vreinterpret_u8_u32(idx)); - idx = vcreate_u32(static_cast(ControlElement[PermuteZ]) | (static_cast(ControlElement[PermuteW]) << 32)); + idx = vcreate_u32(static_cast(ControlElement[PermuteZ]) | + (static_cast(ControlElement[PermuteW]) << 32)); const uint8x8_t rH = vtbl4_u8(tbl, vreinterpret_u8_u32(idx)); return vcombine_f32(vreinterpret_f32_u8(rL), vreinterpret_f32_u8(rH)); #elif defined(_XM_AVX_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) - static const XMVECTORU32 three = { { { 3, 3, 3, 3 } } }; + static const XMVECTORU32 three = {{{3, 3, 3, 3}}}; - XM_ALIGNED_DATA(16) unsigned int elem[4] = { PermuteX, PermuteY, PermuteZ, PermuteW }; - __m128i vControl = _mm_load_si128(reinterpret_cast(&elem[0])); + XM_ALIGNED_DATA(16) + unsigned int elem[4] = {PermuteX, PermuteY, PermuteZ, PermuteW}; + __m128i vControl = + _mm_load_si128(reinterpret_cast(&elem[0])); __m128i vSelect = _mm_cmpgt_epi32(vControl, three); vControl = _mm_castps_si128(_mm_and_ps(_mm_castsi128_ps(vControl), three)); @@ -1350,33 +1195,28 @@ inline XMVECTOR XM_CALLCONV XMVectorPermute // vector to be selected whereas a one causes the component from the // second vector to be selected instead. -inline XMVECTOR XM_CALLCONV XMVectorSelectControl -( - uint32_t VectorIndex0, - uint32_t VectorIndex1, - uint32_t VectorIndex2, - uint32_t VectorIndex3 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVectorSelectControl(uint32_t VectorIndex0, uint32_t VectorIndex1, + uint32_t VectorIndex2, uint32_t VectorIndex3) noexcept { #if defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) // x=Index0,y=Index1,z=Index2,w=Index3 - __m128i vTemp = _mm_set_epi32(static_cast(VectorIndex3), static_cast(VectorIndex2), static_cast(VectorIndex1), static_cast(VectorIndex0)); + __m128i vTemp = _mm_set_epi32( + static_cast(VectorIndex3), static_cast(VectorIndex2), + static_cast(VectorIndex1), static_cast(VectorIndex0)); // Any non-zero entries become 0xFFFFFFFF else 0 vTemp = _mm_cmpgt_epi32(vTemp, g_XMZero); return _mm_castsi128_ps(vTemp); #elif defined(_XM_ARM_NEON_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) - int32x2_t V0 = vcreate_s32(static_cast(VectorIndex0) | (static_cast(VectorIndex1) << 32)); - int32x2_t V1 = vcreate_s32(static_cast(VectorIndex2) | (static_cast(VectorIndex3) << 32)); + int32x2_t V0 = vcreate_s32(static_cast(VectorIndex0) | + (static_cast(VectorIndex1) << 32)); + int32x2_t V1 = vcreate_s32(static_cast(VectorIndex2) | + (static_cast(VectorIndex3) << 32)); int32x4_t vTemp = vcombine_s32(V0, V1); // Any non-zero entries become 0xFFFFFFFF else 0 return vreinterpretq_f32_u32(vcgtq_s32(vTemp, g_XMZero)); #else - XMVECTOR ControlVector; - const uint32_t ControlElement[] = - { - XM_SELECT_0, - XM_SELECT_1 - }; + XMVECTOR ControlVector; + const uint32_t ControlElement[] = {XM_SELECT_0, XM_SELECT_1}; assert(VectorIndex0 < 2); assert(VectorIndex1 < 2); @@ -1399,21 +1239,20 @@ inline XMVECTOR XM_CALLCONV XMVectorSelectControl //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSelect -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR Control -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSelect(FXMVECTOR V1, FXMVECTOR V2, + FXMVECTOR Control) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - (V1.vector4_u32[0] & ~Control.vector4_u32[0]) | (V2.vector4_u32[0] & Control.vector4_u32[0]), - (V1.vector4_u32[1] & ~Control.vector4_u32[1]) | (V2.vector4_u32[1] & Control.vector4_u32[1]), - (V1.vector4_u32[2] & ~Control.vector4_u32[2]) | (V2.vector4_u32[2] & Control.vector4_u32[2]), - (V1.vector4_u32[3] & ~Control.vector4_u32[3]) | (V2.vector4_u32[3] & Control.vector4_u32[3]), - } } }; + XMVECTORU32 Result = {{{ + (V1.vector4_u32[0] & ~Control.vector4_u32[0]) | + (V2.vector4_u32[0] & Control.vector4_u32[0]), + (V1.vector4_u32[1] & ~Control.vector4_u32[1]) | + (V2.vector4_u32[1] & Control.vector4_u32[1]), + (V1.vector4_u32[2] & ~Control.vector4_u32[2]) | + (V2.vector4_u32[2] & Control.vector4_u32[2]), + (V1.vector4_u32[3] & ~Control.vector4_u32[3]) | + (V2.vector4_u32[3] & Control.vector4_u32[3]), + }}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1427,20 +1266,16 @@ inline XMVECTOR XM_CALLCONV XMVectorSelect //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorMergeXY -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorMergeXY(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - V1.vector4_u32[0], - V2.vector4_u32[0], - V1.vector4_u32[1], - V2.vector4_u32[1], - } } }; + XMVECTORU32 Result = {{{ + V1.vector4_u32[0], + V2.vector4_u32[0], + V1.vector4_u32[1], + V2.vector4_u32[1], + }}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1452,20 +1287,12 @@ inline XMVECTOR XM_CALLCONV XMVectorMergeXY //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorMergeZW -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorMergeZW(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - V1.vector4_u32[2], - V2.vector4_u32[2], - V1.vector4_u32[3], - V2.vector4_u32[3] - } } }; + XMVECTORU32 Result = {{{V1.vector4_u32[2], V2.vector4_u32[2], + V1.vector4_u32[3], V2.vector4_u32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1477,40 +1304,45 @@ inline XMVECTOR XM_CALLCONV XMVectorMergeZW //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2, uint32_t Elements) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorShiftLeft(FXMVECTOR V1, FXMVECTOR V2, + uint32_t Elements) noexcept { assert(Elements < 4); _Analysis_assume_(Elements < 4); - return XMVectorPermute(V1, V2, Elements, ((Elements)+1), ((Elements)+2), ((Elements)+3)); + return XMVectorPermute(V1, V2, Elements, ((Elements) + 1), ((Elements) + 2), + ((Elements) + 3)); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorRotateLeft(FXMVECTOR V, uint32_t Elements) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorRotateLeft(FXMVECTOR V, + uint32_t Elements) noexcept { assert(Elements < 4); _Analysis_assume_(Elements < 4); - return XMVectorSwizzle(V, Elements & 3, (Elements + 1) & 3, (Elements + 2) & 3, (Elements + 3) & 3); + return XMVectorSwizzle(V, Elements & 3, (Elements + 1) & 3, + (Elements + 2) & 3, (Elements + 3) & 3); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorRotateRight(FXMVECTOR V, uint32_t Elements) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorRotateRight(FXMVECTOR V, + uint32_t Elements) noexcept { assert(Elements < 4); _Analysis_assume_(Elements < 4); - return XMVectorSwizzle(V, (4 - (Elements)) & 3, (5 - (Elements)) & 3, (6 - (Elements)) & 3, (7 - (Elements)) & 3); + return XMVectorSwizzle(V, (4 - (Elements)) & 3, (5 - (Elements)) & 3, + (6 - (Elements)) & 3, (7 - (Elements)) & 3); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorInsert( - FXMVECTOR VD, FXMVECTOR VS, - uint32_t VSLeftRotateElements, - uint32_t Select0, uint32_t Select1, uint32_t Select2, uint32_t Select3) noexcept -{ - XMVECTOR Control = XMVectorSelectControl(Select0 & 1, Select1 & 1, Select2 & 1, Select3 & 1); - return XMVectorSelect(VD, XMVectorRotateLeft(VS, VSLeftRotateElements), Control); +inline XMVECTOR XM_CALLCONV XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS, + uint32_t VSLeftRotateElements, + uint32_t Select0, uint32_t Select1, + uint32_t Select2, + uint32_t Select3) noexcept { + XMVECTOR Control = XMVectorSelectControl(Select0 & 1, Select1 & 1, + Select2 & 1, Select3 & 1); + return XMVectorSelect(VD, XMVectorRotateLeft(VS, VSLeftRotateElements), + Control); } //------------------------------------------------------------------------------ @@ -1519,20 +1351,15 @@ inline XMVECTOR XM_CALLCONV XMVectorInsert( //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorEqual(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_f32[0] == V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[1] == V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[2] == V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[3] == V2.vector4_f32[3]) ? 0xFFFFFFFF : 0, - } } }; + XMVECTORU32 Control = {{{ + (V1.vector4_f32[0] == V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[1] == V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[2] == V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[3] == V2.vector4_f32[3]) ? 0xFFFFFFFF : 0, + }}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1544,14 +1371,8 @@ inline XMVECTOR XM_CALLCONV XMVectorEqual //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorEqualR -( - uint32_t* pCR, - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorEqualR(uint32_t* pCR, FXMVECTOR V1, FXMVECTOR V2) noexcept { assert(pCR != nullptr); #if defined(_XM_NO_INTRINSICS_) uint32_t ux = (V1.vector4_f32[0] == V2.vector4_f32[0]) ? 0xFFFFFFFFU : 0; @@ -1559,34 +1380,30 @@ inline XMVECTOR XM_CALLCONV XMVectorEqualR uint32_t uz = (V1.vector4_f32[2] == V2.vector4_f32[2]) ? 0xFFFFFFFFU : 0; uint32_t uw = (V1.vector4_f32[3] == V2.vector4_f32[3]) ? 0xFFFFFFFFU : 0; uint32_t CR = 0; - if (ux & uy & uz & uw) - { + if (ux & uy & uz & uw) { // All elements are greater CR = XM_CRMASK_CR6TRUE; - } - else if (!(ux | uy | uz | uw)) - { + } else if (!(ux | uy | uz | uw)) { // All elements are not greater CR = XM_CRMASK_CR6FALSE; } *pCR = CR; - XMVECTORU32 Control = { { { ux, uy, uz, uw } } }; + XMVECTORU32 Control = {{{ux, uy, uz, uw}}}; return Control; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vceqq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vreinterpret_u8_u32(vget_low_u32(vResult)), vreinterpret_u8_u32(vget_high_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vreinterpret_u8_u32(vget_low_u32(vResult)), + vreinterpret_u8_u32(vget_high_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { // All elements are equal CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { // All elements are not equal CR = XM_CRMASK_CR6FALSE; } @@ -1596,12 +1413,9 @@ inline XMVECTOR XM_CALLCONV XMVectorEqualR XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); uint32_t CR = 0; int iTest = _mm_movemask_ps(vTemp); - if (iTest == 0xf) - { + if (iTest == 0xf) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { // All elements are not greater CR = XM_CRMASK_CR6FALSE; } @@ -1616,24 +1430,21 @@ inline XMVECTOR XM_CALLCONV XMVectorEqualR // comparing control vectors and result vectors returned from // other comparison operations. -inline XMVECTOR XM_CALLCONV XMVectorEqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorEqualInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_u32[0] == V2.vector4_u32[0]) ? 0xFFFFFFFF : 0, - (V1.vector4_u32[1] == V2.vector4_u32[1]) ? 0xFFFFFFFF : 0, - (V1.vector4_u32[2] == V2.vector4_u32[2]) ? 0xFFFFFFFF : 0, - (V1.vector4_u32[3] == V2.vector4_u32[3]) ? 0xFFFFFFFF : 0, - } } }; + XMVECTORU32 Control = {{{ + (V1.vector4_u32[0] == V2.vector4_u32[0]) ? 0xFFFFFFFF : 0, + (V1.vector4_u32[1] == V2.vector4_u32[1]) ? 0xFFFFFFFF : 0, + (V1.vector4_u32[2] == V2.vector4_u32[2]) ? 0xFFFFFFFF : 0, + (V1.vector4_u32[3] == V2.vector4_u32[3]) ? 0xFFFFFFFF : 0, + }}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vceqq_s32(vreinterpretq_s32_f32(V1), vreinterpretq_s32_f32(V2))); + return vreinterpretq_f32_u32( + vceqq_s32(vreinterpretq_s32_f32(V1), vreinterpretq_s32_f32(V2))); #elif defined(_XM_SSE_INTRINSICS_) __m128i V = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); return _mm_castsi128_ps(V); @@ -1642,45 +1453,36 @@ inline XMVECTOR XM_CALLCONV XMVectorEqualInt //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorEqualIntR -( - uint32_t* pCR, - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorEqualIntR(uint32_t* pCR, FXMVECTOR V1, FXMVECTOR V2) noexcept { assert(pCR != nullptr); #if defined(_XM_NO_INTRINSICS_) XMVECTOR Control = XMVectorEqualInt(V1, V2); *pCR = 0; - if (XMVector4EqualInt(Control, XMVectorTrueInt())) - { + if (XMVector4EqualInt(Control, XMVectorTrueInt())) { // All elements are equal *pCR |= XM_CRMASK_CR6TRUE; - } - else if (XMVector4EqualInt(Control, XMVectorFalseInt())) - { + } else if (XMVector4EqualInt(Control, XMVectorFalseInt())) { // All elements are not equal *pCR |= XM_CRMASK_CR6FALSE; } return Control; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t vResult = vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint32x4_t vResult = + vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { // All elements are equal CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { // All elements are not equal CR = XM_CRMASK_CR6FALSE; } @@ -1690,12 +1492,9 @@ inline XMVECTOR XM_CALLCONV XMVectorEqualIntR __m128i V = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); int iTemp = _mm_movemask_ps(_mm_castsi128_ps(V)); uint32_t CR = 0; - if (iTemp == 0x0F) - { + if (iTemp == 0x0F) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTemp) - { + } else if (!iTemp) { CR = XM_CRMASK_CR6FALSE; } *pCR = CR; @@ -1705,13 +1504,8 @@ inline XMVECTOR XM_CALLCONV XMVectorEqualIntR //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorNearEqual -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR Epsilon -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorNearEqual(FXMVECTOR V1, FXMVECTOR V2, + FXMVECTOR Epsilon) noexcept { #if defined(_XM_NO_INTRINSICS_) float fDeltax = V1.vector4_f32[0] - V2.vector4_f32[0]; @@ -1724,17 +1518,18 @@ inline XMVECTOR XM_CALLCONV XMVectorNearEqual fDeltaz = fabsf(fDeltaz); fDeltaw = fabsf(fDeltaw); - XMVECTORU32 Control = { { { - (fDeltax <= Epsilon.vector4_f32[0]) ? 0xFFFFFFFFU : 0, - (fDeltay <= Epsilon.vector4_f32[1]) ? 0xFFFFFFFFU : 0, - (fDeltaz <= Epsilon.vector4_f32[2]) ? 0xFFFFFFFFU : 0, - (fDeltaw <= Epsilon.vector4_f32[3]) ? 0xFFFFFFFFU : 0, - } } }; + XMVECTORU32 Control = {{{ + (fDeltax <= Epsilon.vector4_f32[0]) ? 0xFFFFFFFFU : 0, + (fDeltay <= Epsilon.vector4_f32[1]) ? 0xFFFFFFFFU : 0, + (fDeltaz <= Epsilon.vector4_f32[2]) ? 0xFFFFFFFFU : 0, + (fDeltaw <= Epsilon.vector4_f32[3]) ? 0xFFFFFFFFU : 0, + }}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t vDelta = vsubq_f32(V1, V2); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) return vacleq_f32(vDelta, Epsilon); #else return vreinterpretq_f32_u32(vcleq_f32(vabsq_f32(vDelta), Epsilon)); @@ -1753,20 +1548,16 @@ inline XMVECTOR XM_CALLCONV XMVectorNearEqual //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorNotEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorNotEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_f32[0] != V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[1] != V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[2] != V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[3] != V2.vector4_f32[3]) ? 0xFFFFFFFF : 0, - } } }; + XMVECTORU32 Control = {{{ + (V1.vector4_f32[0] != V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[1] != V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[2] != V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[3] != V2.vector4_f32[3]) ? 0xFFFFFFFF : 0, + }}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1778,20 +1569,15 @@ inline XMVECTOR XM_CALLCONV XMVectorNotEqual //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorNotEqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorNotEqualInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_u32[0] != V2.vector4_u32[0]) ? 0xFFFFFFFFU : 0, - (V1.vector4_u32[1] != V2.vector4_u32[1]) ? 0xFFFFFFFFU : 0, - (V1.vector4_u32[2] != V2.vector4_u32[2]) ? 0xFFFFFFFFU : 0, - (V1.vector4_u32[3] != V2.vector4_u32[3]) ? 0xFFFFFFFFU : 0 - } } }; + XMVECTORU32 Control = { + {{(V1.vector4_u32[0] != V2.vector4_u32[0]) ? 0xFFFFFFFFU : 0, + (V1.vector4_u32[1] != V2.vector4_u32[1]) ? 0xFFFFFFFFU : 0, + (V1.vector4_u32[2] != V2.vector4_u32[2]) ? 0xFFFFFFFFU : 0, + (V1.vector4_u32[3] != V2.vector4_u32[3]) ? 0xFFFFFFFFU : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1805,20 +1591,15 @@ inline XMVECTOR XM_CALLCONV XMVectorNotEqualInt //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorGreater -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorGreater(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_f32[0] > V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[1] > V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[2] > V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[3] > V2.vector4_f32[3]) ? 0xFFFFFFFF : 0 - } } }; + XMVECTORU32 Control = { + {{(V1.vector4_f32[0] > V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[1] > V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[2] > V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[3] > V2.vector4_f32[3]) ? 0xFFFFFFFF : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1830,14 +1611,8 @@ inline XMVECTOR XM_CALLCONV XMVectorGreater //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorGreaterR -( - uint32_t* pCR, - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorGreaterR(uint32_t* pCR, FXMVECTOR V1, FXMVECTOR V2) noexcept { assert(pCR != nullptr); #if defined(_XM_NO_INTRINSICS_) @@ -1846,34 +1621,30 @@ inline XMVECTOR XM_CALLCONV XMVectorGreaterR uint32_t uz = (V1.vector4_f32[2] > V2.vector4_f32[2]) ? 0xFFFFFFFFU : 0; uint32_t uw = (V1.vector4_f32[3] > V2.vector4_f32[3]) ? 0xFFFFFFFFU : 0; uint32_t CR = 0; - if (ux & uy & uz & uw) - { + if (ux & uy & uz & uw) { // All elements are greater CR = XM_CRMASK_CR6TRUE; - } - else if (!(ux | uy | uz | uw)) - { + } else if (!(ux | uy | uz | uw)) { // All elements are not greater CR = XM_CRMASK_CR6FALSE; } *pCR = CR; - XMVECTORU32 Control = { { { ux, uy, uz, uw } } }; + XMVECTORU32 Control = {{{ux, uy, uz, uw}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgtq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { // All elements are greater CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { // All elements are not greater CR = XM_CRMASK_CR6FALSE; } @@ -1883,12 +1654,9 @@ inline XMVECTOR XM_CALLCONV XMVectorGreaterR XMVECTOR vTemp = _mm_cmpgt_ps(V1, V2); uint32_t CR = 0; int iTest = _mm_movemask_ps(vTemp); - if (iTest == 0xf) - { + if (iTest == 0xf) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { // All elements are not greater CR = XM_CRMASK_CR6FALSE; } @@ -1899,20 +1667,15 @@ inline XMVECTOR XM_CALLCONV XMVectorGreaterR //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorGreaterOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorGreaterOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_f32[0] >= V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[1] >= V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[2] >= V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[3] >= V2.vector4_f32[3]) ? 0xFFFFFFFF : 0 - } } }; + XMVECTORU32 Control = { + {{(V1.vector4_f32[0] >= V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[1] >= V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[2] >= V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[3] >= V2.vector4_f32[3]) ? 0xFFFFFFFF : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -1924,14 +1687,8 @@ inline XMVECTOR XM_CALLCONV XMVectorGreaterOrEqual //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorGreaterOrEqualR -( - uint32_t* pCR, - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorGreaterOrEqualR(uint32_t* pCR, FXMVECTOR V1, FXMVECTOR V2) noexcept { assert(pCR != nullptr); #if defined(_XM_NO_INTRINSICS_) @@ -1940,34 +1697,30 @@ inline XMVECTOR XM_CALLCONV XMVectorGreaterOrEqualR uint32_t uz = (V1.vector4_f32[2] >= V2.vector4_f32[2]) ? 0xFFFFFFFFU : 0; uint32_t uw = (V1.vector4_f32[3] >= V2.vector4_f32[3]) ? 0xFFFFFFFFU : 0; uint32_t CR = 0; - if (ux & uy & uz & uw) - { + if (ux & uy & uz & uw) { // All elements are greater CR = XM_CRMASK_CR6TRUE; - } - else if (!(ux | uy | uz | uw)) - { + } else if (!(ux | uy | uz | uw)) { // All elements are not greater CR = XM_CRMASK_CR6FALSE; } *pCR = CR; - XMVECTORU32 Control = { { { ux, uy, uz, uw } } }; + XMVECTORU32 Control = {{{ux, uy, uz, uw}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgeq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { // All elements are greater or equal CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { // All elements are not greater or equal CR = XM_CRMASK_CR6FALSE; } @@ -1977,12 +1730,9 @@ inline XMVECTOR XM_CALLCONV XMVectorGreaterOrEqualR XMVECTOR vTemp = _mm_cmpge_ps(V1, V2); uint32_t CR = 0; int iTest = _mm_movemask_ps(vTemp); - if (iTest == 0xf) - { + if (iTest == 0xf) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { // All elements are not greater CR = XM_CRMASK_CR6FALSE; } @@ -1993,20 +1743,14 @@ inline XMVECTOR XM_CALLCONV XMVectorGreaterOrEqualR //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLess -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLess(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_f32[0] < V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[1] < V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[2] < V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[3] < V2.vector4_f32[3]) ? 0xFFFFFFFF : 0 - } } }; + XMVECTORU32 Control = { + {{(V1.vector4_f32[0] < V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[1] < V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[2] < V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[3] < V2.vector4_f32[3]) ? 0xFFFFFFFF : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2018,20 +1762,15 @@ inline XMVECTOR XM_CALLCONV XMVectorLess //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLessOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLessOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V1.vector4_f32[0] <= V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[1] <= V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[2] <= V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, - (V1.vector4_f32[3] <= V2.vector4_f32[3]) ? 0xFFFFFFFF : 0 - } } }; + XMVECTORU32 Control = { + {{(V1.vector4_f32[0] <= V2.vector4_f32[0]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[1] <= V2.vector4_f32[1]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[2] <= V2.vector4_f32[2]) ? 0xFFFFFFFF : 0, + (V1.vector4_f32[3] <= V2.vector4_f32[3]) ? 0xFFFFFFFF : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2043,20 +1782,26 @@ inline XMVECTOR XM_CALLCONV XMVectorLessOrEqual //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorInBounds -( - FXMVECTOR V, - FXMVECTOR Bounds -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorInBounds(FXMVECTOR V, + FXMVECTOR Bounds) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - (V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) ? 0xFFFFFFFF : 0, - (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) ? 0xFFFFFFFF : 0, - (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2]) ? 0xFFFFFFFF : 0, - (V.vector4_f32[3] <= Bounds.vector4_f32[3] && V.vector4_f32[3] >= -Bounds.vector4_f32[3]) ? 0xFFFFFFFF : 0 - } } }; + XMVECTORU32 Control = {{{(V.vector4_f32[0] <= Bounds.vector4_f32[0] && + V.vector4_f32[0] >= -Bounds.vector4_f32[0]) + ? 0xFFFFFFFF + : 0, + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && + V.vector4_f32[1] >= -Bounds.vector4_f32[1]) + ? 0xFFFFFFFF + : 0, + (V.vector4_f32[2] <= Bounds.vector4_f32[2] && + V.vector4_f32[2] >= -Bounds.vector4_f32[2]) + ? 0xFFFFFFFF + : 0, + (V.vector4_f32[3] <= Bounds.vector4_f32[3] && + V.vector4_f32[3] >= -Bounds.vector4_f32[3]) + ? 0xFFFFFFFF + : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2084,31 +1829,36 @@ inline XMVECTOR XM_CALLCONV XMVectorInBounds //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMVectorInBoundsR -( - uint32_t* pCR, - FXMVECTOR V, - FXMVECTOR Bounds -) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMVectorInBoundsR(uint32_t* pCR, FXMVECTOR V, FXMVECTOR Bounds) noexcept { assert(pCR != nullptr); #if defined(_XM_NO_INTRINSICS_) - uint32_t ux = (V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) ? 0xFFFFFFFFU : 0; - uint32_t uy = (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) ? 0xFFFFFFFFU : 0; - uint32_t uz = (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2]) ? 0xFFFFFFFFU : 0; - uint32_t uw = (V.vector4_f32[3] <= Bounds.vector4_f32[3] && V.vector4_f32[3] >= -Bounds.vector4_f32[3]) ? 0xFFFFFFFFU : 0; + uint32_t ux = (V.vector4_f32[0] <= Bounds.vector4_f32[0] && + V.vector4_f32[0] >= -Bounds.vector4_f32[0]) + ? 0xFFFFFFFFU + : 0; + uint32_t uy = (V.vector4_f32[1] <= Bounds.vector4_f32[1] && + V.vector4_f32[1] >= -Bounds.vector4_f32[1]) + ? 0xFFFFFFFFU + : 0; + uint32_t uz = (V.vector4_f32[2] <= Bounds.vector4_f32[2] && + V.vector4_f32[2] >= -Bounds.vector4_f32[2]) + ? 0xFFFFFFFFU + : 0; + uint32_t uw = (V.vector4_f32[3] <= Bounds.vector4_f32[3] && + V.vector4_f32[3] >= -Bounds.vector4_f32[3]) + ? 0xFFFFFFFFU + : 0; uint32_t CR = 0; - if (ux & uy & uz & uw) - { + if (ux & uy & uz & uw) { // All elements are in bounds CR = XM_CRMASK_CR6BOUNDS; } *pCR = CR; - XMVECTORU32 Control = { { { ux, uy, uz, uw } } }; + XMVECTORU32 Control = {{{ux, uy, uz, uw}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2120,12 +1870,13 @@ inline XMVECTOR XM_CALLCONV XMVectorInBoundsR vTemp2 = vcleq_f32(vreinterpretq_f32_u32(vTemp2), V); // Blend answers vTemp1 = vandq_u32(vTemp1, vTemp2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTemp1)), vget_high_u8(vreinterpretq_u8_u32(vTemp1))); - uint16x4x2_t vTemp3 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTemp1)), + vget_high_u8(vreinterpretq_u8_u32(vTemp1))); + uint16x4x2_t vTemp3 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp3.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { // All elements are in bounds CR = XM_CRMASK_CR6BOUNDS; } @@ -2142,8 +1893,7 @@ inline XMVECTOR XM_CALLCONV XMVectorInBoundsR vTemp1 = _mm_and_ps(vTemp1, vTemp2); uint32_t CR = 0; - if (_mm_movemask_ps(vTemp1) == 0xf) - { + if (_mm_movemask_ps(vTemp1) == 0xf) { // All elements are in bounds CR = XM_CRMASK_CR6BOUNDS; } @@ -2154,33 +1904,30 @@ inline XMVECTOR XM_CALLCONV XMVectorInBoundsR //------------------------------------------------------------------------------ -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(push) #pragma float_control(precise, on) #endif -inline XMVECTOR XM_CALLCONV XMVectorIsNaN(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorIsNaN(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - XMISNAN(V.vector4_f32[0]) ? 0xFFFFFFFFU : 0, - XMISNAN(V.vector4_f32[1]) ? 0xFFFFFFFFU : 0, - XMISNAN(V.vector4_f32[2]) ? 0xFFFFFFFFU : 0, - XMISNAN(V.vector4_f32[3]) ? 0xFFFFFFFFU : 0 - } } }; + XMVECTORU32 Control = {{{XMISNAN(V.vector4_f32[0]) ? 0xFFFFFFFFU : 0, + XMISNAN(V.vector4_f32[1]) ? 0xFFFFFFFFU : 0, + XMISNAN(V.vector4_f32[2]) ? 0xFFFFFFFFU : 0, + XMISNAN(V.vector4_f32[3]) ? 0xFFFFFFFFU : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) - XMVECTORU32 vResult = { { { - isnan(vgetq_lane_f32(V, 0)) ? 0xFFFFFFFFU : 0, - isnan(vgetq_lane_f32(V, 1)) ? 0xFFFFFFFFU : 0, - isnan(vgetq_lane_f32(V, 2)) ? 0xFFFFFFFFU : 0, - isnan(vgetq_lane_f32(V, 3)) ? 0xFFFFFFFFU : 0 } } }; + XMVECTORU32 vResult = {{{isnan(vgetq_lane_f32(V, 0)) ? 0xFFFFFFFFU : 0, + isnan(vgetq_lane_f32(V, 1)) ? 0xFFFFFFFFU : 0, + isnan(vgetq_lane_f32(V, 2)) ? 0xFFFFFFFFU : 0, + isnan(vgetq_lane_f32(V, 3)) ? 0xFFFFFFFFU : 0}}}; return vResult.v; #else -// Test against itself. NaN is always not equal + // Test against itself. NaN is always not equal uint32x4_t vTempNan = vceqq_f32(V, V); // Flip results return vreinterpretq_f32_u32(vmvnq_u32(vTempNan)); @@ -2189,35 +1936,31 @@ inline XMVECTOR XM_CALLCONV XMVectorIsNaN(FXMVECTOR V) noexcept #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) XM_ALIGNED_DATA(16) float tmp[4]; _mm_store_ps(tmp, V); - XMVECTORU32 vResult = { { { - isnan(tmp[0]) ? 0xFFFFFFFFU : 0, - isnan(tmp[1]) ? 0xFFFFFFFFU : 0, - isnan(tmp[2]) ? 0xFFFFFFFFU : 0, - isnan(tmp[3]) ? 0xFFFFFFFFU : 0 } } }; + XMVECTORU32 vResult = { + {{isnan(tmp[0]) ? 0xFFFFFFFFU : 0, isnan(tmp[1]) ? 0xFFFFFFFFU : 0, + isnan(tmp[2]) ? 0xFFFFFFFFU : 0, isnan(tmp[3]) ? 0xFFFFFFFFU : 0}}}; return vResult.v; #else -// Test against itself. NaN is always not equal + // Test against itself. NaN is always not equal return _mm_cmpneq_ps(V, V); #endif #endif } -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(pop) #endif //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorIsInfinite(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorIsInfinite(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Control = { { { - XMISINF(V.vector4_f32[0]) ? 0xFFFFFFFFU : 0, - XMISINF(V.vector4_f32[1]) ? 0xFFFFFFFFU : 0, - XMISINF(V.vector4_f32[2]) ? 0xFFFFFFFFU : 0, - XMISINF(V.vector4_f32[3]) ? 0xFFFFFFFFU : 0 - } } }; + XMVECTORU32 Control = {{{XMISINF(V.vector4_f32[0]) ? 0xFFFFFFFFU : 0, + XMISINF(V.vector4_f32[1]) ? 0xFFFFFFFFU : 0, + XMISINF(V.vector4_f32[2]) ? 0xFFFFFFFFU : 0, + XMISINF(V.vector4_f32[3]) ? 0xFFFFFFFFU : 0}}}; return Control.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2243,20 +1986,18 @@ inline XMVECTOR XM_CALLCONV XMVectorIsInfinite(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorMin -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorMin(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - (V1.vector4_f32[0] < V2.vector4_f32[0]) ? V1.vector4_f32[0] : V2.vector4_f32[0], - (V1.vector4_f32[1] < V2.vector4_f32[1]) ? V1.vector4_f32[1] : V2.vector4_f32[1], - (V1.vector4_f32[2] < V2.vector4_f32[2]) ? V1.vector4_f32[2] : V2.vector4_f32[2], - (V1.vector4_f32[3] < V2.vector4_f32[3]) ? V1.vector4_f32[3] : V2.vector4_f32[3] - } } }; + XMVECTORF32 Result = { + {{(V1.vector4_f32[0] < V2.vector4_f32[0]) ? V1.vector4_f32[0] + : V2.vector4_f32[0], + (V1.vector4_f32[1] < V2.vector4_f32[1]) ? V1.vector4_f32[1] + : V2.vector4_f32[1], + (V1.vector4_f32[2] < V2.vector4_f32[2]) ? V1.vector4_f32[2] + : V2.vector4_f32[2], + (V1.vector4_f32[3] < V2.vector4_f32[3]) ? V1.vector4_f32[3] + : V2.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2268,20 +2009,18 @@ inline XMVECTOR XM_CALLCONV XMVectorMin //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorMax -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorMax(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - (V1.vector4_f32[0] > V2.vector4_f32[0]) ? V1.vector4_f32[0] : V2.vector4_f32[0], - (V1.vector4_f32[1] > V2.vector4_f32[1]) ? V1.vector4_f32[1] : V2.vector4_f32[1], - (V1.vector4_f32[2] > V2.vector4_f32[2]) ? V1.vector4_f32[2] : V2.vector4_f32[2], - (V1.vector4_f32[3] > V2.vector4_f32[3]) ? V1.vector4_f32[3] : V2.vector4_f32[3] - } } }; + XMVECTORF32 Result = { + {{(V1.vector4_f32[0] > V2.vector4_f32[0]) ? V1.vector4_f32[0] + : V2.vector4_f32[0], + (V1.vector4_f32[1] > V2.vector4_f32[1]) ? V1.vector4_f32[1] + : V2.vector4_f32[1], + (V1.vector4_f32[2] > V2.vector4_f32[2]) ? V1.vector4_f32[2] + : V2.vector4_f32[2], + (V1.vector4_f32[3] > V2.vector4_f32[3]) ? V1.vector4_f32[3] + : V2.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2293,48 +2032,42 @@ inline XMVECTOR XM_CALLCONV XMVectorMax //------------------------------------------------------------------------------ -namespace MathInternal -{ - // Round to nearest (even) a.k.a. banker's rounding - inline float round_to_nearest(float x) noexcept - { - float i = floorf(x); - x -= i; - if (x < 0.5f) - return i; - if (x > 0.5f) - return i + 1.f; +namespace MathInternal { +// Round to nearest (even) a.k.a. banker's rounding +inline float round_to_nearest(float x) noexcept { + float i = floorf(x); + x -= i; + if (x < 0.5f) return i; + if (x > 0.5f) return i + 1.f; - float int_part; - (void)modff(i / 2.f, &int_part); - if ((2.f * int_part) == i) - { - return i; - } - - return i + 1.f; + float int_part; + (void)modff(i / 2.f, &int_part); + if ((2.f * int_part) == i) { + return i; } -} -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) + return i + 1.f; +} +} // namespace MathInternal + +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(push) #pragma float_control(precise, on) #endif -inline XMVECTOR XM_CALLCONV XMVectorRound(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorRound(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - MathInternal::round_to_nearest(V.vector4_f32[0]), - MathInternal::round_to_nearest(V.vector4_f32[1]), - MathInternal::round_to_nearest(V.vector4_f32[2]), - MathInternal::round_to_nearest(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{MathInternal::round_to_nearest(V.vector4_f32[0]), + MathInternal::round_to_nearest(V.vector4_f32[1]), + MathInternal::round_to_nearest(V.vector4_f32[2]), + MathInternal::round_to_nearest(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ return vrndnq_f32(V); #else uint32x4_t sign = vandq_u32(vreinterpretq_u32_f32(V), g_XMNegativeZero); @@ -2361,40 +2094,36 @@ inline XMVECTOR XM_CALLCONV XMVectorRound(FXMVECTOR V) noexcept #endif } -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(pop) #endif //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorTruncate(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorTruncate(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; - uint32_t i; + uint32_t i; // Avoid C4701 Result.vector4_f32[0] = 0.0f; - for (i = 0; i < 4; i++) - { - if (XMISNAN(V.vector4_f32[i])) - { + for (i = 0; i < 4; i++) { + if (XMISNAN(V.vector4_f32[i])) { Result.vector4_u32[i] = 0x7FC00000; - } - else if (fabsf(V.vector4_f32[i]) < 8388608.0f) - { - Result.vector4_f32[i] = static_cast(static_cast(V.vector4_f32[i])); - } - else - { + } else if (fabsf(V.vector4_f32[i]) < 8388608.0f) { + Result.vector4_f32[i] = + static_cast(static_cast(V.vector4_f32[i])); + } else { Result.vector4_f32[i] = V.vector4_f32[i]; } } return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ return vrndq_f32(V); #else float32x4_t vTest = vabsq_f32(V); @@ -2413,7 +2142,8 @@ inline XMVECTOR XM_CALLCONV XMVectorTruncate(FXMVECTOR V) noexcept // To handle NAN, INF and numbers greater than 8388608, use masking // Get the abs value __m128i vTest = _mm_and_si128(_mm_castps_si128(V), g_XMAbsMask); - // Test for greater than 8388608 (All floats with NO fractionals, NAN and INF + // Test for greater than 8388608 (All floats with NO fractionals, NAN and + // INF vTest = _mm_cmplt_epi32(vTest, g_XMNoFraction); // Convert to int and back to float for rounding with truncation __m128i vInt = _mm_cvttps_epi32(V); @@ -2430,18 +2160,15 @@ inline XMVECTOR XM_CALLCONV XMVectorTruncate(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorFloor(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorFloor(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - floorf(V.vector4_f32[0]), - floorf(V.vector4_f32[1]), - floorf(V.vector4_f32[2]), - floorf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = { + {{floorf(V.vector4_f32[0]), floorf(V.vector4_f32[1]), + floorf(V.vector4_f32[2]), floorf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ return vrndmq_f32(V); #else float32x4_t vTest = vabsq_f32(V); @@ -2481,18 +2208,14 @@ inline XMVECTOR XM_CALLCONV XMVectorFloor(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorCeiling(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorCeiling(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - ceilf(V.vector4_f32[0]), - ceilf(V.vector4_f32[1]), - ceilf(V.vector4_f32[2]), - ceilf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{ceilf(V.vector4_f32[0]), ceilf(V.vector4_f32[1]), + ceilf(V.vector4_f32[2]), ceilf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ return vrndpq_f32(V); #else float32x4_t vTest = vabsq_f32(V); @@ -2532,13 +2255,8 @@ inline XMVECTOR XM_CALLCONV XMVectorCeiling(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorClamp -( - FXMVECTOR V, - FXMVECTOR Min, - FXMVECTOR Max -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorClamp(FXMVECTOR V, FXMVECTOR Min, + FXMVECTOR Max) noexcept { assert(XMVector4LessOrEqual(Min, Max)); #if defined(_XM_NO_INTRINSICS_) @@ -2562,8 +2280,7 @@ inline XMVECTOR XM_CALLCONV XMVectorClamp //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSaturate(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSaturate(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) const XMVECTOR Zero = XMVectorZero(); @@ -2587,24 +2304,19 @@ inline XMVECTOR XM_CALLCONV XMVectorSaturate(FXMVECTOR V) noexcept // Bitwise logical operations //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorAndInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorAndInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - V1.vector4_u32[0] & V2.vector4_u32[0], - V1.vector4_u32[1] & V2.vector4_u32[1], - V1.vector4_u32[2] & V2.vector4_u32[2], - V1.vector4_u32[3] & V2.vector4_u32[3] - } } }; + XMVECTORU32 Result = {{{V1.vector4_u32[0] & V2.vector4_u32[0], + V1.vector4_u32[1] & V2.vector4_u32[1], + V1.vector4_u32[2] & V2.vector4_u32[2], + V1.vector4_u32[3] & V2.vector4_u32[3]}}}; return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); + return vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); #elif defined(_XM_SSE_INTRINSICS_) return _mm_and_ps(V1, V2); #endif @@ -2612,24 +2324,19 @@ inline XMVECTOR XM_CALLCONV XMVectorAndInt //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorAndCInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorAndCInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - V1.vector4_u32[0] & ~V2.vector4_u32[0], - V1.vector4_u32[1] & ~V2.vector4_u32[1], - V1.vector4_u32[2] & ~V2.vector4_u32[2], - V1.vector4_u32[3] & ~V2.vector4_u32[3] - } } }; + XMVECTORU32 Result = {{{V1.vector4_u32[0] & ~V2.vector4_u32[0], + V1.vector4_u32[1] & ~V2.vector4_u32[1], + V1.vector4_u32[2] & ~V2.vector4_u32[2], + V1.vector4_u32[3] & ~V2.vector4_u32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); + return vreinterpretq_f32_u32( + vbicq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); #elif defined(_XM_SSE_INTRINSICS_) __m128i V = _mm_andnot_si128(_mm_castps_si128(V2), _mm_castps_si128(V1)); return _mm_castsi128_ps(V); @@ -2638,24 +2345,18 @@ inline XMVECTOR XM_CALLCONV XMVectorAndCInt //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorOrInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorOrInt(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - V1.vector4_u32[0] | V2.vector4_u32[0], - V1.vector4_u32[1] | V2.vector4_u32[1], - V1.vector4_u32[2] | V2.vector4_u32[2], - V1.vector4_u32[3] | V2.vector4_u32[3] - } } }; + XMVECTORU32 Result = {{{V1.vector4_u32[0] | V2.vector4_u32[0], + V1.vector4_u32[1] | V2.vector4_u32[1], + V1.vector4_u32[2] | V2.vector4_u32[2], + V1.vector4_u32[3] | V2.vector4_u32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(vorrq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); + return vreinterpretq_f32_u32( + vorrq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); #elif defined(_XM_SSE_INTRINSICS_) __m128i V = _mm_or_si128(_mm_castps_si128(V1), _mm_castps_si128(V2)); return _mm_castsi128_ps(V); @@ -2664,24 +2365,19 @@ inline XMVECTOR XM_CALLCONV XMVectorOrInt //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorNorInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorNorInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - ~(V1.vector4_u32[0] | V2.vector4_u32[0]), - ~(V1.vector4_u32[1] | V2.vector4_u32[1]), - ~(V1.vector4_u32[2] | V2.vector4_u32[2]), - ~(V1.vector4_u32[3] | V2.vector4_u32[3]) - } } }; + XMVECTORU32 Result = {{{~(V1.vector4_u32[0] | V2.vector4_u32[0]), + ~(V1.vector4_u32[1] | V2.vector4_u32[1]), + ~(V1.vector4_u32[2] | V2.vector4_u32[2]), + ~(V1.vector4_u32[3] | V2.vector4_u32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t Result = vorrq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint32x4_t Result = + vorrq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); return vreinterpretq_f32_u32(vbicq_u32(g_XMNegOneMask, Result)); #elif defined(_XM_SSE_INTRINSICS_) __m128i Result; @@ -2693,24 +2389,19 @@ inline XMVECTOR XM_CALLCONV XMVectorNorInt //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorXorInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorXorInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORU32 Result = { { { - V1.vector4_u32[0] ^ V2.vector4_u32[0], - V1.vector4_u32[1] ^ V2.vector4_u32[1], - V1.vector4_u32[2] ^ V2.vector4_u32[2], - V1.vector4_u32[3] ^ V2.vector4_u32[3] - } } }; + XMVECTORU32 Result = {{{V1.vector4_u32[0] ^ V2.vector4_u32[0], + V1.vector4_u32[1] ^ V2.vector4_u32[1], + V1.vector4_u32[2] ^ V2.vector4_u32[2], + V1.vector4_u32[3] ^ V2.vector4_u32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - return vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); + return vreinterpretq_f32_u32( + veorq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2))); #elif defined(_XM_SSE_INTRINSICS_) __m128i V = _mm_xor_si128(_mm_castps_si128(V1), _mm_castps_si128(V2)); return _mm_castsi128_ps(V); @@ -2723,16 +2414,11 @@ inline XMVECTOR XM_CALLCONV XMVectorXorInt //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorNegate(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorNegate(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - -V.vector4_f32[0], - -V.vector4_f32[1], - -V.vector4_f32[2], - -V.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{-V.vector4_f32[0], -V.vector4_f32[1], + -V.vector4_f32[2], -V.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2748,20 +2434,13 @@ inline XMVECTOR XM_CALLCONV XMVectorNegate(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorAdd -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorAdd(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V1.vector4_f32[0] + V2.vector4_f32[0], - V1.vector4_f32[1] + V2.vector4_f32[1], - V1.vector4_f32[2] + V2.vector4_f32[2], - V1.vector4_f32[3] + V2.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{V1.vector4_f32[0] + V2.vector4_f32[0], + V1.vector4_f32[1] + V2.vector4_f32[1], + V1.vector4_f32[2] + V2.vector4_f32[2], + V1.vector4_f32[3] + V2.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2773,19 +2452,18 @@ inline XMVECTOR XM_CALLCONV XMVectorAdd //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSum(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSum(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 Result; - Result.f[0] = - Result.f[1] = - Result.f[2] = - Result.f[3] = V.vector4_f32[0] + V.vector4_f32[1] + V.vector4_f32[2] + V.vector4_f32[3]; + Result.f[0] = Result.f[1] = Result.f[2] = Result.f[3] = + V.vector4_f32[0] + V.vector4_f32[1] + V.vector4_f32[2] + + V.vector4_f32[3]; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ float32x4_t vTemp = vpaddq_f32(V, V); return vpaddq_f32(vTemp, vTemp); #else @@ -2808,12 +2486,8 @@ inline XMVECTOR XM_CALLCONV XMVectorSum(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorAddAngles -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorAddAngles(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) const XMVECTOR Zero = XMVectorZero(); @@ -2867,20 +2541,14 @@ inline XMVECTOR XM_CALLCONV XMVectorAddAngles //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSubtract -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSubtract(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V1.vector4_f32[0] - V2.vector4_f32[0], - V1.vector4_f32[1] - V2.vector4_f32[1], - V1.vector4_f32[2] - V2.vector4_f32[2], - V1.vector4_f32[3] - V2.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{V1.vector4_f32[0] - V2.vector4_f32[0], + V1.vector4_f32[1] - V2.vector4_f32[1], + V1.vector4_f32[2] - V2.vector4_f32[2], + V1.vector4_f32[3] - V2.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -2892,12 +2560,8 @@ inline XMVECTOR XM_CALLCONV XMVectorSubtract //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSubtractAngles -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSubtractAngles(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) const XMVECTOR Zero = XMVectorZero(); @@ -2951,19 +2615,13 @@ inline XMVECTOR XM_CALLCONV XMVectorSubtractAngles //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorMultiply -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorMultiply(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V1.vector4_f32[0] * V2.vector4_f32[0], - V1.vector4_f32[1] * V2.vector4_f32[1], - V1.vector4_f32[2] * V2.vector4_f32[2], - V1.vector4_f32[3] * V2.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{V1.vector4_f32[0] * V2.vector4_f32[0], + V1.vector4_f32[1] * V2.vector4_f32[1], + V1.vector4_f32[2] * V2.vector4_f32[2], + V1.vector4_f32[3] * V2.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vmulq_f32(V1, V2); @@ -2974,23 +2632,18 @@ inline XMVECTOR XM_CALLCONV XMVectorMultiply //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorMultiplyAdd -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR V3 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorMultiplyAdd(FXMVECTOR V1, FXMVECTOR V2, + FXMVECTOR V3) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V1.vector4_f32[0] * V2.vector4_f32[0] + V3.vector4_f32[0], - V1.vector4_f32[1] * V2.vector4_f32[1] + V3.vector4_f32[1], - V1.vector4_f32[2] * V2.vector4_f32[2] + V3.vector4_f32[2], - V1.vector4_f32[3] * V2.vector4_f32[3] + V3.vector4_f32[3] - } } }; + XMVECTORF32 Result = { + {{V1.vector4_f32[0] * V2.vector4_f32[0] + V3.vector4_f32[0], + V1.vector4_f32[1] * V2.vector4_f32[1] + V3.vector4_f32[1], + V1.vector4_f32[2] * V2.vector4_f32[2] + V3.vector4_f32[2], + V1.vector4_f32[3] * V2.vector4_f32[3] + V3.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ return vfmaq_f32(V3, V1, V2); #else return vmlaq_f32(V3, V1, V2); @@ -3002,22 +2655,17 @@ inline XMVECTOR XM_CALLCONV XMVectorMultiplyAdd //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorDivide -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorDivide(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V1.vector4_f32[0] / V2.vector4_f32[0], - V1.vector4_f32[1] / V2.vector4_f32[1], - V1.vector4_f32[2] / V2.vector4_f32[2], - V1.vector4_f32[3] / V2.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{V1.vector4_f32[0] / V2.vector4_f32[0], + V1.vector4_f32[1] / V2.vector4_f32[1], + V1.vector4_f32[2] / V2.vector4_f32[2], + V1.vector4_f32[3] / V2.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ return vdivq_f32(V1, V2); #else // 2 iterations of Newton-Raphson refinement of reciprocal @@ -3035,23 +2683,18 @@ inline XMVECTOR XM_CALLCONV XMVectorDivide //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorNegativeMultiplySubtract -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR V3 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorNegativeMultiplySubtract( + FXMVECTOR V1, FXMVECTOR V2, FXMVECTOR V3) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V3.vector4_f32[0] - (V1.vector4_f32[0] * V2.vector4_f32[0]), - V3.vector4_f32[1] - (V1.vector4_f32[1] * V2.vector4_f32[1]), - V3.vector4_f32[2] - (V1.vector4_f32[2] * V2.vector4_f32[2]), - V3.vector4_f32[3] - (V1.vector4_f32[3] * V2.vector4_f32[3]) - } } }; + XMVECTORF32 Result = { + {{V3.vector4_f32[0] - (V1.vector4_f32[0] * V2.vector4_f32[0]), + V3.vector4_f32[1] - (V1.vector4_f32[1] * V2.vector4_f32[1]), + V3.vector4_f32[2] - (V1.vector4_f32[2] * V2.vector4_f32[2]), + V3.vector4_f32[3] - (V1.vector4_f32[3] * V2.vector4_f32[3])}}}; return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ return vfmsq_f32(V3, V1, V2); #else return vmlsq_f32(V3, V1, V2); @@ -3063,19 +2706,12 @@ inline XMVECTOR XM_CALLCONV XMVectorNegativeMultiplySubtract //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorScale -( - FXMVECTOR V, - float ScaleFactor -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorScale(FXMVECTOR V, + float ScaleFactor) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V.vector4_f32[0] * ScaleFactor, - V.vector4_f32[1] * ScaleFactor, - V.vector4_f32[2] * ScaleFactor, - V.vector4_f32[3] * ScaleFactor - } } }; + XMVECTORF32 Result = { + {{V.vector4_f32[0] * ScaleFactor, V.vector4_f32[1] * ScaleFactor, + V.vector4_f32[2] * ScaleFactor, V.vector4_f32[3] * ScaleFactor}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vmulq_n_f32(V, ScaleFactor); @@ -3087,15 +2723,10 @@ inline XMVECTOR XM_CALLCONV XMVectorScale //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorReciprocalEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorReciprocalEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - 1.f / V.vector4_f32[0], - 1.f / V.vector4_f32[1], - 1.f / V.vector4_f32[2], - 1.f / V.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{1.f / V.vector4_f32[0], 1.f / V.vector4_f32[1], + 1.f / V.vector4_f32[2], 1.f / V.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vrecpeq_f32(V); @@ -3106,18 +2737,14 @@ inline XMVECTOR XM_CALLCONV XMVectorReciprocalEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorReciprocal(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorReciprocal(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - 1.f / V.vector4_f32[0], - 1.f / V.vector4_f32[1], - 1.f / V.vector4_f32[2], - 1.f / V.vector4_f32[3] - } } }; + XMVECTORF32 Result = {{{1.f / V.vector4_f32[0], 1.f / V.vector4_f32[1], + 1.f / V.vector4_f32[2], 1.f / V.vector4_f32[3]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) -#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ float32x4_t one = vdupq_n_f32(1.0f); return vdivq_f32(one, V); #else @@ -3135,15 +2762,10 @@ inline XMVECTOR XM_CALLCONV XMVectorReciprocal(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ // Return an estimated square root -inline XMVECTOR XM_CALLCONV XMVectorSqrtEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSqrtEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - sqrtf(V.vector4_f32[0]), - sqrtf(V.vector4_f32[1]), - sqrtf(V.vector4_f32[2]), - sqrtf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{sqrtf(V.vector4_f32[0]), sqrtf(V.vector4_f32[1]), + sqrtf(V.vector4_f32[2]), sqrtf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) // 1 iteration of Newton-Raphson refinment of sqrt @@ -3164,15 +2786,10 @@ inline XMVECTOR XM_CALLCONV XMVectorSqrtEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSqrt(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSqrt(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - sqrtf(V.vector4_f32[0]), - sqrtf(V.vector4_f32[1]), - sqrtf(V.vector4_f32[2]), - sqrtf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{sqrtf(V.vector4_f32[0]), sqrtf(V.vector4_f32[1]), + sqrtf(V.vector4_f32[2]), sqrtf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) // 3 iterations of Newton-Raphson refinment of sqrt @@ -3199,15 +2816,11 @@ inline XMVECTOR XM_CALLCONV XMVectorSqrt(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorReciprocalSqrtEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorReciprocalSqrtEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - 1.f / sqrtf(V.vector4_f32[0]), - 1.f / sqrtf(V.vector4_f32[1]), - 1.f / sqrtf(V.vector4_f32[2]), - 1.f / sqrtf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = { + {{1.f / sqrtf(V.vector4_f32[0]), 1.f / sqrtf(V.vector4_f32[1]), + 1.f / sqrtf(V.vector4_f32[2]), 1.f / sqrtf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vrsqrteq_f32(V); @@ -3218,15 +2831,11 @@ inline XMVECTOR XM_CALLCONV XMVectorReciprocalSqrtEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorReciprocalSqrt(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorReciprocalSqrt(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - 1.f / sqrtf(V.vector4_f32[0]), - 1.f / sqrtf(V.vector4_f32[1]), - 1.f / sqrtf(V.vector4_f32[2]), - 1.f / sqrtf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = { + {{1.f / sqrtf(V.vector4_f32[0]), 1.f / sqrtf(V.vector4_f32[1]), + 1.f / sqrtf(V.vector4_f32[2]), 1.f / sqrtf(V.vector4_f32[3])}}}; return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) // 2 iterations of Newton-Raphson refinement of reciprocal @@ -3249,15 +2858,10 @@ inline XMVECTOR XM_CALLCONV XMVectorReciprocalSqrt(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorExp2(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorExp2(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - exp2f(V.vector4_f32[0]), - exp2f(V.vector4_f32[1]), - exp2f(V.vector4_f32[2]), - exp2f(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{exp2f(V.vector4_f32[0]), exp2f(V.vector4_f32[1]), + exp2f(V.vector4_f32[2]), exp2f(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) int32x4_t itrunc = vcvtq_s32_f32(V); @@ -3311,7 +2915,8 @@ inline XMVECTOR XM_CALLCONV XMVectorExp2(FXMVECTOR V) noexcept t1 = vreinterpretq_s32_u32(vceqq_s32(t1, g_XMInfinity)); int32x4_t isNaN = vbicq_s32(t1, t0); - float32x4_t vResult = vbslq_f32(vreinterpretq_u32_s32(isNaN), g_XMQNaN, result5); + float32x4_t vResult = + vbslq_f32(vreinterpretq_u32_s32(isNaN), g_XMQNaN, result5); return vResult; #elif defined(_XM_SVML_INTRINSICS_) XMVECTOR Result = _mm_exp2_ps(V); @@ -3386,16 +2991,12 @@ inline XMVECTOR XM_CALLCONV XMVectorExp2(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorExp10(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorExp10(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - powf(10.0f, V.vector4_f32[0]), - powf(10.0f, V.vector4_f32[1]), - powf(10.0f, V.vector4_f32[2]), - powf(10.0f, V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = { + {{powf(10.0f, V.vector4_f32[0]), powf(10.0f, V.vector4_f32[1]), + powf(10.0f, V.vector4_f32[2]), powf(10.0f, V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_SVML_INTRINSICS_) @@ -3410,16 +3011,11 @@ inline XMVECTOR XM_CALLCONV XMVectorExp10(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorExpE(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorExpE(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - expf(V.vector4_f32[0]), - expf(V.vector4_f32[1]), - expf(V.vector4_f32[2]), - expf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{expf(V.vector4_f32[0]), expf(V.vector4_f32[1]), + expf(V.vector4_f32[2]), expf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_SVML_INTRINSICS_) @@ -3434,8 +3030,7 @@ inline XMVECTOR XM_CALLCONV XMVectorExpE(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorExp(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorExp(FXMVECTOR V) noexcept { return XMVectorExp2(V); } @@ -3443,173 +3038,175 @@ inline XMVECTOR XM_CALLCONV XMVectorExp(FXMVECTOR V) noexcept #if defined(_XM_SSE_INTRINSICS_) -namespace MathInternal -{ - inline __m128i multi_sll_epi32(__m128i value, __m128i count) noexcept - { - __m128i v = _mm_shuffle_epi32(value, _MM_SHUFFLE(0, 0, 0, 0)); - __m128i c = _mm_shuffle_epi32(count, _MM_SHUFFLE(0, 0, 0, 0)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r0 = _mm_sll_epi32(v, c); +namespace MathInternal { +inline __m128i multi_sll_epi32(__m128i value, __m128i count) noexcept { + __m128i v = _mm_shuffle_epi32(value, _MM_SHUFFLE(0, 0, 0, 0)); + __m128i c = _mm_shuffle_epi32(count, _MM_SHUFFLE(0, 0, 0, 0)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r0 = _mm_sll_epi32(v, c); - v = _mm_shuffle_epi32(value, _MM_SHUFFLE(1, 1, 1, 1)); - c = _mm_shuffle_epi32(count, _MM_SHUFFLE(1, 1, 1, 1)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r1 = _mm_sll_epi32(v, c); + v = _mm_shuffle_epi32(value, _MM_SHUFFLE(1, 1, 1, 1)); + c = _mm_shuffle_epi32(count, _MM_SHUFFLE(1, 1, 1, 1)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r1 = _mm_sll_epi32(v, c); - v = _mm_shuffle_epi32(value, _MM_SHUFFLE(2, 2, 2, 2)); - c = _mm_shuffle_epi32(count, _MM_SHUFFLE(2, 2, 2, 2)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r2 = _mm_sll_epi32(v, c); + v = _mm_shuffle_epi32(value, _MM_SHUFFLE(2, 2, 2, 2)); + c = _mm_shuffle_epi32(count, _MM_SHUFFLE(2, 2, 2, 2)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r2 = _mm_sll_epi32(v, c); - v = _mm_shuffle_epi32(value, _MM_SHUFFLE(3, 3, 3, 3)); - c = _mm_shuffle_epi32(count, _MM_SHUFFLE(3, 3, 3, 3)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r3 = _mm_sll_epi32(v, c); + v = _mm_shuffle_epi32(value, _MM_SHUFFLE(3, 3, 3, 3)); + c = _mm_shuffle_epi32(count, _MM_SHUFFLE(3, 3, 3, 3)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r3 = _mm_sll_epi32(v, c); - // (r0,r0,r1,r1) - __m128 r01 = _mm_shuffle_ps(_mm_castsi128_ps(r0), _mm_castsi128_ps(r1), _MM_SHUFFLE(0, 0, 0, 0)); - // (r2,r2,r3,r3) - __m128 r23 = _mm_shuffle_ps(_mm_castsi128_ps(r2), _mm_castsi128_ps(r3), _MM_SHUFFLE(0, 0, 0, 0)); - // (r0,r1,r2,r3) - __m128 result = _mm_shuffle_ps(r01, r23, _MM_SHUFFLE(2, 0, 2, 0)); - return _mm_castps_si128(result); - } + // (r0,r0,r1,r1) + __m128 r01 = _mm_shuffle_ps(_mm_castsi128_ps(r0), _mm_castsi128_ps(r1), + _MM_SHUFFLE(0, 0, 0, 0)); + // (r2,r2,r3,r3) + __m128 r23 = _mm_shuffle_ps(_mm_castsi128_ps(r2), _mm_castsi128_ps(r3), + _MM_SHUFFLE(0, 0, 0, 0)); + // (r0,r1,r2,r3) + __m128 result = _mm_shuffle_ps(r01, r23, _MM_SHUFFLE(2, 0, 2, 0)); + return _mm_castps_si128(result); +} - inline __m128i multi_srl_epi32(__m128i value, __m128i count) noexcept - { - __m128i v = _mm_shuffle_epi32(value, _MM_SHUFFLE(0, 0, 0, 0)); - __m128i c = _mm_shuffle_epi32(count, _MM_SHUFFLE(0, 0, 0, 0)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r0 = _mm_srl_epi32(v, c); +inline __m128i multi_srl_epi32(__m128i value, __m128i count) noexcept { + __m128i v = _mm_shuffle_epi32(value, _MM_SHUFFLE(0, 0, 0, 0)); + __m128i c = _mm_shuffle_epi32(count, _MM_SHUFFLE(0, 0, 0, 0)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r0 = _mm_srl_epi32(v, c); - v = _mm_shuffle_epi32(value, _MM_SHUFFLE(1, 1, 1, 1)); - c = _mm_shuffle_epi32(count, _MM_SHUFFLE(1, 1, 1, 1)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r1 = _mm_srl_epi32(v, c); + v = _mm_shuffle_epi32(value, _MM_SHUFFLE(1, 1, 1, 1)); + c = _mm_shuffle_epi32(count, _MM_SHUFFLE(1, 1, 1, 1)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r1 = _mm_srl_epi32(v, c); - v = _mm_shuffle_epi32(value, _MM_SHUFFLE(2, 2, 2, 2)); - c = _mm_shuffle_epi32(count, _MM_SHUFFLE(2, 2, 2, 2)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r2 = _mm_srl_epi32(v, c); + v = _mm_shuffle_epi32(value, _MM_SHUFFLE(2, 2, 2, 2)); + c = _mm_shuffle_epi32(count, _MM_SHUFFLE(2, 2, 2, 2)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r2 = _mm_srl_epi32(v, c); - v = _mm_shuffle_epi32(value, _MM_SHUFFLE(3, 3, 3, 3)); - c = _mm_shuffle_epi32(count, _MM_SHUFFLE(3, 3, 3, 3)); - c = _mm_and_si128(c, g_XMMaskX); - __m128i r3 = _mm_srl_epi32(v, c); + v = _mm_shuffle_epi32(value, _MM_SHUFFLE(3, 3, 3, 3)); + c = _mm_shuffle_epi32(count, _MM_SHUFFLE(3, 3, 3, 3)); + c = _mm_and_si128(c, g_XMMaskX); + __m128i r3 = _mm_srl_epi32(v, c); - // (r0,r0,r1,r1) - __m128 r01 = _mm_shuffle_ps(_mm_castsi128_ps(r0), _mm_castsi128_ps(r1), _MM_SHUFFLE(0, 0, 0, 0)); - // (r2,r2,r3,r3) - __m128 r23 = _mm_shuffle_ps(_mm_castsi128_ps(r2), _mm_castsi128_ps(r3), _MM_SHUFFLE(0, 0, 0, 0)); - // (r0,r1,r2,r3) - __m128 result = _mm_shuffle_ps(r01, r23, _MM_SHUFFLE(2, 0, 2, 0)); - return _mm_castps_si128(result); - } + // (r0,r0,r1,r1) + __m128 r01 = _mm_shuffle_ps(_mm_castsi128_ps(r0), _mm_castsi128_ps(r1), + _MM_SHUFFLE(0, 0, 0, 0)); + // (r2,r2,r3,r3) + __m128 r23 = _mm_shuffle_ps(_mm_castsi128_ps(r2), _mm_castsi128_ps(r3), + _MM_SHUFFLE(0, 0, 0, 0)); + // (r0,r1,r2,r3) + __m128 result = _mm_shuffle_ps(r01, r23, _MM_SHUFFLE(2, 0, 2, 0)); + return _mm_castps_si128(result); +} - inline __m128i GetLeadingBit(const __m128i value) noexcept - { - static const XMVECTORI32 g_XM0000FFFF = { { { 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF } } }; - static const XMVECTORI32 g_XM000000FF = { { { 0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF } } }; - static const XMVECTORI32 g_XM0000000F = { { { 0x0000000F, 0x0000000F, 0x0000000F, 0x0000000F } } }; - static const XMVECTORI32 g_XM00000003 = { { { 0x00000003, 0x00000003, 0x00000003, 0x00000003 } } }; +inline __m128i GetLeadingBit(const __m128i value) noexcept { + static const XMVECTORI32 g_XM0000FFFF = { + {{0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF}}}; + static const XMVECTORI32 g_XM000000FF = { + {{0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF}}}; + static const XMVECTORI32 g_XM0000000F = { + {{0x0000000F, 0x0000000F, 0x0000000F, 0x0000000F}}}; + static const XMVECTORI32 g_XM00000003 = { + {{0x00000003, 0x00000003, 0x00000003, 0x00000003}}}; - __m128i v = value, r, c, b, s; + __m128i v = value, r, c, b, s; - c = _mm_cmpgt_epi32(v, g_XM0000FFFF); // c = (v > 0xFFFF) - b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) - r = _mm_slli_epi32(b, 4); // r = (b << 4) - v = multi_srl_epi32(v, r); // v = (v >> r) + c = _mm_cmpgt_epi32(v, g_XM0000FFFF); // c = (v > 0xFFFF) + b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) + r = _mm_slli_epi32(b, 4); // r = (b << 4) + v = multi_srl_epi32(v, r); // v = (v >> r) - c = _mm_cmpgt_epi32(v, g_XM000000FF); // c = (v > 0xFF) - b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) - s = _mm_slli_epi32(b, 3); // s = (b << 3) - v = multi_srl_epi32(v, s); // v = (v >> s) - r = _mm_or_si128(r, s); // r = (r | s) + c = _mm_cmpgt_epi32(v, g_XM000000FF); // c = (v > 0xFF) + b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) + s = _mm_slli_epi32(b, 3); // s = (b << 3) + v = multi_srl_epi32(v, s); // v = (v >> s) + r = _mm_or_si128(r, s); // r = (r | s) - c = _mm_cmpgt_epi32(v, g_XM0000000F); // c = (v > 0xF) - b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) - s = _mm_slli_epi32(b, 2); // s = (b << 2) - v = multi_srl_epi32(v, s); // v = (v >> s) - r = _mm_or_si128(r, s); // r = (r | s) + c = _mm_cmpgt_epi32(v, g_XM0000000F); // c = (v > 0xF) + b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) + s = _mm_slli_epi32(b, 2); // s = (b << 2) + v = multi_srl_epi32(v, s); // v = (v >> s) + r = _mm_or_si128(r, s); // r = (r | s) - c = _mm_cmpgt_epi32(v, g_XM00000003); // c = (v > 0x3) - b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) - s = _mm_slli_epi32(b, 1); // s = (b << 1) - v = multi_srl_epi32(v, s); // v = (v >> s) - r = _mm_or_si128(r, s); // r = (r | s) + c = _mm_cmpgt_epi32(v, g_XM00000003); // c = (v > 0x3) + b = _mm_srli_epi32(c, 31); // b = (c ? 1 : 0) + s = _mm_slli_epi32(b, 1); // s = (b << 1) + v = multi_srl_epi32(v, s); // v = (v >> s) + r = _mm_or_si128(r, s); // r = (r | s) - s = _mm_srli_epi32(v, 1); - r = _mm_or_si128(r, s); - return r; - } -} // namespace MathInternal + s = _mm_srli_epi32(v, 1); + r = _mm_or_si128(r, s); + return r; +} +} // namespace MathInternal -#endif // _XM_SSE_INTRINSICS_ +#endif // _XM_SSE_INTRINSICS_ #if defined(_XM_ARM_NEON_INTRINSICS_) -namespace MathInternal -{ - inline int32x4_t GetLeadingBit(const int32x4_t value) noexcept - { - static const XMVECTORI32 g_XM0000FFFF = { { { 0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF } } }; - static const XMVECTORI32 g_XM000000FF = { { { 0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF } } }; - static const XMVECTORI32 g_XM0000000F = { { { 0x0000000F, 0x0000000F, 0x0000000F, 0x0000000F } } }; - static const XMVECTORI32 g_XM00000003 = { { { 0x00000003, 0x00000003, 0x00000003, 0x00000003 } } }; +namespace MathInternal { +inline int32x4_t GetLeadingBit(const int32x4_t value) noexcept { + static const XMVECTORI32 g_XM0000FFFF = { + {{0x0000FFFF, 0x0000FFFF, 0x0000FFFF, 0x0000FFFF}}}; + static const XMVECTORI32 g_XM000000FF = { + {{0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF}}}; + static const XMVECTORI32 g_XM0000000F = { + {{0x0000000F, 0x0000000F, 0x0000000F, 0x0000000F}}}; + static const XMVECTORI32 g_XM00000003 = { + {{0x00000003, 0x00000003, 0x00000003, 0x00000003}}}; - uint32x4_t c = vcgtq_s32(value, g_XM0000FFFF); // c = (v > 0xFFFF) - int32x4_t b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) - int32x4_t r = vshlq_n_s32(b, 4); // r = (b << 4) - r = vnegq_s32(r); - int32x4_t v = vshlq_s32(value, r); // v = (v >> r) + uint32x4_t c = vcgtq_s32(value, g_XM0000FFFF); // c = (v > 0xFFFF) + int32x4_t b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) + int32x4_t r = vshlq_n_s32(b, 4); // r = (b << 4) + r = vnegq_s32(r); + int32x4_t v = vshlq_s32(value, r); // v = (v >> r) - c = vcgtq_s32(v, g_XM000000FF); // c = (v > 0xFF) - b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) - int32x4_t s = vshlq_n_s32(b, 3); // s = (b << 3) - s = vnegq_s32(s); - v = vshlq_s32(v, s); // v = (v >> s) - r = vorrq_s32(r, s); // r = (r | s) + c = vcgtq_s32(v, g_XM000000FF); // c = (v > 0xFF) + b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) + int32x4_t s = vshlq_n_s32(b, 3); // s = (b << 3) + s = vnegq_s32(s); + v = vshlq_s32(v, s); // v = (v >> s) + r = vorrq_s32(r, s); // r = (r | s) - c = vcgtq_s32(v, g_XM0000000F); // c = (v > 0xF) - b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) - s = vshlq_n_s32(b, 2); // s = (b << 2) - s = vnegq_s32(s); - v = vshlq_s32(v, s); // v = (v >> s) - r = vorrq_s32(r, s); // r = (r | s) + c = vcgtq_s32(v, g_XM0000000F); // c = (v > 0xF) + b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) + s = vshlq_n_s32(b, 2); // s = (b << 2) + s = vnegq_s32(s); + v = vshlq_s32(v, s); // v = (v >> s) + r = vorrq_s32(r, s); // r = (r | s) - c = vcgtq_s32(v, g_XM00000003); // c = (v > 0x3) - b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) - s = vshlq_n_s32(b, 1); // s = (b << 1) - s = vnegq_s32(s); - v = vshlq_s32(v, s); // v = (v >> s) - r = vorrq_s32(r, s); // r = (r | s) + c = vcgtq_s32(v, g_XM00000003); // c = (v > 0x3) + b = vshrq_n_s32(vreinterpretq_s32_u32(c), 31); // b = (c ? 1 : 0) + s = vshlq_n_s32(b, 1); // s = (b << 1) + s = vnegq_s32(s); + v = vshlq_s32(v, s); // v = (v >> s) + r = vorrq_s32(r, s); // r = (r | s) - s = vshrq_n_s32(v, 1); - r = vorrq_s32(r, s); - return r; - } + s = vshrq_n_s32(v, 1); + r = vorrq_s32(r, s); + return r; +} -} // namespace MathInternal +} // namespace MathInternal #endif //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLog2(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLog2(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - log2f(V.vector4_f32[0]), - log2f(V.vector4_f32[1]), - log2f(V.vector4_f32[2]), - log2f(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{log2f(V.vector4_f32[0]), log2f(V.vector4_f32[1]), + log2f(V.vector4_f32[2]), log2f(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) int32x4_t rawBiased = vandq_s32(vreinterpretq_s32_f32(V), g_XMInfinity); int32x4_t trailing = vandq_s32(vreinterpretq_s32_f32(V), g_XMQNaNTest); - uint32x4_t isExponentZero = vceqq_s32(vreinterpretq_s32_f32(g_XMZero), rawBiased); + uint32x4_t isExponentZero = + vceqq_s32(vreinterpretq_s32_f32(g_XMZero), rawBiased); // Compute exponent and significand for normals. int32x4_t biased = vshrq_n_s32(rawBiased, 23); @@ -3754,16 +3351,12 @@ inline XMVECTOR XM_CALLCONV XMVectorLog2(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLog10(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLog10(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - log10f(V.vector4_f32[0]), - log10f(V.vector4_f32[1]), - log10f(V.vector4_f32[2]), - log10f(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = { + {{log10f(V.vector4_f32[0]), log10f(V.vector4_f32[1]), + log10f(V.vector4_f32[2]), log10f(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -3918,16 +3511,11 @@ inline XMVECTOR XM_CALLCONV XMVectorLog10(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLogE(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLogE(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - logf(V.vector4_f32[0]), - logf(V.vector4_f32[1]), - logf(V.vector4_f32[2]), - logf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{logf(V.vector4_f32[0]), logf(V.vector4_f32[1]), + logf(V.vector4_f32[2]), logf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -4082,36 +3670,27 @@ inline XMVECTOR XM_CALLCONV XMVectorLogE(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLog(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLog(FXMVECTOR V) noexcept { return XMVectorLog2(V); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorPow -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorPow(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - powf(V1.vector4_f32[0], V2.vector4_f32[0]), - powf(V1.vector4_f32[1], V2.vector4_f32[1]), - powf(V1.vector4_f32[2], V2.vector4_f32[2]), - powf(V1.vector4_f32[3], V2.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{powf(V1.vector4_f32[0], V2.vector4_f32[0]), + powf(V1.vector4_f32[1], V2.vector4_f32[1]), + powf(V1.vector4_f32[2], V2.vector4_f32[2]), + powf(V1.vector4_f32[3], V2.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - XMVECTORF32 vResult = { { { - powf(vgetq_lane_f32(V1, 0), vgetq_lane_f32(V2, 0)), - powf(vgetq_lane_f32(V1, 1), vgetq_lane_f32(V2, 1)), - powf(vgetq_lane_f32(V1, 2), vgetq_lane_f32(V2, 2)), - powf(vgetq_lane_f32(V1, 3), vgetq_lane_f32(V2, 3)) - } } }; + XMVECTORF32 vResult = { + {{powf(vgetq_lane_f32(V1, 0), vgetq_lane_f32(V2, 0)), + powf(vgetq_lane_f32(V1, 1), vgetq_lane_f32(V2, 1)), + powf(vgetq_lane_f32(V1, 2), vgetq_lane_f32(V2, 2)), + powf(vgetq_lane_f32(V1, 3), vgetq_lane_f32(V2, 3))}}}; return vResult.v; #elif defined(_XM_SVML_INTRINSICS_) XMVECTOR Result = _mm_pow_ps(V1, V2); @@ -4121,26 +3700,19 @@ inline XMVECTOR XM_CALLCONV XMVectorPow XM_ALIGNED_DATA(16) float b[4]; _mm_store_ps(a, V1); _mm_store_ps(b, V2); - XMVECTOR vResult = _mm_setr_ps( - powf(a[0], b[0]), - powf(a[1], b[1]), - powf(a[2], b[2]), - powf(a[3], b[3])); + XMVECTOR vResult = _mm_setr_ps(powf(a[0], b[0]), powf(a[1], b[1]), + powf(a[2], b[2]), powf(a[3], b[3])); return vResult; #endif } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorAbs(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorAbs(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - fabsf(V.vector4_f32[0]), - fabsf(V.vector4_f32[1]), - fabsf(V.vector4_f32[2]), - fabsf(V.vector4_f32[3]) - } } }; + XMVECTORF32 vResult = { + {{fabsf(V.vector4_f32[0]), fabsf(V.vector4_f32[1]), + fabsf(V.vector4_f32[2]), fabsf(V.vector4_f32[3])}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) return vabsq_f32(V); @@ -4154,12 +3726,7 @@ inline XMVECTOR XM_CALLCONV XMVectorAbs(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorMod -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorMod(FXMVECTOR V1, FXMVECTOR V2) noexcept { // V1 % V2 = V1 - V2 * truncate(V1 / V2) #if defined(_XM_NO_INTRINSICS_) @@ -4182,8 +3749,7 @@ inline XMVECTOR XM_CALLCONV XMVectorMod //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorModAngles(FXMVECTOR Angles) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorModAngles(FXMVECTOR Angles) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR V; @@ -4212,17 +3778,12 @@ inline XMVECTOR XM_CALLCONV XMVectorModAngles(FXMVECTOR Angles) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSin(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSin(FXMVECTOR V) noexcept { // 11-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - sinf(V.vector4_f32[0]), - sinf(V.vector4_f32[1]), - sinf(V.vector4_f32[2]), - sinf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{sinf(V.vector4_f32[0]), sinf(V.vector4_f32[1]), + sinf(V.vector4_f32[2]), sinf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) // Force the value within the bounds of pi @@ -4265,7 +3826,7 @@ inline XMVECTOR XM_CALLCONV XMVectorSin(FXMVECTOR V) noexcept // Map in [-pi/2,pi/2] with sin(y) = sin(x). __m128 sign = _mm_and_ps(x, g_XMNegativeZero); - __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 + __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 __m128 absx = _mm_andnot_ps(sign, x); // |x| __m128 rflx = _mm_sub_ps(c, x); __m128 comp = _mm_cmple_ps(absx, g_XMHalfPi); @@ -4299,17 +3860,12 @@ inline XMVECTOR XM_CALLCONV XMVectorSin(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorCos(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorCos(FXMVECTOR V) noexcept { // 10-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - cosf(V.vector4_f32[0]), - cosf(V.vector4_f32[1]), - cosf(V.vector4_f32[2]), - cosf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{cosf(V.vector4_f32[0]), cosf(V.vector4_f32[1]), + cosf(V.vector4_f32[2]), cosf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) // Map V to x in [-pi,pi]. @@ -4353,7 +3909,7 @@ inline XMVECTOR XM_CALLCONV XMVectorCos(FXMVECTOR V) noexcept // Map in [-pi/2,pi/2] with cos(y) = sign*cos(x). XMVECTOR sign = _mm_and_ps(x, g_XMNegativeZero); - __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 + __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 __m128 absx = _mm_andnot_ps(sign, x); // |x| __m128 rflx = _mm_sub_ps(c, x); __m128 comp = _mm_cmple_ps(absx, g_XMHalfPi); @@ -4390,33 +3946,19 @@ inline XMVECTOR XM_CALLCONV XMVectorCos(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorSinCos -( - XMVECTOR* pSin, - XMVECTOR* pCos, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorSinCos(XMVECTOR* pSin, XMVECTOR* pCos, FXMVECTOR V) noexcept { assert(pSin != nullptr); assert(pCos != nullptr); // 11/10-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Sin = { { { - sinf(V.vector4_f32[0]), - sinf(V.vector4_f32[1]), - sinf(V.vector4_f32[2]), - sinf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Sin = {{{sinf(V.vector4_f32[0]), sinf(V.vector4_f32[1]), + sinf(V.vector4_f32[2]), sinf(V.vector4_f32[3])}}}; - XMVECTORF32 Cos = { { { - cosf(V.vector4_f32[0]), - cosf(V.vector4_f32[1]), - cosf(V.vector4_f32[2]), - cosf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Cos = {{{cosf(V.vector4_f32[0]), cosf(V.vector4_f32[1]), + cosf(V.vector4_f32[2]), cosf(V.vector4_f32[3])}}}; *pSin = Sin.v; *pCos = Cos.v; @@ -4428,7 +3970,7 @@ inline void XM_CALLCONV XMVectorSinCos uint32x4_t sign = vandq_u32(vreinterpretq_u32_f32(x), g_XMNegativeZero); uint32x4_t c = vorrq_u32(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 float32x4_t absx = vabsq_f32(x); - float32x4_t rflx = vsubq_f32(vreinterpretq_f32_u32(c), x); + float32x4_t rflx = vsubq_f32(vreinterpretq_f32_u32(c), x); uint32x4_t comp = vcleq_f32(absx, g_XMHalfPi); x = vbslq_f32(comp, x, rflx); float32x4_t fsign = vbslq_f32(comp, g_XMOne, g_XMNegativeOne); @@ -4478,7 +4020,7 @@ inline void XM_CALLCONV XMVectorSinCos // Map in [-pi/2,pi/2] with sin(y) = sin(x), cos(y) = sign*cos(x). XMVECTOR sign = _mm_and_ps(x, g_XMNegativeZero); - __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 + __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 __m128 absx = _mm_andnot_ps(sign, x); // |x| __m128 rflx = _mm_sub_ps(c, x); __m128 comp = _mm_cmple_ps(absx, g_XMHalfPi); @@ -4535,27 +4077,27 @@ inline void XM_CALLCONV XMVectorSinCos //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorTan(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorTan(FXMVECTOR V) noexcept { // Cody and Waite algorithm to compute tangent. #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - tanf(V.vector4_f32[0]), - tanf(V.vector4_f32[1]), - tanf(V.vector4_f32[2]), - tanf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{tanf(V.vector4_f32[0]), tanf(V.vector4_f32[1]), + tanf(V.vector4_f32[2]), tanf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_SVML_INTRINSICS_) XMVECTOR Result = _mm_tan_ps(V); return Result; #elif defined(_XM_SSE_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 TanCoefficients0 = { { { 1.0f, -4.667168334e-1f, 2.566383229e-2f, -3.118153191e-4f } } }; - static const XMVECTORF32 TanCoefficients1 = { { { 4.981943399e-7f, -1.333835001e-1f, 3.424887824e-3f, -1.786170734e-5f } } }; - static const XMVECTORF32 TanConstants = { { { 1.570796371f, 6.077100628e-11f, 0.000244140625f, 0.63661977228f /*2 / Pi*/ } } }; - static const XMVECTORU32 Mask = { { { 0x1, 0x1, 0x1, 0x1 } } }; + static const XMVECTORF32 TanCoefficients0 = { + {{1.0f, -4.667168334e-1f, 2.566383229e-2f, -3.118153191e-4f}}}; + static const XMVECTORF32 TanCoefficients1 = { + {{4.981943399e-7f, -1.333835001e-1f, 3.424887824e-3f, + -1.786170734e-5f}}}; + static const XMVECTORF32 TanConstants = { + {{1.570796371f, 6.077100628e-11f, 0.000244140625f, + 0.63661977228f /*2 / Pi*/}}}; + static const XMVECTORU32 Mask = {{{0x1, 0x1, 0x1, 0x1}}}; XMVECTOR TwoDivPi = XMVectorSplatW(TanConstants.v); @@ -4580,8 +4122,7 @@ inline XMVECTOR XM_CALLCONV XMVectorTan(FXMVECTOR V) noexcept #elif defined(_XM_SSE_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) reinterpret_cast<__m128i*>(&VB)[0] = _mm_cvttps_epi32(VB); #else - for (size_t i = 0; i < 4; i++) - { + for (size_t i = 0; i < 4; i++) { VB.vector4_u32[i] = static_cast(VB.vector4_f32[i]); } #endif @@ -4630,18 +4171,15 @@ inline XMVECTOR XM_CALLCONV XMVectorTan(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSinH(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSinH(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - sinhf(V.vector4_f32[0]), - sinhf(V.vector4_f32[1]), - sinhf(V.vector4_f32[2]), - sinhf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{sinhf(V.vector4_f32[0]), sinhf(V.vector4_f32[1]), + sinhf(V.vector4_f32[2]), sinhf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f } } }; // 1.0f / ln(2.0f) + static const XMVECTORF32 Scale = { + {{1.442695040888963f, 1.442695040888963f, 1.442695040888963f, + 1.442695040888963f}}}; // 1.0f / ln(2.0f) XMVECTOR V1 = vmlaq_f32(g_XMNegativeOne.v, V, Scale.v); XMVECTOR V2 = vmlsq_f32(g_XMNegativeOne.v, V, Scale.v); @@ -4653,7 +4191,9 @@ inline XMVECTOR XM_CALLCONV XMVectorSinH(FXMVECTOR V) noexcept XMVECTOR Result = _mm_sinh_ps(V); return Result; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f } } }; // 1.0f / ln(2.0f) + static const XMVECTORF32 Scale = { + {{1.442695040888963f, 1.442695040888963f, 1.442695040888963f, + 1.442695040888963f}}}; // 1.0f / ln(2.0f) XMVECTOR V1 = XM_FMADD_PS(V, Scale, g_XMNegativeOne); XMVECTOR V2 = XM_FNMADD_PS(V, Scale, g_XMNegativeOne); @@ -4666,18 +4206,15 @@ inline XMVECTOR XM_CALLCONV XMVectorSinH(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorCosH(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorCosH(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - coshf(V.vector4_f32[0]), - coshf(V.vector4_f32[1]), - coshf(V.vector4_f32[2]), - coshf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{coshf(V.vector4_f32[0]), coshf(V.vector4_f32[1]), + coshf(V.vector4_f32[2]), coshf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f } } }; // 1.0f / ln(2.0f) + static const XMVECTORF32 Scale = { + {{1.442695040888963f, 1.442695040888963f, 1.442695040888963f, + 1.442695040888963f}}}; // 1.0f / ln(2.0f) XMVECTOR V1 = vmlaq_f32(g_XMNegativeOne.v, V, Scale.v); XMVECTOR V2 = vmlsq_f32(g_XMNegativeOne.v, V, Scale.v); @@ -4688,7 +4225,9 @@ inline XMVECTOR XM_CALLCONV XMVectorCosH(FXMVECTOR V) noexcept XMVECTOR Result = _mm_cosh_ps(V); return Result; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.442695040888963f, 1.442695040888963f, 1.442695040888963f, 1.442695040888963f } } }; // 1.0f / ln(2.0f) + static const XMVECTORF32 Scale = { + {{1.442695040888963f, 1.442695040888963f, 1.442695040888963f, + 1.442695040888963f}}}; // 1.0f / ln(2.0f) XMVECTOR V1 = XM_FMADD_PS(V, Scale.v, g_XMNegativeOne.v); XMVECTOR V2 = XM_FNMADD_PS(V, Scale.v, g_XMNegativeOne.v); @@ -4700,18 +4239,15 @@ inline XMVECTOR XM_CALLCONV XMVectorCosH(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorTanH(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorTanH(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - tanhf(V.vector4_f32[0]), - tanhf(V.vector4_f32[1]), - tanhf(V.vector4_f32[2]), - tanhf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{tanhf(V.vector4_f32[0]), tanhf(V.vector4_f32[1]), + tanhf(V.vector4_f32[2]), tanhf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f } } }; // 2.0f / ln(2.0f) + static const XMVECTORF32 Scale = { + {{2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, + 2.8853900817779268f}}}; // 2.0f / ln(2.0f) XMVECTOR E = vmulq_f32(V, Scale.v); E = XMVectorExp(E); @@ -4722,7 +4258,9 @@ inline XMVECTOR XM_CALLCONV XMVectorTanH(FXMVECTOR V) noexcept XMVECTOR Result = _mm_tanh_ps(V); return Result; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f } } }; // 2.0f / ln(2.0f) + static const XMVECTORF32 Scale = { + {{2.8853900817779268f, 2.8853900817779268f, 2.8853900817779268f, + 2.8853900817779268f}}}; // 2.0f / ln(2.0f) XMVECTOR E = _mm_mul_ps(V, Scale.v); E = XMVectorExp(E); @@ -4734,17 +4272,12 @@ inline XMVECTOR XM_CALLCONV XMVectorTanH(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorASin(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorASin(FXMVECTOR V) noexcept { // 7-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - asinf(V.vector4_f32[0]), - asinf(V.vector4_f32[1]), - asinf(V.vector4_f32[2]), - asinf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{asinf(V.vector4_f32[0]), asinf(V.vector4_f32[1]), + asinf(V.vector4_f32[2]), asinf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t nonnegative = vcgeq_f32(V, g_XMZero); @@ -4834,17 +4367,12 @@ inline XMVECTOR XM_CALLCONV XMVectorASin(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorACos(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorACos(FXMVECTOR V) noexcept { // 7-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - acosf(V.vector4_f32[0]), - acosf(V.vector4_f32[1]), - acosf(V.vector4_f32[2]), - acosf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{acosf(V.vector4_f32[0]), acosf(V.vector4_f32[1]), + acosf(V.vector4_f32[2]), acosf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t nonnegative = vcgeq_f32(V, g_XMZero); @@ -4932,17 +4460,12 @@ inline XMVECTOR XM_CALLCONV XMVectorACos(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorATan(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorATan(FXMVECTOR V) noexcept { // 17-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - atanf(V.vector4_f32[0]), - atanf(V.vector4_f32[1]), - atanf(V.vector4_f32[2]), - atanf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{atanf(V.vector4_f32[0]), atanf(V.vector4_f32[1]), + atanf(V.vector4_f32[2]), atanf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t absV = vabsq_f32(V); @@ -5049,38 +4572,33 @@ inline XMVECTOR XM_CALLCONV XMVectorATan(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorATan2 -( - FXMVECTOR Y, - FXMVECTOR X -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorATan2(FXMVECTOR Y, FXMVECTOR X) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - atan2f(Y.vector4_f32[0], X.vector4_f32[0]), - atan2f(Y.vector4_f32[1], X.vector4_f32[1]), - atan2f(Y.vector4_f32[2], X.vector4_f32[2]), - atan2f(Y.vector4_f32[3], X.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{atan2f(Y.vector4_f32[0], X.vector4_f32[0]), + atan2f(Y.vector4_f32[1], X.vector4_f32[1]), + atan2f(Y.vector4_f32[2], X.vector4_f32[2]), + atan2f(Y.vector4_f32[3], X.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_SVML_INTRINSICS_) XMVECTOR Result = _mm_atan2_ps(Y, X); return Result; #else - // Return the inverse tangent of Y / X in the range of -Pi to Pi with the following exceptions: + // Return the inverse tangent of Y / X in the range of -Pi to Pi with the + // following exceptions: // Y == 0 and X is Negative -> Pi with the sign of Y // y == 0 and x is positive -> 0 with the sign of y // Y != 0 and X == 0 -> Pi / 2 with the sign of Y - // Y != 0 and X is Negative -> atan(y/x) + (PI with the sign of Y) - // X == -Infinity and Finite Y -> Pi with the sign of Y - // X == +Infinity and Finite Y -> 0 with the sign of Y - // Y == Infinity and X is Finite -> Pi / 2 with the sign of Y - // Y == Infinity and X == -Infinity -> 3Pi / 4 with the sign of Y - // Y == Infinity and X == +Infinity -> Pi / 4 with the sign of Y + // Y != 0 and X is Negative -> atan(y/x) + (PI with the sign of + // Y) X == -Infinity and Finite Y -> Pi with the sign of Y X == + // +Infinity and Finite Y -> 0 with the sign of Y Y == Infinity and + // X is Finite -> Pi / 2 with the sign of Y Y == Infinity and X == + // -Infinity -> 3Pi / 4 with the sign of Y Y == Infinity and X == + // +Infinity -> Pi / 4 with the sign of Y - static const XMVECTORF32 ATan2Constants = { { { XM_PI, XM_PIDIV2, XM_PIDIV4, XM_PI * 3.0f / 4.0f } } }; + static const XMVECTORF32 ATan2Constants = { + {{XM_PI, XM_PIDIV2, XM_PIDIV4, XM_PI * 3.0f / 4.0f}}}; XMVECTOR Zero = XMVectorZero(); XMVECTOR ATanResultValid = XMVectorTrueInt(); @@ -5125,17 +4643,12 @@ inline XMVECTOR XM_CALLCONV XMVectorATan2 //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorSinEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorSinEst(FXMVECTOR V) noexcept { // 7-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - sinf(V.vector4_f32[0]), - sinf(V.vector4_f32[1]), - sinf(V.vector4_f32[2]), - sinf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{sinf(V.vector4_f32[0]), sinf(V.vector4_f32[1]), + sinf(V.vector4_f32[2]), sinf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) // Force the value within the bounds of pi @@ -5171,7 +4684,7 @@ inline XMVECTOR XM_CALLCONV XMVectorSinEst(FXMVECTOR V) noexcept // Map in [-pi/2,pi/2] with sin(y) = sin(x). __m128 sign = _mm_and_ps(x, g_XMNegativeZero); - __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 + __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 __m128 absx = _mm_andnot_ps(sign, x); // |x| __m128 rflx = _mm_sub_ps(c, x); __m128 comp = _mm_cmple_ps(absx, g_XMHalfPi); @@ -5197,17 +4710,12 @@ inline XMVECTOR XM_CALLCONV XMVectorSinEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorCosEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorCosEst(FXMVECTOR V) noexcept { // 6-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - cosf(V.vector4_f32[0]), - cosf(V.vector4_f32[1]), - cosf(V.vector4_f32[2]), - cosf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{cosf(V.vector4_f32[0]), cosf(V.vector4_f32[1]), + cosf(V.vector4_f32[2]), cosf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) // Map V to x in [-pi,pi]. @@ -5244,7 +4752,7 @@ inline XMVECTOR XM_CALLCONV XMVectorCosEst(FXMVECTOR V) noexcept // Map in [-pi/2,pi/2] with cos(y) = sign*cos(x). XMVECTOR sign = _mm_and_ps(x, g_XMNegativeZero); - __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 + __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 __m128 absx = _mm_andnot_ps(sign, x); // |x| __m128 rflx = _mm_sub_ps(c, x); __m128 comp = _mm_cmple_ps(absx, g_XMHalfPi); @@ -5273,33 +4781,19 @@ inline XMVECTOR XM_CALLCONV XMVectorCosEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMVectorSinCosEst -( - XMVECTOR* pSin, - XMVECTOR* pCos, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVectorSinCosEst(XMVECTOR* pSin, XMVECTOR* pCos, FXMVECTOR V) noexcept { assert(pSin != nullptr); assert(pCos != nullptr); // 7/6-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Sin = { { { - sinf(V.vector4_f32[0]), - sinf(V.vector4_f32[1]), - sinf(V.vector4_f32[2]), - sinf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Sin = {{{sinf(V.vector4_f32[0]), sinf(V.vector4_f32[1]), + sinf(V.vector4_f32[2]), sinf(V.vector4_f32[3])}}}; - XMVECTORF32 Cos = { { { - cosf(V.vector4_f32[0]), - cosf(V.vector4_f32[1]), - cosf(V.vector4_f32[2]), - cosf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Cos = {{{cosf(V.vector4_f32[0]), cosf(V.vector4_f32[1]), + cosf(V.vector4_f32[2]), cosf(V.vector4_f32[3])}}}; *pSin = Sin.v; *pCos = Cos.v; @@ -5345,7 +4839,7 @@ inline void XM_CALLCONV XMVectorSinCosEst // Map in [-pi/2,pi/2] with sin(y) = sin(x), cos(y) = sign*cos(x). XMVECTOR sign = _mm_and_ps(x, g_XMNegativeZero); - __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 + __m128 c = _mm_or_ps(g_XMPi, sign); // pi when x >= 0, -pi when x < 0 __m128 absx = _mm_andnot_ps(sign, x); // |x| __m128 rflx = _mm_sub_ps(c, x); __m128 comp = _mm_cmple_ps(absx, g_XMHalfPi); @@ -5386,15 +4880,10 @@ inline void XM_CALLCONV XMVectorSinCosEst //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorTanEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorTanEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - tanf(V.vector4_f32[0]), - tanf(V.vector4_f32[1]), - tanf(V.vector4_f32[2]), - tanf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{tanf(V.vector4_f32[0]), tanf(V.vector4_f32[1]), + tanf(V.vector4_f32[2]), tanf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_SVML_INTRINSICS_) XMVECTOR Result = _mm_tan_ps(V); @@ -5427,8 +4916,7 @@ inline XMVECTOR XM_CALLCONV XMVectorTanEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorASinEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorASinEst(FXMVECTOR V) noexcept { // 3-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) @@ -5500,17 +4988,12 @@ inline XMVECTOR XM_CALLCONV XMVectorASinEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorACosEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorACosEst(FXMVECTOR V) noexcept { // 3-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - acosf(V.vector4_f32[0]), - acosf(V.vector4_f32[1]), - acosf(V.vector4_f32[2]), - acosf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{acosf(V.vector4_f32[0]), acosf(V.vector4_f32[1]), + acosf(V.vector4_f32[2]), acosf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t nonnegative = vcgeq_f32(V, g_XMZero); @@ -5572,17 +5055,12 @@ inline XMVECTOR XM_CALLCONV XMVectorACosEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorATanEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorATanEst(FXMVECTOR V) noexcept { // 9-degree minimax approximation #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - atanf(V.vector4_f32[0]), - atanf(V.vector4_f32[1]), - atanf(V.vector4_f32[2]), - atanf(V.vector4_f32[3]) - } } }; + XMVECTORF32 Result = {{{atanf(V.vector4_f32[0]), atanf(V.vector4_f32[1]), + atanf(V.vector4_f32[2]), atanf(V.vector4_f32[3])}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t absV = vabsq_f32(V); @@ -5663,26 +5141,23 @@ inline XMVECTOR XM_CALLCONV XMVectorATanEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorATan2Est -( - FXMVECTOR Y, - FXMVECTOR X -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorATan2Est(FXMVECTOR Y, + FXMVECTOR X) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - atan2f(Y.vector4_f32[0], X.vector4_f32[0]), - atan2f(Y.vector4_f32[1], X.vector4_f32[1]), - atan2f(Y.vector4_f32[2], X.vector4_f32[2]), - atan2f(Y.vector4_f32[3], X.vector4_f32[3]), - } } }; + XMVECTORF32 Result = {{{ + atan2f(Y.vector4_f32[0], X.vector4_f32[0]), + atan2f(Y.vector4_f32[1], X.vector4_f32[1]), + atan2f(Y.vector4_f32[2], X.vector4_f32[2]), + atan2f(Y.vector4_f32[3], X.vector4_f32[3]), + }}}; return Result.v; #elif defined(_XM_SVML_INTRINSICS_) XMVECTOR Result = _mm_atan2_ps(Y, X); return Result; #else - static const XMVECTORF32 ATan2Constants = { { { XM_PI, XM_PIDIV2, XM_PIDIV4, 2.3561944905f /* Pi*3/4 */ } } }; + static const XMVECTORF32 ATan2Constants = { + {{XM_PI, XM_PIDIV2, XM_PIDIV4, 2.3561944905f /* Pi*3/4 */}}}; const XMVECTOR Zero = XMVectorZero(); XMVECTOR ATanResultValid = XMVectorTrueInt(); @@ -5729,13 +5204,8 @@ inline XMVECTOR XM_CALLCONV XMVectorATan2Est //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLerp -( - FXMVECTOR V0, - FXMVECTOR V1, - float t -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLerp(FXMVECTOR V0, FXMVECTOR V1, + float t) noexcept { // V0 + t * (V1 - V0) #if defined(_XM_NO_INTRINSICS_) @@ -5756,13 +5226,8 @@ inline XMVECTOR XM_CALLCONV XMVectorLerp //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorLerpV -( - FXMVECTOR V0, - FXMVECTOR V1, - FXMVECTOR T -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorLerpV(FXMVECTOR V0, FXMVECTOR V1, + FXMVECTOR T) noexcept { // V0 + T * (V1 - V0) #if defined(_XM_NO_INTRINSICS_) @@ -5781,15 +5246,11 @@ inline XMVECTOR XM_CALLCONV XMVectorLerpV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorHermite -( - FXMVECTOR Position0, - FXMVECTOR Tangent0, - FXMVECTOR Position1, - GXMVECTOR Tangent1, - float t -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorHermite(FXMVECTOR Position0, + FXMVECTOR Tangent0, + FXMVECTOR Position1, + GXMVECTOR Tangent1, + float t) noexcept { // Result = (2 * t^3 - 3 * t^2 + 1) * Position0 + // (t^3 - 2 * t^2 + t) * Tangent0 + // (-2 * t^3 + 3 * t^2) * Position1 + @@ -5845,15 +5306,11 @@ inline XMVECTOR XM_CALLCONV XMVectorHermite //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorHermiteV -( - FXMVECTOR Position0, - FXMVECTOR Tangent0, - FXMVECTOR Position1, - GXMVECTOR Tangent1, - HXMVECTOR T -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorHermiteV(FXMVECTOR Position0, + FXMVECTOR Tangent0, + FXMVECTOR Position1, + GXMVECTOR Tangent1, + HXMVECTOR T) noexcept { // Result = (2 * t^3 - 3 * t^2 + 1) * Position0 + // (t^3 - 2 * t^2 + t) * Tangent0 + // (-2 * t^3 + 3 * t^2) * Position1 + @@ -5864,9 +5321,12 @@ inline XMVECTOR XM_CALLCONV XMVectorHermiteV XMVECTOR T2 = XMVectorMultiply(T, T); XMVECTOR T3 = XMVectorMultiply(T, T2); - XMVECTOR P0 = XMVectorReplicate(2.0f * T3.vector4_f32[0] - 3.0f * T2.vector4_f32[0] + 1.0f); - XMVECTOR T0 = XMVectorReplicate(T3.vector4_f32[1] - 2.0f * T2.vector4_f32[1] + T.vector4_f32[1]); - XMVECTOR P1 = XMVectorReplicate(-2.0f * T3.vector4_f32[2] + 3.0f * T2.vector4_f32[2]); + XMVECTOR P0 = XMVectorReplicate(2.0f * T3.vector4_f32[0] - + 3.0f * T2.vector4_f32[0] + 1.0f); + XMVECTOR T0 = XMVectorReplicate( + T3.vector4_f32[1] - 2.0f * T2.vector4_f32[1] + T.vector4_f32[1]); + XMVECTOR P1 = + XMVectorReplicate(-2.0f * T3.vector4_f32[2] + 3.0f * T2.vector4_f32[2]); XMVECTOR T1 = XMVectorReplicate(T3.vector4_f32[3] - T2.vector4_f32[3]); XMVECTOR Result = XMVectorMultiply(P0, Position0); @@ -5877,8 +5337,8 @@ inline XMVECTOR XM_CALLCONV XMVectorHermiteV return Result; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 CatMulT2 = { { { -3.0f, -2.0f, 3.0f, -1.0f } } }; - static const XMVECTORF32 CatMulT3 = { { { 2.0f, 1.0f, -2.0f, 1.0f } } }; + static const XMVECTORF32 CatMulT2 = {{{-3.0f, -2.0f, 3.0f, -1.0f}}}; + static const XMVECTORF32 CatMulT3 = {{{2.0f, 1.0f, -2.0f, 1.0f}}}; XMVECTOR T2 = vmulq_f32(T, T); XMVECTOR T3 = vmulq_f32(T, T2); @@ -5894,17 +5354,18 @@ inline XMVECTOR XM_CALLCONV XMVectorHermiteV T3 = vaddq_f32(T3, g_XMIdentityR0); // Now, I have the constants created // Mul the x constant to Position0 - XMVECTOR vResult = vmulq_lane_f32(Position0, vget_low_f32(T3), 0); // T3[0] + XMVECTOR vResult = vmulq_lane_f32(Position0, vget_low_f32(T3), 0); // T3[0] // Mul the y constant to Tangent0 - vResult = vmlaq_lane_f32(vResult, Tangent0, vget_low_f32(T3), 1); // T3[1] + vResult = vmlaq_lane_f32(vResult, Tangent0, vget_low_f32(T3), 1); // T3[1] // Mul the z constant to Position1 - vResult = vmlaq_lane_f32(vResult, Position1, vget_high_f32(T3), 0); // T3[2] + vResult = + vmlaq_lane_f32(vResult, Position1, vget_high_f32(T3), 0); // T3[2] // Mul the w constant to Tangent1 - vResult = vmlaq_lane_f32(vResult, Tangent1, vget_high_f32(T3), 1); // T3[3] + vResult = vmlaq_lane_f32(vResult, Tangent1, vget_high_f32(T3), 1); // T3[3] return vResult; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 CatMulT2 = { { { -3.0f, -2.0f, 3.0f, -1.0f } } }; - static const XMVECTORF32 CatMulT3 = { { { 2.0f, 1.0f, -2.0f, 1.0f } } }; + static const XMVECTORF32 CatMulT2 = {{{-3.0f, -2.0f, 3.0f, -1.0f}}}; + static const XMVECTORF32 CatMulT3 = {{{2.0f, 1.0f, -2.0f, 1.0f}}}; XMVECTOR T2 = _mm_mul_ps(T, T); XMVECTOR T3 = _mm_mul_ps(T, T2); @@ -5937,15 +5398,11 @@ inline XMVECTOR XM_CALLCONV XMVectorHermiteV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorCatmullRom -( - FXMVECTOR Position0, - FXMVECTOR Position1, - FXMVECTOR Position2, - GXMVECTOR Position3, - float t -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorCatmullRom(FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, + GXMVECTOR Position3, + float t) noexcept { // Result = ((-t^3 + 2 * t^2 - t) * Position0 + // (3 * t^3 - 5 * t^2 + 2) * Position1 + // (-3 * t^3 + 4 * t^2 + t) * Position2 + @@ -6003,47 +5460,50 @@ inline XMVECTOR XM_CALLCONV XMVectorCatmullRom //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorCatmullRomV -( - FXMVECTOR Position0, - FXMVECTOR Position1, - FXMVECTOR Position2, - GXMVECTOR Position3, - HXMVECTOR T -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVectorCatmullRomV(FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, + GXMVECTOR Position3, + HXMVECTOR T) noexcept { #if defined(_XM_NO_INTRINSICS_) float fx = T.vector4_f32[0]; float fy = T.vector4_f32[1]; float fz = T.vector4_f32[2]; float fw = T.vector4_f32[3]; - XMVECTORF32 vResult = { { { - 0.5f * ((-fx * fx * fx + 2 * fx * fx - fx) * Position0.vector4_f32[0] - + (3 * fx * fx * fx - 5 * fx * fx + 2) * Position1.vector4_f32[0] - + (-3 * fx * fx * fx + 4 * fx * fx + fx) * Position2.vector4_f32[0] - + (fx * fx * fx - fx * fx) * Position3.vector4_f32[0]), + XMVECTORF32 vResult = { + {{0.5f * + ((-fx * fx * fx + 2 * fx * fx - fx) * Position0.vector4_f32[0] + + (3 * fx * fx * fx - 5 * fx * fx + 2) * Position1.vector4_f32[0] + + (-3 * fx * fx * fx + 4 * fx * fx + fx) * + Position2.vector4_f32[0] + + (fx * fx * fx - fx * fx) * Position3.vector4_f32[0]), - 0.5f * ((-fy * fy * fy + 2 * fy * fy - fy) * Position0.vector4_f32[1] - + (3 * fy * fy * fy - 5 * fy * fy + 2) * Position1.vector4_f32[1] - + (-3 * fy * fy * fy + 4 * fy * fy + fy) * Position2.vector4_f32[1] - + (fy * fy * fy - fy * fy) * Position3.vector4_f32[1]), + 0.5f * + ((-fy * fy * fy + 2 * fy * fy - fy) * Position0.vector4_f32[1] + + (3 * fy * fy * fy - 5 * fy * fy + 2) * Position1.vector4_f32[1] + + (-3 * fy * fy * fy + 4 * fy * fy + fy) * + Position2.vector4_f32[1] + + (fy * fy * fy - fy * fy) * Position3.vector4_f32[1]), - 0.5f * ((-fz * fz * fz + 2 * fz * fz - fz) * Position0.vector4_f32[2] - + (3 * fz * fz * fz - 5 * fz * fz + 2) * Position1.vector4_f32[2] - + (-3 * fz * fz * fz + 4 * fz * fz + fz) * Position2.vector4_f32[2] - + (fz * fz * fz - fz * fz) * Position3.vector4_f32[2]), + 0.5f * + ((-fz * fz * fz + 2 * fz * fz - fz) * Position0.vector4_f32[2] + + (3 * fz * fz * fz - 5 * fz * fz + 2) * Position1.vector4_f32[2] + + (-3 * fz * fz * fz + 4 * fz * fz + fz) * + Position2.vector4_f32[2] + + (fz * fz * fz - fz * fz) * Position3.vector4_f32[2]), - 0.5f * ((-fw * fw * fw + 2 * fw * fw - fw) * Position0.vector4_f32[3] - + (3 * fw * fw * fw - 5 * fw * fw + 2) * Position1.vector4_f32[3] - + (-3 * fw * fw * fw + 4 * fw * fw + fw) * Position2.vector4_f32[3] - + (fw * fw * fw - fw * fw) * Position3.vector4_f32[3]) - } } }; + 0.5f * + ((-fw * fw * fw + 2 * fw * fw - fw) * Position0.vector4_f32[3] + + (3 * fw * fw * fw - 5 * fw * fw + 2) * Position1.vector4_f32[3] + + (-3 * fw * fw * fw + 4 * fw * fw + fw) * + Position2.vector4_f32[3] + + (fw * fw * fw - fw * fw) * Position3.vector4_f32[3])}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Catmul2 = { { { 2.0f, 2.0f, 2.0f, 2.0f } } }; - static const XMVECTORF32 Catmul3 = { { { 3.0f, 3.0f, 3.0f, 3.0f } } }; - static const XMVECTORF32 Catmul4 = { { { 4.0f, 4.0f, 4.0f, 4.0f } } }; - static const XMVECTORF32 Catmul5 = { { { 5.0f, 5.0f, 5.0f, 5.0f } } }; + static const XMVECTORF32 Catmul2 = {{{2.0f, 2.0f, 2.0f, 2.0f}}}; + static const XMVECTORF32 Catmul3 = {{{3.0f, 3.0f, 3.0f, 3.0f}}}; + static const XMVECTORF32 Catmul4 = {{{4.0f, 4.0f, 4.0f, 4.0f}}}; + static const XMVECTORF32 Catmul5 = {{{5.0f, 5.0f, 5.0f, 5.0f}}}; // Cache T^2 and T^3 XMVECTOR T2 = vmulq_f32(T, T); XMVECTOR T3 = vmulq_f32(T, T2); @@ -6069,10 +5529,10 @@ inline XMVECTOR XM_CALLCONV XMVectorCatmullRomV vResult = vmulq_f32(vResult, g_XMOneHalf); return vResult; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Catmul2 = { { { 2.0f, 2.0f, 2.0f, 2.0f } } }; - static const XMVECTORF32 Catmul3 = { { { 3.0f, 3.0f, 3.0f, 3.0f } } }; - static const XMVECTORF32 Catmul4 = { { { 4.0f, 4.0f, 4.0f, 4.0f } } }; - static const XMVECTORF32 Catmul5 = { { { 5.0f, 5.0f, 5.0f, 5.0f } } }; + static const XMVECTORF32 Catmul2 = {{{2.0f, 2.0f, 2.0f, 2.0f}}}; + static const XMVECTORF32 Catmul3 = {{{3.0f, 3.0f, 3.0f, 3.0f}}}; + static const XMVECTORF32 Catmul4 = {{{4.0f, 4.0f, 4.0f, 4.0f}}}; + static const XMVECTORF32 Catmul5 = {{{5.0f, 5.0f, 5.0f, 5.0f}}}; // Cache T^2 and T^3 XMVECTOR T2 = _mm_mul_ps(T, T); XMVECTOR T3 = _mm_mul_ps(T, T2); @@ -6102,16 +5562,12 @@ inline XMVECTOR XM_CALLCONV XMVectorCatmullRomV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorBaryCentric -( - FXMVECTOR Position0, - FXMVECTOR Position1, - FXMVECTOR Position2, - float f, - float g -) noexcept -{ - // Result = Position0 + f * (Position1 - Position0) + g * (Position2 - Position0) +inline XMVECTOR XM_CALLCONV XMVectorBaryCentric(FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, float f, + float g) noexcept { + // Result = Position0 + f * (Position1 - Position0) + g * (Position2 - + // Position0) #if defined(_XM_NO_INTRINSICS_) @@ -6143,16 +5599,13 @@ inline XMVECTOR XM_CALLCONV XMVectorBaryCentric //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVectorBaryCentricV -( - FXMVECTOR Position0, - FXMVECTOR Position1, - FXMVECTOR Position2, - GXMVECTOR F, - HXMVECTOR G -) noexcept -{ - // Result = Position0 + f * (Position1 - Position0) + g * (Position2 - Position0) +inline XMVECTOR XM_CALLCONV XMVectorBaryCentricV(FXMVECTOR Position0, + FXMVECTOR Position1, + FXMVECTOR Position2, + GXMVECTOR F, + HXMVECTOR G) noexcept { + // Result = Position0 + f * (Position1 - Position0) + g * (Position2 - + // Position0) #if defined(_XM_NO_INTRINSICS_) @@ -6189,17 +5642,14 @@ inline XMVECTOR XM_CALLCONV XMVectorBaryCentricV //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2Equal -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2Equal(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1])) != 0); + return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && + (V1.vector4_f32[1] == V2.vector4_f32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vTemp = vceq_f32(vget_low_f32(V1), vget_low_f32(V2)); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); // z and w are don't care @@ -6207,26 +5657,18 @@ inline bool XM_CALLCONV XMVector2Equal #endif } - //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector2EqualR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector2EqualR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_f32[0] == V2.vector4_f32[0]) && - (V1.vector4_f32[1] == V2.vector4_f32[1])) - { + (V1.vector4_f32[1] == V2.vector4_f32[1])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && - (V1.vector4_f32[1] != V2.vector4_f32[1])) - { + } else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && + (V1.vector4_f32[1] != V2.vector4_f32[1])) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6235,12 +5677,9 @@ inline uint32_t XM_CALLCONV XMVector2EqualR uint32x2_t vTemp = vceq_f32(vget_low_f32(V1), vget_low_f32(V2)); uint64_t r = vget_lane_u64(vreinterpret_u64_u32(vTemp), 0); uint32_t CR = 0; - if (r == 0xFFFFFFFFFFFFFFFFU) - { + if (r == 0xFFFFFFFFFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6249,12 +5688,9 @@ inline uint32_t XM_CALLCONV XMVector2EqualR // z and w are don't care int iTest = _mm_movemask_ps(vTemp) & 3; uint32_t CR = 0; - if (iTest == 3) - { + if (iTest == 3) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6263,17 +5699,15 @@ inline uint32_t XM_CALLCONV XMVector2EqualR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2EqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2EqualInt(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && (V1.vector4_u32[1] == V2.vector4_u32[1])) != 0); + return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && + (V1.vector4_u32[1] == V2.vector4_u32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t vTemp = vceq_u32(vget_low_u32(vreinterpretq_u32_f32(V1)), vget_low_u32(vreinterpretq_u32_f32(V2))); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == 0xFFFFFFFFFFFFFFFFU); + uint32x2_t vTemp = vceq_u32(vget_low_u32(vreinterpretq_u32_f32(V1)), + vget_low_u32(vreinterpretq_u32_f32(V2))); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); return (((_mm_movemask_ps(_mm_castsi128_ps(vTemp)) & 3) == 3) != 0); @@ -6282,37 +5716,28 @@ inline bool XM_CALLCONV XMVector2EqualInt //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector2EqualIntR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector2EqualIntR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_u32[0] == V2.vector4_u32[0]) && - (V1.vector4_u32[1] == V2.vector4_u32[1])) - { + (V1.vector4_u32[1] == V2.vector4_u32[1])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_u32[0] != V2.vector4_u32[0]) && - (V1.vector4_u32[1] != V2.vector4_u32[1])) - { + } else if ((V1.vector4_u32[0] != V2.vector4_u32[0]) && + (V1.vector4_u32[1] != V2.vector4_u32[1])) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t vTemp = vceq_u32(vget_low_u32(vreinterpretq_u32_f32(V1)), vget_low_u32(vreinterpretq_u32_f32(V2))); + uint32x2_t vTemp = vceq_u32(vget_low_u32(vreinterpretq_u32_f32(V1)), + vget_low_u32(vreinterpretq_u32_f32(V2))); uint64_t r = vget_lane_u64(vreinterpret_u64_u32(vTemp), 0); uint32_t CR = 0; - if (r == 0xFFFFFFFFFFFFFFFFU) - { + if (r == 0xFFFFFFFFFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6320,12 +5745,9 @@ inline uint32_t XM_CALLCONV XMVector2EqualIntR __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); int iTest = _mm_movemask_ps(_mm_castsi128_ps(vTemp)) & 3; uint32_t CR = 0; - if (iTest == 3) - { + if (iTest == 3) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6334,21 +5756,16 @@ inline uint32_t XM_CALLCONV XMVector2EqualIntR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2NearEqual -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR Epsilon -) noexcept -{ +inline bool XM_CALLCONV XMVector2NearEqual(FXMVECTOR V1, FXMVECTOR V2, + FXMVECTOR Epsilon) noexcept { #if defined(_XM_NO_INTRINSICS_) float dx = fabsf(V1.vector4_f32[0] - V2.vector4_f32[0]); float dy = fabsf(V1.vector4_f32[1] - V2.vector4_f32[1]); - return ((dx <= Epsilon.vector4_f32[0]) && - (dy <= Epsilon.vector4_f32[1])); + return ((dx <= Epsilon.vector4_f32[0]) && (dy <= Epsilon.vector4_f32[1])); #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t vDelta = vsub_f32(vget_low_f32(V1), vget_low_f32(V2)); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) uint32x2_t vTemp = vacle_f32(vDelta, vget_low_u32(Epsilon)); #else uint32x2_t vTemp = vcle_f32(vabs_f32(vDelta), vget_low_f32(Epsilon)); @@ -6370,17 +5787,14 @@ inline bool XM_CALLCONV XMVector2NearEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2NotEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2NotEqual(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || (V1.vector4_f32[1] != V2.vector4_f32[1])) != 0); + return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || + (V1.vector4_f32[1] != V2.vector4_f32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vTemp = vceq_f32(vget_low_f32(V1), vget_low_f32(V2)); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) != 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) != + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); // z and w are don't care @@ -6390,17 +5804,16 @@ inline bool XM_CALLCONV XMVector2NotEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2NotEqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2NotEqualInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || (V1.vector4_u32[1] != V2.vector4_u32[1])) != 0); + return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || + (V1.vector4_u32[1] != V2.vector4_u32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t vTemp = vceq_u32(vget_low_u32(vreinterpretq_u32_f32(V1)), vget_low_u32(vreinterpretq_u32_f32(V2))); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) != 0xFFFFFFFFFFFFFFFFU); + uint32x2_t vTemp = vceq_u32(vget_low_u32(vreinterpretq_u32_f32(V1)), + vget_low_u32(vreinterpretq_u32_f32(V2))); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) != + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); return (((_mm_movemask_ps(_mm_castsi128_ps(vTemp)) & 3) != 3) != 0); @@ -6409,17 +5822,14 @@ inline bool XM_CALLCONV XMVector2NotEqualInt //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2Greater -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2Greater(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && (V1.vector4_f32[1] > V2.vector4_f32[1])) != 0); + return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && + (V1.vector4_f32[1] > V2.vector4_f32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vTemp = vcgt_f32(vget_low_f32(V1), vget_low_f32(V2)); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpgt_ps(V1, V2); // z and w are don't care @@ -6429,23 +5839,16 @@ inline bool XM_CALLCONV XMVector2Greater //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector2GreaterR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector2GreaterR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_f32[0] > V2.vector4_f32[0]) && - (V1.vector4_f32[1] > V2.vector4_f32[1])) - { + (V1.vector4_f32[1] > V2.vector4_f32[1])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] <= V2.vector4_f32[0]) && - (V1.vector4_f32[1] <= V2.vector4_f32[1])) - { + } else if ((V1.vector4_f32[0] <= V2.vector4_f32[0]) && + (V1.vector4_f32[1] <= V2.vector4_f32[1])) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6454,12 +5857,9 @@ inline uint32_t XM_CALLCONV XMVector2GreaterR uint32x2_t vTemp = vcgt_f32(vget_low_f32(V1), vget_low_f32(V2)); uint64_t r = vget_lane_u64(vreinterpret_u64_u32(vTemp), 0); uint32_t CR = 0; - if (r == 0xFFFFFFFFFFFFFFFFU) - { + if (r == 0xFFFFFFFFFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6467,12 +5867,9 @@ inline uint32_t XM_CALLCONV XMVector2GreaterR XMVECTOR vTemp = _mm_cmpgt_ps(V1, V2); int iTest = _mm_movemask_ps(vTemp) & 3; uint32_t CR = 0; - if (iTest == 3) - { + if (iTest == 3) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6481,17 +5878,15 @@ inline uint32_t XM_CALLCONV XMVector2GreaterR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2GreaterOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2GreaterOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1])) != 0); + return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && + (V1.vector4_f32[1] >= V2.vector4_f32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vTemp = vcge_f32(vget_low_f32(V1), vget_low_f32(V2)); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpge_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 3) == 3) != 0); @@ -6500,23 +5895,16 @@ inline bool XM_CALLCONV XMVector2GreaterOrEqual //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector2GreaterOrEqualR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector2GreaterOrEqualR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_f32[0] >= V2.vector4_f32[0]) && - (V1.vector4_f32[1] >= V2.vector4_f32[1])) - { + (V1.vector4_f32[1] >= V2.vector4_f32[1])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && - (V1.vector4_f32[1] < V2.vector4_f32[1])) - { + } else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1])) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6525,12 +5913,9 @@ inline uint32_t XM_CALLCONV XMVector2GreaterOrEqualR uint32x2_t vTemp = vcge_f32(vget_low_f32(V1), vget_low_f32(V2)); uint64_t r = vget_lane_u64(vreinterpret_u64_u32(vTemp), 0); uint32_t CR = 0; - if (r == 0xFFFFFFFFFFFFFFFFU) - { + if (r == 0xFFFFFFFFFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6538,12 +5923,9 @@ inline uint32_t XM_CALLCONV XMVector2GreaterOrEqualR XMVECTOR vTemp = _mm_cmpge_ps(V1, V2); int iTest = _mm_movemask_ps(vTemp) & 3; uint32_t CR = 0; - if (iTest == 3) - { + if (iTest == 3) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -6552,17 +5934,14 @@ inline uint32_t XM_CALLCONV XMVector2GreaterOrEqualR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2Less -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2Less(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && (V1.vector4_f32[1] < V2.vector4_f32[1])) != 0); + return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vTemp = vclt_f32(vget_low_f32(V1), vget_low_f32(V2)); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmplt_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 3) == 3) != 0); @@ -6571,17 +5950,15 @@ inline bool XM_CALLCONV XMVector2Less //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2LessOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector2LessOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && (V1.vector4_f32[1] <= V2.vector4_f32[1])) != 0); + return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && + (V1.vector4_f32[1] <= V2.vector4_f32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vTemp = vcle_f32(vget_low_f32(V1), vget_low_f32(V2)); - return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(vTemp), 0) == + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmple_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 3) == 3) != 0); @@ -6590,15 +5967,13 @@ inline bool XM_CALLCONV XMVector2LessOrEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2InBounds -( - FXMVECTOR V, - FXMVECTOR Bounds -) noexcept -{ +inline bool XM_CALLCONV XMVector2InBounds(FXMVECTOR V, + FXMVECTOR Bounds) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && - (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1])) != 0); + return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && + V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && + V.vector4_f32[1] >= -Bounds.vector4_f32[1])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); float32x2_t B = vget_low_f32(Bounds); @@ -6611,7 +5986,8 @@ inline bool XM_CALLCONV XMVector2InBounds // Blend answers ivTemp1 = vand_u32(ivTemp1, ivTemp2); // x and y in bounds? - return (vget_lane_u64(vreinterpret_u64_u32(ivTemp1), 0) == 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(ivTemp1), 0) == + 0xFFFFFFFFFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) // Test if less than or equal XMVECTOR vTemp1 = _mm_cmple_ps(V, Bounds); @@ -6628,16 +6004,15 @@ inline bool XM_CALLCONV XMVector2InBounds //------------------------------------------------------------------------------ -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(push) #pragma float_control(precise, on) #endif -inline bool XM_CALLCONV XMVector2IsNaN(FXMVECTOR V) noexcept -{ +inline bool XM_CALLCONV XMVector2IsNaN(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (XMISNAN(V.vector4_f32[0]) || - XMISNAN(V.vector4_f32[1])); + return (XMISNAN(V.vector4_f32[0]) || XMISNAN(V.vector4_f32[1])); #elif defined(_XM_ARM_NEON_INTRINSICS_) #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) return isnan(vgetq_lane_f32(V, 0)) || isnan(vgetq_lane_f32(V, 1)); @@ -6646,7 +6021,8 @@ inline bool XM_CALLCONV XMVector2IsNaN(FXMVECTOR V) noexcept // Test against itself. NaN is always not equal uint32x2_t vTempNan = vceq_f32(VL, VL); // If x or y are NaN, the mask is zero - return (vget_lane_u64(vreinterpret_u64_u32(vTempNan), 0) != 0xFFFFFFFFFFFFFFFFU); + return (vget_lane_u64(vreinterpret_u64_u32(vTempNan), 0) != + 0xFFFFFFFFFFFFFFFFU); #endif #elif defined(_XM_SSE_INTRINSICS_) #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) @@ -6654,7 +6030,7 @@ inline bool XM_CALLCONV XMVector2IsNaN(FXMVECTOR V) noexcept _mm_store_ps(tmp, V); return isnan(tmp[0]) || isnan(tmp[1]); #else -// Test against itself. NaN is always not equal + // Test against itself. NaN is always not equal XMVECTOR vTempNan = _mm_cmpneq_ps(V, V); // If x or y are NaN, the mask is non-zero return ((_mm_movemask_ps(vTempNan) & 3) != 0); @@ -6662,21 +6038,21 @@ inline bool XM_CALLCONV XMVector2IsNaN(FXMVECTOR V) noexcept #endif } -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(pop) #endif //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector2IsInfinite(FXMVECTOR V) noexcept -{ +inline bool XM_CALLCONV XMVector2IsInfinite(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (XMISINF(V.vector4_f32[0]) || - XMISINF(V.vector4_f32[1])); + return (XMISINF(V.vector4_f32[0]) || XMISINF(V.vector4_f32[1])); #elif defined(_XM_ARM_NEON_INTRINSICS_) // Mask off the sign bit - uint32x2_t vTemp = vand_u32(vget_low_u32(vreinterpretq_u32_f32(V)), vget_low_u32(g_XMAbsMask)); + uint32x2_t vTemp = vand_u32(vget_low_u32(vreinterpretq_u32_f32(V)), + vget_low_u32(g_XMAbsMask)); // Compare to infinity vTemp = vceq_f32(vreinterpret_f32_u32(vTemp), vget_low_f32(g_XMInfinity)); // If any are infinity, the signs are true. @@ -6697,19 +6073,13 @@ inline bool XM_CALLCONV XMVector2IsInfinite(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Dot -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Dot(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 Result; - Result.f[0] = - Result.f[1] = - Result.f[2] = - Result.f[3] = V1.vector4_f32[0] * V2.vector4_f32[0] + V1.vector4_f32[1] * V2.vector4_f32[1]; + Result.f[0] = Result.f[1] = Result.f[2] = Result.f[3] = + V1.vector4_f32[0] * V2.vector4_f32[0] + + V1.vector4_f32[1] * V2.vector4_f32[1]; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -6738,26 +6108,21 @@ inline XMVECTOR XM_CALLCONV XMVector2Dot //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Cross -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Cross(FXMVECTOR V1, + FXMVECTOR V2) noexcept { // [ V1.x*V2.y - V1.y*V2.x, V1.x*V2.y - V1.y*V2.x ] #if defined(_XM_NO_INTRINSICS_) - float fCross = (V1.vector4_f32[0] * V2.vector4_f32[1]) - (V1.vector4_f32[1] * V2.vector4_f32[0]); + float fCross = (V1.vector4_f32[0] * V2.vector4_f32[1]) - + (V1.vector4_f32[1] * V2.vector4_f32[0]); XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = fCross; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = fCross; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Negate = { { { 1.f, -1.f, 0, 0 } } }; + static const XMVECTORF32 Negate = {{{1.f, -1.f, 0, 0}}}; - float32x2_t vTemp = vmul_f32(vget_low_f32(V1), vrev64_f32(vget_low_f32(V2))); + float32x2_t vTemp = + vmul_f32(vget_low_f32(V1), vrev64_f32(vget_low_f32(V2))); vTemp = vmul_f32(vTemp, vget_low_f32(Negate)); vTemp = vpadd_f32(vTemp, vTemp); return vcombine_f32(vTemp, vTemp); @@ -6778,15 +6143,13 @@ inline XMVECTOR XM_CALLCONV XMVector2Cross //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2LengthSq(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2LengthSq(FXMVECTOR V) noexcept { return XMVector2Dot(V, V); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2ReciprocalLengthEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2ReciprocalLengthEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -6826,8 +6189,7 @@ inline XMVECTOR XM_CALLCONV XMVector2ReciprocalLengthEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2ReciprocalLength(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2ReciprocalLength(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -6841,12 +6203,12 @@ inline XMVECTOR XM_CALLCONV XMVector2ReciprocalLength(FXMVECTOR V) noexcept float32x2_t vTemp = vmul_f32(VL, VL); vTemp = vpadd_f32(vTemp, vTemp); // Reciprocal sqrt - float32x2_t S0 = vrsqrte_f32(vTemp); - float32x2_t P0 = vmul_f32(vTemp, S0); - float32x2_t R0 = vrsqrts_f32(P0, S0); - float32x2_t S1 = vmul_f32(S0, R0); - float32x2_t P1 = vmul_f32(vTemp, S1); - float32x2_t R1 = vrsqrts_f32(P1, S1); + float32x2_t S0 = vrsqrte_f32(vTemp); + float32x2_t P0 = vmul_f32(vTemp, S0); + float32x2_t R0 = vrsqrts_f32(P0, S0); + float32x2_t S1 = vmul_f32(S0, R0); + float32x2_t P1 = vmul_f32(vTemp, S1); + float32x2_t R1 = vrsqrts_f32(P1, S1); float32x2_t Result = vmul_f32(S1, R1); return vcombine_f32(Result, Result); #elif defined(_XM_SSE4_INTRINSICS_) @@ -6876,8 +6238,7 @@ inline XMVECTOR XM_CALLCONV XMVector2ReciprocalLength(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2LengthEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2LengthEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -6921,8 +6282,7 @@ inline XMVECTOR XM_CALLCONV XMVector2LengthEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Length(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Length(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -6974,8 +6334,7 @@ inline XMVECTOR XM_CALLCONV XMVector2Length(FXMVECTOR V) noexcept // XMVector2NormalizeEst uses a reciprocal estimate and // returns QNaN on zero and infinite vectors. -inline XMVECTOR XM_CALLCONV XMVector2NormalizeEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2NormalizeEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -7020,16 +6379,14 @@ inline XMVECTOR XM_CALLCONV XMVector2NormalizeEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Normalize(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Normalize(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR vResult = XMVector2Length(V); float fLength = vResult.vector4_f32[0]; // Prevent divide by zero - if (fLength > 0) - { + if (fLength > 0) { fLength = 1.0f / fLength; } @@ -7131,13 +6488,8 @@ inline XMVECTOR XM_CALLCONV XMVector2Normalize(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2ClampLength -( - FXMVECTOR V, - float LengthMin, - float LengthMax -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2ClampLength(FXMVECTOR V, float LengthMin, + float LengthMax) noexcept { XMVECTOR ClampMax = XMVectorReplicate(LengthMax); XMVECTOR ClampMin = XMVectorReplicate(LengthMin); return XMVector2ClampLengthV(V, ClampMin, ClampMax); @@ -7145,13 +6497,8 @@ inline XMVECTOR XM_CALLCONV XMVector2ClampLength //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2ClampLengthV -( - FXMVECTOR V, - FXMVECTOR LengthMin, - FXMVECTOR LengthMax -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2ClampLengthV( + FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax) noexcept { assert((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin))); assert((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax))); assert(XMVector2GreaterOrEqual(LengthMin, g_XMZero)); @@ -7183,7 +6530,8 @@ inline XMVECTOR XM_CALLCONV XMVector2ClampLengthV XMVECTOR Result = XMVectorMultiply(Normal, ClampLength); - // Preserve the original vector (with no precision loss) if the length falls within the given range + // Preserve the original vector (with no precision loss) if the length falls + // within the given range XMVECTOR Control = XMVectorEqualInt(ControlMax, ControlMin); Result = XMVectorSelect(Result, V, Control); @@ -7192,12 +6540,8 @@ inline XMVECTOR XM_CALLCONV XMVector2ClampLengthV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Reflect -( - FXMVECTOR Incident, - FXMVECTOR Normal -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Reflect(FXMVECTOR Incident, + FXMVECTOR Normal) noexcept { // Result = Incident - (2 * dot(Incident, Normal)) * Normal XMVECTOR Result; @@ -7209,13 +6553,9 @@ inline XMVECTOR XM_CALLCONV XMVector2Reflect //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Refract -( - FXMVECTOR Incident, - FXMVECTOR Normal, - float RefractionIndex -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Refract(FXMVECTOR Incident, + FXMVECTOR Normal, + float RefractionIndex) noexcept { XMVECTOR Index = XMVectorReplicate(RefractionIndex); return XMVector2RefractV(Incident, Normal, Index); } @@ -7223,37 +6563,34 @@ inline XMVECTOR XM_CALLCONV XMVector2Refract //------------------------------------------------------------------------------ // Return the refraction of a 2D vector -inline XMVECTOR XM_CALLCONV XMVector2RefractV -( - FXMVECTOR Incident, - FXMVECTOR Normal, - FXMVECTOR RefractionIndex -) noexcept -{ - // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + - // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) +inline XMVECTOR XM_CALLCONV XMVector2RefractV( + FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex) noexcept { + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * + // dot(Incident, Normal) + sqrt(1 - RefractionIndex * RefractionIndex * (1 - + // dot(Incident, Normal) * dot(Incident, Normal)))) #if defined(_XM_NO_INTRINSICS_) - float IDotN = (Incident.vector4_f32[0] * Normal.vector4_f32[0]) + (Incident.vector4_f32[1] * Normal.vector4_f32[1]); + float IDotN = (Incident.vector4_f32[0] * Normal.vector4_f32[0]) + + (Incident.vector4_f32[1] * Normal.vector4_f32[1]); // R = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) float RY = 1.0f - (IDotN * IDotN); - float RX = 1.0f - (RY * RefractionIndex.vector4_f32[0] * RefractionIndex.vector4_f32[0]); - RY = 1.0f - (RY * RefractionIndex.vector4_f32[1] * RefractionIndex.vector4_f32[1]); - if (RX >= 0.0f) - { - RX = (RefractionIndex.vector4_f32[0] * Incident.vector4_f32[0]) - (Normal.vector4_f32[0] * ((RefractionIndex.vector4_f32[0] * IDotN) + sqrtf(RX))); - } - else - { + float RX = 1.0f - (RY * RefractionIndex.vector4_f32[0] * + RefractionIndex.vector4_f32[0]); + RY = 1.0f - + (RY * RefractionIndex.vector4_f32[1] * RefractionIndex.vector4_f32[1]); + if (RX >= 0.0f) { + RX = (RefractionIndex.vector4_f32[0] * Incident.vector4_f32[0]) - + (Normal.vector4_f32[0] * + ((RefractionIndex.vector4_f32[0] * IDotN) + sqrtf(RX))); + } else { RX = 0.0f; } - if (RY >= 0.0f) - { - RY = (RefractionIndex.vector4_f32[1] * Incident.vector4_f32[1]) - (Normal.vector4_f32[1] * ((RefractionIndex.vector4_f32[1] * IDotN) + sqrtf(RY))); - } - else - { + if (RY >= 0.0f) { + RY = (RefractionIndex.vector4_f32[1] * Incident.vector4_f32[1]) - + (Normal.vector4_f32[1] * + ((RefractionIndex.vector4_f32[1] * IDotN) + sqrtf(RY))); + } else { RY = 0.0f; } @@ -7291,12 +6628,14 @@ inline XMVECTOR XM_CALLCONV XMVector2RefractV // Result = RefractionIndex * Incident - Normal * R float32x2_t vResult = vmul_f32(RIL, IL); vResult = vmls_f32(vResult, vTemp, NL); - vResult = vreinterpret_f32_u32(vand_u32(vreinterpret_u32_f32(vResult), vMask)); + vResult = + vreinterpret_f32_u32(vand_u32(vreinterpret_u32_f32(vResult), vMask)); return vcombine_f32(vResult, vResult); #elif defined(_XM_SSE_INTRINSICS_) - // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + - // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) - // Get the 2D Dot product of Incident-Normal + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * + // dot(Incident, Normal) + sqrt(1 - RefractionIndex * RefractionIndex * (1 - + // dot(Incident, Normal) * dot(Incident, Normal)))) Get the 2D Dot product + // of Incident-Normal XMVECTOR IDotN = XMVector2Dot(Incident, Normal); // vTemp = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) XMVECTOR vTemp = XM_FNMADD_PS(IDotN, IDotN, g_XMOne); @@ -7317,20 +6656,14 @@ inline XMVECTOR XM_CALLCONV XMVector2RefractV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Orthogonal(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Orthogonal(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - -V.vector4_f32[1], - V.vector4_f32[0], - 0.f, - 0.f - } } }; + XMVECTORF32 Result = {{{-V.vector4_f32[1], V.vector4_f32[0], 0.f, 0.f}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Negate = { { { -1.f, 1.f, 0, 0 } } }; + static const XMVECTORF32 Negate = {{{-1.f, 1.f, 0, 0}}}; const float32x2_t zero = vdup_n_f32(0); float32x2_t VL = vget_low_f32(V); @@ -7345,12 +6678,8 @@ inline XMVECTOR XM_CALLCONV XMVector2Orthogonal(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2AngleBetweenNormalsEst -( - FXMVECTOR N1, - FXMVECTOR N2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector2AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2) noexcept { XMVECTOR Result = XMVector2Dot(N1, N2); Result = XMVectorClamp(Result, g_XMNegativeOne.v, g_XMOne.v); Result = XMVectorACosEst(Result); @@ -7359,12 +6688,8 @@ inline XMVECTOR XM_CALLCONV XMVector2AngleBetweenNormalsEst //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2AngleBetweenNormals -( - FXMVECTOR N1, - FXMVECTOR N2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector2AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2) noexcept { XMVECTOR Result = XMVector2Dot(N1, N2); Result = XMVectorClamp(Result, g_XMNegativeOne, g_XMOne); Result = XMVectorACos(Result); @@ -7373,12 +6698,8 @@ inline XMVECTOR XM_CALLCONV XMVector2AngleBetweenNormals //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2AngleBetweenVectors -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector2AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2) noexcept { XMVECTOR L1 = XMVector2ReciprocalLength(V1); XMVECTOR L2 = XMVector2ReciprocalLength(V2); @@ -7394,19 +6715,15 @@ inline XMVECTOR XM_CALLCONV XMVector2AngleBetweenVectors //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2LinePointDistance -( - FXMVECTOR LinePoint1, - FXMVECTOR LinePoint2, - FXMVECTOR Point -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2LinePointDistance( + FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point) noexcept { // Given a vector PointVector from LinePoint1 to Point and a vector // LineVector from LinePoint1 to LinePoint2, the scaled distance // PointProjectionScale from LinePoint1 to the perpendicular projection // of PointVector onto the line is defined as: // - // PointProjectionScale = dot(PointVector, LineVector) / LengthSq(LineVector) + // PointProjectionScale = dot(PointVector, LineVector) / + // LengthSq(LineVector) XMVECTOR PointVector = XMVectorSubtract(Point, LinePoint1); XMVECTOR LineVector = XMVectorSubtract(LinePoint2, LinePoint1); @@ -7416,7 +6733,8 @@ inline XMVECTOR XM_CALLCONV XMVector2LinePointDistance XMVECTOR PointProjectionScale = XMVector2Dot(PointVector, LineVector); PointProjectionScale = XMVectorDivide(PointProjectionScale, LengthSq); - XMVECTOR DistanceVector = XMVectorMultiply(LineVector, PointProjectionScale); + XMVECTOR DistanceVector = + XMVectorMultiply(LineVector, PointProjectionScale); DistanceVector = XMVectorSubtract(PointVector, DistanceVector); return XMVector2Length(DistanceVector); @@ -7424,14 +6742,9 @@ inline XMVECTOR XM_CALLCONV XMVector2LinePointDistance //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2IntersectLine -( - FXMVECTOR Line1Point1, - FXMVECTOR Line1Point2, - FXMVECTOR Line2Point1, - GXMVECTOR Line2Point2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector2IntersectLine(FXMVECTOR Line1Point1, FXMVECTOR Line1Point2, + FXMVECTOR Line2Point1, GXMVECTOR Line2Point2) noexcept { #if defined(_XM_NO_INTRINSICS_) || defined(_XM_ARM_NEON_INTRINSICS_) XMVECTOR V1 = XMVectorSubtract(Line1Point2, Line1Point1); @@ -7443,21 +6756,15 @@ inline XMVECTOR XM_CALLCONV XMVector2IntersectLine XMVECTOR Result; const XMVECTOR Zero = XMVectorZero(); - if (XMVector2NearEqual(C1, Zero, g_XMEpsilon.v)) - { - if (XMVector2NearEqual(C2, Zero, g_XMEpsilon.v)) - { + if (XMVector2NearEqual(C1, Zero, g_XMEpsilon.v)) { + if (XMVector2NearEqual(C2, Zero, g_XMEpsilon.v)) { // Coincident Result = g_XMInfinity.v; - } - else - { + } else { // Parallel Result = g_XMQNaN.v; } - } - else - { + } else { // Intersection point = Line1Point1 + V1 * (C2 / C1) XMVECTOR Scale = XMVectorReciprocal(C1); Scale = XMVectorMultiply(C2, Scale); @@ -7501,12 +6808,8 @@ inline XMVECTOR XM_CALLCONV XMVector2IntersectLine //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2Transform -( - FXMVECTOR V, - FXMMATRIX M -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2Transform(FXMVECTOR V, + FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Y = XMVectorSplatY(V); @@ -7519,12 +6822,12 @@ inline XMVECTOR XM_CALLCONV XMVector2Transform #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); - float32x4_t Result = vmlaq_lane_f32(M.r[3], M.r[1], VL, 1); // Y - return vmlaq_lane_f32(Result, M.r[0], VL, 0); // X + float32x4_t Result = vmlaq_lane_f32(M.r[3], M.r[1], VL, 1); // Y + return vmlaq_lane_f32(Result, M.r[0], VL, 0); // X #elif defined(_XM_SSE_INTRINSICS_) - XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y + XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y vResult = XM_FMADD_PS(vResult, M.r[1], M.r[3]); - XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X + XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X vResult = XM_FMADD_PS(vTemp, M.r[0], vResult); return vResult; #endif @@ -7532,17 +6835,9 @@ inline XMVECTOR XM_CALLCONV XMVector2Transform //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream -( - XMFLOAT4* pOutputStream, - size_t OutputStride, - const XMFLOAT2* pInputStream, - size_t InputStride, - size_t VectorCount, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream( + XMFLOAT4* pOutputStream, size_t OutputStride, const XMFLOAT2* pInputStream, + size_t InputStride, size_t VectorCount, FXMMATRIX M) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -7561,25 +6856,25 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream const XMVECTOR row1 = M.r[1]; const XMVECTOR row3 = M.r[3]; - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat2(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat2(reinterpret_cast(pInputVector)); XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); XMVECTOR Result = XMVectorMultiplyAdd(Y, row1, row3); Result = XMVectorMultiplyAdd(X, row0, Result); - #ifdef _PREFAST_ - #pragma prefast(push) - #pragma prefast(disable : 26015, "PREfast noise: Esp:1307" ) - #endif +#ifdef _PREFAST_ +#pragma prefast(push) +#pragma prefast(disable : 26015, "PREfast noise: Esp:1307") +#endif XMStoreFloat4(reinterpret_cast(pOutputVector), Result); - #ifdef _PREFAST_ - #pragma prefast(pop) - #endif +#ifdef _PREFAST_ +#pragma prefast(pop) +#endif pInputVector += InputStride; pOutputVector += OutputStride; @@ -7597,38 +6892,41 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT2)) && (OutputStride == sizeof(XMFLOAT4))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x2_t V = vld2q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT2)) && + (OutputStride == sizeof(XMFLOAT4))) { + for (size_t j = 0; j < four; ++j) { + float32x4x2_t V = + vld2q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; float32x2_t r3 = vget_low_f32(row3); float32x2_t r = vget_low_f32(row0); - XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Ax+M - XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Bx+N + XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Ax+M + XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), + V.val[0], r, 1); // Bx+N XM_PREFETCH(pInputVector); r3 = vget_high_f32(row3); r = vget_high_f32(row0); - XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Cx+O - XMVECTOR vResult3 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Dx+P + XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Cx+O + XMVECTOR vResult3 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), + V.val[0], r, 1); // Dx+P XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(row1); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(row1); - vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O - vResult3 = vmlaq_lane_f32(vResult3, V.val[1], r, 1); // Dx+Hy+P + vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O + vResult3 = vmlaq_lane_f32(vResult3, V.val[1], r, 1); // Dx+Hy+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); @@ -7646,13 +6944,12 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream } } - for (; i < VectorCount; i++) - { + for (; i < VectorCount; i++) { float32x2_t V = vld1_f32(reinterpret_cast(pInputVector)); pInputVector += InputStride; - XMVECTOR vResult = vmlaq_lane_f32(row3, row0, V, 0); // X - vResult = vmlaq_lane_f32(vResult, row1, V, 1); // Y + XMVECTOR vResult = vmlaq_lane_f32(row3, row0, V, 0); // X + vResult = vmlaq_lane_f32(vResult, row1, V, 1); // Y vst1q_f32(reinterpret_cast(pOutputVector), vResult); pOutputVector += OutputStride; @@ -7665,28 +6962,28 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { + if (four > 0) { __m256 row0 = _mm256_broadcast_ps(&M.r[0]); __m256 row1 = _mm256_broadcast_ps(&M.r[1]); __m256 row3 = _mm256_broadcast_ps(&M.r[3]); - if (InputStride == sizeof(XMFLOAT2)) - { - if (OutputStride == sizeof(XMFLOAT4)) - { - if (!(reinterpret_cast(pOutputStream) & 0x1F)) - { + if (InputStride == sizeof(XMFLOAT2)) { + if (OutputStride == sizeof(XMFLOAT4)) { + if (!(reinterpret_cast(pOutputStream) & 0x1F)) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempB = _mm256_fmadd_ps(Y1, row1, row3); __m256 vTempB2 = _mm256_fmadd_ps(Y2, row1, row3); @@ -7695,29 +6992,35 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream vTempA = _mm256_add_ps(vTempA, vTempB); vTempA2 = _mm256_add_ps(vTempA2, vTempB2); - X1 = _mm256_insertf128_ps(vTempA, _mm256_castps256_ps128(vTempA2), 1); - XM256_STREAM_PS(reinterpret_cast(pOutputVector), X1); + X1 = _mm256_insertf128_ps( + vTempA, _mm256_castps256_ps128(vTempA2), 1); + XM256_STREAM_PS(reinterpret_cast(pOutputVector), + X1); pOutputVector += sizeof(XMFLOAT4) * 2; - X2 = _mm256_insertf128_ps(vTempA2, _mm256_extractf128_ps(vTempA, 1), 0); - XM256_STREAM_PS(reinterpret_cast(pOutputVector), X2); + X2 = _mm256_insertf128_ps( + vTempA2, _mm256_extractf128_ps(vTempA, 1), 0); + XM256_STREAM_PS(reinterpret_cast(pOutputVector), + X2); pOutputVector += sizeof(XMFLOAT4) * 2; i += 4; } - } - else - { + } else { // Packed input, packed output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempB = _mm256_fmadd_ps(Y1, row1, row3); __m256 vTempB2 = _mm256_fmadd_ps(Y2, row1, row3); @@ -7726,30 +7029,36 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream vTempA = _mm256_add_ps(vTempA, vTempB); vTempA2 = _mm256_add_ps(vTempA2, vTempB2); - X1 = _mm256_insertf128_ps(vTempA, _mm256_castps256_ps128(vTempA2), 1); - _mm256_storeu_ps(reinterpret_cast(pOutputVector), X1); + X1 = _mm256_insertf128_ps( + vTempA, _mm256_castps256_ps128(vTempA2), 1); + _mm256_storeu_ps( + reinterpret_cast(pOutputVector), X1); pOutputVector += sizeof(XMFLOAT4) * 2; - X2 = _mm256_insertf128_ps(vTempA2, _mm256_extractf128_ps(vTempA, 1), 0); - _mm256_storeu_ps(reinterpret_cast(pOutputVector), X2); + X2 = _mm256_insertf128_ps( + vTempA2, _mm256_extractf128_ps(vTempA, 1), 0); + _mm256_storeu_ps( + reinterpret_cast(pOutputVector), X2); pOutputVector += sizeof(XMFLOAT4) * 2; i += 4; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempB = _mm256_fmadd_ps(Y1, row1, row3); __m256 vTempB2 = _mm256_fmadd_ps(Y2, row1, row3); @@ -7758,16 +7067,20 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream vTempA = _mm256_add_ps(vTempA, vTempB); vTempA2 = _mm256_add_ps(vTempA2, vTempB2); - _mm_storeu_ps(reinterpret_cast(pOutputVector), _mm256_castps256_ps128(vTempA)); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + _mm256_castps256_ps128(vTempA)); pOutputVector += OutputStride; - _mm_storeu_ps(reinterpret_cast(pOutputVector), _mm256_castps256_ps128(vTempA2)); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + _mm256_castps256_ps128(vTempA2)); pOutputVector += OutputStride; - _mm_storeu_ps(reinterpret_cast(pOutputVector), _mm256_extractf128_ps(vTempA, 1)); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + _mm256_extractf128_ps(vTempA, 1)); pOutputVector += OutputStride; - _mm_storeu_ps(reinterpret_cast(pOutputVector), _mm256_extractf128_ps(vTempA2, 1)); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + _mm256_extractf128_ps(vTempA2, 1)); pOutputVector += OutputStride; i += 4; @@ -7776,15 +7089,14 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream } } - if (i < VectorCount) - { + if (i < VectorCount) { const XMVECTOR row0 = M.r[0]; const XMVECTOR row1 = M.r[1]; const XMVECTOR row3 = M.r[3]; - for (; i < VectorCount; i++) - { - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + __m128 xy = _mm_castpd_ps( + _mm_load_sd(reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(xy, _MM_SHUFFLE(1, 1, 1, 1)); @@ -7812,16 +7124,14 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream size_t i = 0; size_t two = VectorCount >> 1; - if (two > 0) - { - if (InputStride == sizeof(XMFLOAT2)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF) && !(OutputStride & 0xF)) - { + if (two > 0) { + if (InputStride == sizeof(XMFLOAT2)) { + if (!(reinterpret_cast(pOutputStream) & 0xF) && + !(OutputStride & 0xF)) { // Packed input, aligned output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; XMVECTOR Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); @@ -7831,7 +7141,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream XMVECTOR vTemp2 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(3, 3, 3, 3)); @@ -7841,18 +7152,17 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream vTemp2 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 2; } - } - else - { + } else { // Packed input, unaligned output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; XMVECTOR Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); @@ -7862,7 +7172,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream XMVECTOR vTemp2 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(3, 3, 3, 3)); @@ -7872,7 +7183,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream vTemp2 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 2; @@ -7881,14 +7193,14 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream } } - if (!(reinterpret_cast(pInputVector) & 0xF) && !(InputStride & 0xF)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF) && !(OutputStride & 0xF)) - { + if (!(reinterpret_cast(pInputVector) & 0xF) && + !(InputStride & 0xF)) { + if (!(reinterpret_cast(pOutputStream) & 0xF) && + !(OutputStride & 0xF)) { // Aligned input, aligned output - for (; i < VectorCount; i++) - { - XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64( + reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); @@ -7901,13 +7213,11 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); pOutputVector += OutputStride; } - } - else - { + } else { // Aligned input, unaligned output - for (; i < VectorCount; i++) - { - XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64( + reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); @@ -7921,13 +7231,11 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream pOutputVector += OutputStride; } } - } - else - { + } else { // Unaligned input - for (; i < VectorCount; i++) - { - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + __m128 xy = _mm_castpd_ps( + _mm_load_sd(reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(xy, _MM_SHUFFLE(1, 1, 1, 1)); @@ -7950,12 +7258,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector2TransformStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2TransformCoord -( - FXMVECTOR V, - FXMMATRIX M -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2TransformCoord(FXMVECTOR V, + FXMMATRIX M) noexcept { XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); @@ -7968,17 +7272,10 @@ inline XMVECTOR XM_CALLCONV XMVector2TransformCoord //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream -( - XMFLOAT2* pOutputStream, - size_t OutputStride, - const XMFLOAT2* pInputStream, - size_t InputStride, - size_t VectorCount, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT2* XM_CALLCONV +XMVector2TransformCoordStream(XMFLOAT2* pOutputStream, size_t OutputStride, + const XMFLOAT2* pInputStream, size_t InputStride, + size_t VectorCount, FXMMATRIX M) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -7997,9 +7294,9 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream const XMVECTOR row1 = M.r[1]; const XMVECTOR row3 = M.r[3]; - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat2(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat2(reinterpret_cast(pInputVector)); XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); @@ -8010,16 +7307,16 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream Result = XMVectorDivide(Result, W); - #ifdef _PREFAST_ - #pragma prefast(push) - #pragma prefast(disable : 26015, "PREfast noise: Esp:1307" ) - #endif +#ifdef _PREFAST_ +#pragma prefast(push) +#pragma prefast(disable : 26015, "PREfast noise: Esp:1307") +#endif XMStoreFloat2(reinterpret_cast(pOutputVector), Result); - #ifdef _PREFAST_ - #pragma prefast(pop) - #endif +#ifdef _PREFAST_ +#pragma prefast(pop) +#endif pInputVector += InputStride; pOutputVector += OutputStride; @@ -8037,44 +7334,47 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT2)) && (OutputStride == sizeof(XMFLOAT2))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x2_t V = vld2q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT2)) && + (OutputStride == sizeof(XMFLOAT2))) { + for (size_t j = 0; j < four; ++j) { + float32x4x2_t V = + vld2q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; float32x2_t r3 = vget_low_f32(row3); float32x2_t r = vget_low_f32(row0); - XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Ax+M - XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Bx+N + XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Ax+M + XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), + V.val[0], r, 1); // Bx+N XM_PREFETCH(pInputVector); r3 = vget_high_f32(row3); r = vget_high_f32(row0); - XMVECTOR W = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Dx+P + XMVECTOR W = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, + 1); // Dx+P XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(row1); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(row1); - W = vmlaq_lane_f32(W, V.val[1], r, 1); // Dx+Hy+P + W = vmlaq_lane_f32(W, V.val[1], r, 1); // Dx+Hy+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ V.val[0] = vdivq_f32(vResult0, W); V.val[1] = vdivq_f32(vResult1, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal +#else + // 2 iterations of Newton-Raphson refinement of reciprocal float32x4_t Reciprocal = vrecpeq_f32(W); float32x4_t S = vrecpsq_f32(Reciprocal, W); Reciprocal = vmulq_f32(S, Reciprocal); @@ -8083,7 +7383,7 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream V.val[0] = vmulq_f32(vResult0, Reciprocal); V.val[1] = vmulq_f32(vResult1, Reciprocal); - #endif +#endif vst2q_f32(reinterpret_cast(pOutputVector), V); pOutputVector += sizeof(XMFLOAT2) * 4; @@ -8093,22 +7393,22 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream } } - for (; i < VectorCount; i++) - { + for (; i < VectorCount; i++) { float32x2_t V = vld1_f32(reinterpret_cast(pInputVector)); pInputVector += InputStride; - XMVECTOR vResult = vmlaq_lane_f32(row3, row0, V, 0); // X - vResult = vmlaq_lane_f32(vResult, row1, V, 1); // Y + XMVECTOR vResult = vmlaq_lane_f32(row3, row0, V, 0); // X + vResult = vmlaq_lane_f32(vResult, row1, V, 1); // Y V = vget_high_f32(vResult); float32x2_t W = vdup_lane_f32(V, 1); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ V = vget_low_f32(vResult); V = vdiv_f32(V, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal for W +#else + // 2 iterations of Newton-Raphson refinement of reciprocal for W float32x2_t Reciprocal = vrecpe_f32(W); float32x2_t S = vrecps_f32(Reciprocal, W); Reciprocal = vmul_f32(S, Reciprocal); @@ -8117,7 +7417,7 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream V = vget_low_f32(vResult); V = vmul_f32(V, Reciprocal); - #endif +#endif vst1_f32(reinterpret_cast(pOutputVector), V); pOutputVector += OutputStride; @@ -8130,28 +7430,28 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { + if (four > 0) { __m256 row0 = _mm256_broadcast_ps(&M.r[0]); __m256 row1 = _mm256_broadcast_ps(&M.r[1]); __m256 row3 = _mm256_broadcast_ps(&M.r[3]); - if (InputStride == sizeof(XMFLOAT2)) - { - if (OutputStride == sizeof(XMFLOAT2)) - { - if (!(reinterpret_cast(pOutputStream) & 0x1F)) - { + if (InputStride == sizeof(XMFLOAT2)) { + if (OutputStride == sizeof(XMFLOAT2)) { + if (!(reinterpret_cast(pOutputStream) & 0x1F)) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempB = _mm256_fmadd_ps(Y1, row1, row3); __m256 vTempB2 = _mm256_fmadd_ps(Y2, row1, row3); @@ -8160,31 +7460,36 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTempA = _mm256_add_ps(vTempA, vTempB); vTempA2 = _mm256_add_ps(vTempA2, vTempB2); - __m256 W = _mm256_shuffle_ps(vTempA, vTempA, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 W = _mm256_shuffle_ps(vTempA, vTempA, + _MM_SHUFFLE(3, 3, 3, 3)); vTempA = _mm256_div_ps(vTempA, W); - W = _mm256_shuffle_ps(vTempA2, vTempA2, _MM_SHUFFLE(3, 3, 3, 3)); + W = _mm256_shuffle_ps(vTempA2, vTempA2, + _MM_SHUFFLE(3, 3, 3, 3)); vTempA2 = _mm256_div_ps(vTempA2, W); X1 = _mm256_shuffle_ps(vTempA, vTempA2, 0x44); - XM256_STREAM_PS(reinterpret_cast(pOutputVector), X1); + XM256_STREAM_PS(reinterpret_cast(pOutputVector), + X1); pOutputVector += sizeof(XMFLOAT2) * 4; i += 4; } - } - else - { + } else { // Packed input, packed output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempB = _mm256_fmadd_ps(Y1, row1, row3); __m256 vTempB2 = _mm256_fmadd_ps(Y2, row1, row3); @@ -8193,32 +7498,37 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTempA = _mm256_add_ps(vTempA, vTempB); vTempA2 = _mm256_add_ps(vTempA2, vTempB2); - __m256 W = _mm256_shuffle_ps(vTempA, vTempA, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 W = _mm256_shuffle_ps(vTempA, vTempA, + _MM_SHUFFLE(3, 3, 3, 3)); vTempA = _mm256_div_ps(vTempA, W); - W = _mm256_shuffle_ps(vTempA2, vTempA2, _MM_SHUFFLE(3, 3, 3, 3)); + W = _mm256_shuffle_ps(vTempA2, vTempA2, + _MM_SHUFFLE(3, 3, 3, 3)); vTempA2 = _mm256_div_ps(vTempA2, W); X1 = _mm256_shuffle_ps(vTempA, vTempA2, 0x44); - _mm256_storeu_ps(reinterpret_cast(pOutputVector), X1); + _mm256_storeu_ps( + reinterpret_cast(pOutputVector), X1); pOutputVector += sizeof(XMFLOAT2) * 4; i += 4; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempB = _mm256_fmadd_ps(Y1, row1, row3); __m256 vTempB2 = _mm256_fmadd_ps(Y2, row1, row3); @@ -8227,25 +7537,30 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTempA = _mm256_add_ps(vTempA, vTempB); vTempA2 = _mm256_add_ps(vTempA2, vTempB2); - __m256 W = _mm256_shuffle_ps(vTempA, vTempA, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 W = _mm256_shuffle_ps(vTempA, vTempA, + _MM_SHUFFLE(3, 3, 3, 3)); vTempA = _mm256_div_ps(vTempA, W); - W = _mm256_shuffle_ps(vTempA2, vTempA2, _MM_SHUFFLE(3, 3, 3, 3)); + W = _mm256_shuffle_ps(vTempA2, vTempA2, + _MM_SHUFFLE(3, 3, 3, 3)); vTempA2 = _mm256_div_ps(vTempA2, W); _mm_store_sd(reinterpret_cast(pOutputVector), - _mm_castps_pd(_mm256_castps256_ps128(vTempA))); + _mm_castps_pd(_mm256_castps256_ps128(vTempA))); pOutputVector += OutputStride; - _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_store_sd( + reinterpret_cast(pOutputVector), _mm_castps_pd(_mm256_castps256_ps128(vTempA2))); pOutputVector += OutputStride; - _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_store_sd( + reinterpret_cast(pOutputVector), _mm_castps_pd(_mm256_extractf128_ps(vTempA, 1))); pOutputVector += OutputStride; - _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_store_sd( + reinterpret_cast(pOutputVector), _mm_castps_pd(_mm256_extractf128_ps(vTempA2, 1))); pOutputVector += OutputStride; @@ -8255,15 +7570,14 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream } } - if (i < VectorCount) - { + if (i < VectorCount) { const XMVECTOR row0 = M.r[0]; const XMVECTOR row1 = M.r[1]; const XMVECTOR row3 = M.r[3]; - for (; i < VectorCount; i++) - { - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + __m128 xy = _mm_castpd_ps( + _mm_load_sd(reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(xy, _MM_SHUFFLE(1, 1, 1, 1)); @@ -8276,7 +7590,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; } } @@ -8294,18 +7609,14 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream size_t i = 0; size_t two = VectorCount >> 1; - if (two > 0) - { - if (InputStride == sizeof(XMFLOAT2)) - { - if (OutputStride == sizeof(XMFLOAT2)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF)) - { + if (two > 0) { + if (InputStride == sizeof(XMFLOAT2)) { + if (OutputStride == sizeof(XMFLOAT2)) { + if (!(reinterpret_cast(pOutputStream) & 0xF)) { // Packed input, aligned & packed output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; // Result 1 @@ -8316,7 +7627,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream XMVECTOR vTemp2 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); XMVECTOR V1 = _mm_div_ps(vTemp, W); @@ -8334,18 +7646,17 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTemp = _mm_movelh_ps(V1, V2); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += sizeof(XMFLOAT2) * 2; i += 2; } - } - else - { + } else { // Packed input, unaligned & packed output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; // Result 1 @@ -8356,7 +7667,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream XMVECTOR vTemp2 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); XMVECTOR V1 = _mm_div_ps(vTemp, W); @@ -8374,19 +7686,18 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTemp = _mm_movelh_ps(V1, V2); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += sizeof(XMFLOAT2) * 2; i += 2; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; // Result 1 @@ -8401,7 +7712,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTemp = _mm_div_ps(vTemp, W); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; // Result 2 @@ -8416,7 +7728,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTemp = _mm_div_ps(vTemp, W); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; i += 2; @@ -8425,12 +7738,12 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream } } - if (!(reinterpret_cast(pInputVector) & 0xF) && !(InputStride & 0xF)) - { + if (!(reinterpret_cast(pInputVector) & 0xF) && + !(InputStride & 0xF)) { // Aligned input - for (; i < VectorCount; i++) - { - XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64( + reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); @@ -8444,16 +7757,15 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTemp = _mm_div_ps(vTemp, W); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; } - } - else - { + } else { // Unaligned input - for (; i < VectorCount; i++) - { - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + __m128 xy = _mm_castpd_ps( + _mm_load_sd(reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(xy, _MM_SHUFFLE(1, 1, 1, 1)); @@ -8467,7 +7779,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream vTemp = _mm_div_ps(vTemp, W); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; } } @@ -8480,12 +7793,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformCoordStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector2TransformNormal -( - FXMVECTOR V, - FXMMATRIX M -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector2TransformNormal(FXMVECTOR V, + FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Y = XMVectorSplatY(V); @@ -8498,12 +7807,12 @@ inline XMVECTOR XM_CALLCONV XMVector2TransformNormal #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); - float32x4_t Result = vmulq_lane_f32(M.r[1], VL, 1); // Y - return vmlaq_lane_f32(Result, M.r[0], VL, 0); // X + float32x4_t Result = vmulq_lane_f32(M.r[1], VL, 1); // Y + return vmlaq_lane_f32(Result, M.r[0], VL, 0); // X #elif defined(_XM_SSE_INTRINSICS_) - XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y + XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y vResult = _mm_mul_ps(vResult, M.r[1]); - XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X + XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X vResult = XM_FMADD_PS(vTemp, M.r[0], vResult); return vResult; #endif @@ -8511,17 +7820,10 @@ inline XMVECTOR XM_CALLCONV XMVector2TransformNormal //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream -( - XMFLOAT2* pOutputStream, - size_t OutputStride, - const XMFLOAT2* pInputStream, - size_t InputStride, - size_t VectorCount, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT2* XM_CALLCONV +XMVector2TransformNormalStream(XMFLOAT2* pOutputStream, size_t OutputStride, + const XMFLOAT2* pInputStream, size_t InputStride, + size_t VectorCount, FXMMATRIX M) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -8539,25 +7841,25 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream const XMVECTOR row0 = M.r[0]; const XMVECTOR row1 = M.r[1]; - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat2(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat2(reinterpret_cast(pInputVector)); XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); XMVECTOR Result = XMVectorMultiply(Y, row1); Result = XMVectorMultiplyAdd(X, row0, Result); - #ifdef _PREFAST_ - #pragma prefast(push) - #pragma prefast(disable : 26015, "PREfast noise: Esp:1307" ) - #endif +#ifdef _PREFAST_ +#pragma prefast(push) +#pragma prefast(disable : 26015, "PREfast noise: Esp:1307") +#endif XMStoreFloat2(reinterpret_cast(pOutputVector), Result); - #ifdef _PREFAST_ - #pragma prefast(pop) - #endif +#ifdef _PREFAST_ +#pragma prefast(pop) +#endif pInputVector += InputStride; pOutputVector += OutputStride; @@ -8574,25 +7876,24 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT2)) && (OutputStride == sizeof(XMFLOAT2))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x2_t V = vld2q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT2)) && + (OutputStride == sizeof(XMFLOAT2))) { + for (size_t j = 0; j < four; ++j) { + float32x4x2_t V = + vld2q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; float32x2_t r = vget_low_f32(row0); - XMVECTOR vResult0 = vmulq_lane_f32(V.val[0], r, 0); // Ax - XMVECTOR vResult1 = vmulq_lane_f32(V.val[0], r, 1); // Bx + XMVECTOR vResult0 = vmulq_lane_f32(V.val[0], r, 0); // Ax + XMVECTOR vResult1 = vmulq_lane_f32(V.val[0], r, 1); // Bx XM_PREFETCH(pInputVector); XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(row1); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); @@ -8608,13 +7909,12 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream } } - for (; i < VectorCount; i++) - { + for (; i < VectorCount; i++) { float32x2_t V = vld1_f32(reinterpret_cast(pInputVector)); pInputVector += InputStride; - XMVECTOR vResult = vmulq_lane_f32(row0, V, 0); // X - vResult = vmlaq_lane_f32(vResult, row1, V, 1); // Y + XMVECTOR vResult = vmulq_lane_f32(row0, V, 0); // X + vResult = vmlaq_lane_f32(vResult, row1, V, 1); // Y V = vget_low_f32(vResult); vst1_f32(reinterpret_cast(pOutputVector), V); @@ -8628,27 +7928,27 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { + if (four > 0) { __m256 row0 = _mm256_broadcast_ps(&M.r[0]); __m256 row1 = _mm256_broadcast_ps(&M.r[1]); - if (InputStride == sizeof(XMFLOAT2)) - { - if (OutputStride == sizeof(XMFLOAT2)) - { - if (!(reinterpret_cast(pOutputStream) & 0x1F)) - { + if (InputStride == sizeof(XMFLOAT2)) { + if (OutputStride == sizeof(XMFLOAT2)) { + if (!(reinterpret_cast(pOutputStream) & 0x1F)) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempA = _mm256_mul_ps(Y1, row1); __m256 vTempB = _mm256_mul_ps(Y2, row1); @@ -8656,24 +7956,27 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream vTempB = _mm256_fmadd_ps(X2, row0, vTempB); X1 = _mm256_shuffle_ps(vTempA, vTempB, 0x44); - XM256_STREAM_PS(reinterpret_cast(pOutputVector), X1); + XM256_STREAM_PS(reinterpret_cast(pOutputVector), + X1); pOutputVector += sizeof(XMFLOAT2) * 4; i += 4; } - } - else - { + } else { // Packed input, packed output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempA = _mm256_mul_ps(Y1, row1); __m256 vTempB = _mm256_mul_ps(Y2, row1); @@ -8681,25 +7984,28 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream vTempB = _mm256_fmadd_ps(X2, row0, vTempB); X1 = _mm256_shuffle_ps(vTempA, vTempB, 0x44); - _mm256_storeu_ps(reinterpret_cast(pOutputVector), X1); + _mm256_storeu_ps( + reinterpret_cast(pOutputVector), X1); pOutputVector += sizeof(XMFLOAT2) * 4; i += 4; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < four; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 4; - __m256 Y2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); - __m256 X2 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 Y1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 X1 = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 Y2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 X2 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 Y1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 X1 = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); __m256 vTempA = _mm256_mul_ps(Y1, row1); __m256 vTempB = _mm256_mul_ps(Y2, row1); @@ -8707,18 +8013,20 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream vTempB = _mm256_fmadd_ps(X2, row0, vTempB); _mm_store_sd(reinterpret_cast(pOutputVector), - _mm_castps_pd(_mm256_castps256_ps128(vTempA))); + _mm_castps_pd(_mm256_castps256_ps128(vTempA))); pOutputVector += OutputStride; _mm_store_sd(reinterpret_cast(pOutputVector), - _mm_castps_pd(_mm256_castps256_ps128(vTempB))); + _mm_castps_pd(_mm256_castps256_ps128(vTempB))); pOutputVector += OutputStride; - _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_store_sd( + reinterpret_cast(pOutputVector), _mm_castps_pd(_mm256_extractf128_ps(vTempA, 1))); pOutputVector += OutputStride; - _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_store_sd( + reinterpret_cast(pOutputVector), _mm_castps_pd(_mm256_extractf128_ps(vTempB, 1))); pOutputVector += OutputStride; @@ -8728,14 +8036,13 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream } } - if (i < VectorCount) - { + if (i < VectorCount) { const XMVECTOR row0 = M.r[0]; const XMVECTOR row1 = M.r[1]; - for (; i < VectorCount; i++) - { - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + __m128 xy = _mm_castpd_ps( + _mm_load_sd(reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(xy, _MM_SHUFFLE(1, 1, 1, 1)); @@ -8744,7 +8051,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream XMVECTOR vTemp = _mm_mul_ps(Y, row1); vTemp = XM_FMADD_PS(X, row0, vTemp); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; } } @@ -8761,18 +8069,14 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream size_t i = 0; size_t two = VectorCount >> 1; - if (two > 0) - { - if (InputStride == sizeof(XMFLOAT2)) - { - if (OutputStride == sizeof(XMFLOAT2)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF)) - { + if (two > 0) { + if (InputStride == sizeof(XMFLOAT2)) { + if (OutputStride == sizeof(XMFLOAT2)) { + if (!(reinterpret_cast(pOutputStream) & 0xF)) { // Packed input, aligned & packed output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; // Result 1 @@ -8791,18 +8095,17 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream vTemp = _mm_movelh_ps(V1, V2); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += sizeof(XMFLOAT2) * 2; i += 2; } - } - else - { + } else { // Packed input, unaligned & packed output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; // Result 1 @@ -8821,19 +8124,18 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream vTemp = _mm_movelh_ps(V1, V2); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += sizeof(XMFLOAT2) * 2; i += 2; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < two; ++j) - { - XMVECTOR V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + XMVECTOR V = _mm_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT2) * 2; // Result 1 @@ -8843,7 +8145,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream XMVECTOR vTemp = _mm_mul_ps(Y, row1); vTemp = XM_FMADD_PS(X, row0, vTemp); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; // Result 2 @@ -8853,7 +8156,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream vTemp = _mm_mul_ps(Y, row1); vTemp = XM_FMADD_PS(X, row0, vTemp); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; i += 2; @@ -8862,12 +8166,12 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream } } - if (!(reinterpret_cast(pInputVector) & 0xF) && !(InputStride & 0xF)) - { + if (!(reinterpret_cast(pInputVector) & 0xF) && + !(InputStride & 0xF)) { // Aligned input - for (; i < VectorCount; i++) - { - XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + XMVECTOR V = _mm_castsi128_ps(_mm_loadl_epi64( + reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); @@ -8876,16 +8180,15 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream XMVECTOR vTemp = _mm_mul_ps(Y, row1); vTemp = XM_FMADD_PS(X, row0, vTemp); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; } - } - else - { + } else { // Unaligned input - for (; i < VectorCount; i++) - { - __m128 xy = _mm_castpd_ps(_mm_load_sd(reinterpret_cast(pInputVector))); + for (; i < VectorCount; i++) { + __m128 xy = _mm_castpd_ps( + _mm_load_sd(reinterpret_cast(pInputVector))); pInputVector += InputStride; XMVECTOR Y = XM_PERMUTE_PS(xy, _MM_SHUFFLE(1, 1, 1, 1)); @@ -8894,7 +8197,8 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream XMVECTOR vTemp = _mm_mul_ps(Y, row1); vTemp = XM_FMADD_PS(X, row0, vTemp); - _mm_store_sd(reinterpret_cast(pOutputVector), _mm_castps_pd(vTemp)); + _mm_store_sd(reinterpret_cast(pOutputVector), + _mm_castps_pd(vTemp)); pOutputVector += OutputStride; } } @@ -8917,19 +8221,19 @@ inline XMFLOAT2* XM_CALLCONV XMVector2TransformNormalStream //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3Equal -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3Equal(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1]) && (V1.vector4_f32[2] == V2.vector4_f32[2])) != 0); + return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && + (V1.vector4_f32[1] == V2.vector4_f32[1]) && + (V1.vector4_f32[2] == V2.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vceqq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 7) == 7) != 0); @@ -8938,40 +8242,33 @@ inline bool XM_CALLCONV XMVector3Equal //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector3EqualR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector3EqualR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1]) && - (V1.vector4_f32[2] == V2.vector4_f32[2])) - { + (V1.vector4_f32[2] == V2.vector4_f32[2])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && - (V1.vector4_f32[1] != V2.vector4_f32[1]) && - (V1.vector4_f32[2] != V2.vector4_f32[2])) - { + } else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && + (V1.vector4_f32[1] != V2.vector4_f32[1]) && + (V1.vector4_f32[2] != V2.vector4_f32[2])) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vceqq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + uint32_t r = + vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; uint32_t CR = 0; - if (r == 0xFFFFFFU) - { + if (r == 0xFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -8979,12 +8276,9 @@ inline uint32_t XM_CALLCONV XMVector3EqualR XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); int iTest = _mm_movemask_ps(vTemp) & 7; uint32_t CR = 0; - if (iTest == 7) - { + if (iTest == 7) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -8993,19 +8287,20 @@ inline uint32_t XM_CALLCONV XMVector3EqualR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3EqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3EqualInt(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && (V1.vector4_u32[1] == V2.vector4_u32[1]) && (V1.vector4_u32[2] == V2.vector4_u32[2])) != 0); + return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && + (V1.vector4_u32[1] == V2.vector4_u32[1]) && + (V1.vector4_u32[2] == V2.vector4_u32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t vResult = vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint32x4_t vResult = + vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); return (((_mm_movemask_ps(_mm_castsi128_ps(vTemp)) & 7) == 7) != 0); @@ -9014,40 +8309,34 @@ inline bool XM_CALLCONV XMVector3EqualInt //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector3EqualIntR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector3EqualIntR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_u32[0] == V2.vector4_u32[0]) && (V1.vector4_u32[1] == V2.vector4_u32[1]) && - (V1.vector4_u32[2] == V2.vector4_u32[2])) - { + (V1.vector4_u32[2] == V2.vector4_u32[2])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_u32[0] != V2.vector4_u32[0]) && - (V1.vector4_u32[1] != V2.vector4_u32[1]) && - (V1.vector4_u32[2] != V2.vector4_u32[2])) - { + } else if ((V1.vector4_u32[0] != V2.vector4_u32[0]) && + (V1.vector4_u32[1] != V2.vector4_u32[1]) && + (V1.vector4_u32[2] != V2.vector4_u32[2])) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t vResult = vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; + uint32x4_t vResult = + vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + uint32_t r = + vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; uint32_t CR = 0; - if (r == 0xFFFFFFU) - { + if (r == 0xFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -9055,12 +8344,9 @@ inline uint32_t XM_CALLCONV XMVector3EqualIntR __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); int iTemp = _mm_movemask_ps(_mm_castsi128_ps(vTemp)) & 7; uint32_t CR = 0; - if (iTemp == 7) - { + if (iTemp == 7) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTemp) - { + } else if (!iTemp) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -9069,32 +8355,30 @@ inline uint32_t XM_CALLCONV XMVector3EqualIntR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3NearEqual -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR Epsilon -) noexcept -{ +inline bool XM_CALLCONV XMVector3NearEqual(FXMVECTOR V1, FXMVECTOR V2, + FXMVECTOR Epsilon) noexcept { #if defined(_XM_NO_INTRINSICS_) float dx, dy, dz; dx = fabsf(V1.vector4_f32[0] - V2.vector4_f32[0]); dy = fabsf(V1.vector4_f32[1] - V2.vector4_f32[1]); dz = fabsf(V1.vector4_f32[2] - V2.vector4_f32[2]); - return (((dx <= Epsilon.vector4_f32[0]) && - (dy <= Epsilon.vector4_f32[1]) && - (dz <= Epsilon.vector4_f32[2])) != 0); + return (((dx <= Epsilon.vector4_f32[0]) && (dy <= Epsilon.vector4_f32[1]) && + (dz <= Epsilon.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t vDelta = vsubq_f32(V1, V2); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) uint32x4_t vResult = vacleq_f32(vDelta, Epsilon); #else uint32x4_t vResult = vcleq_f32(vabsq_f32(vDelta), Epsilon); #endif - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) // Get the difference XMVECTOR vDelta = _mm_sub_ps(V1, V2); @@ -9110,19 +8394,19 @@ inline bool XM_CALLCONV XMVector3NearEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3NotEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3NotEqual(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || (V1.vector4_f32[1] != V2.vector4_f32[1]) || (V1.vector4_f32[2] != V2.vector4_f32[2])) != 0); + return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || + (V1.vector4_f32[1] != V2.vector4_f32[1]) || + (V1.vector4_f32[2] != V2.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vceqq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) != 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) != 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 7) != 7) != 0); @@ -9131,19 +8415,21 @@ inline bool XM_CALLCONV XMVector3NotEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3NotEqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3NotEqualInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || (V1.vector4_u32[1] != V2.vector4_u32[1]) || (V1.vector4_u32[2] != V2.vector4_u32[2])) != 0); + return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || + (V1.vector4_u32[1] != V2.vector4_u32[1]) || + (V1.vector4_u32[2] != V2.vector4_u32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t vResult = vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) != 0xFFFFFFU); + uint32x4_t vResult = + vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) != 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); return (((_mm_movemask_ps(_mm_castsi128_ps(vTemp)) & 7) != 7) != 0); @@ -9152,19 +8438,19 @@ inline bool XM_CALLCONV XMVector3NotEqualInt //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3Greater -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3Greater(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && (V1.vector4_f32[1] > V2.vector4_f32[1]) && (V1.vector4_f32[2] > V2.vector4_f32[2])) != 0); + return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && + (V1.vector4_f32[1] > V2.vector4_f32[1]) && + (V1.vector4_f32[2] > V2.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgtq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpgt_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 7) == 7) != 0); @@ -9173,41 +8459,34 @@ inline bool XM_CALLCONV XMVector3Greater //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector3GreaterR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector3GreaterR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_f32[0] > V2.vector4_f32[0]) && (V1.vector4_f32[1] > V2.vector4_f32[1]) && - (V1.vector4_f32[2] > V2.vector4_f32[2])) - { + (V1.vector4_f32[2] > V2.vector4_f32[2])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] <= V2.vector4_f32[0]) && - (V1.vector4_f32[1] <= V2.vector4_f32[1]) && - (V1.vector4_f32[2] <= V2.vector4_f32[2])) - { + } else if ((V1.vector4_f32[0] <= V2.vector4_f32[0]) && + (V1.vector4_f32[1] <= V2.vector4_f32[1]) && + (V1.vector4_f32[2] <= V2.vector4_f32[2])) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgtq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + uint32_t r = + vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; uint32_t CR = 0; - if (r == 0xFFFFFFU) - { + if (r == 0xFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -9215,12 +8494,9 @@ inline uint32_t XM_CALLCONV XMVector3GreaterR XMVECTOR vTemp = _mm_cmpgt_ps(V1, V2); uint32_t CR = 0; int iTest = _mm_movemask_ps(vTemp) & 7; - if (iTest == 7) - { + if (iTest == 7) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -9229,19 +8505,20 @@ inline uint32_t XM_CALLCONV XMVector3GreaterR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3GreaterOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3GreaterOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1]) && (V1.vector4_f32[2] >= V2.vector4_f32[2])) != 0); + return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && + (V1.vector4_f32[1] >= V2.vector4_f32[1]) && + (V1.vector4_f32[2] >= V2.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgeq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpge_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 7) == 7) != 0); @@ -9250,42 +8527,35 @@ inline bool XM_CALLCONV XMVector3GreaterOrEqual //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector3GreaterOrEqualR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector3GreaterOrEqualR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1]) && - (V1.vector4_f32[2] >= V2.vector4_f32[2])) - { + (V1.vector4_f32[2] >= V2.vector4_f32[2])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && - (V1.vector4_f32[1] < V2.vector4_f32[1]) && - (V1.vector4_f32[2] < V2.vector4_f32[2])) - { + } else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1]) && + (V1.vector4_f32[2] < V2.vector4_f32[2])) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgeq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + uint32_t r = + vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU; uint32_t CR = 0; - if (r == 0xFFFFFFU) - { + if (r == 0xFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -9293,12 +8563,9 @@ inline uint32_t XM_CALLCONV XMVector3GreaterOrEqualR XMVECTOR vTemp = _mm_cmpge_ps(V1, V2); uint32_t CR = 0; int iTest = _mm_movemask_ps(vTemp) & 7; - if (iTest == 7) - { + if (iTest == 7) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -9307,19 +8574,19 @@ inline uint32_t XM_CALLCONV XMVector3GreaterOrEqualR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3Less -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3Less(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && (V1.vector4_f32[1] < V2.vector4_f32[1]) && (V1.vector4_f32[2] < V2.vector4_f32[2])) != 0); + return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1]) && + (V1.vector4_f32[2] < V2.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcltq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmplt_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 7) == 7) != 0); @@ -9328,19 +8595,20 @@ inline bool XM_CALLCONV XMVector3Less //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3LessOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector3LessOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && (V1.vector4_f32[1] <= V2.vector4_f32[1]) && (V1.vector4_f32[2] <= V2.vector4_f32[2])) != 0); + return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && + (V1.vector4_f32[1] <= V2.vector4_f32[1]) && + (V1.vector4_f32[2] <= V2.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcleq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmple_ps(V1, V2); return (((_mm_movemask_ps(vTemp) & 7) == 7) != 0); @@ -9349,16 +8617,15 @@ inline bool XM_CALLCONV XMVector3LessOrEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3InBounds -( - FXMVECTOR V, - FXMVECTOR Bounds -) noexcept -{ +inline bool XM_CALLCONV XMVector3InBounds(FXMVECTOR V, + FXMVECTOR Bounds) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && - (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && - (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2])) != 0); + return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && + V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && + V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && + (V.vector4_f32[2] <= Bounds.vector4_f32[2] && + V.vector4_f32[2] >= -Bounds.vector4_f32[2])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) // Test if less than or equal uint32x4_t ivTemp1 = vcleq_f32(V, Bounds); @@ -9369,9 +8636,12 @@ inline bool XM_CALLCONV XMVector3InBounds // Blend answers ivTemp1 = vandq_u32(ivTemp1, ivTemp2); // in bounds? - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(ivTemp1)), vget_high_u8(vreinterpretq_u8_u32(ivTemp1))); - uint16x4x2_t vTemp3 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp3.val[1]), 1) & 0xFFFFFFU) == 0xFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(ivTemp1)), + vget_high_u8(vreinterpretq_u8_u32(ivTemp1))); + uint16x4x2_t vTemp3 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp3.val[1]), 1) & + 0xFFFFFFU) == 0xFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) // Test if less than or equal XMVECTOR vTemp1 = _mm_cmple_ps(V, Bounds); @@ -9390,29 +8660,32 @@ inline bool XM_CALLCONV XMVector3InBounds //------------------------------------------------------------------------------ -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(push) #pragma float_control(precise, on) #endif -inline bool XM_CALLCONV XMVector3IsNaN(FXMVECTOR V) noexcept -{ +inline bool XM_CALLCONV XMVector3IsNaN(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (XMISNAN(V.vector4_f32[0]) || - XMISNAN(V.vector4_f32[1]) || - XMISNAN(V.vector4_f32[2])); + return (XMISNAN(V.vector4_f32[0]) || XMISNAN(V.vector4_f32[1]) || + XMISNAN(V.vector4_f32[2])); #elif defined(_XM_ARM_NEON_INTRINSICS_) #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) - return isnan(vgetq_lane_f32(V, 0)) || isnan(vgetq_lane_f32(V, 1)) || isnan(vgetq_lane_f32(V, 2)); + return isnan(vgetq_lane_f32(V, 0)) || isnan(vgetq_lane_f32(V, 1)) || + isnan(vgetq_lane_f32(V, 2)); #else -// Test against itself. NaN is always not equal + // Test against itself. NaN is always not equal uint32x4_t vTempNan = vceqq_f32(V, V); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempNan)), vget_high_u8(vreinterpretq_u8_u32(vTempNan))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempNan)), + vget_high_u8(vreinterpretq_u8_u32(vTempNan))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); // If x or y or z are NaN, the mask is zero - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) != 0xFFFFFFU); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) != 0xFFFFFFU); #endif #elif defined(_XM_SSE_INTRINSICS_) #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) @@ -9420,7 +8693,7 @@ inline bool XM_CALLCONV XMVector3IsNaN(FXMVECTOR V) noexcept _mm_store_ps(tmp, V); return isnan(tmp[0]) || isnan(tmp[1]) || isnan(tmp[2]); #else -// Test against itself. NaN is always not equal + // Test against itself. NaN is always not equal XMVECTOR vTempNan = _mm_cmpneq_ps(V, V); // If x or y or z are NaN, the mask is non-zero return ((_mm_movemask_ps(vTempNan) & 7) != 0); @@ -9428,27 +8701,29 @@ inline bool XM_CALLCONV XMVector3IsNaN(FXMVECTOR V) noexcept #endif } -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(pop) #endif //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector3IsInfinite(FXMVECTOR V) noexcept -{ +inline bool XM_CALLCONV XMVector3IsInfinite(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (XMISINF(V.vector4_f32[0]) || - XMISINF(V.vector4_f32[1]) || - XMISINF(V.vector4_f32[2])); + return (XMISINF(V.vector4_f32[0]) || XMISINF(V.vector4_f32[1]) || + XMISINF(V.vector4_f32[2])); #elif defined(_XM_ARM_NEON_INTRINSICS_) // Mask off the sign bit uint32x4_t vTempInf = vandq_u32(vreinterpretq_u32_f32(V), g_XMAbsMask); // Compare to infinity vTempInf = vceqq_f32(vreinterpretq_f32_u32(vTempInf), g_XMInfinity); // If any are infinity, the signs are true. - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempInf)), vget_high_u8(vreinterpretq_u8_u32(vTempInf))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & 0xFFFFFFU) != 0); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempInf)), + vget_high_u8(vreinterpretq_u8_u32(vTempInf))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return ((vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) & + 0xFFFFFFU) != 0); #elif defined(_XM_SSE_INTRINSICS_) // Mask off the sign bit __m128 vTemp = _mm_and_ps(V, g_XMAbsMask); @@ -9465,19 +8740,13 @@ inline bool XM_CALLCONV XMVector3IsInfinite(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Dot -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Dot(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - float fValue = V1.vector4_f32[0] * V2.vector4_f32[0] + V1.vector4_f32[1] * V2.vector4_f32[1] + V1.vector4_f32[2] * V2.vector4_f32[2]; + float fValue = V1.vector4_f32[0] * V2.vector4_f32[0] + + V1.vector4_f32[1] * V2.vector4_f32[1] + + V1.vector4_f32[2] * V2.vector4_f32[2]; XMVECTORF32 vResult; - vResult.f[0] = - vResult.f[1] = - vResult.f[2] = - vResult.f[3] = fValue; + vResult.f[0] = vResult.f[1] = vResult.f[2] = vResult.f[3] = fValue; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t vTemp = vmulq_f32(V1, V2); @@ -9512,21 +8781,18 @@ inline XMVECTOR XM_CALLCONV XMVector3Dot //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Cross -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Cross(FXMVECTOR V1, + FXMVECTOR V2) noexcept { // [ V1.y*V2.z - V1.z*V2.y, V1.z*V2.x - V1.x*V2.z, V1.x*V2.y - V1.y*V2.x ] #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - (V1.vector4_f32[1] * V2.vector4_f32[2]) - (V1.vector4_f32[2] * V2.vector4_f32[1]), - (V1.vector4_f32[2] * V2.vector4_f32[0]) - (V1.vector4_f32[0] * V2.vector4_f32[2]), - (V1.vector4_f32[0] * V2.vector4_f32[1]) - (V1.vector4_f32[1] * V2.vector4_f32[0]), - 0.0f - } } }; + XMVECTORF32 vResult = {{{(V1.vector4_f32[1] * V2.vector4_f32[2]) - + (V1.vector4_f32[2] * V2.vector4_f32[1]), + (V1.vector4_f32[2] * V2.vector4_f32[0]) - + (V1.vector4_f32[0] * V2.vector4_f32[2]), + (V1.vector4_f32[0] * V2.vector4_f32[1]) - + (V1.vector4_f32[1] * V2.vector4_f32[0]), + 0.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t v1xy = vget_low_f32(V1); @@ -9538,10 +8804,14 @@ inline XMVECTOR XM_CALLCONV XMVector3Cross float32x2_t v1zz = vdup_lane_f32(vget_high_f32(V1), 0); float32x2_t v2zz = vdup_lane_f32(vget_high_f32(V2), 0); - XMVECTOR vResult = vmulq_f32(vcombine_f32(v1yx, v1xy), vcombine_f32(v2zz, v2yx)); - vResult = vmlsq_f32(vResult, vcombine_f32(v1zz, v1yx), vcombine_f32(v2yx, v2xy)); - vResult = vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(vResult), g_XMFlipY)); - return vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(vResult), g_XMMask3)); + XMVECTOR vResult = + vmulq_f32(vcombine_f32(v1yx, v1xy), vcombine_f32(v2zz, v2yx)); + vResult = + vmlsq_f32(vResult, vcombine_f32(v1zz, v1yx), vcombine_f32(v2yx, v2xy)); + vResult = vreinterpretq_f32_u32( + veorq_u32(vreinterpretq_u32_f32(vResult), g_XMFlipY)); + return vreinterpretq_f32_u32( + vandq_u32(vreinterpretq_u32_f32(vResult), g_XMMask3)); #elif defined(_XM_SSE_INTRINSICS_) // y1,z1,x1,w1 XMVECTOR vTemp1 = XM_PERMUTE_PS(V1, _MM_SHUFFLE(3, 0, 2, 1)); @@ -9562,15 +8832,13 @@ inline XMVECTOR XM_CALLCONV XMVector3Cross //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3LengthSq(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3LengthSq(FXMVECTOR V) noexcept { return XMVector3Dot(V, V); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3ReciprocalLengthEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3ReciprocalLengthEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -9622,8 +8890,7 @@ inline XMVECTOR XM_CALLCONV XMVector3ReciprocalLengthEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3ReciprocalLength(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3ReciprocalLength(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -9642,12 +8909,12 @@ inline XMVECTOR XM_CALLCONV XMVector3ReciprocalLength(FXMVECTOR V) noexcept v2 = vdup_lane_f32(v2, 0); v1 = vadd_f32(v1, v2); // Reciprocal sqrt - float32x2_t S0 = vrsqrte_f32(v1); - float32x2_t P0 = vmul_f32(v1, S0); - float32x2_t R0 = vrsqrts_f32(P0, S0); - float32x2_t S1 = vmul_f32(S0, R0); - float32x2_t P1 = vmul_f32(v1, S1); - float32x2_t R1 = vrsqrts_f32(P1, S1); + float32x2_t S0 = vrsqrte_f32(v1); + float32x2_t P0 = vmul_f32(v1, S0); + float32x2_t R0 = vrsqrts_f32(P0, S0); + float32x2_t S1 = vmul_f32(S0, R0); + float32x2_t P1 = vmul_f32(v1, S1); + float32x2_t R1 = vrsqrts_f32(P1, S1); float32x2_t Result = vmul_f32(S1, R1); return vcombine_f32(Result, Result); #elif defined(_XM_SSE4_INTRINSICS_) @@ -9685,8 +8952,7 @@ inline XMVECTOR XM_CALLCONV XMVector3ReciprocalLength(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3LengthEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3LengthEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -9742,8 +9008,7 @@ inline XMVECTOR XM_CALLCONV XMVector3LengthEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Length(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Length(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -9807,8 +9072,7 @@ inline XMVECTOR XM_CALLCONV XMVector3Length(FXMVECTOR V) noexcept // XMVector3NormalizeEst uses a reciprocal estimate and // returns QNaN on zero and infinite vectors. -inline XMVECTOR XM_CALLCONV XMVector3NormalizeEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3NormalizeEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -9863,8 +9127,7 @@ inline XMVECTOR XM_CALLCONV XMVector3NormalizeEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Normalize(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Normalize(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) float fLength; XMVECTOR vResult; @@ -9873,8 +9136,7 @@ inline XMVECTOR XM_CALLCONV XMVector3Normalize(FXMVECTOR V) noexcept fLength = vResult.vector4_f32[0]; // Prevent divide by zero - if (fLength > 0) - { + if (fLength > 0) { fLength = 1.0f / fLength; } @@ -9904,7 +9166,8 @@ inline XMVECTOR XM_CALLCONV XMVector3Normalize(FXMVECTOR V) noexcept v2 = vmul_f32(S1, R1); // Normalize XMVECTOR vResult = vmulq_f32(V, vcombine_f32(v2, v2)); - vResult = vbslq_f32(vcombine_u32(VEqualsZero, VEqualsZero), vdupq_n_f32(0), vResult); + vResult = vbslq_f32(vcombine_u32(VEqualsZero, VEqualsZero), vdupq_n_f32(0), + vResult); return vbslq_f32(vcombine_u32(VEqualsInf, VEqualsInf), g_XMQNaN, vResult); #elif defined(_XM_SSE4_INTRINSICS_) XMVECTOR vLengthSq = _mm_dp_ps(V, V, 0x7f); @@ -9981,13 +9244,8 @@ inline XMVECTOR XM_CALLCONV XMVector3Normalize(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3ClampLength -( - FXMVECTOR V, - float LengthMin, - float LengthMax -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3ClampLength(FXMVECTOR V, float LengthMin, + float LengthMax) noexcept { XMVECTOR ClampMax = XMVectorReplicate(LengthMax); XMVECTOR ClampMin = XMVectorReplicate(LengthMin); @@ -9996,15 +9254,12 @@ inline XMVECTOR XM_CALLCONV XMVector3ClampLength //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3ClampLengthV -( - FXMVECTOR V, - FXMVECTOR LengthMin, - FXMVECTOR LengthMax -) noexcept -{ - assert((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin)) && (XMVectorGetZ(LengthMin) == XMVectorGetX(LengthMin))); - assert((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax)) && (XMVectorGetZ(LengthMax) == XMVectorGetX(LengthMax))); +inline XMVECTOR XM_CALLCONV XMVector3ClampLengthV( + FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax) noexcept { + assert((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin)) && + (XMVectorGetZ(LengthMin) == XMVectorGetX(LengthMin))); + assert((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax)) && + (XMVectorGetZ(LengthMax) == XMVectorGetX(LengthMax))); assert(XMVector3GreaterOrEqual(LengthMin, XMVectorZero())); assert(XMVector3GreaterOrEqual(LengthMax, XMVectorZero())); assert(XMVector3GreaterOrEqual(LengthMax, LengthMin)); @@ -10034,7 +9289,8 @@ inline XMVECTOR XM_CALLCONV XMVector3ClampLengthV XMVECTOR Result = XMVectorMultiply(Normal, ClampLength); - // Preserve the original vector (with no precision loss) if the length falls within the given range + // Preserve the original vector (with no precision loss) if the length falls + // within the given range XMVECTOR Control = XMVectorEqualInt(ControlMax, ControlMin); Result = XMVectorSelect(Result, V, Control); @@ -10043,12 +9299,8 @@ inline XMVECTOR XM_CALLCONV XMVector3ClampLengthV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Reflect -( - FXMVECTOR Incident, - FXMVECTOR Normal -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Reflect(FXMVECTOR Incident, + FXMVECTOR Normal) noexcept { // Result = Incident - (2 * dot(Incident, Normal)) * Normal XMVECTOR Result = XMVector3Dot(Incident, Normal); @@ -10060,32 +9312,24 @@ inline XMVECTOR XM_CALLCONV XMVector3Reflect //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Refract -( - FXMVECTOR Incident, - FXMVECTOR Normal, - float RefractionIndex -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Refract(FXMVECTOR Incident, + FXMVECTOR Normal, + float RefractionIndex) noexcept { XMVECTOR Index = XMVectorReplicate(RefractionIndex); return XMVector3RefractV(Incident, Normal, Index); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3RefractV -( - FXMVECTOR Incident, - FXMVECTOR Normal, - FXMVECTOR RefractionIndex -) noexcept -{ - // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + - // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) +inline XMVECTOR XM_CALLCONV XMVector3RefractV( + FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex) noexcept { + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * + // dot(Incident, Normal) + sqrt(1 - RefractionIndex * RefractionIndex * (1 - + // dot(Incident, Normal) * dot(Incident, Normal)))) #if defined(_XM_NO_INTRINSICS_) - const XMVECTOR Zero = XMVectorZero(); + const XMVECTOR Zero = XMVectorZero(); XMVECTOR IDotN = XMVector3Dot(Incident, Normal); @@ -10094,13 +9338,10 @@ inline XMVECTOR XM_CALLCONV XMVector3RefractV R = XMVectorMultiply(R, RefractionIndex); R = XMVectorNegativeMultiplySubtract(R, RefractionIndex, g_XMOne.v); - if (XMVector4LessOrEqual(R, Zero)) - { + if (XMVector4LessOrEqual(R, Zero)) { // Total internal reflection return Zero; - } - else - { + } else { // R = RefractionIndex * IDotN + sqrt(R) R = XMVectorSqrt(R); R = XMVectorMultiplyAdd(RefractionIndex, IDotN, R); @@ -10121,17 +9362,16 @@ inline XMVECTOR XM_CALLCONV XMVector3RefractV R = vmlsq_f32(g_XMOne, R, RefractionIndex); uint32x4_t isrzero = vcleq_f32(R, g_XMZero); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(isrzero)), vget_high_u8(vreinterpretq_u8_u32(isrzero))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(isrzero)), + vget_high_u8(vreinterpretq_u8_u32(isrzero))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); float32x4_t vResult; - if (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU) - { + if (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU) { // Total internal reflection vResult = g_XMZero; - } - else - { + } else { // Sqrt(R) float32x4_t S0 = vrsqrteq_f32(R); float32x4_t P0 = vmulq_f32(R, S0); @@ -10149,8 +9389,9 @@ inline XMVECTOR XM_CALLCONV XMVector3RefractV } return vResult; #elif defined(_XM_SSE_INTRINSICS_) - // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + - // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * + // dot(Incident, Normal) + sqrt(1 - RefractionIndex * RefractionIndex * (1 - + // dot(Incident, Normal) * dot(Incident, Normal)))) XMVECTOR IDotN = XMVector3Dot(Incident, Normal); // R = 1.0f - RefractionIndex * RefractionIndex * (1.0f - IDotN * IDotN) XMVECTOR R = XM_FNMADD_PS(IDotN, IDotN, g_XMOne); @@ -10158,13 +9399,10 @@ inline XMVECTOR XM_CALLCONV XMVector3RefractV R = XM_FNMADD_PS(R, R2, g_XMOne); XMVECTOR vResult = _mm_cmple_ps(R, g_XMZero); - if (_mm_movemask_ps(vResult) == 0x0f) - { + if (_mm_movemask_ps(vResult) == 0x0f) { // Total internal reflection vResult = g_XMZero; - } - else - { + } else { // R = RefractionIndex * IDotN + sqrt(R) R = _mm_sqrt_ps(R); R = XM_FMADD_PS(RefractionIndex, IDotN, R); @@ -10178,11 +9416,12 @@ inline XMVECTOR XM_CALLCONV XMVector3RefractV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Orthogonal(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Orthogonal(FXMVECTOR V) noexcept { XMVECTOR Zero = XMVectorZero(); XMVECTOR Z = XMVectorSplatZ(V); - XMVECTOR YZYY = XMVectorSwizzle(V); + XMVECTOR YZYY = + XMVectorSwizzle( + V); XMVECTOR NegativeV = XMVectorSubtract(Zero, V); @@ -10194,20 +9433,18 @@ inline XMVECTOR XM_CALLCONV XMVector3Orthogonal(FXMVECTOR V) noexcept XMVECTOR Select = XMVectorEqualInt(ZIsNegative, YZYYIsNegative); - XMVECTOR R0 = XMVectorPermute(NegativeV, S); - XMVECTOR R1 = XMVectorPermute(V, D); + XMVECTOR R0 = XMVectorPermute(NegativeV, S); + XMVECTOR R1 = XMVectorPermute(V, D); return XMVectorSelect(R1, R0, Select); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3AngleBetweenNormalsEst -( - FXMVECTOR N1, - FXMVECTOR N2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector3AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2) noexcept { XMVECTOR Result = XMVector3Dot(N1, N2); Result = XMVectorClamp(Result, g_XMNegativeOne.v, g_XMOne.v); Result = XMVectorACosEst(Result); @@ -10216,12 +9453,8 @@ inline XMVECTOR XM_CALLCONV XMVector3AngleBetweenNormalsEst //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3AngleBetweenNormals -( - FXMVECTOR N1, - FXMVECTOR N2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector3AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2) noexcept { XMVECTOR Result = XMVector3Dot(N1, N2); Result = XMVectorClamp(Result, g_XMNegativeOne.v, g_XMOne.v); Result = XMVectorACos(Result); @@ -10230,12 +9463,8 @@ inline XMVECTOR XM_CALLCONV XMVector3AngleBetweenNormals //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3AngleBetweenVectors -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector3AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2) noexcept { XMVECTOR L1 = XMVector3ReciprocalLength(V1); XMVECTOR L2 = XMVector3ReciprocalLength(V2); @@ -10251,19 +9480,15 @@ inline XMVECTOR XM_CALLCONV XMVector3AngleBetweenVectors //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3LinePointDistance -( - FXMVECTOR LinePoint1, - FXMVECTOR LinePoint2, - FXMVECTOR Point -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3LinePointDistance( + FXMVECTOR LinePoint1, FXMVECTOR LinePoint2, FXMVECTOR Point) noexcept { // Given a vector PointVector from LinePoint1 to Point and a vector // LineVector from LinePoint1 to LinePoint2, the scaled distance // PointProjectionScale from LinePoint1 to the perpendicular projection // of PointVector onto the line is defined as: // - // PointProjectionScale = dot(PointVector, LineVector) / LengthSq(LineVector) + // PointProjectionScale = dot(PointVector, LineVector) / + // LengthSq(LineVector) XMVECTOR PointVector = XMVectorSubtract(Point, LinePoint1); XMVECTOR LineVector = XMVectorSubtract(LinePoint2, LinePoint1); @@ -10273,7 +9498,8 @@ inline XMVECTOR XM_CALLCONV XMVector3LinePointDistance XMVECTOR PointProjectionScale = XMVector3Dot(PointVector, LineVector); PointProjectionScale = XMVectorDivide(PointProjectionScale, LengthSq); - XMVECTOR DistanceVector = XMVectorMultiply(LineVector, PointProjectionScale); + XMVECTOR DistanceVector = + XMVectorMultiply(LineVector, PointProjectionScale); DistanceVector = XMVectorSubtract(PointVector, DistanceVector); return XMVector3Length(DistanceVector); @@ -10281,15 +9507,9 @@ inline XMVECTOR XM_CALLCONV XMVector3LinePointDistance //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMVector3ComponentsFromNormal -( - XMVECTOR* pParallel, - XMVECTOR* pPerpendicular, - FXMVECTOR V, - FXMVECTOR Normal -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMVector3ComponentsFromNormal(XMVECTOR* pParallel, XMVECTOR* pPerpendicular, + FXMVECTOR V, FXMVECTOR Normal) noexcept { assert(pParallel != nullptr); assert(pPerpendicular != nullptr); @@ -10304,12 +9524,8 @@ inline void XM_CALLCONV XMVector3ComponentsFromNormal //------------------------------------------------------------------------------ // Transform a vector using a rotation expressed as a unit quaternion -inline XMVECTOR XM_CALLCONV XMVector3Rotate -( - FXMVECTOR V, - FXMVECTOR RotationQuaternion -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector3Rotate(FXMVECTOR V, FXMVECTOR RotationQuaternion) noexcept { XMVECTOR A = XMVectorSelect(g_XMSelect1110.v, V, g_XMSelect1110.v); XMVECTOR Q = XMQuaternionConjugate(RotationQuaternion); XMVECTOR Result = XMQuaternionMultiply(Q, A); @@ -10317,14 +9533,11 @@ inline XMVECTOR XM_CALLCONV XMVector3Rotate } //------------------------------------------------------------------------------ -// Transform a vector using the inverse of a rotation expressed as a unit quaternion +// Transform a vector using the inverse of a rotation expressed as a unit +// quaternion -inline XMVECTOR XM_CALLCONV XMVector3InverseRotate -( - FXMVECTOR V, - FXMVECTOR RotationQuaternion -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector3InverseRotate(FXMVECTOR V, FXMVECTOR RotationQuaternion) noexcept { XMVECTOR A = XMVectorSelect(g_XMSelect1110.v, V, g_XMSelect1110.v); XMVECTOR Result = XMQuaternionMultiply(RotationQuaternion, A); XMVECTOR Q = XMQuaternionConjugate(RotationQuaternion); @@ -10333,12 +9546,8 @@ inline XMVECTOR XM_CALLCONV XMVector3InverseRotate //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Transform -( - FXMVECTOR V, - FXMMATRIX M -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Transform(FXMVECTOR V, + FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Z = XMVectorSplatZ(V); @@ -10353,15 +9562,15 @@ inline XMVECTOR XM_CALLCONV XMVector3Transform #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); - XMVECTOR vResult = vmlaq_lane_f32(M.r[3], M.r[0], VL, 0); // X - vResult = vmlaq_lane_f32(vResult, M.r[1], VL, 1); // Y - return vmlaq_lane_f32(vResult, M.r[2], vget_high_f32(V), 0); // Z + XMVECTOR vResult = vmlaq_lane_f32(M.r[3], M.r[0], VL, 0); // X + vResult = vmlaq_lane_f32(vResult, M.r[1], VL, 1); // Y + return vmlaq_lane_f32(vResult, M.r[2], vget_high_f32(V), 0); // Z #elif defined(_XM_SSE_INTRINSICS_) - XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); // Z + XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); // Z vResult = XM_FMADD_PS(vResult, M.r[2], M.r[3]); - XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y + XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y vResult = XM_FMADD_PS(vTemp, M.r[1], vResult); - vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X + vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X vResult = XM_FMADD_PS(vTemp, M.r[0], vResult); return vResult; #endif @@ -10371,20 +9580,12 @@ inline XMVECTOR XM_CALLCONV XMVector3Transform #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307" ) +#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307") #endif -_Use_decl_annotations_ -inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream -( - XMFLOAT4* pOutputStream, - size_t OutputStride, - const XMFLOAT3* pInputStream, - size_t InputStride, - size_t VectorCount, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream( + XMFLOAT4* pOutputStream, size_t OutputStride, const XMFLOAT3* pInputStream, + size_t InputStride, size_t VectorCount, FXMMATRIX M) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -10404,9 +9605,9 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream const XMVECTOR row2 = M.r[2]; const XMVECTOR row3 = M.r[3]; - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); XMVECTOR Z = XMVectorSplatZ(V); XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); @@ -10434,50 +9635,57 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT3)) && (OutputStride == sizeof(XMFLOAT4))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x3_t V = vld3q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT3)) && + (OutputStride == sizeof(XMFLOAT4))) { + for (size_t j = 0; j < four; ++j) { + float32x4x3_t V = + vld3q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT3) * 4; float32x2_t r3 = vget_low_f32(row3); float32x2_t r = vget_low_f32(row0); - XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Ax+M - XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Bx+N + XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Ax+M + XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), + V.val[0], r, 1); // Bx+N XM_PREFETCH(pInputVector); r3 = vget_high_f32(row3); r = vget_high_f32(row0); - XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Cx+O - XMVECTOR vResult3 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Dx+P + XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Cx+O + XMVECTOR vResult3 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), + V.val[0], r, 1); // Dx+P XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(row1); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(row1); - vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O - vResult3 = vmlaq_lane_f32(vResult3, V.val[1], r, 1); // Dx+Hy+P + vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O + vResult3 = vmlaq_lane_f32(vResult3, V.val[1], r, 1); // Dx+Hy+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); r = vget_low_f32(row2); - vResult0 = vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz+N + vResult0 = + vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz+M + vResult1 = + vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 4)); r = vget_high_f32(row2); - vResult2 = vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz+O - vResult3 = vmlaq_lane_f32(vResult3, V.val[2], r, 1); // Dx+Hy+Lz+P + vResult2 = + vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz+O + vResult3 = + vmlaq_lane_f32(vResult3, V.val[2], r, 1); // Dx+Hy+Lz+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 5)); @@ -10495,16 +9703,16 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream } } - for (; i < VectorCount; i++) - { + for (; i < VectorCount; i++) { float32x2_t VL = vld1_f32(reinterpret_cast(pInputVector)); float32x2_t zero = vdup_n_f32(0); - float32x2_t VH = vld1_lane_f32(reinterpret_cast(pInputVector) + 2, zero, 0); + float32x2_t VH = vld1_lane_f32( + reinterpret_cast(pInputVector) + 2, zero, 0); pInputVector += InputStride; - XMVECTOR vResult = vmlaq_lane_f32(row3, row0, VL, 0); // X - vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y - vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z + XMVECTOR vResult = vmlaq_lane_f32(row3, row0, VL, 0); // X + vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y + vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z vst1q_f32(reinterpret_cast(pOutputVector), vResult); pOutputVector += OutputStride; @@ -10522,18 +9730,18 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(XMFLOAT3)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF) && !(OutputStride & 0xF)) - { + if (four > 0) { + if (InputStride == sizeof(XMFLOAT3)) { + if (!(reinterpret_cast(pOutputStream) & 0xF) && + !(OutputStride & 0xF)) { // Packed input, aligned output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -10549,7 +9757,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream XMVECTOR vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 2 @@ -10562,7 +9771,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 3 @@ -10575,7 +9785,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 4 @@ -10588,20 +9799,21 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 4; } - } - else - { + } else { // Packed input, unaligned output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -10617,7 +9829,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream XMVECTOR vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 2 @@ -10630,7 +9843,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 3 @@ -10643,7 +9857,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 4 @@ -10656,7 +9871,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream vTemp3 = _mm_mul_ps(X, row0); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - _mm_storeu_ps(reinterpret_cast(pOutputVector), vTemp); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 4; @@ -10665,12 +9881,12 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream } } - if (!(reinterpret_cast(pOutputStream) & 0xF) && !(OutputStride & 0xF)) - { + if (!(reinterpret_cast(pOutputStream) & 0xF) && + !(OutputStride & 0xF)) { // Aligned output - for (; i < VectorCount; ++i) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (; i < VectorCount; ++i) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR Z = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); @@ -10686,13 +9902,11 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream XM_STREAM_PS(reinterpret_cast(pOutputVector), vTemp); pOutputVector += OutputStride; } - } - else - { + } else { // Unaligned output - for (; i < VectorCount; ++i) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (; i < VectorCount; ++i) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR Z = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); @@ -10722,12 +9936,8 @@ inline XMFLOAT4* XM_CALLCONV XMVector3TransformStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3TransformCoord -( - FXMVECTOR V, - FXMMATRIX M -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3TransformCoord(FXMVECTOR V, + FXMMATRIX M) noexcept { XMVECTOR Z = XMVectorSplatZ(V); XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); @@ -10744,20 +9954,13 @@ inline XMVECTOR XM_CALLCONV XMVector3TransformCoord #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307" ) +#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307") #endif -_Use_decl_annotations_ -inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream -( - XMFLOAT3* pOutputStream, - size_t OutputStride, - const XMFLOAT3* pInputStream, - size_t InputStride, - size_t VectorCount, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT3* XM_CALLCONV +XMVector3TransformCoordStream(XMFLOAT3* pOutputStream, size_t OutputStride, + const XMFLOAT3* pInputStream, size_t InputStride, + size_t VectorCount, FXMMATRIX M) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -10777,9 +9980,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream const XMVECTOR row2 = M.r[2]; const XMVECTOR row3 = M.r[3]; - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); XMVECTOR Z = XMVectorSplatZ(V); XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); @@ -10811,59 +10014,66 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT3)) && (OutputStride == sizeof(XMFLOAT3))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x3_t V = vld3q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT3)) && + (OutputStride == sizeof(XMFLOAT3))) { + for (size_t j = 0; j < four; ++j) { + float32x4x3_t V = + vld3q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT3) * 4; float32x2_t r3 = vget_low_f32(row3); float32x2_t r = vget_low_f32(row0); - XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Ax+M - XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Bx+N + XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Ax+M + XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), + V.val[0], r, 1); // Bx+N XM_PREFETCH(pInputVector); r3 = vget_high_f32(row3); r = vget_high_f32(row0); - XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Cx+O - XMVECTOR W = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Dx+P + XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Cx+O + XMVECTOR W = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, + 1); // Dx+P XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(row1); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(row1); - vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O - W = vmlaq_lane_f32(W, V.val[1], r, 1); // Dx+Hy+P + vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O + W = vmlaq_lane_f32(W, V.val[1], r, 1); // Dx+Hy+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); r = vget_low_f32(row2); - vResult0 = vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz+N + vResult0 = + vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz+M + vResult1 = + vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 4)); r = vget_high_f32(row2); - vResult2 = vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz+O - W = vmlaq_lane_f32(W, V.val[2], r, 1); // Dx+Hy+Lz+P + vResult2 = + vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz+O + W = vmlaq_lane_f32(W, V.val[2], r, 1); // Dx+Hy+Lz+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 5)); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ V.val[0] = vdivq_f32(vResult0, W); V.val[1] = vdivq_f32(vResult1, W); V.val[2] = vdivq_f32(vResult2, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal +#else + // 2 iterations of Newton-Raphson refinement of reciprocal float32x4_t Reciprocal = vrecpeq_f32(W); float32x4_t S = vrecpsq_f32(Reciprocal, W); Reciprocal = vmulq_f32(S, Reciprocal); @@ -10873,7 +10083,7 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream V.val[0] = vmulq_f32(vResult0, Reciprocal); V.val[1] = vmulq_f32(vResult1, Reciprocal); V.val[2] = vmulq_f32(vResult2, Reciprocal); - #endif +#endif vst3q_f32(reinterpret_cast(pOutputVector), V); pOutputVector += sizeof(XMFLOAT3) * 4; @@ -10883,24 +10093,25 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream } } - for (; i < VectorCount; i++) - { + for (; i < VectorCount; i++) { float32x2_t VL = vld1_f32(reinterpret_cast(pInputVector)); float32x2_t zero = vdup_n_f32(0); - float32x2_t VH = vld1_lane_f32(reinterpret_cast(pInputVector) + 2, zero, 0); + float32x2_t VH = vld1_lane_f32( + reinterpret_cast(pInputVector) + 2, zero, 0); pInputVector += InputStride; - XMVECTOR vResult = vmlaq_lane_f32(row3, row0, VL, 0); // X - vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y - vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z + XMVECTOR vResult = vmlaq_lane_f32(row3, row0, VL, 0); // X + vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y + vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z VH = vget_high_f32(vResult); XMVECTOR W = vdupq_lane_f32(VH, 1); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ vResult = vdivq_f32(vResult, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal for W +#else + // 2 iterations of Newton-Raphson refinement of reciprocal for W float32x4_t Reciprocal = vrecpeq_f32(W); float32x4_t S = vrecpsq_f32(Reciprocal, W); Reciprocal = vmulq_f32(S, Reciprocal); @@ -10908,7 +10119,7 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream Reciprocal = vmulq_f32(S, Reciprocal); vResult = vmulq_f32(vResult, Reciprocal); - #endif +#endif VL = vget_low_f32(vResult); vst1_f32(reinterpret_cast(pOutputVector), VL); @@ -10928,20 +10139,18 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(XMFLOAT3)) - { - if (OutputStride == sizeof(XMFLOAT3)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF)) - { + if (four > 0) { + if (InputStride == sizeof(XMFLOAT3)) { + if (OutputStride == sizeof(XMFLOAT3)) { + if (!(reinterpret_cast(pOutputStream) & 0xF)) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -10958,7 +10167,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); V1 = _mm_div_ps(vTemp, W); @@ -11009,21 +10219,25 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector), V1); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 16), vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 32), V3); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + V1); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 16), + vTemp); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } - } - else - { + } else { // Packed input, unaligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -11040,7 +10254,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); V1 = _mm_div_ps(vTemp, W); @@ -11091,22 +10306,26 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector), V1); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 16), vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 32), V3); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + V1); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 16), + vTemp); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -11126,7 +10345,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 2 @@ -11143,7 +10363,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 3 @@ -11160,7 +10381,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 4 @@ -11177,7 +10399,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 4; @@ -11186,9 +10409,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream } } - for (; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR Z = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); @@ -11221,12 +10444,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformCoordStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3TransformNormal -( - FXMVECTOR V, - FXMMATRIX M -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3TransformNormal(FXMVECTOR V, + FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Z = XMVectorSplatZ(V); @@ -11241,15 +10460,15 @@ inline XMVECTOR XM_CALLCONV XMVector3TransformNormal #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); - XMVECTOR vResult = vmulq_lane_f32(M.r[0], VL, 0); // X - vResult = vmlaq_lane_f32(vResult, M.r[1], VL, 1); // Y - return vmlaq_lane_f32(vResult, M.r[2], vget_high_f32(V), 0); // Z + XMVECTOR vResult = vmulq_lane_f32(M.r[0], VL, 0); // X + vResult = vmlaq_lane_f32(vResult, M.r[1], VL, 1); // Y + return vmlaq_lane_f32(vResult, M.r[2], vget_high_f32(V), 0); // Z #elif defined(_XM_SSE_INTRINSICS_) - XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); // Z + XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); // Z vResult = _mm_mul_ps(vResult, M.r[2]); - XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y + XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y vResult = XM_FMADD_PS(vTemp, M.r[1], vResult); - vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X + vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X vResult = XM_FMADD_PS(vTemp, M.r[0], vResult); return vResult; #endif @@ -11259,20 +10478,13 @@ inline XMVECTOR XM_CALLCONV XMVector3TransformNormal #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307" ) +#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307") #endif -_Use_decl_annotations_ -inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream -( - XMFLOAT3* pOutputStream, - size_t OutputStride, - const XMFLOAT3* pInputStream, - size_t InputStride, - size_t VectorCount, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT3* XM_CALLCONV +XMVector3TransformNormalStream(XMFLOAT3* pOutputStream, size_t OutputStride, + const XMFLOAT3* pInputStream, size_t InputStride, + size_t VectorCount, FXMMATRIX M) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -11291,9 +10503,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream const XMVECTOR row1 = M.r[1]; const XMVECTOR row2 = M.r[2]; - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); XMVECTOR Z = XMVectorSplatZ(V); XMVECTOR Y = XMVectorSplatY(V); XMVECTOR X = XMVectorSplatX(V); @@ -11320,45 +10532,47 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT3)) && (OutputStride == sizeof(XMFLOAT3))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x3_t V = vld3q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT3)) && + (OutputStride == sizeof(XMFLOAT3))) { + for (size_t j = 0; j < four; ++j) { + float32x4x3_t V = + vld3q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT3) * 4; float32x2_t r = vget_low_f32(row0); - XMVECTOR vResult0 = vmulq_lane_f32(V.val[0], r, 0); // Ax - XMVECTOR vResult1 = vmulq_lane_f32(V.val[0], r, 1); // Bx + XMVECTOR vResult0 = vmulq_lane_f32(V.val[0], r, 0); // Ax + XMVECTOR vResult1 = vmulq_lane_f32(V.val[0], r, 1); // Bx XM_PREFETCH(pInputVector); r = vget_high_f32(row0); - XMVECTOR vResult2 = vmulq_lane_f32(V.val[0], r, 0); // Cx + XMVECTOR vResult2 = vmulq_lane_f32(V.val[0], r, 0); // Cx XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(row1); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(row1); - vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy + vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); r = vget_low_f32(row2); - vResult0 = vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz - vResult1 = vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz + vResult0 = + vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz + vResult1 = + vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 4)); r = vget_high_f32(row2); - vResult2 = vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz + vResult2 = + vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 5)); @@ -11374,16 +10588,16 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream } } - for (; i < VectorCount; i++) - { + for (; i < VectorCount; i++) { float32x2_t VL = vld1_f32(reinterpret_cast(pInputVector)); float32x2_t zero = vdup_n_f32(0); - float32x2_t VH = vld1_lane_f32(reinterpret_cast(pInputVector) + 2, zero, 0); + float32x2_t VH = vld1_lane_f32( + reinterpret_cast(pInputVector) + 2, zero, 0); pInputVector += InputStride; - XMVECTOR vResult = vmulq_lane_f32(row0, VL, 0); // X - vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y - vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z + XMVECTOR vResult = vmulq_lane_f32(row0, VL, 0); // X + vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y + vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z VL = vget_low_f32(vResult); vst1_f32(reinterpret_cast(pOutputVector), VL); @@ -11402,20 +10616,18 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(XMFLOAT3)) - { - if (OutputStride == sizeof(XMFLOAT3)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF)) - { + if (four > 0) { + if (InputStride == sizeof(XMFLOAT3)) { + if (OutputStride == sizeof(XMFLOAT3)) { + if (!(reinterpret_cast(pOutputStream) & 0xF)) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -11467,21 +10679,25 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector), V1); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 16), vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 32), V3); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + V1); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 16), + vTemp); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } - } - else - { + } else { // Packed input, unaligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -11533,22 +10749,26 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector), V1); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 16), vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 32), V3); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + V1); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 16), + vTemp); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -11565,7 +10785,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 2 @@ -11579,7 +10800,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 3 @@ -11593,7 +10815,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 4 @@ -11607,7 +10830,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 4; @@ -11616,9 +10840,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream } } - for (; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR Z = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); @@ -11647,25 +10871,18 @@ inline XMFLOAT3* XM_CALLCONV XMVector3TransformNormalStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Project -( - FXMVECTOR V, - float ViewportX, - float ViewportY, - float ViewportWidth, - float ViewportHeight, - float ViewportMinZ, - float ViewportMaxZ, - FXMMATRIX Projection, - CXMMATRIX View, - CXMMATRIX World -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector3Project( + FXMVECTOR V, float ViewportX, float ViewportY, float ViewportWidth, + float ViewportHeight, float ViewportMinZ, float ViewportMaxZ, + FXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World) noexcept { const float HalfViewportWidth = ViewportWidth * 0.5f; const float HalfViewportHeight = ViewportHeight * 0.5f; - XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, ViewportMaxZ - ViewportMinZ, 0.0f); - XMVECTOR Offset = XMVectorSet(ViewportX + HalfViewportWidth, ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); + XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, 0.0f); + XMVECTOR Offset = + XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); XMMATRIX Transform = XMMatrixMultiply(World, View); Transform = XMMatrixMultiply(Transform, Projection); @@ -11681,28 +10898,15 @@ inline XMVECTOR XM_CALLCONV XMVector3Project #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307" ) +#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307") #endif -_Use_decl_annotations_ -inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream -( - XMFLOAT3* pOutputStream, - size_t OutputStride, - const XMFLOAT3* pInputStream, - size_t InputStride, - size_t VectorCount, - float ViewportX, - float ViewportY, - float ViewportWidth, - float ViewportHeight, - float ViewportMinZ, - float ViewportMaxZ, - FXMMATRIX Projection, - CXMMATRIX View, - CXMMATRIX World -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream( + XMFLOAT3* pOutputStream, size_t OutputStride, const XMFLOAT3* pInputStream, + size_t InputStride, size_t VectorCount, float ViewportX, float ViewportY, + float ViewportWidth, float ViewportHeight, float ViewportMinZ, + float ViewportMaxZ, FXMMATRIX Projection, CXMMATRIX View, + CXMMATRIX World) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -11717,8 +10921,11 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream const float HalfViewportWidth = ViewportWidth * 0.5f; const float HalfViewportHeight = ViewportHeight * 0.5f; - XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, ViewportMaxZ - ViewportMinZ, 1.0f); - XMVECTOR Offset = XMVectorSet(ViewportX + HalfViewportWidth, ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); + XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, 1.0f); + XMVECTOR Offset = + XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); XMMATRIX Transform = XMMatrixMultiply(World, View); Transform = XMMatrixMultiply(Transform, Projection); @@ -11726,9 +10933,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream auto pInputVector = reinterpret_cast(pInputStream); auto pOutputVector = reinterpret_cast(pOutputStream); - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); XMVECTOR Result = XMVector3TransformCoord(V, Transform); Result = XMVectorMultiplyAdd(Result, Scale, Offset); @@ -11753,10 +10960,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT3)) && (OutputStride == sizeof(XMFLOAT3))) - { + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT3)) && + (OutputStride == sizeof(XMFLOAT3))) { XMVECTOR ScaleX = vdupq_n_f32(HalfViewportWidth); XMVECTOR ScaleY = vdupq_n_f32(-HalfViewportHeight); XMVECTOR ScaleZ = vdupq_n_f32(ViewportMaxZ - ViewportMinZ); @@ -11765,55 +10971,63 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream XMVECTOR OffsetY = vdupq_n_f32(ViewportY + HalfViewportHeight); XMVECTOR OffsetZ = vdupq_n_f32(ViewportMinZ); - for (size_t j = 0; j < four; ++j) - { - float32x4x3_t V = vld3q_f32(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < four; ++j) { + float32x4x3_t V = + vld3q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT3) * 4; float32x2_t r3 = vget_low_f32(Transform.r[3]); float32x2_t r = vget_low_f32(Transform.r[0]); - XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Ax+M - XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Bx+N + XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Ax+M + XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), + V.val[0], r, 1); // Bx+N XM_PREFETCH(pInputVector); r3 = vget_high_f32(Transform.r[3]); r = vget_high_f32(Transform.r[0]); - XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), V.val[0], r, 0); // Cx+O - XMVECTOR W = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, 1); // Dx+P + XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), + V.val[0], r, 0); // Cx+O + XMVECTOR W = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), V.val[0], r, + 1); // Dx+P XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(Transform.r[1]); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey+M + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(Transform.r[1]); - vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O - W = vmlaq_lane_f32(W, V.val[1], r, 1); // Dx+Hy+P + vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy+O + W = vmlaq_lane_f32(W, V.val[1], r, 1); // Dx+Hy+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); r = vget_low_f32(Transform.r[2]); - vResult0 = vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz+M - vResult1 = vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz+N + vResult0 = + vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz+M + vResult1 = + vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 4)); r = vget_high_f32(Transform.r[2]); - vResult2 = vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz+O - W = vmlaq_lane_f32(W, V.val[2], r, 1); // Dx+Hy+Lz+P + vResult2 = + vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz+O + W = vmlaq_lane_f32(W, V.val[2], r, 1); // Dx+Hy+Lz+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 5)); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ vResult0 = vdivq_f32(vResult0, W); vResult1 = vdivq_f32(vResult1, W); vResult2 = vdivq_f32(vResult2, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal +#else + // 2 iterations of Newton-Raphson refinement of reciprocal float32x4_t Reciprocal = vrecpeq_f32(W); float32x4_t S = vrecpsq_f32(Reciprocal, W); Reciprocal = vmulq_f32(S, Reciprocal); @@ -11823,7 +11037,7 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream vResult0 = vmulq_f32(vResult0, Reciprocal); vResult1 = vmulq_f32(vResult1, Reciprocal); vResult2 = vmulq_f32(vResult2, Reciprocal); - #endif +#endif V.val[0] = vmlaq_f32(OffsetX, vResult0, ScaleX); V.val[1] = vmlaq_f32(OffsetY, vResult1, ScaleY); @@ -11837,29 +11051,34 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream } } - if (i < VectorCount) - { - XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, ViewportMaxZ - ViewportMinZ, 1.0f); - XMVECTOR Offset = XMVectorSet(ViewportX + HalfViewportWidth, ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); + if (i < VectorCount) { + XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, 1.0f); + XMVECTOR Offset = + XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); - for (; i < VectorCount; i++) - { - float32x2_t VL = vld1_f32(reinterpret_cast(pInputVector)); + for (; i < VectorCount; i++) { + float32x2_t VL = + vld1_f32(reinterpret_cast(pInputVector)); float32x2_t zero = vdup_n_f32(0); - float32x2_t VH = vld1_lane_f32(reinterpret_cast(pInputVector) + 2, zero, 0); + float32x2_t VH = vld1_lane_f32( + reinterpret_cast(pInputVector) + 2, zero, 0); pInputVector += InputStride; - XMVECTOR vResult = vmlaq_lane_f32(Transform.r[3], Transform.r[0], VL, 0); // X - vResult = vmlaq_lane_f32(vResult, Transform.r[1], VL, 1); // Y - vResult = vmlaq_lane_f32(vResult, Transform.r[2], VH, 0); // Z + XMVECTOR vResult = + vmlaq_lane_f32(Transform.r[3], Transform.r[0], VL, 0); // X + vResult = vmlaq_lane_f32(vResult, Transform.r[1], VL, 1); // Y + vResult = vmlaq_lane_f32(vResult, Transform.r[2], VH, 0); // Z VH = vget_high_f32(vResult); XMVECTOR W = vdupq_lane_f32(VH, 1); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ vResult = vdivq_f32(vResult, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal for W +#else + // 2 iterations of Newton-Raphson refinement of reciprocal for W float32x4_t Reciprocal = vrecpeq_f32(W); float32x4_t S = vrecpsq_f32(Reciprocal, W); Reciprocal = vmulq_f32(S, Reciprocal); @@ -11867,13 +11086,14 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream Reciprocal = vmulq_f32(S, Reciprocal); vResult = vmulq_f32(vResult, Reciprocal); - #endif +#endif vResult = vmlaq_f32(Offset, vResult, Scale); VL = vget_low_f32(vResult); vst1_f32(reinterpret_cast(pOutputVector), VL); - vst1q_lane_f32(reinterpret_cast(pOutputVector) + 2, vResult, 2); + vst1q_lane_f32(reinterpret_cast(pOutputVector) + 2, vResult, + 2); pOutputVector += OutputStride; } } @@ -11883,8 +11103,11 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream const float HalfViewportWidth = ViewportWidth * 0.5f; const float HalfViewportHeight = ViewportHeight * 0.5f; - XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, ViewportMaxZ - ViewportMinZ, 1.0f); - XMVECTOR Offset = XMVectorSet(ViewportX + HalfViewportWidth, ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); + XMVECTOR Scale = XMVectorSet(HalfViewportWidth, -HalfViewportHeight, + ViewportMaxZ - ViewportMinZ, 1.0f); + XMVECTOR Offset = + XMVectorSet(ViewportX + HalfViewportWidth, + ViewportY + HalfViewportHeight, ViewportMinZ, 0.0f); XMMATRIX Transform = XMMatrixMultiply(World, View); Transform = XMMatrixMultiply(Transform, Projection); @@ -11894,20 +11117,18 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(XMFLOAT3)) - { - if (OutputStride == sizeof(XMFLOAT3)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF)) - { + if (four > 0) { + if (InputStride == sizeof(XMFLOAT3)) { + if (OutputStride == sizeof(XMFLOAT3)) { + if (!(reinterpret_cast(pOutputStream) & 0xF)) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -11918,13 +11139,15 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream XMVECTOR Y = XM_PERMUTE_PS(V1, _MM_SHUFFLE(1, 1, 1, 1)); XMVECTOR X = XM_PERMUTE_PS(V1, _MM_SHUFFLE(0, 0, 0, 0)); - XMVECTOR vTemp = XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); + XMVECTOR vTemp = + XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); XMVECTOR vTemp2 = _mm_mul_ps(Y, Transform.r[1]); XMVECTOR vTemp3 = _mm_mul_ps(X, Transform.r[0]); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); V1 = XM_FMADD_PS(vTemp, Scale, Offset); @@ -11975,21 +11198,25 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector), V1); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 16), vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 32), V3); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + V1); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 16), + vTemp); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } - } - else - { + } else { // Packed input, unaligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -12000,13 +11227,15 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream XMVECTOR Y = XM_PERMUTE_PS(V1, _MM_SHUFFLE(1, 1, 1, 1)); XMVECTOR X = XM_PERMUTE_PS(V1, _MM_SHUFFLE(0, 0, 0, 0)); - XMVECTOR vTemp = XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); + XMVECTOR vTemp = + XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); XMVECTOR vTemp2 = _mm_mul_ps(Y, Transform.r[1]); XMVECTOR vTemp3 = _mm_mul_ps(X, Transform.r[0]); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); V1 = XM_FMADD_PS(vTemp, Scale, Offset); @@ -12057,22 +11286,26 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector), V1); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 16), vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 32), V3); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + V1); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 16), + vTemp); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -12083,7 +11316,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream XMVECTOR Y = XM_PERMUTE_PS(V1, _MM_SHUFFLE(1, 1, 1, 1)); XMVECTOR X = XM_PERMUTE_PS(V1, _MM_SHUFFLE(0, 0, 0, 0)); - XMVECTOR vTemp = XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); + XMVECTOR vTemp = + XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); XMVECTOR vTemp2 = _mm_mul_ps(Y, Transform.r[1]); XMVECTOR vTemp3 = _mm_mul_ps(X, Transform.r[0]); vTemp = _mm_add_ps(vTemp, vTemp2); @@ -12093,7 +11327,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream vTemp = _mm_div_ps(vTemp, W); vTemp = XM_FMADD_PS(vTemp, Scale, Offset); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 2 @@ -12111,7 +11346,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream vTemp = _mm_div_ps(vTemp, W); vTemp = XM_FMADD_PS(vTemp, Scale, Offset); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 3 @@ -12129,7 +11365,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream vTemp = _mm_div_ps(vTemp, W); vTemp = XM_FMADD_PS(vTemp, Scale, Offset); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 4 @@ -12147,7 +11384,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream vTemp = _mm_div_ps(vTemp, W); vTemp = XM_FMADD_PS(vTemp, Scale, Offset); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 4; @@ -12156,9 +11394,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream } } - for (; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR Z = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); @@ -12191,23 +11429,14 @@ inline XMFLOAT3* XM_CALLCONV XMVector3ProjectStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector3Unproject -( - FXMVECTOR V, - float ViewportX, - float ViewportY, - float ViewportWidth, - float ViewportHeight, - float ViewportMinZ, - float ViewportMaxZ, - FXMMATRIX Projection, - CXMMATRIX View, - CXMMATRIX World -) noexcept -{ - static const XMVECTORF32 D = { { { -1.0f, 1.0f, 0.0f, 0.0f } } }; +inline XMVECTOR XM_CALLCONV XMVector3Unproject( + FXMVECTOR V, float ViewportX, float ViewportY, float ViewportWidth, + float ViewportHeight, float ViewportMinZ, float ViewportMaxZ, + FXMMATRIX Projection, CXMMATRIX View, CXMMATRIX World) noexcept { + static const XMVECTORF32 D = {{{-1.0f, 1.0f, 0.0f, 0.0f}}}; - XMVECTOR Scale = XMVectorSet(ViewportWidth * 0.5f, -ViewportHeight * 0.5f, ViewportMaxZ - ViewportMinZ, 1.0f); + XMVECTOR Scale = XMVectorSet(ViewportWidth * 0.5f, -ViewportHeight * 0.5f, + ViewportMaxZ - ViewportMinZ, 1.0f); Scale = XMVectorReciprocal(Scale); XMVECTOR Offset = XMVectorSet(-ViewportX, -ViewportY, -ViewportMinZ, 0.0f); @@ -12226,28 +11455,15 @@ inline XMVECTOR XM_CALLCONV XMVector3Unproject #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307" ) +#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307") #endif -_Use_decl_annotations_ -inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream -( - XMFLOAT3* pOutputStream, - size_t OutputStride, - const XMFLOAT3* pInputStream, - size_t InputStride, - size_t VectorCount, - float ViewportX, - float ViewportY, - float ViewportWidth, - float ViewportHeight, - float ViewportMinZ, - float ViewportMaxZ, - FXMMATRIX Projection, - CXMMATRIX View, - CXMMATRIX World -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream( + XMFLOAT3* pOutputStream, size_t OutputStride, const XMFLOAT3* pInputStream, + size_t InputStride, size_t VectorCount, float ViewportX, float ViewportY, + float ViewportWidth, float ViewportHeight, float ViewportMinZ, + float ViewportMaxZ, FXMMATRIX Projection, CXMMATRIX View, + CXMMATRIX World) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -12259,9 +11475,10 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream #if defined(_XM_NO_INTRINSICS_) - static const XMVECTORF32 D = { { { -1.0f, 1.0f, 0.0f, 0.0f } } }; + static const XMVECTORF32 D = {{{-1.0f, 1.0f, 0.0f, 0.0f}}}; - XMVECTOR Scale = XMVectorSet(ViewportWidth * 0.5f, -ViewportHeight * 0.5f, ViewportMaxZ - ViewportMinZ, 1.0f); + XMVECTOR Scale = XMVectorSet(ViewportWidth * 0.5f, -ViewportHeight * 0.5f, + ViewportMaxZ - ViewportMinZ, 1.0f); Scale = XMVectorReciprocal(Scale); XMVECTOR Offset = XMVectorSet(-ViewportX, -ViewportY, -ViewportMinZ, 0.0f); @@ -12274,9 +11491,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream auto pInputVector = reinterpret_cast(pInputStream); auto pOutputVector = reinterpret_cast(pOutputStream); - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); XMVECTOR Result = XMVectorMultiplyAdd(V, Scale, Offset); @@ -12308,13 +11525,12 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT3)) && (OutputStride == sizeof(XMFLOAT3))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x3_t V = vld3q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT3)) && + (OutputStride == sizeof(XMFLOAT3))) { + for (size_t j = 0; j < four; ++j) { + float32x4x3_t V = + vld3q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT3) * 4; XMVECTOR ScaleX = vdupq_n_f32(sx); @@ -12323,15 +11539,19 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream float32x2_t r3 = vget_low_f32(Transform.r[3]); float32x2_t r = vget_low_f32(Transform.r[0]); - XMVECTOR vResult0 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), VX, r, 0); // Ax+M - XMVECTOR vResult1 = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), VX, r, 1); // Bx+N + XMVECTOR vResult0 = + vmlaq_lane_f32(vdupq_lane_f32(r3, 0), VX, r, 0); // Ax+M + XMVECTOR vResult1 = + vmlaq_lane_f32(vdupq_lane_f32(r3, 1), VX, r, 1); // Bx+N XM_PREFETCH(pInputVector); r3 = vget_high_f32(Transform.r[3]); r = vget_high_f32(Transform.r[0]); - XMVECTOR vResult2 = vmlaq_lane_f32(vdupq_lane_f32(r3, 0), VX, r, 0); // Cx+O - XMVECTOR W = vmlaq_lane_f32(vdupq_lane_f32(r3, 1), VX, r, 1); // Dx+P + XMVECTOR vResult2 = + vmlaq_lane_f32(vdupq_lane_f32(r3, 0), VX, r, 0); // Cx+O + XMVECTOR W = + vmlaq_lane_f32(vdupq_lane_f32(r3, 1), VX, r, 1); // Dx+P XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); @@ -12340,14 +11560,14 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream XMVECTOR VY = vmlaq_f32(OffsetY, ScaleY, V.val[1]); r = vget_low_f32(Transform.r[1]); - vResult0 = vmlaq_lane_f32(vResult0, VY, r, 0); // Ax+Ey+M - vResult1 = vmlaq_lane_f32(vResult1, VY, r, 1); // Bx+Fy+N + vResult0 = vmlaq_lane_f32(vResult0, VY, r, 0); // Ax+Ey+M + vResult1 = vmlaq_lane_f32(vResult1, VY, r, 1); // Bx+Fy+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(Transform.r[1]); - vResult2 = vmlaq_lane_f32(vResult2, VY, r, 0); // Cx+Gy+O - W = vmlaq_lane_f32(W, VY, r, 1); // Dx+Hy+P + vResult2 = vmlaq_lane_f32(vResult2, VY, r, 0); // Cx+Gy+O + W = vmlaq_lane_f32(W, VY, r, 1); // Dx+Hy+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); @@ -12356,23 +11576,24 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream XMVECTOR VZ = vmlaq_f32(OffsetZ, ScaleZ, V.val[2]); r = vget_low_f32(Transform.r[2]); - vResult0 = vmlaq_lane_f32(vResult0, VZ, r, 0); // Ax+Ey+Iz+M - vResult1 = vmlaq_lane_f32(vResult1, VZ, r, 1); // Bx+Fy+Jz+N + vResult0 = vmlaq_lane_f32(vResult0, VZ, r, 0); // Ax+Ey+Iz+M + vResult1 = vmlaq_lane_f32(vResult1, VZ, r, 1); // Bx+Fy+Jz+N XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 4)); r = vget_high_f32(Transform.r[2]); - vResult2 = vmlaq_lane_f32(vResult2, VZ, r, 0); // Cx+Gy+Kz+O - W = vmlaq_lane_f32(W, VZ, r, 1); // Dx+Hy+Lz+P + vResult2 = vmlaq_lane_f32(vResult2, VZ, r, 0); // Cx+Gy+Kz+O + W = vmlaq_lane_f32(W, VZ, r, 1); // Dx+Hy+Lz+P XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 5)); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ V.val[0] = vdivq_f32(vResult0, W); V.val[1] = vdivq_f32(vResult1, W); V.val[2] = vdivq_f32(vResult2, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal +#else + // 2 iterations of Newton-Raphson refinement of reciprocal float32x4_t Reciprocal = vrecpeq_f32(W); float32x4_t S = vrecpsq_f32(Reciprocal, W); Reciprocal = vmulq_f32(S, Reciprocal); @@ -12382,7 +11603,7 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream V.val[0] = vmulq_f32(vResult0, Reciprocal); V.val[1] = vmulq_f32(vResult1, Reciprocal); V.val[2] = vmulq_f32(vResult2, Reciprocal); - #endif +#endif vst3q_f32(reinterpret_cast(pOutputVector), V); pOutputVector += sizeof(XMFLOAT3) * 4; @@ -12392,39 +11613,45 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream } } - if (i < VectorCount) - { + if (i < VectorCount) { float32x2_t ScaleL = vcreate_f32( - static_cast(*reinterpret_cast(&sx)) - | (static_cast(*reinterpret_cast(&sy)) << 32)); - float32x2_t ScaleH = vcreate_f32(static_cast(*reinterpret_cast(&sz))); + static_cast(*reinterpret_cast(&sx)) | + (static_cast(*reinterpret_cast(&sy)) + << 32)); + float32x2_t ScaleH = vcreate_f32( + static_cast(*reinterpret_cast(&sz))); float32x2_t OffsetL = vcreate_f32( - static_cast(*reinterpret_cast(&ox)) - | (static_cast(*reinterpret_cast(&oy)) << 32)); - float32x2_t OffsetH = vcreate_f32(static_cast(*reinterpret_cast(&oz))); + static_cast(*reinterpret_cast(&ox)) | + (static_cast(*reinterpret_cast(&oy)) + << 32)); + float32x2_t OffsetH = vcreate_f32( + static_cast(*reinterpret_cast(&oz))); - for (; i < VectorCount; i++) - { - float32x2_t VL = vld1_f32(reinterpret_cast(pInputVector)); + for (; i < VectorCount; i++) { + float32x2_t VL = + vld1_f32(reinterpret_cast(pInputVector)); float32x2_t zero = vdup_n_f32(0); - float32x2_t VH = vld1_lane_f32(reinterpret_cast(pInputVector) + 2, zero, 0); + float32x2_t VH = vld1_lane_f32( + reinterpret_cast(pInputVector) + 2, zero, 0); pInputVector += InputStride; VL = vmla_f32(OffsetL, VL, ScaleL); VH = vmla_f32(OffsetH, VH, ScaleH); - XMVECTOR vResult = vmlaq_lane_f32(Transform.r[3], Transform.r[0], VL, 0); // X - vResult = vmlaq_lane_f32(vResult, Transform.r[1], VL, 1); // Y - vResult = vmlaq_lane_f32(vResult, Transform.r[2], VH, 0); // Z + XMVECTOR vResult = + vmlaq_lane_f32(Transform.r[3], Transform.r[0], VL, 0); // X + vResult = vmlaq_lane_f32(vResult, Transform.r[1], VL, 1); // Y + vResult = vmlaq_lane_f32(vResult, Transform.r[2], VH, 0); // Z VH = vget_high_f32(vResult); XMVECTOR W = vdupq_lane_f32(VH, 1); - #if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__ +#if defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__ vResult = vdivq_f32(vResult, W); - #else - // 2 iterations of Newton-Raphson refinement of reciprocal for W +#else + // 2 iterations of Newton-Raphson refinement of reciprocal for W float32x4_t Reciprocal = vrecpeq_f32(W); float32x4_t S = vrecpsq_f32(Reciprocal, W); Reciprocal = vmulq_f32(S, Reciprocal); @@ -12432,20 +11659,22 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream Reciprocal = vmulq_f32(S, Reciprocal); vResult = vmulq_f32(vResult, Reciprocal); - #endif +#endif VL = vget_low_f32(vResult); vst1_f32(reinterpret_cast(pOutputVector), VL); - vst1q_lane_f32(reinterpret_cast(pOutputVector) + 2, vResult, 2); + vst1q_lane_f32(reinterpret_cast(pOutputVector) + 2, vResult, + 2); pOutputVector += OutputStride; } } return pOutputStream; #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 D = { { { -1.0f, 1.0f, 0.0f, 0.0f } } }; + static const XMVECTORF32 D = {{{-1.0f, 1.0f, 0.0f, 0.0f}}}; - XMVECTOR Scale = XMVectorSet(ViewportWidth * 0.5f, -ViewportHeight * 0.5f, ViewportMaxZ - ViewportMinZ, 1.0f); + XMVECTOR Scale = XMVectorSet(ViewportWidth * 0.5f, -ViewportHeight * 0.5f, + ViewportMaxZ - ViewportMinZ, 1.0f); Scale = XMVectorReciprocal(Scale); XMVECTOR Offset = XMVectorSet(-ViewportX, -ViewportY, -ViewportMinZ, 0.0f); @@ -12461,20 +11690,18 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(XMFLOAT3)) - { - if (OutputStride == sizeof(XMFLOAT3)) - { - if (!(reinterpret_cast(pOutputStream) & 0xF)) - { + if (four > 0) { + if (InputStride == sizeof(XMFLOAT3)) { + if (OutputStride == sizeof(XMFLOAT3)) { + if (!(reinterpret_cast(pOutputStream) & 0xF)) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -12487,13 +11714,15 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream XMVECTOR Y = XM_PERMUTE_PS(V1, _MM_SHUFFLE(1, 1, 1, 1)); XMVECTOR X = XM_PERMUTE_PS(V1, _MM_SHUFFLE(0, 0, 0, 0)); - XMVECTOR vTemp = XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); + XMVECTOR vTemp = + XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); XMVECTOR vTemp2 = _mm_mul_ps(Y, Transform.r[1]); XMVECTOR vTemp3 = _mm_mul_ps(X, Transform.r[0]); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); V1 = _mm_div_ps(vTemp, W); // Result 2 @@ -12546,21 +11775,25 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector), V1); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 16), vTemp); - XM_STREAM_PS(reinterpret_cast(pOutputVector + 32), V3); + XM_STREAM_PS(reinterpret_cast(pOutputVector), + V1); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 16), + vTemp); + XM_STREAM_PS( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } - } - else - { + } else { // Packed input, unaligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -12573,13 +11806,15 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream XMVECTOR Y = XM_PERMUTE_PS(V1, _MM_SHUFFLE(1, 1, 1, 1)); XMVECTOR X = XM_PERMUTE_PS(V1, _MM_SHUFFLE(0, 0, 0, 0)); - XMVECTOR vTemp = XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); + XMVECTOR vTemp = + XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); XMVECTOR vTemp2 = _mm_mul_ps(Y, Transform.r[1]); XMVECTOR vTemp3 = _mm_mul_ps(X, Transform.r[0]); vTemp = _mm_add_ps(vTemp, vTemp2); vTemp = _mm_add_ps(vTemp, vTemp3); - XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); + XMVECTOR W = + XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); V1 = _mm_div_ps(vTemp, W); // Result 2 @@ -12632,22 +11867,26 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream // Pack and store the vectors XM3PACK4INTO3(vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector), V1); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 16), vTemp); - _mm_storeu_ps(reinterpret_cast(pOutputVector + 32), V3); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + V1); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 16), + vTemp); + _mm_storeu_ps( + reinterpret_cast(pOutputVector + 32), V3); pOutputVector += sizeof(XMFLOAT3) * 4; i += 4; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < four; ++j) - { - __m128 V1 = _mm_loadu_ps(reinterpret_cast(pInputVector)); - __m128 L2 = _mm_loadu_ps(reinterpret_cast(pInputVector + 16)); - __m128 L3 = _mm_loadu_ps(reinterpret_cast(pInputVector + 32)); + for (size_t j = 0; j < four; ++j) { + __m128 V1 = _mm_loadu_ps( + reinterpret_cast(pInputVector)); + __m128 L2 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 16)); + __m128 L3 = _mm_loadu_ps( + reinterpret_cast(pInputVector + 32)); pInputVector += sizeof(XMFLOAT3) * 4; // Unpack the 4 vectors (.w components are junk) @@ -12660,7 +11899,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream XMVECTOR Y = XM_PERMUTE_PS(V1, _MM_SHUFFLE(1, 1, 1, 1)); XMVECTOR X = XM_PERMUTE_PS(V1, _MM_SHUFFLE(0, 0, 0, 0)); - XMVECTOR vTemp = XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); + XMVECTOR vTemp = + XM_FMADD_PS(Z, Transform.r[2], Transform.r[3]); XMVECTOR vTemp2 = _mm_mul_ps(Y, Transform.r[1]); XMVECTOR vTemp3 = _mm_mul_ps(X, Transform.r[0]); vTemp = _mm_add_ps(vTemp, vTemp2); @@ -12669,7 +11909,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream XMVECTOR W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 2 @@ -12688,7 +11929,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 3 @@ -12707,7 +11949,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; // Result 4 @@ -12726,7 +11969,8 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream W = XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(3, 3, 3, 3)); vTemp = _mm_div_ps(vTemp, W); - XMStoreFloat3(reinterpret_cast(pOutputVector), vTemp); + XMStoreFloat3(reinterpret_cast(pOutputVector), + vTemp); pOutputVector += OutputStride; i += 4; @@ -12735,9 +11979,9 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream } } - for (; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat3(reinterpret_cast(pInputVector)); + for (; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat3(reinterpret_cast(pInputVector)); pInputVector += InputStride; V = _mm_mul_ps(V, Scale); @@ -12782,19 +12026,20 @@ inline XMFLOAT3* XM_CALLCONV XMVector3UnprojectStream //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4Equal -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4Equal(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1]) && (V1.vector4_f32[2] == V2.vector4_f32[2]) && (V1.vector4_f32[3] == V2.vector4_f32[3])) != 0); + return (((V1.vector4_f32[0] == V2.vector4_f32[0]) && + (V1.vector4_f32[1] == V2.vector4_f32[1]) && + (V1.vector4_f32[2] == V2.vector4_f32[2]) && + (V1.vector4_f32[3] == V2.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vceqq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); return ((_mm_movemask_ps(vTemp) == 0x0f) != 0); @@ -12805,12 +12050,8 @@ inline bool XM_CALLCONV XMVector4Equal //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector4EqualR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector4EqualR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; @@ -12818,32 +12059,28 @@ inline uint32_t XM_CALLCONV XMVector4EqualR if ((V1.vector4_f32[0] == V2.vector4_f32[0]) && (V1.vector4_f32[1] == V2.vector4_f32[1]) && (V1.vector4_f32[2] == V2.vector4_f32[2]) && - (V1.vector4_f32[3] == V2.vector4_f32[3])) - { + (V1.vector4_f32[3] == V2.vector4_f32[3])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && - (V1.vector4_f32[1] != V2.vector4_f32[1]) && - (V1.vector4_f32[2] != V2.vector4_f32[2]) && - (V1.vector4_f32[3] != V2.vector4_f32[3])) - { + } else if ((V1.vector4_f32[0] != V2.vector4_f32[0]) && + (V1.vector4_f32[1] != V2.vector4_f32[1]) && + (V1.vector4_f32[2] != V2.vector4_f32[2]) && + (V1.vector4_f32[3] != V2.vector4_f32[3])) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vceqq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -12851,11 +12088,10 @@ inline uint32_t XM_CALLCONV XMVector4EqualR XMVECTOR vTemp = _mm_cmpeq_ps(V1, V2); int iTest = _mm_movemask_ps(vTemp); uint32_t CR = 0; - if (iTest == 0xf) // All equal? + if (iTest == 0xf) // All equal? { CR = XM_CRMASK_CR6TRUE; - } - else if (iTest == 0) // All not equal? + } else if (iTest == 0) // All not equal? { CR = XM_CRMASK_CR6FALSE; } @@ -12865,19 +12101,21 @@ inline uint32_t XM_CALLCONV XMVector4EqualR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4EqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4EqualInt(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && (V1.vector4_u32[1] == V2.vector4_u32[1]) && (V1.vector4_u32[2] == V2.vector4_u32[2]) && (V1.vector4_u32[3] == V2.vector4_u32[3])) != 0); + return (((V1.vector4_u32[0] == V2.vector4_u32[0]) && + (V1.vector4_u32[1] == V2.vector4_u32[1]) && + (V1.vector4_u32[2] == V2.vector4_u32[2]) && + (V1.vector4_u32[3] == V2.vector4_u32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t vResult = vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU); + uint32x4_t vResult = + vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); return ((_mm_movemask_ps(_mm_castsi128_ps(vTemp)) == 0xf) != 0); @@ -12888,43 +12126,36 @@ inline bool XM_CALLCONV XMVector4EqualInt //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector4EqualIntR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector4EqualIntR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if (V1.vector4_u32[0] == V2.vector4_u32[0] && V1.vector4_u32[1] == V2.vector4_u32[1] && V1.vector4_u32[2] == V2.vector4_u32[2] && - V1.vector4_u32[3] == V2.vector4_u32[3]) - { + V1.vector4_u32[3] == V2.vector4_u32[3]) { CR = XM_CRMASK_CR6TRUE; - } - else if (V1.vector4_u32[0] != V2.vector4_u32[0] && - V1.vector4_u32[1] != V2.vector4_u32[1] && - V1.vector4_u32[2] != V2.vector4_u32[2] && - V1.vector4_u32[3] != V2.vector4_u32[3]) - { + } else if (V1.vector4_u32[0] != V2.vector4_u32[0] && + V1.vector4_u32[1] != V2.vector4_u32[1] && + V1.vector4_u32[2] != V2.vector4_u32[2] && + V1.vector4_u32[3] != V2.vector4_u32[3]) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t vResult = vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint32x4_t vResult = + vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -12932,11 +12163,10 @@ inline uint32_t XM_CALLCONV XMVector4EqualIntR __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); int iTest = _mm_movemask_ps(_mm_castsi128_ps(vTemp)); uint32_t CR = 0; - if (iTest == 0xf) // All equal? + if (iTest == 0xf) // All equal? { CR = XM_CRMASK_CR6TRUE; - } - else if (iTest == 0) // All not equal? + } else if (iTest == 0) // All not equal? { CR = XM_CRMASK_CR6FALSE; } @@ -12944,13 +12174,8 @@ inline uint32_t XM_CALLCONV XMVector4EqualIntR #endif } -inline bool XM_CALLCONV XMVector4NearEqual -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR Epsilon -) noexcept -{ +inline bool XM_CALLCONV XMVector4NearEqual(FXMVECTOR V1, FXMVECTOR V2, + FXMVECTOR Epsilon) noexcept { #if defined(_XM_NO_INTRINSICS_) float dx, dy, dz, dw; @@ -12958,20 +12183,23 @@ inline bool XM_CALLCONV XMVector4NearEqual dy = fabsf(V1.vector4_f32[1] - V2.vector4_f32[1]); dz = fabsf(V1.vector4_f32[2] - V2.vector4_f32[2]); dw = fabsf(V1.vector4_f32[3] - V2.vector4_f32[3]); - return (((dx <= Epsilon.vector4_f32[0]) && - (dy <= Epsilon.vector4_f32[1]) && - (dz <= Epsilon.vector4_f32[2]) && - (dw <= Epsilon.vector4_f32[3])) != 0); + return (((dx <= Epsilon.vector4_f32[0]) && (dy <= Epsilon.vector4_f32[1]) && + (dz <= Epsilon.vector4_f32[2]) && + (dw <= Epsilon.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t vDelta = vsubq_f32(V1, V2); -#if defined(_MSC_VER) && !defined(__clang__) && !defined(_ARM64_DISTINCT_NEON_TYPES) +#if defined(_MSC_VER) && !defined(__clang__) && \ + !defined(_ARM64_DISTINCT_NEON_TYPES) uint32x4_t vResult = vacleq_f32(vDelta, Epsilon); #else uint32x4_t vResult = vcleq_f32(vabsq_f32(vDelta), Epsilon); #endif - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) // Get the difference XMVECTOR vDelta = _mm_sub_ps(V1, V2); @@ -12986,19 +12214,20 @@ inline bool XM_CALLCONV XMVector4NearEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4NotEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4NotEqual(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || (V1.vector4_f32[1] != V2.vector4_f32[1]) || (V1.vector4_f32[2] != V2.vector4_f32[2]) || (V1.vector4_f32[3] != V2.vector4_f32[3])) != 0); + return (((V1.vector4_f32[0] != V2.vector4_f32[0]) || + (V1.vector4_f32[1] != V2.vector4_f32[1]) || + (V1.vector4_f32[2] != V2.vector4_f32[2]) || + (V1.vector4_f32[3] != V2.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vceqq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) != 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) != + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpneq_ps(V1, V2); return ((_mm_movemask_ps(vTemp)) != 0); @@ -13009,19 +12238,22 @@ inline bool XM_CALLCONV XMVector4NotEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4NotEqualInt -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4NotEqualInt(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || (V1.vector4_u32[1] != V2.vector4_u32[1]) || (V1.vector4_u32[2] != V2.vector4_u32[2]) || (V1.vector4_u32[3] != V2.vector4_u32[3])) != 0); + return (((V1.vector4_u32[0] != V2.vector4_u32[0]) || + (V1.vector4_u32[1] != V2.vector4_u32[1]) || + (V1.vector4_u32[2] != V2.vector4_u32[2]) || + (V1.vector4_u32[3] != V2.vector4_u32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x4_t vResult = vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) != 0xFFFFFFFFU); + uint32x4_t vResult = + vceqq_u32(vreinterpretq_u32_f32(V1), vreinterpretq_u32_f32(V2)); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) != + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) __m128i vTemp = _mm_cmpeq_epi32(_mm_castps_si128(V1), _mm_castps_si128(V2)); return ((_mm_movemask_ps(_mm_castsi128_ps(vTemp)) != 0xF) != 0); @@ -13032,19 +12264,20 @@ inline bool XM_CALLCONV XMVector4NotEqualInt //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4Greater -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4Greater(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && (V1.vector4_f32[1] > V2.vector4_f32[1]) && (V1.vector4_f32[2] > V2.vector4_f32[2]) && (V1.vector4_f32[3] > V2.vector4_f32[3])) != 0); + return (((V1.vector4_f32[0] > V2.vector4_f32[0]) && + (V1.vector4_f32[1] > V2.vector4_f32[1]) && + (V1.vector4_f32[2] > V2.vector4_f32[2]) && + (V1.vector4_f32[3] > V2.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgtq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpgt_ps(V1, V2); return ((_mm_movemask_ps(vTemp) == 0x0f) != 0); @@ -13055,43 +12288,35 @@ inline bool XM_CALLCONV XMVector4Greater //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector4GreaterR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector4GreaterR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if (V1.vector4_f32[0] > V2.vector4_f32[0] && V1.vector4_f32[1] > V2.vector4_f32[1] && V1.vector4_f32[2] > V2.vector4_f32[2] && - V1.vector4_f32[3] > V2.vector4_f32[3]) - { + V1.vector4_f32[3] > V2.vector4_f32[3]) { CR = XM_CRMASK_CR6TRUE; - } - else if (V1.vector4_f32[0] <= V2.vector4_f32[0] && - V1.vector4_f32[1] <= V2.vector4_f32[1] && - V1.vector4_f32[2] <= V2.vector4_f32[2] && - V1.vector4_f32[3] <= V2.vector4_f32[3]) - { + } else if (V1.vector4_f32[0] <= V2.vector4_f32[0] && + V1.vector4_f32[1] <= V2.vector4_f32[1] && + V1.vector4_f32[2] <= V2.vector4_f32[2] && + V1.vector4_f32[3] <= V2.vector4_f32[3]) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgtq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -13099,12 +12324,9 @@ inline uint32_t XM_CALLCONV XMVector4GreaterR uint32_t CR = 0; XMVECTOR vTemp = _mm_cmpgt_ps(V1, V2); int iTest = _mm_movemask_ps(vTemp); - if (iTest == 0xf) - { + if (iTest == 0xf) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -13113,19 +12335,21 @@ inline uint32_t XM_CALLCONV XMVector4GreaterR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4GreaterOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4GreaterOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1]) && (V1.vector4_f32[2] >= V2.vector4_f32[2]) && (V1.vector4_f32[3] >= V2.vector4_f32[3])) != 0); + return (((V1.vector4_f32[0] >= V2.vector4_f32[0]) && + (V1.vector4_f32[1] >= V2.vector4_f32[1]) && + (V1.vector4_f32[2] >= V2.vector4_f32[2]) && + (V1.vector4_f32[3] >= V2.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgeq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmpge_ps(V1, V2); return ((_mm_movemask_ps(vTemp) == 0x0f) != 0); @@ -13136,43 +12360,35 @@ inline bool XM_CALLCONV XMVector4GreaterOrEqual //------------------------------------------------------------------------------ -inline uint32_t XM_CALLCONV XMVector4GreaterOrEqualR -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline uint32_t XM_CALLCONV XMVector4GreaterOrEqualR(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) uint32_t CR = 0; if ((V1.vector4_f32[0] >= V2.vector4_f32[0]) && (V1.vector4_f32[1] >= V2.vector4_f32[1]) && (V1.vector4_f32[2] >= V2.vector4_f32[2]) && - (V1.vector4_f32[3] >= V2.vector4_f32[3])) - { + (V1.vector4_f32[3] >= V2.vector4_f32[3])) { CR = XM_CRMASK_CR6TRUE; - } - else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && - (V1.vector4_f32[1] < V2.vector4_f32[1]) && - (V1.vector4_f32[2] < V2.vector4_f32[2]) && - (V1.vector4_f32[3] < V2.vector4_f32[3])) - { + } else if ((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1]) && + (V1.vector4_f32[2] < V2.vector4_f32[2]) && + (V1.vector4_f32[3] < V2.vector4_f32[3])) { CR = XM_CRMASK_CR6FALSE; } return CR; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcgeq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); uint32_t r = vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1); uint32_t CR = 0; - if (r == 0xFFFFFFFFU) - { + if (r == 0xFFFFFFFFU) { CR = XM_CRMASK_CR6TRUE; - } - else if (!r) - { + } else if (!r) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -13180,12 +12396,9 @@ inline uint32_t XM_CALLCONV XMVector4GreaterOrEqualR uint32_t CR = 0; XMVECTOR vTemp = _mm_cmpge_ps(V1, V2); int iTest = _mm_movemask_ps(vTemp); - if (iTest == 0x0f) - { + if (iTest == 0x0f) { CR = XM_CRMASK_CR6TRUE; - } - else if (!iTest) - { + } else if (!iTest) { CR = XM_CRMASK_CR6FALSE; } return CR; @@ -13194,19 +12407,20 @@ inline uint32_t XM_CALLCONV XMVector4GreaterOrEqualR //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4Less -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4Less(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && (V1.vector4_f32[1] < V2.vector4_f32[1]) && (V1.vector4_f32[2] < V2.vector4_f32[2]) && (V1.vector4_f32[3] < V2.vector4_f32[3])) != 0); + return (((V1.vector4_f32[0] < V2.vector4_f32[0]) && + (V1.vector4_f32[1] < V2.vector4_f32[1]) && + (V1.vector4_f32[2] < V2.vector4_f32[2]) && + (V1.vector4_f32[3] < V2.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcltq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmplt_ps(V1, V2); return ((_mm_movemask_ps(vTemp) == 0x0f) != 0); @@ -13217,19 +12431,21 @@ inline bool XM_CALLCONV XMVector4Less //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4LessOrEqual -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline bool XM_CALLCONV XMVector4LessOrEqual(FXMVECTOR V1, + FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && (V1.vector4_f32[1] <= V2.vector4_f32[1]) && (V1.vector4_f32[2] <= V2.vector4_f32[2]) && (V1.vector4_f32[3] <= V2.vector4_f32[3])) != 0); + return (((V1.vector4_f32[0] <= V2.vector4_f32[0]) && + (V1.vector4_f32[1] <= V2.vector4_f32[1]) && + (V1.vector4_f32[2] <= V2.vector4_f32[2]) && + (V1.vector4_f32[3] <= V2.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vResult = vcleq_f32(V1, V2); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), vget_high_u8(vreinterpretq_u8_u32(vResult))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vResult)), + vget_high_u8(vreinterpretq_u8_u32(vResult))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp = _mm_cmple_ps(V1, V2); return ((_mm_movemask_ps(vTemp) == 0x0f) != 0); @@ -13240,17 +12456,17 @@ inline bool XM_CALLCONV XMVector4LessOrEqual //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4InBounds -( - FXMVECTOR V, - FXMVECTOR Bounds -) noexcept -{ +inline bool XM_CALLCONV XMVector4InBounds(FXMVECTOR V, + FXMVECTOR Bounds) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && - (V.vector4_f32[1] <= Bounds.vector4_f32[1] && V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && - (V.vector4_f32[2] <= Bounds.vector4_f32[2] && V.vector4_f32[2] >= -Bounds.vector4_f32[2]) && - (V.vector4_f32[3] <= Bounds.vector4_f32[3] && V.vector4_f32[3] >= -Bounds.vector4_f32[3])) != 0); + return (((V.vector4_f32[0] <= Bounds.vector4_f32[0] && + V.vector4_f32[0] >= -Bounds.vector4_f32[0]) && + (V.vector4_f32[1] <= Bounds.vector4_f32[1] && + V.vector4_f32[1] >= -Bounds.vector4_f32[1]) && + (V.vector4_f32[2] <= Bounds.vector4_f32[2] && + V.vector4_f32[2] >= -Bounds.vector4_f32[2]) && + (V.vector4_f32[3] <= Bounds.vector4_f32[3] && + V.vector4_f32[3] >= -Bounds.vector4_f32[3])) != 0); #elif defined(_XM_ARM_NEON_INTRINSICS_) // Test if less than or equal uint32x4_t ivTemp1 = vcleq_f32(V, Bounds); @@ -13261,9 +12477,12 @@ inline bool XM_CALLCONV XMVector4InBounds // Blend answers ivTemp1 = vandq_u32(ivTemp1, ivTemp2); // in bounds? - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(ivTemp1)), vget_high_u8(vreinterpretq_u8_u32(ivTemp1))); - uint16x4x2_t vTemp3 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); - return (vget_lane_u32(vreinterpret_u32_u16(vTemp3.val[1]), 1) == 0xFFFFFFFFU); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(ivTemp1)), + vget_high_u8(vreinterpretq_u8_u32(ivTemp1))); + uint16x4x2_t vTemp3 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp3.val[1]), 1) == + 0xFFFFFFFFU); #elif defined(_XM_SSE_INTRINSICS_) // Test if less than or equal XMVECTOR vTemp1 = _mm_cmple_ps(V, Bounds); @@ -13282,28 +12501,30 @@ inline bool XM_CALLCONV XMVector4InBounds //------------------------------------------------------------------------------ -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(push) #pragma float_control(precise, on) #endif -inline bool XM_CALLCONV XMVector4IsNaN(FXMVECTOR V) noexcept -{ +inline bool XM_CALLCONV XMVector4IsNaN(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (XMISNAN(V.vector4_f32[0]) || - XMISNAN(V.vector4_f32[1]) || - XMISNAN(V.vector4_f32[2]) || - XMISNAN(V.vector4_f32[3])); + return (XMISNAN(V.vector4_f32[0]) || XMISNAN(V.vector4_f32[1]) || + XMISNAN(V.vector4_f32[2]) || XMISNAN(V.vector4_f32[3])); #elif defined(_XM_ARM_NEON_INTRINSICS_) #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) - return isnan(vgetq_lane_f32(V, 0)) || isnan(vgetq_lane_f32(V, 1)) || isnan(vgetq_lane_f32(V, 2)) || isnan(vgetq_lane_f32(V, 3)); + return isnan(vgetq_lane_f32(V, 0)) || isnan(vgetq_lane_f32(V, 1)) || + isnan(vgetq_lane_f32(V, 2)) || isnan(vgetq_lane_f32(V, 3)); #else -// Test against itself. NaN is always not equal + // Test against itself. NaN is always not equal uint32x4_t vTempNan = vceqq_f32(V, V); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempNan)), vget_high_u8(vreinterpretq_u8_u32(vTempNan))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempNan)), + vget_high_u8(vreinterpretq_u8_u32(vTempNan))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); // If any are NaN, the mask is zero - return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) != 0xFFFFFFFFU); + return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) != + 0xFFFFFFFFU); #endif #elif defined(_XM_SSE_INTRINSICS_) #if defined(__clang__) && defined(__FINITE_MATH_ONLY__) @@ -13311,7 +12532,7 @@ inline bool XM_CALLCONV XMVector4IsNaN(FXMVECTOR V) noexcept _mm_store_ps(tmp, V); return isnan(tmp[0]) || isnan(tmp[1]) || isnan(tmp[2]) || isnan(tmp[3]); #else -// Test against itself. NaN is always not equal + // Test against itself. NaN is always not equal XMVECTOR vTempNan = _mm_cmpneq_ps(V, V); // If any are NaN, the mask is non-zero return (_mm_movemask_ps(vTempNan) != 0); @@ -13319,20 +12540,18 @@ inline bool XM_CALLCONV XMVector4IsNaN(FXMVECTOR V) noexcept #endif } -#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#if !defined(_XM_NO_INTRINSICS_) && defined(_MSC_VER) && \ + !defined(__INTEL_COMPILER) #pragma float_control(pop) #endif //------------------------------------------------------------------------------ -inline bool XM_CALLCONV XMVector4IsInfinite(FXMVECTOR V) noexcept -{ +inline bool XM_CALLCONV XMVector4IsInfinite(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - return (XMISINF(V.vector4_f32[0]) || - XMISINF(V.vector4_f32[1]) || - XMISINF(V.vector4_f32[2]) || - XMISINF(V.vector4_f32[3])); + return (XMISINF(V.vector4_f32[0]) || XMISINF(V.vector4_f32[1]) || + XMISINF(V.vector4_f32[2]) || XMISINF(V.vector4_f32[3])); #elif defined(_XM_ARM_NEON_INTRINSICS_) // Mask off the sign bit @@ -13340,8 +12559,10 @@ inline bool XM_CALLCONV XMVector4IsInfinite(FXMVECTOR V) noexcept // Compare to infinity vTempInf = vceqq_f32(vreinterpretq_f32_u32(vTempInf), g_XMInfinity); // If any are infinity, the signs are true. - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempInf)), vget_high_u8(vreinterpretq_u8_u32(vTempInf))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(vTempInf)), + vget_high_u8(vreinterpretq_u8_u32(vTempInf))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); return (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) != 0); #elif defined(_XM_SSE_INTRINSICS_) // Mask off the sign bit @@ -13359,19 +12580,15 @@ inline bool XM_CALLCONV XMVector4IsInfinite(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Dot -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4Dot(FXMVECTOR V1, FXMVECTOR V2) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTORF32 Result; - Result.f[0] = - Result.f[1] = - Result.f[2] = - Result.f[3] = V1.vector4_f32[0] * V2.vector4_f32[0] + V1.vector4_f32[1] * V2.vector4_f32[1] + V1.vector4_f32[2] * V2.vector4_f32[2] + V1.vector4_f32[3] * V2.vector4_f32[3]; + Result.f[0] = Result.f[1] = Result.f[2] = Result.f[3] = + V1.vector4_f32[0] * V2.vector4_f32[0] + + V1.vector4_f32[1] * V2.vector4_f32[1] + + V1.vector4_f32[2] * V2.vector4_f32[2] + + V1.vector4_f32[3] * V2.vector4_f32[3]; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -13390,36 +12607,69 @@ inline XMVECTOR XM_CALLCONV XMVector4Dot #elif defined(_XM_SSE_INTRINSICS_) XMVECTOR vTemp2 = V2; XMVECTOR vTemp = _mm_mul_ps(V1, vTemp2); - vTemp2 = _mm_shuffle_ps(vTemp2, vTemp, _MM_SHUFFLE(1, 0, 0, 0)); // Copy X to the Z position and Y to the W position - vTemp2 = _mm_add_ps(vTemp2, vTemp); // Add Z = X+Z; W = Y+W; - vTemp = _mm_shuffle_ps(vTemp, vTemp2, _MM_SHUFFLE(0, 3, 0, 0)); // Copy W to the Z position - vTemp = _mm_add_ps(vTemp, vTemp2); // Add Z and W together - return XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(2, 2, 2, 2)); // Splat Z and return + vTemp2 = _mm_shuffle_ps( + vTemp2, vTemp, + _MM_SHUFFLE(1, 0, 0, + 0)); // Copy X to the Z position and Y to the W position + vTemp2 = _mm_add_ps(vTemp2, vTemp); // Add Z = X+Z; W = Y+W; + vTemp = _mm_shuffle_ps( + vTemp, vTemp2, _MM_SHUFFLE(0, 3, 0, 0)); // Copy W to the Z position + vTemp = _mm_add_ps(vTemp, vTemp2); // Add Z and W together + return XM_PERMUTE_PS(vTemp, _MM_SHUFFLE(2, 2, 2, 2)); // Splat Z and return #endif } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Cross -( - FXMVECTOR V1, - FXMVECTOR V2, - FXMVECTOR V3 -) noexcept -{ - // [ ((v2.z*v3.w-v2.w*v3.z)*v1.y)-((v2.y*v3.w-v2.w*v3.y)*v1.z)+((v2.y*v3.z-v2.z*v3.y)*v1.w), +inline XMVECTOR XM_CALLCONV XMVector4Cross(FXMVECTOR V1, FXMVECTOR V2, + FXMVECTOR V3) noexcept { + // [ + // ((v2.z*v3.w-v2.w*v3.z)*v1.y)-((v2.y*v3.w-v2.w*v3.y)*v1.z)+((v2.y*v3.z-v2.z*v3.y)*v1.w), // ((v2.w*v3.z-v2.z*v3.w)*v1.x)-((v2.w*v3.x-v2.x*v3.w)*v1.z)+((v2.z*v3.x-v2.x*v3.z)*v1.w), // ((v2.y*v3.w-v2.w*v3.y)*v1.x)-((v2.x*v3.w-v2.w*v3.x)*v1.y)+((v2.x*v3.y-v2.y*v3.x)*v1.w), - // ((v2.z*v3.y-v2.y*v3.z)*v1.x)-((v2.z*v3.x-v2.x*v3.z)*v1.y)+((v2.y*v3.x-v2.x*v3.y)*v1.z) ] + // ((v2.z*v3.y-v2.y*v3.z)*v1.x)-((v2.z*v3.x-v2.x*v3.z)*v1.y)+((v2.y*v3.x-v2.x*v3.y)*v1.z) + // ] #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - (((V2.vector4_f32[2] * V3.vector4_f32[3]) - (V2.vector4_f32[3] * V3.vector4_f32[2])) * V1.vector4_f32[1]) - (((V2.vector4_f32[1] * V3.vector4_f32[3]) - (V2.vector4_f32[3] * V3.vector4_f32[1])) * V1.vector4_f32[2]) + (((V2.vector4_f32[1] * V3.vector4_f32[2]) - (V2.vector4_f32[2] * V3.vector4_f32[1])) * V1.vector4_f32[3]), - (((V2.vector4_f32[3] * V3.vector4_f32[2]) - (V2.vector4_f32[2] * V3.vector4_f32[3])) * V1.vector4_f32[0]) - (((V2.vector4_f32[3] * V3.vector4_f32[0]) - (V2.vector4_f32[0] * V3.vector4_f32[3])) * V1.vector4_f32[2]) + (((V2.vector4_f32[2] * V3.vector4_f32[0]) - (V2.vector4_f32[0] * V3.vector4_f32[2])) * V1.vector4_f32[3]), - (((V2.vector4_f32[1] * V3.vector4_f32[3]) - (V2.vector4_f32[3] * V3.vector4_f32[1])) * V1.vector4_f32[0]) - (((V2.vector4_f32[0] * V3.vector4_f32[3]) - (V2.vector4_f32[3] * V3.vector4_f32[0])) * V1.vector4_f32[1]) + (((V2.vector4_f32[0] * V3.vector4_f32[1]) - (V2.vector4_f32[1] * V3.vector4_f32[0])) * V1.vector4_f32[3]), - (((V2.vector4_f32[2] * V3.vector4_f32[1]) - (V2.vector4_f32[1] * V3.vector4_f32[2])) * V1.vector4_f32[0]) - (((V2.vector4_f32[2] * V3.vector4_f32[0]) - (V2.vector4_f32[0] * V3.vector4_f32[2])) * V1.vector4_f32[1]) + (((V2.vector4_f32[1] * V3.vector4_f32[0]) - (V2.vector4_f32[0] * V3.vector4_f32[1])) * V1.vector4_f32[2]), - } } }; + XMVECTORF32 Result = {{{ + (((V2.vector4_f32[2] * V3.vector4_f32[3]) - + (V2.vector4_f32[3] * V3.vector4_f32[2])) * + V1.vector4_f32[1]) - + (((V2.vector4_f32[1] * V3.vector4_f32[3]) - + (V2.vector4_f32[3] * V3.vector4_f32[1])) * + V1.vector4_f32[2]) + + (((V2.vector4_f32[1] * V3.vector4_f32[2]) - + (V2.vector4_f32[2] * V3.vector4_f32[1])) * + V1.vector4_f32[3]), + (((V2.vector4_f32[3] * V3.vector4_f32[2]) - + (V2.vector4_f32[2] * V3.vector4_f32[3])) * + V1.vector4_f32[0]) - + (((V2.vector4_f32[3] * V3.vector4_f32[0]) - + (V2.vector4_f32[0] * V3.vector4_f32[3])) * + V1.vector4_f32[2]) + + (((V2.vector4_f32[2] * V3.vector4_f32[0]) - + (V2.vector4_f32[0] * V3.vector4_f32[2])) * + V1.vector4_f32[3]), + (((V2.vector4_f32[1] * V3.vector4_f32[3]) - + (V2.vector4_f32[3] * V3.vector4_f32[1])) * + V1.vector4_f32[0]) - + (((V2.vector4_f32[0] * V3.vector4_f32[3]) - + (V2.vector4_f32[3] * V3.vector4_f32[0])) * + V1.vector4_f32[1]) + + (((V2.vector4_f32[0] * V3.vector4_f32[1]) - + (V2.vector4_f32[1] * V3.vector4_f32[0])) * + V1.vector4_f32[3]), + (((V2.vector4_f32[2] * V3.vector4_f32[1]) - + (V2.vector4_f32[1] * V3.vector4_f32[2])) * + V1.vector4_f32[0]) - + (((V2.vector4_f32[2] * V3.vector4_f32[0]) - + (V2.vector4_f32[0] * V3.vector4_f32[2])) * + V1.vector4_f32[1]) + + (((V2.vector4_f32[1] * V3.vector4_f32[0]) - + (V2.vector4_f32[0] * V3.vector4_f32[1])) * + V1.vector4_f32[2]), + }}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) @@ -13545,15 +12795,13 @@ inline XMVECTOR XM_CALLCONV XMVector4Cross //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4LengthSq(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4LengthSq(FXMVECTOR V) noexcept { return XMVector4Dot(V, V); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4ReciprocalLengthEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4ReciprocalLengthEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -13605,8 +12853,7 @@ inline XMVECTOR XM_CALLCONV XMVector4ReciprocalLengthEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4ReciprocalLength(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4ReciprocalLength(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -13624,12 +12871,12 @@ inline XMVECTOR XM_CALLCONV XMVector4ReciprocalLength(FXMVECTOR V) noexcept v1 = vadd_f32(v1, v2); v1 = vpadd_f32(v1, v1); // Reciprocal sqrt - float32x2_t S0 = vrsqrte_f32(v1); - float32x2_t P0 = vmul_f32(v1, S0); - float32x2_t R0 = vrsqrts_f32(P0, S0); - float32x2_t S1 = vmul_f32(S0, R0); - float32x2_t P1 = vmul_f32(v1, S1); - float32x2_t R1 = vrsqrts_f32(P1, S1); + float32x2_t S0 = vrsqrte_f32(v1); + float32x2_t P0 = vmul_f32(v1, S0); + float32x2_t R0 = vrsqrts_f32(P0, S0); + float32x2_t S1 = vmul_f32(S0, R0); + float32x2_t P1 = vmul_f32(v1, S1); + float32x2_t R1 = vrsqrts_f32(P1, S1); float32x2_t Result = vmul_f32(S1, R1); return vcombine_f32(Result, Result); #elif defined(_XM_SSE4_INTRINSICS_) @@ -13668,8 +12915,7 @@ inline XMVECTOR XM_CALLCONV XMVector4ReciprocalLength(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4LengthEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4LengthEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -13725,8 +12971,7 @@ inline XMVECTOR XM_CALLCONV XMVector4LengthEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Length(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4Length(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -13790,8 +13035,7 @@ inline XMVECTOR XM_CALLCONV XMVector4Length(FXMVECTOR V) noexcept // XMVector4NormalizeEst uses a reciprocal estimate and // returns QNaN on zero and infinite vectors. -inline XMVECTOR XM_CALLCONV XMVector4NormalizeEst(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4NormalizeEst(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) XMVECTOR Result; @@ -13846,8 +13090,7 @@ inline XMVECTOR XM_CALLCONV XMVector4NormalizeEst(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Normalize(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4Normalize(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) float fLength; XMVECTOR vResult; @@ -13856,8 +13099,7 @@ inline XMVECTOR XM_CALLCONV XMVector4Normalize(FXMVECTOR V) noexcept fLength = vResult.vector4_f32[0]; // Prevent divide by zero - if (fLength > 0) - { + if (fLength > 0) { fLength = 1.0f / fLength; } @@ -13886,7 +13128,8 @@ inline XMVECTOR XM_CALLCONV XMVector4Normalize(FXMVECTOR V) noexcept v2 = vmul_f32(S1, R1); // Normalize XMVECTOR vResult = vmulq_f32(V, vcombine_f32(v2, v2)); - vResult = vbslq_f32(vcombine_u32(VEqualsZero, VEqualsZero), vdupq_n_f32(0), vResult); + vResult = vbslq_f32(vcombine_u32(VEqualsZero, VEqualsZero), vdupq_n_f32(0), + vResult); return vbslq_f32(vcombine_u32(VEqualsInf, VEqualsInf), g_XMQNaN, vResult); #elif defined(_XM_SSE4_INTRINSICS_) XMVECTOR vLengthSq = _mm_dp_ps(V, V, 0xff); @@ -13969,13 +13212,8 @@ inline XMVECTOR XM_CALLCONV XMVector4Normalize(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4ClampLength -( - FXMVECTOR V, - float LengthMin, - float LengthMax -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4ClampLength(FXMVECTOR V, float LengthMin, + float LengthMax) noexcept { XMVECTOR ClampMax = XMVectorReplicate(LengthMax); XMVECTOR ClampMin = XMVectorReplicate(LengthMin); @@ -13984,15 +13222,14 @@ inline XMVECTOR XM_CALLCONV XMVector4ClampLength //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4ClampLengthV -( - FXMVECTOR V, - FXMVECTOR LengthMin, - FXMVECTOR LengthMax -) noexcept -{ - assert((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin)) && (XMVectorGetZ(LengthMin) == XMVectorGetX(LengthMin)) && (XMVectorGetW(LengthMin) == XMVectorGetX(LengthMin))); - assert((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax)) && (XMVectorGetZ(LengthMax) == XMVectorGetX(LengthMax)) && (XMVectorGetW(LengthMax) == XMVectorGetX(LengthMax))); +inline XMVECTOR XM_CALLCONV XMVector4ClampLengthV( + FXMVECTOR V, FXMVECTOR LengthMin, FXMVECTOR LengthMax) noexcept { + assert((XMVectorGetY(LengthMin) == XMVectorGetX(LengthMin)) && + (XMVectorGetZ(LengthMin) == XMVectorGetX(LengthMin)) && + (XMVectorGetW(LengthMin) == XMVectorGetX(LengthMin))); + assert((XMVectorGetY(LengthMax) == XMVectorGetX(LengthMax)) && + (XMVectorGetZ(LengthMax) == XMVectorGetX(LengthMax)) && + (XMVectorGetW(LengthMax) == XMVectorGetX(LengthMax))); assert(XMVector4GreaterOrEqual(LengthMin, XMVectorZero())); assert(XMVector4GreaterOrEqual(LengthMax, XMVectorZero())); assert(XMVector4GreaterOrEqual(LengthMax, LengthMin)); @@ -14022,7 +13259,8 @@ inline XMVECTOR XM_CALLCONV XMVector4ClampLengthV XMVECTOR Result = XMVectorMultiply(Normal, ClampLength); - // Preserve the original vector (with no precision loss) if the length falls within the given range + // Preserve the original vector (with no precision loss) if the length falls + // within the given range XMVECTOR Control = XMVectorEqualInt(ControlMax, ControlMin); Result = XMVectorSelect(Result, V, Control); @@ -14031,12 +13269,8 @@ inline XMVECTOR XM_CALLCONV XMVector4ClampLengthV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Reflect -( - FXMVECTOR Incident, - FXMVECTOR Normal -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4Reflect(FXMVECTOR Incident, + FXMVECTOR Normal) noexcept { // Result = Incident - (2 * dot(Incident, Normal)) * Normal XMVECTOR Result = XMVector4Dot(Incident, Normal); @@ -14048,34 +13282,26 @@ inline XMVECTOR XM_CALLCONV XMVector4Reflect //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Refract -( - FXMVECTOR Incident, - FXMVECTOR Normal, - float RefractionIndex -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4Refract(FXMVECTOR Incident, + FXMVECTOR Normal, + float RefractionIndex) noexcept { XMVECTOR Index = XMVectorReplicate(RefractionIndex); return XMVector4RefractV(Incident, Normal, Index); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4RefractV -( - FXMVECTOR Incident, - FXMVECTOR Normal, - FXMVECTOR RefractionIndex -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4RefractV( + FXMVECTOR Incident, FXMVECTOR Normal, FXMVECTOR RefractionIndex) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTOR IDotN; - XMVECTOR R; - const XMVECTOR Zero = XMVectorZero(); + XMVECTOR IDotN; + XMVECTOR R; + const XMVECTOR Zero = XMVectorZero(); - // Result = RefractionIndex * Incident - Normal * (RefractionIndex * dot(Incident, Normal) + - // sqrt(1 - RefractionIndex * RefractionIndex * (1 - dot(Incident, Normal) * dot(Incident, Normal)))) + // Result = RefractionIndex * Incident - Normal * (RefractionIndex * + // dot(Incident, Normal) + sqrt(1 - RefractionIndex * RefractionIndex * (1 - + // dot(Incident, Normal) * dot(Incident, Normal)))) IDotN = XMVector4Dot(Incident, Normal); @@ -14084,13 +13310,10 @@ inline XMVECTOR XM_CALLCONV XMVector4RefractV R = XMVectorMultiply(R, RefractionIndex); R = XMVectorNegativeMultiplySubtract(R, RefractionIndex, g_XMOne.v); - if (XMVector4LessOrEqual(R, Zero)) - { + if (XMVector4LessOrEqual(R, Zero)) { // Total internal reflection return Zero; - } - else - { + } else { XMVECTOR Result; // R = RefractionIndex * IDotN + sqrt(R) @@ -14113,17 +13336,16 @@ inline XMVECTOR XM_CALLCONV XMVector4RefractV R = vmlsq_f32(g_XMOne, R, RefractionIndex); uint32x4_t isrzero = vcleq_f32(R, g_XMZero); - uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(isrzero)), vget_high_u8(vreinterpretq_u8_u32(isrzero))); - uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), vreinterpret_u16_u8(vTemp.val[1])); + uint8x8x2_t vTemp = vzip_u8(vget_low_u8(vreinterpretq_u8_u32(isrzero)), + vget_high_u8(vreinterpretq_u8_u32(isrzero))); + uint16x4x2_t vTemp2 = vzip_u16(vreinterpret_u16_u8(vTemp.val[0]), + vreinterpret_u16_u8(vTemp.val[1])); float32x4_t vResult; - if (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU) - { + if (vget_lane_u32(vreinterpret_u32_u16(vTemp2.val[1]), 1) == 0xFFFFFFFFU) { // Total internal reflection vResult = g_XMZero; - } - else - { + } else { // Sqrt(R) float32x4_t S0 = vrsqrteq_f32(R); float32x4_t P0 = vmulq_f32(R, S0); @@ -14149,13 +13371,10 @@ inline XMVECTOR XM_CALLCONV XMVector4RefractV R = XM_FNMADD_PS(R, R2, g_XMOne); XMVECTOR vResult = _mm_cmple_ps(R, g_XMZero); - if (_mm_movemask_ps(vResult) == 0x0f) - { + if (_mm_movemask_ps(vResult) == 0x0f) { // Total internal reflection vResult = g_XMZero; - } - else - { + } else { // R = RefractionIndex * IDotN + sqrt(R) R = _mm_sqrt_ps(R); R = XM_FMADD_PS(RefractionIndex, IDotN, R); @@ -14169,25 +13388,20 @@ inline XMVECTOR XM_CALLCONV XMVector4RefractV //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Orthogonal(FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4Orthogonal(FXMVECTOR V) noexcept { #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 Result = { { { - V.vector4_f32[2], - V.vector4_f32[3], - -V.vector4_f32[0], - -V.vector4_f32[1] - } } }; + XMVECTORF32 Result = {{{V.vector4_f32[2], V.vector4_f32[3], + -V.vector4_f32[0], -V.vector4_f32[1]}}}; return Result.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Negate = { { { 1.f, 1.f, -1.f, -1.f } } }; + static const XMVECTORF32 Negate = {{{1.f, 1.f, -1.f, -1.f}}}; float32x4_t Result = vcombine_f32(vget_high_f32(V), vget_low_f32(V)); return vmulq_f32(Result, Negate); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 FlipZW = { { { 1.0f, 1.0f, -1.0f, -1.0f } } }; + static const XMVECTORF32 FlipZW = {{{1.0f, 1.0f, -1.0f, -1.0f}}}; XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 0, 3, 2)); vResult = _mm_mul_ps(vResult, FlipZW); return vResult; @@ -14196,12 +13410,8 @@ inline XMVECTOR XM_CALLCONV XMVector4Orthogonal(FXMVECTOR V) noexcept //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4AngleBetweenNormalsEst -( - FXMVECTOR N1, - FXMVECTOR N2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector4AngleBetweenNormalsEst(FXMVECTOR N1, FXMVECTOR N2) noexcept { XMVECTOR Result = XMVector4Dot(N1, N2); Result = XMVectorClamp(Result, g_XMNegativeOne.v, g_XMOne.v); Result = XMVectorACosEst(Result); @@ -14210,12 +13420,8 @@ inline XMVECTOR XM_CALLCONV XMVector4AngleBetweenNormalsEst //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4AngleBetweenNormals -( - FXMVECTOR N1, - FXMVECTOR N2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector4AngleBetweenNormals(FXMVECTOR N1, FXMVECTOR N2) noexcept { XMVECTOR Result = XMVector4Dot(N1, N2); Result = XMVectorClamp(Result, g_XMNegativeOne.v, g_XMOne.v); Result = XMVectorACos(Result); @@ -14224,12 +13430,8 @@ inline XMVECTOR XM_CALLCONV XMVector4AngleBetweenNormals //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4AngleBetweenVectors -( - FXMVECTOR V1, - FXMVECTOR V2 -) noexcept -{ +inline XMVECTOR XM_CALLCONV +XMVector4AngleBetweenVectors(FXMVECTOR V1, FXMVECTOR V2) noexcept { XMVECTOR L1 = XMVector4ReciprocalLength(V1); XMVECTOR L2 = XMVector4ReciprocalLength(V2); @@ -14245,53 +13447,45 @@ inline XMVECTOR XM_CALLCONV XMVector4AngleBetweenVectors //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV XMVector4Transform -( - FXMVECTOR V, - FXMMATRIX M -) noexcept -{ +inline XMVECTOR XM_CALLCONV XMVector4Transform(FXMVECTOR V, + FXMMATRIX M) noexcept { #if defined(_XM_NO_INTRINSICS_) - float fX = (M.m[0][0] * V.vector4_f32[0]) + (M.m[1][0] * V.vector4_f32[1]) + (M.m[2][0] * V.vector4_f32[2]) + (M.m[3][0] * V.vector4_f32[3]); - float fY = (M.m[0][1] * V.vector4_f32[0]) + (M.m[1][1] * V.vector4_f32[1]) + (M.m[2][1] * V.vector4_f32[2]) + (M.m[3][1] * V.vector4_f32[3]); - float fZ = (M.m[0][2] * V.vector4_f32[0]) + (M.m[1][2] * V.vector4_f32[1]) + (M.m[2][2] * V.vector4_f32[2]) + (M.m[3][2] * V.vector4_f32[3]); - float fW = (M.m[0][3] * V.vector4_f32[0]) + (M.m[1][3] * V.vector4_f32[1]) + (M.m[2][3] * V.vector4_f32[2]) + (M.m[3][3] * V.vector4_f32[3]); - XMVECTORF32 vResult = { { { fX, fY, fZ, fW } } }; + float fX = (M.m[0][0] * V.vector4_f32[0]) + (M.m[1][0] * V.vector4_f32[1]) + + (M.m[2][0] * V.vector4_f32[2]) + (M.m[3][0] * V.vector4_f32[3]); + float fY = (M.m[0][1] * V.vector4_f32[0]) + (M.m[1][1] * V.vector4_f32[1]) + + (M.m[2][1] * V.vector4_f32[2]) + (M.m[3][1] * V.vector4_f32[3]); + float fZ = (M.m[0][2] * V.vector4_f32[0]) + (M.m[1][2] * V.vector4_f32[1]) + + (M.m[2][2] * V.vector4_f32[2]) + (M.m[3][2] * V.vector4_f32[3]); + float fW = (M.m[0][3] * V.vector4_f32[0]) + (M.m[1][3] * V.vector4_f32[1]) + + (M.m[2][3] * V.vector4_f32[2]) + (M.m[3][3] * V.vector4_f32[3]); + XMVECTORF32 vResult = {{{fX, fY, fZ, fW}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x2_t VL = vget_low_f32(V); - XMVECTOR vResult = vmulq_lane_f32(M.r[0], VL, 0); // X - vResult = vmlaq_lane_f32(vResult, M.r[1], VL, 1); // Y + XMVECTOR vResult = vmulq_lane_f32(M.r[0], VL, 0); // X + vResult = vmlaq_lane_f32(vResult, M.r[1], VL, 1); // Y float32x2_t VH = vget_high_f32(V); - vResult = vmlaq_lane_f32(vResult, M.r[2], VH, 0); // Z - return vmlaq_lane_f32(vResult, M.r[3], VH, 1); // W + vResult = vmlaq_lane_f32(vResult, M.r[2], VH, 0); // Z + return vmlaq_lane_f32(vResult, M.r[3], VH, 1); // W #elif defined(_XM_SSE_INTRINSICS_) - XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(3, 3, 3, 3)); // W + XMVECTOR vResult = XM_PERMUTE_PS(V, _MM_SHUFFLE(3, 3, 3, 3)); // W vResult = _mm_mul_ps(vResult, M.r[3]); - XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); // Z + XMVECTOR vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(2, 2, 2, 2)); // Z vResult = XM_FMADD_PS(vTemp, M.r[2], vResult); - vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y + vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(1, 1, 1, 1)); // Y vResult = XM_FMADD_PS(vTemp, M.r[1], vResult); - vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X + vTemp = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); // X vResult = XM_FMADD_PS(vTemp, M.r[0], vResult); return vResult; #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream -( - XMFLOAT4* pOutputStream, - size_t OutputStride, - const XMFLOAT4* pInputStream, - size_t InputStride, - size_t VectorCount, - FXMMATRIX M -) noexcept -{ +_Use_decl_annotations_ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream( + XMFLOAT4* pOutputStream, size_t OutputStride, const XMFLOAT4* pInputStream, + size_t InputStride, size_t VectorCount, FXMMATRIX M) noexcept { assert(pOutputStream != nullptr); assert(pInputStream != nullptr); @@ -14311,9 +13505,9 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream const XMVECTOR row2 = M.r[2]; const XMVECTOR row3 = M.r[3]; - for (size_t i = 0; i < VectorCount; i++) - { - XMVECTOR V = XMLoadFloat4(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + XMVECTOR V = + XMLoadFloat4(reinterpret_cast(pInputVector)); XMVECTOR W = XMVectorSplatW(V); XMVECTOR Z = XMVectorSplatZ(V); XMVECTOR Y = XMVectorSplatY(V); @@ -14324,16 +13518,16 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream Result = XMVectorMultiplyAdd(Y, row1, Result); Result = XMVectorMultiplyAdd(X, row0, Result); - #ifdef _PREFAST_ - #pragma prefast(push) - #pragma prefast(disable : 26015, "PREfast noise: Esp:1307" ) - #endif +#ifdef _PREFAST_ +#pragma prefast(push) +#pragma prefast(disable : 26015, "PREfast noise: Esp:1307") +#endif XMStoreFloat4(reinterpret_cast(pOutputVector), Result); - #ifdef _PREFAST_ - #pragma prefast(pop) - #endif +#ifdef _PREFAST_ +#pragma prefast(pop) +#endif pInputVector += InputStride; pOutputVector += OutputStride; @@ -14352,60 +13546,67 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream size_t i = 0; size_t four = VectorCount >> 2; - if (four > 0) - { - if ((InputStride == sizeof(XMFLOAT4)) && (OutputStride == sizeof(XMFLOAT4))) - { - for (size_t j = 0; j < four; ++j) - { - float32x4x4_t V = vld4q_f32(reinterpret_cast(pInputVector)); + if (four > 0) { + if ((InputStride == sizeof(XMFLOAT4)) && + (OutputStride == sizeof(XMFLOAT4))) { + for (size_t j = 0; j < four; ++j) { + float32x4x4_t V = + vld4q_f32(reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT4) * 4; float32x2_t r = vget_low_f32(row0); - XMVECTOR vResult0 = vmulq_lane_f32(V.val[0], r, 0); // Ax - XMVECTOR vResult1 = vmulq_lane_f32(V.val[0], r, 1); // Bx + XMVECTOR vResult0 = vmulq_lane_f32(V.val[0], r, 0); // Ax + XMVECTOR vResult1 = vmulq_lane_f32(V.val[0], r, 1); // Bx XM_PREFETCH(pInputVector); r = vget_high_f32(row0); - XMVECTOR vResult2 = vmulq_lane_f32(V.val[0], r, 0); // Cx - XMVECTOR vResult3 = vmulq_lane_f32(V.val[0], r, 1); // Dx + XMVECTOR vResult2 = vmulq_lane_f32(V.val[0], r, 0); // Cx + XMVECTOR vResult3 = vmulq_lane_f32(V.val[0], r, 1); // Dx XM_PREFETCH(pInputVector + XM_CACHE_LINE_SIZE); r = vget_low_f32(row1); - vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey - vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy + vResult0 = vmlaq_lane_f32(vResult0, V.val[1], r, 0); // Ax+Ey + vResult1 = vmlaq_lane_f32(vResult1, V.val[1], r, 1); // Bx+Fy XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 2)); r = vget_high_f32(row1); - vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy - vResult3 = vmlaq_lane_f32(vResult3, V.val[1], r, 1); // Dx+Hy + vResult2 = vmlaq_lane_f32(vResult2, V.val[1], r, 0); // Cx+Gy + vResult3 = vmlaq_lane_f32(vResult3, V.val[1], r, 1); // Dx+Hy XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 3)); r = vget_low_f32(row2); - vResult0 = vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz - vResult1 = vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz + vResult0 = + vmlaq_lane_f32(vResult0, V.val[2], r, 0); // Ax+Ey+Iz + vResult1 = + vmlaq_lane_f32(vResult1, V.val[2], r, 1); // Bx+Fy+Jz XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 4)); r = vget_high_f32(row2); - vResult2 = vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz - vResult3 = vmlaq_lane_f32(vResult3, V.val[2], r, 1); // Dx+Hy+Lz + vResult2 = + vmlaq_lane_f32(vResult2, V.val[2], r, 0); // Cx+Gy+Kz + vResult3 = + vmlaq_lane_f32(vResult3, V.val[2], r, 1); // Dx+Hy+Lz XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 5)); r = vget_low_f32(row3); - vResult0 = vmlaq_lane_f32(vResult0, V.val[3], r, 0); // Ax+Ey+Iz+Mw - vResult1 = vmlaq_lane_f32(vResult1, V.val[3], r, 1); // Bx+Fy+Jz+Nw + vResult0 = + vmlaq_lane_f32(vResult0, V.val[3], r, 0); // Ax+Ey+Iz+Mw + vResult1 = + vmlaq_lane_f32(vResult1, V.val[3], r, 1); // Bx+Fy+Jz+Nw XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 6)); r = vget_high_f32(row3); - vResult2 = vmlaq_lane_f32(vResult2, V.val[3], r, 0); // Cx+Gy+Kz+Ow - vResult3 = vmlaq_lane_f32(vResult3, V.val[3], r, 1); // Dx+Hy+Lz+Pw + vResult2 = + vmlaq_lane_f32(vResult2, V.val[3], r, 0); // Cx+Gy+Kz+Ow + vResult3 = + vmlaq_lane_f32(vResult3, V.val[3], r, 1); // Dx+Hy+Lz+Pw XM_PREFETCH(pInputVector + (XM_CACHE_LINE_SIZE * 7)); @@ -14422,17 +13623,16 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream } } - for (; i < VectorCount; i++) - { + for (; i < VectorCount; i++) { XMVECTOR V = vld1q_f32(reinterpret_cast(pInputVector)); pInputVector += InputStride; float32x2_t VL = vget_low_f32(V); - XMVECTOR vResult = vmulq_lane_f32(row0, VL, 0); // X - vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y + XMVECTOR vResult = vmulq_lane_f32(row0, VL, 0); // X + vResult = vmlaq_lane_f32(vResult, row1, VL, 1); // Y float32x2_t VH = vget_high_f32(V); - vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z - vResult = vmlaq_lane_f32(vResult, row3, VH, 1); // W + vResult = vmlaq_lane_f32(vResult, row2, VH, 0); // Z + vResult = vmlaq_lane_f32(vResult, row3, VH, 1); // W vst1q_f32(reinterpret_cast(pOutputVector), vResult); pOutputVector += OutputStride; @@ -14445,29 +13645,29 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream size_t i = 0; size_t two = VectorCount >> 1; - if (two > 0) - { + if (two > 0) { __m256 row0 = _mm256_broadcast_ps(&M.r[0]); __m256 row1 = _mm256_broadcast_ps(&M.r[1]); __m256 row2 = _mm256_broadcast_ps(&M.r[2]); __m256 row3 = _mm256_broadcast_ps(&M.r[3]); - if (InputStride == sizeof(XMFLOAT4)) - { - if (OutputStride == sizeof(XMFLOAT4)) - { - if (!(reinterpret_cast(pOutputStream) & 0x1F)) - { + if (InputStride == sizeof(XMFLOAT4)) { + if (OutputStride == sizeof(XMFLOAT4)) { + if (!(reinterpret_cast(pOutputStream) & 0x1F)) { // Packed input, aligned & packed output - for (size_t j = 0; j < two; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT4) * 2; - __m256 vTempX = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); - __m256 vTempY = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 vTempZ = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 vTempW = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 vTempX = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 vTempY = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 vTempZ = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 vTempW = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); vTempX = _mm256_mul_ps(vTempX, row0); vTempY = _mm256_mul_ps(vTempY, row1); @@ -14475,24 +13675,27 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream vTempW = _mm256_fmadd_ps(vTempW, row3, vTempY); vTempX = _mm256_add_ps(vTempZ, vTempW); - XM256_STREAM_PS(reinterpret_cast(pOutputVector), vTempX); + XM256_STREAM_PS(reinterpret_cast(pOutputVector), + vTempX); pOutputVector += sizeof(XMFLOAT4) * 2; i += 2; } - } - else - { + } else { // Packed input, packed output - for (size_t j = 0; j < two; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT4) * 2; - __m256 vTempX = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); - __m256 vTempY = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 vTempZ = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 vTempW = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 vTempX = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 vTempY = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 vTempZ = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 vTempW = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); vTempX = _mm256_mul_ps(vTempX, row0); vTempY = _mm256_mul_ps(vTempY, row1); @@ -14500,25 +13703,28 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream vTempW = _mm256_fmadd_ps(vTempW, row3, vTempY); vTempX = _mm256_add_ps(vTempZ, vTempW); - _mm256_storeu_ps(reinterpret_cast(pOutputVector), vTempX); + _mm256_storeu_ps( + reinterpret_cast(pOutputVector), vTempX); pOutputVector += sizeof(XMFLOAT4) * 2; i += 2; } } - } - else - { + } else { // Packed input, unpacked output - for (size_t j = 0; j < two; ++j) - { - __m256 VV = _mm256_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t j = 0; j < two; ++j) { + __m256 VV = _mm256_loadu_ps( + reinterpret_cast(pInputVector)); pInputVector += sizeof(XMFLOAT4) * 2; - __m256 vTempX = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); - __m256 vTempY = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); - __m256 vTempZ = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); - __m256 vTempW = _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); + __m256 vTempX = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(0, 0, 0, 0)); + __m256 vTempY = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(1, 1, 1, 1)); + __m256 vTempZ = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(2, 2, 2, 2)); + __m256 vTempW = + _mm256_shuffle_ps(VV, VV, _MM_SHUFFLE(3, 3, 3, 3)); vTempX = _mm256_mul_ps(vTempX, row0); vTempY = _mm256_mul_ps(vTempY, row1); @@ -14526,10 +13732,12 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream vTempW = _mm256_fmadd_ps(vTempW, row3, vTempY); vTempX = _mm256_add_ps(vTempZ, vTempW); - _mm_storeu_ps(reinterpret_cast(pOutputVector), _mm256_castps256_ps128(vTempX)); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + _mm256_castps256_ps128(vTempX)); pOutputVector += OutputStride; - _mm_storeu_ps(reinterpret_cast(pOutputVector), _mm256_extractf128_ps(vTempX, 1)); + _mm_storeu_ps(reinterpret_cast(pOutputVector), + _mm256_extractf128_ps(vTempX, 1)); pOutputVector += OutputStride; i += 2; } @@ -14537,16 +13745,15 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream } } - if (i < VectorCount) - { + if (i < VectorCount) { const XMVECTOR row0 = M.r[0]; const XMVECTOR row1 = M.r[1]; const XMVECTOR row2 = M.r[2]; const XMVECTOR row3 = M.r[3]; - for (; i < VectorCount; i++) - { - __m128 V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (; i < VectorCount; i++) { + __m128 V = + _mm_loadu_ps(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR vTempX = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); @@ -14577,14 +13784,14 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream const XMVECTOR row2 = M.r[2]; const XMVECTOR row3 = M.r[3]; - if (!(reinterpret_cast(pOutputStream) & 0xF) && !(OutputStride & 0xF)) - { - if (!(reinterpret_cast(pInputStream) & 0xF) && !(InputStride & 0xF)) - { + if (!(reinterpret_cast(pOutputStream) & 0xF) && + !(OutputStride & 0xF)) { + if (!(reinterpret_cast(pInputStream) & 0xF) && + !(InputStride & 0xF)) { // Aligned input, aligned output - for (size_t i = 0; i < VectorCount; i++) - { - __m128 V = _mm_load_ps(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + __m128 V = + _mm_load_ps(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR vTempX = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); @@ -14601,13 +13808,11 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream XM_STREAM_PS(reinterpret_cast(pOutputVector), vTempX); pOutputVector += OutputStride; } - } - else - { + } else { // Unaligned input, aligned output - for (size_t i = 0; i < VectorCount; i++) - { - __m128 V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + __m128 V = + _mm_loadu_ps(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR vTempX = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); @@ -14625,15 +13830,13 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream pOutputVector += OutputStride; } } - } - else - { - if (!(reinterpret_cast(pInputStream) & 0xF) && !(InputStride & 0xF)) - { + } else { + if (!(reinterpret_cast(pInputStream) & 0xF) && + !(InputStride & 0xF)) { // Aligned input, unaligned output - for (size_t i = 0; i < VectorCount; i++) - { - __m128 V = _mm_load_ps(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + __m128 V = + _mm_load_ps(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR vTempX = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); @@ -14650,13 +13853,11 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream _mm_storeu_ps(reinterpret_cast(pOutputVector), vTempX); pOutputVector += OutputStride; } - } - else - { + } else { // Unaligned input, unaligned output - for (size_t i = 0; i < VectorCount; i++) - { - __m128 V = _mm_loadu_ps(reinterpret_cast(pInputVector)); + for (size_t i = 0; i < VectorCount; i++) { + __m128 V = + _mm_loadu_ps(reinterpret_cast(pInputVector)); pInputVector += InputStride; XMVECTOR vTempX = XM_PERMUTE_PS(V, _MM_SHUFFLE(0, 0, 0, 0)); @@ -14692,86 +13893,52 @@ inline XMFLOAT4* XM_CALLCONV XMVector4TransformStream //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator+ (FXMVECTOR V) noexcept -{ - return V; -} +inline XMVECTOR XM_CALLCONV operator+(FXMVECTOR V) noexcept { return V; } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator- (FXMVECTOR V) noexcept -{ +inline XMVECTOR XM_CALLCONV operator-(FXMVECTOR V) noexcept { return XMVectorNegate(V); } //------------------------------------------------------------------------------ -inline XMVECTOR& XM_CALLCONV operator+= -( - XMVECTOR& V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR& XM_CALLCONV operator+=(XMVECTOR& V1, FXMVECTOR V2) noexcept { V1 = XMVectorAdd(V1, V2); return V1; } //------------------------------------------------------------------------------ -inline XMVECTOR& XM_CALLCONV operator-= -( - XMVECTOR& V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR& XM_CALLCONV operator-=(XMVECTOR& V1, FXMVECTOR V2) noexcept { V1 = XMVectorSubtract(V1, V2); return V1; } //------------------------------------------------------------------------------ -inline XMVECTOR& XM_CALLCONV operator*= -( - XMVECTOR& V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR& XM_CALLCONV operator*=(XMVECTOR& V1, FXMVECTOR V2) noexcept { V1 = XMVectorMultiply(V1, V2); return V1; } //------------------------------------------------------------------------------ -inline XMVECTOR& XM_CALLCONV operator/= -( - XMVECTOR& V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR& XM_CALLCONV operator/=(XMVECTOR& V1, FXMVECTOR V2) noexcept { V1 = XMVectorDivide(V1, V2); return V1; } //------------------------------------------------------------------------------ -inline XMVECTOR& operator*= -( - XMVECTOR& V, - const float S - ) noexcept -{ +inline XMVECTOR& operator*=(XMVECTOR& V, const float S) noexcept { V = XMVectorScale(V, S); return V; } //------------------------------------------------------------------------------ -inline XMVECTOR& operator/= -( - XMVECTOR& V, - const float S - ) noexcept -{ +inline XMVECTOR& operator/=(XMVECTOR& V, const float S) noexcept { XMVECTOR vS = XMVectorReplicate(S); V = XMVectorDivide(V, vS); return V; @@ -14779,79 +13946,44 @@ inline XMVECTOR& operator/= //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator+ -( - FXMVECTOR V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR XM_CALLCONV operator+(FXMVECTOR V1, FXMVECTOR V2) noexcept { return XMVectorAdd(V1, V2); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator- -( - FXMVECTOR V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR XM_CALLCONV operator-(FXMVECTOR V1, FXMVECTOR V2) noexcept { return XMVectorSubtract(V1, V2); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator* -( - FXMVECTOR V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR XM_CALLCONV operator*(FXMVECTOR V1, FXMVECTOR V2) noexcept { return XMVectorMultiply(V1, V2); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator/ -( - FXMVECTOR V1, - FXMVECTOR V2 - ) noexcept -{ +inline XMVECTOR XM_CALLCONV operator/(FXMVECTOR V1, FXMVECTOR V2) noexcept { return XMVectorDivide(V1, V2); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator* -( - FXMVECTOR V, - const float S - ) noexcept -{ +inline XMVECTOR XM_CALLCONV operator*(FXMVECTOR V, const float S) noexcept { return XMVectorScale(V, S); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator/ -( - FXMVECTOR V, - const float S - ) noexcept -{ +inline XMVECTOR XM_CALLCONV operator/(FXMVECTOR V, const float S) noexcept { XMVECTOR vS = XMVectorReplicate(S); return XMVectorDivide(V, vS); } //------------------------------------------------------------------------------ -inline XMVECTOR XM_CALLCONV operator* -( - float S, - FXMVECTOR V - ) noexcept -{ +inline XMVECTOR XM_CALLCONV operator*(float S, FXMVECTOR V) noexcept { return XMVectorScale(V, S); } @@ -14866,4 +13998,3 @@ inline XMVECTOR XM_CALLCONV operator* #undef XM3UNPACK3INTO4 #undef XM3PACK4INTO3 #endif - diff --git a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.inl b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.inl index ccb07dd6c..2ed7774a0 100644 --- a/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.inl +++ b/targets/Minecraft.Client/Linux/Stubs/DirectXMath/DirectXPackedVector.inl @@ -17,13 +17,15 @@ //------------------------------------------------------------------------------ -inline float XMConvertHalfToFloat(HALF Value) noexcept -{ +inline float XMConvertHalfToFloat(HALF Value) noexcept { #if defined(_XM_F16C_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) __m128i V1 = _mm_cvtsi32_si128(static_cast(Value)); __m128 V2 = _mm_cvtph_ps(V1); return _mm_cvtss_f32(V2); -#elif defined(_XM_ARM_NEON_INTRINSICS_) && (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__) && !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) +#elif defined(_XM_ARM_NEON_INTRINSICS_) && \ + (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__) && \ + !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) uint16x4_t vHalf = vdup_n_u16(Value); float32x4_t vFloat = vcvt_f32_f16(vreinterpret_f16_u16(vHalf)); return vgetq_lane_f32(vFloat, 0); @@ -31,58 +33,46 @@ inline float XMConvertHalfToFloat(HALF Value) noexcept auto Mantissa = static_cast(Value & 0x03FF); uint32_t Exponent = (Value & 0x7C00); - if (Exponent == 0x7C00) // INF/NAN + if (Exponent == 0x7C00) // INF/NAN { Exponent = 0x8f; - } - else if (Exponent != 0) // The value is normalized + } else if (Exponent != 0) // The value is normalized { - Exponent = static_cast((static_cast(Value) >> 10) & 0x1F); - } - else if (Mantissa != 0) // The value is denormalized + Exponent = + static_cast((static_cast(Value) >> 10) & 0x1F); + } else if (Mantissa != 0) // The value is denormalized { // Normalize the value in the resulting float Exponent = 1; - do - { + do { Exponent--; Mantissa <<= 1; - } - while ((Mantissa & 0x0400) == 0); + } while ((Mantissa & 0x0400) == 0); Mantissa &= 0x03FF; - } - else // The value is zero + } else // The value is zero { Exponent = static_cast(-112); } - uint32_t Result = - ((static_cast(Value) & 0x8000) << 16) // Sign - | ((Exponent + 112) << 23) // Exponent - | (Mantissa << 13); // Mantissa + uint32_t Result = ((static_cast(Value) & 0x8000) << 16) // Sign + | ((Exponent + 112) << 23) // Exponent + | (Mantissa << 13); // Mantissa return reinterpret_cast(&Result)[0]; -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } //------------------------------------------------------------------------------ #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307" ) +#pragma prefast(disable : 26015 26019, "PREfast noise: Esp:1307") #endif -_Use_decl_annotations_ -inline float* XMConvertHalfToFloatStream -( - float* pOutputStream, - size_t OutputStride, - const HALF* pInputStream, - size_t InputStride, - size_t HalfCount -) noexcept -{ +_Use_decl_annotations_ inline float* XMConvertHalfToFloatStream( + float* pOutputStream, size_t OutputStride, const HALF* pInputStream, + size_t InputStride, size_t HalfCount) noexcept { assert(pOutputStream); assert(pInputStream); @@ -98,18 +88,14 @@ inline float* XMConvertHalfToFloatStream size_t i = 0; size_t four = HalfCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(HALF)) - { - if (OutputStride == sizeof(float)) - { - if ((reinterpret_cast(pFloat) & 0xF) == 0) - { + if (four > 0) { + if (InputStride == sizeof(HALF)) { + if (OutputStride == sizeof(float)) { + if ((reinterpret_cast(pFloat) & 0xF) == 0) { // Packed input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { - __m128i HV = _mm_loadl_epi64(reinterpret_cast(pHalf)); + for (size_t j = 0; j < four; ++j) { + __m128i HV = _mm_loadl_epi64( + reinterpret_cast(pHalf)); pHalf += InputStride * 4; __m128 FV = _mm_cvtph_ps(HV); @@ -118,13 +104,11 @@ inline float* XMConvertHalfToFloatStream pFloat += OutputStride * 4; i += 4; } - } - else - { + } else { // Packed input, packed output - for (size_t j = 0; j < four; ++j) - { - __m128i HV = _mm_loadl_epi64(reinterpret_cast(pHalf)); + for (size_t j = 0; j < four; ++j) { + __m128i HV = _mm_loadl_epi64( + reinterpret_cast(pHalf)); pHalf += InputStride * 4; __m128 FV = _mm_cvtph_ps(HV); @@ -134,13 +118,11 @@ inline float* XMConvertHalfToFloatStream i += 4; } } - } - else - { + } else { // Packed input, scattered output - for (size_t j = 0; j < four; ++j) - { - __m128i HV = _mm_loadl_epi64(reinterpret_cast(pHalf)); + for (size_t j = 0; j < four; ++j) { + __m128i HV = _mm_loadl_epi64( + reinterpret_cast(pHalf)); pHalf += InputStride * 4; __m128 FV = _mm_cvtph_ps(HV); @@ -156,14 +138,10 @@ inline float* XMConvertHalfToFloatStream i += 4; } } - } - else if (OutputStride == sizeof(float)) - { - if ((reinterpret_cast(pFloat) & 0xF) == 0) - { + } else if (OutputStride == sizeof(float)) { + if ((reinterpret_cast(pFloat) & 0xF) == 0) { // Scattered input, aligned & packed output - for (size_t j = 0; j < four; ++j) - { + for (size_t j = 0; j < four; ++j) { uint16_t H1 = *reinterpret_cast(pHalf); pHalf += InputStride; uint16_t H2 = *reinterpret_cast(pHalf); @@ -184,12 +162,9 @@ inline float* XMConvertHalfToFloatStream pFloat += OutputStride * 4; i += 4; } - } - else - { + } else { // Scattered input, packed output - for (size_t j = 0; j < four; ++j) - { + for (size_t j = 0; j < four; ++j) { uint16_t H1 = *reinterpret_cast(pHalf); pHalf += InputStride; uint16_t H2 = *reinterpret_cast(pHalf); @@ -211,12 +186,9 @@ inline float* XMConvertHalfToFloatStream i += 4; } } - } - else - { + } else { // Scattered input, scattered output - for (size_t j = 0; j < four; ++j) - { + for (size_t j = 0; j < four; ++j) { uint16_t H1 = *reinterpret_cast(pHalf); pHalf += InputStride; uint16_t H2 = *reinterpret_cast(pHalf); @@ -246,9 +218,9 @@ inline float* XMConvertHalfToFloatStream } } - for (; i < HalfCount; ++i) - { - *reinterpret_cast(pFloat) = XMConvertHalfToFloat(reinterpret_cast(pHalf)[0]); + for (; i < HalfCount; ++i) { + *reinterpret_cast(pFloat) = + XMConvertHalfToFloat(reinterpret_cast(pHalf)[0]); pHalf += InputStride; pFloat += OutputStride; } @@ -256,40 +228,40 @@ inline float* XMConvertHalfToFloatStream XM_SFENCE(); return pOutputStream; -#elif defined(_XM_ARM_NEON_INTRINSICS_) && (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) ||__aarch64__) && !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) +#elif defined(_XM_ARM_NEON_INTRINSICS_) && \ + (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__) && \ + !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) auto pHalf = reinterpret_cast(pInputStream); auto pFloat = reinterpret_cast(pOutputStream); size_t i = 0; size_t four = HalfCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(HALF)) - { - if (OutputStride == sizeof(float)) - { + if (four > 0) { + if (InputStride == sizeof(HALF)) { + if (OutputStride == sizeof(float)) { // Packed input, packed output - for (size_t j = 0; j < four; ++j) - { - uint16x4_t vHalf = vld1_u16(reinterpret_cast(pHalf)); + for (size_t j = 0; j < four; ++j) { + uint16x4_t vHalf = + vld1_u16(reinterpret_cast(pHalf)); pHalf += InputStride * 4; - float32x4_t vFloat = vcvt_f32_f16(vreinterpret_f16_u16(vHalf)); + float32x4_t vFloat = + vcvt_f32_f16(vreinterpret_f16_u16(vHalf)); vst1q_f32(reinterpret_cast(pFloat), vFloat); pFloat += OutputStride * 4; i += 4; } - } - else - { + } else { // Packed input, scattered output - for (size_t j = 0; j < four; ++j) - { - uint16x4_t vHalf = vld1_u16(reinterpret_cast(pHalf)); + for (size_t j = 0; j < four; ++j) { + uint16x4_t vHalf = + vld1_u16(reinterpret_cast(pHalf)); pHalf += InputStride * 4; - float32x4_t vFloat = vcvt_f32_f16(vreinterpret_f16_u16(vHalf)); + float32x4_t vFloat = + vcvt_f32_f16(vreinterpret_f16_u16(vHalf)); vst1q_lane_f32(reinterpret_cast(pFloat), vFloat, 0); pFloat += OutputStride; @@ -302,12 +274,9 @@ inline float* XMConvertHalfToFloatStream i += 4; } } - } - else if (OutputStride == sizeof(float)) - { + } else if (OutputStride == sizeof(float)) { // Scattered input, packed output - for (size_t j = 0; j < four; ++j) - { + for (size_t j = 0; j < four; ++j) { uint16_t H1 = *reinterpret_cast(pHalf); pHalf += InputStride; uint16_t H2 = *reinterpret_cast(pHalf); @@ -317,7 +286,8 @@ inline float* XMConvertHalfToFloatStream uint16_t H4 = *reinterpret_cast(pHalf); pHalf += InputStride; - uint64_t iHalf = uint64_t(H1) | (uint64_t(H2) << 16) | (uint64_t(H3) << 32) | (uint64_t(H4) << 48); + uint64_t iHalf = uint64_t(H1) | (uint64_t(H2) << 16) | + (uint64_t(H3) << 32) | (uint64_t(H4) << 48); uint16x4_t vHalf = vcreate_u16(iHalf); float32x4_t vFloat = vcvt_f32_f16(vreinterpret_f16_u16(vHalf)); @@ -326,12 +296,9 @@ inline float* XMConvertHalfToFloatStream pFloat += OutputStride * 4; i += 4; } - } - else - { + } else { // Scattered input, scattered output - for (size_t j = 0; j < four; ++j) - { + for (size_t j = 0; j < four; ++j) { uint16_t H1 = *reinterpret_cast(pHalf); pHalf += InputStride; uint16_t H2 = *reinterpret_cast(pHalf); @@ -341,7 +308,8 @@ inline float* XMConvertHalfToFloatStream uint16_t H4 = *reinterpret_cast(pHalf); pHalf += InputStride; - uint64_t iHalf = uint64_t(H1) | (uint64_t(H2) << 16) | (uint64_t(H3) << 32) | (uint64_t(H4) << 48); + uint64_t iHalf = uint64_t(H1) | (uint64_t(H2) << 16) | + (uint64_t(H3) << 32) | (uint64_t(H4) << 48); uint16x4_t vHalf = vcreate_u16(iHalf); float32x4_t vFloat = vcvt_f32_f16(vreinterpret_f16_u16(vHalf)); @@ -359,9 +327,9 @@ inline float* XMConvertHalfToFloatStream } } - for (; i < HalfCount; ++i) - { - *reinterpret_cast(pFloat) = XMConvertHalfToFloat(reinterpret_cast(pHalf)[0]); + for (; i < HalfCount; ++i) { + *reinterpret_cast(pFloat) = + XMConvertHalfToFloat(reinterpret_cast(pHalf)[0]); pHalf += InputStride; pFloat += OutputStride; } @@ -371,26 +339,28 @@ inline float* XMConvertHalfToFloatStream auto pHalf = reinterpret_cast(pInputStream); auto pFloat = reinterpret_cast(pOutputStream); - for (size_t i = 0; i < HalfCount; i++) - { - *reinterpret_cast(pFloat) = XMConvertHalfToFloat(reinterpret_cast(pHalf)[0]); + for (size_t i = 0; i < HalfCount; i++) { + *reinterpret_cast(pFloat) = + XMConvertHalfToFloat(reinterpret_cast(pHalf)[0]); pHalf += InputStride; pFloat += OutputStride; } return pOutputStream; -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } //------------------------------------------------------------------------------ -inline HALF XMConvertFloatToHalf(float Value) noexcept -{ +inline HALF XMConvertFloatToHalf(float Value) noexcept { #if defined(_XM_F16C_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) __m128 V1 = _mm_set_ss(Value); __m128i V2 = _mm_cvtps_ph(V1, _MM_FROUND_TO_NEAREST_INT); return static_cast(_mm_extract_epi16(V2, 0)); -#elif defined(_XM_ARM_NEON_INTRINSICS_) && (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__) && !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) +#elif defined(_XM_ARM_NEON_INTRINSICS_) && \ + (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__) && \ + !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) float32x4_t vFloat = vdupq_n_f32(Value); float16x4_t vHalf = vcvt_f16_f32(vFloat); return vget_lane_u16(vreinterpret_u16_f16(vHalf), 0); @@ -399,18 +369,16 @@ inline HALF XMConvertFloatToHalf(float Value) noexcept auto IValue = reinterpret_cast(&Value)[0]; uint32_t Sign = (IValue & 0x80000000U) >> 16U; - IValue = IValue & 0x7FFFFFFFU; // Hack off the sign - if (IValue >= 0x47800000 /*e+16*/) - { - // The number is too large to be represented as a half. Return infinity or NaN - Result = 0x7C00U | ((IValue > 0x7F800000) ? (0x200 | ((IValue >> 13U) & 0x3FFU)) : 0U); - } - else if (IValue <= 0x33000000U /*e-25*/) - { + IValue = IValue & 0x7FFFFFFFU; // Hack off the sign + if (IValue >= 0x47800000 /*e+16*/) { + // The number is too large to be represented as a half. Return infinity + // or NaN + Result = + 0x7C00U | + ((IValue > 0x7F800000) ? (0x200 | ((IValue >> 13U) & 0x3FFU)) : 0U); + } else if (IValue <= 0x33000000U /*e-25*/) { Result = 0; - } - else if (IValue < 0x38800000U /*e-14*/) - { + } else if (IValue < 0x38800000U /*e-14*/) { // The number is too small to be represented as a normalized half. // Convert it to a denormalized value. uint32_t Shift = 125U - (IValue >> 23U); @@ -418,28 +386,19 @@ inline HALF XMConvertFloatToHalf(float Value) noexcept Result = IValue >> (Shift + 1); uint32_t s = (IValue & ((1U << Shift) - 1)) != 0; Result += (Result | s) & ((IValue >> Shift) & 1U); - } - else - { + } else { // Rebias the exponent to represent the value as a normalized half. IValue += 0xC8000000U; Result = ((IValue + 0x0FFFU + ((IValue >> 13U) & 1U)) >> 13U) & 0x7FFFU; } return static_cast(Result | Sign); -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline HALF* XMConvertFloatToHalfStream -( - HALF* pOutputStream, - size_t OutputStride, - const float* pInputStream, - size_t InputStride, - size_t FloatCount -) noexcept -{ +_Use_decl_annotations_ inline HALF* XMConvertFloatToHalfStream( + HALF* pOutputStream, size_t OutputStride, const float* pInputStream, + size_t InputStride, size_t FloatCount) noexcept { assert(pOutputStream); assert(pInputStream); @@ -455,104 +414,106 @@ inline HALF* XMConvertFloatToHalfStream size_t i = 0; size_t four = FloatCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(float)) - { - if (OutputStride == sizeof(HALF)) - { - if ((reinterpret_cast(pFloat) & 0xF) == 0) - { + if (four > 0) { + if (InputStride == sizeof(float)) { + if (OutputStride == sizeof(HALF)) { + if ((reinterpret_cast(pFloat) & 0xF) == 0) { // Aligned and packed input, packed output - for (size_t j = 0; j < four; ++j) - { - __m128 FV = _mm_load_ps(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + __m128 FV = + _mm_load_ps(reinterpret_cast(pFloat)); pFloat += InputStride * 4; - __m128i HV = _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); + __m128i HV = + _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); _mm_storel_epi64(reinterpret_cast<__m128i*>(pHalf), HV); pHalf += OutputStride * 4; i += 4; } - } - else - { + } else { // Packed input, packed output - for (size_t j = 0; j < four; ++j) - { - __m128 FV = _mm_loadu_ps(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + __m128 FV = _mm_loadu_ps( + reinterpret_cast(pFloat)); pFloat += InputStride * 4; - __m128i HV = _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); + __m128i HV = + _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); _mm_storel_epi64(reinterpret_cast<__m128i*>(pHalf), HV); pHalf += OutputStride * 4; i += 4; } } - } - else - { - if ((reinterpret_cast(pFloat) & 0xF) == 0) - { + } else { + if ((reinterpret_cast(pFloat) & 0xF) == 0) { // Aligned & packed input, scattered output - for (size_t j = 0; j < four; ++j) - { - __m128 FV = _mm_load_ps(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + __m128 FV = + _mm_load_ps(reinterpret_cast(pFloat)); pFloat += InputStride * 4; - __m128i HV = _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); + __m128i HV = + _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 0)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 0)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 1)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 1)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 2)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 2)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 3)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 3)); pHalf += OutputStride; i += 4; } - } - else - { + } else { // Packed input, scattered output - for (size_t j = 0; j < four; ++j) - { - __m128 FV = _mm_loadu_ps(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + __m128 FV = _mm_loadu_ps( + reinterpret_cast(pFloat)); pFloat += InputStride * 4; - __m128i HV = _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); + __m128i HV = + _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 0)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 0)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 1)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 1)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 2)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 2)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 3)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 3)); pHalf += OutputStride; i += 4; } } } - } - else if (OutputStride == sizeof(HALF)) - { + } else if (OutputStride == sizeof(HALF)) { // Scattered input, packed output - for (size_t j = 0; j < four; ++j) - { - __m128 FV1 = _mm_load_ss(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + __m128 FV1 = + _mm_load_ss(reinterpret_cast(pFloat)); pFloat += InputStride; - __m128 FV2 = _mm_broadcast_ss(reinterpret_cast(pFloat)); + __m128 FV2 = + _mm_broadcast_ss(reinterpret_cast(pFloat)); pFloat += InputStride; - __m128 FV3 = _mm_broadcast_ss(reinterpret_cast(pFloat)); + __m128 FV3 = + _mm_broadcast_ss(reinterpret_cast(pFloat)); pFloat += InputStride; - __m128 FV4 = _mm_broadcast_ss(reinterpret_cast(pFloat)); + __m128 FV4 = + _mm_broadcast_ss(reinterpret_cast(pFloat)); pFloat += InputStride; __m128 FV = _mm_blend_ps(FV1, FV2, 0x2); @@ -565,22 +526,23 @@ inline HALF* XMConvertFloatToHalfStream pHalf += OutputStride * 4; i += 4; } - } - else - { + } else { // Scattered input, scattered output - for (size_t j = 0; j < four; ++j) - { - __m128 FV1 = _mm_load_ss(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + __m128 FV1 = + _mm_load_ss(reinterpret_cast(pFloat)); pFloat += InputStride; - __m128 FV2 = _mm_broadcast_ss(reinterpret_cast(pFloat)); + __m128 FV2 = + _mm_broadcast_ss(reinterpret_cast(pFloat)); pFloat += InputStride; - __m128 FV3 = _mm_broadcast_ss(reinterpret_cast(pFloat)); + __m128 FV3 = + _mm_broadcast_ss(reinterpret_cast(pFloat)); pFloat += InputStride; - __m128 FV4 = _mm_broadcast_ss(reinterpret_cast(pFloat)); + __m128 FV4 = + _mm_broadcast_ss(reinterpret_cast(pFloat)); pFloat += InputStride; __m128 FV = _mm_blend_ps(FV1, FV2, 0x2); @@ -589,61 +551,65 @@ inline HALF* XMConvertFloatToHalfStream __m128i HV = _mm_cvtps_ph(FV, _MM_FROUND_TO_NEAREST_INT); - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 0)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 0)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 1)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 1)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 2)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 2)); pHalf += OutputStride; - *reinterpret_cast(pHalf) = static_cast(_mm_extract_epi16(HV, 3)); + *reinterpret_cast(pHalf) = + static_cast(_mm_extract_epi16(HV, 3)); pHalf += OutputStride; i += 4; } } } - for (; i < FloatCount; ++i) - { - *reinterpret_cast(pHalf) = XMConvertFloatToHalf(reinterpret_cast(pFloat)[0]); + for (; i < FloatCount; ++i) { + *reinterpret_cast(pHalf) = + XMConvertFloatToHalf(reinterpret_cast(pFloat)[0]); pFloat += InputStride; pHalf += OutputStride; } return pOutputStream; -#elif defined(_XM_ARM_NEON_INTRINSICS_) && (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __aarch64__) && !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) +#elif defined(_XM_ARM_NEON_INTRINSICS_) && \ + (defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || \ + defined(_M_ARM64EC) || __aarch64__) && \ + !defined(_XM_NO_INTRINSICS_) && (!defined(__GNUC__) || (__ARM_FP & 2)) auto pFloat = reinterpret_cast(pInputStream); auto pHalf = reinterpret_cast(pOutputStream); size_t i = 0; size_t four = FloatCount >> 2; - if (four > 0) - { - if (InputStride == sizeof(float)) - { - if (OutputStride == sizeof(HALF)) - { + if (four > 0) { + if (InputStride == sizeof(float)) { + if (OutputStride == sizeof(HALF)) { // Packed input, packed output - for (size_t j = 0; j < four; ++j) - { - float32x4_t vFloat = vld1q_f32(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + float32x4_t vFloat = + vld1q_f32(reinterpret_cast(pFloat)); pFloat += InputStride * 4; - uint16x4_t vHalf = vreinterpret_u16_f16(vcvt_f16_f32(vFloat)); + uint16x4_t vHalf = + vreinterpret_u16_f16(vcvt_f16_f32(vFloat)); vst1_u16(reinterpret_cast(pHalf), vHalf); pHalf += OutputStride * 4; i += 4; } - } - else - { + } else { // Packed input, scattered output - for (size_t j = 0; j < four; ++j) - { - float32x4_t vFloat = vld1q_f32(reinterpret_cast(pFloat)); + for (size_t j = 0; j < four; ++j) { + float32x4_t vFloat = + vld1q_f32(reinterpret_cast(pFloat)); pFloat += InputStride * 4; - uint16x4_t vHalf = vreinterpret_u16_f16(vcvt_f16_f32(vFloat)); + uint16x4_t vHalf = + vreinterpret_u16_f16(vcvt_f16_f32(vFloat)); vst1_lane_u16(reinterpret_cast(pHalf), vHalf, 0); pHalf += OutputStride; @@ -656,23 +622,24 @@ inline HALF* XMConvertFloatToHalfStream i += 4; } } - } - else if (OutputStride == sizeof(HALF)) - { + } else if (OutputStride == sizeof(HALF)) { // Scattered input, packed output - for (size_t j = 0; j < four; ++j) - { + for (size_t j = 0; j < four; ++j) { float32x4_t vFloat = vdupq_n_f32(0); - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 0); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 0); pFloat += InputStride; - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 1); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 1); pFloat += InputStride; - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 2); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 2); pFloat += InputStride; - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 3); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 3); pFloat += InputStride; uint16x4_t vHalf = vreinterpret_u16_f16(vcvt_f16_f32(vFloat)); @@ -681,23 +648,24 @@ inline HALF* XMConvertFloatToHalfStream pHalf += OutputStride * 4; i += 4; } - } - else - { + } else { // Scattered input, scattered output - for (size_t j = 0; j < four; ++j) - { + for (size_t j = 0; j < four; ++j) { float32x4_t vFloat = vdupq_n_f32(0); - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 0); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 0); pFloat += InputStride; - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 1); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 1); pFloat += InputStride; - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 2); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 2); pFloat += InputStride; - vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), vFloat, 3); + vFloat = vld1q_lane_f32(reinterpret_cast(pFloat), + vFloat, 3); pFloat += InputStride; uint16x4_t vHalf = vreinterpret_u16_f16(vcvt_f16_f32(vFloat)); @@ -715,9 +683,9 @@ inline HALF* XMConvertFloatToHalfStream } } - for (; i < FloatCount; ++i) - { - *reinterpret_cast(pHalf) = XMConvertFloatToHalf(reinterpret_cast(pFloat)[0]); + for (; i < FloatCount; ++i) { + *reinterpret_cast(pHalf) = + XMConvertFloatToHalf(reinterpret_cast(pFloat)[0]); pFloat += InputStride; pHalf += OutputStride; } @@ -727,14 +695,14 @@ inline HALF* XMConvertFloatToHalfStream auto pFloat = reinterpret_cast(pInputStream); auto pHalf = reinterpret_cast(pOutputStream); - for (size_t i = 0; i < FloatCount; i++) - { - *reinterpret_cast(pHalf) = XMConvertFloatToHalf(reinterpret_cast(pFloat)[0]); + for (size_t i = 0; i < FloatCount; i++) { + *reinterpret_cast(pHalf) = + XMConvertFloatToHalf(reinterpret_cast(pFloat)[0]); pFloat += InputStride; pHalf += OutputStride; } return pOutputStream; -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } #ifdef _PREFAST_ @@ -749,27 +717,26 @@ inline HALF* XMConvertFloatToHalfStream #ifdef _PREFAST_ #pragma prefast(push) -#pragma prefast(disable:28931, "PREfast noise: Esp:1266") +#pragma prefast(disable : 28931, "PREfast noise: Esp:1266") #endif -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadColor(const XMCOLOR* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadColor(const XMCOLOR* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) // int32_t -> Float conversions are done in one instruction. // uint32_t -> Float calls a runtime function. Keep in int32_t auto iColor = static_cast(pSource->c); - XMVECTORF32 vColor = { { { - static_cast((iColor >> 16) & 0xFF)* (1.0f / 255.0f), - static_cast((iColor >> 8) & 0xFF)* (1.0f / 255.0f), - static_cast(iColor & 0xFF)* (1.0f / 255.0f), - static_cast((iColor >> 24) & 0xFF)* (1.0f / 255.0f) - } } }; + XMVECTORF32 vColor = { + {{static_cast((iColor >> 16) & 0xFF) * (1.0f / 255.0f), + static_cast((iColor >> 8) & 0xFF) * (1.0f / 255.0f), + static_cast(iColor & 0xFF) * (1.0f / 255.0f), + static_cast((iColor >> 24) & 0xFF) * (1.0f / 255.0f)}}}; return vColor.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32_t bgra = pSource->c; - uint32_t rgba = (bgra & 0xFF00FF00) | ((bgra >> 16) & 0xFF) | ((bgra << 16) & 0xFF0000); + uint32_t rgba = + (bgra & 0xFF00FF00) | ((bgra >> 16) & 0xFF) | ((bgra << 16) & 0xFF0000); uint32x2_t vInt8 = vdup_n_u32(rgba); uint16x8_t vInt16 = vmovl_u8(vreinterpret_u8_u32(vInt8)); uint32x4_t vInt = vmovl_u16(vget_low_u16(vInt16)); @@ -792,39 +759,36 @@ inline XMVECTOR XM_CALLCONV XMLoadColor(const XMCOLOR* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadHalf2(const XMHALF2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadHalf2(const XMHALF2* pSource) noexcept { assert(pSource); #if defined(_XM_F16C_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) __m128 V = _mm_load_ss(reinterpret_cast(pSource)); return _mm_cvtph_ps(_mm_castps_si128(V)); #else - XMVECTORF32 vResult = { { { - XMConvertHalfToFloat(pSource->x), - XMConvertHalfToFloat(pSource->y), - 0.0f, - 0.0f - } } }; + XMVECTORF32 vResult = {{{XMConvertHalfToFloat(pSource->x), + XMConvertHalfToFloat(pSource->y), 0.0f, 0.0f}}}; return vResult.v; -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadShortN2(const XMSHORTN2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadShortN2(const XMSHORTN2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - (pSource->x == -32768) ? -1.f : (static_cast(pSource->x)* (1.0f / 32767.0f)), - (pSource->y == -32768) ? -1.f : (static_cast(pSource->y)* (1.0f / 32767.0f)), - 0.0f, - 0.0f - } } }; + XMVECTORF32 vResult = { + {{(pSource->x == -32768) + ? -1.f + : (static_cast(pSource->x) * (1.0f / 32767.0f)), + (pSource->y == -32768) + ? -1.f + : (static_cast(pSource->y) * (1.0f / 32767.0f)), + 0.0f, 0.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t vInt16 = vld1_dup_u32(reinterpret_cast(pSource)); + uint32x2_t vInt16 = + vld1_dup_u32(reinterpret_cast(pSource)); int32x4_t vInt = vmovl_s16(vreinterpret_s16_u32(vInt16)); vInt = vandq_s32(vInt, g_XMMaskXY); float32x4_t R = vcvtq_f32_s32(vInt); @@ -850,20 +814,16 @@ inline XMVECTOR XM_CALLCONV XMLoadShortN2(const XMSHORTN2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadShort2(const XMSHORT2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadShort2(const XMSHORT2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - 0.f, - 0.f - } } }; + XMVECTORF32 vResult = {{{static_cast(pSource->x), + static_cast(pSource->y), 0.f, 0.f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t vInt16 = vld1_dup_u32(reinterpret_cast(pSource)); + uint32x2_t vInt16 = + vld1_dup_u32(reinterpret_cast(pSource)); int32x4_t vInt = vmovl_s16(vreinterpret_s16_u32(vInt16)); vInt = vandq_s32(vInt, g_XMMaskXY); return vcvtq_f32_s32(vInt); @@ -885,28 +845,26 @@ inline XMVECTOR XM_CALLCONV XMLoadShort2(const XMSHORT2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUShortN2(const XMUSHORTN2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUShortN2(const XMUSHORTN2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x) / 65535.0f, - static_cast(pSource->y) / 65535.0f, - 0.f, - 0.f - } } }; + XMVECTORF32 vResult = { + {{static_cast(pSource->x) / 65535.0f, + static_cast(pSource->y) / 65535.0f, 0.f, 0.f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t vInt16 = vld1_dup_u32(reinterpret_cast(pSource)); + uint32x2_t vInt16 = + vld1_dup_u32(reinterpret_cast(pSource)); uint32x4_t vInt = vmovl_u16(vreinterpret_u16_u32(vInt16)); vInt = vandq_u32(vInt, g_XMMaskXY); float32x4_t R = vcvtq_f32_u32(vInt); R = vmulq_n_f32(R, 1.0f / 65535.0f); return vmaxq_f32(R, vdupq_n_f32(-1.f)); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 FixupY16 = { { { 1.0f / 65535.0f, 1.0f / (65535.0f * 65536.0f), 0.0f, 0.0f } } }; - static const XMVECTORF32 FixaddY16 = { { { 0, 32768.0f * 65536.0f, 0, 0 } } }; + static const XMVECTORF32 FixupY16 = { + {{1.0f / 65535.0f, 1.0f / (65535.0f * 65536.0f), 0.0f, 0.0f}}}; + static const XMVECTORF32 FixaddY16 = {{{0, 32768.0f * 65536.0f, 0, 0}}}; // Splat the two shorts in all four entries (WORD alignment okay, // DWORD alignment preferred) __m128 vTemp = _mm_load_ps1(reinterpret_cast(&pSource->x)); @@ -925,25 +883,21 @@ inline XMVECTOR XM_CALLCONV XMLoadUShortN2(const XMUSHORTN2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUShort2(const XMUSHORT2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUShort2(const XMUSHORT2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - 0.f, - 0.f - } } }; + XMVECTORF32 vResult = {{{static_cast(pSource->x), + static_cast(pSource->y), 0.f, 0.f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - uint32x2_t vInt16 = vld1_dup_u32(reinterpret_cast(pSource)); + uint32x2_t vInt16 = + vld1_dup_u32(reinterpret_cast(pSource)); uint32x4_t vInt = vmovl_u16(vreinterpret_u16_u32(vInt16)); vInt = vandq_u32(vInt, g_XMMaskXY); return vcvtq_f32_u32(vInt); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 FixaddY16 = { { { 0, 32768.0f, 0, 0 } } }; + static const XMVECTORF32 FixaddY16 = {{{0, 32768.0f, 0, 0}}}; // Splat the two shorts in all four entries (WORD alignment okay, // DWORD alignment preferred) __m128 vTemp = _mm_load_ps1(reinterpret_cast(&pSource->x)); @@ -962,17 +916,18 @@ inline XMVECTOR XM_CALLCONV XMLoadUShort2(const XMUSHORT2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadByteN2(const XMBYTEN2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadByteN2(const XMBYTEN2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - (pSource->x == -128) ? -1.f : (static_cast(pSource->x)* (1.0f / 127.0f)), - (pSource->y == -128) ? -1.f : (static_cast(pSource->y)* (1.0f / 127.0f)), - 0.0f, - 0.0f - } } }; + XMVECTORF32 vResult = { + {{(pSource->x == -128) + ? -1.f + : (static_cast(pSource->x) * (1.0f / 127.0f)), + (pSource->y == -128) + ? -1.f + : (static_cast(pSource->y) * (1.0f / 127.0f)), + 0.0f, 0.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint16x4_t vInt8 = vld1_dup_u16(reinterpret_cast(pSource)); @@ -983,11 +938,13 @@ inline XMVECTOR XM_CALLCONV XMLoadByteN2(const XMBYTEN2* pSource) noexcept R = vmulq_n_f32(R, 1.0f / 127.0f); return vmaxq_f32(R, vdupq_n_f32(-1.f)); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.0f / 127.0f, 1.0f / (127.0f * 256.0f), 0, 0 } } }; - static const XMVECTORU32 Mask = { { { 0xFF, 0xFF00, 0, 0 } } }; + static const XMVECTORF32 Scale = { + {{1.0f / 127.0f, 1.0f / (127.0f * 256.0f), 0, 0}}}; + static const XMVECTORU32 Mask = {{{0xFF, 0xFF00, 0, 0}}}; // Splat the color in all four entries (x,z,y,w) __m128i vInt = XM_LOADU_SI16(&pSource->v); - XMVECTOR vTemp = XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); + XMVECTOR vTemp = + XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); // Mask vTemp = _mm_and_ps(vTemp, Mask); // x,y and z are unsigned! Flip the bits to convert the order to signed @@ -1004,17 +961,12 @@ inline XMVECTOR XM_CALLCONV XMLoadByteN2(const XMBYTEN2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadByte2(const XMBYTE2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadByte2(const XMBYTE2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - 0.0f, - 0.0f - } } }; + XMVECTORF32 vResult = {{{static_cast(pSource->x), + static_cast(pSource->y), 0.0f, 0.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint16x4_t vInt8 = vld1_dup_u16(reinterpret_cast(pSource)); @@ -1023,11 +975,13 @@ inline XMVECTOR XM_CALLCONV XMLoadByte2(const XMBYTE2* pSource) noexcept vInt = vandq_s32(vInt, g_XMMaskXY); return vcvtq_f32_s32(vInt); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.0f, 1.0f / 256.0f, 1.0f / 65536.0f, 1.0f / (65536.0f * 256.0f) } } }; - static const XMVECTORU32 Mask = { { { 0xFF, 0xFF00, 0, 0 } } }; + static const XMVECTORF32 Scale = { + {{1.0f, 1.0f / 256.0f, 1.0f / 65536.0f, 1.0f / (65536.0f * 256.0f)}}}; + static const XMVECTORU32 Mask = {{{0xFF, 0xFF00, 0, 0}}}; // Splat the color in all four entries (x,z,y,w) __m128i vInt = XM_LOADU_SI16(&pSource->v); - XMVECTOR vTemp = XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); + XMVECTOR vTemp = + XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); // Mask vTemp = _mm_and_ps(vTemp, Mask); // x,y and z are unsigned! Flip the bits to convert the order to signed @@ -1042,17 +996,13 @@ inline XMVECTOR XM_CALLCONV XMLoadByte2(const XMBYTE2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUByteN2(const XMUBYTEN2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUByteN2(const XMUBYTEN2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x)* (1.0f / 255.0f), - static_cast(pSource->y)* (1.0f / 255.0f), - 0.0f, - 0.0f - } } }; + XMVECTORF32 vResult = { + {{static_cast(pSource->x) * (1.0f / 255.0f), + static_cast(pSource->y) * (1.0f / 255.0f), 0.0f, 0.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint16x4_t vInt8 = vld1_dup_u16(reinterpret_cast(pSource)); @@ -1062,11 +1012,13 @@ inline XMVECTOR XM_CALLCONV XMLoadUByteN2(const XMUBYTEN2* pSource) noexcept float32x4_t R = vcvtq_f32_u32(vInt); return vmulq_n_f32(R, 1.0f / 255.0f); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.0f / 255.0f, 1.0f / (255.0f * 256.0f), 0, 0 } } }; - static const XMVECTORU32 Mask = { { { 0xFF, 0xFF00, 0, 0 } } }; + static const XMVECTORF32 Scale = { + {{1.0f / 255.0f, 1.0f / (255.0f * 256.0f), 0, 0}}}; + static const XMVECTORU32 Mask = {{{0xFF, 0xFF00, 0, 0}}}; // Splat the color in all four entries (x,z,y,w) __m128i vInt = XM_LOADU_SI16(&pSource->v); - XMVECTOR vTemp = XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); + XMVECTOR vTemp = + XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); // Mask vTemp = _mm_and_ps(vTemp, Mask); // w is signed! Flip the bits to convert the order to unsigned @@ -1081,17 +1033,12 @@ inline XMVECTOR XM_CALLCONV XMLoadUByteN2(const XMUBYTEN2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUByte2(const XMUBYTE2* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUByte2(const XMUBYTE2* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - 0.0f, - 0.0f - } } }; + XMVECTORF32 vResult = {{{static_cast(pSource->x), + static_cast(pSource->y), 0.0f, 0.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint16x4_t vInt8 = vld1_dup_u16(reinterpret_cast(pSource)); @@ -1100,11 +1047,12 @@ inline XMVECTOR XM_CALLCONV XMLoadUByte2(const XMUBYTE2* pSource) noexcept vInt = vandq_u32(vInt, g_XMMaskXY); return vcvtq_f32_u32(vInt); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.0f, 1.0f / 256.0f, 0, 0 } } }; - static const XMVECTORU32 Mask = { { { 0xFF, 0xFF00, 0, 0 } } }; + static const XMVECTORF32 Scale = {{{1.0f, 1.0f / 256.0f, 0, 0}}}; + static const XMVECTORU32 Mask = {{{0xFF, 0xFF00, 0, 0}}}; // Splat the color in all four entries (x,z,y,w) __m128i vInt = XM_LOADU_SI16(&pSource->v); - XMVECTOR vTemp = XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); + XMVECTOR vTemp = + XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); // Mask vTemp = _mm_and_ps(vTemp, Mask); // w is signed! Flip the bits to convert the order to unsigned @@ -1119,32 +1067,35 @@ inline XMVECTOR XM_CALLCONV XMLoadUByte2(const XMUBYTE2* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadU565(const XMU565* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadU565(const XMU565* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - float(pSource->v & 0x1F), - float((pSource->v >> 5) & 0x3F), - float((pSource->v >> 11) & 0x1F), - 0.f, - } } }; + XMVECTORF32 vResult = {{{ + float(pSource->v & 0x1F), + float((pSource->v >> 5) & 0x3F), + float((pSource->v >> 11) & 0x1F), + 0.f, + }}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORI32 U565And = { { { 0x1F, 0x3F << 5, 0x1F << 11, 0 } } }; - static const XMVECTORF32 U565Mul = { { { 1.0f, 1.0f / 32.0f, 1.0f / 2048.f, 0 } } }; - uint16x4_t vInt16 = vld1_dup_u16(reinterpret_cast(pSource)); + static const XMVECTORI32 U565And = {{{0x1F, 0x3F << 5, 0x1F << 11, 0}}}; + static const XMVECTORF32 U565Mul = { + {{1.0f, 1.0f / 32.0f, 1.0f / 2048.f, 0}}}; + uint16x4_t vInt16 = + vld1_dup_u16(reinterpret_cast(pSource)); uint32x4_t vInt = vmovl_u16(vInt16); vInt = vandq_u32(vInt, U565And); float32x4_t R = vcvtq_f32_u32(vInt); return vmulq_f32(R, U565Mul); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORI32 U565And = { { { 0x1F, 0x3F << 5, 0x1F << 11, 0 } } }; - static const XMVECTORF32 U565Mul = { { { 1.0f, 1.0f / 32.0f, 1.0f / 2048.f, 0 } } }; + static const XMVECTORI32 U565And = {{{0x1F, 0x3F << 5, 0x1F << 11, 0}}}; + static const XMVECTORF32 U565Mul = { + {{1.0f, 1.0f / 32.0f, 1.0f / 2048.f, 0}}}; // Get the 16 bit value and splat it __m128i vInt = XM_LOADU_SI16(&pSource->v); - XMVECTOR vResult = XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); + XMVECTOR vResult = + XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); // Mask off x, y and z vResult = _mm_and_ps(vResult, U565And); // Convert to float @@ -1156,9 +1107,8 @@ inline XMVECTOR XM_CALLCONV XMLoadU565(const XMU565* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat3PK(const XMFLOAT3PK* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat3PK(const XMFLOAT3PK* pSource) noexcept { assert(pSource); XM_ALIGNED_DATA(16) uint32_t Result[4]; @@ -1168,31 +1118,26 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3PK(const XMFLOAT3PK* pSource) noexcept // X Channel (6-bit mantissa) Mantissa = pSource->xm; - if (pSource->xe == 0x1f) // INF or NAN + if (pSource->xe == 0x1f) // INF or NAN { - Result[0] = static_cast(0x7f800000 | (static_cast(pSource->xm) << 17)); - } - else - { - if (pSource->xe != 0) // The value is normalized + Result[0] = static_cast( + 0x7f800000 | (static_cast(pSource->xm) << 17)); + } else { + if (pSource->xe != 0) // The value is normalized { Exponent = pSource->xe; - } - else if (Mantissa != 0) // The value is denormalized + } else if (Mantissa != 0) // The value is denormalized { // Normalize the value in the resulting float Exponent = 1; - do - { + do { Exponent--; Mantissa <<= 1; - } - while ((Mantissa & 0x40) == 0); + } while ((Mantissa & 0x40) == 0); Mantissa &= 0x3F; - } - else // The value is zero + } else // The value is zero { Exponent = static_cast(-112); } @@ -1203,31 +1148,26 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3PK(const XMFLOAT3PK* pSource) noexcept // Y Channel (6-bit mantissa) Mantissa = pSource->ym; - if (pSource->ye == 0x1f) // INF or NAN + if (pSource->ye == 0x1f) // INF or NAN { - Result[1] = static_cast(0x7f800000 | (static_cast(pSource->ym) << 17)); - } - else - { - if (pSource->ye != 0) // The value is normalized + Result[1] = static_cast( + 0x7f800000 | (static_cast(pSource->ym) << 17)); + } else { + if (pSource->ye != 0) // The value is normalized { Exponent = pSource->ye; - } - else if (Mantissa != 0) // The value is denormalized + } else if (Mantissa != 0) // The value is denormalized { // Normalize the value in the resulting float Exponent = 1; - do - { + do { Exponent--; Mantissa <<= 1; - } - while ((Mantissa & 0x40) == 0); + } while ((Mantissa & 0x40) == 0); Mantissa &= 0x3F; - } - else // The value is zero + } else // The value is zero { Exponent = static_cast(-112); } @@ -1238,31 +1178,26 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3PK(const XMFLOAT3PK* pSource) noexcept // Z Channel (5-bit mantissa) Mantissa = pSource->zm; - if (pSource->ze == 0x1f) // INF or NAN + if (pSource->ze == 0x1f) // INF or NAN { - Result[2] = static_cast(0x7f800000 | (static_cast(pSource->zm) << 17)); - } - else - { - if (pSource->ze != 0) // The value is normalized + Result[2] = static_cast( + 0x7f800000 | (static_cast(pSource->zm) << 17)); + } else { + if (pSource->ze != 0) // The value is normalized { Exponent = pSource->ze; - } - else if (Mantissa != 0) // The value is denormalized + } else if (Mantissa != 0) // The value is denormalized { // Normalize the value in the resulting float Exponent = 1; - do - { + do { Exponent--; Mantissa <<= 1; - } - while ((Mantissa & 0x20) == 0); + } while ((Mantissa & 0x20) == 0); Mantissa &= 0x1F; - } - else // The value is zero + } else // The value is zero { Exponent = static_cast(-112); } @@ -1274,54 +1209,55 @@ inline XMVECTOR XM_CALLCONV XMLoadFloat3PK(const XMFLOAT3PK* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadFloat3SE(const XMFLOAT3SE* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadFloat3SE(const XMFLOAT3SE* pSource) noexcept { assert(pSource); - union { float f; int32_t i; } fi; + union { + float f; + int32_t i; + } fi; fi.i = 0x33800000 + (pSource->e << 23); float Scale = fi.f; - XMVECTORF32 v = { { { - Scale * float(pSource->xm), - Scale * float(pSource->ym), - Scale * float(pSource->zm), - 1.0f } } }; + XMVECTORF32 v = {{{Scale * float(pSource->xm), Scale * float(pSource->ym), + Scale * float(pSource->zm), 1.0f}}}; return v; } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadHalf4(const XMHALF4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadHalf4(const XMHALF4* pSource) noexcept { assert(pSource); #if defined(_XM_F16C_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) __m128i V = _mm_loadl_epi64(reinterpret_cast(pSource)); return _mm_cvtph_ps(V); #else - XMVECTORF32 vResult = { { { - XMConvertHalfToFloat(pSource->x), - XMConvertHalfToFloat(pSource->y), - XMConvertHalfToFloat(pSource->z), - XMConvertHalfToFloat(pSource->w) - } } }; + XMVECTORF32 vResult = { + {{XMConvertHalfToFloat(pSource->x), XMConvertHalfToFloat(pSource->y), + XMConvertHalfToFloat(pSource->z), XMConvertHalfToFloat(pSource->w)}}}; return vResult.v; -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadShortN4(const XMSHORTN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadShortN4(const XMSHORTN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - (pSource->x == -32768) ? -1.f : (static_cast(pSource->x)* (1.0f / 32767.0f)), - (pSource->y == -32768) ? -1.f : (static_cast(pSource->y)* (1.0f / 32767.0f)), - (pSource->z == -32768) ? -1.f : (static_cast(pSource->z)* (1.0f / 32767.0f)), - (pSource->w == -32768) ? -1.f : (static_cast(pSource->w)* (1.0f / 32767.0f)) - } } }; + XMVECTORF32 vResult = { + {{(pSource->x == -32768) + ? -1.f + : (static_cast(pSource->x) * (1.0f / 32767.0f)), + (pSource->y == -32768) + ? -1.f + : (static_cast(pSource->y) * (1.0f / 32767.0f)), + (pSource->z == -32768) + ? -1.f + : (static_cast(pSource->z) * (1.0f / 32767.0f)), + (pSource->w == -32768) + ? -1.f + : (static_cast(pSource->w) * (1.0f / 32767.0f))}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) int16x4_t vInt = vld1_s16(reinterpret_cast(pSource)); @@ -1350,17 +1286,13 @@ inline XMVECTOR XM_CALLCONV XMLoadShortN4(const XMSHORTN4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadShort4(const XMSHORT4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadShort4(const XMSHORT4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - static_cast(pSource->z), - static_cast(pSource->w) - } } }; + XMVECTORF32 vResult = { + {{static_cast(pSource->x), static_cast(pSource->y), + static_cast(pSource->z), static_cast(pSource->w)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) int16x4_t vInt = vld1_s16(reinterpret_cast(pSource)); @@ -1385,17 +1317,14 @@ inline XMVECTOR XM_CALLCONV XMLoadShort4(const XMSHORT4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUShortN4(const XMUSHORTN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUShortN4(const XMUSHORTN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x) / 65535.0f, - static_cast(pSource->y) / 65535.0f, - static_cast(pSource->z) / 65535.0f, - static_cast(pSource->w) / 65535.0f - } } }; + XMVECTORF32 vResult = {{{static_cast(pSource->x) / 65535.0f, + static_cast(pSource->y) / 65535.0f, + static_cast(pSource->z) / 65535.0f, + static_cast(pSource->w) / 65535.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint16x4_t vInt = vld1_u16(reinterpret_cast(pSource)); @@ -1403,8 +1332,11 @@ inline XMVECTOR XM_CALLCONV XMLoadUShortN4(const XMUSHORTN4* pSource) noexcept float32x4_t vResult = vcvtq_f32_u32(V); return vmulq_n_f32(vResult, 1.0f / 65535.0f); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 FixupY16W16 = { { { 1.0f / 65535.0f, 1.0f / 65535.0f, 1.0f / (65535.0f * 65536.0f), 1.0f / (65535.0f * 65536.0f) } } }; - static const XMVECTORF32 FixaddY16W16 = { { { 0, 0, 32768.0f * 65536.0f, 32768.0f * 65536.0f } } }; + static const XMVECTORF32 FixupY16W16 = { + {{1.0f / 65535.0f, 1.0f / 65535.0f, 1.0f / (65535.0f * 65536.0f), + 1.0f / (65535.0f * 65536.0f)}}}; + static const XMVECTORF32 FixaddY16W16 = { + {{0, 0, 32768.0f * 65536.0f, 32768.0f * 65536.0f}}}; // Splat the color in all four entries (x,z,y,w) __m128d vIntd = _mm_load1_pd(reinterpret_cast(&pSource->x)); // Shift x&0ffff,z&0xffff,y&0xffff0000,w&0xffff0000 @@ -1423,24 +1355,20 @@ inline XMVECTOR XM_CALLCONV XMLoadUShortN4(const XMUSHORTN4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUShort4(const XMUSHORT4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUShort4(const XMUSHORT4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - static_cast(pSource->z), - static_cast(pSource->w) - } } }; + XMVECTORF32 vResult = { + {{static_cast(pSource->x), static_cast(pSource->y), + static_cast(pSource->z), static_cast(pSource->w)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint16x4_t vInt = vld1_u16(reinterpret_cast(pSource)); uint32x4_t V = vmovl_u16(vInt); return vcvtq_f32_u32(V); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 FixaddY16W16 = { { { 0, 0, 32768.0f, 32768.0f } } }; + static const XMVECTORF32 FixaddY16W16 = {{{0, 0, 32768.0f, 32768.0f}}}; // Splat the color in all four entries (x,z,y,w) __m128d vIntd = _mm_load1_pd(reinterpret_cast(&pSource->x)); // Shift x&0ffff,z&0xffff,y&0xffff0000,w&0xffff0000 @@ -1459,23 +1387,30 @@ inline XMVECTOR XM_CALLCONV XMLoadUShort4(const XMUSHORT4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadXDecN4(const XMXDECN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadXDecN4(const XMXDECN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - static const uint32_t SignExtend[] = { 0x00000000, 0xFFFFFC00 }; + static const uint32_t SignExtend[] = {0x00000000, 0xFFFFFC00}; uint32_t ElementX = pSource->v & 0x3FF; uint32_t ElementY = (pSource->v >> 10) & 0x3FF; uint32_t ElementZ = (pSource->v >> 20) & 0x3FF; - XMVECTORF32 vResult = { { { - (ElementX == 0x200) ? -1.f : (static_cast(static_cast(ElementX | SignExtend[ElementX >> 9])) / 511.0f), - (ElementY == 0x200) ? -1.f : (static_cast(static_cast(ElementY | SignExtend[ElementY >> 9])) / 511.0f), - (ElementZ == 0x200) ? -1.f : (static_cast(static_cast(ElementZ | SignExtend[ElementZ >> 9])) / 511.0f), - static_cast(pSource->v >> 30) / 3.0f - } } }; + XMVECTORF32 vResult = { + {{(ElementX == 0x200) ? -1.f + : (static_cast(static_cast( + ElementX | SignExtend[ElementX >> 9])) / + 511.0f), + (ElementY == 0x200) ? -1.f + : (static_cast(static_cast( + ElementY | SignExtend[ElementY >> 9])) / + 511.0f), + (ElementZ == 0x200) ? -1.f + : (static_cast(static_cast( + ElementZ | SignExtend[ElementZ >> 9])) / + 511.0f), + static_cast(pSource->v >> 30) / 3.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vInt = vld1q_dup_u32(reinterpret_cast(pSource)); @@ -1520,27 +1455,30 @@ inline XMVECTOR XM_CALLCONV XMLoadXDecN4(const XMXDECN4* pSource) noexcept #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadXDec4(const XMXDEC4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadXDec4(const XMXDEC4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - static const uint32_t SignExtend[] = { 0x00000000, 0xFFFFFC00 }; + static const uint32_t SignExtend[] = {0x00000000, 0xFFFFFC00}; uint32_t ElementX = pSource->v & 0x3FF; uint32_t ElementY = (pSource->v >> 10) & 0x3FF; uint32_t ElementZ = (pSource->v >> 20) & 0x3FF; - XMVECTORF32 vResult = { { { - static_cast(static_cast(ElementX | SignExtend[ElementX >> 9])), - static_cast(static_cast(ElementY | SignExtend[ElementY >> 9])), - static_cast(static_cast(ElementZ | SignExtend[ElementZ >> 9])), - static_cast(pSource->v >> 30) - } } }; + XMVECTORF32 vResult = {{{static_cast(static_cast( + ElementX | SignExtend[ElementX >> 9])), + static_cast(static_cast( + ElementY | SignExtend[ElementY >> 9])), + static_cast(static_cast( + ElementZ | SignExtend[ElementZ >> 9])), + static_cast(pSource->v >> 30)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORU32 XDec4Xor = { { { 0x200, 0x200 << 10, 0x200 << 20, 0x80000000 } } }; - static const XMVECTORF32 XDec4Add = { { { -512.0f, -512.0f * 1024.0f, -512.0f * 1024.0f * 1024.0f, 32768 * 65536.0f } } }; + static const XMVECTORU32 XDec4Xor = { + {{0x200, 0x200 << 10, 0x200 << 20, 0x80000000}}}; + static const XMVECTORF32 XDec4Add = { + {{-512.0f, -512.0f * 1024.0f, -512.0f * 1024.0f * 1024.0f, + 32768 * 65536.0f}}}; uint32x4_t vInt = vld1q_dup_u32(reinterpret_cast(pSource)); vInt = vandq_u32(vInt, g_XMMaskDec4); vInt = veorq_u32(vInt, XDec4Xor); @@ -1548,8 +1486,11 @@ inline XMVECTOR XM_CALLCONV XMLoadXDec4(const XMXDEC4* pSource) noexcept R = vaddq_f32(R, XDec4Add); return vmulq_f32(R, g_XMMulDec4); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORU32 XDec4Xor = { { { 0x200, 0x200 << 10, 0x200 << 20, 0x80000000 } } }; - static const XMVECTORF32 XDec4Add = { { { -512.0f, -512.0f * 1024.0f, -512.0f * 1024.0f * 1024.0f, 32768 * 65536.0f } } }; + static const XMVECTORU32 XDec4Xor = { + {{0x200, 0x200 << 10, 0x200 << 20, 0x80000000}}}; + static const XMVECTORF32 XDec4Add = { + {{-512.0f, -512.0f * 1024.0f, -512.0f * 1024.0f * 1024.0f, + 32768 * 65536.0f}}}; // Splat the color in all four entries XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 @@ -1577,9 +1518,8 @@ inline XMVECTOR XM_CALLCONV XMLoadXDec4(const XMXDEC4* pSource) noexcept #endif //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUDecN4(const XMUDECN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUDecN4(const XMUDECN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -1587,22 +1527,26 @@ inline XMVECTOR XM_CALLCONV XMLoadUDecN4(const XMUDECN4* pSource) noexcept uint32_t ElementY = (pSource->v >> 10) & 0x3FF; uint32_t ElementZ = (pSource->v >> 20) & 0x3FF; - XMVECTORF32 vResult = { { { - static_cast(ElementX) / 1023.0f, - static_cast(ElementY) / 1023.0f, - static_cast(ElementZ) / 1023.0f, - static_cast(pSource->v >> 30) / 3.0f - } } }; + XMVECTORF32 vResult = {{{static_cast(ElementX) / 1023.0f, + static_cast(ElementY) / 1023.0f, + static_cast(ElementZ) / 1023.0f, + static_cast(pSource->v >> 30) / 3.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 UDecN4Mul = { { { 1.0f / 1023.0f, 1.0f / (1023.0f * 1024.0f), 1.0f / (1023.0f * 1024.0f * 1024.0f), 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f) } } }; + static const XMVECTORF32 UDecN4Mul = { + {{1.0f / 1023.0f, 1.0f / (1023.0f * 1024.0f), + 1.0f / (1023.0f * 1024.0f * 1024.0f), + 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f)}}}; uint32x4_t vInt = vld1q_dup_u32(reinterpret_cast(pSource)); vInt = vandq_u32(vInt, g_XMMaskDec4); float32x4_t R = vcvtq_f32_u32(vInt); return vmulq_f32(R, UDecN4Mul); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 UDecN4Mul = { { { 1.0f / 1023.0f, 1.0f / (1023.0f * 1024.0f), 1.0f / (1023.0f * 1024.0f * 1024.0f), 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f) } } }; + static const XMVECTORF32 UDecN4Mul = { + {{1.0f / 1023.0f, 1.0f / (1023.0f * 1024.0f), + 1.0f / (1023.0f * 1024.0f * 1024.0f), + 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f)}}}; // Splat the color in all four entries XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 @@ -1619,11 +1563,9 @@ inline XMVECTOR XM_CALLCONV XMLoadUDecN4(const XMUDECN4* pSource) noexcept #endif } - //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUDecN4_XR(const XMUDECN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUDecN4_XR(const XMUDECN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) @@ -1631,18 +1573,20 @@ inline XMVECTOR XM_CALLCONV XMLoadUDecN4_XR(const XMUDECN4* pSource) noexcept int32_t ElementY = (pSource->v >> 10) & 0x3FF; int32_t ElementZ = (pSource->v >> 20) & 0x3FF; - XMVECTORF32 vResult = { { { - static_cast(ElementX - 0x180) / 510.0f, - static_cast(ElementY - 0x180) / 510.0f, - static_cast(ElementZ - 0x180) / 510.0f, - static_cast(pSource->v >> 30) / 3.0f - } } }; + XMVECTORF32 vResult = {{{static_cast(ElementX - 0x180) / 510.0f, + static_cast(ElementY - 0x180) / 510.0f, + static_cast(ElementZ - 0x180) / 510.0f, + static_cast(pSource->v >> 30) / 3.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 XRMul = { { { 1.0f / 510.0f, 1.0f / (510.0f * 1024.0f), 1.0f / (510.0f * 1024.0f * 1024.0f), 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f) } } }; - static const XMVECTORI32 XRBias = { { { 0x180, 0x180 * 1024, 0x180 * 1024 * 1024, 0 } } }; + static const XMVECTORF32 XRMul = { + {{1.0f / 510.0f, 1.0f / (510.0f * 1024.0f), + 1.0f / (510.0f * 1024.0f * 1024.0f), + 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f)}}}; + static const XMVECTORI32 XRBias = { + {{0x180, 0x180 * 1024, 0x180 * 1024 * 1024, 0}}}; uint32x4_t vInt = vld1q_dup_u32(reinterpret_cast(pSource)); vInt = vandq_u32(vInt, g_XMMaskDec4); int32x4_t vTemp = vsubq_s32(vreinterpretq_s32_u32(vInt), XRBias); @@ -1651,8 +1595,12 @@ inline XMVECTOR XM_CALLCONV XMLoadUDecN4_XR(const XMUDECN4* pSource) noexcept R = vaddq_f32(R, g_XMAddUDec4); return vmulq_f32(R, XRMul); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 XRMul = { { { 1.0f / 510.0f, 1.0f / (510.0f * 1024.0f), 1.0f / (510.0f * 1024.0f * 1024.0f), 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f) } } }; - static const XMVECTORI32 XRBias = { { { 0x180, 0x180 * 1024, 0x180 * 1024 * 1024, 0 } } }; + static const XMVECTORF32 XRMul = { + {{1.0f / 510.0f, 1.0f / (510.0f * 1024.0f), + 1.0f / (510.0f * 1024.0f * 1024.0f), + 1.0f / (3.0f * 1024.0f * 1024.0f * 1024.0f)}}}; + static const XMVECTORI32 XRBias = { + {{0x180, 0x180 * 1024, 0x180 * 1024 * 1024, 0}}}; // Splat the color in all four entries XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); // Mask channels @@ -1670,23 +1618,18 @@ inline XMVECTOR XM_CALLCONV XMLoadUDecN4_XR(const XMUDECN4* pSource) noexcept #endif } - //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUDec4(const XMUDEC4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUDec4(const XMUDEC4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) uint32_t ElementX = pSource->v & 0x3FF; uint32_t ElementY = (pSource->v >> 10) & 0x3FF; uint32_t ElementZ = (pSource->v >> 20) & 0x3FF; - XMVECTORF32 vResult = { { { - static_cast(ElementX), - static_cast(ElementY), - static_cast(ElementZ), - static_cast(pSource->v >> 30) - } } }; + XMVECTORF32 vResult = { + {{static_cast(ElementX), static_cast(ElementY), + static_cast(ElementZ), static_cast(pSource->v >> 30)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vInt = vld1q_dup_u32(reinterpret_cast(pSource)); @@ -1727,28 +1670,41 @@ inline XMVECTOR XM_CALLCONV XMLoadUDec4(const XMUDEC4* pSource) noexcept #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadDecN4(const XMDECN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadDecN4(const XMDECN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - static const uint32_t SignExtend[] = { 0x00000000, 0xFFFFFC00 }; - static const uint32_t SignExtendW[] = { 0x00000000, 0xFFFFFFFC }; + static const uint32_t SignExtend[] = {0x00000000, 0xFFFFFC00}; + static const uint32_t SignExtendW[] = {0x00000000, 0xFFFFFFFC}; uint32_t ElementX = pSource->v & 0x3FF; uint32_t ElementY = (pSource->v >> 10) & 0x3FF; uint32_t ElementZ = (pSource->v >> 20) & 0x3FF; uint32_t ElementW = pSource->v >> 30; - XMVECTORF32 vResult = { { { - (ElementX == 0x200) ? -1.f : (static_cast(static_cast(ElementX | SignExtend[ElementX >> 9])) / 511.0f), - (ElementY == 0x200) ? -1.f : (static_cast(static_cast(ElementY | SignExtend[ElementY >> 9])) / 511.0f), - (ElementZ == 0x200) ? -1.f : (static_cast(static_cast(ElementZ | SignExtend[ElementZ >> 9])) / 511.0f), - (ElementW == 0x2) ? -1.f : static_cast(static_cast(ElementW | SignExtendW[(ElementW >> 1) & 1])) - } } }; + XMVECTORF32 vResult = { + {{(ElementX == 0x200) ? -1.f + : (static_cast(static_cast( + ElementX | SignExtend[ElementX >> 9])) / + 511.0f), + (ElementY == 0x200) ? -1.f + : (static_cast(static_cast( + ElementY | SignExtend[ElementY >> 9])) / + 511.0f), + (ElementZ == 0x200) ? -1.f + : (static_cast(static_cast( + ElementZ | SignExtend[ElementZ >> 9])) / + 511.0f), + (ElementW == 0x2) + ? -1.f + : static_cast(static_cast( + ElementW | SignExtendW[(ElementW >> 1) & 1]))}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 DecN4Mul = { { { 1.0f / 511.0f, 1.0f / (511.0f * 1024.0f), 1.0f / (511.0f * 1024.0f * 1024.0f), 1.0f / (1024.0f * 1024.0f * 1024.0f) } } }; + static const XMVECTORF32 DecN4Mul = { + {{1.0f / 511.0f, 1.0f / (511.0f * 1024.0f), + 1.0f / (511.0f * 1024.0f * 1024.0f), + 1.0f / (1024.0f * 1024.0f * 1024.0f)}}}; uint32x4_t vInt = vld1q_dup_u32(reinterpret_cast(pSource)); vInt = vandq_u32(vInt, g_XMMaskDec4); vInt = veorq_u32(vInt, g_XMXorDec4); @@ -1757,7 +1713,10 @@ inline XMVECTOR XM_CALLCONV XMLoadDecN4(const XMDECN4* pSource) noexcept R = vmulq_f32(R, DecN4Mul); return vmaxq_f32(R, vdupq_n_f32(-1.0f)); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 DecN4Mul = { { { 1.0f / 511.0f, 1.0f / (511.0f * 1024.0f), 1.0f / (511.0f * 1024.0f * 1024.0f), 1.0f / (1024.0f * 1024.0f * 1024.0f) } } }; + static const XMVECTORF32 DecN4Mul = { + {{1.0f / 511.0f, 1.0f / (511.0f * 1024.0f), + 1.0f / (511.0f * 1024.0f * 1024.0f), + 1.0f / (1024.0f * 1024.0f * 1024.0f)}}}; // Splat the color in all four entries XMVECTOR vTemp = _mm_load_ps1(reinterpret_cast(&pSource->v)); // Shift R&0xFF0000, G&0xFF00, B&0xFF, A&0xFF000000 @@ -1776,25 +1735,27 @@ inline XMVECTOR XM_CALLCONV XMLoadDecN4(const XMDECN4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadDec4(const XMDEC4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadDec4(const XMDEC4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - static const uint32_t SignExtend[] = { 0x00000000, 0xFFFFFC00 }; - static const uint32_t SignExtendW[] = { 0x00000000, 0xFFFFFFFC }; + static const uint32_t SignExtend[] = {0x00000000, 0xFFFFFC00}; + static const uint32_t SignExtendW[] = {0x00000000, 0xFFFFFFFC}; uint32_t ElementX = pSource->v & 0x3FF; uint32_t ElementY = (pSource->v >> 10) & 0x3FF; uint32_t ElementZ = (pSource->v >> 20) & 0x3FF; uint32_t ElementW = pSource->v >> 30; - XMVECTORF32 vResult = { { { - static_cast(static_cast(ElementX | SignExtend[ElementX >> 9])), - static_cast(static_cast(ElementY | SignExtend[ElementY >> 9])), - static_cast(static_cast(ElementZ | SignExtend[ElementZ >> 9])), - static_cast(static_cast(ElementW | SignExtendW[ElementW >> 1])) - } } }; + XMVECTORF32 vResult = { + {{static_cast( + static_cast(ElementX | SignExtend[ElementX >> 9])), + static_cast( + static_cast(ElementY | SignExtend[ElementY >> 9])), + static_cast( + static_cast(ElementZ | SignExtend[ElementZ >> 9])), + static_cast( + static_cast(ElementW | SignExtendW[ElementW >> 1]))}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x4_t vInt = vld1q_dup_u32(reinterpret_cast(pSource)); @@ -1831,17 +1792,14 @@ inline XMVECTOR XM_CALLCONV XMLoadDec4(const XMDEC4* pSource) noexcept #endif //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUByteN4(const XMUBYTEN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUByteN4(const XMUBYTEN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x) / 255.0f, - static_cast(pSource->y) / 255.0f, - static_cast(pSource->z) / 255.0f, - static_cast(pSource->w) / 255.0f - } } }; + XMVECTORF32 vResult = {{{static_cast(pSource->x) / 255.0f, + static_cast(pSource->y) / 255.0f, + static_cast(pSource->z) / 255.0f, + static_cast(pSource->w) / 255.0f}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vInt8 = vld1_dup_u32(reinterpret_cast(pSource)); @@ -1850,7 +1808,9 @@ inline XMVECTOR XM_CALLCONV XMLoadUByteN4(const XMUBYTEN4* pSource) noexcept float32x4_t R = vcvtq_f32_u32(vInt); return vmulq_n_f32(R, 1.0f / 255.0f); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 LoadUByteN4Mul = { { { 1.0f / 255.0f, 1.0f / (255.0f * 256.0f), 1.0f / (255.0f * 65536.0f), 1.0f / (255.0f * 65536.0f * 256.0f) } } }; + static const XMVECTORF32 LoadUByteN4Mul = { + {{1.0f / 255.0f, 1.0f / (255.0f * 256.0f), 1.0f / (255.0f * 65536.0f), + 1.0f / (255.0f * 65536.0f * 256.0f)}}}; // Splat the color in all four entries (x,z,y,w) XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 @@ -1868,17 +1828,13 @@ inline XMVECTOR XM_CALLCONV XMLoadUByteN4(const XMUBYTEN4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUByte4(const XMUBYTE4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUByte4(const XMUBYTE4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - static_cast(pSource->z), - static_cast(pSource->w) - } } }; + XMVECTORF32 vResult = { + {{static_cast(pSource->x), static_cast(pSource->y), + static_cast(pSource->z), static_cast(pSource->w)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vInt8 = vld1_dup_u32(reinterpret_cast(pSource)); @@ -1886,7 +1842,8 @@ inline XMVECTOR XM_CALLCONV XMLoadUByte4(const XMUBYTE4* pSource) noexcept uint32x4_t vInt = vmovl_u16(vget_low_u16(vInt16)); return vcvtq_f32_u32(vInt); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 LoadUByte4Mul = { { { 1.0f, 1.0f / 256.0f, 1.0f / 65536.0f, 1.0f / (65536.0f * 256.0f) } } }; + static const XMVECTORF32 LoadUByte4Mul = { + {{1.0f, 1.0f / 256.0f, 1.0f / 65536.0f, 1.0f / (65536.0f * 256.0f)}}}; // Splat the color in all four entries (x,z,y,w) XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 @@ -1904,17 +1861,19 @@ inline XMVECTOR XM_CALLCONV XMLoadUByte4(const XMUBYTE4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadByteN4(const XMBYTEN4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadByteN4(const XMBYTEN4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - (pSource->x == -128) ? -1.f : (static_cast(pSource->x) / 127.0f), - (pSource->y == -128) ? -1.f : (static_cast(pSource->y) / 127.0f), - (pSource->z == -128) ? -1.f : (static_cast(pSource->z) / 127.0f), - (pSource->w == -128) ? -1.f : (static_cast(pSource->w) / 127.0f) - } } }; + XMVECTORF32 vResult = { + {{(pSource->x == -128) ? -1.f + : (static_cast(pSource->x) / 127.0f), + (pSource->y == -128) ? -1.f + : (static_cast(pSource->y) / 127.0f), + (pSource->z == -128) ? -1.f + : (static_cast(pSource->z) / 127.0f), + (pSource->w == -128) ? -1.f + : (static_cast(pSource->w) / 127.0f)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vInt8 = vld1_dup_u32(reinterpret_cast(pSource)); @@ -1924,7 +1883,9 @@ inline XMVECTOR XM_CALLCONV XMLoadByteN4(const XMBYTEN4* pSource) noexcept R = vmulq_n_f32(R, 1.0f / 127.0f); return vmaxq_f32(R, vdupq_n_f32(-1.f)); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 LoadByteN4Mul = { { { 1.0f / 127.0f, 1.0f / (127.0f * 256.0f), 1.0f / (127.0f * 65536.0f), 1.0f / (127.0f * 65536.0f * 256.0f) } } }; + static const XMVECTORF32 LoadByteN4Mul = { + {{1.0f / 127.0f, 1.0f / (127.0f * 256.0f), 1.0f / (127.0f * 65536.0f), + 1.0f / (127.0f * 65536.0f * 256.0f)}}}; // Splat the color in all four entries (x,z,y,w) XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 @@ -1943,17 +1904,13 @@ inline XMVECTOR XM_CALLCONV XMLoadByteN4(const XMBYTEN4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadByte4(const XMBYTE4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadByte4(const XMBYTE4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - static_cast(pSource->x), - static_cast(pSource->y), - static_cast(pSource->z), - static_cast(pSource->w) - } } }; + XMVECTORF32 vResult = { + {{static_cast(pSource->x), static_cast(pSource->y), + static_cast(pSource->z), static_cast(pSource->w)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) uint32x2_t vInt8 = vld1_dup_u32(reinterpret_cast(pSource)); @@ -1961,7 +1918,8 @@ inline XMVECTOR XM_CALLCONV XMLoadByte4(const XMBYTE4* pSource) noexcept int32x4_t vInt = vmovl_s16(vget_low_s16(vInt16)); return vcvtq_f32_s32(vInt); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 LoadByte4Mul = { { { 1.0f, 1.0f / 256.0f, 1.0f / 65536.0f, 1.0f / (65536.0f * 256.0f) } } }; + static const XMVECTORF32 LoadByte4Mul = { + {{1.0f, 1.0f / 256.0f, 1.0f / 65536.0f, 1.0f / (65536.0f * 256.0f)}}}; // Splat the color in all four entries (x,z,y,w) XMVECTOR vTemp = _mm_load1_ps(reinterpret_cast(&pSource->x)); // Mask x&0ff,y&0xff00,z&0xff0000,w&0xff000000 @@ -1979,32 +1937,32 @@ inline XMVECTOR XM_CALLCONV XMLoadByte4(const XMBYTE4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadUNibble4(const XMUNIBBLE4* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadUNibble4(const XMUNIBBLE4* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - float(pSource->v & 0xF), - float((pSource->v >> 4) & 0xF), - float((pSource->v >> 8) & 0xF), - float((pSource->v >> 12) & 0xF) - } } }; + XMVECTORF32 vResult = { + {{float(pSource->v & 0xF), float((pSource->v >> 4) & 0xF), + float((pSource->v >> 8) & 0xF), float((pSource->v >> 12) & 0xF)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORI32 UNibble4And = { { { 0xF, 0xF0, 0xF00, 0xF000 } } }; - static const XMVECTORF32 UNibble4Mul = { { { 1.0f, 1.0f / 16.f, 1.0f / 256.f, 1.0f / 4096.f } } }; - uint16x4_t vInt16 = vld1_dup_u16(reinterpret_cast(pSource)); + static const XMVECTORI32 UNibble4And = {{{0xF, 0xF0, 0xF00, 0xF000}}}; + static const XMVECTORF32 UNibble4Mul = { + {{1.0f, 1.0f / 16.f, 1.0f / 256.f, 1.0f / 4096.f}}}; + uint16x4_t vInt16 = + vld1_dup_u16(reinterpret_cast(pSource)); uint32x4_t vInt = vmovl_u16(vInt16); vInt = vandq_u32(vInt, UNibble4And); float32x4_t R = vcvtq_f32_u32(vInt); return vmulq_f32(R, UNibble4Mul); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORI32 UNibble4And = { { { 0xF, 0xF0, 0xF00, 0xF000 } } }; - static const XMVECTORF32 UNibble4Mul = { { { 1.0f, 1.0f / 16.f, 1.0f / 256.f, 1.0f / 4096.f } } }; + static const XMVECTORI32 UNibble4And = {{{0xF, 0xF0, 0xF00, 0xF000}}}; + static const XMVECTORF32 UNibble4Mul = { + {{1.0f, 1.0f / 16.f, 1.0f / 256.f, 1.0f / 4096.f}}}; // Get the 16 bit value and splat it __m128i vInt = XM_LOADU_SI16(&pSource->v); - XMVECTOR vResult = XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); + XMVECTOR vResult = + XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); // Mask off x, y and z vResult = _mm_and_ps(vResult, UNibble4And); // Convert to float @@ -2016,32 +1974,34 @@ inline XMVECTOR XM_CALLCONV XMLoadUNibble4(const XMUNIBBLE4* pSource) noexcept } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMVECTOR XM_CALLCONV XMLoadU555(const XMU555* pSource) noexcept -{ +_Use_decl_annotations_ inline XMVECTOR XM_CALLCONV +XMLoadU555(const XMU555* pSource) noexcept { assert(pSource); #if defined(_XM_NO_INTRINSICS_) - XMVECTORF32 vResult = { { { - float(pSource->v & 0x1F), - float((pSource->v >> 5) & 0x1F), - float((pSource->v >> 10) & 0x1F), - float((pSource->v >> 15) & 0x1) - } } }; + XMVECTORF32 vResult = { + {{float(pSource->v & 0x1F), float((pSource->v >> 5) & 0x1F), + float((pSource->v >> 10) & 0x1F), float((pSource->v >> 15) & 0x1)}}}; return vResult.v; #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORI32 U555And = { { { 0x1F, 0x1F << 5, 0x1F << 10, 0x8000 } } }; - static const XMVECTORF32 U555Mul = { { { 1.0f, 1.0f / 32.f, 1.0f / 1024.f, 1.0f / 32768.f } } }; - uint16x4_t vInt16 = vld1_dup_u16(reinterpret_cast(pSource)); + static const XMVECTORI32 U555And = { + {{0x1F, 0x1F << 5, 0x1F << 10, 0x8000}}}; + static const XMVECTORF32 U555Mul = { + {{1.0f, 1.0f / 32.f, 1.0f / 1024.f, 1.0f / 32768.f}}}; + uint16x4_t vInt16 = + vld1_dup_u16(reinterpret_cast(pSource)); uint32x4_t vInt = vmovl_u16(vInt16); vInt = vandq_u32(vInt, U555And); float32x4_t R = vcvtq_f32_u32(vInt); return vmulq_f32(R, U555Mul); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORI32 U555And = { { { 0x1F, 0x1F << 5, 0x1F << 10, 0x8000 } } }; - static const XMVECTORF32 U555Mul = { { { 1.0f, 1.0f / 32.f, 1.0f / 1024.f, 1.0f / 32768.f } } }; + static const XMVECTORI32 U555And = { + {{0x1F, 0x1F << 5, 0x1F << 10, 0x8000}}}; + static const XMVECTORF32 U555Mul = { + {{1.0f, 1.0f / 32.f, 1.0f / 1024.f, 1.0f / 32768.f}}}; // Get the 16bit value and splat it __m128i vInt = XM_LOADU_SI16(&pSource->v); - XMVECTOR vResult = XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); + XMVECTOR vResult = + XM_PERMUTE_PS(_mm_castsi128_ps(vInt), _MM_SHUFFLE(0, 0, 0, 0)); // Mask off x, y and z vResult = _mm_and_ps(vResult, U555And); // Convert to float @@ -2061,13 +2021,8 @@ inline XMVECTOR XM_CALLCONV XMLoadU555(const XMU555* pSource) noexcept * Vector and matrix store operations * ****************************************************************************/ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreColor -( - XMCOLOR* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreColor(XMCOLOR* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2079,9 +2034,9 @@ inline void XM_CALLCONV XMStoreColor XMStoreFloat4A(&tmp, N); pDestination->c = (static_cast(tmp.w) << 24) | - (static_cast(tmp.x) << 16) | - (static_cast(tmp.y) << 8) | - static_cast(tmp.z); + (static_cast(tmp.x) << 16) | + (static_cast(tmp.y) << 8) | + static_cast(tmp.z); #elif defined(_XM_ARM_NEON_INTRINSICS_) float32x4_t R = vmaxq_f32(V, vdupq_n_f32(0)); @@ -2092,7 +2047,8 @@ inline void XM_CALLCONV XMStoreColor uint16x4_t vInt16 = vqmovn_u32(vInt32); uint8x8_t vInt8 = vqmovn_u16(vcombine_u16(vInt16, vInt16)); uint32_t rgba = vget_lane_u32(vreinterpret_u32_u8(vInt8), 0); - pDestination->c = (rgba & 0xFF00FF00) | ((rgba >> 16) & 0xFF) | ((rgba << 16) & 0xFF0000); + pDestination->c = + (rgba & 0xFF00FF00) | ((rgba >> 16) & 0xFF) | ((rgba << 16) & 0xFF0000); #elif defined(_XM_SSE_INTRINSICS_) // Set <0 to 0 XMVECTOR vResult = _mm_max_ps(V, g_XMZero); @@ -2109,18 +2065,14 @@ inline void XM_CALLCONV XMStoreColor // Mash to bytes vInt = _mm_packus_epi16(vInt, vInt); // Store the color - _mm_store_ss(reinterpret_cast(&pDestination->c), _mm_castsi128_ps(vInt)); + _mm_store_ss(reinterpret_cast(&pDestination->c), + _mm_castsi128_ps(vInt)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreHalf2 -( - XMHALF2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreHalf2(XMHALF2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_F16C_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) __m128i V1 = _mm_cvtps_ph(V, _MM_FROUND_TO_NEAREST_INT); @@ -2128,17 +2080,12 @@ inline void XM_CALLCONV XMStoreHalf2 #else pDestination->x = XMConvertFloatToHalf(XMVectorGetX(V)); pDestination->y = XMConvertFloatToHalf(XMVectorGetY(V)); -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreShortN2 -( - XMSHORTN2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreShortN2(XMSHORTN2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2165,18 +2112,14 @@ inline void XM_CALLCONV XMStoreShortN2 vResult = _mm_mul_ps(vResult, g_ShortMax); __m128i vResulti = _mm_cvtps_epi32(vResult); vResulti = _mm_packs_epi32(vResulti, vResulti); - _mm_store_ss(reinterpret_cast(&pDestination->x), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->x), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreShort2 -( - XMSHORT2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreShort2(XMSHORT2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2203,18 +2146,14 @@ inline void XM_CALLCONV XMStoreShort2 __m128i vInt = _mm_cvtps_epi32(vResult); // Pack the ints into shorts vInt = _mm_packs_epi32(vInt, vInt); - _mm_store_ss(reinterpret_cast(&pDestination->x), _mm_castsi128_ps(vInt)); + _mm_store_ss(reinterpret_cast(&pDestination->x), + _mm_castsi128_ps(vInt)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUShortN2 -( - XMUSHORTN2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUShortN2(XMUSHORTN2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2252,13 +2191,8 @@ inline void XM_CALLCONV XMStoreUShortN2 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUShort2 -( - XMUSHORT2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUShort2(XMUSHORT2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2291,13 +2225,8 @@ inline void XM_CALLCONV XMStoreUShort2 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreByteN2 -( - XMBYTEN2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreByteN2(XMBYTEN2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2318,7 +2247,8 @@ inline void XM_CALLCONV XMStoreByteN2 int32x4_t vInt32 = vcvtq_s32_f32(R); int16x4_t vInt16 = vqmovn_s32(vInt32); int8x8_t vInt8 = vqmovn_s16(vcombine_s16(vInt16, vInt16)); - vst1_lane_u16(reinterpret_cast(pDestination), vreinterpret_u16_s8(vInt8), 0); + vst1_lane_u16(reinterpret_cast(pDestination), + vreinterpret_u16_s8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMNegativeOne); @@ -2327,21 +2257,18 @@ inline void XM_CALLCONV XMStoreByteN2 vResult = _mm_mul_ps(vResult, g_ByteMax); // Convert to int by rounding __m128i vInt = _mm_cvtps_epi32(vResult); - // No SSE operations will write to 16-bit values, so we have to extract them manually + // No SSE operations will write to 16-bit values, so we have to extract them + // manually auto x = static_cast(_mm_extract_epi16(vInt, 0)); auto y = static_cast(_mm_extract_epi16(vInt, 2)); - pDestination->v = static_cast(((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); + pDestination->v = static_cast( + ((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreByte2 -( - XMBYTE2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreByte2(XMBYTE2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2360,28 +2287,26 @@ inline void XM_CALLCONV XMStoreByte2 int32x4_t vInt32 = vcvtq_s32_f32(R); int16x4_t vInt16 = vqmovn_s32(vInt32); int8x8_t vInt8 = vqmovn_s16(vcombine_s16(vInt16, vInt16)); - vst1_lane_u16(reinterpret_cast(pDestination), vreinterpret_u16_s8(vInt8), 0); + vst1_lane_u16(reinterpret_cast(pDestination), + vreinterpret_u16_s8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_ByteMin); vResult = _mm_min_ps(vResult, g_ByteMax); // Convert to int by rounding __m128i vInt = _mm_cvtps_epi32(vResult); - // No SSE operations will write to 16-bit values, so we have to extract them manually + // No SSE operations will write to 16-bit values, so we have to extract them + // manually auto x = static_cast(_mm_extract_epi16(vInt, 0)); auto y = static_cast(_mm_extract_epi16(vInt, 2)); - pDestination->v = static_cast(((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); + pDestination->v = static_cast( + ((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUByteN2 -( - XMUBYTEN2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUByteN2(XMUBYTEN2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2403,7 +2328,8 @@ inline void XM_CALLCONV XMStoreUByteN2 uint32x4_t vInt32 = vcvtq_u32_f32(R); uint16x4_t vInt16 = vqmovn_u32(vInt32); uint8x8_t vInt8 = vqmovn_u16(vcombine_u16(vInt16, vInt16)); - vst1_lane_u16(reinterpret_cast(pDestination), vreinterpret_u16_u8(vInt8), 0); + vst1_lane_u16(reinterpret_cast(pDestination), + vreinterpret_u16_u8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMZero); @@ -2413,21 +2339,18 @@ inline void XM_CALLCONV XMStoreUByteN2 vResult = _mm_add_ps(vResult, g_XMOneHalf); // Convert to int __m128i vInt = _mm_cvttps_epi32(vResult); - // No SSE operations will write to 16-bit values, so we have to extract them manually + // No SSE operations will write to 16-bit values, so we have to extract them + // manually auto x = static_cast(_mm_extract_epi16(vInt, 0)); auto y = static_cast(_mm_extract_epi16(vInt, 2)); - pDestination->v = static_cast(((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); + pDestination->v = static_cast( + ((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUByte2 -( - XMUBYTE2* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUByte2(XMUBYTE2* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2446,30 +2369,28 @@ inline void XM_CALLCONV XMStoreUByte2 uint32x4_t vInt32 = vcvtq_u32_f32(R); uint16x4_t vInt16 = vqmovn_u32(vInt32); uint8x8_t vInt8 = vqmovn_u16(vcombine_u16(vInt16, vInt16)); - vst1_lane_u16(reinterpret_cast(pDestination), vreinterpret_u16_u8(vInt8), 0); + vst1_lane_u16(reinterpret_cast(pDestination), + vreinterpret_u16_u8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMZero); vResult = _mm_min_ps(vResult, g_UByteMax); // Convert to int by rounding __m128i vInt = _mm_cvtps_epi32(vResult); - // No SSE operations will write to 16-bit values, so we have to extract them manually + // No SSE operations will write to 16-bit values, so we have to extract them + // manually auto x = static_cast(_mm_extract_epi16(vInt, 0)); auto y = static_cast(_mm_extract_epi16(vInt, 2)); - pDestination->v = static_cast(((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); + pDestination->v = static_cast( + ((static_cast(y) & 0xFF) << 8) | (static_cast(x) & 0xFF)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreU565 -( - XMU565* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreU565(XMU565* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 Max = { { { 31.0f, 63.0f, 31.0f, 0.0f } } }; + static const XMVECTORF32 Max = {{{31.0f, 63.0f, 31.0f, 0.0f}}}; #if defined(_XM_NO_INTRINSICS_) XMVECTOR N = XMVectorClamp(V, XMVectorZero(), Max.v); @@ -2478,13 +2399,13 @@ inline void XM_CALLCONV XMStoreU565 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - ((static_cast(tmp.z) & 0x1F) << 11) - | ((static_cast(tmp.y) & 0x3F) << 5) - | ((static_cast(tmp.x) & 0x1F))); + pDestination->v = + static_cast(((static_cast(tmp.z) & 0x1F) << 11) | + ((static_cast(tmp.y) & 0x3F) << 5) | + ((static_cast(tmp.x) & 0x1F))); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.0f, 32.f, 32.f * 64.f, 0.f } } }; - static const XMVECTORU32 Mask = { { { 0x1F, 0x3F << 5, 0x1F << 11, 0 } } }; + static const XMVECTORF32 Scale = {{{1.0f, 32.f, 32.f * 64.f, 0.f}}}; + static const XMVECTORU32 Mask = {{{0x1F, 0x3F << 5, 0x1F << 11, 0}}}; float32x4_t vResult = vmaxq_f32(V, vdupq_n_f32(0)); vResult = vminq_f32(vResult, Max); vResult = vmulq_f32(vResult, Scale); @@ -2502,25 +2423,20 @@ inline void XM_CALLCONV XMStoreU565 vResult = _mm_min_ps(vResult, Max); // Convert to int with rounding __m128i vInt = _mm_cvtps_epi32(vResult); - // No SSE operations will write to 16-bit values, so we have to extract them manually + // No SSE operations will write to 16-bit values, so we have to extract them + // manually auto x = static_cast(_mm_extract_epi16(vInt, 0)); auto y = static_cast(_mm_extract_epi16(vInt, 2)); auto z = static_cast(_mm_extract_epi16(vInt, 4)); pDestination->v = static_cast( - ((static_cast(z) & 0x1F) << 11) - | ((static_cast(y) & 0x3F) << 5) - | ((static_cast(x) & 0x1F))); + ((static_cast(z) & 0x1F) << 11) | + ((static_cast(y) & 0x3F) << 5) | ((static_cast(x) & 0x1F))); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat3PK -( - XMFLOAT3PK* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat3PK(XMFLOAT3PK* pDestination, FXMVECTOR V) noexcept { assert(pDestination); XM_ALIGNED_DATA(16) uint32_t IValue[4]; @@ -2529,47 +2445,35 @@ inline void XM_CALLCONV XMStoreFloat3PK uint32_t Result[3]; // X & Y Channels (5-bit exponent, 6-bit mantissa) - for (uint32_t j = 0; j < 2; ++j) - { + for (uint32_t j = 0; j < 2; ++j) { uint32_t Sign = IValue[j] & 0x80000000; uint32_t I = IValue[j] & 0x7FFFFFFF; - if ((I & 0x7F800000) == 0x7F800000) - { + if ((I & 0x7F800000) == 0x7F800000) { // INF or NAN Result[j] = 0x7C0U; - if ((I & 0x7FFFFF) != 0) - { + if ((I & 0x7FFFFF) != 0) { Result[j] = 0x7FFU; - } - else if (Sign) - { + } else if (Sign) { // -INF is clamped to 0 since 3PK is positive only Result[j] = 0; } - } - else if (Sign || I < 0x35800000) - { + } else if (Sign || I < 0x35800000) { // 3PK is positive only, so clamp to zero Result[j] = 0; - } - else if (I > 0x477E0000U) - { - // The number is too large to be represented as a float11, set to max + } else if (I > 0x477E0000U) { + // The number is too large to be represented as a float11, set to + // max Result[j] = 0x7BFU; - } - else - { - if (I < 0x38800000U) - { - // The number is too small to be represented as a normalized float11 - // Convert it to a denormalized value. + } else { + if (I < 0x38800000U) { + // The number is too small to be represented as a normalized + // float11 Convert it to a denormalized value. uint32_t Shift = 113U - (I >> 23U); I = (0x800000U | (I & 0x7FFFFFU)) >> Shift; - } - else - { - // Rebias the exponent to represent the value as a normalized float11 + } else { + // Rebias the exponent to represent the value as a normalized + // float11 I += 0xC8000000U; } @@ -2581,42 +2485,30 @@ inline void XM_CALLCONV XMStoreFloat3PK uint32_t Sign = IValue[2] & 0x80000000; uint32_t I = IValue[2] & 0x7FFFFFFF; - if ((I & 0x7F800000) == 0x7F800000) - { + if ((I & 0x7F800000) == 0x7F800000) { // INF or NAN Result[2] = 0x3E0U; - if (I & 0x7FFFFF) - { + if (I & 0x7FFFFF) { Result[2] = 0x3FFU; - } - else if (Sign || I < 0x36000000) - { + } else if (Sign || I < 0x36000000) { // -INF is clamped to 0 since 3PK is positive only Result[2] = 0; } - } - else if (Sign) - { + } else if (Sign) { // 3PK is positive only, so clamp to zero Result[2] = 0; - } - else if (I > 0x477C0000U) - { + } else if (I > 0x477C0000U) { // The number is too large to be represented as a float10, set to max Result[2] = 0x3DFU; - } - else - { - if (I < 0x38800000U) - { + } else { + if (I < 0x38800000U) { // The number is too small to be represented as a normalized float10 // Convert it to a denormalized value. uint32_t Shift = 113U - (I >> 23U); I = (0x800000U | (I & 0x7FFFFFU)) >> Shift; - } - else - { - // Rebias the exponent to represent the value as a normalized float10 + } else { + // Rebias the exponent to represent the value as a normalized + // float10 I += 0xC8000000U; } @@ -2624,19 +2516,13 @@ inline void XM_CALLCONV XMStoreFloat3PK } // Pack Result into memory - pDestination->v = (Result[0] & 0x7ff) - | ((Result[1] & 0x7ff) << 11) - | ((Result[2] & 0x3ff) << 22); + pDestination->v = (Result[0] & 0x7ff) | ((Result[1] & 0x7ff) << 11) | + ((Result[2] & 0x3ff) << 22); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreFloat3SE -( - XMFLOAT3SE* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreFloat3SE(XMFLOAT3SE* pDestination, FXMVECTOR V) noexcept { assert(pDestination); XMFLOAT3A tmp; @@ -2654,9 +2540,13 @@ inline void XM_CALLCONV XMStoreFloat3SE const float maxColor = (max_xyz > minf9) ? max_xyz : minf9; - union { float f; int32_t i; } fi; + union { + float f; + int32_t i; + } fi; fi.f = maxColor; - fi.i += 0x00004000; // round up leaving 9 bits in fraction (including assumed 1) + fi.i += 0x00004000; // round up leaving 9 bits in fraction (including + // assumed 1) auto exp = static_cast(fi.i) >> 23; pDestination->e = exp - 0x6f; @@ -2664,19 +2554,17 @@ inline void XM_CALLCONV XMStoreFloat3SE fi.i = static_cast(0x83000000 - (exp << 23)); float ScaleR = fi.f; - pDestination->xm = static_cast(MathInternal::round_to_nearest(x * ScaleR)); - pDestination->ym = static_cast(MathInternal::round_to_nearest(y * ScaleR)); - pDestination->zm = static_cast(MathInternal::round_to_nearest(z * ScaleR)); + pDestination->xm = + static_cast(MathInternal::round_to_nearest(x * ScaleR)); + pDestination->ym = + static_cast(MathInternal::round_to_nearest(y * ScaleR)); + pDestination->zm = + static_cast(MathInternal::round_to_nearest(z * ScaleR)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreHalf4 -( - XMHALF4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreHalf4(XMHALF4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_F16C_INTRINSICS_) && !defined(_XM_NO_INTRINSICS_) __m128i V1 = _mm_cvtps_ph(V, _MM_FROUND_TO_NEAREST_INT); @@ -2689,17 +2577,12 @@ inline void XM_CALLCONV XMStoreHalf4 pDestination->y = XMConvertFloatToHalf(t.y); pDestination->z = XMConvertFloatToHalf(t.z); pDestination->w = XMConvertFloatToHalf(t.w); -#endif // !_XM_F16C_INTRINSICS_ +#endif // !_XM_F16C_INTRINSICS_ } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreShortN4 -( - XMSHORTN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreShortN4(XMSHORTN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2727,18 +2610,14 @@ inline void XM_CALLCONV XMStoreShortN4 vResult = _mm_mul_ps(vResult, g_ShortMax); __m128i vResulti = _mm_cvtps_epi32(vResult); vResulti = _mm_packs_epi32(vResulti, vResulti); - _mm_store_sd(reinterpret_cast(&pDestination->x), _mm_castsi128_pd(vResulti)); + _mm_store_sd(reinterpret_cast(&pDestination->x), + _mm_castsi128_pd(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreShort4 -( - XMSHORT4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreShort4(XMSHORT4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2766,18 +2645,14 @@ inline void XM_CALLCONV XMStoreShort4 __m128i vInt = _mm_cvtps_epi32(vResult); // Pack the ints into shorts vInt = _mm_packs_epi32(vInt, vInt); - _mm_store_sd(reinterpret_cast(&pDestination->x), _mm_castsi128_pd(vInt)); + _mm_store_sd(reinterpret_cast(&pDestination->x), + _mm_castsi128_pd(vInt)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUShortN4 -( - XMUSHORTN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUShortN4(XMUSHORTN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2818,13 +2693,8 @@ inline void XM_CALLCONV XMStoreUShortN4 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUShort4 -( - XMUSHORT4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUShort4(XMUSHORT4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -2860,19 +2730,14 @@ inline void XM_CALLCONV XMStoreUShort4 } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreXDecN4 -( - XMXDECN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreXDecN4(XMXDECN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 Min = { { { -1.0f, -1.0f, -1.0f, 0.0f } } }; + static const XMVECTORF32 Min = {{{-1.0f, -1.0f, -1.0f, 0.0f}}}; #if defined(_XM_NO_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 511.0f, 511.0f, 511.0f, 3.0f } } }; + static const XMVECTORF32 Scale = {{{511.0f, 511.0f, 511.0f, 3.0f}}}; XMVECTOR N = XMVectorClamp(V, Min.v, g_XMOne.v); N = XMVectorMultiply(N, Scale.v); @@ -2881,15 +2746,17 @@ inline void XM_CALLCONV XMStoreXDecN4 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - (static_cast(tmp.w) << 30) - | ((static_cast(tmp.z) & 0x3FF) << 20) - | ((static_cast(tmp.y) & 0x3FF) << 10) - | (static_cast(tmp.x) & 0x3FF)); + pDestination->v = + static_cast((static_cast(tmp.w) << 30) | + ((static_cast(tmp.z) & 0x3FF) << 20) | + ((static_cast(tmp.y) & 0x3FF) << 10) | + (static_cast(tmp.x) & 0x3FF)); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 511.0f, 511.0f * 1024.0f, 511.0f * 1048576.0f, 3.0f * 536870912.0f } } }; - static const XMVECTORI32 ScaleMask = { { { 0x3FF, 0x3FF << 10, 0x3FF << 20, 0x3 << 29 } } }; + static const XMVECTORF32 Scale = { + {{511.0f, 511.0f * 1024.0f, 511.0f * 1048576.0f, 3.0f * 536870912.0f}}}; + static const XMVECTORI32 ScaleMask = { + {{0x3FF, 0x3FF << 10, 0x3FF << 20, 0x3 << 29}}}; float32x4_t vResult = vmaxq_f32(V, Min); vResult = vminq_f32(vResult, vdupq_n_f32(1.0f)); vResult = vmulq_f32(vResult, Scale); @@ -2904,8 +2771,10 @@ inline void XM_CALLCONV XMStoreXDecN4 vTemp = vpadd_u32(vTemp, vTemp); vst1_lane_u32(&pDestination->v, vTemp, 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 511.0f, 511.0f * 1024.0f, 511.0f * 1048576.0f, 3.0f * 536870912.0f } } }; - static const XMVECTORI32 ScaleMask = { { { 0x3FF, 0x3FF << 10, 0x3FF << 20, 0x3 << 29 } } }; + static const XMVECTORF32 Scale = { + {{511.0f, 511.0f * 1024.0f, 511.0f * 1048576.0f, 3.0f * 536870912.0f}}}; + static const XMVECTORI32 ScaleMask = { + {{0x3FF, 0x3FF << 10, 0x3FF << 20, 0x3 << 29}}}; XMVECTOR vResult = _mm_max_ps(V, Min); vResult = _mm_min_ps(vResult, g_XMOne); // Scale by multiplication @@ -2918,13 +2787,15 @@ inline void XM_CALLCONV XMStoreXDecN4 __m128i vResultw = _mm_and_si128(vResulti, g_XMMaskW); vResulti = _mm_add_epi32(vResulti, vResultw); // Do a horizontal or of all 4 entries - vResult = XM_PERMUTE_PS(_mm_castsi128_ps(vResulti), _MM_SHUFFLE(0, 3, 2, 1)); + vResult = + XM_PERMUTE_PS(_mm_castsi128_ps(vResulti), _MM_SHUFFLE(0, 3, 2, 1)); vResulti = _mm_or_si128(vResulti, _mm_castps_si128(vResult)); vResult = XM_PERMUTE_PS(vResult, _MM_SHUFFLE(0, 3, 2, 1)); vResulti = _mm_or_si128(vResulti, _mm_castps_si128(vResult)); vResult = XM_PERMUTE_PS(vResult, _MM_SHUFFLE(0, 3, 2, 1)); vResulti = _mm_or_si128(vResulti, _mm_castps_si128(vResult)); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } @@ -2945,16 +2816,11 @@ inline void XM_CALLCONV XMStoreXDecN4 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreXDec4 -( - XMXDEC4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreXDec4(XMXDEC4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 MinXDec4 = { { { -511.0f, -511.0f, -511.0f, 0.0f } } }; - static const XMVECTORF32 MaxXDec4 = { { { 511.0f, 511.0f, 511.0f, 3.0f } } }; + static const XMVECTORF32 MinXDec4 = {{{-511.0f, -511.0f, -511.0f, 0.0f}}}; + static const XMVECTORF32 MaxXDec4 = {{{511.0f, 511.0f, 511.0f, 3.0f}}}; #if defined(_XM_NO_INTRINSICS_) @@ -2963,15 +2829,18 @@ inline void XM_CALLCONV XMStoreXDec4 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - (static_cast(tmp.w) << 30) - | ((static_cast(tmp.z) & 0x3FF) << 20) - | ((static_cast(tmp.y) & 0x3FF) << 10) - | ((static_cast(tmp.x) & 0x3FF))); + pDestination->v = + static_cast((static_cast(tmp.w) << 30) | + ((static_cast(tmp.z) & 0x3FF) << 20) | + ((static_cast(tmp.y) & 0x3FF) << 10) | + ((static_cast(tmp.x) & 0x3FF))); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 ScaleXDec4 = { { { 1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f / 2.0f } } }; - static const XMVECTORI32 MaskXDec4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 ScaleXDec4 = { + {{1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, + 1024.0f * 1024.0f * 1024.0f / 2.0f}}}; + static const XMVECTORI32 MaskXDec4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; float32x4_t vResult = vmaxq_f32(V, MinXDec4); vResult = vminq_f32(vResult, MaxXDec4); vResult = vmulq_f32(vResult, ScaleXDec4); @@ -2987,8 +2856,11 @@ inline void XM_CALLCONV XMStoreXDec4 vTemp = vorr_u32(vTemp, vTemp2); vst1_lane_u32(&pDestination->v, vTemp, 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleXDec4 = { { { 1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f / 2.0f } } }; - static const XMVECTORI32 MaskXDec4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 ScaleXDec4 = { + {{1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, + 1024.0f * 1024.0f * 1024.0f / 2.0f}}}; + static const XMVECTORI32 MaskXDec4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, MinXDec4); vResult = _mm_min_ps(vResult, MaxXDec4); @@ -3008,7 +2880,8 @@ inline void XM_CALLCONV XMStoreXDec4 vResulti2 = _mm_add_epi32(vResulti2, vResulti2); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } @@ -3023,17 +2896,12 @@ inline void XM_CALLCONV XMStoreXDec4 #endif //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUDecN4 -( - XMUDECN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUDecN4(XMUDECN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1023.0f, 1023.0f, 1023.0f, 3.0f } } }; + static const XMVECTORF32 Scale = {{{1023.0f, 1023.0f, 1023.0f, 3.0f}}}; XMVECTOR N = XMVectorSaturate(V); N = XMVectorMultiply(N, Scale.v); @@ -3041,15 +2909,18 @@ inline void XM_CALLCONV XMStoreUDecN4 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - (static_cast(tmp.w) << 30) - | ((static_cast(tmp.z) & 0x3FF) << 20) - | ((static_cast(tmp.y) & 0x3FF) << 10) - | ((static_cast(tmp.x) & 0x3FF))); + pDestination->v = + static_cast((static_cast(tmp.w) << 30) | + ((static_cast(tmp.z) & 0x3FF) << 20) | + ((static_cast(tmp.y) & 0x3FF) << 10) | + ((static_cast(tmp.x) & 0x3FF))); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 ScaleUDecN4 = { { { 1023.0f, 1023.0f * 1024.0f * 0.5f, 1023.0f * 1024.0f * 1024.0f, 3.0f * 1024.0f * 1024.0f * 1024.0f * 0.5f } } }; - static const XMVECTORI32 MaskUDecN4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 ScaleUDecN4 = { + {{1023.0f, 1023.0f * 1024.0f * 0.5f, 1023.0f * 1024.0f * 1024.0f, + 3.0f * 1024.0f * 1024.0f * 1024.0f * 0.5f}}}; + static const XMVECTORI32 MaskUDecN4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; float32x4_t vResult = vmaxq_f32(V, vdupq_n_f32(0.f)); vResult = vminq_f32(vResult, vdupq_n_f32(1.f)); vResult = vmulq_f32(vResult, ScaleUDecN4); @@ -3065,8 +2936,11 @@ inline void XM_CALLCONV XMStoreUDecN4 vTemp = vorr_u32(vTemp, vTemp2); vst1_lane_u32(&pDestination->v, vTemp, 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleUDecN4 = { { { 1023.0f, 1023.0f * 1024.0f * 0.5f, 1023.0f * 1024.0f * 1024.0f, 3.0f * 1024.0f * 1024.0f * 1024.0f * 0.5f } } }; - static const XMVECTORI32 MaskUDecN4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 ScaleUDecN4 = { + {{1023.0f, 1023.0f * 1024.0f * 0.5f, 1023.0f * 1024.0f * 1024.0f, + 3.0f * 1024.0f * 1024.0f * 1024.0f * 0.5f}}}; + static const XMVECTORI32 MaskUDecN4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMZero); vResult = _mm_min_ps(vResult, g_XMOne); @@ -3086,22 +2960,18 @@ inline void XM_CALLCONV XMStoreUDecN4 vResulti2 = _mm_add_epi32(vResulti2, vResulti2); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUDecN4_XR -( - XMUDECN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUDecN4_XR(XMUDECN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 Scale = { { { 510.0f, 510.0f, 510.0f, 3.0f } } }; - static const XMVECTORF32 Bias = { { { 384.0f, 384.0f, 384.0f, 0.0f } } }; - static const XMVECTORF32 C = { { { 1023.f, 1023.f, 1023.f, 3.f } } }; + static const XMVECTORF32 Scale = {{{510.0f, 510.0f, 510.0f, 3.0f}}}; + static const XMVECTORF32 Bias = {{{384.0f, 384.0f, 384.0f, 0.0f}}}; + static const XMVECTORF32 C = {{{1023.f, 1023.f, 1023.f, 3.f}}}; #if defined(_XM_NO_INTRINSICS_) @@ -3111,15 +2981,17 @@ inline void XM_CALLCONV XMStoreUDecN4_XR XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - (static_cast(tmp.w) << 30) - | ((static_cast(tmp.z) & 0x3FF) << 20) - | ((static_cast(tmp.y) & 0x3FF) << 10) - | ((static_cast(tmp.x) & 0x3FF))); + pDestination->v = + static_cast((static_cast(tmp.w) << 30) | + ((static_cast(tmp.z) & 0x3FF) << 20) | + ((static_cast(tmp.y) & 0x3FF) << 10) | + ((static_cast(tmp.x) & 0x3FF))); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Shift = { { { 1.0f, 1024.0f * 0.5f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f * 0.5f } } }; - static const XMVECTORU32 MaskUDecN4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 Shift = {{{1.0f, 1024.0f * 0.5f, 1024.0f * 1024.0f, + 1024.0f * 1024.0f * 1024.0f * 0.5f}}}; + static const XMVECTORU32 MaskUDecN4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; float32x4_t vResult = vmlaq_f32(Bias, V, Scale); vResult = vmaxq_f32(vResult, vdupq_n_f32(0.f)); vResult = vminq_f32(vResult, C); @@ -3136,8 +3008,10 @@ inline void XM_CALLCONV XMStoreUDecN4_XR vTemp = vorr_u32(vTemp, vTemp2); vst1_lane_u32(&pDestination->v, vTemp, 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 Shift = { { { 1.0f, 1024.0f * 0.5f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f * 0.5f } } }; - static const XMVECTORU32 MaskUDecN4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 Shift = {{{1.0f, 1024.0f * 0.5f, 1024.0f * 1024.0f, + 1024.0f * 1024.0f * 1024.0f * 0.5f}}}; + static const XMVECTORU32 MaskUDecN4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; // Scale & bias XMVECTOR vResult = XM_FMADD_PS(V, Scale, Bias); // Clamp to bounds @@ -3159,20 +3033,16 @@ inline void XM_CALLCONV XMStoreUDecN4_XR vResulti2 = _mm_add_epi32(vResulti2, vResulti2); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUDec4 -( - XMUDEC4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUDec4(XMUDEC4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 MaxUDec4 = { { { 1023.0f, 1023.0f, 1023.0f, 3.0f } } }; + static const XMVECTORF32 MaxUDec4 = {{{1023.0f, 1023.0f, 1023.0f, 3.0f}}}; #if defined(_XM_NO_INTRINSICS_) @@ -3181,15 +3051,18 @@ inline void XM_CALLCONV XMStoreUDec4 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - (static_cast(tmp.w) << 30) - | ((static_cast(tmp.z) & 0x3FF) << 20) - | ((static_cast(tmp.y) & 0x3FF) << 10) - | ((static_cast(tmp.x) & 0x3FF))); + pDestination->v = + static_cast((static_cast(tmp.w) << 30) | + ((static_cast(tmp.z) & 0x3FF) << 20) | + ((static_cast(tmp.y) & 0x3FF) << 10) | + ((static_cast(tmp.x) & 0x3FF))); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 ScaleUDec4 = { { { 1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f / 2.0f } } }; - static const XMVECTORI32 MaskUDec4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 ScaleUDec4 = { + {{1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, + 1024.0f * 1024.0f * 1024.0f / 2.0f}}}; + static const XMVECTORI32 MaskUDec4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; float32x4_t vResult = vmaxq_f32(V, vdupq_n_f32(0.f)); vResult = vminq_f32(vResult, MaxUDec4); vResult = vmulq_f32(vResult, ScaleUDec4); @@ -3205,8 +3078,11 @@ inline void XM_CALLCONV XMStoreUDec4 vTemp = vorr_u32(vTemp, vTemp2); vst1_lane_u32(&pDestination->v, vTemp, 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleUDec4 = { { { 1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f / 2.0f } } }; - static const XMVECTORI32 MaskUDec4 = { { { 0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1) } } }; + static const XMVECTORF32 ScaleUDec4 = { + {{1.0f, 1024.0f / 2.0f, 1024.0f * 1024.0f, + 1024.0f * 1024.0f * 1024.0f / 2.0f}}}; + static const XMVECTORI32 MaskUDec4 = { + {{0x3FF, 0x3FF << (10 - 1), 0x3FF << 20, 0x3 << (30 - 1)}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMZero); vResult = _mm_min_ps(vResult, MaxUDec4); @@ -3226,7 +3102,8 @@ inline void XM_CALLCONV XMStoreUDec4 vResulti2 = _mm_add_epi32(vResulti2, vResulti2); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } @@ -3247,17 +3124,12 @@ inline void XM_CALLCONV XMStoreUDec4 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreDecN4 -( - XMDECN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreDecN4(XMDECN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 511.0f, 511.0f, 511.0f, 1.0f } } }; + static const XMVECTORF32 Scale = {{{511.0f, 511.0f, 511.0f, 1.0f}}}; XMVECTOR N = XMVectorClamp(V, g_XMNegativeOne.v, g_XMOne.v); N = XMVectorMultiply(N, Scale.v); @@ -3265,14 +3137,16 @@ inline void XM_CALLCONV XMStoreDecN4 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - (static_cast(tmp.w) << 30) - | ((static_cast(tmp.z) & 0x3FF) << 20) - | ((static_cast(tmp.y) & 0x3FF) << 10) - | ((static_cast(tmp.x) & 0x3FF))); + pDestination->v = + static_cast((static_cast(tmp.w) << 30) | + ((static_cast(tmp.z) & 0x3FF) << 20) | + ((static_cast(tmp.y) & 0x3FF) << 10) | + ((static_cast(tmp.x) & 0x3FF))); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 ScaleDecN4 = { { { 511.0f, 511.0f * 1024.0f, 511.0f * 1024.0f * 1024.0f, 1.0f * 1024.0f * 1024.0f * 1024.0f } } }; + static const XMVECTORF32 ScaleDecN4 = { + {{511.0f, 511.0f * 1024.0f, 511.0f * 1024.0f * 1024.0f, + 1.0f * 1024.0f * 1024.0f * 1024.0f}}}; float32x4_t vResult = vmaxq_f32(V, vdupq_n_f32(-1.f)); vResult = vminq_f32(vResult, vdupq_n_f32(1.f)); vResult = vmulq_f32(vResult, ScaleDecN4); @@ -3285,7 +3159,9 @@ inline void XM_CALLCONV XMStoreDecN4 vTemp = vpadd_u32(vTemp, vTemp); vst1_lane_u32(&pDestination->v, vTemp, 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleDecN4 = { { { 511.0f, 511.0f * 1024.0f, 511.0f * 1024.0f * 1024.0f, 1.0f * 1024.0f * 1024.0f * 1024.0f } } }; + static const XMVECTORF32 ScaleDecN4 = { + {{511.0f, 511.0f * 1024.0f, 511.0f * 1024.0f * 1024.0f, + 1.0f * 1024.0f * 1024.0f * 1024.0f}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMNegativeOne); vResult = _mm_min_ps(vResult, g_XMOne); @@ -3303,21 +3179,17 @@ inline void XM_CALLCONV XMStoreDecN4 vResulti2 = _mm_shuffle_epi32(vResulti, _MM_SHUFFLE(1, 1, 1, 1)); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreDec4 -( - XMDEC4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreDec4(XMDEC4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 MinDec4 = { { { -511.0f, -511.0f, -511.0f, -1.0f } } }; - static const XMVECTORF32 MaxDec4 = { { { 511.0f, 511.0f, 511.0f, 1.0f } } }; + static const XMVECTORF32 MinDec4 = {{{-511.0f, -511.0f, -511.0f, -1.0f}}}; + static const XMVECTORF32 MaxDec4 = {{{511.0f, 511.0f, 511.0f, 1.0f}}}; #if defined(_XM_NO_INTRINSICS_) @@ -3326,14 +3198,15 @@ inline void XM_CALLCONV XMStoreDec4 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - (static_cast(tmp.w) << 30) - | ((static_cast(tmp.z) & 0x3FF) << 20) - | ((static_cast(tmp.y) & 0x3FF) << 10) - | ((static_cast(tmp.x) & 0x3FF))); + pDestination->v = + static_cast((static_cast(tmp.w) << 30) | + ((static_cast(tmp.z) & 0x3FF) << 20) | + ((static_cast(tmp.y) & 0x3FF) << 10) | + ((static_cast(tmp.x) & 0x3FF))); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 ScaleDec4 = { { { 1.0f, 1024.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f } } }; + static const XMVECTORF32 ScaleDec4 = { + {{1.0f, 1024.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f}}}; float32x4_t vResult = vmaxq_f32(V, MinDec4); vResult = vminq_f32(vResult, MaxDec4); vResult = vmulq_f32(vResult, ScaleDec4); @@ -3346,7 +3219,8 @@ inline void XM_CALLCONV XMStoreDec4 vTemp = vpadd_u32(vTemp, vTemp); vst1_lane_u32(&pDestination->v, vTemp, 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleDec4 = { { { 1.0f, 1024.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f } } }; + static const XMVECTORF32 ScaleDec4 = { + {{1.0f, 1024.0f, 1024.0f * 1024.0f, 1024.0f * 1024.0f * 1024.0f}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, MinDec4); vResult = _mm_min_ps(vResult, MaxDec4); @@ -3364,7 +3238,8 @@ inline void XM_CALLCONV XMStoreDec4 vResulti2 = _mm_shuffle_epi32(vResulti, _MM_SHUFFLE(1, 1, 1, 1)); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } @@ -3379,13 +3254,8 @@ inline void XM_CALLCONV XMStoreDec4 #endif //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUByteN4 -( - XMUBYTEN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUByteN4(XMUBYTEN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -3410,8 +3280,11 @@ inline void XM_CALLCONV XMStoreUByteN4 uint8x8_t vInt8 = vqmovn_u16(vcombine_u16(vInt16, vInt16)); vst1_lane_u32(&pDestination->v, vreinterpret_u32_u8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleUByteN4 = { { { 255.0f, 255.0f * 256.0f * 0.5f, 255.0f * 256.0f * 256.0f, 255.0f * 256.0f * 256.0f * 256.0f * 0.5f } } }; - static const XMVECTORI32 MaskUByteN4 = { { { 0xFF, 0xFF << (8 - 1), 0xFF << 16, 0xFF << (24 - 1) } } }; + static const XMVECTORF32 ScaleUByteN4 = { + {{255.0f, 255.0f * 256.0f * 0.5f, 255.0f * 256.0f * 256.0f, + 255.0f * 256.0f * 256.0f * 256.0f * 0.5f}}}; + static const XMVECTORI32 MaskUByteN4 = { + {{0xFF, 0xFF << (8 - 1), 0xFF << 16, 0xFF << (24 - 1)}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMZero); vResult = _mm_min_ps(vResult, g_XMOne); @@ -3431,18 +3304,14 @@ inline void XM_CALLCONV XMStoreUByteN4 vResulti2 = _mm_add_epi32(vResulti2, vResulti2); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUByte4 -( - XMUBYTE4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUByte4(XMUBYTE4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -3465,8 +3334,11 @@ inline void XM_CALLCONV XMStoreUByte4 uint8x8_t vInt8 = vqmovn_u16(vcombine_u16(vInt16, vInt16)); vst1_lane_u32(&pDestination->v, vreinterpret_u32_u8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleUByte4 = { { { 1.0f, 256.0f * 0.5f, 256.0f * 256.0f, 256.0f * 256.0f * 256.0f * 0.5f } } }; - static const XMVECTORI32 MaskUByte4 = { { { 0xFF, 0xFF << (8 - 1), 0xFF << 16, 0xFF << (24 - 1) } } }; + static const XMVECTORF32 ScaleUByte4 = { + {{1.0f, 256.0f * 0.5f, 256.0f * 256.0f, + 256.0f * 256.0f * 256.0f * 0.5f}}}; + static const XMVECTORI32 MaskUByte4 = { + {{0xFF, 0xFF << (8 - 1), 0xFF << 16, 0xFF << (24 - 1)}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMZero); vResult = _mm_min_ps(vResult, g_UByteMax); @@ -3486,18 +3358,14 @@ inline void XM_CALLCONV XMStoreUByte4 vResulti2 = _mm_add_epi32(vResulti2, vResulti2); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreByteN4 -( - XMBYTEN4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreByteN4(XMBYTEN4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -3522,8 +3390,11 @@ inline void XM_CALLCONV XMStoreByteN4 int8x8_t vInt8 = vqmovn_s16(vcombine_s16(vInt16, vInt16)); vst1_lane_u32(&pDestination->v, vreinterpret_u32_s8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleByteN4 = { { { 127.0f, 127.0f * 256.0f, 127.0f * 256.0f * 256.0f, 127.0f * 256.0f * 256.0f * 256.0f } } }; - static const XMVECTORI32 MaskByteN4 = { { { 0xFF, 0xFF << 8, 0xFF << 16, static_cast(0xFF000000) } } }; + static const XMVECTORF32 ScaleByteN4 = { + {{127.0f, 127.0f * 256.0f, 127.0f * 256.0f * 256.0f, + 127.0f * 256.0f * 256.0f * 256.0f}}}; + static const XMVECTORI32 MaskByteN4 = { + {{0xFF, 0xFF << 8, 0xFF << 16, static_cast(0xFF000000)}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_XMNegativeOne); vResult = _mm_min_ps(vResult, g_XMOne); @@ -3541,18 +3412,14 @@ inline void XM_CALLCONV XMStoreByteN4 vResulti2 = _mm_shuffle_epi32(vResulti, _MM_SHUFFLE(1, 1, 1, 1)); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreByte4 -( - XMBYTE4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreByte4(XMBYTE4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) @@ -3575,8 +3442,10 @@ inline void XM_CALLCONV XMStoreByte4 int8x8_t vInt8 = vqmovn_s16(vcombine_s16(vInt16, vInt16)); vst1_lane_u32(&pDestination->v, vreinterpret_u32_s8(vInt8), 0); #elif defined(_XM_SSE_INTRINSICS_) - static const XMVECTORF32 ScaleByte4 = { { { 1.0f, 256.0f, 256.0f * 256.0f, 256.0f * 256.0f * 256.0f } } }; - static const XMVECTORI32 MaskByte4 = { { { 0xFF, 0xFF << 8, 0xFF << 16, static_cast(0xFF000000) } } }; + static const XMVECTORF32 ScaleByte4 = { + {{1.0f, 256.0f, 256.0f * 256.0f, 256.0f * 256.0f * 256.0f}}}; + static const XMVECTORI32 MaskByte4 = { + {{0xFF, 0xFF << 8, 0xFF << 16, static_cast(0xFF000000)}}}; // Clamp to bounds XMVECTOR vResult = _mm_max_ps(V, g_ByteMin); vResult = _mm_min_ps(vResult, g_ByteMax); @@ -3594,20 +3463,16 @@ inline void XM_CALLCONV XMStoreByte4 vResulti2 = _mm_shuffle_epi32(vResulti, _MM_SHUFFLE(1, 1, 1, 1)); // i = x|y|z|w vResulti = _mm_or_si128(vResulti, vResulti2); - _mm_store_ss(reinterpret_cast(&pDestination->v), _mm_castsi128_ps(vResulti)); + _mm_store_ss(reinterpret_cast(&pDestination->v), + _mm_castsi128_ps(vResulti)); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreUNibble4 -( - XMUNIBBLE4* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreUNibble4(XMUNIBBLE4* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 Max = { { { 15.0f, 15.0f, 15.0f, 15.0f } } }; + static const XMVECTORF32 Max = {{{15.0f, 15.0f, 15.0f, 15.0f}}}; #if defined(_XM_NO_INTRINSICS_) XMVECTOR N = XMVectorClamp(V, XMVectorZero(), Max.v); @@ -3616,14 +3481,15 @@ inline void XM_CALLCONV XMStoreUNibble4 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - ((static_cast(tmp.w) & 0xF) << 12) - | ((static_cast(tmp.z) & 0xF) << 8) - | ((static_cast(tmp.y) & 0xF) << 4) - | (static_cast(tmp.x) & 0xF)); + pDestination->v = + static_cast(((static_cast(tmp.w) & 0xF) << 12) | + ((static_cast(tmp.z) & 0xF) << 8) | + ((static_cast(tmp.y) & 0xF) << 4) | + (static_cast(tmp.x) & 0xF)); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.0f, 16.f, 16.f * 16.f, 16.f * 16.f * 16.f } } }; - static const XMVECTORU32 Mask = { { { 0xF, 0xF << 4, 0xF << 8, 0xF << 12 } } }; + static const XMVECTORF32 Scale = { + {{1.0f, 16.f, 16.f * 16.f, 16.f * 16.f * 16.f}}}; + static const XMVECTORU32 Mask = {{{0xF, 0xF << 4, 0xF << 8, 0xF << 12}}}; float32x4_t vResult = vmaxq_f32(V, vdupq_n_f32(0)); vResult = vminq_f32(vResult, Max); vResult = vmulq_f32(vResult, Scale); @@ -3641,29 +3507,24 @@ inline void XM_CALLCONV XMStoreUNibble4 vResult = _mm_min_ps(vResult, Max); // Convert to int with rounding __m128i vInt = _mm_cvtps_epi32(vResult); - // No SSE operations will write to 16-bit values, so we have to extract them manually + // No SSE operations will write to 16-bit values, so we have to extract them + // manually auto x = static_cast(_mm_extract_epi16(vInt, 0)); auto y = static_cast(_mm_extract_epi16(vInt, 2)); auto z = static_cast(_mm_extract_epi16(vInt, 4)); auto w = static_cast(_mm_extract_epi16(vInt, 6)); pDestination->v = static_cast( - ((static_cast(w) & 0xF) << 12) - | ((static_cast(z) & 0xF) << 8) - | ((static_cast(y) & 0xF) << 4) - | ((static_cast(x) & 0xF))); + ((static_cast(w) & 0xF) << 12) | + ((static_cast(z) & 0xF) << 8) | + ((static_cast(y) & 0xF) << 4) | ((static_cast(x) & 0xF))); #endif } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline void XM_CALLCONV XMStoreU555 -( - XMU555* pDestination, - FXMVECTOR V -) noexcept -{ +_Use_decl_annotations_ inline void XM_CALLCONV +XMStoreU555(XMU555* pDestination, FXMVECTOR V) noexcept { assert(pDestination); - static const XMVECTORF32 Max = { { { 31.0f, 31.0f, 31.0f, 1.0f } } }; + static const XMVECTORF32 Max = {{{31.0f, 31.0f, 31.0f, 1.0f}}}; #if defined(_XM_NO_INTRINSICS_) XMVECTOR N = XMVectorClamp(V, XMVectorZero(), Max.v); @@ -3672,14 +3533,16 @@ inline void XM_CALLCONV XMStoreU555 XMFLOAT4A tmp; XMStoreFloat4A(&tmp, N); - pDestination->v = static_cast( - ((tmp.w > 0.f) ? 0x8000 : 0) - | ((static_cast(tmp.z) & 0x1F) << 10) - | ((static_cast(tmp.y) & 0x1F) << 5) - | (static_cast(tmp.x) & 0x1F)); + pDestination->v = + static_cast(((tmp.w > 0.f) ? 0x8000 : 0) | + ((static_cast(tmp.z) & 0x1F) << 10) | + ((static_cast(tmp.y) & 0x1F) << 5) | + (static_cast(tmp.x) & 0x1F)); #elif defined(_XM_ARM_NEON_INTRINSICS_) - static const XMVECTORF32 Scale = { { { 1.0f, 32.f / 2.f, 32.f * 32.f, 32.f * 32.f * 32.f / 2.f } } }; - static const XMVECTORU32 Mask = { { { 0x1F, 0x1F << (5 - 1), 0x1F << 10, 0x1 << (15 - 1) } } }; + static const XMVECTORF32 Scale = { + {{1.0f, 32.f / 2.f, 32.f * 32.f, 32.f * 32.f * 32.f / 2.f}}}; + static const XMVECTORU32 Mask = { + {{0x1F, 0x1F << (5 - 1), 0x1F << 10, 0x1 << (15 - 1)}}}; float32x4_t vResult = vmaxq_f32(V, vdupq_n_f32(0)); vResult = vminq_f32(vResult, Max); vResult = vmulq_f32(vResult, Scale); @@ -3700,20 +3563,19 @@ inline void XM_CALLCONV XMStoreU555 vResult = _mm_min_ps(vResult, Max); // Convert to int with rounding __m128i vInt = _mm_cvtps_epi32(vResult); - // No SSE operations will write to 16-bit values, so we have to extract them manually + // No SSE operations will write to 16-bit values, so we have to extract them + // manually auto x = static_cast(_mm_extract_epi16(vInt, 0)); auto y = static_cast(_mm_extract_epi16(vInt, 2)); auto z = static_cast(_mm_extract_epi16(vInt, 4)); auto w = static_cast(_mm_extract_epi16(vInt, 6)); pDestination->v = static_cast( - (static_cast(w) ? 0x8000 : 0) - | ((static_cast(z) & 0x1F) << 10) - | ((static_cast(y) & 0x1F) << 5) - | ((static_cast(x) & 0x1F))); + (static_cast(w) ? 0x8000 : 0) | + ((static_cast(z) & 0x1F) << 10) | + ((static_cast(y) & 0x1F) << 5) | ((static_cast(x) & 0x1F))); #endif } - /**************************************************************************** * * XMCOLOR operators @@ -3722,21 +3584,12 @@ inline void XM_CALLCONV XMStoreU555 //------------------------------------------------------------------------------ -inline XMCOLOR::XMCOLOR -( - float _r, - float _g, - float _b, - float _a -) noexcept -{ +inline XMCOLOR::XMCOLOR(float _r, float _g, float _b, float _a) noexcept { XMStoreColor(this, XMVectorSet(_r, _g, _b, _a)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMCOLOR::XMCOLOR(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMCOLOR::XMCOLOR(const float* pArray) noexcept { XMStoreColor(this, XMLoadFloat4(reinterpret_cast(pArray))); } @@ -3748,20 +3601,13 @@ inline XMCOLOR::XMCOLOR(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMHALF2::XMHALF2 -( - float _x, - float _y -) noexcept -{ +inline XMHALF2::XMHALF2(float _x, float _y) noexcept { x = XMConvertFloatToHalf(_x); y = XMConvertFloatToHalf(_y); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMHALF2::XMHALF2(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMHALF2::XMHALF2(const float* pArray) noexcept { assert(pArray != nullptr); x = XMConvertFloatToHalf(pArray[0]); y = XMConvertFloatToHalf(pArray[1]); @@ -3775,20 +3621,15 @@ inline XMHALF2::XMHALF2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMSHORTN2::XMSHORTN2 -( - float _x, - float _y -) noexcept -{ +inline XMSHORTN2::XMSHORTN2(float _x, float _y) noexcept { XMStoreShortN2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMSHORTN2::XMSHORTN2(const float* pArray) noexcept -{ - XMStoreShortN2(this, XMLoadFloat2(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMSHORTN2::XMSHORTN2( + const float* pArray) noexcept { + XMStoreShortN2(this, + XMLoadFloat2(reinterpret_cast(pArray))); } /**************************************************************************** @@ -3799,20 +3640,14 @@ inline XMSHORTN2::XMSHORTN2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMSHORT2::XMSHORT2 -( - float _x, - float _y -) noexcept -{ +inline XMSHORT2::XMSHORT2(float _x, float _y) noexcept { XMStoreShort2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMSHORT2::XMSHORT2(const float* pArray) noexcept -{ - XMStoreShort2(this, XMLoadFloat2(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMSHORT2::XMSHORT2(const float* pArray) noexcept { + XMStoreShort2(this, + XMLoadFloat2(reinterpret_cast(pArray))); } /**************************************************************************** @@ -3823,20 +3658,15 @@ inline XMSHORT2::XMSHORT2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUSHORTN2::XMUSHORTN2 -( - float _x, - float _y -) noexcept -{ +inline XMUSHORTN2::XMUSHORTN2(float _x, float _y) noexcept { XMStoreUShortN2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUSHORTN2::XMUSHORTN2(const float* pArray) noexcept -{ - XMStoreUShortN2(this, XMLoadFloat2(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUSHORTN2::XMUSHORTN2( + const float* pArray) noexcept { + XMStoreUShortN2(this, + XMLoadFloat2(reinterpret_cast(pArray))); } /**************************************************************************** @@ -3847,20 +3677,15 @@ inline XMUSHORTN2::XMUSHORTN2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUSHORT2::XMUSHORT2 -( - float _x, - float _y -) noexcept -{ +inline XMUSHORT2::XMUSHORT2(float _x, float _y) noexcept { XMStoreUShort2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUSHORT2::XMUSHORT2(const float* pArray) noexcept -{ - XMStoreUShort2(this, XMLoadFloat2(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUSHORT2::XMUSHORT2( + const float* pArray) noexcept { + XMStoreUShort2(this, + XMLoadFloat2(reinterpret_cast(pArray))); } /**************************************************************************** @@ -3871,20 +3696,14 @@ inline XMUSHORT2::XMUSHORT2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMBYTEN2::XMBYTEN2 -( - float _x, - float _y -) noexcept -{ +inline XMBYTEN2::XMBYTEN2(float _x, float _y) noexcept { XMStoreByteN2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMBYTEN2::XMBYTEN2(const float* pArray) noexcept -{ - XMStoreByteN2(this, XMLoadFloat2(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMBYTEN2::XMBYTEN2(const float* pArray) noexcept { + XMStoreByteN2(this, + XMLoadFloat2(reinterpret_cast(pArray))); } /**************************************************************************** @@ -3895,19 +3714,12 @@ inline XMBYTEN2::XMBYTEN2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMBYTE2::XMBYTE2 -( - float _x, - float _y -) noexcept -{ +inline XMBYTE2::XMBYTE2(float _x, float _y) noexcept { XMStoreByte2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMBYTE2::XMBYTE2(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMBYTE2::XMBYTE2(const float* pArray) noexcept { XMStoreByte2(this, XMLoadFloat2(reinterpret_cast(pArray))); } @@ -3919,20 +3731,15 @@ inline XMBYTE2::XMBYTE2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUBYTEN2::XMUBYTEN2 -( - float _x, - float _y -) noexcept -{ +inline XMUBYTEN2::XMUBYTEN2(float _x, float _y) noexcept { XMStoreUByteN2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUBYTEN2::XMUBYTEN2(const float* pArray) noexcept -{ - XMStoreUByteN2(this, XMLoadFloat2(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUBYTEN2::XMUBYTEN2( + const float* pArray) noexcept { + XMStoreUByteN2(this, + XMLoadFloat2(reinterpret_cast(pArray))); } /**************************************************************************** @@ -3943,20 +3750,14 @@ inline XMUBYTEN2::XMUBYTEN2(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUBYTE2::XMUBYTE2 -( - float _x, - float _y -) noexcept -{ +inline XMUBYTE2::XMUBYTE2(float _x, float _y) noexcept { XMStoreUByte2(this, XMVectorSet(_x, _y, 0.0f, 0.0f)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUBYTE2::XMUBYTE2(const float* pArray) noexcept -{ - XMStoreUByte2(this, XMLoadFloat2(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUBYTE2::XMUBYTE2(const float* pArray) noexcept { + XMStoreUByte2(this, + XMLoadFloat2(reinterpret_cast(pArray))); } /**************************************************************************** @@ -3965,19 +3766,11 @@ inline XMUBYTE2::XMUBYTE2(const float* pArray) noexcept * ****************************************************************************/ -inline XMU565::XMU565 -( - float _x, - float _y, - float _z -) noexcept -{ +inline XMU565::XMU565(float _x, float _y, float _z) noexcept { XMStoreU565(this, XMVectorSet(_x, _y, _z, 0.0f)); } -_Use_decl_annotations_ -inline XMU565::XMU565(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMU565::XMU565(const float* pArray) noexcept { XMStoreU565(this, XMLoadFloat3(reinterpret_cast(pArray))); } @@ -3987,20 +3780,14 @@ inline XMU565::XMU565(const float* pArray) noexcept * ****************************************************************************/ -inline XMFLOAT3PK::XMFLOAT3PK -( - float _x, - float _y, - float _z -) noexcept -{ +inline XMFLOAT3PK::XMFLOAT3PK(float _x, float _y, float _z) noexcept { XMStoreFloat3PK(this, XMVectorSet(_x, _y, _z, 0.0f)); } -_Use_decl_annotations_ -inline XMFLOAT3PK::XMFLOAT3PK(const float* pArray) noexcept -{ - XMStoreFloat3PK(this, XMLoadFloat3(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMFLOAT3PK::XMFLOAT3PK( + const float* pArray) noexcept { + XMStoreFloat3PK(this, + XMLoadFloat3(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4009,20 +3796,14 @@ inline XMFLOAT3PK::XMFLOAT3PK(const float* pArray) noexcept * ****************************************************************************/ -inline XMFLOAT3SE::XMFLOAT3SE -( - float _x, - float _y, - float _z -) noexcept -{ +inline XMFLOAT3SE::XMFLOAT3SE(float _x, float _y, float _z) noexcept { XMStoreFloat3SE(this, XMVectorSet(_x, _y, _z, 0.0f)); } -_Use_decl_annotations_ -inline XMFLOAT3SE::XMFLOAT3SE(const float* pArray) noexcept -{ - XMStoreFloat3SE(this, XMLoadFloat3(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMFLOAT3SE::XMFLOAT3SE( + const float* pArray) noexcept { + XMStoreFloat3SE(this, + XMLoadFloat3(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4033,14 +3814,7 @@ inline XMFLOAT3SE::XMFLOAT3SE(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMHALF4::XMHALF4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMHALF4::XMHALF4(float _x, float _y, float _z, float _w) noexcept { x = XMConvertFloatToHalf(_x); y = XMConvertFloatToHalf(_y); z = XMConvertFloatToHalf(_z); @@ -4049,9 +3823,7 @@ inline XMHALF4::XMHALF4 //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMHALF4::XMHALF4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMHALF4::XMHALF4(const float* pArray) noexcept { XMConvertFloatToHalfStream(&x, sizeof(HALF), pArray, sizeof(float), 4); } @@ -4063,22 +3835,15 @@ inline XMHALF4::XMHALF4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMSHORTN4::XMSHORTN4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMSHORTN4::XMSHORTN4(float _x, float _y, float _z, float _w) noexcept { XMStoreShortN4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMSHORTN4::XMSHORTN4(const float* pArray) noexcept -{ - XMStoreShortN4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMSHORTN4::XMSHORTN4( + const float* pArray) noexcept { + XMStoreShortN4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4089,22 +3854,14 @@ inline XMSHORTN4::XMSHORTN4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMSHORT4::XMSHORT4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMSHORT4::XMSHORT4(float _x, float _y, float _z, float _w) noexcept { XMStoreShort4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMSHORT4::XMSHORT4(const float* pArray) noexcept -{ - XMStoreShort4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMSHORT4::XMSHORT4(const float* pArray) noexcept { + XMStoreShort4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4115,22 +3872,15 @@ inline XMSHORT4::XMSHORT4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUSHORTN4::XMUSHORTN4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMUSHORTN4::XMUSHORTN4(float _x, float _y, float _z, float _w) noexcept { XMStoreUShortN4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUSHORTN4::XMUSHORTN4(const float* pArray) noexcept -{ - XMStoreUShortN4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUSHORTN4::XMUSHORTN4( + const float* pArray) noexcept { + XMStoreUShortN4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4141,22 +3891,15 @@ inline XMUSHORTN4::XMUSHORTN4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUSHORT4::XMUSHORT4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMUSHORT4::XMUSHORT4(float _x, float _y, float _z, float _w) noexcept { XMStoreUShort4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUSHORT4::XMUSHORT4(const float* pArray) noexcept -{ - XMStoreUShort4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUSHORT4::XMUSHORT4( + const float* pArray) noexcept { + XMStoreUShort4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4167,22 +3910,14 @@ inline XMUSHORT4::XMUSHORT4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMXDECN4::XMXDECN4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMXDECN4::XMXDECN4(float _x, float _y, float _z, float _w) noexcept { XMStoreXDecN4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMXDECN4::XMXDECN4(const float* pArray) noexcept -{ - XMStoreXDecN4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMXDECN4::XMXDECN4(const float* pArray) noexcept { + XMStoreXDecN4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4208,21 +3943,12 @@ inline XMXDECN4::XMXDECN4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMXDEC4::XMXDEC4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMXDEC4::XMXDEC4(float _x, float _y, float _z, float _w) noexcept { XMStoreXDec4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMXDEC4::XMXDEC4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMXDEC4::XMXDEC4(const float* pArray) noexcept { XMStoreXDec4(this, XMLoadFloat4(reinterpret_cast(pArray))); } @@ -4234,21 +3960,12 @@ inline XMXDEC4::XMXDEC4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMDECN4::XMDECN4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMDECN4::XMDECN4(float _x, float _y, float _z, float _w) noexcept { XMStoreDecN4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMDECN4::XMDECN4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMDECN4::XMDECN4(const float* pArray) noexcept { XMStoreDecN4(this, XMLoadFloat4(reinterpret_cast(pArray))); } @@ -4260,21 +3977,12 @@ inline XMDECN4::XMDECN4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMDEC4::XMDEC4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMDEC4::XMDEC4(float _x, float _y, float _z, float _w) noexcept { XMStoreDec4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMDEC4::XMDEC4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMDEC4::XMDEC4(const float* pArray) noexcept { XMStoreDec4(this, XMLoadFloat4(reinterpret_cast(pArray))); } @@ -4296,22 +4004,14 @@ inline XMDEC4::XMDEC4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUDECN4::XMUDECN4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMUDECN4::XMUDECN4(float _x, float _y, float _z, float _w) noexcept { XMStoreUDecN4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUDECN4::XMUDECN4(const float* pArray) noexcept -{ - XMStoreUDecN4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUDECN4::XMUDECN4(const float* pArray) noexcept { + XMStoreUDecN4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4322,21 +4022,12 @@ inline XMUDECN4::XMUDECN4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUDEC4::XMUDEC4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMUDEC4::XMUDEC4(float _x, float _y, float _z, float _w) noexcept { XMStoreUDec4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUDEC4::XMUDEC4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMUDEC4::XMUDEC4(const float* pArray) noexcept { XMStoreUDec4(this, XMLoadFloat4(reinterpret_cast(pArray))); } @@ -4348,22 +4039,14 @@ inline XMUDEC4::XMUDEC4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMBYTEN4::XMBYTEN4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMBYTEN4::XMBYTEN4(float _x, float _y, float _z, float _w) noexcept { XMStoreByteN4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMBYTEN4::XMBYTEN4(const float* pArray) noexcept -{ - XMStoreByteN4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMBYTEN4::XMBYTEN4(const float* pArray) noexcept { + XMStoreByteN4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4374,21 +4057,12 @@ inline XMBYTEN4::XMBYTEN4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMBYTE4::XMBYTE4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMBYTE4::XMBYTE4(float _x, float _y, float _z, float _w) noexcept { XMStoreByte4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMBYTE4::XMBYTE4(const float* pArray) noexcept -{ +_Use_decl_annotations_ inline XMBYTE4::XMBYTE4(const float* pArray) noexcept { XMStoreByte4(this, XMLoadFloat4(reinterpret_cast(pArray))); } @@ -4400,22 +4074,15 @@ inline XMBYTE4::XMBYTE4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUBYTEN4::XMUBYTEN4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMUBYTEN4::XMUBYTEN4(float _x, float _y, float _z, float _w) noexcept { XMStoreUByteN4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUBYTEN4::XMUBYTEN4(const float* pArray) noexcept -{ - XMStoreUByteN4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUBYTEN4::XMUBYTEN4( + const float* pArray) noexcept { + XMStoreUByteN4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4426,22 +4093,14 @@ inline XMUBYTEN4::XMUBYTEN4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUBYTE4::XMUBYTE4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMUBYTE4::XMUBYTE4(float _x, float _y, float _z, float _w) noexcept { XMStoreUByte4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUBYTE4::XMUBYTE4(const float* pArray) noexcept -{ - XMStoreUByte4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUBYTE4::XMUBYTE4(const float* pArray) noexcept { + XMStoreUByte4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4452,22 +4111,15 @@ inline XMUBYTE4::XMUBYTE4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMUNIBBLE4::XMUNIBBLE4 -( - float _x, - float _y, - float _z, - float _w -) noexcept -{ +inline XMUNIBBLE4::XMUNIBBLE4(float _x, float _y, float _z, float _w) noexcept { XMStoreUNibble4(this, XMVectorSet(_x, _y, _z, _w)); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMUNIBBLE4::XMUNIBBLE4(const float* pArray) noexcept -{ - XMStoreUNibble4(this, XMLoadFloat4(reinterpret_cast(pArray))); +_Use_decl_annotations_ inline XMUNIBBLE4::XMUNIBBLE4( + const float* pArray) noexcept { + XMStoreUNibble4(this, + XMLoadFloat4(reinterpret_cast(pArray))); } /**************************************************************************** @@ -4478,26 +4130,13 @@ inline XMUNIBBLE4::XMUNIBBLE4(const float* pArray) noexcept //------------------------------------------------------------------------------ -inline XMU555::XMU555 -( - float _x, - float _y, - float _z, - bool _w -) noexcept -{ +inline XMU555::XMU555(float _x, float _y, float _z, bool _w) noexcept { XMStoreU555(this, XMVectorSet(_x, _y, _z, ((_w) ? 1.0f : 0.0f))); } //------------------------------------------------------------------------------ -_Use_decl_annotations_ -inline XMU555::XMU555 -( - const float* pArray, - bool _w -) noexcept -{ +_Use_decl_annotations_ inline XMU555::XMU555(const float* pArray, + bool _w) noexcept { XMVECTOR V = XMLoadFloat3(reinterpret_cast(pArray)); XMStoreU555(this, XMVectorSetW(V, ((_w) ? 1.0f : 0.0f))); } - diff --git a/targets/Minecraft.Client/Linux/Stubs/winapi_stubs.h b/targets/Minecraft.Client/Linux/Stubs/winapi_stubs.h index ccdc08439..94bffbd05 100644 --- a/targets/Minecraft.Client/Linux/Stubs/winapi_stubs.h +++ b/targets/Minecraft.Client/Linux/Stubs/winapi_stubs.h @@ -4,6 +4,7 @@ #pragma once #include +#include #include #include #include @@ -13,10 +14,9 @@ #include #include #include -#include #include #include -#include +#include #define __cdecl #define _vsnprintf_s vsnprintf; diff --git a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d10_shaders.inl b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d10_shaders.inl index d4d2bb229..722b96972 100644 --- a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d10_shaders.inl +++ b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d10_shaders.inl @@ -1,3427 +1,4689 @@ // This file was automatically generated by shadergen. Do not edit by hand! static DWORD pshader_basic_0[239] = { - 0x43425844, 0x424a7ef2, 0x6c708f66, 0xff55849a, 0xbcc512aa, 0x00000001, 0x000003bc, 0x00000005, - 0x00000034, 0x000001a8, 0x00000200, 0x00000234, 0x00000340, 0x46454452, 0x0000016c, 0x00000001, - 0x0000008c, 0x00000003, 0x0000001c, 0xffff0400, 0x00008100, 0x00000139, 0x0000007c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x00000083, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x00000088, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, - 0x00317865, 0x00635350, 0x00000088, 0x00000004, 0x000000a4, 0x00000040, 0x00000000, 0x00000000, - 0x00000104, 0x00000000, 0x00000010, 0x00000002, 0x00000110, 0x00000000, 0x00000120, 0x00000010, - 0x00000010, 0x00000000, 0x00000110, 0x00000000, 0x0000012a, 0x00000020, 0x00000010, 0x00000000, - 0x00000110, 0x00000000, 0x00000130, 0x00000030, 0x00000010, 0x00000000, 0x00000110, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, - 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, 0x39322e39, 0x3235392e, - 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, - 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, - 0x00000001, 0x00000c0f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, - 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, - 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000104, 0x00000040, - 0x00000041, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300005a, 0x00106000, 0x00000007, - 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010c2, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0700000e, 0x00100012, 0x00000000, 0x0010102a, - 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000000, 0x0010103a, 0x00000001, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000007, 0x00106000, - 0x00000007, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, - 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, - 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, - 0x54415453, 0x00000074, 0x00000007, 0x00000002, 0x00000000, 0x00000002, 0x00000003, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x424a7ef2, 0x6c708f66, 0xff55849a, 0xbcc512aa, 0x00000001, + 0x000003bc, 0x00000005, 0x00000034, 0x000001a8, 0x00000200, 0x00000234, + 0x00000340, 0x46454452, 0x0000016c, 0x00000001, 0x0000008c, 0x00000003, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000139, 0x0000007c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, + 0x00000083, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000007, + 0x00000001, 0x0000000d, 0x00000088, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, + 0x00317865, 0x00635350, 0x00000088, 0x00000004, 0x000000a4, 0x00000040, + 0x00000000, 0x00000000, 0x00000104, 0x00000000, 0x00000010, 0x00000002, + 0x00000110, 0x00000000, 0x00000120, 0x00000010, 0x00000010, 0x00000000, + 0x00000110, 0x00000000, 0x0000012a, 0x00000020, 0x00000010, 0x00000000, + 0x00000110, 0x00000000, 0x00000130, 0x00000030, 0x00000010, 0x00000000, + 0x00000110, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, + 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, + 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x00000c0f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000104, 0x00000040, + 0x00000041, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x0300005a, + 0x00106000, 0x00000007, 0x04001858, 0x00107000, 0x00000007, 0x00005555, + 0x03001062, 0x001010c2, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, + 0x02000068, 0x00000002, 0x0700000e, 0x00100012, 0x00000000, 0x0010102a, + 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000000, + 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, + 0x00000000, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x09000038, + 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, + 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, + 0x00000000, 0x00000000, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, + 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x00000007, 0x00000002, 0x00000000, 0x00000002, 0x00000003, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_1[261] = { - 0x43425844, 0x90372132, 0x718f790d, 0x41ee8636, 0x62f4522d, 0x00000001, 0x00000414, 0x00000005, - 0x00000034, 0x000001a8, 0x00000200, 0x00000234, 0x00000398, 0x46454452, 0x0000016c, 0x00000001, - 0x0000008c, 0x00000003, 0x0000001c, 0xffff0400, 0x00008100, 0x00000139, 0x0000007c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x00000083, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x00000088, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, - 0x00317865, 0x00635350, 0x00000088, 0x00000004, 0x000000a4, 0x00000040, 0x00000000, 0x00000000, - 0x00000104, 0x00000000, 0x00000010, 0x00000002, 0x00000110, 0x00000000, 0x00000120, 0x00000010, - 0x00000010, 0x00000002, 0x00000110, 0x00000000, 0x0000012a, 0x00000020, 0x00000010, 0x00000000, - 0x00000110, 0x00000000, 0x00000130, 0x00000030, 0x00000010, 0x00000000, 0x00000110, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, - 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, 0x39322e39, 0x3235392e, - 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, - 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, - 0x00000001, 0x00000c0f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, - 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, - 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000015c, 0x00000040, - 0x00000057, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x0300005a, 0x00106000, 0x00000007, - 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010c2, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0700000e, 0x00100012, 0x00000000, 0x0010102a, - 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000000, 0x0010103a, 0x00000001, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000007, 0x00106000, - 0x00000007, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, - 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, - 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0a000032, - 0x00100072, 0x00000000, 0x00208246, 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, - 0x00000000, 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, - 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, - 0x0000000a, 0x00000002, 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x90372132, 0x718f790d, 0x41ee8636, 0x62f4522d, 0x00000001, + 0x00000414, 0x00000005, 0x00000034, 0x000001a8, 0x00000200, 0x00000234, + 0x00000398, 0x46454452, 0x0000016c, 0x00000001, 0x0000008c, 0x00000003, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000139, 0x0000007c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, + 0x00000083, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000007, + 0x00000001, 0x0000000d, 0x00000088, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, + 0x00317865, 0x00635350, 0x00000088, 0x00000004, 0x000000a4, 0x00000040, + 0x00000000, 0x00000000, 0x00000104, 0x00000000, 0x00000010, 0x00000002, + 0x00000110, 0x00000000, 0x00000120, 0x00000010, 0x00000010, 0x00000002, + 0x00000110, 0x00000000, 0x0000012a, 0x00000020, 0x00000010, 0x00000000, + 0x00000110, 0x00000000, 0x00000130, 0x00000030, 0x00000010, 0x00000000, + 0x00000110, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, + 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, + 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x00000c0f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000015c, 0x00000040, + 0x00000057, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x0300005a, + 0x00106000, 0x00000007, 0x04001858, 0x00107000, 0x00000007, 0x00005555, + 0x03001062, 0x001010c2, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, + 0x02000068, 0x00000002, 0x0700000e, 0x00100012, 0x00000000, 0x0010102a, + 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000000, + 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, + 0x00000000, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x09000038, + 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, + 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, + 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000000, 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, + 0x00208246, 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000000, 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, + 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000a, 0x00000002, + 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_2[249] = { - 0x43425844, 0xf18db76f, 0x60007209, 0xb95de8b5, 0x04b32ff3, 0x00000001, 0x000003e4, 0x00000005, - 0x00000034, 0x000001a8, 0x00000200, 0x00000234, 0x00000368, 0x46454452, 0x0000016c, 0x00000001, - 0x0000008c, 0x00000003, 0x0000001c, 0xffff0400, 0x00008100, 0x00000139, 0x0000007c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x00000083, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x00000088, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, - 0x00317865, 0x00635350, 0x00000088, 0x00000004, 0x000000a4, 0x00000040, 0x00000000, 0x00000000, - 0x00000104, 0x00000000, 0x00000010, 0x00000002, 0x00000110, 0x00000000, 0x00000120, 0x00000010, - 0x00000010, 0x00000002, 0x00000110, 0x00000000, 0x0000012a, 0x00000020, 0x00000010, 0x00000000, - 0x00000110, 0x00000000, 0x00000130, 0x00000030, 0x00000010, 0x00000000, 0x00000110, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, - 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, 0x39322e39, 0x3235392e, - 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, - 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, - 0x00000001, 0x00000c0f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, - 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, - 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000012c, 0x00000040, - 0x0000004b, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x0300005a, 0x00106000, 0x00000007, - 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010c2, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0700000e, 0x00100012, 0x00000000, 0x0010102a, - 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000000, 0x0010103a, 0x00000001, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000007, 0x00106000, - 0x00000007, 0x0b000032, 0x00100012, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, 0x0010003a, - 0x00000000, 0x0020803a, 0x00000000, 0x00000001, 0x09000000, 0x001000e2, 0x00000000, 0x00208906, - 0x00000000, 0x00000000, 0x00208906, 0x00000000, 0x00000001, 0x07000038, 0x00102072, 0x00000000, - 0x00100006, 0x00000000, 0x00100796, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010000a, - 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000008, 0x00000001, 0x00000000, 0x00000002, - 0x00000003, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0xf18db76f, 0x60007209, 0xb95de8b5, 0x04b32ff3, 0x00000001, + 0x000003e4, 0x00000005, 0x00000034, 0x000001a8, 0x00000200, 0x00000234, + 0x00000368, 0x46454452, 0x0000016c, 0x00000001, 0x0000008c, 0x00000003, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000139, 0x0000007c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, + 0x00000083, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000007, + 0x00000001, 0x0000000d, 0x00000088, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, + 0x00317865, 0x00635350, 0x00000088, 0x00000004, 0x000000a4, 0x00000040, + 0x00000000, 0x00000000, 0x00000104, 0x00000000, 0x00000010, 0x00000002, + 0x00000110, 0x00000000, 0x00000120, 0x00000010, 0x00000010, 0x00000002, + 0x00000110, 0x00000000, 0x0000012a, 0x00000020, 0x00000010, 0x00000000, + 0x00000110, 0x00000000, 0x00000130, 0x00000030, 0x00000010, 0x00000000, + 0x00000110, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, + 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, + 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x00000c0f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000012c, 0x00000040, + 0x0000004b, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, 0x0300005a, + 0x00106000, 0x00000007, 0x04001858, 0x00107000, 0x00000007, 0x00005555, + 0x03001062, 0x001010c2, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, + 0x02000068, 0x00000001, 0x0700000e, 0x00100012, 0x00000000, 0x0010102a, + 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000000, + 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, + 0x00000000, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x0b000032, + 0x00100012, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, 0x0010003a, + 0x00000000, 0x0020803a, 0x00000000, 0x00000001, 0x09000000, 0x001000e2, + 0x00000000, 0x00208906, 0x00000000, 0x00000000, 0x00208906, 0x00000000, + 0x00000001, 0x07000038, 0x00102072, 0x00000000, 0x00100006, 0x00000000, + 0x00100796, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010000a, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000008, 0x00000001, + 0x00000000, 0x00000002, 0x00000003, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_3[298] = { - 0x43425844, 0x8666f1ab, 0x6789c83a, 0x84ddee9b, 0x99672a63, 0x00000001, 0x000004a8, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000042c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000001a4, 0x00000040, 0x00000069, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, 0x00000000, - 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, - 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, - 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, - 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, - 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000b, 0x00000002, 0x00000000, - 0x00000002, 0x00000006, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, + 0x43425844, 0x8666f1ab, 0x6789c83a, 0x84ddee9b, 0x99672a63, 0x00000001, + 0x000004a8, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000042c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001a4, + 0x00000040, 0x00000069, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000b, + 0x00000002, 0x00000000, 0x00000002, 0x00000006, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_4[320] = { - 0x43425844, 0xc29dc729, 0xa89895e0, 0x45d2e5a7, 0x85a6e3df, 0x00000001, 0x00000500, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000484, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000001fc, 0x00000040, 0x0000007f, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, 0x00000000, - 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, - 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, - 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, - 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, - 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, 0x00208246, 0x00000000, 0x00000001, - 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, - 0x00000000, 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, - 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000002, 0x00000000, 0x00000002, 0x00000007, - 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xc29dc729, 0xa89895e0, 0x45d2e5a7, 0x85a6e3df, 0x00000001, + 0x00000500, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000484, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001fc, + 0x00000040, 0x0000007f, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, 0x00208246, + 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, + 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000002, 0x00000000, + 0x00000002, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_basic_5[337] = { - 0x43425844, 0xf38a8aa1, 0x76e83e07, 0xe035a58b, 0x8d62e8be, 0x00000001, 0x00000544, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000004c8, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000240, 0x00000040, 0x00000090, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x0a00000e, 0x00100012, 0x00000001, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, - 0x0010003a, 0x00000000, 0x07000038, 0x00100072, 0x00000001, 0x00100246, 0x00000000, 0x00100006, - 0x00000001, 0x07000039, 0x00100082, 0x00000001, 0x0010003a, 0x00000000, 0x00004001, 0x00000000, - 0x09000037, 0x00100072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000001, 0x00100246, - 0x00000000, 0x08000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, - 0x00000000, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, - 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x00100082, - 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, 0x00000001, 0x08000000, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x07000038, 0x00102072, 0x00000000, - 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, - 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000010, 0x00000002, 0x00000000, 0x00000002, - 0x0000000a, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0xf38a8aa1, 0x76e83e07, 0xe035a58b, 0x8d62e8be, 0x00000001, + 0x00000544, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000004c8, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000240, + 0x00000040, 0x00000090, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x0a00000e, 0x00100012, 0x00000001, 0x00004002, 0x3f800000, 0x3f800000, + 0x3f800000, 0x3f800000, 0x0010003a, 0x00000000, 0x07000038, 0x00100072, + 0x00000001, 0x00100246, 0x00000000, 0x00100006, 0x00000001, 0x07000039, + 0x00100082, 0x00000001, 0x0010003a, 0x00000000, 0x00004001, 0x00000000, + 0x09000037, 0x00100072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, + 0x00000001, 0x00100246, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x0700000e, + 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, + 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, + 0x00106000, 0x00000007, 0x07000038, 0x00100082, 0x00000000, 0x0010003a, + 0x00000000, 0x0010003a, 0x00000001, 0x08000000, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x07000038, + 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, + 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, + 0x54415453, 0x00000074, 0x00000010, 0x00000002, 0x00000000, 0x00000002, + 0x0000000a, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_basic_6[298] = { - 0x43425844, 0xf4bd11d7, 0x2d1585d4, 0xa2bece1a, 0x528591b0, 0x00000001, 0x000004a8, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000042c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000001a4, 0x00000040, 0x00000069, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, 0x00000000, - 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, - 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, - 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, - 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, - 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000b, 0x00000002, 0x00000000, - 0x00000002, 0x00000006, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, + 0x43425844, 0xf4bd11d7, 0x2d1585d4, 0xa2bece1a, 0x528591b0, 0x00000001, + 0x000004a8, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000042c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001a4, + 0x00000040, 0x00000069, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000b, + 0x00000002, 0x00000000, 0x00000002, 0x00000006, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_7[320] = { - 0x43425844, 0xf035ea5f, 0x7228ce0c, 0x7acda6b1, 0x84f793b7, 0x00000001, 0x00000500, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000484, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000001fc, 0x00000040, 0x0000007f, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, 0x00000000, - 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, - 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, - 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, - 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, - 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, 0x00208246, 0x00000000, 0x00000001, - 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, - 0x00000000, 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, - 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000002, 0x00000000, 0x00000002, 0x00000007, - 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xf035ea5f, 0x7228ce0c, 0x7acda6b1, 0x84f793b7, 0x00000001, + 0x00000500, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000484, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001fc, + 0x00000040, 0x0000007f, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, 0x00208246, + 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, + 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000002, 0x00000000, + 0x00000002, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_basic_8[308] = { - 0x43425844, 0x8de8fdf8, 0x79362b3c, 0xd3e53d96, 0x9a753d05, 0x00000001, 0x000004d0, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000454, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000001cc, 0x00000040, 0x00000073, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, - 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, - 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x0a000032, 0x00100012, 0x00000000, - 0x0010000a, 0x00000000, 0x0010003a, 0x00000001, 0x0020803a, 0x00000000, 0x00000001, 0x09000000, - 0x001000e2, 0x00000000, 0x00208906, 0x00000000, 0x00000000, 0x00208906, 0x00000000, 0x00000001, - 0x07000038, 0x00102072, 0x00000000, 0x00100006, 0x00000000, 0x00100796, 0x00000000, 0x05000036, - 0x00102082, 0x00000000, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000c, - 0x00000002, 0x00000000, 0x00000002, 0x00000006, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x8de8fdf8, 0x79362b3c, 0xd3e53d96, 0x9a753d05, 0x00000001, + 0x000004d0, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000454, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001cc, + 0x00000040, 0x00000073, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020803a, + 0x00000000, 0x00000000, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, + 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, + 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x0a000032, + 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010003a, 0x00000001, + 0x0020803a, 0x00000000, 0x00000001, 0x09000000, 0x001000e2, 0x00000000, + 0x00208906, 0x00000000, 0x00000000, 0x00208906, 0x00000000, 0x00000001, + 0x07000038, 0x00102072, 0x00000000, 0x00100006, 0x00000000, 0x00100796, + 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010000a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x0000000c, 0x00000002, 0x00000000, + 0x00000002, 0x00000006, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_basic_9[310] = { - 0x43425844, 0xf476d124, 0xc7f0f06d, 0x96327107, 0x57955bd0, 0x00000001, 0x000004d8, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000045c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000001d4, 0x00000040, 0x00000075, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x0700000f, - 0x00100012, 0x00000000, 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x0500004b, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100006, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, - 0x00000000, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, - 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, - 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, - 0x00000001, 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, - 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x07000038, - 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, - 0x00000074, 0x0000000d, 0x00000002, 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xf476d124, 0xc7f0f06d, 0x96327107, 0x57955bd0, 0x00000001, + 0x000004d8, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000045c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001d4, + 0x00000040, 0x00000075, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x0700000f, 0x00100012, 0x00000000, + 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x0500004b, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000d, + 0x00000002, 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_10[332] = { - 0x43425844, 0x08449793, 0x6e27fb50, 0xe33f149a, 0x0f517c0c, 0x00000001, 0x00000530, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000004b4, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x0000022c, 0x00000040, 0x0000008b, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x0700000f, - 0x00100012, 0x00000000, 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x0500004b, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100006, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, - 0x00000000, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, - 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, - 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, - 0x00000001, 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, - 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x07000038, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, - 0x00000000, 0x00208246, 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, - 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x05000036, - 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000010, - 0x00000002, 0x00000000, 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x08449793, 0x6e27fb50, 0xe33f149a, 0x0f517c0c, 0x00000001, + 0x00000530, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000004b4, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000022c, + 0x00000040, 0x0000008b, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x0700000f, 0x00100012, 0x00000000, + 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x0500004b, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, + 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, 0x00208246, + 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, + 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x00000010, 0x00000002, 0x00000000, + 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_basic_11[349] = { - 0x43425844, 0x10a3f918, 0xf7959328, 0x525b10eb, 0x0f678477, 0x00000001, 0x00000574, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000004f8, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000270, 0x00000040, 0x0000009c, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x0700000f, - 0x00100012, 0x00000000, 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x0500004b, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100006, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a00000e, 0x00100012, 0x00000001, 0x00004002, - 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010003a, 0x00000000, 0x07000038, 0x00100072, - 0x00000001, 0x00100246, 0x00000000, 0x00100006, 0x00000001, 0x07000039, 0x00100082, 0x00000001, - 0x0010003a, 0x00000000, 0x00004001, 0x00000000, 0x09000037, 0x00100072, 0x00000000, 0x00100ff6, - 0x00000001, 0x00100246, 0x00000001, 0x00100246, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x0700000e, 0x00100012, 0x00000001, - 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, 0x0010103a, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, - 0x00106000, 0x00000007, 0x07000038, 0x00100082, 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, - 0x00000001, 0x08000000, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, - 0x00000001, 0x07000038, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, - 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, - 0x00000012, 0x00000002, 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x10a3f918, 0xf7959328, 0x525b10eb, 0x0f678477, 0x00000001, + 0x00000574, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000004f8, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000270, + 0x00000040, 0x0000009c, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x0700000f, 0x00100012, 0x00000000, + 0x00100046, 0x00000000, 0x00100046, 0x00000000, 0x0500004b, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x0a00000e, 0x00100012, 0x00000001, 0x00004002, 0x3f800000, 0x3f800000, + 0x3f800000, 0x3f800000, 0x0010003a, 0x00000000, 0x07000038, 0x00100072, + 0x00000001, 0x00100246, 0x00000000, 0x00100006, 0x00000001, 0x07000039, + 0x00100082, 0x00000001, 0x0010003a, 0x00000000, 0x00004001, 0x00000000, + 0x09000037, 0x00100072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, + 0x00000001, 0x00100246, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x0700000e, + 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, + 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, + 0x00106000, 0x00000007, 0x07000038, 0x00100082, 0x00000000, 0x0010003a, + 0x00000000, 0x0010003a, 0x00000001, 0x08000000, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x07000038, + 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, + 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, + 0x54415453, 0x00000074, 0x00000012, 0x00000002, 0x00000000, 0x00000002, + 0x0000000c, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_basic_12[365] = { - 0x43425844, 0x50cde65f, 0xba0450c9, 0xc66a01ba, 0xf364c937, 0x00000001, 0x000005b4, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000538, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000002b0, 0x00000040, 0x000000ac, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x0010101a, 0x00000001, 0x0a000032, - 0x00100012, 0x00000000, 0x0010100a, 0x00000001, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, - 0x00000002, 0x07000038, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0010001a, 0x00000000, - 0x09000032, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000000, 0x0010001a, - 0x00000000, 0x08000038, 0x00100042, 0x00000000, 0x0010000a, 0x00000000, 0x0020801a, 0x00000000, - 0x00000002, 0x07000038, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, 0x0010002a, 0x00000000, - 0x0a000032, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0020802a, 0x00000000, 0x00000002, - 0x0010002a, 0x00000000, 0x0500004b, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0b000032, - 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x0020801a, 0x00000000, 0x00000002, - 0x0010001a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00107e46, - 0x00000000, 0x00106000, 0x00000000, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, - 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, - 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, - 0x00000001, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, - 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x001020f2, - 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, - 0x00000013, 0x00000002, 0x00000000, 0x00000002, 0x0000000a, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x50cde65f, 0xba0450c9, 0xc66a01ba, 0xf364c937, 0x00000001, + 0x000005b4, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000538, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000002b0, + 0x00000040, 0x000000ac, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x0010101a, 0x00000001, 0x0a000032, 0x00100012, 0x00000000, + 0x0010100a, 0x00000001, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, + 0x00000002, 0x07000038, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, + 0x0010001a, 0x00000000, 0x09000032, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x0010000a, 0x00000000, 0x0010001a, 0x00000000, 0x08000038, + 0x00100042, 0x00000000, 0x0010000a, 0x00000000, 0x0020801a, 0x00000000, + 0x00000002, 0x07000038, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, + 0x0010002a, 0x00000000, 0x0a000032, 0x00100022, 0x00000000, 0x0010001a, + 0x00000000, 0x0020802a, 0x00000000, 0x00000002, 0x0010002a, 0x00000000, + 0x0500004b, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0b000032, + 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x0020801a, + 0x00000000, 0x00000002, 0x0010001a, 0x00000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100006, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, + 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, + 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, + 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, + 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, + 0x00106000, 0x00000007, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, + 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x00000013, 0x00000002, 0x00000000, 0x00000002, 0x0000000a, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_13[387] = { - 0x43425844, 0x80d41dbd, 0x58a18bbb, 0x9707037c, 0x21268324, 0x00000001, 0x0000060c, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000590, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000308, 0x00000040, 0x000000c2, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x0010101a, 0x00000001, 0x0a000032, - 0x00100012, 0x00000000, 0x0010100a, 0x00000001, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, - 0x00000002, 0x07000038, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0010001a, 0x00000000, - 0x09000032, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000000, 0x0010001a, - 0x00000000, 0x08000038, 0x00100042, 0x00000000, 0x0010000a, 0x00000000, 0x0020801a, 0x00000000, - 0x00000002, 0x07000038, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, 0x0010002a, 0x00000000, - 0x0a000032, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0020802a, 0x00000000, 0x00000002, - 0x0010002a, 0x00000000, 0x0500004b, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0b000032, - 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x0020801a, 0x00000000, 0x00000002, - 0x0010001a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00107e46, - 0x00000000, 0x00106000, 0x00000000, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, - 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, - 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, - 0x00000001, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, - 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, - 0x00208246, 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x07000033, - 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x05000036, 0x00102082, - 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000016, 0x00000002, - 0x00000000, 0x00000002, 0x0000000b, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x80d41dbd, 0x58a18bbb, 0x9707037c, 0x21268324, 0x00000001, + 0x0000060c, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000590, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000308, + 0x00000040, 0x000000c2, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x0010101a, 0x00000001, 0x0a000032, 0x00100012, 0x00000000, + 0x0010100a, 0x00000001, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, + 0x00000002, 0x07000038, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, + 0x0010001a, 0x00000000, 0x09000032, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x0010000a, 0x00000000, 0x0010001a, 0x00000000, 0x08000038, + 0x00100042, 0x00000000, 0x0010000a, 0x00000000, 0x0020801a, 0x00000000, + 0x00000002, 0x07000038, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, + 0x0010002a, 0x00000000, 0x0a000032, 0x00100022, 0x00000000, 0x0010001a, + 0x00000000, 0x0020802a, 0x00000000, 0x00000002, 0x0010002a, 0x00000000, + 0x0500004b, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0b000032, + 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x0020801a, + 0x00000000, 0x00000002, 0x0010001a, 0x00000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100006, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, + 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, + 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, + 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, + 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, + 0x00106000, 0x00000007, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000000, 0x00100e46, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, + 0x00208246, 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000000, 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, + 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000016, 0x00000002, + 0x00000000, 0x00000002, 0x0000000b, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_14[404] = { - 0x43425844, 0xb2a25f21, 0x5a5542ec, 0xc550e23f, 0x5a891887, 0x00000001, 0x00000650, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000005d4, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x0000034c, 0x00000040, 0x000000d3, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x0010101a, 0x00000001, 0x0a000032, - 0x00100012, 0x00000000, 0x0010100a, 0x00000001, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, - 0x00000002, 0x07000038, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0010001a, 0x00000000, - 0x09000032, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000000, 0x0010001a, - 0x00000000, 0x08000038, 0x00100042, 0x00000000, 0x0010000a, 0x00000000, 0x0020801a, 0x00000000, - 0x00000002, 0x07000038, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, 0x0010002a, 0x00000000, - 0x0a000032, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0020802a, 0x00000000, 0x00000002, - 0x0010002a, 0x00000000, 0x0500004b, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0b000032, - 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x0020801a, 0x00000000, 0x00000002, - 0x0010001a, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00107e46, - 0x00000000, 0x00106000, 0x00000000, 0x0a00000e, 0x00100012, 0x00000001, 0x00004002, 0x3f800000, - 0x3f800000, 0x3f800000, 0x3f800000, 0x0010003a, 0x00000000, 0x07000038, 0x00100072, 0x00000001, - 0x00100246, 0x00000000, 0x00100006, 0x00000001, 0x07000039, 0x00100082, 0x00000001, 0x0010003a, - 0x00000000, 0x00004001, 0x00000000, 0x09000037, 0x00100072, 0x00000000, 0x00100ff6, 0x00000001, - 0x00100246, 0x00000001, 0x00100246, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, - 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, - 0x00000007, 0x07000038, 0x00100082, 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, 0x00000001, - 0x08000000, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, - 0x07000038, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x05000036, - 0x00102082, 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000018, - 0x00000002, 0x00000000, 0x00000002, 0x0000000e, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xb2a25f21, 0x5a5542ec, 0xc550e23f, 0x5a891887, 0x00000001, + 0x00000650, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000005d4, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000034c, + 0x00000040, 0x000000d3, 0x04000059, 0x00208e46, 0x00000000, 0x00000003, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x0010101a, 0x00000001, 0x0a000032, 0x00100012, 0x00000000, + 0x0010100a, 0x00000001, 0x0010000a, 0x00000000, 0x0020800a, 0x00000000, + 0x00000002, 0x07000038, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, + 0x0010001a, 0x00000000, 0x09000032, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x0010000a, 0x00000000, 0x0010001a, 0x00000000, 0x08000038, + 0x00100042, 0x00000000, 0x0010000a, 0x00000000, 0x0020801a, 0x00000000, + 0x00000002, 0x07000038, 0x00100042, 0x00000000, 0x0010002a, 0x00000000, + 0x0010002a, 0x00000000, 0x0a000032, 0x00100022, 0x00000000, 0x0010001a, + 0x00000000, 0x0020802a, 0x00000000, 0x00000002, 0x0010002a, 0x00000000, + 0x0500004b, 0x00100022, 0x00000000, 0x0010001a, 0x00000000, 0x0b000032, + 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x0020801a, + 0x00000000, 0x00000002, 0x0010001a, 0x00000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100006, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x0a00000e, 0x00100012, 0x00000001, 0x00004002, 0x3f800000, + 0x3f800000, 0x3f800000, 0x3f800000, 0x0010003a, 0x00000000, 0x07000038, + 0x00100072, 0x00000001, 0x00100246, 0x00000000, 0x00100006, 0x00000001, + 0x07000039, 0x00100082, 0x00000001, 0x0010003a, 0x00000000, 0x00004001, + 0x00000000, 0x09000037, 0x00100072, 0x00000000, 0x00100ff6, 0x00000001, + 0x00100246, 0x00000001, 0x00100246, 0x00000000, 0x08000038, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, + 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, + 0x00000001, 0x05000036, 0x00100022, 0x00000001, 0x0010103a, 0x00000001, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000007, 0x00106000, 0x00000007, 0x07000038, 0x00100082, 0x00000000, + 0x0010003a, 0x00000000, 0x0010003a, 0x00000001, 0x08000000, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, + 0x07000038, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x00000018, 0x00000002, 0x00000000, + 0x00000002, 0x0000000e, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_basic_15[322] = { - 0x43425844, 0xe9ac3a59, 0xb10c74ae, 0x7d8ea66b, 0x7f38f805, 0x00000001, 0x00000508, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000048c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000204, 0x00000040, 0x00000081, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, 0x00000000, - 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, - 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, - 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, - 0x00000007, 0x00106000, 0x00000007, 0x09000032, 0x00100012, 0x00000002, 0x0010003a, 0x00000000, - 0x0010003a, 0x00000001, 0x00004001, 0xbf000000, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000000, 0x00100e46, 0x00000001, 0x05000036, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, - 0x07000031, 0x00100012, 0x00000000, 0x0010000a, 0x00000002, 0x00004001, 0x00000000, 0x0304000d, - 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000f, 0x00000003, 0x00000000, - 0x00000002, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, + 0x43425844, 0xe9ac3a59, 0xb10c74ae, 0x7d8ea66b, 0x7f38f805, 0x00000001, + 0x00000508, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000048c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000204, + 0x00000040, 0x00000081, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x09000032, 0x00100012, 0x00000002, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000001, 0x00004001, 0xbf000000, 0x07000038, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x05000036, + 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x07000031, 0x00100012, + 0x00000000, 0x0010000a, 0x00000002, 0x00004001, 0x00000000, 0x0304000d, + 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000f, + 0x00000003, 0x00000000, 0x00000002, 0x00000007, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_16[339] = { - 0x43425844, 0x254d5609, 0xfb3546e9, 0x05f36a1e, 0x58e4fd27, 0x00000001, 0x0000054c, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000004d0, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000248, 0x00000040, 0x00000092, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, 0x00208246, 0x00000000, - 0x00000000, 0x06000036, 0x00100082, 0x00000001, 0x0020803a, 0x00000000, 0x00000000, 0x07000038, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, - 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, - 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, - 0x00000007, 0x00106000, 0x00000007, 0x09000032, 0x00100012, 0x00000002, 0x0010003a, 0x00000000, - 0x0010003a, 0x00000001, 0x00004001, 0xbf000000, 0x07000038, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000000, 0x00100e46, 0x00000001, 0x07000031, 0x00100012, 0x00000001, 0x0010000a, 0x00000002, - 0x00004001, 0x00000000, 0x0304000d, 0x0010000a, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, - 0x00208246, 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x07000033, - 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x05000036, 0x00102082, - 0x00000000, 0x0010003a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000011, 0x00000003, - 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x254d5609, 0xfb3546e9, 0x05f36a1e, 0x58e4fd27, 0x00000001, + 0x0000054c, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000004d0, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000248, + 0x00000040, 0x00000092, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000038, 0x00100072, 0x00000001, 0x00208ff6, 0x00000000, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x06000036, 0x00100082, 0x00000001, + 0x0020803a, 0x00000000, 0x00000000, 0x07000038, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0700000e, 0x00100012, + 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, + 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000007, 0x00106000, + 0x00000007, 0x09000032, 0x00100012, 0x00000002, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000001, 0x00004001, 0xbf000000, 0x07000038, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x07000031, + 0x00100012, 0x00000001, 0x0010000a, 0x00000002, 0x00004001, 0x00000000, + 0x0304000d, 0x0010000a, 0x00000001, 0x0a000032, 0x00100072, 0x00000000, + 0x00208246, 0x00000000, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000000, 0x07000033, 0x00102072, 0x00000000, 0x00100ff6, 0x00000000, + 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000011, 0x00000003, + 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_basic_17[325] = { - 0x43425844, 0x9b76f721, 0x305d6ada, 0x87db10d5, 0x6ff15183, 0x00000001, 0x00000514, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000498, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000210, 0x00000040, 0x00000084, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x03001062, 0x001010f2, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010103a, 0x00000001, - 0x07000038, 0x00100032, 0x00000000, 0x00100006, 0x00000000, 0x00101046, 0x00000001, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, - 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, 0x00000001, 0x0010103a, 0x00000001, 0x05000036, - 0x00100022, 0x00000001, 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x0a000032, 0x00100012, 0x00000000, - 0x0010000a, 0x00000000, 0x0010003a, 0x00000001, 0x0020803a, 0x00000000, 0x00000001, 0x07000000, - 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0xbf000000, 0x07000031, 0x00100022, - 0x00000000, 0x0010001a, 0x00000000, 0x00004001, 0x00000000, 0x0304000d, 0x0010001a, 0x00000000, - 0x09000000, 0x001000e2, 0x00000000, 0x00208906, 0x00000000, 0x00000000, 0x00208906, 0x00000000, - 0x00000001, 0x07000038, 0x00102072, 0x00000000, 0x00100006, 0x00000000, 0x00100796, 0x00000000, - 0x05000036, 0x00102082, 0x00000000, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, - 0x0000000f, 0x00000002, 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x9b76f721, 0x305d6ada, 0x87db10d5, 0x6ff15183, 0x00000001, + 0x00000514, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000498, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000007, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000007, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x00000f0f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000210, + 0x00000040, 0x00000084, 0x04000059, 0x00208e46, 0x00000000, 0x00000002, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000007, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000007, 0x00005555, 0x03001062, 0x001010f2, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x0a00000e, 0x00100012, + 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x0010103a, 0x00000001, 0x07000038, 0x00100032, 0x00000000, 0x00100006, + 0x00000000, 0x00101046, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020803a, + 0x00000000, 0x00000000, 0x0700000e, 0x00100012, 0x00000001, 0x0010102a, + 0x00000001, 0x0010103a, 0x00000001, 0x05000036, 0x00100022, 0x00000001, + 0x0010103a, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000007, 0x00106000, 0x00000007, 0x0a000032, + 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010003a, 0x00000001, + 0x0020803a, 0x00000000, 0x00000001, 0x07000000, 0x00100022, 0x00000000, + 0x0010000a, 0x00000000, 0x00004001, 0xbf000000, 0x07000031, 0x00100022, + 0x00000000, 0x0010001a, 0x00000000, 0x00004001, 0x00000000, 0x0304000d, + 0x0010001a, 0x00000000, 0x09000000, 0x001000e2, 0x00000000, 0x00208906, + 0x00000000, 0x00000000, 0x00208906, 0x00000000, 0x00000001, 0x07000038, + 0x00102072, 0x00000000, 0x00100006, 0x00000000, 0x00100796, 0x00000000, + 0x05000036, 0x00102082, 0x00000000, 0x0010000a, 0x00000000, 0x0100003e, + 0x54415453, 0x00000074, 0x0000000f, 0x00000002, 0x00000000, 0x00000002, + 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static ProgramWithCachedVariableLocations pshader_basic_arr[18] = { - { pshader_basic_0, 956, }, - { pshader_basic_1, 1044, }, - { pshader_basic_2, 996, }, - { pshader_basic_3, 1192, }, - { pshader_basic_4, 1280, }, - { pshader_basic_5, 1348, }, - { pshader_basic_6, 1192, }, - { pshader_basic_7, 1280, }, - { pshader_basic_8, 1232, }, - { pshader_basic_9, 1240, }, - { pshader_basic_10, 1328, }, - { pshader_basic_11, 1396, }, - { pshader_basic_12, 1460, }, - { pshader_basic_13, 1548, }, - { pshader_basic_14, 1616, }, - { pshader_basic_15, 1288, }, - { pshader_basic_16, 1356, }, - { pshader_basic_17, 1300, }, + { + pshader_basic_0, + 956, + }, + { + pshader_basic_1, + 1044, + }, + { + pshader_basic_2, + 996, + }, + { + pshader_basic_3, + 1192, + }, + { + pshader_basic_4, + 1280, + }, + { + pshader_basic_5, + 1348, + }, + { + pshader_basic_6, + 1192, + }, + { + pshader_basic_7, + 1280, + }, + { + pshader_basic_8, + 1232, + }, + { + pshader_basic_9, + 1240, + }, + { + pshader_basic_10, + 1328, + }, + { + pshader_basic_11, + 1396, + }, + { + pshader_basic_12, + 1460, + }, + { + pshader_basic_13, + 1548, + }, + { + pshader_basic_14, + 1616, + }, + { + pshader_basic_15, + 1288, + }, + { + pshader_basic_16, + 1356, + }, + { + pshader_basic_17, + 1300, + }, }; static DWORD pshader_exceptional_blend_1[335] = { - 0x43425844, 0x0b4014f2, 0x2a24373f, 0xb6c4e09c, 0xd8c938b5, 0x00000001, 0x0000053c, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000004c0, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000238, 0x00000040, 0x0000008e, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x0b000032, 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, - 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001000e2, 0x00000001, - 0x00100906, 0x00000000, 0x00100906, 0x00000002, 0x09000032, 0x00100072, 0x00000001, 0x00100006, - 0x00000001, 0x00100246, 0x00000002, 0x00100796, 0x00000001, 0x08000000, 0x00100082, 0x00000001, - 0x8010003a, 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, - 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, - 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, - 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, - 0x54415453, 0x00000074, 0x0000000e, 0x00000003, 0x00000000, 0x00000002, 0x00000006, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x0b4014f2, 0x2a24373f, 0xb6c4e09c, 0xd8c938b5, 0x00000001, + 0x0000053c, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000004c0, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000238, + 0x00000040, 0x0000008e, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100012, 0x00000001, + 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x0b000032, + 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, + 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100596, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x001000e2, 0x00000001, 0x00100906, 0x00000000, + 0x00100906, 0x00000002, 0x09000032, 0x00100072, 0x00000001, 0x00100006, + 0x00000001, 0x00100246, 0x00000002, 0x00100796, 0x00000001, 0x08000000, + 0x00100082, 0x00000001, 0x8010003a, 0x00000041, 0x00000002, 0x00004001, + 0x3f800000, 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, 0x00000001, + 0x00100246, 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, + 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, + 0x00102082, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, + 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, + 0x0000000e, 0x00000003, 0x00000000, 0x00000002, 0x00000006, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_2[361] = { - 0x43425844, 0xf906958b, 0x06acfe4b, 0x355048f1, 0x63cfff9c, 0x00000001, 0x000005a4, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000528, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000002a0, 0x00000040, 0x000000a8, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100072, 0x00000001, 0x80100246, 0x00000041, 0x00000000, 0x00100ff6, - 0x00000000, 0x0b000032, 0x00100032, 0x00000002, 0x00101046, 0x00000001, 0x00208046, 0x00000000, - 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100046, - 0x00000002, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100082, 0x00000001, - 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x08000000, 0x00100072, 0x00000003, 0x80100246, - 0x00000041, 0x00000002, 0x00100ff6, 0x00000002, 0x0a000032, 0x00100072, 0x00000001, 0x80100246, - 0x00000041, 0x00000003, 0x00100246, 0x00000001, 0x00100ff6, 0x00000001, 0x08000000, 0x00100082, - 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x09000032, 0x00100072, - 0x00000001, 0x00100ff6, 0x00000001, 0x00100246, 0x00000002, 0x00100246, 0x00000001, 0x08000000, - 0x00100082, 0x00000001, 0x8010003a, 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, - 0x00102072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, - 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, - 0x00102082, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, - 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000011, 0x00000004, 0x00000000, 0x00000002, - 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0xf906958b, 0x06acfe4b, 0x355048f1, 0x63cfff9c, 0x00000001, + 0x000005a4, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000528, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000002a0, + 0x00000040, 0x000000a8, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100072, 0x00000001, + 0x80100246, 0x00000041, 0x00000000, 0x00100ff6, 0x00000000, 0x0b000032, + 0x00100032, 0x00000002, 0x00101046, 0x00000001, 0x00208046, 0x00000000, + 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100046, 0x00000002, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x00100082, 0x00000001, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000002, 0x08000000, 0x00100072, 0x00000003, 0x80100246, + 0x00000041, 0x00000002, 0x00100ff6, 0x00000002, 0x0a000032, 0x00100072, + 0x00000001, 0x80100246, 0x00000041, 0x00000003, 0x00100246, 0x00000001, + 0x00100ff6, 0x00000001, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, + 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x09000032, 0x00100072, + 0x00000001, 0x00100ff6, 0x00000001, 0x00100246, 0x00000002, 0x00100246, + 0x00000001, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, 0x00000041, + 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, + 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, + 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, + 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, 0x00000041, + 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, + 0x54415453, 0x00000074, 0x00000011, 0x00000004, 0x00000000, 0x00000002, + 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_exceptional_blend_3[356] = { - 0x43425844, 0xfa19bb88, 0xda5ce80c, 0x160c8b13, 0xebac0845, 0x00000001, 0x00000590, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000514, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x0000028c, 0x00000040, 0x000000a3, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x0b000032, 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, - 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001000f2, 0x00000003, - 0x00100736, 0x00000000, 0x00100dc6, 0x00000002, 0x07000034, 0x00100032, 0x00000003, 0x001005d6, - 0x00000003, 0x00100086, 0x00000003, 0x07000038, 0x00100062, 0x00000001, 0x00100ef6, 0x00000000, - 0x00100ba6, 0x00000002, 0x07000034, 0x00100042, 0x00000003, 0x0010002a, 0x00000001, 0x0010001a, - 0x00000001, 0x09000032, 0x00100072, 0x00000001, 0x00100006, 0x00000001, 0x00100246, 0x00000002, - 0x00100246, 0x00000003, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, 0x00000041, 0x00000002, - 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, - 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, - 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, - 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000011, - 0x00000004, 0x00000000, 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xfa19bb88, 0xda5ce80c, 0x160c8b13, 0xebac0845, 0x00000001, + 0x00000590, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000514, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000028c, + 0x00000040, 0x000000a3, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100012, 0x00000001, + 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x0b000032, + 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, + 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100596, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x001000f2, 0x00000003, 0x00100736, 0x00000000, + 0x00100dc6, 0x00000002, 0x07000034, 0x00100032, 0x00000003, 0x001005d6, + 0x00000003, 0x00100086, 0x00000003, 0x07000038, 0x00100062, 0x00000001, + 0x00100ef6, 0x00000000, 0x00100ba6, 0x00000002, 0x07000034, 0x00100042, + 0x00000003, 0x0010002a, 0x00000001, 0x0010001a, 0x00000001, 0x09000032, + 0x00100072, 0x00000001, 0x00100006, 0x00000001, 0x00100246, 0x00000002, + 0x00100246, 0x00000003, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, + 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, + 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, + 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, + 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x00000011, 0x00000004, 0x00000000, + 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_4[356] = { - 0x43425844, 0x51f459c3, 0x15565fe2, 0x4f2b3854, 0x901f8bb9, 0x00000001, 0x00000590, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000514, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x0000028c, 0x00000040, 0x000000a3, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x0b000032, 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, - 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001000f2, 0x00000003, - 0x00100736, 0x00000000, 0x00100dc6, 0x00000002, 0x07000033, 0x00100032, 0x00000003, 0x001005d6, - 0x00000003, 0x00100086, 0x00000003, 0x07000038, 0x00100062, 0x00000001, 0x00100ef6, 0x00000000, - 0x00100ba6, 0x00000002, 0x07000033, 0x00100042, 0x00000003, 0x0010002a, 0x00000001, 0x0010001a, - 0x00000001, 0x09000032, 0x00100072, 0x00000001, 0x00100006, 0x00000001, 0x00100246, 0x00000002, - 0x00100246, 0x00000003, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, 0x00000041, 0x00000002, - 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, - 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, - 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, - 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000011, - 0x00000004, 0x00000000, 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x51f459c3, 0x15565fe2, 0x4f2b3854, 0x901f8bb9, 0x00000001, + 0x00000590, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000514, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000028c, + 0x00000040, 0x000000a3, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100012, 0x00000001, + 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x0b000032, + 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, + 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100596, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x001000f2, 0x00000003, 0x00100736, 0x00000000, + 0x00100dc6, 0x00000002, 0x07000033, 0x00100032, 0x00000003, 0x001005d6, + 0x00000003, 0x00100086, 0x00000003, 0x07000038, 0x00100062, 0x00000001, + 0x00100ef6, 0x00000000, 0x00100ba6, 0x00000002, 0x07000033, 0x00100042, + 0x00000003, 0x0010002a, 0x00000001, 0x0010001a, 0x00000001, 0x09000032, + 0x00100072, 0x00000001, 0x00100006, 0x00000001, 0x00100246, 0x00000002, + 0x00100246, 0x00000003, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, + 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, + 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, + 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, + 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x00000011, 0x00000004, 0x00000000, + 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_5[294] = { - 0x43425844, 0x78df9480, 0x22fce9ea, 0x892ac708, 0xebd122be, 0x00000001, 0x00000498, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000041c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000194, 0x00000040, 0x00000065, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x0b000032, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000000, - 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000000, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, 0x0a000033, 0x001020f2, 0x00000000, 0x00100e46, - 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0100003e, 0x54415453, - 0x00000074, 0x00000009, 0x00000002, 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x78df9480, 0x22fce9ea, 0x892ac708, 0xebd122be, 0x00000001, + 0x00000498, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000041c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000194, + 0x00000040, 0x00000065, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x0b000032, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000000, 0x00000003, 0x00208ae6, + 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000000, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e46, 0x00000001, + 0x0a000033, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00004002, + 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0100003e, 0x54415453, + 0x00000074, 0x00000009, 0x00000002, 0x00000000, 0x00000002, 0x00000004, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_6[309] = { - 0x43425844, 0x72cc2469, 0xfeb8ff3a, 0xc3c15aed, 0x5d2bdd8a, 0x00000001, 0x000004d4, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x00000458, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000001d0, 0x00000040, 0x00000074, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x0b000032, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000000, - 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, 0x00100072, 0x00000000, - 0x80100246, 0x00000041, 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100082, 0x00000000, - 0x0010003a, 0x00000000, 0x0010003a, 0x00000001, 0x07000033, 0x00102082, 0x00000000, 0x0010003a, - 0x00000000, 0x00004001, 0x3f800000, 0x0a000034, 0x00102072, 0x00000000, 0x00100246, 0x00000000, - 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, - 0x0000000b, 0x00000002, 0x00000000, 0x00000002, 0x00000006, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x72cc2469, 0xfeb8ff3a, 0xc3c15aed, 0x5d2bdd8a, 0x00000001, + 0x000004d4, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x00000458, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001d0, + 0x00000040, 0x00000074, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x0b000032, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000000, 0x00000003, 0x00208ae6, + 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, + 0x00100072, 0x00000000, 0x80100246, 0x00000041, 0x00000000, 0x00100246, + 0x00000001, 0x07000000, 0x00100082, 0x00000000, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000001, 0x07000033, 0x00102082, 0x00000000, 0x0010003a, + 0x00000000, 0x00004001, 0x3f800000, 0x0a000034, 0x00102072, 0x00000000, + 0x00100246, 0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000b, 0x00000002, + 0x00000000, 0x00000002, 0x00000006, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_7[374] = { - 0x43425844, 0xeeebdd02, 0x607b5e55, 0x9b2d4bb0, 0x0c029c3e, 0x00000001, 0x000005d8, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000055c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000002d4, 0x00000040, 0x000000b5, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x0b000032, 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, - 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100062, 0x00000001, - 0x00100106, 0x00000000, 0x00100ff6, 0x00000002, 0x0a000032, 0x00100062, 0x00000001, 0x00100ff6, - 0x00000000, 0x00100106, 0x00000002, 0x80100656, 0x00000041, 0x00000001, 0x06000036, 0x00100032, - 0x00000003, 0x80100596, 0x00000081, 0x00000001, 0x07000038, 0x00100022, 0x00000001, 0x0010002a, - 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00100022, 0x00000001, 0x0010003a, 0x00000000, - 0x0010002a, 0x00000002, 0x8010001a, 0x00000041, 0x00000001, 0x06000036, 0x00100042, 0x00000003, - 0x8010001a, 0x00000081, 0x00000001, 0x09000032, 0x00100072, 0x00000001, 0x00100006, 0x00000001, - 0x00100246, 0x00000002, 0x00100246, 0x00000003, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, - 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, - 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, 0x00000000, - 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, - 0x00000074, 0x00000013, 0x00000004, 0x00000000, 0x00000002, 0x00000007, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xeeebdd02, 0x607b5e55, 0x9b2d4bb0, 0x0c029c3e, 0x00000001, + 0x000005d8, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000055c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000002d4, + 0x00000040, 0x000000b5, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000004, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100012, 0x00000001, + 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x0b000032, + 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, + 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100596, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x00100062, 0x00000001, 0x00100106, 0x00000000, + 0x00100ff6, 0x00000002, 0x0a000032, 0x00100062, 0x00000001, 0x00100ff6, + 0x00000000, 0x00100106, 0x00000002, 0x80100656, 0x00000041, 0x00000001, + 0x06000036, 0x00100032, 0x00000003, 0x80100596, 0x00000081, 0x00000001, + 0x07000038, 0x00100022, 0x00000001, 0x0010002a, 0x00000000, 0x0010003a, + 0x00000002, 0x0a000032, 0x00100022, 0x00000001, 0x0010003a, 0x00000000, + 0x0010002a, 0x00000002, 0x8010001a, 0x00000041, 0x00000001, 0x06000036, + 0x00100042, 0x00000003, 0x8010001a, 0x00000081, 0x00000001, 0x09000032, + 0x00100072, 0x00000001, 0x00100006, 0x00000001, 0x00100246, 0x00000002, + 0x00100246, 0x00000003, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, + 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, + 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, + 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, + 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x00000013, 0x00000004, 0x00000000, + 0x00000002, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_8[343] = { - 0x43425844, 0x4c133b76, 0xe54d7a26, 0xec03c69d, 0xd69182c1, 0x00000001, 0x0000055c, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000004e0, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000258, 0x00000040, 0x00000096, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x0b000032, 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, - 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100072, 0x00000001, - 0x00100006, 0x00000001, 0x00100246, 0x00000002, 0x08000000, 0x00100072, 0x00000002, 0x80100246, - 0x00000041, 0x00000002, 0x00100ff6, 0x00000002, 0x09000032, 0x00100072, 0x00000001, 0x00100ff6, - 0x00000000, 0x00100246, 0x00000002, 0x00100246, 0x00000001, 0x08000000, 0x00100082, 0x00000001, - 0x8010003a, 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, - 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, - 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, - 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, - 0x54415453, 0x00000074, 0x0000000f, 0x00000003, 0x00000000, 0x00000002, 0x00000007, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x4c133b76, 0xe54d7a26, 0xec03c69d, 0xd69182c1, 0x00000001, + 0x0000055c, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000004e0, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000258, + 0x00000040, 0x00000096, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100012, 0x00000001, + 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x0b000032, + 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000000, + 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100596, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x00100072, 0x00000001, 0x00100006, 0x00000001, + 0x00100246, 0x00000002, 0x08000000, 0x00100072, 0x00000002, 0x80100246, + 0x00000041, 0x00000002, 0x00100ff6, 0x00000002, 0x09000032, 0x00100072, + 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000002, 0x00100246, + 0x00000001, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, 0x00000041, + 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, + 0x00100ff6, 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, + 0x07000000, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0010003a, + 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, 0x00000041, + 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, + 0x54415453, 0x00000074, 0x0000000f, 0x00000003, 0x00000000, 0x00000002, + 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_exceptional_blend_9[430] = { - 0x43425844, 0x0e53b9bf, 0xa40806de, 0xc8710d16, 0xff1f73e9, 0x00000001, 0x000006b8, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000063c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000003b4, 0x00000040, 0x000000ed, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000005, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100072, 0x00000001, 0x80100246, 0x00000041, 0x00000000, 0x00100ff6, - 0x00000000, 0x0b000032, 0x00100032, 0x00000002, 0x00101046, 0x00000001, 0x00208046, 0x00000000, - 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100046, - 0x00000002, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100082, 0x00000001, - 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x08000000, 0x00100072, 0x00000003, 0x80100246, - 0x00000041, 0x00000002, 0x00100ff6, 0x00000002, 0x07000000, 0x00100072, 0x00000003, 0x00100246, - 0x00000003, 0x00100246, 0x00000003, 0x0a000032, 0x00100072, 0x00000001, 0x80100246, 0x00000041, - 0x00000003, 0x00100246, 0x00000001, 0x00100ff6, 0x00000001, 0x0700000f, 0x00100082, 0x00000001, - 0x00100006, 0x00000002, 0x00100006, 0x00000000, 0x07000038, 0x00100012, 0x00000003, 0x0010003a, - 0x00000002, 0x00004001, 0x3f000000, 0x07000031, 0x00100072, 0x00000003, 0x00100246, 0x00000002, - 0x00100006, 0x00000003, 0x09000037, 0x00100012, 0x00000004, 0x0010000a, 0x00000003, 0x0010003a, - 0x00000001, 0x0010000a, 0x00000001, 0x0700000f, 0x00100012, 0x00000001, 0x00100556, 0x00000002, - 0x00100556, 0x00000000, 0x09000037, 0x00100022, 0x00000004, 0x0010001a, 0x00000003, 0x0010000a, - 0x00000001, 0x0010001a, 0x00000001, 0x0700000f, 0x00100012, 0x00000001, 0x00100aa6, 0x00000002, - 0x00100aa6, 0x00000000, 0x09000037, 0x00100042, 0x00000004, 0x0010002a, 0x00000003, 0x0010000a, - 0x00000001, 0x0010002a, 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, - 0x00000000, 0x00004001, 0x3f800000, 0x09000032, 0x00100072, 0x00000001, 0x00100006, 0x00000001, - 0x00100246, 0x00000002, 0x00100246, 0x00000004, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, - 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, - 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, 0x00000000, - 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, - 0x00000074, 0x0000001a, 0x00000005, 0x00000000, 0x00000002, 0x0000000e, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x0e53b9bf, 0xa40806de, 0xc8710d16, 0xff1f73e9, 0x00000001, + 0x000006b8, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000063c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000003b4, + 0x00000040, 0x000000ed, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000005, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100072, 0x00000001, + 0x80100246, 0x00000041, 0x00000000, 0x00100ff6, 0x00000000, 0x0b000032, + 0x00100032, 0x00000002, 0x00101046, 0x00000001, 0x00208046, 0x00000000, + 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100046, 0x00000002, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x00100082, 0x00000001, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000002, 0x08000000, 0x00100072, 0x00000003, 0x80100246, + 0x00000041, 0x00000002, 0x00100ff6, 0x00000002, 0x07000000, 0x00100072, + 0x00000003, 0x00100246, 0x00000003, 0x00100246, 0x00000003, 0x0a000032, + 0x00100072, 0x00000001, 0x80100246, 0x00000041, 0x00000003, 0x00100246, + 0x00000001, 0x00100ff6, 0x00000001, 0x0700000f, 0x00100082, 0x00000001, + 0x00100006, 0x00000002, 0x00100006, 0x00000000, 0x07000038, 0x00100012, + 0x00000003, 0x0010003a, 0x00000002, 0x00004001, 0x3f000000, 0x07000031, + 0x00100072, 0x00000003, 0x00100246, 0x00000002, 0x00100006, 0x00000003, + 0x09000037, 0x00100012, 0x00000004, 0x0010000a, 0x00000003, 0x0010003a, + 0x00000001, 0x0010000a, 0x00000001, 0x0700000f, 0x00100012, 0x00000001, + 0x00100556, 0x00000002, 0x00100556, 0x00000000, 0x09000037, 0x00100022, + 0x00000004, 0x0010001a, 0x00000003, 0x0010000a, 0x00000001, 0x0010001a, + 0x00000001, 0x0700000f, 0x00100012, 0x00000001, 0x00100aa6, 0x00000002, + 0x00100aa6, 0x00000000, 0x09000037, 0x00100042, 0x00000004, 0x0010002a, + 0x00000003, 0x0010000a, 0x00000001, 0x0010002a, 0x00000001, 0x08000000, + 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, + 0x3f800000, 0x09000032, 0x00100072, 0x00000001, 0x00100006, 0x00000001, + 0x00100246, 0x00000002, 0x00100246, 0x00000004, 0x08000000, 0x00100082, + 0x00000001, 0x8010003a, 0x00000041, 0x00000002, 0x00004001, 0x3f800000, + 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, + 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, 0x00000000, + 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000002, + 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000001a, + 0x00000005, 0x00000000, 0x00000002, 0x0000000e, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_10[430] = { - 0x43425844, 0x5b763bc7, 0xa04a2226, 0x01dce3d1, 0xed9b4a05, 0x00000001, 0x000006b8, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x0000063c, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x000003b4, 0x00000040, 0x000000ed, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000005, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, 0x00000000, 0x00100e46, - 0x00000001, 0x08000000, 0x00100072, 0x00000001, 0x80100246, 0x00000041, 0x00000000, 0x00100ff6, - 0x00000000, 0x0b000032, 0x00100032, 0x00000002, 0x00101046, 0x00000001, 0x00208046, 0x00000000, - 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000002, 0x00100046, - 0x00000002, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, 0x00100072, 0x00000003, - 0x80100246, 0x00000041, 0x00000002, 0x00100ff6, 0x00000002, 0x07000000, 0x00100072, 0x00000003, - 0x00100246, 0x00000003, 0x00100246, 0x00000003, 0x07000038, 0x00100082, 0x00000001, 0x0010003a, - 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00100072, 0x00000001, 0x80100246, 0x00000041, - 0x00000003, 0x00100246, 0x00000001, 0x00100ff6, 0x00000001, 0x07000038, 0x00100082, 0x00000001, - 0x0010003a, 0x00000000, 0x00004001, 0x3f000000, 0x07000031, 0x00100072, 0x00000003, 0x00100246, - 0x00000000, 0x00100ff6, 0x00000001, 0x0700000f, 0x00100082, 0x00000001, 0x00100006, 0x00000002, - 0x00100006, 0x00000000, 0x09000037, 0x00100012, 0x00000004, 0x0010000a, 0x00000003, 0x0010003a, - 0x00000001, 0x0010000a, 0x00000001, 0x0700000f, 0x00100012, 0x00000001, 0x00100556, 0x00000002, - 0x00100556, 0x00000000, 0x09000037, 0x00100022, 0x00000004, 0x0010001a, 0x00000003, 0x0010000a, - 0x00000001, 0x0010001a, 0x00000001, 0x0700000f, 0x00100012, 0x00000001, 0x00100aa6, 0x00000002, - 0x00100aa6, 0x00000000, 0x09000037, 0x00100042, 0x00000004, 0x0010002a, 0x00000003, 0x0010000a, - 0x00000001, 0x0010002a, 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, - 0x00000000, 0x00004001, 0x3f800000, 0x09000032, 0x00100072, 0x00000001, 0x00100006, 0x00000001, - 0x00100246, 0x00000002, 0x00100246, 0x00000004, 0x08000000, 0x00100082, 0x00000001, 0x8010003a, - 0x00000041, 0x00000002, 0x00004001, 0x3f800000, 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, - 0x00000001, 0x00100246, 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, 0x00000000, - 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000002, 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, - 0x00000074, 0x0000001a, 0x00000005, 0x00000000, 0x00000002, 0x0000000e, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x5b763bc7, 0xa04a2226, 0x01dce3d1, 0xed9b4a05, 0x00000001, + 0x000006b8, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x0000063c, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000003b4, + 0x00000040, 0x000000ed, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000005, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, + 0x00208246, 0x00000000, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, + 0x00100ff6, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x0a002032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00208ff6, 0x00000000, + 0x00000000, 0x00100e46, 0x00000001, 0x08000000, 0x00100072, 0x00000001, + 0x80100246, 0x00000041, 0x00000000, 0x00100ff6, 0x00000000, 0x0b000032, + 0x00100032, 0x00000002, 0x00101046, 0x00000001, 0x00208046, 0x00000000, + 0x00000003, 0x00208ae6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, + 0x00000002, 0x00100046, 0x00000002, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x08000000, 0x00100072, 0x00000003, 0x80100246, 0x00000041, + 0x00000002, 0x00100ff6, 0x00000002, 0x07000000, 0x00100072, 0x00000003, + 0x00100246, 0x00000003, 0x00100246, 0x00000003, 0x07000038, 0x00100082, + 0x00000001, 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, + 0x00100072, 0x00000001, 0x80100246, 0x00000041, 0x00000003, 0x00100246, + 0x00000001, 0x00100ff6, 0x00000001, 0x07000038, 0x00100082, 0x00000001, + 0x0010003a, 0x00000000, 0x00004001, 0x3f000000, 0x07000031, 0x00100072, + 0x00000003, 0x00100246, 0x00000000, 0x00100ff6, 0x00000001, 0x0700000f, + 0x00100082, 0x00000001, 0x00100006, 0x00000002, 0x00100006, 0x00000000, + 0x09000037, 0x00100012, 0x00000004, 0x0010000a, 0x00000003, 0x0010003a, + 0x00000001, 0x0010000a, 0x00000001, 0x0700000f, 0x00100012, 0x00000001, + 0x00100556, 0x00000002, 0x00100556, 0x00000000, 0x09000037, 0x00100022, + 0x00000004, 0x0010001a, 0x00000003, 0x0010000a, 0x00000001, 0x0010001a, + 0x00000001, 0x0700000f, 0x00100012, 0x00000001, 0x00100aa6, 0x00000002, + 0x00100aa6, 0x00000000, 0x09000037, 0x00100042, 0x00000004, 0x0010002a, + 0x00000003, 0x0010000a, 0x00000001, 0x0010002a, 0x00000001, 0x08000000, + 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, + 0x3f800000, 0x09000032, 0x00100072, 0x00000001, 0x00100006, 0x00000001, + 0x00100246, 0x00000002, 0x00100246, 0x00000004, 0x08000000, 0x00100082, + 0x00000001, 0x8010003a, 0x00000041, 0x00000002, 0x00004001, 0x3f800000, + 0x09000032, 0x00102072, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, + 0x00000000, 0x00100246, 0x00000001, 0x07000000, 0x00100012, 0x00000000, + 0x0010003a, 0x00000000, 0x0010003a, 0x00000002, 0x0a000032, 0x00102082, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000002, + 0x0010000a, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000001a, + 0x00000005, 0x00000000, 0x00000002, 0x0000000e, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_11[284] = { - 0x43425844, 0xb5fd5f87, 0x5eef857b, 0xa3d0d13a, 0xf65c919c, 0x00000001, 0x00000470, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000003f4, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x0000016c, 0x00000040, 0x0000005b, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000001, 0x0a002032, - 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, 0x0010000a, - 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x0b000032, 0x00100062, 0x00000000, 0x00101106, 0x00000001, 0x00208106, 0x00000000, - 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000001, 0x00100596, - 0x00000000, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001020f2, 0x00000000, - 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000008, - 0x00000002, 0x00000000, 0x00000002, 0x00000003, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xb5fd5f87, 0x5eef857b, 0xa3d0d13a, 0xf65c919c, 0x00000001, + 0x00000470, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000003f4, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000016c, + 0x00000040, 0x0000005b, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, + 0x0020803a, 0x00000000, 0x00000001, 0x0a002032, 0x00100012, 0x00000000, + 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, 0x0010000a, + 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, + 0x00000000, 0x00004001, 0x3f800000, 0x0b000032, 0x00100062, 0x00000000, + 0x00101106, 0x00000001, 0x00208106, 0x00000000, 0x00000003, 0x00208ba6, + 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000001, 0x00100596, + 0x00000000, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, + 0x001020f2, 0x00000000, 0x00100006, 0x00000000, 0x00100e46, 0x00000001, + 0x0100003e, 0x54415453, 0x00000074, 0x00000008, 0x00000002, 0x00000000, + 0x00000002, 0x00000003, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_exceptional_blend_12[276] = { - 0x43425844, 0x8aa79ff3, 0xa0220437, 0x6186c7a6, 0x358ad839, 0x00000001, 0x00000450, 0x00000005, - 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, 0x000003d4, 0x46454452, 0x000001b8, 0x00000001, - 0x000000d8, 0x00000005, 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000c3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ca, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000d4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, - 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, 0x00000002, 0x0000015c, - 0x00000000, 0x0000016c, 0x00000010, 0x00000010, 0x00000002, 0x0000015c, 0x00000000, 0x00000176, - 0x00000020, 0x00000010, 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, - 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, - 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x0000014c, 0x00000040, 0x00000053, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, - 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, - 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, - 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000001, 0x0a002032, - 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, 0x0010000a, - 0x00000000, 0x0b000032, 0x00100062, 0x00000000, 0x00101106, 0x00000001, 0x00208106, 0x00000000, - 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, 0x09000045, 0x001000f2, 0x00000001, 0x00100596, - 0x00000000, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001020f2, 0x00000000, - 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000007, - 0x00000002, 0x00000000, 0x00000002, 0x00000002, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x8aa79ff3, 0xa0220437, 0x6186c7a6, 0x358ad839, 0x00000001, + 0x00000450, 0x00000005, 0x00000034, 0x000001f4, 0x0000024c, 0x00000280, + 0x000003d4, 0x46454452, 0x000001b8, 0x00000001, 0x000000d8, 0x00000005, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000185, 0x000000bc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000c3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ca, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000cf, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x65740031, + 0x74003078, 0x00317865, 0x00635350, 0x000000d4, 0x00000004, 0x000000f0, + 0x00000040, 0x00000000, 0x00000000, 0x00000150, 0x00000000, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x0000016c, 0x00000010, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x00000176, 0x00000020, 0x00000010, + 0x00000000, 0x0000015c, 0x00000000, 0x0000017c, 0x00000030, 0x00000010, + 0x00000002, 0x0000015c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, + 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, + 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, + 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000014c, + 0x00000040, 0x00000053, 0x04000059, 0x00208e46, 0x00000000, 0x00000004, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, + 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, + 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, + 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, + 0x0020803a, 0x00000000, 0x00000001, 0x0a002032, 0x00100012, 0x00000000, + 0x0010003a, 0x00000000, 0x0020803a, 0x00000000, 0x00000000, 0x0010000a, + 0x00000000, 0x0b000032, 0x00100062, 0x00000000, 0x00101106, 0x00000001, + 0x00208106, 0x00000000, 0x00000003, 0x00208ba6, 0x00000000, 0x00000003, + 0x09000045, 0x001000f2, 0x00000001, 0x00100596, 0x00000000, 0x00107e46, + 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001020f2, 0x00000000, + 0x00100006, 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, + 0x00000074, 0x00000007, 0x00000002, 0x00000000, 0x00000002, 0x00000002, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static ProgramWithCachedVariableLocations pshader_exceptional_blend_arr[13] = { - { NULL, 0, }, - { pshader_exceptional_blend_1, 1340, }, - { pshader_exceptional_blend_2, 1444, }, - { pshader_exceptional_blend_3, 1424, }, - { pshader_exceptional_blend_4, 1424, }, - { pshader_exceptional_blend_5, 1176, }, - { pshader_exceptional_blend_6, 1236, }, - { pshader_exceptional_blend_7, 1496, }, - { pshader_exceptional_blend_8, 1372, }, - { pshader_exceptional_blend_9, 1720, }, - { pshader_exceptional_blend_10, 1720, }, - { pshader_exceptional_blend_11, 1136, }, - { pshader_exceptional_blend_12, 1104, }, + { + NULL, + 0, + }, + { + pshader_exceptional_blend_1, + 1340, + }, + { + pshader_exceptional_blend_2, + 1444, + }, + { + pshader_exceptional_blend_3, + 1424, + }, + { + pshader_exceptional_blend_4, + 1424, + }, + { + pshader_exceptional_blend_5, + 1176, + }, + { + pshader_exceptional_blend_6, + 1236, + }, + { + pshader_exceptional_blend_7, + 1496, + }, + { + pshader_exceptional_blend_8, + 1372, + }, + { + pshader_exceptional_blend_9, + 1720, + }, + { + pshader_exceptional_blend_10, + 1720, + }, + { + pshader_exceptional_blend_11, + 1136, + }, + { + pshader_exceptional_blend_12, + 1104, + }, }; static DWORD pshader_filter_0[379] = { - 0x43425844, 0x24aad9c6, 0x43cc8801, 0x5ba2dc0b, 0xffe933e2, 0x00000001, 0x000005ec, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000570, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x0000020c, 0x00000040, 0x00000083, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000003, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020802a, - 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, - 0x3f800000, 0x08000038, 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00208e46, 0x00000001, - 0x00000002, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000002, 0x8010003a, 0x00000041, 0x00000001, - 0x00004001, 0x3f800000, 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, - 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000d, 0x00000003, - 0x00000000, 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x24aad9c6, 0x43cc8801, 0x5ba2dc0b, 0xffe933e2, 0x00000001, + 0x000005ec, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000570, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x0000020c, 0x00000040, 0x00000083, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000003, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x00004001, 0x3f800000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x08000034, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, + 0x08000000, 0x00100012, 0x00000002, 0x8010003a, 0x00000041, 0x00000001, + 0x00004001, 0x3f800000, 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, + 0x00000000, 0x00100006, 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, + 0x54415453, 0x00000074, 0x0000000d, 0x00000003, 0x00000000, 0x00000002, + 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_filter_1[377] = { - 0x43425844, 0x1e4f7d74, 0xaaf944d6, 0xb5f0a484, 0xc246b059, 0x00000001, 0x000005e4, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000568, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x00000204, 0x00000040, 0x00000081, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020802a, - 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, - 0x3f800000, 0x08000034, 0x00100062, 0x00000000, 0x00101106, 0x00000001, 0x00208106, 0x00000001, - 0x00000001, 0x08000033, 0x00100062, 0x00000000, 0x00100656, 0x00000000, 0x00208ba6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100596, 0x00000000, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x08000000, 0x00100022, 0x00000000, 0x8010003a, 0x00000041, 0x00000001, - 0x00004001, 0x3f800000, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, - 0x00000001, 0x00000002, 0x07000038, 0x001020f2, 0x00000000, 0x00100006, 0x00000000, 0x00100e46, - 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000d, 0x00000002, 0x00000000, 0x00000002, - 0x0000000a, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x1e4f7d74, 0xaaf944d6, 0xb5f0a484, 0xc246b059, 0x00000001, + 0x000005e4, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000568, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x00000204, 0x00000040, 0x00000081, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100062, 0x00000000, + 0x00101106, 0x00000001, 0x00208106, 0x00000001, 0x00000001, 0x08000033, + 0x00100062, 0x00000000, 0x00100656, 0x00000000, 0x00208ba6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100596, 0x00000000, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, 0x00100022, + 0x00000000, 0x8010003a, 0x00000041, 0x00000001, 0x00004001, 0x3f800000, + 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, + 0x00000001, 0x00000002, 0x07000038, 0x001020f2, 0x00000000, 0x00100006, + 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x0000000d, 0x00000002, 0x00000000, 0x00000002, 0x0000000a, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_2[411] = { - 0x43425844, 0x434da1c1, 0xc6277d6b, 0xf3644d3f, 0x33d647fa, 0x00000001, 0x0000066c, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x000005f0, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x00000240, 0x00000040, 0x00000090, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000003, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x00004001, 0x3f800000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, - 0x00000002, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000002, 0x8010003a, 0x00000041, 0x00000001, - 0x00004001, 0x3f800000, 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, - 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000003, - 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x434da1c1, 0xc6277d6b, 0xf3644d3f, 0x33d647fa, 0x00000001, + 0x0000066c, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x000005f0, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x00000240, 0x00000040, 0x00000090, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x05000036, + 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, + 0x00000002, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, + 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000002, 0x8010003a, + 0x00000041, 0x00000001, 0x00004001, 0x3f800000, 0x09000032, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100006, 0x00000002, 0x00100e46, + 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000003, + 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_3[409] = { - 0x43425844, 0x965f1059, 0xcdafe63f, 0x73c062f4, 0xcd63b2ea, 0x00000001, 0x00000664, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x000005e8, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x00000238, 0x00000040, 0x0000008e, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x00004001, 0x3f800000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, - 0x00000002, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000001, - 0x00004001, 0x3f800000, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, - 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000002, 0x00000000, 0x00000002, - 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x965f1059, 0xcdafe63f, 0x73c062f4, 0xcd63b2ea, 0x00000001, + 0x00000664, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x000005e8, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x00000238, 0x00000040, 0x0000008e, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x05000036, + 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, + 0x00000002, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, + 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, + 0x00000041, 0x00000001, 0x00004001, 0x3f800000, 0x07000038, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100006, 0x00000001, 0x0100003e, + 0x54415453, 0x00000074, 0x0000000e, 0x00000002, 0x00000000, 0x00000002, + 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_filter_4[402] = { - 0x43425844, 0x4c377bd9, 0xfb4c5258, 0xe793fa9d, 0xf685a588, 0x00000001, 0x00000648, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x000005cc, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x00000268, 0x00000040, 0x0000009a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, - 0x00004001, 0x3f800000, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, - 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, - 0x3f800000, 0x08000038, 0x001000e2, 0x00000000, 0x00100006, 0x00000000, 0x00208906, 0x00000001, - 0x00000002, 0x0b000032, 0x00100012, 0x00000000, 0x8020803a, 0x00000041, 0x00000001, 0x00000002, - 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100032, 0x00000001, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, - 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100072, 0x00000001, - 0x00100006, 0x00000000, 0x00100246, 0x00000001, 0x09000032, 0x00102072, 0x00000000, 0x00100796, - 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000001, 0x05000036, 0x00102082, 0x00000000, - 0x0010003a, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000010, 0x00000002, 0x00000000, - 0x00000002, 0x0000000a, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, + 0x43425844, 0x4c377bd9, 0xfb4c5258, 0xe793fa9d, 0xf685a588, 0x00000001, + 0x00000648, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x000005cc, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x00000268, 0x00000040, 0x0000009a, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, + 0x00004001, 0x3f800000, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x08000038, + 0x001000e2, 0x00000000, 0x00100006, 0x00000000, 0x00208906, 0x00000001, + 0x00000002, 0x0b000032, 0x00100012, 0x00000000, 0x8020803a, 0x00000041, + 0x00000001, 0x00000002, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, + 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, + 0x00000001, 0x07000038, 0x00100072, 0x00000001, 0x00100006, 0x00000000, + 0x00100246, 0x00000001, 0x09000032, 0x00102072, 0x00000000, 0x00100796, + 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000001, 0x05000036, + 0x00102082, 0x00000000, 0x0010003a, 0x00000001, 0x0100003e, 0x54415453, + 0x00000074, 0x00000010, 0x00000002, 0x00000000, 0x00000002, 0x0000000a, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_5[377] = { - 0x43425844, 0x9ff592ef, 0xe7109a8c, 0xc01f276d, 0x73f691c7, 0x00000001, 0x000005e4, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000568, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x00000204, 0x00000040, 0x00000081, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, - 0x00004001, 0x3f800000, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, - 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, - 0x3f800000, 0x08000034, 0x00100062, 0x00000000, 0x00101106, 0x00000001, 0x00208106, 0x00000001, - 0x00000001, 0x08000033, 0x00100062, 0x00000000, 0x00100656, 0x00000000, 0x00208ba6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100596, 0x00000000, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x08000038, 0x001000f2, 0x00000001, 0x00100ff6, 0x00000001, 0x00208e46, - 0x00000001, 0x00000002, 0x07000038, 0x001020f2, 0x00000000, 0x00100006, 0x00000000, 0x00100e46, - 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000d, 0x00000002, 0x00000000, 0x00000002, - 0x0000000a, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x9ff592ef, 0xe7109a8c, 0xc01f276d, 0x73f691c7, 0x00000001, + 0x000005e4, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000568, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x00000204, 0x00000040, 0x00000081, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, + 0x00004001, 0x3f800000, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x08000034, + 0x00100062, 0x00000000, 0x00101106, 0x00000001, 0x00208106, 0x00000001, + 0x00000001, 0x08000033, 0x00100062, 0x00000000, 0x00100656, 0x00000000, + 0x00208ba6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, + 0x00100596, 0x00000000, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, + 0x08000038, 0x001000f2, 0x00000001, 0x00100ff6, 0x00000001, 0x00208e46, + 0x00000001, 0x00000002, 0x07000038, 0x001020f2, 0x00000000, 0x00100006, + 0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x0000000d, 0x00000002, 0x00000000, 0x00000002, 0x0000000a, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_6[423] = { - 0x43425844, 0x5360f80d, 0x54f4e830, 0xa8cabb2e, 0x51c8fc74, 0x00000001, 0x0000069c, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x00000620, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x00000270, 0x00000040, 0x0000009c, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x00004001, 0x3f800000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, - 0x00000002, 0x08000000, 0x00100082, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x07000038, 0x00100072, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, - 0x00000001, 0x09000032, 0x00102072, 0x00000000, 0x00100246, 0x00000000, 0x00100ff6, 0x00000001, - 0x00100246, 0x00000001, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000001, 0x0100003e, - 0x54415453, 0x00000074, 0x00000010, 0x00000002, 0x00000000, 0x00000002, 0x00000009, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x5360f80d, 0x54f4e830, 0xa8cabb2e, 0x51c8fc74, 0x00000001, + 0x0000069c, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x00000620, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x00000270, 0x00000040, 0x0000009c, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x05000036, + 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, + 0x00000002, 0x08000000, 0x00100082, 0x00000000, 0x8010003a, 0x00000041, + 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100072, + 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000001, 0x09000032, + 0x00102072, 0x00000000, 0x00100246, 0x00000000, 0x00100ff6, 0x00000001, + 0x00100246, 0x00000001, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, + 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000010, 0x00000002, + 0x00000000, 0x00000002, 0x00000009, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_7[401] = { - 0x43425844, 0x0439e6c7, 0xa22f2670, 0x44e3f549, 0xd957dde0, 0x00000001, 0x00000644, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x000005c8, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x00000218, 0x00000040, 0x00000086, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x00004001, 0x3f800000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, - 0x00000002, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100ff6, - 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x0000000d, 0x00000002, 0x00000000, 0x00000002, - 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x0439e6c7, 0xa22f2670, 0x44e3f549, 0xd957dde0, 0x00000001, + 0x00000644, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x000005c8, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x00000218, 0x00000040, 0x00000086, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x05000036, + 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, + 0x00000002, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, + 0x00106000, 0x00000001, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, + 0x00000000, 0x00100ff6, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x0000000d, 0x00000002, 0x00000000, 0x00000002, 0x00000008, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_8[246] = { - 0x43425844, 0xd318033e, 0x780e8795, 0xb2e4d27b, 0x11bd4a8f, 0x00000001, 0x000003d8, 0x00000005, - 0x00000034, 0x000001c0, 0x00000218, 0x0000024c, 0x0000035c, 0x46454452, 0x00000184, 0x00000001, - 0x00000090, 0x00000003, 0x0000001c, 0xffff0400, 0x00008100, 0x00000153, 0x0000007c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000083, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x00000088, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, - 0x00317865, 0x61726170, 0xababab00, 0x00000088, 0x00000005, 0x000000a8, 0x00000050, 0x00000000, - 0x00000000, 0x00000120, 0x00000000, 0x00000010, 0x00000000, 0x00000128, 0x00000000, 0x00000138, - 0x00000010, 0x00000010, 0x00000002, 0x00000128, 0x00000000, 0x0000013f, 0x00000020, 0x00000010, - 0x00000002, 0x00000128, 0x00000000, 0x00000145, 0x00000030, 0x00000010, 0x00000000, 0x00000128, - 0x00000000, 0x0000014c, 0x00000040, 0x00000010, 0x00000000, 0x00000128, 0x00000000, 0x6d616c63, - 0xab003070, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6d616c63, 0x63003170, 0x726f6c6f, - 0x6c6f6300, 0x0032726f, 0x6f5f6374, 0x4d006666, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, - 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, - 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, - 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, - 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, - 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, - 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000108, 0x00000040, 0x00000042, 0x04000059, - 0x00208e46, 0x00000001, 0x00000003, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000, - 0x00000001, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, - 0x02000068, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, - 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, - 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, - 0x00000001, 0x00106000, 0x00000001, 0x09000000, 0x00100012, 0x00000001, 0x8020803a, 0x00000041, - 0x00000001, 0x00000002, 0x00004001, 0x3f800000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, - 0x00000000, 0x00100006, 0x00000001, 0x00208e46, 0x00000001, 0x00000002, 0x0100003e, 0x54415453, - 0x00000074, 0x00000006, 0x00000002, 0x00000000, 0x00000002, 0x00000003, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xd318033e, 0x780e8795, 0xb2e4d27b, 0x11bd4a8f, 0x00000001, + 0x000003d8, 0x00000005, 0x00000034, 0x000001c0, 0x00000218, 0x0000024c, + 0x0000035c, 0x46454452, 0x00000184, 0x00000001, 0x00000090, 0x00000003, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000153, 0x0000007c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x00000083, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x00000088, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003178, + 0x00317865, 0x61726170, 0xababab00, 0x00000088, 0x00000005, 0x000000a8, + 0x00000050, 0x00000000, 0x00000000, 0x00000120, 0x00000000, 0x00000010, + 0x00000000, 0x00000128, 0x00000000, 0x00000138, 0x00000010, 0x00000010, + 0x00000002, 0x00000128, 0x00000000, 0x0000013f, 0x00000020, 0x00000010, + 0x00000002, 0x00000128, 0x00000000, 0x00000145, 0x00000030, 0x00000010, + 0x00000000, 0x00000128, 0x00000000, 0x0000014c, 0x00000040, 0x00000010, + 0x00000000, 0x00000128, 0x00000000, 0x6d616c63, 0xab003070, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6d616c63, 0x63003170, 0x726f6c6f, + 0x6c6f6300, 0x0032726f, 0x6f5f6374, 0x4d006666, 0x6f726369, 0x74666f73, + 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, + 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000108, 0x00000040, + 0x00000042, 0x04000059, 0x00208e46, 0x00000001, 0x00000003, 0x0300005a, + 0x00106000, 0x00000001, 0x04001858, 0x00107000, 0x00000001, 0x00005555, + 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, + 0x02000068, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00101046, + 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000001, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000001, 0x00106000, 0x00000001, 0x09000000, 0x00100012, 0x00000001, + 0x8020803a, 0x00000041, 0x00000001, 0x00000002, 0x00004001, 0x3f800000, + 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, + 0x00000001, 0x00208e46, 0x00000001, 0x00000002, 0x0100003e, 0x54415453, + 0x00000074, 0x00000006, 0x00000002, 0x00000000, 0x00000002, 0x00000003, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_9[177] = { - 0x43425844, 0x6be5959a, 0xfbf9f786, 0x3ad2a2c2, 0xed03ea11, 0x00000001, 0x000002c4, 0x00000005, - 0x00000034, 0x00000174, 0x000001cc, 0x00000200, 0x00000248, 0x46454452, 0x00000138, 0x00000001, - 0x00000044, 0x00000001, 0x0000001c, 0xffff0400, 0x00008100, 0x00000107, 0x0000003c, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x61726170, 0xababab00, - 0x0000003c, 0x00000005, 0x0000005c, 0x00000050, 0x00000000, 0x00000000, 0x000000d4, 0x00000000, - 0x00000010, 0x00000000, 0x000000dc, 0x00000000, 0x000000ec, 0x00000010, 0x00000010, 0x00000000, - 0x000000dc, 0x00000000, 0x000000f3, 0x00000020, 0x00000010, 0x00000002, 0x000000dc, 0x00000000, - 0x000000f9, 0x00000030, 0x00000010, 0x00000000, 0x000000dc, 0x00000000, 0x00000100, 0x00000040, - 0x00000010, 0x00000000, 0x000000dc, 0x00000000, 0x6d616c63, 0xab003070, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6d616c63, 0x63003170, 0x726f6c6f, 0x6c6f6300, 0x0032726f, 0x6f5f6374, - 0x4d006666, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, - 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x4e475349, 0x00000050, 0x00000002, - 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, - 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, - 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, - 0x52444853, 0x00000040, 0x00000040, 0x00000010, 0x04000059, 0x00208e46, 0x00000001, 0x00000003, - 0x03000065, 0x001020f2, 0x00000000, 0x06000036, 0x001020f2, 0x00000000, 0x00208e46, 0x00000001, - 0x00000002, 0x0100003e, 0x54415453, 0x00000074, 0x00000002, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x6be5959a, 0xfbf9f786, 0x3ad2a2c2, 0xed03ea11, 0x00000001, + 0x000002c4, 0x00000005, 0x00000034, 0x00000174, 0x000001cc, 0x00000200, + 0x00000248, 0x46454452, 0x00000138, 0x00000001, 0x00000044, 0x00000001, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000107, 0x0000003c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x61726170, 0xababab00, 0x0000003c, 0x00000005, 0x0000005c, 0x00000050, + 0x00000000, 0x00000000, 0x000000d4, 0x00000000, 0x00000010, 0x00000000, + 0x000000dc, 0x00000000, 0x000000ec, 0x00000010, 0x00000010, 0x00000000, + 0x000000dc, 0x00000000, 0x000000f3, 0x00000020, 0x00000010, 0x00000002, + 0x000000dc, 0x00000000, 0x000000f9, 0x00000030, 0x00000010, 0x00000000, + 0x000000dc, 0x00000000, 0x00000100, 0x00000040, 0x00000010, 0x00000000, + 0x000000dc, 0x00000000, 0x6d616c63, 0xab003070, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6d616c63, 0x63003170, 0x726f6c6f, 0x6c6f6300, + 0x0032726f, 0x6f5f6374, 0x4d006666, 0x6f726369, 0x74666f73, 0x29522820, + 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, + 0x392e3932, 0x332e3235, 0x00313131, 0x4e475349, 0x00000050, 0x00000002, + 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, + 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, + 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, + 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, + 0x65677261, 0xabab0074, 0x52444853, 0x00000040, 0x00000040, 0x00000010, + 0x04000059, 0x00208e46, 0x00000001, 0x00000003, 0x03000065, 0x001020f2, + 0x00000000, 0x06000036, 0x001020f2, 0x00000000, 0x00208e46, 0x00000001, + 0x00000002, 0x0100003e, 0x54415453, 0x00000074, 0x00000002, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_10[411] = { - 0x43425844, 0x06c32e7c, 0xd1fa07e2, 0x2d208e5f, 0x5002e2cc, 0x00000001, 0x0000066c, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x000005f0, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x00000240, 0x00000040, 0x00000090, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000003, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x00004001, 0x3f800000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, - 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, - 0x00000002, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x08000034, 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000001, - 0x00000001, 0x08000033, 0x00100062, 0x00000001, 0x00100656, 0x00000001, 0x00208ba6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000002, 0x00100006, - 0x00000001, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000003, - 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x06c32e7c, 0xd1fa07e2, 0x2d208e5f, 0x5002e2cc, 0x00000001, + 0x0000066c, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x000005f0, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x00000240, 0x00000040, 0x00000090, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x07000033, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f800000, 0x05000036, + 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, + 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, + 0x00000002, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, + 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100062, 0x00000001, + 0x00101106, 0x00000001, 0x00208106, 0x00000001, 0x00000001, 0x08000033, + 0x00100062, 0x00000001, 0x00100656, 0x00000001, 0x00208ba6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, 0x00000001, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x09000032, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000002, 0x00100006, 0x00000001, 0x00100e46, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000003, + 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_11[343] = { - 0x43425844, 0xba36eafb, 0x7eb5939c, 0xf32591ec, 0x30eeb32a, 0x00000001, 0x0000055c, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x000004e0, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740032, 0x74003078, 0x00327865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x0000017c, 0x00000040, 0x0000005f, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000002, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000002, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000001, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020802a, - 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x00004001, - 0x3f800000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001020f2, - 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000002, 0x0100003e, - 0x54415453, 0x00000074, 0x00000009, 0x00000001, 0x00000000, 0x00000002, 0x00000005, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xba36eafb, 0x7eb5939c, 0xf32591ec, 0x30eeb32a, 0x00000001, + 0x0000055c, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x000004e0, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740032, 0x74003078, 0x00327865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x0000017c, 0x00000040, 0x0000005f, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000002, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000001, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000038, 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x07000033, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x00004001, 0x3f800000, 0x05000036, 0x00100022, 0x00000000, + 0x00004001, 0x3f000000, 0x09000045, 0x001020f2, 0x00000000, 0x00100046, + 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000002, 0x0100003e, + 0x54415453, 0x00000074, 0x00000009, 0x00000001, 0x00000000, 0x00000002, + 0x00000005, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_filter_16[435] = { - 0x43425844, 0x6063564a, 0xa8def096, 0xcca0d8e9, 0xfad099ba, 0x00000001, 0x000006cc, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000650, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000002, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x000002ec, 0x00000040, 0x000000bb, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000003, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, - 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, - 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, - 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000002, 0x8010003a, 0x00000041, 0x00000001, - 0x00004001, 0x3f800000, 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, - 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000014, 0x00000003, - 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x6063564a, 0xa8def096, 0xcca0d8e9, 0xfad099ba, 0x00000001, + 0x000006cc, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000650, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x000002ec, 0x00000040, 0x000000bb, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000003, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, + 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, + 0x00000000, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000, + 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, + 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000002, 0x8010003a, + 0x00000041, 0x00000001, 0x00004001, 0x3f800000, 0x09000032, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100006, 0x00000002, 0x00100e46, + 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000014, 0x00000003, + 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_17[433] = { - 0x43425844, 0x9d251e4d, 0x6df18823, 0x51817ea5, 0xa8eeefd8, 0x00000001, 0x000006c4, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000648, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000002, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x000002e4, 0x00000040, 0x000000b9, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, - 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, - 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, - 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000001, - 0x00004001, 0x3f800000, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, - 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000014, 0x00000002, 0x00000000, 0x00000002, - 0x0000000d, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x9d251e4d, 0x6df18823, 0x51817ea5, 0xa8eeefd8, 0x00000001, + 0x000006c4, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000648, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x000002e4, 0x00000040, 0x000000b9, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, + 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, + 0x00000000, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000, + 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, + 0x00106000, 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, + 0x00000041, 0x00000001, 0x00004001, 0x3f800000, 0x07000038, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100006, 0x00000001, 0x0100003e, + 0x54415453, 0x00000074, 0x00000014, 0x00000002, 0x00000000, 0x00000002, + 0x0000000d, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_filter_18[455] = { - 0x43425844, 0x01fc38b9, 0x9e8809ca, 0x9767109e, 0x3100f672, 0x00000001, 0x0000071c, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x000006a0, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x000002f0, 0x00000040, 0x000000bc, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000003, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, - 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, 0x3f000000, 0x05000036, - 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000002, 0x08000034, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, 0x00100012, - 0x00000002, 0x8010003a, 0x00000041, 0x00000001, 0x00004001, 0x3f800000, 0x09000032, 0x001020f2, - 0x00000000, 0x00100e46, 0x00000000, 0x00100006, 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, - 0x54415453, 0x00000074, 0x00000013, 0x00000003, 0x00000000, 0x00000002, 0x0000000b, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x01fc38b9, 0x9e8809ca, 0x9767109e, 0x3100f672, 0x00000001, + 0x0000071c, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x000006a0, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x000002f0, 0x00000040, 0x000000bc, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, + 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, + 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, + 0x3f000000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000002, 0x00106000, 0x00000002, 0x08000034, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, 0x00100012, + 0x00000002, 0x8010003a, 0x00000041, 0x00000001, 0x00004001, 0x3f800000, + 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, + 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x00000013, 0x00000003, 0x00000000, 0x00000002, 0x0000000b, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_19[453] = { - 0x43425844, 0x93b178e0, 0xac5fae3d, 0x5854ccdb, 0x646aa2b1, 0x00000001, 0x00000714, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x00000698, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x000002e8, 0x00000040, 0x000000ba, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, - 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, 0x3f000000, 0x05000036, - 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000002, 0x08000034, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, 0x00100012, - 0x00000001, 0x8010003a, 0x00000041, 0x00000001, 0x00004001, 0x3f800000, 0x07000038, 0x001020f2, - 0x00000000, 0x00100e46, 0x00000000, 0x00100006, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, - 0x00000013, 0x00000002, 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x93b178e0, 0xac5fae3d, 0x5854ccdb, 0x646aa2b1, 0x00000001, + 0x00000714, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x00000698, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x000002e8, 0x00000040, 0x000000ba, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, + 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, + 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, + 0x3f000000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000002, 0x00106000, 0x00000002, 0x08000034, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x08000000, 0x00100012, + 0x00000001, 0x8010003a, 0x00000041, 0x00000001, 0x00004001, 0x3f800000, + 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100006, + 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000013, 0x00000002, + 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_20[447] = { - 0x43425844, 0x9a125209, 0xf5c56096, 0xd7eccf22, 0x9fa5961c, 0x00000001, 0x000006fc, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000680, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000002, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x0000031c, 0x00000040, 0x000000c7, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, - 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, - 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, - 0x00000001, 0x08000000, 0x00100082, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x07000038, 0x00100072, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, - 0x00000001, 0x09000032, 0x00102072, 0x00000000, 0x00100246, 0x00000000, 0x00100ff6, 0x00000001, - 0x00100246, 0x00000001, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, 0x00000001, 0x0100003e, - 0x54415453, 0x00000074, 0x00000016, 0x00000002, 0x00000000, 0x00000002, 0x0000000d, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x9a125209, 0xf5c56096, 0xd7eccf22, 0x9fa5961c, 0x00000001, + 0x000006fc, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000680, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x0000031c, 0x00000040, 0x000000c7, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, + 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, + 0x00000000, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000, + 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, + 0x00000001, 0x08000000, 0x00100082, 0x00000000, 0x8010003a, 0x00000041, + 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100072, + 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000001, 0x09000032, + 0x00102072, 0x00000000, 0x00100246, 0x00000000, 0x00100ff6, 0x00000001, + 0x00100246, 0x00000001, 0x05000036, 0x00102082, 0x00000000, 0x0010003a, + 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000016, 0x00000002, + 0x00000000, 0x00000002, 0x0000000d, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_21[425] = { - 0x43425844, 0x893ebdf3, 0x678513c8, 0xea77bccb, 0x915f5370, 0x00000001, 0x000006a4, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000628, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000002, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x000002c4, 0x00000040, 0x000000b1, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, - 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, - 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, - 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100ff6, - 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000013, 0x00000002, 0x00000000, 0x00000002, - 0x0000000c, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x893ebdf3, 0x678513c8, 0xea77bccb, 0x915f5370, 0x00000001, + 0x000006a4, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000628, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x000002c4, 0x00000040, 0x000000b1, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, + 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, + 0x00000000, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000, + 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000001, + 0x00106000, 0x00000001, 0x07000038, 0x001020f2, 0x00000000, 0x00100e46, + 0x00000000, 0x00100ff6, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x00000013, 0x00000002, 0x00000000, 0x00000002, 0x0000000c, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_22[467] = { - 0x43425844, 0x2b2ebefd, 0x99c6691a, 0xf5589278, 0x00bf4796, 0x00000001, 0x0000074c, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x000006d0, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x00000320, 0x00000040, 0x000000c8, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, - 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, 0x3f000000, 0x05000036, - 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000002, 0x08000000, 0x00100082, 0x00000000, - 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x00100072, - 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, 0x00000001, 0x09000032, 0x00102072, 0x00000000, - 0x00100246, 0x00000000, 0x00100ff6, 0x00000001, 0x00100246, 0x00000001, 0x05000036, 0x00102082, - 0x00000000, 0x0010003a, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, 0x00000015, 0x00000002, - 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x2b2ebefd, 0x99c6691a, 0xf5589278, 0x00bf4796, 0x00000001, + 0x0000074c, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x000006d0, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x00000320, 0x00000040, 0x000000c8, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, + 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, + 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, + 0x3f000000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000002, 0x00106000, 0x00000002, 0x08000000, 0x00100082, 0x00000000, + 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x08000034, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, + 0x07000038, 0x00100072, 0x00000001, 0x00100ff6, 0x00000000, 0x00100246, + 0x00000001, 0x09000032, 0x00102072, 0x00000000, 0x00100246, 0x00000000, + 0x00100ff6, 0x00000001, 0x00100246, 0x00000001, 0x05000036, 0x00102082, + 0x00000000, 0x0010003a, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, + 0x00000015, 0x00000002, 0x00000000, 0x00000002, 0x0000000c, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_23[445] = { - 0x43425844, 0xc733b29b, 0xcc301191, 0xb70dd0eb, 0xb530bacb, 0x00000001, 0x000006f4, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x00000678, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x000002c8, 0x00000040, 0x000000b2, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, - 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, 0x3f000000, 0x05000036, - 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000002, 0x08000034, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001020f2, - 0x00000000, 0x00100e46, 0x00000000, 0x00100ff6, 0x00000001, 0x0100003e, 0x54415453, 0x00000074, - 0x00000012, 0x00000002, 0x00000000, 0x00000002, 0x0000000b, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xc733b29b, 0xcc301191, 0xb70dd0eb, 0xb530bacb, 0x00000001, + 0x000006f4, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x00000678, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x000002c8, 0x00000040, 0x000000b2, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, + 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, + 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, + 0x3f000000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000002, 0x00106000, 0x00000002, 0x08000034, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x07000038, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000000, 0x00100ff6, 0x00000001, 0x0100003e, + 0x54415453, 0x00000074, 0x00000012, 0x00000002, 0x00000000, 0x00000002, + 0x0000000b, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_filter_24[435] = { - 0x43425844, 0x19fff495, 0xbd100eb6, 0x9012a014, 0xcb173d4f, 0x00000001, 0x000006cc, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000650, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000002, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x000002ec, 0x00000040, 0x000000bb, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000001, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000003, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, - 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, - 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x08000038, - 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, - 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, 0x00000000, 0x00004001, - 0x3f800000, 0x08000034, 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000001, - 0x00000001, 0x08000033, 0x00100062, 0x00000001, 0x00100656, 0x00000001, 0x00208ba6, 0x00000001, - 0x00000001, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, 0x00000001, 0x00107e46, 0x00000001, - 0x00106000, 0x00000001, 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000002, 0x00100006, - 0x00000001, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000014, 0x00000003, - 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x19fff495, 0xbd100eb6, 0x9012a014, 0xcb173d4f, 0x00000001, + 0x000006cc, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000650, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740031, 0x74003078, 0x00317865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x000002ec, 0x00000040, 0x000000bb, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000003, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, + 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, + 0x00000000, 0x06002036, 0x00100012, 0x00000000, 0x8010000a, 0x00000041, + 0x00000000, 0x08000038, 0x001000f2, 0x00000001, 0x00100556, 0x00000000, + 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, + 0x00000001, 0x08000000, 0x00100012, 0x00000001, 0x8010003a, 0x00000041, + 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100062, 0x00000001, + 0x00101106, 0x00000001, 0x00208106, 0x00000001, 0x00000001, 0x08000033, + 0x00100062, 0x00000001, 0x00100656, 0x00000001, 0x00208ba6, 0x00000001, + 0x00000001, 0x09000045, 0x001000f2, 0x00000002, 0x00100596, 0x00000001, + 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x09000032, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000002, 0x00100006, 0x00000001, 0x00100e46, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000014, 0x00000003, + 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_25[367] = { - 0x43425844, 0x23e9ff30, 0xa49b9308, 0xc4b02a07, 0xfe240ca9, 0x00000001, 0x000005bc, 0x00000005, - 0x00000034, 0x00000284, 0x000002dc, 0x00000310, 0x00000540, 0x46454452, 0x00000248, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x00000216, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000005, 0x0000017c, 0x00000050, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001f4, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001fb, 0x00000010, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000002, 0x00000150, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x0000020f, 0x00000040, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, - 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, - 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, - 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, - 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, - 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, - 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, - 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000228, 0x00000040, 0x0000008a, - 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, - 0x0300005a, 0x00106000, 0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, - 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, - 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, - 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, - 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, - 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, 0x00000041, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, - 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, - 0x00000001, 0x00000004, 0x05002036, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x06002036, - 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x08000038, 0x001000f2, 0x00000001, - 0x00100556, 0x00000000, 0x00208e46, 0x00000001, 0x00000003, 0x0a000032, 0x001020f2, 0x00000000, - 0x00100006, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, - 0x54415453, 0x00000074, 0x0000000f, 0x00000002, 0x00000000, 0x00000002, 0x00000009, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x23e9ff30, 0xa49b9308, 0xc4b02a07, 0xfe240ca9, 0x00000001, + 0x000005bc, 0x00000005, 0x00000034, 0x00000284, 0x000002dc, 0x00000310, + 0x00000540, 0x46454452, 0x00000248, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000216, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000005, 0x0000017c, 0x00000050, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001f4, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001fb, 0x00000010, 0x00000010, 0x00000000, + 0x00000150, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x0000020f, 0x00000040, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, + 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, + 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, + 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, + 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, + 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, + 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, + 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, + 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000228, + 0x00000040, 0x0000008a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, + 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, + 0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, + 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, + 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000000, 0x00100032, + 0x00000000, 0x00101046, 0x00000001, 0x80208046, 0x00000041, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, + 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, 0x00000001, 0x00000004, + 0x05002036, 0x00100022, 0x00000000, 0x0010000a, 0x00000000, 0x06002036, + 0x00100012, 0x00000000, 0x8010000a, 0x00000041, 0x00000000, 0x08000038, + 0x001000f2, 0x00000001, 0x00100556, 0x00000000, 0x00208e46, 0x00000001, + 0x00000003, 0x0a000032, 0x001020f2, 0x00000000, 0x00100006, 0x00000000, + 0x00208e46, 0x00000001, 0x00000002, 0x00100e46, 0x00000001, 0x0100003e, + 0x54415453, 0x00000074, 0x0000000f, 0x00000002, 0x00000000, 0x00000002, + 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_filter_26[455] = { - 0x43425844, 0x77befa0f, 0xa8c6f51f, 0x871b10c5, 0x56e7a09b, 0x00000001, 0x0000071c, 0x00000005, - 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, 0x000006a0, 0x46454452, 0x000002e0, 0x00000002, - 0x0000014c, 0x00000008, 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000123, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x0000012a, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x00000136, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000144, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x5f730031, 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, - 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, 0x00000000, 0x00000000, - 0x00000144, 0x00000005, 0x00000214, 0x00000050, 0x00000000, 0x00000000, 0x000001dc, 0x00000000, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, - 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, - 0x00000208, 0x00000030, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, - 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, - 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x00000293, 0x00000010, 0x00000010, 0x00000002, 0x000001e8, 0x00000000, - 0x0000029a, 0x00000020, 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, - 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, 0x00000010, 0x00000002, - 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, - 0x74003272, 0x666f5f63, 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, - 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x000002f0, 0x00000040, 0x000000bc, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, - 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, - 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, - 0x00000000, 0x02000068, 0x00000003, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, - 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, - 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, - 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, 0x3f000000, 0x05000036, - 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000002, 0x08000000, 0x00100012, 0x00000001, - 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x08000034, 0x00100062, 0x00000001, - 0x00101106, 0x00000001, 0x00208106, 0x00000001, 0x00000001, 0x08000033, 0x00100062, 0x00000001, - 0x00100656, 0x00000001, 0x00208ba6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000002, - 0x00100596, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, 0x09000032, 0x001020f2, - 0x00000000, 0x00100e46, 0x00000002, 0x00100006, 0x00000001, 0x00100e46, 0x00000000, 0x0100003e, - 0x54415453, 0x00000074, 0x00000013, 0x00000003, 0x00000000, 0x00000002, 0x0000000b, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x77befa0f, 0xa8c6f51f, 0x871b10c5, 0x56e7a09b, 0x00000001, + 0x0000071c, 0x00000005, 0x00000034, 0x0000031c, 0x00000374, 0x000003a8, + 0x000006a0, 0x46454452, 0x000002e0, 0x00000002, 0x0000014c, 0x00000008, + 0x0000001c, 0xffff0400, 0x00008100, 0x000002ae, 0x0000011c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000123, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x0000012a, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x00000131, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, + 0x00000136, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, + 0x00000001, 0x0000000d, 0x0000013b, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x00000140, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00000144, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000001, 0x00000001, 0x65745f73, 0x73003078, 0x7865745f, 0x5f730031, + 0x32786574, 0x78657400, 0x65740030, 0x74003178, 0x00327865, 0x00635350, + 0x61726170, 0xababab00, 0x00000140, 0x00000004, 0x0000017c, 0x00000040, + 0x00000000, 0x00000000, 0x00000144, 0x00000005, 0x00000214, 0x00000050, + 0x00000000, 0x00000000, 0x000001dc, 0x00000000, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x000001f8, 0x00000010, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000202, 0x00000020, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x00000208, 0x00000030, 0x00000010, 0x00000000, + 0x000001e8, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, + 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, + 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x0000028c, 0x00000000, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x00000293, 0x00000010, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x0000029a, 0x00000020, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a0, 0x00000030, + 0x00000010, 0x00000000, 0x000001e8, 0x00000000, 0x000002a7, 0x00000040, + 0x00000010, 0x00000002, 0x000001e8, 0x00000000, 0x6d616c63, 0x63003070, + 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, + 0x694d0066, 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, + 0x20726564, 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, + 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, + 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, + 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, + 0x52444853, 0x000002f0, 0x00000040, 0x000000bc, 0x04000059, 0x00208e46, + 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, + 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, + 0x0300005a, 0x00106000, 0x00000002, 0x04001858, 0x00107000, 0x00000000, + 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, + 0x00107000, 0x00000002, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000003, 0x08000000, + 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, + 0x00000001, 0x80208046, 0x00000041, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x08000000, 0x00100012, 0x00000000, 0x8010003a, 0x00000041, 0x00000000, + 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, + 0x00000000, 0x0010000a, 0x00000000, 0x00004001, 0x3f000000, 0x00004001, + 0x3f000000, 0x05000036, 0x00100022, 0x00000000, 0x00004001, 0x3f000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000002, 0x00106000, 0x00000002, 0x08000000, 0x00100012, 0x00000001, + 0x8010003a, 0x00000041, 0x00000000, 0x00004001, 0x3f800000, 0x08000034, + 0x00100062, 0x00000001, 0x00101106, 0x00000001, 0x00208106, 0x00000001, + 0x00000001, 0x08000033, 0x00100062, 0x00000001, 0x00100656, 0x00000001, + 0x00208ba6, 0x00000001, 0x00000001, 0x09000045, 0x001000f2, 0x00000002, + 0x00100596, 0x00000001, 0x00107e46, 0x00000001, 0x00106000, 0x00000001, + 0x09000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000002, 0x00100006, + 0x00000001, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, + 0x00000013, 0x00000003, 0x00000000, 0x00000002, 0x0000000b, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_filter_27[387] = { - 0x43425844, 0xf3f7a1fb, 0xbd22ef0c, 0x3d9cc820, 0xe4ffde46, 0x00000001, 0x0000060c, 0x00000005, - 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, 0x00000590, 0x46454452, 0x00000294, 0x00000002, - 0x00000100, 0x00000006, 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000e3, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x00000001, 0x000000ea, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, 0x000000f4, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000f8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, - 0x7865745f, 0x65740032, 0x74003078, 0x00327865, 0x00635350, 0x61726170, 0xababab00, 0x000000f4, - 0x00000004, 0x00000130, 0x00000040, 0x00000000, 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, - 0x00000050, 0x00000000, 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001b6, - 0x00000020, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x000001bc, 0x00000030, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, - 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, - 0xababab00, 0x00000240, 0x00000000, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x00000247, - 0x00000010, 0x00000010, 0x00000000, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, - 0x00000000, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, - 0x00000000, 0x0000025b, 0x00000040, 0x00000010, 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, - 0x63003070, 0x706d616c, 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, - 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, - 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, - 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, - 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, - 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, - 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, - 0x0000022c, 0x00000040, 0x0000008b, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, - 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, - 0x00000002, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000002, - 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, - 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, - 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, 0x00000000, 0x8010003a, - 0x00000041, 0x00000000, 0x0010003a, 0x00000001, 0x08000038, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x0020802a, 0x00000001, 0x00000004, 0x09002032, 0x00100012, 0x00000000, 0x0010000a, - 0x00000000, 0x00004001, 0x3f000000, 0x00004001, 0x3f000000, 0x05000036, 0x00100022, 0x00000000, - 0x00004001, 0x3f000000, 0x09000045, 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, - 0x00000002, 0x00106000, 0x00000002, 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000002, - 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xf3f7a1fb, 0xbd22ef0c, 0x3d9cc820, 0xe4ffde46, 0x00000001, + 0x0000060c, 0x00000005, 0x00000034, 0x000002d0, 0x00000328, 0x0000035c, + 0x00000590, 0x46454452, 0x00000294, 0x00000002, 0x00000100, 0x00000006, + 0x0000001c, 0xffff0400, 0x00008100, 0x00000262, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000e3, 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000001, 0x00000001, 0x000000ea, 0x00000002, 0x00000005, 0x00000004, + 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000ef, 0x00000002, + 0x00000005, 0x00000004, 0xffffffff, 0x00000002, 0x00000001, 0x0000000d, + 0x000000f4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x000000f8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x73003078, + 0x7865745f, 0x65740032, 0x74003078, 0x00327865, 0x00635350, 0x61726170, + 0xababab00, 0x000000f4, 0x00000004, 0x00000130, 0x00000040, 0x00000000, + 0x00000000, 0x000000f8, 0x00000005, 0x000001c8, 0x00000050, 0x00000000, + 0x00000000, 0x00000190, 0x00000000, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001ac, 0x00000010, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001b6, 0x00000020, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x000001bc, 0x00000030, 0x00000010, 0x00000000, 0x0000019c, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0xababab00, 0x00000240, 0x00000000, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x00000247, 0x00000010, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000024e, 0x00000020, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x00000254, 0x00000030, 0x00000010, + 0x00000000, 0x0000019c, 0x00000000, 0x0000025b, 0x00000040, 0x00000010, + 0x00000002, 0x0000019c, 0x00000000, 0x6d616c63, 0x63003070, 0x706d616c, + 0x6f630031, 0x00726f6c, 0x6f6c6f63, 0x74003272, 0x666f5f63, 0x694d0066, + 0x736f7263, 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, + 0x706d6f43, 0x72656c69, 0x322e3920, 0x35392e39, 0x31332e32, 0xab003131, + 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, + 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x00000044, 0x00000000, + 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, + 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x0000022c, 0x00000040, 0x0000008b, 0x04000059, 0x00208e46, 0x00000000, + 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, + 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000002, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000002, + 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000004, 0x08000034, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, 0x00000000, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, + 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x09000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x80208046, + 0x00000041, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000000, + 0x00100046, 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000000, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000000, 0x00100012, + 0x00000000, 0x8010003a, 0x00000041, 0x00000000, 0x0010003a, 0x00000001, + 0x08000038, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0020802a, + 0x00000001, 0x00000004, 0x09002032, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x00004001, 0x3f000000, 0x00004001, 0x3f000000, 0x05000036, + 0x00100022, 0x00000000, 0x00004001, 0x3f000000, 0x09000045, 0x001020f2, + 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, + 0x00000002, 0x0100003e, 0x54415453, 0x00000074, 0x0000000e, 0x00000002, + 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static ProgramWithCachedVariableLocations pshader_filter_arr[32] = { - { pshader_filter_0, 1516, }, - { pshader_filter_1, 1508, }, - { pshader_filter_2, 1644, }, - { pshader_filter_3, 1636, }, - { pshader_filter_4, 1608, }, - { pshader_filter_5, 1508, }, - { pshader_filter_6, 1692, }, - { pshader_filter_7, 1604, }, - { pshader_filter_8, 984, }, - { pshader_filter_9, 708, }, - { pshader_filter_10, 1644, }, - { pshader_filter_11, 1372, }, - { NULL, 0, }, - { NULL, 0, }, - { NULL, 0, }, - { NULL, 0, }, - { pshader_filter_16, 1740, }, - { pshader_filter_17, 1732, }, - { pshader_filter_18, 1820, }, - { pshader_filter_19, 1812, }, - { pshader_filter_20, 1788, }, - { pshader_filter_21, 1700, }, - { pshader_filter_22, 1868, }, - { pshader_filter_23, 1780, }, - { pshader_filter_24, 1740, }, - { pshader_filter_25, 1468, }, - { pshader_filter_26, 1820, }, - { pshader_filter_27, 1548, }, - { NULL, 0, }, - { NULL, 0, }, - { NULL, 0, }, - { NULL, 0, }, + { + pshader_filter_0, + 1516, + }, + { + pshader_filter_1, + 1508, + }, + { + pshader_filter_2, + 1644, + }, + { + pshader_filter_3, + 1636, + }, + { + pshader_filter_4, + 1608, + }, + { + pshader_filter_5, + 1508, + }, + { + pshader_filter_6, + 1692, + }, + { + pshader_filter_7, + 1604, + }, + { + pshader_filter_8, + 984, + }, + { + pshader_filter_9, + 708, + }, + { + pshader_filter_10, + 1644, + }, + { + pshader_filter_11, + 1372, + }, + { + NULL, + 0, + }, + { + NULL, + 0, + }, + { + NULL, + 0, + }, + { + NULL, + 0, + }, + { + pshader_filter_16, + 1740, + }, + { + pshader_filter_17, + 1732, + }, + { + pshader_filter_18, + 1820, + }, + { + pshader_filter_19, + 1812, + }, + { + pshader_filter_20, + 1788, + }, + { + pshader_filter_21, + 1700, + }, + { + pshader_filter_22, + 1868, + }, + { + pshader_filter_23, + 1780, + }, + { + pshader_filter_24, + 1740, + }, + { + pshader_filter_25, + 1468, + }, + { + pshader_filter_26, + 1820, + }, + { + pshader_filter_27, + 1548, + }, + { + NULL, + 0, + }, + { + NULL, + 0, + }, + { + NULL, + 0, + }, + { + NULL, + 0, + }, }; static DWORD pshader_blur_2[320] = { - 0x43425844, 0x67a35e3a, 0x560d90ec, 0x256f19fd, 0x4a310ce8, 0x00000001, 0x00000500, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x00000484, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x000001b8, 0x00000040, 0x0000006e, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000003, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x0100003e, 0x54415453, 0x00000074, 0x0000000b, 0x00000002, 0x00000000, 0x00000002, 0x00000007, - 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x67a35e3a, 0x560d90ec, 0x256f19fd, 0x4a310ce8, 0x00000001, + 0x00000500, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x00000484, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000001b8, 0x00000040, + 0x0000006e, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x00000003, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x0000000b, 0x00000002, 0x00000000, + 0x00000002, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_blur_3[363] = { - 0x43425844, 0xceb6aa80, 0x47281357, 0x6546706b, 0x9a86cc96, 0x00000001, 0x000005ac, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x00000530, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x00000264, 0x00000040, 0x00000099, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000004, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000003, - 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, - 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, - 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, - 0x00000003, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000010, 0x00000002, - 0x00000000, 0x00000002, 0x0000000a, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xceb6aa80, 0x47281357, 0x6546706b, 0x9a86cc96, 0x00000001, + 0x000005ac, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x00000530, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000264, 0x00000040, + 0x00000099, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x00000004, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000003, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000003, 0x00100e46, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000010, 0x00000002, + 0x00000000, 0x00000002, 0x0000000a, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_blur_4[406] = { - 0x43425844, 0x28bb4db6, 0x76164852, 0x9c2d5fab, 0x2f864c24, 0x00000001, 0x00000658, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x000005dc, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x00000310, 0x00000040, 0x000000c4, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000003, - 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, - 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, - 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, - 0x00000003, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, - 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, - 0x00000074, 0x00000015, 0x00000002, 0x00000000, 0x00000002, 0x0000000d, 0x00000000, 0x00000000, - 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x28bb4db6, 0x76164852, 0x9c2d5fab, 0x2f864c24, 0x00000001, + 0x00000658, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x000005dc, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000310, 0x00000040, + 0x000000c4, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000003, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000003, 0x00100e46, + 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, + 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, + 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000015, + 0x00000002, 0x00000000, 0x00000002, 0x0000000d, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_blur_5[449] = { - 0x43425844, 0x750da756, 0x7d011ff8, 0xac8d5660, 0x8246b36e, 0x00000001, 0x00000704, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x00000688, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x000003bc, 0x00000040, 0x000000ef, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000006, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000003, - 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, - 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, - 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, - 0x00000003, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, - 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, - 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, - 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000005, 0x00100e46, - 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000001a, 0x00000002, 0x00000000, 0x00000002, - 0x00000010, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x750da756, 0x7d011ff8, 0xac8d5660, 0x8246b36e, 0x00000001, + 0x00000704, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x00000688, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000003bc, 0x00000040, + 0x000000ef, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x00000006, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000003, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000003, 0x00100e46, + 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, + 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, + 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, + 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, + 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, + 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, + 0x00000005, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, + 0x0000001a, 0x00000002, 0x00000000, 0x00000002, 0x00000010, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000005, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_blur_6[492] = { - 0x43425844, 0xaa04fad9, 0xf1b31202, 0xbebf01fc, 0xc2f4f30e, 0x00000001, 0x000007b0, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x00000734, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x00000468, 0x00000040, 0x0000011a, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000007, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000003, - 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, - 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, - 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, - 0x00000003, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, - 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, - 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000005, 0x00100e46, - 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000006, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, - 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000001f, - 0x00000002, 0x00000000, 0x00000002, 0x00000013, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xaa04fad9, 0xf1b31202, 0xbebf01fc, 0xc2f4f30e, 0x00000001, + 0x000007b0, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x00000734, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000468, 0x00000040, + 0x0000011a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x00000007, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000003, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000003, 0x00100e46, + 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, + 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, + 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, + 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, + 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, + 0x00000005, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000006, 0x08000034, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, + 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, + 0x00000074, 0x0000001f, 0x00000002, 0x00000000, 0x00000002, 0x00000013, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD pshader_blur_7[535] = { - 0x43425844, 0xd887ebb4, 0xc4924177, 0xe04802c2, 0xf91cc99d, 0x00000001, 0x0000085c, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x000007e0, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x00000514, 0x00000040, 0x00000145, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000008, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000003, - 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, - 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, - 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, - 0x00000003, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, - 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, - 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000005, 0x00100e46, - 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000006, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, - 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000007, 0x08000034, 0x00100032, 0x00000001, 0x00100046, - 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, - 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, - 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000007, 0x00100e46, 0x00000000, 0x0100003e, - 0x54415453, 0x00000074, 0x00000024, 0x00000002, 0x00000000, 0x00000002, 0x00000016, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xd887ebb4, 0xc4924177, 0xe04802c2, 0xf91cc99d, 0x00000001, + 0x0000085c, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x000007e0, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000514, 0x00000040, + 0x00000145, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x00000008, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000003, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000003, 0x00100e46, + 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, + 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, + 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, + 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, + 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, + 0x00000005, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000006, 0x08000034, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, + 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, + 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000007, + 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, + 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, + 0x00208aa6, 0x00000001, 0x00000007, 0x00100e46, 0x00000000, 0x0100003e, + 0x54415453, 0x00000074, 0x00000024, 0x00000002, 0x00000000, 0x00000002, + 0x00000016, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, }; static DWORD pshader_blur_8[578] = { - 0x43425844, 0x27ab5347, 0x36a0e6bc, 0xb93d307d, 0xb1f00bc0, 0x00000001, 0x00000908, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x0000088c, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x000005c0, 0x00000040, 0x00000170, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000009, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000003, - 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, - 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, - 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, - 0x00000003, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, - 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, - 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000005, 0x00100e46, - 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000006, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, - 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000007, 0x08000034, 0x00100032, 0x00000001, 0x00100046, - 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, - 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000007, 0x00100e46, 0x00000000, 0x08000000, - 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000008, 0x08000034, - 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, - 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, - 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000008, - 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000029, 0x00000002, 0x00000000, - 0x00000002, 0x00000019, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, + 0x43425844, 0x27ab5347, 0x36a0e6bc, 0xb93d307d, 0xb1f00bc0, 0x00000001, + 0x00000908, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x0000088c, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x000005c0, 0x00000040, + 0x00000170, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x00000009, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000003, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000003, 0x00100e46, + 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, + 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, + 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, + 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, + 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, + 0x00000005, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000006, 0x08000034, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, + 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, + 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000007, + 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, + 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, + 0x00208aa6, 0x00000001, 0x00000007, 0x00100e46, 0x00000000, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000008, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000008, 0x00100e46, 0x00000000, + 0x0100003e, 0x54415453, 0x00000074, 0x00000029, 0x00000002, 0x00000000, + 0x00000002, 0x00000019, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static DWORD pshader_blur_9[621] = { - 0x43425844, 0xab49c198, 0x28ead186, 0xcdcc1184, 0x605159a1, 0x00000001, 0x000009b4, 0x00000005, - 0x00000034, 0x00000238, 0x00000290, 0x000002c4, 0x00000938, 0x46454452, 0x000001fc, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, - 0x00000010, 0x00000002, 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, - 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, 0x00040001, 0x00000009, - 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, - 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, - 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, - 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, - 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, - 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, - 0xabab0074, 0x52444853, 0x0000066c, 0x00000040, 0x0000019b, 0x04000059, 0x00208e46, 0x00000000, - 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x0000000a, 0x0300005a, 0x00106000, 0x00000000, - 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, 0x03000065, - 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x08000000, 0x00100032, 0x00000000, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000000, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000000, 0x00100046, - 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, 0x00100032, 0x00000001, - 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000001, 0x08000034, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, - 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, - 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, - 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000003, - 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, - 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, - 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, - 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, - 0x00000003, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, - 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, - 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, - 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, - 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, - 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, - 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, - 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, - 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000005, 0x00100e46, - 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, - 0x00000006, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, - 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, - 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, - 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, - 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, - 0x00000001, 0x00208046, 0x00000001, 0x00000007, 0x08000034, 0x00100032, 0x00000001, 0x00100046, - 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, - 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, - 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, - 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000007, 0x00100e46, 0x00000000, 0x08000000, - 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000008, 0x08000034, - 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, - 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, - 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, - 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000008, - 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, - 0x00000001, 0x00000009, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, - 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, - 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, - 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, 0x00100e46, 0x00000001, - 0x00208aa6, 0x00000001, 0x00000009, 0x00100e46, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, - 0x0000002e, 0x00000002, 0x00000000, 0x00000002, 0x0000001c, 0x00000000, 0x00000000, 0x00000001, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000009, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xab49c198, 0x28ead186, 0xcdcc1184, 0x605159a1, 0x00000001, + 0x000009b4, 0x00000005, 0x00000034, 0x00000238, 0x00000290, 0x000002c4, + 0x00000938, 0x46454452, 0x000001fc, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001c8, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000002, 0x0000017c, 0x000000a0, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x000001ac, 0x00000000, 0x00000010, 0x00000002, + 0x00000150, 0x00000000, 0x000001b3, 0x00000010, 0x00000090, 0x00000002, + 0x000001b8, 0x00000000, 0x6d616c63, 0x74007670, 0xab007061, 0x00030001, + 0x00040001, 0x00000009, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, + 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, + 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, + 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000066c, 0x00000040, + 0x0000019b, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, + 0x00208e46, 0x00000001, 0x0000000a, 0x0300005a, 0x00106000, 0x00000000, + 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, + 0x08000000, 0x00100032, 0x00000000, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000002, 0x08000034, 0x00100032, 0x00000000, 0x00100046, + 0x00000000, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000000, 0x00100046, 0x00000000, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x08000038, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000000, 0x00208aa6, 0x00000001, 0x00000002, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000001, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000003, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000003, 0x00100e46, + 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, + 0x00208046, 0x00000001, 0x00000004, 0x08000034, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, + 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, + 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, + 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000004, + 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, 0x00101046, + 0x00000001, 0x00208046, 0x00000001, 0x00000005, 0x08000034, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, 0x00000000, + 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, + 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, 0x00100046, + 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0a000032, + 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, + 0x00000005, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, 0x00000001, + 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000006, 0x08000034, + 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, 0x00000001, + 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, 0x00000001, + 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, + 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, 0x00208aa6, + 0x00000001, 0x00000006, 0x00100e46, 0x00000000, 0x08000000, 0x00100032, + 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, 0x00000007, + 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, 0x00208046, + 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, 0x001000f2, + 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, + 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, 0x00000001, + 0x00208aa6, 0x00000001, 0x00000007, 0x00100e46, 0x00000000, 0x08000000, + 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, 0x00000001, + 0x00000008, 0x08000034, 0x00100032, 0x00000001, 0x00100046, 0x00000001, + 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, 0x00000001, + 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, 0x09000045, + 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x0a000032, 0x001000f2, 0x00000000, 0x00100e46, + 0x00000001, 0x00208aa6, 0x00000001, 0x00000008, 0x00100e46, 0x00000000, + 0x08000000, 0x00100032, 0x00000001, 0x00101046, 0x00000001, 0x00208046, + 0x00000001, 0x00000009, 0x08000034, 0x00100032, 0x00000001, 0x00100046, + 0x00000001, 0x00208046, 0x00000001, 0x00000000, 0x08000033, 0x00100032, + 0x00000001, 0x00100046, 0x00000001, 0x00208ae6, 0x00000001, 0x00000000, + 0x09000045, 0x001000f2, 0x00000001, 0x00100046, 0x00000001, 0x00107e46, + 0x00000000, 0x00106000, 0x00000000, 0x0a000032, 0x001020f2, 0x00000000, + 0x00100e46, 0x00000001, 0x00208aa6, 0x00000001, 0x00000009, 0x00100e46, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000002e, 0x00000002, + 0x00000000, 0x00000002, 0x0000001c, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000009, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static ProgramWithCachedVariableLocations pshader_blur_arr[10] = { - { NULL, 0, }, - { NULL, 0, }, - { pshader_blur_2, 1280, }, - { pshader_blur_3, 1452, }, - { pshader_blur_4, 1624, }, - { pshader_blur_5, 1796, }, - { pshader_blur_6, 1968, }, - { pshader_blur_7, 2140, }, - { pshader_blur_8, 2312, }, - { pshader_blur_9, 2484, }, + { + NULL, + 0, + }, + { + NULL, + 0, + }, + { + pshader_blur_2, + 1280, + }, + { + pshader_blur_3, + 1452, + }, + { + pshader_blur_4, + 1624, + }, + { + pshader_blur_5, + 1796, + }, + { + pshader_blur_6, + 1968, + }, + { + pshader_blur_7, + 2140, + }, + { + pshader_blur_8, + 2312, + }, + { + pshader_blur_9, + 2484, + }, }; static DWORD pshader_color_matrix_0[308] = { - 0x43425844, 0x5b914181, 0xde722329, 0xe875a0ba, 0xa156b551, 0x00000001, 0x000004d0, 0x00000005, - 0x00000034, 0x0000021c, 0x00000274, 0x000002a8, 0x00000454, 0x46454452, 0x000001e0, 0x00000002, - 0x000000b4, 0x00000004, 0x0000001c, 0xffff0400, 0x00008100, 0x000001ac, 0x0000009c, 0x00000003, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000a3, 0x00000002, - 0x00000005, 0x00000004, 0xffffffff, 0x00000000, 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x65745f73, 0x74003078, - 0x00307865, 0x00635350, 0x61726170, 0xababab00, 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, - 0x00000000, 0x00000000, 0x000000ac, 0x00000001, 0x0000017c, 0x00000050, 0x00000000, 0x00000000, - 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x00000160, 0x00000010, - 0x00000010, 0x00000000, 0x00000150, 0x00000000, 0x0000016a, 0x00000020, 0x00000010, 0x00000000, - 0x00000150, 0x00000000, 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, - 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, - 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, 0x31656c61, 0xababab00, 0x00000194, 0x00000000, - 0x00000050, 0x00000002, 0x0000019c, 0x00000000, 0x61746164, 0xababab00, 0x00030001, 0x00040001, - 0x00000005, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, - 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x000001a4, 0x00000040, 0x00000069, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x04000059, 0x00208e46, 0x00000001, 0x00000005, 0x0300005a, 0x00106000, - 0x00000000, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, - 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, 0x001000f2, 0x00000000, - 0x00101046, 0x00000001, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x08000011, 0x00100012, - 0x00000001, 0x00208e46, 0x00000001, 0x00000000, 0x00100e46, 0x00000000, 0x0a000032, 0x00100012, - 0x00000001, 0x0020800a, 0x00000001, 0x00000004, 0x0010003a, 0x00000000, 0x0010000a, 0x00000001, - 0x08000011, 0x00100082, 0x00000001, 0x00208e46, 0x00000001, 0x00000001, 0x00100e46, 0x00000000, - 0x0a000032, 0x00100022, 0x00000001, 0x0020801a, 0x00000001, 0x00000004, 0x0010003a, 0x00000000, - 0x0010003a, 0x00000001, 0x08000011, 0x00100012, 0x00000000, 0x00208e46, 0x00000001, 0x00000002, - 0x00100e46, 0x00000000, 0x0a000032, 0x00100042, 0x00000001, 0x0020802a, 0x00000001, 0x00000004, - 0x0010003a, 0x00000000, 0x0010000a, 0x00000000, 0x08000038, 0x00102082, 0x00000000, 0x0010003a, - 0x00000000, 0x0020803a, 0x00000001, 0x00000003, 0x08000038, 0x00102072, 0x00000000, 0x00100246, - 0x00000001, 0x00208ff6, 0x00000001, 0x00000003, 0x0100003e, 0x54415453, 0x00000074, 0x0000000a, - 0x00000002, 0x00000000, 0x00000002, 0x00000005, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x5b914181, 0xde722329, 0xe875a0ba, 0xa156b551, 0x00000001, + 0x000004d0, 0x00000005, 0x00000034, 0x0000021c, 0x00000274, 0x000002a8, + 0x00000454, 0x46454452, 0x000001e0, 0x00000002, 0x000000b4, 0x00000004, + 0x0000001c, 0xffff0400, 0x00008100, 0x000001ac, 0x0000009c, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x000000a3, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000000, + 0x00000001, 0x0000000d, 0x000000a8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x000000ac, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, + 0x65745f73, 0x74003078, 0x00307865, 0x00635350, 0x61726170, 0xababab00, + 0x000000a8, 0x00000004, 0x000000e4, 0x00000040, 0x00000000, 0x00000000, + 0x000000ac, 0x00000001, 0x0000017c, 0x00000050, 0x00000000, 0x00000000, + 0x00000144, 0x00000000, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000160, 0x00000010, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x0000016a, 0x00000020, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x00000170, 0x00000030, 0x00000010, 0x00000000, 0x00000150, 0x00000000, + 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, 0x00000000, + 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, 0x63736572, + 0x31656c61, 0xababab00, 0x00000194, 0x00000000, 0x00000050, 0x00000002, + 0x0000019c, 0x00000000, 0x61746164, 0xababab00, 0x00030001, 0x00040001, + 0x00000005, 0x00000000, 0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, + 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e, + 0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, 0x00000002, + 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, + 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, + 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, + 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, + 0x65677261, 0xabab0074, 0x52444853, 0x000001a4, 0x00000040, 0x00000069, + 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x04000059, 0x00208e46, + 0x00000001, 0x00000005, 0x0300005a, 0x00106000, 0x00000000, 0x04001858, + 0x00107000, 0x00000000, 0x00005555, 0x03001062, 0x00101032, 0x00000001, + 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x09000045, + 0x001000f2, 0x00000000, 0x00101046, 0x00000001, 0x00107e46, 0x00000000, + 0x00106000, 0x00000000, 0x08000011, 0x00100012, 0x00000001, 0x00208e46, + 0x00000001, 0x00000000, 0x00100e46, 0x00000000, 0x0a000032, 0x00100012, + 0x00000001, 0x0020800a, 0x00000001, 0x00000004, 0x0010003a, 0x00000000, + 0x0010000a, 0x00000001, 0x08000011, 0x00100082, 0x00000001, 0x00208e46, + 0x00000001, 0x00000001, 0x00100e46, 0x00000000, 0x0a000032, 0x00100022, + 0x00000001, 0x0020801a, 0x00000001, 0x00000004, 0x0010003a, 0x00000000, + 0x0010003a, 0x00000001, 0x08000011, 0x00100012, 0x00000000, 0x00208e46, + 0x00000001, 0x00000002, 0x00100e46, 0x00000000, 0x0a000032, 0x00100042, + 0x00000001, 0x0020802a, 0x00000001, 0x00000004, 0x0010003a, 0x00000000, + 0x0010000a, 0x00000000, 0x08000038, 0x00102082, 0x00000000, 0x0010003a, + 0x00000000, 0x0020803a, 0x00000001, 0x00000003, 0x08000038, 0x00102072, + 0x00000000, 0x00100246, 0x00000001, 0x00208ff6, 0x00000001, 0x00000003, + 0x0100003e, 0x54415453, 0x00000074, 0x0000000a, 0x00000002, 0x00000000, + 0x00000002, 0x00000005, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, }; static ProgramWithCachedVariableLocations pshader_color_matrix_arr[1] = { - { pshader_color_matrix_0, 1232, }, + { + pshader_color_matrix_0, + 1232, + }, }; static DWORD pshader_manual_clear_0[171] = { - 0x43425844, 0xeb343b5a, 0xfec80b96, 0xf65a4d5b, 0xb96aacbe, 0x00000001, 0x000002ac, 0x00000005, - 0x00000034, 0x0000015c, 0x000001b4, 0x000001e8, 0x00000230, 0x46454452, 0x00000120, 0x00000001, - 0x00000040, 0x00000001, 0x0000001c, 0xffff0400, 0x00008100, 0x000000ed, 0x0000003c, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00635350, 0x0000003c, - 0x00000004, 0x00000058, 0x00000040, 0x00000000, 0x00000000, 0x000000b8, 0x00000000, 0x00000010, - 0x00000002, 0x000000c4, 0x00000000, 0x000000d4, 0x00000010, 0x00000010, 0x00000000, 0x000000c4, - 0x00000000, 0x000000de, 0x00000020, 0x00000010, 0x00000000, 0x000000c4, 0x00000000, 0x000000e4, - 0x00000030, 0x00000010, 0x00000000, 0x000000c4, 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, - 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, - 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, - 0x43207265, 0x69706d6f, 0x2072656c, 0x39322e39, 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, - 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, - 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, 0x505f5653, - 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, - 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, - 0x65677261, 0xabab0074, 0x52444853, 0x00000040, 0x00000040, 0x00000010, 0x04000059, 0x00208e46, - 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x06000036, 0x001020f2, 0x00000000, - 0x00208e46, 0x00000000, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000002, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xeb343b5a, 0xfec80b96, 0xf65a4d5b, 0xb96aacbe, 0x00000001, + 0x000002ac, 0x00000005, 0x00000034, 0x0000015c, 0x000001b4, 0x000001e8, + 0x00000230, 0x46454452, 0x00000120, 0x00000001, 0x00000040, 0x00000001, + 0x0000001c, 0xffff0400, 0x00008100, 0x000000ed, 0x0000003c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x00635350, 0x0000003c, 0x00000004, 0x00000058, 0x00000040, 0x00000000, + 0x00000000, 0x000000b8, 0x00000000, 0x00000010, 0x00000002, 0x000000c4, + 0x00000000, 0x000000d4, 0x00000010, 0x00000010, 0x00000000, 0x000000c4, + 0x00000000, 0x000000de, 0x00000020, 0x00000010, 0x00000000, 0x000000c4, + 0x00000000, 0x000000e4, 0x00000030, 0x00000010, 0x00000000, 0x000000c4, + 0x00000000, 0x6f6c6f63, 0x756d5f72, 0xabab006c, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6f6c6f63, 0x64615f72, 0x6f660064, 0x006c6163, + 0x63736572, 0x31656c61, 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, + 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, 0x2072656c, 0x39322e39, + 0x3235392e, 0x3131332e, 0xabab0031, 0x4e475349, 0x00000050, 0x00000002, + 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, + 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, + 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, + 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, + 0x65677261, 0xabab0074, 0x52444853, 0x00000040, 0x00000040, 0x00000010, + 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, + 0x00000000, 0x06000036, 0x001020f2, 0x00000000, 0x00208e46, 0x00000000, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000002, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static ProgramWithCachedVariableLocations pshader_manual_clear_arr[1] = { - { pshader_manual_clear_0, 684, }, + { + pshader_manual_clear_0, + 684, + }, }; static DWORD vshader_vsd3d10_0[305] = { - 0x43425844, 0xbcb06f4b, 0x808953d6, 0x687571c0, 0x1b5b041c, 0x00000001, 0x000004c4, 0x00000005, - 0x00000034, 0x000001cc, 0x00000200, 0x00000258, 0x00000448, 0x46454452, 0x00000190, 0x00000001, - 0x00000044, 0x00000001, 0x0000001c, 0xfffe0400, 0x00008100, 0x0000015f, 0x0000003c, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x61726170, 0xababab00, - 0x0000003c, 0x00000008, 0x0000005c, 0x00000080, 0x00000000, 0x00000000, 0x0000011c, 0x00000000, - 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x00000134, 0x00000010, 0x00000010, 0x00000002, - 0x00000124, 0x00000000, 0x0000013b, 0x00000020, 0x00000010, 0x00000000, 0x00000124, 0x00000000, - 0x00000141, 0x00000030, 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x0000014a, 0x00000040, - 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x00000153, 0x00000050, 0x00000010, 0x00000002, - 0x00000124, 0x00000000, 0x00000157, 0x00000060, 0x00000010, 0x00000002, 0x00000124, 0x00000000, - 0x0000015b, 0x00000070, 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x6c726f77, 0xab003064, - 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6c726f77, 0x78003164, 0x66666f5f, 0x78657400, - 0x5f6e6567, 0x65740073, 0x6e656778, 0x7800745f, 0x79006433, 0x77006433, 0x4d006433, 0x6f726369, - 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, - 0x392e3932, 0x332e3235, 0x00313131, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x49534f50, 0x4e4f4954, 0xababab00, - 0x4e47534f, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, - 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, - 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x52444853, 0x000001e8, - 0x00010040, 0x0000007a, 0x04000059, 0x00208e46, 0x00000000, 0x00000008, 0x0300005f, 0x001010f2, - 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000001, - 0x02000068, 0x00000001, 0x08000011, 0x00100012, 0x00000000, 0x00101e46, 0x00000000, 0x00208e46, - 0x00000000, 0x00000001, 0x08000038, 0x00100072, 0x00000000, 0x00100006, 0x00000000, 0x00208246, - 0x00000000, 0x00000006, 0x08000011, 0x00100082, 0x00000000, 0x00101e46, 0x00000000, 0x00208e46, - 0x00000000, 0x00000000, 0x0a000032, 0x00100072, 0x00000000, 0x00100ff6, 0x00000000, 0x00208246, - 0x00000000, 0x00000005, 0x00100246, 0x00000000, 0x08000000, 0x00100072, 0x00000000, 0x00100246, - 0x00000000, 0x00208246, 0x00000000, 0x00000007, 0x0a00000e, 0x00100042, 0x00000000, 0x00004002, - 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010002a, 0x00000000, 0x07000038, 0x00102032, - 0x00000000, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, 0x06000036, 0x00102042, 0x00000000, - 0x0020802a, 0x00000000, 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x00004001, 0x3f800000, - 0x08000011, 0x00100012, 0x00000000, 0x00208e46, 0x00000000, 0x00000003, 0x00101e46, 0x00000000, - 0x08000011, 0x00100022, 0x00000000, 0x00208e46, 0x00000000, 0x00000004, 0x00101e46, 0x00000000, - 0x07000038, 0x00102032, 0x00000001, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, 0x05000036, - 0x00102082, 0x00000001, 0x0010002a, 0x00000000, 0x05000036, 0x00102042, 0x00000001, 0x00004001, - 0x3f800000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000f, 0x00000001, 0x00000000, 0x00000003, - 0x00000009, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000004, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0xbcb06f4b, 0x808953d6, 0x687571c0, 0x1b5b041c, 0x00000001, + 0x000004c4, 0x00000005, 0x00000034, 0x000001cc, 0x00000200, 0x00000258, + 0x00000448, 0x46454452, 0x00000190, 0x00000001, 0x00000044, 0x00000001, + 0x0000001c, 0xfffe0400, 0x00008100, 0x0000015f, 0x0000003c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x61726170, 0xababab00, 0x0000003c, 0x00000008, 0x0000005c, 0x00000080, + 0x00000000, 0x00000000, 0x0000011c, 0x00000000, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000134, 0x00000010, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000013b, 0x00000020, 0x00000010, 0x00000000, + 0x00000124, 0x00000000, 0x00000141, 0x00000030, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000014a, 0x00000040, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000153, 0x00000050, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000157, 0x00000060, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000015b, 0x00000070, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x6c726f77, 0xab003064, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6c726f77, 0x78003164, 0x66666f5f, 0x78657400, + 0x5f6e6567, 0x65740073, 0x6e656778, 0x7800745f, 0x79006433, 0x77006433, + 0x4d006433, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, + 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, + 0x00313131, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x49534f50, + 0x4e4f4954, 0xababab00, 0x4e47534f, 0x00000050, 0x00000002, 0x00000008, + 0x00000038, 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, + 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, + 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, + 0x52444853, 0x000001e8, 0x00010040, 0x0000007a, 0x04000059, 0x00208e46, + 0x00000000, 0x00000008, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, + 0x001020f2, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000001, + 0x02000068, 0x00000001, 0x08000011, 0x00100012, 0x00000000, 0x00101e46, + 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x08000038, 0x00100072, + 0x00000000, 0x00100006, 0x00000000, 0x00208246, 0x00000000, 0x00000006, + 0x08000011, 0x00100082, 0x00000000, 0x00101e46, 0x00000000, 0x00208e46, + 0x00000000, 0x00000000, 0x0a000032, 0x00100072, 0x00000000, 0x00100ff6, + 0x00000000, 0x00208246, 0x00000000, 0x00000005, 0x00100246, 0x00000000, + 0x08000000, 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, + 0x00000000, 0x00000007, 0x0a00000e, 0x00100042, 0x00000000, 0x00004002, + 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010002a, 0x00000000, + 0x07000038, 0x00102032, 0x00000000, 0x00100aa6, 0x00000000, 0x00100046, + 0x00000000, 0x06000036, 0x00102042, 0x00000000, 0x0020802a, 0x00000000, + 0x00000000, 0x05000036, 0x00102082, 0x00000000, 0x00004001, 0x3f800000, + 0x08000011, 0x00100012, 0x00000000, 0x00208e46, 0x00000000, 0x00000003, + 0x00101e46, 0x00000000, 0x08000011, 0x00100022, 0x00000000, 0x00208e46, + 0x00000000, 0x00000004, 0x00101e46, 0x00000000, 0x07000038, 0x00102032, + 0x00000001, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, 0x05000036, + 0x00102082, 0x00000001, 0x0010002a, 0x00000000, 0x05000036, 0x00102042, + 0x00000001, 0x00004001, 0x3f800000, 0x0100003e, 0x54415453, 0x00000074, + 0x0000000f, 0x00000001, 0x00000000, 0x00000003, 0x00000009, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static DWORD vshader_vsd3d10_1[417] = { - 0x43425844, 0x79f68211, 0x83ecd840, 0x5fea9f88, 0xed27bac2, 0x00000001, 0x00000684, 0x00000005, - 0x00000034, 0x000001cc, 0x00000220, 0x00000278, 0x00000608, 0x46454452, 0x00000190, 0x00000001, - 0x00000044, 0x00000001, 0x0000001c, 0xfffe0400, 0x00008100, 0x0000015f, 0x0000003c, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x61726170, 0xababab00, - 0x0000003c, 0x00000008, 0x0000005c, 0x00000080, 0x00000000, 0x00000000, 0x0000011c, 0x00000000, - 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x00000134, 0x00000010, 0x00000010, 0x00000002, - 0x00000124, 0x00000000, 0x0000013b, 0x00000020, 0x00000010, 0x00000002, 0x00000124, 0x00000000, - 0x00000141, 0x00000030, 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x0000014a, 0x00000040, - 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x00000153, 0x00000050, 0x00000010, 0x00000002, - 0x00000124, 0x00000000, 0x00000157, 0x00000060, 0x00000010, 0x00000002, 0x00000124, 0x00000000, - 0x0000015b, 0x00000070, 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x6c726f77, 0xab003064, - 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6c726f77, 0x78003164, 0x66666f5f, 0x78657400, - 0x5f6e6567, 0x65740073, 0x6e656778, 0x7800745f, 0x79006433, 0x77006433, 0x4d006433, 0x6f726369, - 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, - 0x392e3932, 0x332e3235, 0x00313131, 0x4e475349, 0x0000004c, 0x00000002, 0x00000008, 0x00000038, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x00000041, 0x00000000, 0x00000000, - 0x00000002, 0x00000001, 0x0000070f, 0x49534f50, 0x4e4f4954, 0x58455400, 0x524f4f43, 0xabab0044, - 0x4e47534f, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, - 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, - 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x52444853, 0x00000388, - 0x00010040, 0x000000e2, 0x04000059, 0x00208e46, 0x00000000, 0x00000008, 0x0300005f, 0x001010f2, - 0x00000000, 0x0300005f, 0x00101072, 0x00000001, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, - 0x03000065, 0x001020f2, 0x00000001, 0x02000068, 0x00000003, 0x0500002b, 0x00100072, 0x00000000, - 0x00101496, 0x00000001, 0x0a000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00004002, - 0x3c800000, 0x3c800000, 0x3d000000, 0x00000000, 0x0800000f, 0x00100012, 0x00000001, 0x00100046, - 0x00000000, 0x00208046, 0x00000000, 0x00000002, 0x0800000f, 0x00100022, 0x00000001, 0x00100046, - 0x00000000, 0x00208ae6, 0x00000000, 0x00000002, 0x0800000f, 0x00100012, 0x00000002, 0x00100046, - 0x00000001, 0x00208046, 0x00000000, 0x00000000, 0x0800000f, 0x00100022, 0x00000002, 0x00100046, - 0x00000001, 0x00208046, 0x00000000, 0x00000001, 0x0700000f, 0x00100082, 0x00000000, 0x00100046, - 0x00000002, 0x00100046, 0x00000002, 0x0500004b, 0x00100082, 0x00000000, 0x0010003a, 0x00000000, - 0x0a000039, 0x00100012, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x0010003a, 0x00000000, 0x09000037, 0x00100082, 0x00000000, 0x0010000a, 0x00000001, 0x0010003a, - 0x00000000, 0x00004001, 0x3f800000, 0x0700000f, 0x00100012, 0x00000000, 0x00100046, 0x00000000, - 0x00100046, 0x00000000, 0x0500004b, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0700000e, - 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010003a, 0x00000000, 0x08000011, 0x00100012, - 0x00000001, 0x00101e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x08000011, 0x00100022, - 0x00000001, 0x00101e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x09000032, 0x00100032, - 0x00000000, 0x00100046, 0x00000002, 0x00100006, 0x00000000, 0x00100046, 0x00000001, 0x08000038, - 0x00100072, 0x00000001, 0x00100556, 0x00000000, 0x00208246, 0x00000000, 0x00000006, 0x0a000032, - 0x001000b2, 0x00000000, 0x00100006, 0x00000000, 0x00208846, 0x00000000, 0x00000005, 0x00100846, - 0x00000001, 0x08000000, 0x001000b2, 0x00000000, 0x00100c46, 0x00000000, 0x00208846, 0x00000000, - 0x00000007, 0x0a00000e, 0x00100082, 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, - 0x3f800000, 0x0010003a, 0x00000000, 0x07000038, 0x00102032, 0x00000000, 0x00100ff6, 0x00000000, - 0x00100046, 0x00000000, 0x06000036, 0x00102042, 0x00000000, 0x0020802a, 0x00000000, 0x00000000, - 0x05000036, 0x00102082, 0x00000000, 0x00004001, 0x3f800000, 0x08000011, 0x00100012, 0x00000000, - 0x00208e46, 0x00000000, 0x00000003, 0x00101e46, 0x00000000, 0x08000011, 0x00100022, 0x00000000, - 0x00208e46, 0x00000000, 0x00000004, 0x00101e46, 0x00000000, 0x07000038, 0x00102072, 0x00000001, - 0x00100ff6, 0x00000000, 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000001, 0x0010003a, - 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000001c, 0x00000003, 0x00000000, 0x00000004, - 0x00000013, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, - 0x00000001, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, + 0x43425844, 0x79f68211, 0x83ecd840, 0x5fea9f88, 0xed27bac2, 0x00000001, + 0x00000684, 0x00000005, 0x00000034, 0x000001cc, 0x00000220, 0x00000278, + 0x00000608, 0x46454452, 0x00000190, 0x00000001, 0x00000044, 0x00000001, + 0x0000001c, 0xfffe0400, 0x00008100, 0x0000015f, 0x0000003c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x61726170, 0xababab00, 0x0000003c, 0x00000008, 0x0000005c, 0x00000080, + 0x00000000, 0x00000000, 0x0000011c, 0x00000000, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000134, 0x00000010, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000013b, 0x00000020, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000141, 0x00000030, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000014a, 0x00000040, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000153, 0x00000050, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000157, 0x00000060, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000015b, 0x00000070, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x6c726f77, 0xab003064, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6c726f77, 0x78003164, 0x66666f5f, 0x78657400, + 0x5f6e6567, 0x65740073, 0x6e656778, 0x7800745f, 0x79006433, 0x77006433, + 0x4d006433, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, + 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, + 0x00313131, 0x4e475349, 0x0000004c, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x00000041, + 0x00000000, 0x00000000, 0x00000002, 0x00000001, 0x0000070f, 0x49534f50, + 0x4e4f4954, 0x58455400, 0x524f4f43, 0xabab0044, 0x4e47534f, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x52444853, 0x00000388, 0x00010040, 0x000000e2, + 0x04000059, 0x00208e46, 0x00000000, 0x00000008, 0x0300005f, 0x001010f2, + 0x00000000, 0x0300005f, 0x00101072, 0x00000001, 0x04000067, 0x001020f2, + 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000001, 0x02000068, + 0x00000003, 0x0500002b, 0x00100072, 0x00000000, 0x00101496, 0x00000001, + 0x0a000038, 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00004002, + 0x3c800000, 0x3c800000, 0x3d000000, 0x00000000, 0x0800000f, 0x00100012, + 0x00000001, 0x00100046, 0x00000000, 0x00208046, 0x00000000, 0x00000002, + 0x0800000f, 0x00100022, 0x00000001, 0x00100046, 0x00000000, 0x00208ae6, + 0x00000000, 0x00000002, 0x0800000f, 0x00100012, 0x00000002, 0x00100046, + 0x00000001, 0x00208046, 0x00000000, 0x00000000, 0x0800000f, 0x00100022, + 0x00000002, 0x00100046, 0x00000001, 0x00208046, 0x00000000, 0x00000001, + 0x0700000f, 0x00100082, 0x00000000, 0x00100046, 0x00000002, 0x00100046, + 0x00000002, 0x0500004b, 0x00100082, 0x00000000, 0x0010003a, 0x00000000, + 0x0a000039, 0x00100012, 0x00000001, 0x00004002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0010003a, 0x00000000, 0x09000037, 0x00100082, + 0x00000000, 0x0010000a, 0x00000001, 0x0010003a, 0x00000000, 0x00004001, + 0x3f800000, 0x0700000f, 0x00100012, 0x00000000, 0x00100046, 0x00000000, + 0x00100046, 0x00000000, 0x0500004b, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0700000e, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, + 0x0010003a, 0x00000000, 0x08000011, 0x00100012, 0x00000001, 0x00101e46, + 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x08000011, 0x00100022, + 0x00000001, 0x00101e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, + 0x09000032, 0x00100032, 0x00000000, 0x00100046, 0x00000002, 0x00100006, + 0x00000000, 0x00100046, 0x00000001, 0x08000038, 0x00100072, 0x00000001, + 0x00100556, 0x00000000, 0x00208246, 0x00000000, 0x00000006, 0x0a000032, + 0x001000b2, 0x00000000, 0x00100006, 0x00000000, 0x00208846, 0x00000000, + 0x00000005, 0x00100846, 0x00000001, 0x08000000, 0x001000b2, 0x00000000, + 0x00100c46, 0x00000000, 0x00208846, 0x00000000, 0x00000007, 0x0a00000e, + 0x00100082, 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, + 0x3f800000, 0x0010003a, 0x00000000, 0x07000038, 0x00102032, 0x00000000, + 0x00100ff6, 0x00000000, 0x00100046, 0x00000000, 0x06000036, 0x00102042, + 0x00000000, 0x0020802a, 0x00000000, 0x00000000, 0x05000036, 0x00102082, + 0x00000000, 0x00004001, 0x3f800000, 0x08000011, 0x00100012, 0x00000000, + 0x00208e46, 0x00000000, 0x00000003, 0x00101e46, 0x00000000, 0x08000011, + 0x00100022, 0x00000000, 0x00208e46, 0x00000000, 0x00000004, 0x00101e46, + 0x00000000, 0x07000038, 0x00102072, 0x00000001, 0x00100ff6, 0x00000000, + 0x00100246, 0x00000000, 0x05000036, 0x00102082, 0x00000001, 0x0010003a, + 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x0000001c, 0x00000003, + 0x00000000, 0x00000004, 0x00000013, 0x00000000, 0x00000000, 0x00000001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, }; static DWORD vshader_vsd3d10_2[300] = { - 0x43425844, 0x50edc469, 0x3be0d512, 0xffa16ac1, 0x10a3602c, 0x00000001, 0x000004b0, 0x00000005, - 0x00000034, 0x000001cc, 0x00000220, 0x00000278, 0x00000434, 0x46454452, 0x00000190, 0x00000001, - 0x00000044, 0x00000001, 0x0000001c, 0xfffe0400, 0x00008100, 0x0000015f, 0x0000003c, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x61726170, 0xababab00, - 0x0000003c, 0x00000008, 0x0000005c, 0x00000080, 0x00000000, 0x00000000, 0x0000011c, 0x00000000, - 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x00000134, 0x00000010, 0x00000010, 0x00000002, - 0x00000124, 0x00000000, 0x0000013b, 0x00000020, 0x00000010, 0x00000000, 0x00000124, 0x00000000, - 0x00000141, 0x00000030, 0x00000010, 0x00000000, 0x00000124, 0x00000000, 0x0000014a, 0x00000040, - 0x00000010, 0x00000000, 0x00000124, 0x00000000, 0x00000153, 0x00000050, 0x00000010, 0x00000002, - 0x00000124, 0x00000000, 0x00000157, 0x00000060, 0x00000010, 0x00000002, 0x00000124, 0x00000000, - 0x0000015b, 0x00000070, 0x00000010, 0x00000002, 0x00000124, 0x00000000, 0x6c726f77, 0xab003064, - 0x00030001, 0x00040001, 0x00000000, 0x00000000, 0x6c726f77, 0x78003164, 0x66666f5f, 0x78657400, - 0x5f6e6567, 0x65740073, 0x6e656778, 0x7800745f, 0x79006433, 0x77006433, 0x4d006433, 0x6f726369, - 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, - 0x392e3932, 0x332e3235, 0x00313131, 0x4e475349, 0x0000004c, 0x00000002, 0x00000008, 0x00000038, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x00000041, 0x00000000, 0x00000000, - 0x00000003, 0x00000001, 0x0000030f, 0x49534f50, 0x4e4f4954, 0x58455400, 0x524f4f43, 0xabab0044, - 0x4e47534f, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, - 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, - 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x52444853, 0x000001b4, - 0x00010040, 0x0000006d, 0x04000059, 0x00208e46, 0x00000000, 0x00000008, 0x0300005f, 0x001010f2, - 0x00000000, 0x0300005f, 0x00101032, 0x00000001, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, - 0x03000065, 0x001020f2, 0x00000001, 0x02000068, 0x00000001, 0x08000011, 0x00100012, 0x00000000, - 0x00101e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000001, 0x08000038, 0x00100072, 0x00000000, - 0x00100006, 0x00000000, 0x00208246, 0x00000000, 0x00000006, 0x08000011, 0x00100082, 0x00000000, - 0x00101e46, 0x00000000, 0x00208e46, 0x00000000, 0x00000000, 0x0a000032, 0x00100072, 0x00000000, - 0x00100ff6, 0x00000000, 0x00208246, 0x00000000, 0x00000005, 0x00100246, 0x00000000, 0x08000000, - 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, 0x00000007, 0x0a00000e, - 0x00100042, 0x00000000, 0x00004002, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x0010002a, - 0x00000000, 0x07000038, 0x00102032, 0x00000000, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, - 0x06000036, 0x00102042, 0x00000000, 0x0020802a, 0x00000000, 0x00000000, 0x05000036, 0x00102082, - 0x00000000, 0x00004001, 0x3f800000, 0x07000038, 0x00102032, 0x00000001, 0x00100aa6, 0x00000000, - 0x00101046, 0x00000001, 0x05000036, 0x00102082, 0x00000001, 0x0010002a, 0x00000000, 0x05000036, - 0x00102042, 0x00000001, 0x00004001, 0x3f800000, 0x0100003e, 0x54415453, 0x00000074, 0x0000000d, - 0x00000001, 0x00000000, 0x00000004, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0x50edc469, 0x3be0d512, 0xffa16ac1, 0x10a3602c, 0x00000001, + 0x000004b0, 0x00000005, 0x00000034, 0x000001cc, 0x00000220, 0x00000278, + 0x00000434, 0x46454452, 0x00000190, 0x00000001, 0x00000044, 0x00000001, + 0x0000001c, 0xfffe0400, 0x00008100, 0x0000015f, 0x0000003c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, + 0x61726170, 0xababab00, 0x0000003c, 0x00000008, 0x0000005c, 0x00000080, + 0x00000000, 0x00000000, 0x0000011c, 0x00000000, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000134, 0x00000010, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000013b, 0x00000020, 0x00000010, 0x00000000, + 0x00000124, 0x00000000, 0x00000141, 0x00000030, 0x00000010, 0x00000000, + 0x00000124, 0x00000000, 0x0000014a, 0x00000040, 0x00000010, 0x00000000, + 0x00000124, 0x00000000, 0x00000153, 0x00000050, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x00000157, 0x00000060, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x0000015b, 0x00000070, 0x00000010, 0x00000002, + 0x00000124, 0x00000000, 0x6c726f77, 0xab003064, 0x00030001, 0x00040001, + 0x00000000, 0x00000000, 0x6c726f77, 0x78003164, 0x66666f5f, 0x78657400, + 0x5f6e6567, 0x65740073, 0x6e656778, 0x7800745f, 0x79006433, 0x77006433, + 0x4d006433, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, + 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, + 0x00313131, 0x4e475349, 0x0000004c, 0x00000002, 0x00000008, 0x00000038, + 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x00000041, + 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x0000030f, 0x49534f50, + 0x4e4f4954, 0x58455400, 0x524f4f43, 0xabab0044, 0x4e47534f, 0x00000050, + 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, + 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, + 0x00000001, 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, + 0x44524f4f, 0xababab00, 0x52444853, 0x000001b4, 0x00010040, 0x0000006d, + 0x04000059, 0x00208e46, 0x00000000, 0x00000008, 0x0300005f, 0x001010f2, + 0x00000000, 0x0300005f, 0x00101032, 0x00000001, 0x04000067, 0x001020f2, + 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000001, 0x02000068, + 0x00000001, 0x08000011, 0x00100012, 0x00000000, 0x00101e46, 0x00000000, + 0x00208e46, 0x00000000, 0x00000001, 0x08000038, 0x00100072, 0x00000000, + 0x00100006, 0x00000000, 0x00208246, 0x00000000, 0x00000006, 0x08000011, + 0x00100082, 0x00000000, 0x00101e46, 0x00000000, 0x00208e46, 0x00000000, + 0x00000000, 0x0a000032, 0x00100072, 0x00000000, 0x00100ff6, 0x00000000, + 0x00208246, 0x00000000, 0x00000005, 0x00100246, 0x00000000, 0x08000000, + 0x00100072, 0x00000000, 0x00100246, 0x00000000, 0x00208246, 0x00000000, + 0x00000007, 0x0a00000e, 0x00100042, 0x00000000, 0x00004002, 0x3f800000, + 0x3f800000, 0x3f800000, 0x3f800000, 0x0010002a, 0x00000000, 0x07000038, + 0x00102032, 0x00000000, 0x00100aa6, 0x00000000, 0x00100046, 0x00000000, + 0x06000036, 0x00102042, 0x00000000, 0x0020802a, 0x00000000, 0x00000000, + 0x05000036, 0x00102082, 0x00000000, 0x00004001, 0x3f800000, 0x07000038, + 0x00102032, 0x00000001, 0x00100aa6, 0x00000000, 0x00101046, 0x00000001, + 0x05000036, 0x00102082, 0x00000001, 0x0010002a, 0x00000000, 0x05000036, + 0x00102042, 0x00000001, 0x00004001, 0x3f800000, 0x0100003e, 0x54415453, + 0x00000074, 0x0000000d, 0x00000001, 0x00000000, 0x00000004, 0x00000007, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; static ProgramWithCachedVariableLocations vshader_vsd3d10_arr[3] = { - { vshader_vsd3d10_0, 1220, }, - { vshader_vsd3d10_1, 1668, }, - { vshader_vsd3d10_2, 1200, }, + { + vshader_vsd3d10_0, + 1220, + }, + { + vshader_vsd3d10_1, + 1668, + }, + { + vshader_vsd3d10_2, + 1200, + }, }; - diff --git a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d1x_shared.inl b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d1x_shared.inl index 66167f977..9f3cba01f 100644 --- a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d1x_shared.inl +++ b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d1x_shared.inl @@ -1,67 +1,70 @@ -// gdraw_d3d1x_shared.inl - author: Fabian Giesen - copyright 2012 RAD Game Tools +// gdraw_d3d1x_shared.inl - author: Fabian Giesen - copyright 2012 RAD Game +// Tools // -// This file implements the part of the Iggy graphics driver layer shared between -// D3D10 and 11 (which is most of it). It heavily depends on a bunch of typedefs, -// #defines and utility functions that need to be set up correctly for the D3D version -// being targeted. This is a bit ugly, but much easier to maintain than the original -// solution, where we just kept two almost identical versions of this code. +// This file implements the part of the Iggy graphics driver layer shared +// between D3D10 and 11 (which is most of it). It heavily depends on a bunch of +// typedefs, #defines and utility functions that need to be set up correctly for +// the D3D version being targeted. This is a bit ugly, but much easier to +// maintain than the original solution, where we just kept two almost identical +// versions of this code. // That native handle type holds resource handles and a coarse description. typedef union { - // handle that is a texture - struct { - ID3D1X(Texture2D) *d3d; - ID3D1X(ShaderResourceView) *d3d_view; - ID3D1X(RenderTargetView) *d3d_rtview; - U32 w, h; - } tex; + // handle that is a texture + struct { + ID3D1X(Texture2D) * d3d; + ID3D1X(ShaderResourceView) * d3d_view; + ID3D1X(RenderTargetView) * d3d_rtview; + U32 w, h; + } tex; - // handle that is a vertex buffer - struct { - ID3D1X(Buffer) *verts; - ID3D1X(Buffer) *inds; - } vbuf; + // handle that is a vertex buffer + struct { + ID3D1X(Buffer) * verts; + ID3D1X(Buffer) * inds; + } vbuf; } GDrawNativeHandle; -#define GDRAW_NO_STREAMING_MIPGEN // This renderer doesn't use GDraw-internal mipmap generation +#define GDRAW_NO_STREAMING_MIPGEN // This renderer doesn't use GDraw-internal + // mipmap generation #include "gdraw_shared.inl" // max rendertarget stack depth. this depends on the extent to which you // use filters and non-standard blend modes, and how nested they are. -#define MAX_RENDER_STACK_DEPTH 8 // Iggy is hardcoded to a limit of 16... probably 1-3 is realistic -#define AATEX_SAMPLER 7 // sampler that aa_tex gets set in -#define STENCIL_STATE_CACHE_SIZE 32 // number of distinct stencil states we cache DepthStencilStates for -#define QUAD_IB_COUNT 2048 // quad index buffer has indices for this many quads +#define MAX_RENDER_STACK_DEPTH \ + 8 // Iggy is hardcoded to a limit of 16... probably 1-3 is realistic +#define AATEX_SAMPLER 7 // sampler that aa_tex gets set in +#define STENCIL_STATE_CACHE_SIZE \ + 32 // number of distinct stencil states we cache DepthStencilStates for +#define QUAD_IB_COUNT 2048 // quad index buffer has indices for this many quads -#define ASSERT_COUNT(a,b) ((a) == (b) ? (b) : -1) +#define ASSERT_COUNT(a, b) ((a) == (b) ? (b) : -1) static GDrawFunctions gdraw_funcs; // render target state -typedef struct -{ - GDrawHandle *color_buffer; - S32 base_x, base_y, width, height; - U32 flags; - rrbool cached; +typedef struct { + GDrawHandle* color_buffer; + S32 base_x, base_y, width, height; + U32 flags; + rrbool cached; } GDrawFramebufferState; -struct ProgramWithCachedVariableLocations -{ - DWORD *bytecode; - union { - DWORD size; - ID3D1X(PixelShader) *pshader; - ID3D1X(VertexShader) *vshader; - }; +struct ProgramWithCachedVariableLocations { + DWORD* bytecode; + union { + DWORD size; + ID3D1X(PixelShader) * pshader; + ID3D1X(VertexShader) * vshader; + }; }; -struct DynBuffer -{ - ID3D1X(Buffer) *buffer; - U32 size; // size of buffer - U32 write_pos; // start of most recently allocated chunk - U32 alloc_pos; // end of most recently allocated chunk (=start of next allocation) +struct DynBuffer { + ID3D1X(Buffer) * buffer; + U32 size; // size of buffer + U32 write_pos; // start of most recently allocated chunk + U32 alloc_pos; // end of most recently allocated chunk (=start of next + // allocation) }; /////////////////////////////////////////////////////////////////////////////// @@ -75,173 +78,174 @@ struct DynBuffer // graphics state so that it doesn't have to callback into Iggy // to get at that graphics state. -typedef struct -{ - ID3D1XDevice *d3d_device; - ID3D1XContext *d3d_context; +typedef struct { + ID3D1XDevice* d3d_device; + ID3D1XContext* d3d_context; - // fragment shaders - ProgramWithCachedVariableLocations fprog[GDRAW_TEXTURE__count][3]; - ProgramWithCachedVariableLocations exceptional_blend[GDRAW_BLENDSPECIAL__count]; - ProgramWithCachedVariableLocations filter_prog[2][16]; - ProgramWithCachedVariableLocations blur_prog[MAX_TAPS+1]; - ProgramWithCachedVariableLocations colormatrix; - ProgramWithCachedVariableLocations clear_ps; + // fragment shaders + ProgramWithCachedVariableLocations fprog[GDRAW_TEXTURE__count][3]; + ProgramWithCachedVariableLocations + exceptional_blend[GDRAW_BLENDSPECIAL__count]; + ProgramWithCachedVariableLocations filter_prog[2][16]; + ProgramWithCachedVariableLocations blur_prog[MAX_TAPS + 1]; + ProgramWithCachedVariableLocations colormatrix; + ProgramWithCachedVariableLocations clear_ps; - // vertex input layouts - ID3D1X(InputLayout) *inlayout[GDRAW_vformat__count]; + // vertex input layouts + ID3D1X(InputLayout) * inlayout[GDRAW_vformat__count]; - // vertex shaders - ProgramWithCachedVariableLocations vert[GDRAW_vformat__count]; // [format] + // vertex shaders + ProgramWithCachedVariableLocations vert[GDRAW_vformat__count]; // [format] - // render targets - GDrawHandleCache rendertargets; - GDrawHandle rendertarget_handles[MAX_RENDER_STACK_DEPTH]; // not -1, because we use +1 to initialize + // render targets + GDrawHandleCache rendertargets; + GDrawHandle + rendertarget_handles[MAX_RENDER_STACK_DEPTH]; // not -1, because we use + // +1 to initialize - gswf_recti rt_valid[MAX_RENDER_STACK_DEPTH+1]; // valid rect for texture clamping + gswf_recti rt_valid[MAX_RENDER_STACK_DEPTH + + 1]; // valid rect for texture clamping - // size of framebuffer-sized texture used for implementing blend modes - S32 frametex_width, frametex_height; + // size of framebuffer-sized texture used for implementing blend modes + S32 frametex_width, frametex_height; - // viewport setting (in pixels) for current frame - S32 vx,vy; - S32 fw,fh; // full width/height of virtual display - S32 tw,th; // actual width/height of current tile - S32 tpw,tph; // width/height of padded version of tile + // viewport setting (in pixels) for current frame + S32 vx, vy; + S32 fw, fh; // full width/height of virtual display + S32 tw, th; // actual width/height of current tile + S32 tpw, tph; // width/height of padded version of tile - S32 tx0,ty0; - S32 tx0p,ty0p; - rrbool in_blur; - struct { - S32 x,y,w,h; - } cview; // current viewport + S32 tx0, ty0; + S32 tx0p, ty0p; + rrbool in_blur; + struct { + S32 x, y, w, h; + } cview; // current viewport - F32 projection[4]; // scalex,scaley,transx,transy - F32 projmat[3][4]; - F32 xform_3d[3][4]; - rrbool use_3d; + F32 projection[4]; // scalex,scaley,transx,transy + F32 projmat[3][4]; + F32 xform_3d[3][4]; + rrbool use_3d; - ID3D1X(RenderTargetView) *main_framebuffer; - ID3D1X(DepthStencilView) *depth_buffer[2]; // 0=main, 1=rendertarget - ID3D1X(ShaderResourceView) *main_resolve_target; - rrbool main_msaa; // does main framebuffer have MSAA enabled? + ID3D1X(RenderTargetView) * main_framebuffer; + ID3D1X(DepthStencilView) * depth_buffer[2]; // 0=main, 1=rendertarget + ID3D1X(ShaderResourceView) * main_resolve_target; + rrbool main_msaa; // does main framebuffer have MSAA enabled? - ID3D1X(Texture2D) *rt_depth_buffer; - ID3D1X(Texture2D) *aa_tex; - ID3D1X(ShaderResourceView) *aa_tex_view; - ID3D1X(Buffer) *quad_ib; // canned quad indices + ID3D1X(Texture2D) * rt_depth_buffer; + ID3D1X(Texture2D) * aa_tex; + ID3D1X(ShaderResourceView) * aa_tex_view; + ID3D1X(Buffer) * quad_ib; // canned quad indices - // scale factor converting worldspace to viewspace <0,0>.. - F32 world_to_pixel[2]; + // scale factor converting worldspace to viewspace <0,0>.. + F32 world_to_pixel[2]; - // state objects - ID3D1X(RasterizerState) *raster_state[2]; // [msaa] - ID3D1X(SamplerState) *sampler_state[2][GDRAW_WRAP__count]; // [nearest][wrap] - ID3D1X(BlendState) *blend_state[GDRAW_BLEND__count]; - ID3D1X(BlendState) *blend_no_color_write; - ID3D1X(DepthStencilState) *depth_state[2][2]; // [set_id][test_id] + // state objects + ID3D1X(RasterizerState) * raster_state[2]; // [msaa] + ID3D1X(SamplerState) * + sampler_state[2][GDRAW_WRAP__count]; // [nearest][wrap] + ID3D1X(BlendState) * blend_state[GDRAW_BLEND__count]; + ID3D1X(BlendState) * blend_no_color_write; + ID3D1X(DepthStencilState) * depth_state[2][2]; // [set_id][test_id] - // stencil state cache - // SOA so the keys are tightly packed in a few cache lines! - U32 stencil_cache_key[STENCIL_STATE_CACHE_SIZE]; - ID3D1X(DepthStencilState) *stencil_cache[STENCIL_STATE_CACHE_SIZE]; - U32 stencil_cache_lru[STENCIL_STATE_CACHE_SIZE]; - U32 stencil_cache_now; + // stencil state cache + // SOA so the keys are tightly packed in a few cache lines! + U32 stencil_cache_key[STENCIL_STATE_CACHE_SIZE]; + ID3D1X(DepthStencilState) * stencil_cache[STENCIL_STATE_CACHE_SIZE]; + U32 stencil_cache_lru[STENCIL_STATE_CACHE_SIZE]; + U32 stencil_cache_now; - // constant buffers - ID3D1X(Buffer) *cb_vertex; - ID3D1X(Buffer) *cb_ps_common; - ID3D1X(Buffer) *cb_filter; - ID3D1X(Buffer) *cb_colormatrix; - ID3D1X(Buffer) *cb_blur; + // constant buffers + ID3D1X(Buffer) * cb_vertex; + ID3D1X(Buffer) * cb_ps_common; + ID3D1X(Buffer) * cb_filter; + ID3D1X(Buffer) * cb_colormatrix; + ID3D1X(Buffer) * cb_blur; - // streaming buffers for dynamic vertex/index data - DynBuffer dyn_vb; - DynBuffer dyn_ib; + // streaming buffers for dynamic vertex/index data + DynBuffer dyn_vb; + DynBuffer dyn_ib; - U32 dyn_maxalloc, last_dyn_maxalloc; - S32 max_quad_vert_count; + U32 dyn_maxalloc, last_dyn_maxalloc; + S32 max_quad_vert_count; - // cached state - U32 scissor_state; // ~0 if unknown, otherwise 0 or 1 - S32 blend_mode; // -1 if unknown, otherwise GDRAW_BLEND_* + // cached state + U32 scissor_state; // ~0 if unknown, otherwise 0 or 1 + S32 blend_mode; // -1 if unknown, otherwise GDRAW_BLEND_* - // render-state stack described above for 'temporary' rendering - GDrawFramebufferState frame[MAX_RENDER_STACK_DEPTH]; - GDrawFramebufferState *cur; + // render-state stack described above for 'temporary' rendering + GDrawFramebufferState frame[MAX_RENDER_STACK_DEPTH]; + GDrawFramebufferState* cur; - // texture and vertex buffer pools - GDrawHandleCache *texturecache; - GDrawHandleCache *vbufcache; + // texture and vertex buffer pools + GDrawHandleCache* texturecache; + GDrawHandleCache* vbufcache; - // stat tracking - rrbool frame_done; - U64 frame_counter; + // stat tracking + rrbool frame_done; + U64 frame_counter; - // error handler - void (__cdecl *error_handler)(HRESULT hr); + // error handler + void(__cdecl* error_handler)(HRESULT hr); } GDraw; -static GDraw *gdraw; +static GDraw* gdraw; -static const F32 four_zeros[4] = { 0 }; // used in several places +static const F32 four_zeros[4] = {0}; // used in several places //////////////////////////////////////////////////////////////////////// // // General resource management for both textures and vertex buffers // -template -static void safe_release(T *&p) -{ - if (p) { - p->Release(); - p = NULL; - } +template +static void safe_release(T*& p) { + if (p) { + p->Release(); + p = NULL; + } } -static void report_d3d_error(HRESULT hr, char *call, char *context) -{ - if (hr == E_OUTOFMEMORY) - IggyGDrawSendWarning(NULL, "GDraw D3D out of memory in %s%s", call, context); - else - IggyGDrawSendWarning(NULL, "GDraw D3D error in %s%s: 0x%08x", call, context, hr); +static void report_d3d_error(HRESULT hr, char* call, char* context) { + if (hr == E_OUTOFMEMORY) + IggyGDrawSendWarning(NULL, "GDraw D3D out of memory in %s%s", call, + context); + else + IggyGDrawSendWarning(NULL, "GDraw D3D error in %s%s: 0x%08x", call, + context, hr); } -static void unbind_resources(void) -{ - ID3D1XContext *d3d = gdraw->d3d_context; +static void unbind_resources(void) { + ID3D1XContext* d3d = gdraw->d3d_context; - // unset active textures and vertex/index buffers, - // to make sure there are no dangling refs - static ID3D1X(ShaderResourceView) *no_views[3] = { 0 }; - ID3D1X(Buffer) *no_vb = NULL; - UINT no_offs = 0; + // unset active textures and vertex/index buffers, + // to make sure there are no dangling refs + static ID3D1X(ShaderResourceView) * no_views[3] = {0}; + ID3D1X(Buffer)* no_vb = NULL; + UINT no_offs = 0; - d3d->PSSetShaderResources(0, 3, no_views); - d3d->IASetVertexBuffers(0, 1, &no_vb, &no_offs, &no_offs); - d3d->IASetIndexBuffer(NULL, DXGI_FORMAT_UNKNOWN, 0); + d3d->PSSetShaderResources(0, 3, no_views); + d3d->IASetVertexBuffers(0, 1, &no_vb, &no_offs, &no_offs); + d3d->IASetIndexBuffer(NULL, DXGI_FORMAT_UNKNOWN, 0); } -static void api_free_resource(GDrawHandle *r) -{ - unbind_resources(); - if (r->state != GDRAW_HANDLE_STATE_user_owned) { - if (!r->cache->is_vertex) { - safe_release(r->handle.tex.d3d_view); - safe_release(r->handle.tex.d3d_rtview); - safe_release(r->handle.tex.d3d); - } else { - safe_release(r->handle.vbuf.verts); - safe_release(r->handle.vbuf.inds); - } - } +static void api_free_resource(GDrawHandle* r) { + unbind_resources(); + if (r->state != GDRAW_HANDLE_STATE_user_owned) { + if (!r->cache->is_vertex) { + safe_release(r->handle.tex.d3d_view); + safe_release(r->handle.tex.d3d_rtview); + safe_release(r->handle.tex.d3d); + } else { + safe_release(r->handle.vbuf.verts); + safe_release(r->handle.vbuf.inds); + } + } } -static void RADLINK gdraw_UnlockHandles(GDrawStats * /*stats*/) -{ - gdraw_HandleCacheUnlockAll(gdraw->texturecache); - gdraw_HandleCacheUnlockAll(gdraw->vbufcache); +static void RADLINK gdraw_UnlockHandles(GDrawStats* /*stats*/) { + gdraw_HandleCacheUnlockAll(gdraw->texturecache); + gdraw_HandleCacheUnlockAll(gdraw->vbufcache); } //////////////////////////////////////////////////////////////////////// @@ -249,42 +253,43 @@ static void RADLINK gdraw_UnlockHandles(GDrawStats * /*stats*/) // Dynamic buffer // -static void *start_write_dyn(DynBuffer *buf, U32 size) -{ - U8 *ptr = NULL; +static void* start_write_dyn(DynBuffer* buf, U32 size) { + U8* ptr = NULL; - if (size > buf->size) { - IggyGDrawSendWarning(NULL, "GDraw dynamic vertex buffer usage of %d bytes in one call larger than buffer size %d", size, buf->size); - return NULL; - } + if (size > buf->size) { + IggyGDrawSendWarning(NULL, + "GDraw dynamic vertex buffer usage of %d bytes in " + "one call larger than buffer size %d", + size, buf->size); + return NULL; + } - // update statistics - gdraw->dyn_maxalloc = RR_MAX(gdraw->dyn_maxalloc, size); + // update statistics + gdraw->dyn_maxalloc = RR_MAX(gdraw->dyn_maxalloc, size); - // invariant: current alloc_pos is in [0,size] - assert(buf->alloc_pos <= buf->size); + // invariant: current alloc_pos is in [0,size] + assert(buf->alloc_pos <= buf->size); - // wrap around when less than "size" bytes left in buffer - buf->write_pos = ((buf->size - buf->alloc_pos) < size) ? 0 : buf->alloc_pos; + // wrap around when less than "size" bytes left in buffer + buf->write_pos = ((buf->size - buf->alloc_pos) < size) ? 0 : buf->alloc_pos; - // discard buffer whenever the current write position is 0; - // done this way so that if a DISCARD Map() were to fail, we would - // just keep retrying the next time around. - ptr = (U8 *) map_buffer(gdraw->d3d_context, buf->buffer, buf->write_pos == 0); - if (ptr) { - ptr += buf->write_pos; // we return pointer to write position in buffer - buf->alloc_pos = buf->write_pos + size; // bump alloc position - assert(buf->alloc_pos <= buf->size); // invariant again - } - // if map_buffer fails, it will have sent a warning + // discard buffer whenever the current write position is 0; + // done this way so that if a DISCARD Map() were to fail, we would + // just keep retrying the next time around. + ptr = (U8*)map_buffer(gdraw->d3d_context, buf->buffer, buf->write_pos == 0); + if (ptr) { + ptr += buf->write_pos; // we return pointer to write position in buffer + buf->alloc_pos = buf->write_pos + size; // bump alloc position + assert(buf->alloc_pos <= buf->size); // invariant again + } + // if map_buffer fails, it will have sent a warning - return ptr; + return ptr; } -static U32 end_write_dyn(DynBuffer *buf) -{ - unmap_buffer(gdraw->d3d_context, buf->buffer); - return buf->write_pos; +static U32 end_write_dyn(DynBuffer* buf) { + unmap_buffer(gdraw->d3d_context, buf->buffer); + return buf->write_pos; } //////////////////////////////////////////////////////////////////////// @@ -292,76 +297,76 @@ static U32 end_write_dyn(DynBuffer *buf) // Stencil state cache // -static void stencil_state_cache_clear() -{ - S32 i; +static void stencil_state_cache_clear() { + S32 i; - for (i=0; i < STENCIL_STATE_CACHE_SIZE; ++i) { - gdraw->stencil_cache_key[i] = 0; - safe_release(gdraw->stencil_cache[i]); - gdraw->stencil_cache_lru[i] = 0; - } + for (i = 0; i < STENCIL_STATE_CACHE_SIZE; ++i) { + gdraw->stencil_cache_key[i] = 0; + safe_release(gdraw->stencil_cache[i]); + gdraw->stencil_cache_lru[i] = 0; + } - gdraw->stencil_cache_now = 0; + gdraw->stencil_cache_now = 0; } -static ID3D1X(DepthStencilState) *stencil_state_cache_lookup(rrbool set_id, rrbool test_id, U8 read_mask, U8 write_mask) -{ - D3D1X_(DEPTH_STENCIL_DESC) desc; - S32 i, best = 0; - U32 key = (set_id << 1) | test_id | (read_mask << 8) | (write_mask << 16); - U32 now, age, highest_age; - HRESULT hr; +static ID3D1X(DepthStencilState) * + stencil_state_cache_lookup(rrbool set_id, rrbool test_id, U8 read_mask, + U8 write_mask) { + D3D1X_(DEPTH_STENCIL_DESC) desc; + S32 i, best = 0; + U32 key = (set_id << 1) | test_id | (read_mask << 8) | (write_mask << 16); + U32 now, age, highest_age; + HRESULT hr; - // for LRU - now = ++gdraw->stencil_cache_now; + // for LRU + now = ++gdraw->stencil_cache_now; - // do we have this in the cache? - for (i=0; i < STENCIL_STATE_CACHE_SIZE; ++i) { - if (gdraw->stencil_cache_key[i] == key) { - gdraw->stencil_cache_lru[i] = now; - return gdraw->stencil_cache[i]; - } - } + // do we have this in the cache? + for (i = 0; i < STENCIL_STATE_CACHE_SIZE; ++i) { + if (gdraw->stencil_cache_key[i] == key) { + gdraw->stencil_cache_lru[i] = now; + return gdraw->stencil_cache[i]; + } + } - // not in the cache, find the best slot to replace it with (LRU) - highest_age = 0; - for (i=0; i < STENCIL_STATE_CACHE_SIZE; ++i) { - if (!gdraw->stencil_cache[i]) { // unused slot! - best = i; - break; - } + // not in the cache, find the best slot to replace it with (LRU) + highest_age = 0; + for (i = 0; i < STENCIL_STATE_CACHE_SIZE; ++i) { + if (!gdraw->stencil_cache[i]) { // unused slot! + best = i; + break; + } - age = now - gdraw->stencil_cache_lru[i]; - if (age > highest_age) { - highest_age = age; - best = i; - } - } + age = now - gdraw->stencil_cache_lru[i]; + if (age > highest_age) { + highest_age = age; + best = i; + } + } - // release old depth/stencil state at that position and create new one - safe_release(gdraw->stencil_cache[best]); + // release old depth/stencil state at that position and create new one + safe_release(gdraw->stencil_cache[best]); - gdraw->depth_state[set_id][test_id]->GetDesc(&desc); // reference state - desc.StencilEnable = TRUE; - desc.StencilReadMask = read_mask; - desc.StencilWriteMask = write_mask; - desc.FrontFace.StencilFailOp = D3D1X_(STENCIL_OP_KEEP); - desc.FrontFace.StencilDepthFailOp = D3D1X_(STENCIL_OP_KEEP); - desc.FrontFace.StencilPassOp = D3D1X_(STENCIL_OP_REPLACE); - desc.FrontFace.StencilFunc = D3D1X_(COMPARISON_EQUAL); - desc.BackFace.StencilFailOp = D3D1X_(STENCIL_OP_KEEP); - desc.BackFace.StencilDepthFailOp = D3D1X_(STENCIL_OP_KEEP); - desc.BackFace.StencilPassOp = D3D1X_(STENCIL_OP_REPLACE); - desc.BackFace.StencilFunc = D3D1X_(COMPARISON_EQUAL); + gdraw->depth_state[set_id][test_id]->GetDesc(&desc); // reference state + desc.StencilEnable = TRUE; + desc.StencilReadMask = read_mask; + desc.StencilWriteMask = write_mask; + desc.FrontFace.StencilFailOp = D3D1X_(STENCIL_OP_KEEP); + desc.FrontFace.StencilDepthFailOp = D3D1X_(STENCIL_OP_KEEP); + desc.FrontFace.StencilPassOp = D3D1X_(STENCIL_OP_REPLACE); + desc.FrontFace.StencilFunc = D3D1X_(COMPARISON_EQUAL); + desc.BackFace.StencilFailOp = D3D1X_(STENCIL_OP_KEEP); + desc.BackFace.StencilDepthFailOp = D3D1X_(STENCIL_OP_KEEP); + desc.BackFace.StencilPassOp = D3D1X_(STENCIL_OP_REPLACE); + desc.BackFace.StencilFunc = D3D1X_(COMPARISON_EQUAL); - hr = gdraw->d3d_device->CreateDepthStencilState(&desc, &gdraw->stencil_cache[best]); - if (FAILED(hr)) - report_d3d_error(hr, "CreateDepthStencilState", ""); + hr = gdraw->d3d_device->CreateDepthStencilState( + &desc, &gdraw->stencil_cache[best]); + if (FAILED(hr)) report_d3d_error(hr, "CreateDepthStencilState", ""); - gdraw->stencil_cache_key[best] = key; - gdraw->stencil_cache_lru[best] = now; - return gdraw->stencil_cache[best]; + gdraw->stencil_cache_key[best] = key; + gdraw->stencil_cache_lru[best] = now; + return gdraw->stencil_cache[best]; } //////////////////////////////////////////////////////////////////////// @@ -369,238 +374,278 @@ static ID3D1X(DepthStencilState) *stencil_state_cache_lookup(rrbool set_id, rrbo // Texture creation/updating/deletion // -extern GDrawTexture *gdraw_D3D1X_(WrappedTextureCreate)(ID3D1X(ShaderResourceView) *tex_view) -{ - GDrawStats stats={0}; - GDrawHandle *p = gdraw_res_alloc_begin(gdraw->texturecache, 0, &stats); // it may need to free one item to give us a handle - p->handle.tex.d3d = NULL; - p->handle.tex.d3d_view = tex_view; - p->handle.tex.d3d_rtview = NULL; - p->handle.tex.w = 1; - p->handle.tex.h = 1; - gdraw_HandleCacheAllocateEnd(p, 0, NULL, GDRAW_HANDLE_STATE_user_owned); - return (GDrawTexture *) p; +extern GDrawTexture* gdraw_D3D1X_(WrappedTextureCreate)( + ID3D1X(ShaderResourceView) * tex_view) { + GDrawStats stats = {0}; + GDrawHandle* p = gdraw_res_alloc_begin( + gdraw->texturecache, 0, + &stats); // it may need to free one item to give us a handle + p->handle.tex.d3d = NULL; + p->handle.tex.d3d_view = tex_view; + p->handle.tex.d3d_rtview = NULL; + p->handle.tex.w = 1; + p->handle.tex.h = 1; + gdraw_HandleCacheAllocateEnd(p, 0, NULL, GDRAW_HANDLE_STATE_user_owned); + return (GDrawTexture*)p; } -extern void gdraw_D3D1X_(WrappedTextureChange)(GDrawTexture *tex, ID3D1X(ShaderResourceView) *tex_view) -{ - GDrawHandle *p = (GDrawHandle *) tex; - p->handle.tex.d3d = NULL; - p->handle.tex.d3d_view = tex_view; +extern void gdraw_D3D1X_(WrappedTextureChange)(GDrawTexture* tex, + ID3D1X(ShaderResourceView) * + tex_view) { + GDrawHandle* p = (GDrawHandle*)tex; + p->handle.tex.d3d = NULL; + p->handle.tex.d3d_view = tex_view; } -extern void gdraw_D3D1X_(WrappedTextureDestroy)(GDrawTexture *tex) -{ - GDrawStats stats={0}; - gdraw_res_free((GDrawHandle *) tex, &stats); +extern void gdraw_D3D1X_(WrappedTextureDestroy)(GDrawTexture* tex) { + GDrawStats stats = {0}; + gdraw_res_free((GDrawHandle*)tex, &stats); } -static void RADLINK gdraw_SetTextureUniqueID(GDrawTexture *tex, void *old_id, void *new_id) -{ - GDrawHandle *p = (GDrawHandle *) tex; - // if this is still the handle it's thought to be, change the owner; - // if the owner *doesn't* match, then they're changing a stale handle, so ignore - if (p->owner == old_id) - p->owner = new_id; +static void RADLINK gdraw_SetTextureUniqueID(GDrawTexture* tex, void* old_id, + void* new_id) { + GDrawHandle* p = (GDrawHandle*)tex; + // if this is still the handle it's thought to be, change the owner; + // if the owner *doesn't* match, then they're changing a stale handle, so + // ignore + if (p->owner == old_id) p->owner = new_id; } +static rrbool RADLINK gdraw_MakeTextureBegin( + void* owner, S32 width, S32 height, gdraw_texture_format format, U32 flags, + GDraw_MakeTexture_ProcessingInfo* p, GDrawStats* stats) { + GDrawHandle* t = NULL; + DXGI_FORMAT dxgi_fmt; + S32 bpp, size = 0, nmips = 0; -static rrbool RADLINK gdraw_MakeTextureBegin(void *owner, S32 width, S32 height, gdraw_texture_format format, U32 flags, GDraw_MakeTexture_ProcessingInfo *p, GDrawStats *stats) -{ - GDrawHandle *t = NULL; - DXGI_FORMAT dxgi_fmt; - S32 bpp, size = 0, nmips = 0; + if (width >= 16384 || height >= 16384) { + IggyGDrawSendWarning( + NULL, + "GDraw texture size too large (%d x %d), dimension limit is 16384", + width, height); + return false; + } - if (width >= 16384 || height >= 16384) { - IggyGDrawSendWarning(NULL, "GDraw texture size too large (%d x %d), dimension limit is 16384", width, height); - return false; - } + if (format == GDRAW_TEXTURE_FORMAT_rgba32) { + dxgi_fmt = DXGI_FORMAT_R8G8B8A8_UNORM; + bpp = 4; + } else { + dxgi_fmt = DXGI_FORMAT_R8_UNORM; + bpp = 1; + } - if (format == GDRAW_TEXTURE_FORMAT_rgba32) { - dxgi_fmt = DXGI_FORMAT_R8G8B8A8_UNORM; - bpp = 4; - } else { - dxgi_fmt = DXGI_FORMAT_R8_UNORM; - bpp = 1; - } + // compute estimated size of texture in video memory + do { + size += RR_MAX(width >> nmips, 1) * RR_MAX(height >> nmips, 1) * bpp; + ++nmips; + } while ((flags & GDRAW_MAKETEXTURE_FLAGS_mipmap) && + ((width >> nmips) || (height >> nmips))); - // compute estimated size of texture in video memory - do { - size += RR_MAX(width >> nmips, 1) * RR_MAX(height >> nmips, 1) * bpp; - ++nmips; - } while ((flags & GDRAW_MAKETEXTURE_FLAGS_mipmap) && ((width >> nmips) || (height >> nmips))); + // try to allocate memory for the client to write to + p->texture_data = (U8*)IggyGDrawMalloc(size); + if (!p->texture_data) { + IggyGDrawSendWarning(NULL, + "GDraw out of memory to store texture data to " + "pass to D3D for %d x %d texture", + width, height); + return false; + } - // try to allocate memory for the client to write to - p->texture_data = (U8 *) IggyGDrawMalloc(size); - if (!p->texture_data) { - IggyGDrawSendWarning(NULL, "GDraw out of memory to store texture data to pass to D3D for %d x %d texture", width, height); - return false; - } + // allocate a handle and make room in the cache for this much data + t = gdraw_res_alloc_begin(gdraw->texturecache, size, stats); + if (!t) { + IggyGDrawFree(p->texture_data); + return false; + } - // allocate a handle and make room in the cache for this much data - t = gdraw_res_alloc_begin(gdraw->texturecache, size, stats); - if (!t) { - IggyGDrawFree(p->texture_data); - return false; - } + t->handle.tex.w = width; + t->handle.tex.h = height; + t->handle.tex.d3d = NULL; + t->handle.tex.d3d_view = NULL; + t->handle.tex.d3d_rtview = NULL; - t->handle.tex.w = width; - t->handle.tex.h = height; - t->handle.tex.d3d = NULL; - t->handle.tex.d3d_view = NULL; - t->handle.tex.d3d_rtview = NULL; + p->texture_type = GDRAW_TEXTURE_TYPE_rgba; + p->p0 = t; + p->p1 = owner; + p->i0 = width; + p->i1 = height; + p->i2 = flags; + p->i3 = dxgi_fmt; + p->i4 = size; + p->i5 = nmips; + p->i6 = bpp; - p->texture_type = GDRAW_TEXTURE_TYPE_rgba; - p->p0 = t; - p->p1 = owner; - p->i0 = width; - p->i1 = height; - p->i2 = flags; - p->i3 = dxgi_fmt; - p->i4 = size; - p->i5 = nmips; - p->i6 = bpp; + p->stride_in_bytes = width * bpp; + p->num_rows = height; - p->stride_in_bytes = width * bpp; - p->num_rows = height; - - return true; + return true; } -static rrbool RADLINK gdraw_MakeTextureMore(GDraw_MakeTexture_ProcessingInfo * /*p*/) -{ - return false; +static rrbool RADLINK +gdraw_MakeTextureMore(GDraw_MakeTexture_ProcessingInfo* /*p*/) { + return false; } -static GDrawTexture * RADLINK gdraw_MakeTextureEnd(GDraw_MakeTexture_ProcessingInfo *p, GDrawStats *stats) -{ - GDrawHandle *t = (GDrawHandle *) p->p0; - D3D1X_(SUBRESOURCE_DATA) mipdata[24]; - S32 i, w, h, nmips, bpp; - HRESULT hr = 0; - char *failed_call; - U8 *ptr; +static GDrawTexture* RADLINK +gdraw_MakeTextureEnd(GDraw_MakeTexture_ProcessingInfo* p, GDrawStats* stats) { + GDrawHandle* t = (GDrawHandle*)p->p0; + D3D1X_(SUBRESOURCE_DATA) mipdata[24]; + S32 i, w, h, nmips, bpp; + HRESULT hr = 0; + char* failed_call; + U8* ptr; - // generate mip maps and set up descriptors for them - assert(p->i5 <= 24); - ptr = p->texture_data; - w = p->i0; - h = p->i1; - nmips = p->i5; - bpp = p->i6; + // generate mip maps and set up descriptors for them + assert(p->i5 <= 24); + ptr = p->texture_data; + w = p->i0; + h = p->i1; + nmips = p->i5; + bpp = p->i6; - for (i=0; i < nmips; ++i) { - mipdata[i].pSysMem = ptr; - mipdata[i].SysMemPitch = RR_MAX(w >> i, 1) * bpp; - mipdata[i].SysMemSlicePitch = 0; - ptr += mipdata[i].SysMemPitch * RR_MAX(h >> i, 1); + for (i = 0; i < nmips; ++i) { + mipdata[i].pSysMem = ptr; + mipdata[i].SysMemPitch = RR_MAX(w >> i, 1) * bpp; + mipdata[i].SysMemSlicePitch = 0; + ptr += mipdata[i].SysMemPitch * RR_MAX(h >> i, 1); - // create mip data by downsampling - if (i) - gdraw_Downsample((U8 *) mipdata[i].pSysMem, mipdata[i].SysMemPitch, w >> i, h >> i, - (U8 *) mipdata[i-1].pSysMem, mipdata[i-1].SysMemPitch, bpp); - } + // create mip data by downsampling + if (i) + gdraw_Downsample((U8*)mipdata[i].pSysMem, mipdata[i].SysMemPitch, + w >> i, h >> i, (U8*)mipdata[i - 1].pSysMem, + mipdata[i - 1].SysMemPitch, bpp); + } - // actually create texture - D3D1X_(TEXTURE2D_DESC) desc = { w, h, nmips, 1, (DXGI_FORMAT) p->i3, { 1, 0 }, - (p->i2 & GDRAW_MAKETEXTURE_FLAGS_updatable) ? D3D1X_(USAGE_DEFAULT) : D3D1X_(USAGE_IMMUTABLE), - D3D1X_(BIND_SHADER_RESOURCE), 0, 0 }; + // actually create texture + D3D1X_(TEXTURE2D_DESC) + desc = {w, + h, + nmips, + 1, + (DXGI_FORMAT)p->i3, + {1, 0}, + (p->i2 & GDRAW_MAKETEXTURE_FLAGS_updatable) + ? D3D1X_(USAGE_DEFAULT) + : D3D1X_(USAGE_IMMUTABLE), + D3D1X_(BIND_SHADER_RESOURCE), + 0, + 0}; - failed_call = "CreateTexture2D"; - hr = gdraw->d3d_device->CreateTexture2D(&desc, mipdata, &t->handle.tex.d3d); - if (FAILED(hr)) goto done; + failed_call = "CreateTexture2D"; + hr = gdraw->d3d_device->CreateTexture2D(&desc, mipdata, &t->handle.tex.d3d); + if (FAILED(hr)) goto done; - // and create a corresponding shader resource view - failed_call = "CreateShaderResourceView"; - hr = gdraw->d3d_device->CreateShaderResourceView(t->handle.tex.d3d, NULL, &t->handle.tex.d3d_view); + // and create a corresponding shader resource view + failed_call = "CreateShaderResourceView"; + hr = gdraw->d3d_device->CreateShaderResourceView(t->handle.tex.d3d, NULL, + &t->handle.tex.d3d_view); done: - if (!FAILED(hr)) { - gdraw_HandleCacheAllocateEnd(t, p->i4, p->p1, (p->i2 & GDRAW_MAKETEXTURE_FLAGS_never_flush) ? GDRAW_HANDLE_STATE_pinned : GDRAW_HANDLE_STATE_locked); - stats->nonzero_flags |= GDRAW_STATS_alloc_tex; - stats->alloc_tex += 1; - stats->alloc_tex_bytes += p->i4; - } else { - safe_release(t->handle.tex.d3d); - safe_release(t->handle.tex.d3d_view); + if (!FAILED(hr)) { + gdraw_HandleCacheAllocateEnd( + t, p->i4, p->p1, + (p->i2 & GDRAW_MAKETEXTURE_FLAGS_never_flush) + ? GDRAW_HANDLE_STATE_pinned + : GDRAW_HANDLE_STATE_locked); + stats->nonzero_flags |= GDRAW_STATS_alloc_tex; + stats->alloc_tex += 1; + stats->alloc_tex_bytes += p->i4; + } else { + safe_release(t->handle.tex.d3d); + safe_release(t->handle.tex.d3d_view); - gdraw_HandleCacheAllocateFail(t); - t = NULL; - report_d3d_error(hr, failed_call, " while creating texture"); - } + gdraw_HandleCacheAllocateFail(t); + t = NULL; + report_d3d_error(hr, failed_call, " while creating texture"); + } - IggyGDrawFree(p->texture_data); - return (GDrawTexture *) t; + IggyGDrawFree(p->texture_data); + return (GDrawTexture*)t; } -static rrbool RADLINK gdraw_UpdateTextureBegin(GDrawTexture *t, void *unique_id, GDrawStats * /*stats*/) -{ - return gdraw_HandleCacheLock((GDrawHandle *) t, unique_id); +static rrbool RADLINK gdraw_UpdateTextureBegin(GDrawTexture* t, void* unique_id, + GDrawStats* /*stats*/) { + return gdraw_HandleCacheLock((GDrawHandle*)t, unique_id); } -static void RADLINK gdraw_UpdateTextureRect(GDrawTexture *t, void * /*unique_id*/, S32 x, S32 y, S32 stride, S32 w, S32 h, U8 *samples, gdraw_texture_format /*format*/) -{ - GDrawHandle *s = (GDrawHandle *) t; - D3D1X_(BOX) box = { x, y, 0, x+w, y+h, 1 }; +static void RADLINK gdraw_UpdateTextureRect(GDrawTexture* t, + void* /*unique_id*/, S32 x, S32 y, + S32 stride, S32 w, S32 h, + U8* samples, + gdraw_texture_format /*format*/) { + GDrawHandle* s = (GDrawHandle*)t; + D3D1X_(BOX) box = {x, y, 0, x + w, y + h, 1}; - gdraw->d3d_context->UpdateSubresource(s->handle.tex.d3d, 0, &box, samples, stride, 0); + gdraw->d3d_context->UpdateSubresource(s->handle.tex.d3d, 0, &box, samples, + stride, 0); } -static void RADLINK gdraw_UpdateTextureEnd(GDrawTexture *t, void * /*unique_id*/, GDrawStats * /*stats*/) -{ - gdraw_HandleCacheUnlock((GDrawHandle *) t); +static void RADLINK gdraw_UpdateTextureEnd(GDrawTexture* t, void* /*unique_id*/, + GDrawStats* /*stats*/) { + gdraw_HandleCacheUnlock((GDrawHandle*)t); } -static void RADLINK gdraw_FreeTexture(GDrawTexture *tt, void *unique_id, GDrawStats *stats) -{ - GDrawHandle *t = (GDrawHandle *) tt; - assert(t != NULL); // @GDRAW_ASSERT - if (t->owner == unique_id || unique_id == NULL) { - if (t->cache == &gdraw->rendertargets) { - gdraw_HandleCacheUnlock(t); - // cache it by simply not freeing it - return; - } +static void RADLINK gdraw_FreeTexture(GDrawTexture* tt, void* unique_id, + GDrawStats* stats) { + GDrawHandle* t = (GDrawHandle*)tt; + assert(t != NULL); // @GDRAW_ASSERT + if (t->owner == unique_id || unique_id == NULL) { + if (t->cache == &gdraw->rendertargets) { + gdraw_HandleCacheUnlock(t); + // cache it by simply not freeing it + return; + } - gdraw_res_free(t, stats); - } + gdraw_res_free(t, stats); + } } -static rrbool RADLINK gdraw_TryToLockTexture(GDrawTexture *t, void *unique_id, GDrawStats * /*stats*/) -{ - return gdraw_HandleCacheLock((GDrawHandle *) t, unique_id); +static rrbool RADLINK gdraw_TryToLockTexture(GDrawTexture* t, void* unique_id, + GDrawStats* /*stats*/) { + return gdraw_HandleCacheLock((GDrawHandle*)t, unique_id); } -static void RADLINK gdraw_DescribeTexture(GDrawTexture *tex, GDraw_Texture_Description *desc) -{ - GDrawHandle *p = (GDrawHandle *) tex; - desc->width = p->handle.tex.w; - desc->height = p->handle.tex.h; - desc->size_in_bytes = p->bytes; +static void RADLINK gdraw_DescribeTexture(GDrawTexture* tex, + GDraw_Texture_Description* desc) { + GDrawHandle* p = (GDrawHandle*)tex; + desc->width = p->handle.tex.w; + desc->height = p->handle.tex.h; + desc->size_in_bytes = p->bytes; } -static void RADLINK gdraw_SetAntialiasTexture(S32 width, U8 *rgba) -{ - HRESULT hr; +static void RADLINK gdraw_SetAntialiasTexture(S32 width, U8* rgba) { + HRESULT hr; - safe_release(gdraw->aa_tex_view); - safe_release(gdraw->aa_tex); + safe_release(gdraw->aa_tex_view); + safe_release(gdraw->aa_tex); - D3D1X_(TEXTURE2D_DESC) desc = { width, 1, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM, { 1, 0 }, D3D1X_(USAGE_IMMUTABLE), D3D1X_(BIND_SHADER_RESOURCE), 0, 0 }; - D3D1X_(SUBRESOURCE_DATA) data = { rgba, width*4, 0 }; + D3D1X_(TEXTURE2D_DESC) + desc = {width, + 1, + 1, + 1, + DXGI_FORMAT_R8G8B8A8_UNORM, + {1, 0}, + D3D1X_(USAGE_IMMUTABLE), + D3D1X_(BIND_SHADER_RESOURCE), + 0, + 0}; + D3D1X_(SUBRESOURCE_DATA) data = {rgba, width * 4, 0}; - hr = gdraw->d3d_device->CreateTexture2D(&desc, &data, &gdraw->aa_tex); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateTexture2D", ""); - return; - } + hr = gdraw->d3d_device->CreateTexture2D(&desc, &data, &gdraw->aa_tex); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateTexture2D", ""); + return; + } - hr = gdraw->d3d_device->CreateShaderResourceView(gdraw->aa_tex, NULL, &gdraw->aa_tex_view); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateShaderResourceView", " while creating texture"); - safe_release(gdraw->aa_tex); - return; - } + hr = gdraw->d3d_device->CreateShaderResourceView(gdraw->aa_tex, NULL, + &gdraw->aa_tex_view); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateShaderResourceView", + " while creating texture"); + safe_release(gdraw->aa_tex); + return; + } } //////////////////////////////////////////////////////////////////////// @@ -608,89 +653,97 @@ static void RADLINK gdraw_SetAntialiasTexture(S32 width, U8 *rgba) // Vertex buffer creation/deletion // -static rrbool RADLINK gdraw_MakeVertexBufferBegin(void *unique_id, gdraw_vformat /*vformat*/, S32 vbuf_size, S32 ibuf_size, GDraw_MakeVertexBuffer_ProcessingInfo *p, GDrawStats *stats) -{ - // prepare staging buffers for the app to put data into - p->vertex_data = (U8 *) IggyGDrawMalloc(vbuf_size); - p->index_data = (U8 *) IggyGDrawMalloc(ibuf_size); - if (p->vertex_data && p->index_data) { - GDrawHandle *vb = gdraw_res_alloc_begin(gdraw->vbufcache, vbuf_size + ibuf_size, stats); - if (vb) { - vb->handle.vbuf.verts = NULL; - vb->handle.vbuf.inds = NULL; +static rrbool RADLINK gdraw_MakeVertexBufferBegin( + void* unique_id, gdraw_vformat /*vformat*/, S32 vbuf_size, S32 ibuf_size, + GDraw_MakeVertexBuffer_ProcessingInfo* p, GDrawStats* stats) { + // prepare staging buffers for the app to put data into + p->vertex_data = (U8*)IggyGDrawMalloc(vbuf_size); + p->index_data = (U8*)IggyGDrawMalloc(ibuf_size); + if (p->vertex_data && p->index_data) { + GDrawHandle* vb = gdraw_res_alloc_begin(gdraw->vbufcache, + vbuf_size + ibuf_size, stats); + if (vb) { + vb->handle.vbuf.verts = NULL; + vb->handle.vbuf.inds = NULL; - p->vertex_data_length = vbuf_size; - p->index_data_length = ibuf_size; - p->p0 = vb; - p->p1 = unique_id; - return true; - } - } + p->vertex_data_length = vbuf_size; + p->index_data_length = ibuf_size; + p->p0 = vb; + p->p1 = unique_id; + return true; + } + } - if (p->vertex_data) - IggyGDrawFree(p->vertex_data); - if (p->index_data) - IggyGDrawFree(p->index_data); + if (p->vertex_data) IggyGDrawFree(p->vertex_data); + if (p->index_data) IggyGDrawFree(p->index_data); - return false; + return false; } -static rrbool RADLINK gdraw_MakeVertexBufferMore(GDraw_MakeVertexBuffer_ProcessingInfo * /*p*/) -{ - assert(0); - return false; +static rrbool RADLINK +gdraw_MakeVertexBufferMore(GDraw_MakeVertexBuffer_ProcessingInfo* /*p*/) { + assert(0); + return false; } -static GDrawVertexBuffer * RADLINK gdraw_MakeVertexBufferEnd(GDraw_MakeVertexBuffer_ProcessingInfo *p, GDrawStats * /*stats*/) -{ - GDrawHandle *vb = (GDrawHandle *) p->p0; +static GDrawVertexBuffer* RADLINK gdraw_MakeVertexBufferEnd( + GDraw_MakeVertexBuffer_ProcessingInfo* p, GDrawStats* /*stats*/) { + GDrawHandle* vb = (GDrawHandle*)p->p0; - HRESULT hr; - D3D1X_(BUFFER_DESC) vbdesc = { p->vertex_data_length, D3D1X_(USAGE_IMMUTABLE), D3D1X_(BIND_VERTEX_BUFFER), 0, 0 }; - D3D1X_(SUBRESOURCE_DATA) vbdata = { p->vertex_data, 0, 0 }; - - D3D1X_(BUFFER_DESC) ibdesc = { p->index_data_length, D3D1X_(USAGE_IMMUTABLE), D3D1X_(BIND_INDEX_BUFFER), 0, 0 }; - D3D1X_(SUBRESOURCE_DATA) ibdata = { p->index_data, 0, 0 }; + HRESULT hr; + D3D1X_(BUFFER_DESC) + vbdesc = {p->vertex_data_length, D3D1X_(USAGE_IMMUTABLE), + D3D1X_(BIND_VERTEX_BUFFER), 0, 0}; + D3D1X_(SUBRESOURCE_DATA) vbdata = {p->vertex_data, 0, 0}; - hr = gdraw->d3d_device->CreateBuffer(&vbdesc, &vbdata, &vb->handle.vbuf.verts); - if (!FAILED(hr)) - hr = gdraw->d3d_device->CreateBuffer(&ibdesc, &ibdata, &vb->handle.vbuf.inds); + D3D1X_(BUFFER_DESC) + ibdesc = {p->index_data_length, D3D1X_(USAGE_IMMUTABLE), + D3D1X_(BIND_INDEX_BUFFER), 0, 0}; + D3D1X_(SUBRESOURCE_DATA) ibdata = {p->index_data, 0, 0}; - if (FAILED(hr)) { - safe_release(vb->handle.vbuf.verts); - safe_release(vb->handle.vbuf.inds); + hr = gdraw->d3d_device->CreateBuffer(&vbdesc, &vbdata, + &vb->handle.vbuf.verts); + if (!FAILED(hr)) + hr = gdraw->d3d_device->CreateBuffer(&ibdesc, &ibdata, + &vb->handle.vbuf.inds); - gdraw_HandleCacheAllocateFail(vb); - vb = NULL; + if (FAILED(hr)) { + safe_release(vb->handle.vbuf.verts); + safe_release(vb->handle.vbuf.inds); - report_d3d_error(hr, "CreateBuffer", " creating vertex buffer"); - } else { - gdraw_HandleCacheAllocateEnd(vb, p->vertex_data_length + p->index_data_length, p->p1, GDRAW_HANDLE_STATE_locked); - } + gdraw_HandleCacheAllocateFail(vb); + vb = NULL; - IggyGDrawFree(p->vertex_data); - IggyGDrawFree(p->index_data); + report_d3d_error(hr, "CreateBuffer", " creating vertex buffer"); + } else { + gdraw_HandleCacheAllocateEnd( + vb, p->vertex_data_length + p->index_data_length, p->p1, + GDRAW_HANDLE_STATE_locked); + } - return (GDrawVertexBuffer *) vb; + IggyGDrawFree(p->vertex_data); + IggyGDrawFree(p->index_data); + + return (GDrawVertexBuffer*)vb; } -static rrbool RADLINK gdraw_TryLockVertexBuffer(GDrawVertexBuffer *vb, void *unique_id, GDrawStats * /*stats*/) -{ - return gdraw_HandleCacheLock((GDrawHandle *) vb, unique_id); +static rrbool RADLINK gdraw_TryLockVertexBuffer(GDrawVertexBuffer* vb, + void* unique_id, + GDrawStats* /*stats*/) { + return gdraw_HandleCacheLock((GDrawHandle*)vb, unique_id); } -static void RADLINK gdraw_FreeVertexBuffer(GDrawVertexBuffer *vb, void *unique_id, GDrawStats *stats) -{ - GDrawHandle *h = (GDrawHandle *) vb; - assert(h != NULL); // @GDRAW_ASSERT - if (h->owner == unique_id) - gdraw_res_free(h, stats); +static void RADLINK gdraw_FreeVertexBuffer(GDrawVertexBuffer* vb, + void* unique_id, GDrawStats* stats) { + GDrawHandle* h = (GDrawHandle*)vb; + assert(h != NULL); // @GDRAW_ASSERT + if (h->owner == unique_id) gdraw_res_free(h, stats); } -static void RADLINK gdraw_DescribeVertexBuffer(GDrawVertexBuffer *vbuf, GDraw_VertexBuffer_Description *desc) -{ - GDrawHandle *p = (GDrawHandle *) vbuf; - desc->size_in_bytes = p->bytes; +static void RADLINK gdraw_DescribeVertexBuffer( + GDrawVertexBuffer* vbuf, GDraw_VertexBuffer_Description* desc) { + GDrawHandle* p = (GDrawHandle*)vbuf; + desc->size_in_bytes = p->bytes; } //////////////////////////////////////////////////////////////////////// @@ -698,105 +751,133 @@ static void RADLINK gdraw_DescribeVertexBuffer(GDrawVertexBuffer *vbuf, GDraw_Ve // Create/free (or cache) render targets // -static GDrawHandle *get_color_rendertarget(GDrawStats *stats) -{ - char *failed_call; +static GDrawHandle* get_color_rendertarget(GDrawStats* stats) { + char* failed_call; - // try to recycle LRU rendertarget - GDrawHandle *t = gdraw_HandleCacheGetLRU(&gdraw->rendertargets); - if (t) { - gdraw_HandleCacheLock(t, (void *) 1); - return t; - } + // try to recycle LRU rendertarget + GDrawHandle* t = gdraw_HandleCacheGetLRU(&gdraw->rendertargets); + if (t) { + gdraw_HandleCacheLock(t, (void*)1); + return t; + } - // ran out of RTs, allocate a new one - S32 size = gdraw->frametex_width * gdraw->frametex_height * 4; - if (gdraw->rendertargets.bytes_free < size) { - IggyGDrawSendWarning(NULL, "GDraw rendertarget allocation failed: hit size limit of %d bytes", gdraw->rendertargets.total_bytes); - return NULL; - } + // ran out of RTs, allocate a new one + S32 size = gdraw->frametex_width * gdraw->frametex_height * 4; + if (gdraw->rendertargets.bytes_free < size) { + IggyGDrawSendWarning( + NULL, + "GDraw rendertarget allocation failed: hit size limit of %d bytes", + gdraw->rendertargets.total_bytes); + return NULL; + } - t = gdraw_HandleCacheAllocateBegin(&gdraw->rendertargets); - if (!t) { - IggyGDrawSendWarning(NULL, "GDraw rendertarget allocation failed: hit handle limit"); - return t; - } + t = gdraw_HandleCacheAllocateBegin(&gdraw->rendertargets); + if (!t) { + IggyGDrawSendWarning( + NULL, "GDraw rendertarget allocation failed: hit handle limit"); + return t; + } - D3D1X_(TEXTURE2D_DESC) desc = { gdraw->frametex_width, gdraw->frametex_height, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM, { 1, 0 }, - D3D1X_(USAGE_DEFAULT), D3D1X_(BIND_SHADER_RESOURCE) | D3D1X_(BIND_RENDER_TARGET), 0, 0 }; + D3D1X_(TEXTURE2D_DESC) + desc = {gdraw->frametex_width, + gdraw->frametex_height, + 1, + 1, + DXGI_FORMAT_R8G8B8A8_UNORM, + {1, 0}, + D3D1X_(USAGE_DEFAULT), + D3D1X_(BIND_SHADER_RESOURCE) | D3D1X_(BIND_RENDER_TARGET), + 0, + 0}; - t->handle.tex.d3d = NULL; - t->handle.tex.d3d_view = NULL; - t->handle.tex.d3d_rtview = NULL; + t->handle.tex.d3d = NULL; + t->handle.tex.d3d_view = NULL; + t->handle.tex.d3d_rtview = NULL; - HRESULT hr = gdraw->d3d_device->CreateTexture2D(&desc, NULL, &t->handle.tex.d3d); - failed_call = "CreateTexture2D"; - if (!FAILED(hr)) { - hr = gdraw->d3d_device->CreateShaderResourceView(t->handle.tex.d3d, NULL, &t->handle.tex.d3d_view); - failed_call = "CreateTexture2D"; - } - if (!FAILED(hr)) { - hr = gdraw->d3d_device->CreateRenderTargetView(t->handle.tex.d3d, NULL, &t->handle.tex.d3d_rtview); - failed_call = "CreateRenderTargetView"; - } + HRESULT hr = + gdraw->d3d_device->CreateTexture2D(&desc, NULL, &t->handle.tex.d3d); + failed_call = "CreateTexture2D"; + if (!FAILED(hr)) { + hr = gdraw->d3d_device->CreateShaderResourceView( + t->handle.tex.d3d, NULL, &t->handle.tex.d3d_view); + failed_call = "CreateTexture2D"; + } + if (!FAILED(hr)) { + hr = gdraw->d3d_device->CreateRenderTargetView( + t->handle.tex.d3d, NULL, &t->handle.tex.d3d_rtview); + failed_call = "CreateRenderTargetView"; + } - if (FAILED(hr)) { - safe_release(t->handle.tex.d3d); - safe_release(t->handle.tex.d3d_view); - safe_release(t->handle.tex.d3d_rtview); - gdraw_HandleCacheAllocateFail(t); + if (FAILED(hr)) { + safe_release(t->handle.tex.d3d); + safe_release(t->handle.tex.d3d_view); + safe_release(t->handle.tex.d3d_rtview); + gdraw_HandleCacheAllocateFail(t); - report_d3d_error(hr, failed_call, " creating rendertarget"); + report_d3d_error(hr, failed_call, " creating rendertarget"); - return NULL; - } + return NULL; + } - gdraw_HandleCacheAllocateEnd(t, size, (void *) 1, GDRAW_HANDLE_STATE_locked); - stats->nonzero_flags |= GDRAW_STATS_alloc_tex; - stats->alloc_tex += 1; - stats->alloc_tex_bytes += size; + gdraw_HandleCacheAllocateEnd(t, size, (void*)1, GDRAW_HANDLE_STATE_locked); + stats->nonzero_flags |= GDRAW_STATS_alloc_tex; + stats->alloc_tex += 1; + stats->alloc_tex_bytes += size; - return t; + return t; } -static ID3D1X(DepthStencilView) *get_rendertarget_depthbuffer(GDrawStats *stats) -{ - if (!gdraw->depth_buffer[1]) { - char *failed_call; - assert(!gdraw->rt_depth_buffer); +static ID3D1X(DepthStencilView) * + get_rendertarget_depthbuffer(GDrawStats* stats) { + if (!gdraw->depth_buffer[1]) { + char* failed_call; + assert(!gdraw->rt_depth_buffer); - D3D1X_(TEXTURE2D_DESC) desc = { gdraw->frametex_width, gdraw->frametex_height, 1, 1, DXGI_FORMAT_D24_UNORM_S8_UINT, { 1, 0 }, - D3D1X_(USAGE_DEFAULT), D3D1X_(BIND_DEPTH_STENCIL), 0, 0 }; + D3D1X_(TEXTURE2D_DESC) + desc = {gdraw->frametex_width, + gdraw->frametex_height, + 1, + 1, + DXGI_FORMAT_D24_UNORM_S8_UINT, + {1, 0}, + D3D1X_(USAGE_DEFAULT), + D3D1X_(BIND_DEPTH_STENCIL), + 0, + 0}; - HRESULT hr = gdraw->d3d_device->CreateTexture2D(&desc, NULL, &gdraw->rt_depth_buffer); - failed_call = "CreateTexture2D"; - if (!FAILED(hr)) { - hr = gdraw->d3d_device->CreateDepthStencilView(gdraw->rt_depth_buffer, NULL, &gdraw->depth_buffer[1]); - failed_call = "CreateDepthStencilView while creating rendertarget"; - } + HRESULT hr = gdraw->d3d_device->CreateTexture2D( + &desc, NULL, &gdraw->rt_depth_buffer); + failed_call = "CreateTexture2D"; + if (!FAILED(hr)) { + hr = gdraw->d3d_device->CreateDepthStencilView( + gdraw->rt_depth_buffer, NULL, &gdraw->depth_buffer[1]); + failed_call = "CreateDepthStencilView while creating rendertarget"; + } - if (FAILED(hr)) { - report_d3d_error(hr, failed_call, ""); - safe_release(gdraw->rt_depth_buffer); - safe_release(gdraw->depth_buffer[1]); - } else { - stats->nonzero_flags |= GDRAW_STATS_alloc_tex; - stats->alloc_tex += 1; - stats->alloc_tex_bytes += gdraw->frametex_width * gdraw->frametex_height * 4; + if (FAILED(hr)) { + report_d3d_error(hr, failed_call, ""); + safe_release(gdraw->rt_depth_buffer); + safe_release(gdraw->depth_buffer[1]); + } else { + stats->nonzero_flags |= GDRAW_STATS_alloc_tex; + stats->alloc_tex += 1; + stats->alloc_tex_bytes += + gdraw->frametex_width * gdraw->frametex_height * 4; - gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[1], D3D1X_(CLEAR_DEPTH) | D3D1X_(CLEAR_STENCIL), 1.0f, 0); - } - } + gdraw->d3d_context->ClearDepthStencilView( + gdraw->depth_buffer[1], + D3D1X_(CLEAR_DEPTH) | D3D1X_(CLEAR_STENCIL), 1.0f, 0); + } + } - return gdraw->depth_buffer[1]; + return gdraw->depth_buffer[1]; } -static void flush_rendertargets(GDrawStats *stats) -{ - gdraw_res_flush(&gdraw->rendertargets, stats); +static void flush_rendertargets(GDrawStats* stats) { + gdraw_res_flush(&gdraw->rendertargets, stats); - safe_release(gdraw->depth_buffer[1]); - safe_release(gdraw->rt_depth_buffer); + safe_release(gdraw->depth_buffer[1]); + safe_release(gdraw->rt_depth_buffer); } //////////////////////////////////////////////////////////////////////// @@ -804,41 +885,36 @@ static void flush_rendertargets(GDrawStats *stats) // Constant buffer layouts // -struct VertexVars -{ - F32 world[2][4]; - F32 x_off[4]; - F32 texgen_s[4]; - F32 texgen_t[4]; - F32 x3d[4]; - F32 y3d[4]; - F32 w3d[4]; +struct VertexVars { + F32 world[2][4]; + F32 x_off[4]; + F32 texgen_s[4]; + F32 texgen_t[4]; + F32 x3d[4]; + F32 y3d[4]; + F32 w3d[4]; }; -struct PixelCommonVars -{ - F32 color_mul[4]; - F32 color_add[4]; - F32 focal[4]; - F32 rescale1[4]; +struct PixelCommonVars { + F32 color_mul[4]; + F32 color_add[4]; + F32 focal[4]; + F32 rescale1[4]; }; -struct PixelParaFilter -{ - F32 clamp0[4], clamp1[4]; - F32 color[4], color2[4]; - F32 tc_off[4]; +struct PixelParaFilter { + F32 clamp0[4], clamp1[4]; + F32 color[4], color2[4]; + F32 tc_off[4]; }; -struct PixelParaBlur -{ - F32 clamp[4]; - F32 tap[9][4]; +struct PixelParaBlur { + F32 clamp[4]; + F32 tap[9][4]; }; -struct PixelParaColorMatrix -{ - F32 data[5][4]; +struct PixelParaColorMatrix { + F32 data[5][4]; }; //////////////////////////////////////////////////////////////////////// @@ -846,246 +922,239 @@ struct PixelParaColorMatrix // Rendering helpers // -static void disable_scissor(int force) -{ - if (force || gdraw->scissor_state) { - // disable scissor by setting whole viewport as scissor rect - S32 x = gdraw->cview.x; - S32 y = gdraw->cview.y; - D3D1X_(RECT) r = { x, y, x + gdraw->cview.w, y + gdraw->cview.h }; +static void disable_scissor(int force) { + if (force || gdraw->scissor_state) { + // disable scissor by setting whole viewport as scissor rect + S32 x = gdraw->cview.x; + S32 y = gdraw->cview.y; + D3D1X_(RECT) r = {x, y, x + gdraw->cview.w, y + gdraw->cview.h}; - gdraw->d3d_context->RSSetScissorRects(1, &r); - gdraw->scissor_state = 0; - } + gdraw->d3d_context->RSSetScissorRects(1, &r); + gdraw->scissor_state = 0; + } } -static void set_viewport_raw(S32 x, S32 y, S32 w, S32 h) -{ - D3D1X_(VIEWPORT) vp = { (ViewCoord) x, (ViewCoord) y, (ViewCoord) w, (ViewCoord) h, 0.0f, 1.0f }; - gdraw->d3d_context->RSSetViewports(1, &vp); - gdraw->cview.x = x; - gdraw->cview.y = y; - gdraw->cview.w = w; - gdraw->cview.h = h; - - disable_scissor(1); +static void set_viewport_raw(S32 x, S32 y, S32 w, S32 h) { + D3D1X_(VIEWPORT) + vp = {(ViewCoord)x, (ViewCoord)y, (ViewCoord)w, (ViewCoord)h, 0.0f, 1.0f}; + gdraw->d3d_context->RSSetViewports(1, &vp); + gdraw->cview.x = x; + gdraw->cview.y = y; + gdraw->cview.w = w; + gdraw->cview.h = h; + + disable_scissor(1); } -static void set_projection_base(void) -{ - // x3d = < viewproj.x, 0, 0, 0 > - // y3d = < 0, viewproj.y, 0, 0 > - // w3d = < viewproj.z, viewproj.w, 1.0, 1.0 > +static void set_projection_base(void) { + // x3d = < viewproj.x, 0, 0, 0 > + // y3d = < 0, viewproj.y, 0, 0 > + // w3d = < viewproj.z, viewproj.w, 1.0, 1.0 > - memset(gdraw->projmat[0], 0, sizeof(gdraw->projmat)); - gdraw->projmat[0][0] = gdraw->projection[0]; - gdraw->projmat[1][1] = gdraw->projection[1]; - gdraw->projmat[2][0] = gdraw->projection[2]; - gdraw->projmat[2][1] = gdraw->projection[3]; + memset(gdraw->projmat[0], 0, sizeof(gdraw->projmat)); + gdraw->projmat[0][0] = gdraw->projection[0]; + gdraw->projmat[1][1] = gdraw->projection[1]; + gdraw->projmat[2][0] = gdraw->projection[2]; + gdraw->projmat[2][1] = gdraw->projection[3]; - gdraw->projmat[2][2] = 1.0; - gdraw->projmat[2][3] = 1.0; + gdraw->projmat[2][2] = 1.0; + gdraw->projmat[2][3] = 1.0; } -static void set_projection_raw(S32 x0, S32 x1, S32 y0, S32 y1) -{ - gdraw->projection[0] = 2.0f / (x1-x0); - gdraw->projection[1] = 2.0f / (y1-y0); - gdraw->projection[2] = (x1+x0)/(F32)(x0-x1); - gdraw->projection[3] = (y1+y0)/(F32)(y0-y1); +static void set_projection_raw(S32 x0, S32 x1, S32 y0, S32 y1) { + gdraw->projection[0] = 2.0f / (x1 - x0); + gdraw->projection[1] = 2.0f / (y1 - y0); + gdraw->projection[2] = (x1 + x0) / (F32)(x0 - x1); + gdraw->projection[3] = (y1 + y0) / (F32)(y0 - y1); - set_projection_base(); + set_projection_base(); } +static void set_viewport(void) { + if (gdraw->in_blur) { + set_viewport_raw(0, 0, gdraw->tpw, gdraw->tph); + return; + } -static void set_viewport(void) -{ - if (gdraw->in_blur) { - set_viewport_raw(0, 0, gdraw->tpw, gdraw->tph); - return; - } - - if (gdraw->cur == gdraw->frame) // if the rendering stack is empty - // render a tile-sized region to the user-request tile location - set_viewport_raw(gdraw->vx, gdraw->vy, gdraw->tw, gdraw->th); - else if (gdraw->cur->cached) - set_viewport_raw(0, 0, gdraw->cur->width, gdraw->cur->height); - else - // if on the render stack, draw a padded-tile-sized region at the origin - set_viewport_raw(0, 0, gdraw->tpw, gdraw->tph); + if (gdraw->cur == gdraw->frame) // if the rendering stack is empty + // render a tile-sized region to the user-request tile location + set_viewport_raw(gdraw->vx, gdraw->vy, gdraw->tw, gdraw->th); + else if (gdraw->cur->cached) + set_viewport_raw(0, 0, gdraw->cur->width, gdraw->cur->height); + else + // if on the render stack, draw a padded-tile-sized region at the origin + set_viewport_raw(0, 0, gdraw->tpw, gdraw->tph); } -static void set_projection(void) -{ - if (gdraw->in_blur) return; - if (gdraw->cur == gdraw->frame) // if the render stack is empty - set_projection_raw(gdraw->tx0, gdraw->tx0+gdraw->tw, gdraw->ty0+gdraw->th, gdraw->ty0); - else if (gdraw->cur->cached) - set_projection_raw(gdraw->cur->base_x, gdraw->cur->base_x+gdraw->cur->width, gdraw->cur->base_y, gdraw->cur->base_y+gdraw->cur->height); - else - set_projection_raw(gdraw->tx0p, gdraw->tx0p+gdraw->tpw, gdraw->ty0p+gdraw->tph, gdraw->ty0p); +static void set_projection(void) { + if (gdraw->in_blur) return; + if (gdraw->cur == gdraw->frame) // if the render stack is empty + set_projection_raw(gdraw->tx0, gdraw->tx0 + gdraw->tw, + gdraw->ty0 + gdraw->th, gdraw->ty0); + else if (gdraw->cur->cached) + set_projection_raw( + gdraw->cur->base_x, gdraw->cur->base_x + gdraw->cur->width, + gdraw->cur->base_y, gdraw->cur->base_y + gdraw->cur->height); + else + set_projection_raw(gdraw->tx0p, gdraw->tx0p + gdraw->tpw, + gdraw->ty0p + gdraw->tph, gdraw->ty0p); } -static void clear_renderstate(void) -{ - gdraw->d3d_context->ClearState(); +static void clear_renderstate(void) { gdraw->d3d_context->ClearState(); } + +static void set_common_renderstate() { + ID3D1XContext* d3d = gdraw->d3d_context; + S32 i; + + clear_renderstate(); + + // all the render states we never change while drawing + d3d->IASetPrimitiveTopology(D3D1X_(PRIMITIVE_TOPOLOGY_TRIANGLELIST)); + + d3d->PSSetShaderResources(7, 1, &gdraw->aa_tex_view); + d3d->PSSetSamplers(7, 1, &gdraw->sampler_state[0][GDRAW_WRAP_clamp]); + + // set a well-defined default sampler for all PS textures we use + for (i = 0; i < 3; ++i) + d3d->PSSetSamplers(i, 1, &gdraw->sampler_state[0][GDRAW_WRAP_clamp]); + + // reset our state caching + gdraw->scissor_state = ~0u; + gdraw->blend_mode = -1; } -static void set_common_renderstate() -{ - ID3D1XContext *d3d = gdraw->d3d_context; - S32 i; - - clear_renderstate(); - - // all the render states we never change while drawing - d3d->IASetPrimitiveTopology(D3D1X_(PRIMITIVE_TOPOLOGY_TRIANGLELIST)); - - d3d->PSSetShaderResources(7, 1, &gdraw->aa_tex_view); - d3d->PSSetSamplers(7, 1, &gdraw->sampler_state[0][GDRAW_WRAP_clamp]); - - // set a well-defined default sampler for all PS textures we use - for (i=0; i < 3; ++i) - d3d->PSSetSamplers(i, 1, &gdraw->sampler_state[0][GDRAW_WRAP_clamp]); - - // reset our state caching - gdraw->scissor_state = ~0u; - gdraw->blend_mode = -1; -} - -static void manual_clear(gswf_recti *r, GDrawStats *stats); -static void set_render_target(GDrawStats *stats); +static void manual_clear(gswf_recti* r, GDrawStats* stats); +static void set_render_target(GDrawStats* stats); //////////////////////////////////////////////////////////////////////// // // Begin/end rendering of a tile and per-frame processing // -void gdraw_D3D1X_(SetRendertargetSize)(S32 w, S32 h) -{ - if (gdraw && (w != gdraw->frametex_width || h != gdraw->frametex_height)) { - GDrawStats stats = { 0 }; - gdraw->frametex_width = w; - gdraw->frametex_height = h; - flush_rendertargets(&stats); - } +void gdraw_D3D1X_(SetRendertargetSize)(S32 w, S32 h) { + if (gdraw && (w != gdraw->frametex_width || h != gdraw->frametex_height)) { + GDrawStats stats = {0}; + gdraw->frametex_width = w; + gdraw->frametex_height = h; + flush_rendertargets(&stats); + } } -void gdraw_D3D1X_(SetTileOrigin)(ID3D1X(RenderTargetView) *main_rt, ID3D1X(DepthStencilView) *main_ds, ID3D1X(ShaderResourceView) *non_msaa_rt, S32 x, S32 y) -{ - D3D1X_(RENDER_TARGET_VIEW_DESC) desc; +void gdraw_D3D1X_(SetTileOrigin)(ID3D1X(RenderTargetView) * main_rt, + ID3D1X(DepthStencilView) * main_ds, + ID3D1X(ShaderResourceView) * non_msaa_rt, + S32 x, S32 y) { + D3D1X_(RENDER_TARGET_VIEW_DESC) desc; - if (gdraw->frame_done) { - ++gdraw->frame_counter; - gdraw->frame_done = false; - } + if (gdraw->frame_done) { + ++gdraw->frame_counter; + gdraw->frame_done = false; + } - main_rt->GetDesc(&desc); + main_rt->GetDesc(&desc); - gdraw->main_framebuffer = main_rt; - gdraw->main_resolve_target = non_msaa_rt; - gdraw->main_msaa = (desc.ViewDimension == D3D1X_(RTV_DIMENSION_TEXTURE2DMS)); - gdraw->depth_buffer[0] = main_ds; + gdraw->main_framebuffer = main_rt; + gdraw->main_resolve_target = non_msaa_rt; + gdraw->main_msaa = + (desc.ViewDimension == D3D1X_(RTV_DIMENSION_TEXTURE2DMS)); + gdraw->depth_buffer[0] = main_ds; - gdraw->vx = x; - gdraw->vy = y; + gdraw->vx = x; + gdraw->vy = y; } -static void RADLINK gdraw_SetViewSizeAndWorldScale(S32 w, S32 h, F32 scalex, F32 scaley) -{ - memset(gdraw->frame, 0, sizeof(gdraw->frame)); - gdraw->cur = gdraw->frame; - gdraw->fw = w; - gdraw->fh = h; - gdraw->tw = w; - gdraw->th = h; - gdraw->world_to_pixel[0] = scalex; - gdraw->world_to_pixel[1] = scaley; - set_viewport(); +static void RADLINK gdraw_SetViewSizeAndWorldScale(S32 w, S32 h, F32 scalex, + F32 scaley) { + memset(gdraw->frame, 0, sizeof(gdraw->frame)); + gdraw->cur = gdraw->frame; + gdraw->fw = w; + gdraw->fh = h; + gdraw->tw = w; + gdraw->th = h; + gdraw->world_to_pixel[0] = scalex; + gdraw->world_to_pixel[1] = scaley; + set_viewport(); } // must include anything necessary for texture creation/update -static void RADLINK gdraw_RenderingBegin(void) -{ -} -static void RADLINK gdraw_RenderingEnd(void) -{ +static void RADLINK gdraw_RenderingBegin(void) {} +static void RADLINK gdraw_RenderingEnd(void) {} + +static void RADLINK gdraw_RenderTileBegin(S32 x0, S32 y0, S32 x1, S32 y1, + S32 pad, GDrawStats* stats) { + if (x0 == 0 && y0 == 0 && x1 == gdraw->fw && y1 == gdraw->fh) pad = 0; + + gdraw->tx0 = x0; + gdraw->ty0 = y0; + gdraw->tw = x1 - x0; + gdraw->th = y1 - y0; + + // padded region + gdraw->tx0p = RR_MAX(x0 - pad, 0); + gdraw->ty0p = RR_MAX(y0 - pad, 0); + gdraw->tpw = RR_MIN(x1 + pad, gdraw->fw) - gdraw->tx0p; + gdraw->tph = RR_MIN(y1 + pad, gdraw->fh) - gdraw->ty0p; + + // make sure our rendertargets are large enough to contain the tile + if (gdraw->tpw > gdraw->frametex_width || + gdraw->tph > gdraw->frametex_height) { + gdraw->frametex_width = RR_MAX(gdraw->tpw, gdraw->frametex_width); + gdraw->frametex_height = RR_MAX(gdraw->tph, gdraw->frametex_height); + + flush_rendertargets(stats); + } + assert(gdraw->tpw <= gdraw->frametex_width && + gdraw->tph <= gdraw->frametex_height); + + // set up rendertargets we'll use + set_common_renderstate(); + gdraw->d3d_context->ClearDepthStencilView( + gdraw->depth_buffer[0], D3D1X_(CLEAR_DEPTH) | D3D1X_(CLEAR_STENCIL), + 1.0f, 0); + if (gdraw->depth_buffer[1]) + gdraw->d3d_context->ClearDepthStencilView( + gdraw->depth_buffer[1], D3D1X_(CLEAR_DEPTH) | D3D1X_(CLEAR_STENCIL), + 1.0f, 0); + + set_projection(); + set_viewport(); + set_render_target(stats); } -static void RADLINK gdraw_RenderTileBegin(S32 x0, S32 y0, S32 x1, S32 y1, S32 pad, GDrawStats *stats) -{ - if (x0 == 0 && y0 == 0 && x1 == gdraw->fw && y1 == gdraw->fh) - pad = 0; +static void RADLINK gdraw_RenderTileEnd(GDrawStats* /*stats*/) {} - gdraw->tx0 = x0; - gdraw->ty0 = y0; - gdraw->tw = x1-x0; - gdraw->th = y1-y0; +void gdraw_D3D1X_(NoMoreGDrawThisFrame)(void) { + clear_renderstate(); + gdraw->frame_done = true; - // padded region - gdraw->tx0p = RR_MAX(x0 - pad, 0); - gdraw->ty0p = RR_MAX(y0 - pad, 0); - gdraw->tpw = RR_MIN(x1 + pad, gdraw->fw) - gdraw->tx0p; - gdraw->tph = RR_MIN(y1 + pad, gdraw->fh) - gdraw->ty0p; + gdraw->last_dyn_maxalloc = gdraw->dyn_maxalloc; + gdraw->dyn_maxalloc = 0; - // make sure our rendertargets are large enough to contain the tile - if (gdraw->tpw > gdraw->frametex_width || gdraw->tph > gdraw->frametex_height) { - gdraw->frametex_width = RR_MAX(gdraw->tpw, gdraw->frametex_width); - gdraw->frametex_height = RR_MAX(gdraw->tph, gdraw->frametex_height); + // reset dynamic buffer alloc position so they get DISCARDed + // next time around. + gdraw->dyn_vb.alloc_pos = 0; + gdraw->dyn_ib.alloc_pos = 0; - flush_rendertargets(stats); - } - assert(gdraw->tpw <= gdraw->frametex_width && gdraw->tph <= gdraw->frametex_height); - - // set up rendertargets we'll use - set_common_renderstate(); - gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[0], D3D1X_(CLEAR_DEPTH) | D3D1X_(CLEAR_STENCIL), 1.0f, 0); - if (gdraw->depth_buffer[1]) - gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[1], D3D1X_(CLEAR_DEPTH) | D3D1X_(CLEAR_STENCIL), 1.0f, 0); - - set_projection(); - set_viewport(); - set_render_target(stats); + GDrawFence now = {gdraw->frame_counter}; + gdraw_HandleCacheTick(gdraw->texturecache, now); + gdraw_HandleCacheTick(gdraw->vbufcache, now); } -static void RADLINK gdraw_RenderTileEnd(GDrawStats * /*stats*/) -{ -} +#define MAX_DEPTH_VALUE (1 << 13) -void gdraw_D3D1X_(NoMoreGDrawThisFrame)(void) -{ - clear_renderstate(); - gdraw->frame_done = true; - - gdraw->last_dyn_maxalloc = gdraw->dyn_maxalloc; - gdraw->dyn_maxalloc = 0; - - // reset dynamic buffer alloc position so they get DISCARDed - // next time around. - gdraw->dyn_vb.alloc_pos = 0; - gdraw->dyn_ib.alloc_pos = 0; - - GDrawFence now = { gdraw->frame_counter }; - gdraw_HandleCacheTick(gdraw->texturecache, now); - gdraw_HandleCacheTick(gdraw->vbufcache, now); -} - -#define MAX_DEPTH_VALUE (1 << 13) - -static void RADLINK gdraw_GetInfo(GDrawInfo *d) -{ - d->num_stencil_bits = 8; - d->max_id = MAX_DEPTH_VALUE-2; - // for floating point depth, just use mantissa, e.g. 16-20 bits - d->buffer_format = GDRAW_BFORMAT_vbib; - d->shared_depth_stencil = 1; - d->always_mipmap = 1; +static void RADLINK gdraw_GetInfo(GDrawInfo* d) { + d->num_stencil_bits = 8; + d->max_id = MAX_DEPTH_VALUE - 2; + // for floating point depth, just use mantissa, e.g. 16-20 bits + d->buffer_format = GDRAW_BFORMAT_vbib; + d->shared_depth_stencil = 1; + d->always_mipmap = 1; #ifndef GDRAW_D3D11_LEVEL9 - d->max_texture_size = 8192; - d->conditional_nonpow2 = 0; + d->max_texture_size = 8192; + d->conditional_nonpow2 = 0; #else - d->max_texture_size = 2048; - d->conditional_nonpow2 = 1; + d->max_texture_size = 2048; + d->conditional_nonpow2 = 1; #endif } @@ -1094,156 +1163,161 @@ static void RADLINK gdraw_GetInfo(GDrawInfo *d) // Enable/disable rendertargets in stack fashion // -static ID3D1X(RenderTargetView) *get_active_render_target() -{ - if (gdraw->cur->color_buffer) { - unbind_resources(); // to make sure this RT isn't accidentally set as a texture (avoid D3D warnings) - return gdraw->cur->color_buffer->handle.tex.d3d_rtview; - } else - return gdraw->main_framebuffer; +static ID3D1X(RenderTargetView) * get_active_render_target() { + if (gdraw->cur->color_buffer) { + unbind_resources(); // to make sure this RT isn't accidentally set as a + // texture (avoid D3D warnings) + return gdraw->cur->color_buffer->handle.tex.d3d_rtview; + } else + return gdraw->main_framebuffer; } -static void set_render_target(GDrawStats *stats) -{ - ID3D1X(RenderTargetView) *target = get_active_render_target(); - if (target == gdraw->main_framebuffer) { - gdraw->d3d_context->OMSetRenderTargets(1, &target, gdraw->depth_buffer[0]); - gdraw->d3d_context->RSSetState(gdraw->raster_state[gdraw->main_msaa]); - } else { - ID3D1X(DepthStencilView) *depth = NULL; - if (gdraw->cur->flags & (GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_id | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_stencil)) - depth = get_rendertarget_depthbuffer(stats); +static void set_render_target(GDrawStats* stats) { + ID3D1X(RenderTargetView)* target = get_active_render_target(); + if (target == gdraw->main_framebuffer) { + gdraw->d3d_context->OMSetRenderTargets(1, &target, + gdraw->depth_buffer[0]); + gdraw->d3d_context->RSSetState(gdraw->raster_state[gdraw->main_msaa]); + } else { + ID3D1X(DepthStencilView)* depth = NULL; + if (gdraw->cur->flags & (GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_id | + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_stencil)) + depth = get_rendertarget_depthbuffer(stats); - gdraw->d3d_context->OMSetRenderTargets(1, &target, depth); - gdraw->d3d_context->RSSetState(gdraw->raster_state[0]); - } + gdraw->d3d_context->OMSetRenderTargets(1, &target, depth); + gdraw->d3d_context->RSSetState(gdraw->raster_state[0]); + } - stats->nonzero_flags |= GDRAW_STATS_rendtarg; - stats->rendertarget_changes += 1; + stats->nonzero_flags |= GDRAW_STATS_rendtarg; + stats->rendertarget_changes += 1; } -static rrbool RADLINK gdraw_TextureDrawBufferBegin(gswf_recti *region, gdraw_texture_format /*format*/, U32 flags, void *owner, GDrawStats *stats) -{ - GDrawFramebufferState *n = gdraw->cur+1; - GDrawHandle *t = NULL; - if (gdraw->tw == 0 || gdraw->th == 0) { - IggyGDrawSendWarning(NULL, "GDraw warning: w=0,h=0 rendertarget"); - return false; - } +static rrbool RADLINK gdraw_TextureDrawBufferBegin( + gswf_recti* region, gdraw_texture_format /*format*/, U32 flags, void* owner, + GDrawStats* stats) { + GDrawFramebufferState* n = gdraw->cur + 1; + GDrawHandle* t = NULL; + if (gdraw->tw == 0 || gdraw->th == 0) { + IggyGDrawSendWarning(NULL, "GDraw warning: w=0,h=0 rendertarget"); + return false; + } - if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) { - assert(0); - IggyGDrawSendWarning(NULL, "GDraw rendertarget nesting exceeds MAX_RENDER_STACK_DEPTH"); - return false; - } + if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) { + assert(0); + IggyGDrawSendWarning( + NULL, "GDraw rendertarget nesting exceeds MAX_RENDER_STACK_DEPTH"); + return false; + } - if (owner) { - // nyi - } else { - t = get_color_rendertarget(stats); - if (!t) - return false; - } + if (owner) { + // nyi + } else { + t = get_color_rendertarget(stats); + if (!t) return false; + } - n->flags = flags; - n->color_buffer = t; - assert(n->color_buffer != NULL); // @GDRAW_ASSERT + n->flags = flags; + n->color_buffer = t; + assert(n->color_buffer != NULL); // @GDRAW_ASSERT - ++gdraw->cur; - gdraw->cur->cached = owner != NULL; - if (owner) { - gdraw->cur->base_x = region->x0; - gdraw->cur->base_y = region->y0; - gdraw->cur->width = region->x1 - region->x0; - gdraw->cur->height = region->y1 - region->y0; - } + ++gdraw->cur; + gdraw->cur->cached = owner != NULL; + if (owner) { + gdraw->cur->base_x = region->x0; + gdraw->cur->base_y = region->y0; + gdraw->cur->width = region->x1 - region->x0; + gdraw->cur->height = region->y1 - region->y0; + } - set_render_target(stats); - assert(gdraw->frametex_width >= gdraw->tw && gdraw->frametex_height >= gdraw->th); // @GDRAW_ASSERT + set_render_target(stats); + assert(gdraw->frametex_width >= gdraw->tw && + gdraw->frametex_height >= gdraw->th); // @GDRAW_ASSERT - S32 k = (S32) (t - gdraw->rendertargets.handle); + S32 k = (S32)(t - gdraw->rendertargets.handle); - if (region) { - gswf_recti r; - S32 ox, oy, pad = 2; // 2 pixels of border on all sides - // 1 pixel turns out to be not quite enough with the interpolator precision we get. + if (region) { + gswf_recti r; + S32 ox, oy, pad = 2; // 2 pixels of border on all sides + // 1 pixel turns out to be not quite enough with the interpolator + // precision we get. - if (gdraw->in_blur) - ox = oy = 0; - else - ox = gdraw->tx0p, oy = gdraw->ty0p; + if (gdraw->in_blur) + ox = oy = 0; + else + ox = gdraw->tx0p, oy = gdraw->ty0p; - // clamp region to tile - S32 xt0 = RR_MAX(region->x0 - ox, 0); - S32 yt0 = RR_MAX(region->y0 - oy, 0); - S32 xt1 = RR_MIN(region->x1 - ox, gdraw->tpw); - S32 yt1 = RR_MIN(region->y1 - oy, gdraw->tph); + // clamp region to tile + S32 xt0 = RR_MAX(region->x0 - ox, 0); + S32 yt0 = RR_MAX(region->y0 - oy, 0); + S32 xt1 = RR_MIN(region->x1 - ox, gdraw->tpw); + S32 yt1 = RR_MIN(region->y1 - oy, gdraw->tph); - // but the padding needs to clamp to render target bounds - r.x0 = RR_MAX(xt0 - pad, 0); - r.y0 = RR_MAX(yt0 - pad, 0); - r.x1 = RR_MIN(xt1 + pad, gdraw->frametex_width); - r.y1 = RR_MIN(yt1 + pad, gdraw->frametex_height); + // but the padding needs to clamp to render target bounds + r.x0 = RR_MAX(xt0 - pad, 0); + r.y0 = RR_MAX(yt0 - pad, 0); + r.x1 = RR_MIN(xt1 + pad, gdraw->frametex_width); + r.y1 = RR_MIN(yt1 + pad, gdraw->frametex_height); - if (r.x1 <= r.x0 || r.y1 <= r.y0) { // region doesn't intersect with current tile - --gdraw->cur; - gdraw_FreeTexture((GDrawTexture *) t, 0, stats); - // note: don't send a warning since this will happen during regular tiled rendering - return false; - } + if (r.x1 <= r.x0 || + r.y1 <= r.y0) { // region doesn't intersect with current tile + --gdraw->cur; + gdraw_FreeTexture((GDrawTexture*)t, 0, stats); + // note: don't send a warning since this will happen during regular + // tiled rendering + return false; + } - manual_clear(&r, stats); + manual_clear(&r, stats); - gdraw->rt_valid[k].x0 = xt0; - gdraw->rt_valid[k].y0 = yt0; - gdraw->rt_valid[k].x1 = xt1; - gdraw->rt_valid[k].y1 = yt1; - } else { - gdraw->d3d_context->ClearRenderTargetView(gdraw->cur->color_buffer->handle.tex.d3d_rtview, four_zeros); - gdraw->rt_valid[k].x0 = 0; - gdraw->rt_valid[k].y0 = 0; - gdraw->rt_valid[k].x1 = gdraw->frametex_width; - gdraw->rt_valid[k].y1 = gdraw->frametex_height; - } + gdraw->rt_valid[k].x0 = xt0; + gdraw->rt_valid[k].y0 = yt0; + gdraw->rt_valid[k].x1 = xt1; + gdraw->rt_valid[k].y1 = yt1; + } else { + gdraw->d3d_context->ClearRenderTargetView( + gdraw->cur->color_buffer->handle.tex.d3d_rtview, four_zeros); + gdraw->rt_valid[k].x0 = 0; + gdraw->rt_valid[k].y0 = 0; + gdraw->rt_valid[k].x1 = gdraw->frametex_width; + gdraw->rt_valid[k].y1 = gdraw->frametex_height; + } - if (!gdraw->in_blur) { - set_viewport(); - set_projection(); - } else { - set_viewport_raw(0, 0, gdraw->tpw, gdraw->tph); - set_projection_raw(0, gdraw->tpw, gdraw->tph, 0); - } + if (!gdraw->in_blur) { + set_viewport(); + set_projection(); + } else { + set_viewport_raw(0, 0, gdraw->tpw, gdraw->tph); + set_projection_raw(0, gdraw->tpw, gdraw->tph, 0); + } - return true; + return true; } -static GDrawTexture *RADLINK gdraw_TextureDrawBufferEnd(GDrawStats *stats) -{ - GDrawFramebufferState *n = gdraw->cur; - GDrawFramebufferState *m = --gdraw->cur; - if (gdraw->tw == 0 || gdraw->th == 0) return 0; +static GDrawTexture* RADLINK gdraw_TextureDrawBufferEnd(GDrawStats* stats) { + GDrawFramebufferState* n = gdraw->cur; + GDrawFramebufferState* m = --gdraw->cur; + if (gdraw->tw == 0 || gdraw->th == 0) return 0; - if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) - return 0; // already returned a warning in Begin + if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) + return 0; // already returned a warning in Begin - assert(m >= gdraw->frame); // bug in Iggy -- unbalanced + assert(m >= gdraw->frame); // bug in Iggy -- unbalanced - if (m != gdraw->frame) { - assert(m->color_buffer != NULL); // @GDRAW_ASSERT - } - assert(n->color_buffer != NULL); // @GDRAW_ASSERT + if (m != gdraw->frame) { + assert(m->color_buffer != NULL); // @GDRAW_ASSERT + } + assert(n->color_buffer != NULL); // @GDRAW_ASSERT - // switch back to old render target - set_render_target(stats); + // switch back to old render target + set_render_target(stats); - // if we're at the root, set the viewport back - set_viewport(); - set_projection(); + // if we're at the root, set the viewport back + set_viewport(); + set_projection(); - return (GDrawTexture *) n->color_buffer; + return (GDrawTexture*)n->color_buffer; } - //////////////////////////////////////////////////////////////////////// // // Clear stencil/depth buffers @@ -1252,20 +1326,22 @@ static GDrawTexture *RADLINK gdraw_TextureDrawBufferEnd(GDrawStats *stats) // and only clearing those; it depends exactly how fast clearing works. // -static void RADLINK gdraw_ClearStencilBits(U32 /*bits*/) -{ - gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[0], D3D1X_(CLEAR_STENCIL), 1.0f, 0); - if (gdraw->depth_buffer[1]) - gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[1], D3D1X_(CLEAR_STENCIL), 1.0f, 0); +static void RADLINK gdraw_ClearStencilBits(U32 /*bits*/) { + gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[0], + D3D1X_(CLEAR_STENCIL), 1.0f, 0); + if (gdraw->depth_buffer[1]) + gdraw->d3d_context->ClearDepthStencilView( + gdraw->depth_buffer[1], D3D1X_(CLEAR_STENCIL), 1.0f, 0); } // this only happens rarely (hopefully never) if we use the depth buffer, // so we can just clear the whole thing -static void RADLINK gdraw_ClearID(void) -{ - gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[0], D3D1X_(CLEAR_DEPTH), 1.0f, 0); - if (gdraw->depth_buffer[1]) - gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[1], D3D1X_(CLEAR_DEPTH), 1.0f, 0); +static void RADLINK gdraw_ClearID(void) { + gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[0], + D3D1X_(CLEAR_DEPTH), 1.0f, 0); + if (gdraw->depth_buffer[1]) + gdraw->d3d_context->ClearDepthStencilView(gdraw->depth_buffer[1], + D3D1X_(CLEAR_DEPTH), 1.0f, 0); } //////////////////////////////////////////////////////////////////////// @@ -1279,161 +1355,173 @@ static void RADLINK gdraw_ClearID(void) // convert an ID request to a value suitable for the depth buffer, // assuming the depth buffer has been mappped to 0..1 -static F32 depth_from_id(S32 id) -{ - return 1.0f - ((F32) id + 1.0f) / MAX_DEPTH_VALUE; +static F32 depth_from_id(S32 id) { + return 1.0f - ((F32)id + 1.0f) / MAX_DEPTH_VALUE; } -static void set_texture(S32 texunit, GDrawTexture *tex, rrbool nearest, S32 wrap) -{ - ID3D1XContext *d3d = gdraw->d3d_context; +static void set_texture(S32 texunit, GDrawTexture* tex, rrbool nearest, + S32 wrap) { + ID3D1XContext* d3d = gdraw->d3d_context; - if (tex == NULL) { - ID3D1X(ShaderResourceView) *notex = NULL; - d3d->PSSetShaderResources(texunit, 1, ¬ex); - } else { - GDrawHandle *h = (GDrawHandle *) tex; - d3d->PSSetShaderResources(texunit, 1, &h->handle.tex.d3d_view); - d3d->PSSetSamplers(texunit, 1, &gdraw->sampler_state[nearest][wrap]); - } + if (tex == NULL) { + ID3D1X(ShaderResourceView)* notex = NULL; + d3d->PSSetShaderResources(texunit, 1, ¬ex); + } else { + GDrawHandle* h = (GDrawHandle*)tex; + d3d->PSSetShaderResources(texunit, 1, &h->handle.tex.d3d_view); + d3d->PSSetSamplers(texunit, 1, &gdraw->sampler_state[nearest][wrap]); + } } -static void RADLINK gdraw_Set3DTransform(F32 *mat) -{ - if (mat == NULL) - gdraw->use_3d = 0; - else { - gdraw->use_3d = 1; - memcpy(gdraw->xform_3d, mat, sizeof(gdraw->xform_3d)); - } +static void RADLINK gdraw_Set3DTransform(F32* mat) { + if (mat == NULL) + gdraw->use_3d = 0; + else { + gdraw->use_3d = 1; + memcpy(gdraw->xform_3d, mat, sizeof(gdraw->xform_3d)); + } } -static int set_renderstate_full(S32 vertex_format, GDrawRenderState *r, GDrawStats * /* stats */, const F32 *rescale1) -{ - ID3D1XContext *d3d = gdraw->d3d_context; +static int set_renderstate_full(S32 vertex_format, GDrawRenderState* r, + GDrawStats* /* stats */, const F32* rescale1) { + ID3D1XContext* d3d = gdraw->d3d_context; - // set vertex shader - set_vertex_shader(d3d, gdraw->vert[vertex_format].vshader); - - // set vertex shader constants - if (VertexVars *vvars = (VertexVars *) map_buffer(gdraw->d3d_context, gdraw->cb_vertex, true)) { - F32 depth = depth_from_id(r->id); - if (!r->use_world_space) - gdraw_ObjectSpace(vvars->world[0], r->o2w, depth, 0.0f); - else - gdraw_WorldSpace(vvars->world[0], gdraw->world_to_pixel, depth, 0.0f); + // set vertex shader + set_vertex_shader(d3d, gdraw->vert[vertex_format].vshader); - memcpy(&vvars->x_off, r->edge_matrix, 4*sizeof(F32)); + // set vertex shader constants + if (VertexVars* vvars = (VertexVars*)map_buffer(gdraw->d3d_context, + gdraw->cb_vertex, true)) { + F32 depth = depth_from_id(r->id); + if (!r->use_world_space) + gdraw_ObjectSpace(vvars->world[0], r->o2w, depth, 0.0f); + else + gdraw_WorldSpace(vvars->world[0], gdraw->world_to_pixel, depth, + 0.0f); - if (r->texgen0_enabled) { - memcpy(&vvars->texgen_s, r->s0_texgen, 4*sizeof(F32)); - memcpy(&vvars->texgen_t, r->t0_texgen, 4*sizeof(F32)); - } + memcpy(&vvars->x_off, r->edge_matrix, 4 * sizeof(F32)); - if (gdraw->use_3d) - memcpy(vvars->x3d, gdraw->xform_3d, 12*sizeof(F32)); - else - memcpy(vvars->x3d, gdraw->projmat, 12*sizeof(F32)); + if (r->texgen0_enabled) { + memcpy(&vvars->texgen_s, r->s0_texgen, 4 * sizeof(F32)); + memcpy(&vvars->texgen_t, r->t0_texgen, 4 * sizeof(F32)); + } - unmap_buffer(gdraw->d3d_context, gdraw->cb_vertex); + if (gdraw->use_3d) + memcpy(vvars->x3d, gdraw->xform_3d, 12 * sizeof(F32)); + else + memcpy(vvars->x3d, gdraw->projmat, 12 * sizeof(F32)); - d3d->VSSetConstantBuffers(0, 1, &gdraw->cb_vertex); - } + unmap_buffer(gdraw->d3d_context, gdraw->cb_vertex); - // set the blend mode - int blend_mode = r->blend_mode; - if (blend_mode != gdraw->blend_mode) { - gdraw->blend_mode = blend_mode; - d3d->OMSetBlendState(gdraw->blend_state[blend_mode], four_zeros, ~0u); - } + d3d->VSSetConstantBuffers(0, 1, &gdraw->cb_vertex); + } - // set the fragment program - if (blend_mode != GDRAW_BLEND_special) { - int which = r->tex0_mode; - assert(which >= 0 && which < sizeof(gdraw->fprog) / sizeof(*gdraw->fprog)); + // set the blend mode + int blend_mode = r->blend_mode; + if (blend_mode != gdraw->blend_mode) { + gdraw->blend_mode = blend_mode; + d3d->OMSetBlendState(gdraw->blend_state[blend_mode], four_zeros, ~0u); + } - int additive = 0; - if (r->cxf_add) { - additive = 1; - if (r->cxf_add[3]) additive = 2; - } + // set the fragment program + if (blend_mode != GDRAW_BLEND_special) { + int which = r->tex0_mode; + assert(which >= 0 && + which < sizeof(gdraw->fprog) / sizeof(*gdraw->fprog)); - ID3D1X(PixelShader) *program = gdraw->fprog[which][additive].pshader; - if (r->stencil_set) { - // in stencil set mode, prefer not doing any shading at all - // but if alpha test is on, we need to make an exception + int additive = 0; + if (r->cxf_add) { + additive = 1; + if (r->cxf_add[3]) additive = 2; + } -#ifndef GDRAW_D3D11_LEVEL9 // level9 can't do NULL PS it seems - if (which != GDRAW_TEXTURE_alpha_test) - program = NULL; - else + ID3D1X(PixelShader)* program = gdraw->fprog[which][additive].pshader; + if (r->stencil_set) { + // in stencil set mode, prefer not doing any shading at all + // but if alpha test is on, we need to make an exception + +#ifndef GDRAW_D3D11_LEVEL9 // level9 can't do NULL PS it seems + if (which != GDRAW_TEXTURE_alpha_test) + program = NULL; + else #endif - { - gdraw->blend_mode = -1; - d3d->OMSetBlendState(gdraw->blend_no_color_write, four_zeros, ~0u); - } - } + { + gdraw->blend_mode = -1; + d3d->OMSetBlendState(gdraw->blend_no_color_write, four_zeros, + ~0u); + } + } - set_pixel_shader(d3d, program); - } else - set_pixel_shader(d3d, gdraw->exceptional_blend[r->special_blend].pshader); + set_pixel_shader(d3d, program); + } else + set_pixel_shader(d3d, + gdraw->exceptional_blend[r->special_blend].pshader); - set_texture(0, r->tex[0], r->nearest0, r->wrap0); + set_texture(0, r->tex[0], r->nearest0, r->wrap0); - // pixel shader constants - if (PixelCommonVars *pvars = (PixelCommonVars *) map_buffer(gdraw->d3d_context, gdraw->cb_ps_common, true)) { - memcpy(pvars->color_mul, r->color, 4*sizeof(float)); + // pixel shader constants + if (PixelCommonVars* pvars = (PixelCommonVars*)map_buffer( + gdraw->d3d_context, gdraw->cb_ps_common, true)) { + memcpy(pvars->color_mul, r->color, 4 * sizeof(float)); - if (r->cxf_add) { - pvars->color_add[0] = r->cxf_add[0] / 255.0f; - pvars->color_add[1] = r->cxf_add[1] / 255.0f; - pvars->color_add[2] = r->cxf_add[2] / 255.0f; - pvars->color_add[3] = r->cxf_add[3] / 255.0f; - } else - pvars->color_add[0] = pvars->color_add[1] = pvars->color_add[2] = pvars->color_add[3] = 0.0f; + if (r->cxf_add) { + pvars->color_add[0] = r->cxf_add[0] / 255.0f; + pvars->color_add[1] = r->cxf_add[1] / 255.0f; + pvars->color_add[2] = r->cxf_add[2] / 255.0f; + pvars->color_add[3] = r->cxf_add[3] / 255.0f; + } else + pvars->color_add[0] = pvars->color_add[1] = pvars->color_add[2] = + pvars->color_add[3] = 0.0f; - if (r->tex0_mode == GDRAW_TEXTURE_focal_gradient) memcpy(pvars->focal, r->focal_point, 4*sizeof(float)); - if (r->blend_mode == GDRAW_BLEND_special) memcpy(pvars->rescale1, rescale1, 4*sizeof(float)); - unmap_buffer(gdraw->d3d_context, gdraw->cb_ps_common); - d3d->PSSetConstantBuffers(0, 1, &gdraw->cb_ps_common); - } + if (r->tex0_mode == GDRAW_TEXTURE_focal_gradient) + memcpy(pvars->focal, r->focal_point, 4 * sizeof(float)); + if (r->blend_mode == GDRAW_BLEND_special) + memcpy(pvars->rescale1, rescale1, 4 * sizeof(float)); + unmap_buffer(gdraw->d3d_context, gdraw->cb_ps_common); + d3d->PSSetConstantBuffers(0, 1, &gdraw->cb_ps_common); + } - // Set pixel operation states - if (r->scissor) { - D3D1X_(RECT) s; - gdraw->scissor_state = 1; - if (gdraw->cur == gdraw->frame) { - s.left = r->scissor_rect.x0 + gdraw->vx - gdraw->tx0; - s.top = r->scissor_rect.y0 + gdraw->vy - gdraw->ty0; - s.right = r->scissor_rect.x1 + gdraw->vx - gdraw->tx0; - s.bottom = r->scissor_rect.y1 + gdraw->vy - gdraw->ty0; - } else { - s.left = r->scissor_rect.x0 - gdraw->tx0p; - s.top = r->scissor_rect.y0 - gdraw->ty0p; - s.right = r->scissor_rect.x1 - gdraw->tx0p; - s.bottom = r->scissor_rect.y1 - gdraw->ty0p; - } - d3d->RSSetScissorRects(1, &s); - } else if (r->scissor != gdraw->scissor_state) - disable_scissor(0); + // Set pixel operation states + if (r->scissor) { + D3D1X_(RECT) s; + gdraw->scissor_state = 1; + if (gdraw->cur == gdraw->frame) { + s.left = r->scissor_rect.x0 + gdraw->vx - gdraw->tx0; + s.top = r->scissor_rect.y0 + gdraw->vy - gdraw->ty0; + s.right = r->scissor_rect.x1 + gdraw->vx - gdraw->tx0; + s.bottom = r->scissor_rect.y1 + gdraw->vy - gdraw->ty0; + } else { + s.left = r->scissor_rect.x0 - gdraw->tx0p; + s.top = r->scissor_rect.y0 - gdraw->ty0p; + s.right = r->scissor_rect.x1 - gdraw->tx0p; + s.bottom = r->scissor_rect.y1 - gdraw->ty0p; + } + d3d->RSSetScissorRects(1, &s); + } else if (r->scissor != gdraw->scissor_state) + disable_scissor(0); - if (r->stencil_set | r->stencil_test) - d3d->OMSetDepthStencilState(stencil_state_cache_lookup(r->set_id, r->test_id, r->stencil_test, r->stencil_set), 255); - else - d3d->OMSetDepthStencilState(gdraw->depth_state[r->set_id][r->test_id], 0); + if (r->stencil_set | r->stencil_test) + d3d->OMSetDepthStencilState( + stencil_state_cache_lookup(r->set_id, r->test_id, r->stencil_test, + r->stencil_set), + 255); + else + d3d->OMSetDepthStencilState(gdraw->depth_state[r->set_id][r->test_id], + 0); - return 1; + return 1; } -static RADINLINE int set_renderstate(S32 vertex_format, GDrawRenderState *r, GDrawStats *stats) -{ - static const F32 unit_rescale[4] = { 1.0f, 1.0f, 0.0f, 0.0f }; - if (r->identical_state) { - // fast path: only need to change vertex shader, other state is the same - set_vertex_shader(gdraw->d3d_context, gdraw->vert[vertex_format].vshader); - return 1; - } else - return set_renderstate_full(vertex_format, r, stats, unit_rescale); +static RADINLINE int set_renderstate(S32 vertex_format, GDrawRenderState* r, + GDrawStats* stats) { + static const F32 unit_rescale[4] = {1.0f, 1.0f, 0.0f, 0.0f}; + if (r->identical_state) { + // fast path: only need to change vertex shader, other state is the same + set_vertex_shader(gdraw->d3d_context, + gdraw->vert[vertex_format].vshader); + return 1; + } else + return set_renderstate_full(vertex_format, r, stats, unit_rescale); } //////////////////////////////////////////////////////////////////////// @@ -1442,32 +1530,37 @@ static RADINLINE int set_renderstate(S32 vertex_format, GDrawRenderState *r, GDr // static D3D1X_(INPUT_ELEMENT_DESC) vformat_v2[] = { - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D1X_(INPUT_PER_VERTEX_DATA), 0 }, + {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, + D3D1X_(INPUT_PER_VERTEX_DATA), 0}, }; static D3D1X_(INPUT_ELEMENT_DESC) vformat_v2aa[] = { - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D1X_(INPUT_PER_VERTEX_DATA), 0 }, - { "TEXCOORD", 0, DXGI_FORMAT_R16G16B16A16_SINT, 0, 8, D3D1X_(INPUT_PER_VERTEX_DATA), 0 }, + {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, + D3D1X_(INPUT_PER_VERTEX_DATA), 0}, + {"TEXCOORD", 0, DXGI_FORMAT_R16G16B16A16_SINT, 0, 8, + D3D1X_(INPUT_PER_VERTEX_DATA), 0}, }; static D3D1X_(INPUT_ELEMENT_DESC) vformat_v2tc2[] = { - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D1X_(INPUT_PER_VERTEX_DATA), 0 }, - { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 8, D3D1X_(INPUT_PER_VERTEX_DATA), 0 }, + {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, + D3D1X_(INPUT_PER_VERTEX_DATA), 0}, + {"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 8, + D3D1X_(INPUT_PER_VERTEX_DATA), 0}, }; static struct gdraw_vertex_format_desc { - D3D1X_(INPUT_ELEMENT_DESC) *desc; - U32 nelem; + D3D1X_(INPUT_ELEMENT_DESC) * desc; + U32 nelem; } vformats[ASSERT_COUNT(GDRAW_vformat__basic_count, 3)] = { - vformat_v2, 1, // GDRAW_vformat_v2 - vformat_v2aa, 2, // GDRAW_vformat_v2aa - vformat_v2tc2, 2, // GDRAW_vforamt_v2tc2 + vformat_v2, 1, // GDRAW_vformat_v2 + vformat_v2aa, 2, // GDRAW_vformat_v2aa + vformat_v2tc2, 2, // GDRAW_vforamt_v2tc2 }; static int vertsize[GDRAW_vformat__basic_count] = { - 8, // GDRAW_vformat_v2 - 16, // GDRAW_vformat_v2aa - 16, // GDRAW_vformat_v2tc2 + 8, // GDRAW_vformat_v2 + 16, // GDRAW_vformat_v2aa + 16, // GDRAW_vformat_v2tc2 }; //////////////////////////////////////////////////////////////////////// @@ -1475,79 +1568,86 @@ static int vertsize[GDRAW_vformat__basic_count] = { // Draw triangles with a given renderstate // -static void tag_resources(void *r1, void *r2=NULL, void *r3=NULL, void *r4=NULL) -{ - U64 now = gdraw->frame_counter; - if (r1) ((GDrawHandle *) r1)->fence.value = now; - if (r2) ((GDrawHandle *) r2)->fence.value = now; - if (r3) ((GDrawHandle *) r3)->fence.value = now; - if (r4) ((GDrawHandle *) r4)->fence.value = now; +static void tag_resources(void* r1, void* r2 = NULL, void* r3 = NULL, + void* r4 = NULL) { + U64 now = gdraw->frame_counter; + if (r1) ((GDrawHandle*)r1)->fence.value = now; + if (r2) ((GDrawHandle*)r2)->fence.value = now; + if (r3) ((GDrawHandle*)r3)->fence.value = now; + if (r4) ((GDrawHandle*)r4)->fence.value = now; } -static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState *r, GDrawPrimitive *p, GDrawVertexBuffer *buf, GDrawStats *stats) -{ - ID3D1XContext *d3d = gdraw->d3d_context; - GDrawHandle *vb = (GDrawHandle *) buf; - int vfmt = p->vertex_format; - assert(vfmt >= 0 && vfmt < GDRAW_vformat__count); +static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState* r, + GDrawPrimitive* p, + GDrawVertexBuffer* buf, + GDrawStats* stats) { + ID3D1XContext* d3d = gdraw->d3d_context; + GDrawHandle* vb = (GDrawHandle*)buf; + int vfmt = p->vertex_format; + assert(vfmt >= 0 && vfmt < GDRAW_vformat__count); - if (!set_renderstate(vfmt, r, stats)) - return; + if (!set_renderstate(vfmt, r, stats)) return; - UINT stride = vertsize[vfmt]; - d3d->IASetInputLayout(gdraw->inlayout[vfmt]); + UINT stride = vertsize[vfmt]; + d3d->IASetInputLayout(gdraw->inlayout[vfmt]); - if (vb) { - UINT offs = (UINT) (UINTa) p->vertices; + if (vb) { + UINT offs = (UINT)(UINTa)p->vertices; - d3d->IASetVertexBuffers(0, 1, &vb->handle.vbuf.verts, &stride, &offs); - d3d->IASetIndexBuffer(vb->handle.vbuf.inds, DXGI_FORMAT_R16_UINT, (UINT) (UINTa) p->indices); - d3d->DrawIndexed(p->num_indices, 0, 0); - } else if (p->indices) { - U32 vbytes = p->num_vertices * stride; - U32 ibytes = p->num_indices * 2; - - if (void *vbptr = start_write_dyn(&gdraw->dyn_vb, vbytes)) { - memcpy(vbptr, p->vertices, vbytes); - UINT vboffs = end_write_dyn(&gdraw->dyn_vb); + d3d->IASetVertexBuffers(0, 1, &vb->handle.vbuf.verts, &stride, &offs); + d3d->IASetIndexBuffer(vb->handle.vbuf.inds, DXGI_FORMAT_R16_UINT, + (UINT)(UINTa)p->indices); + d3d->DrawIndexed(p->num_indices, 0, 0); + } else if (p->indices) { + U32 vbytes = p->num_vertices * stride; + U32 ibytes = p->num_indices * 2; - if (void *ibptr = start_write_dyn(&gdraw->dyn_ib, ibytes)) { - memcpy(ibptr, p->indices, ibytes); - UINT iboffs = end_write_dyn(&gdraw->dyn_ib); + if (void* vbptr = start_write_dyn(&gdraw->dyn_vb, vbytes)) { + memcpy(vbptr, p->vertices, vbytes); + UINT vboffs = end_write_dyn(&gdraw->dyn_vb); - d3d->IASetVertexBuffers(0, 1, &gdraw->dyn_vb.buffer, &stride, &vboffs); - d3d->IASetIndexBuffer(gdraw->dyn_ib.buffer, DXGI_FORMAT_R16_UINT, iboffs); - d3d->DrawIndexed(p->num_indices, 0, 0); - } - } - } else { // dynamic quads - assert(p->num_vertices % 4 == 0); - d3d->IASetIndexBuffer(gdraw->quad_ib, DXGI_FORMAT_R16_UINT, 0); + if (void* ibptr = start_write_dyn(&gdraw->dyn_ib, ibytes)) { + memcpy(ibptr, p->indices, ibytes); + UINT iboffs = end_write_dyn(&gdraw->dyn_ib); - if (gdraw->max_quad_vert_count) { - S32 pos = 0; - while (pos < p->num_vertices) { - S32 vert_count = RR_MIN(p->num_vertices - pos, gdraw->max_quad_vert_count); - UINT chunk_bytes = vert_count * stride; - - if (void *vbptr = start_write_dyn(&gdraw->dyn_vb, chunk_bytes)) { - memcpy(vbptr, (U8 *)p->vertices + pos*stride, chunk_bytes); - UINT offs = end_write_dyn(&gdraw->dyn_vb); - - d3d->IASetVertexBuffers(0, 1, &gdraw->dyn_vb.buffer, &stride, &offs); - d3d->DrawIndexed((vert_count >> 2) * 6, 0, 0); + d3d->IASetVertexBuffers(0, 1, &gdraw->dyn_vb.buffer, &stride, + &vboffs); + d3d->IASetIndexBuffer(gdraw->dyn_ib.buffer, + DXGI_FORMAT_R16_UINT, iboffs); + d3d->DrawIndexed(p->num_indices, 0, 0); } - pos += vert_count; - } - } - } + } + } else { // dynamic quads + assert(p->num_vertices % 4 == 0); + d3d->IASetIndexBuffer(gdraw->quad_ib, DXGI_FORMAT_R16_UINT, 0); - tag_resources(vb, r->tex[0], r->tex[1]); + if (gdraw->max_quad_vert_count) { + S32 pos = 0; + while (pos < p->num_vertices) { + S32 vert_count = + RR_MIN(p->num_vertices - pos, gdraw->max_quad_vert_count); + UINT chunk_bytes = vert_count * stride; - stats->nonzero_flags |= GDRAW_STATS_batches; - stats->num_batches += 1; - stats->drawn_indices += p->num_indices; - stats->drawn_vertices += p->num_vertices; + if (void* vbptr = + start_write_dyn(&gdraw->dyn_vb, chunk_bytes)) { + memcpy(vbptr, (U8*)p->vertices + pos * stride, chunk_bytes); + UINT offs = end_write_dyn(&gdraw->dyn_vb); + + d3d->IASetVertexBuffers(0, 1, &gdraw->dyn_vb.buffer, + &stride, &offs); + d3d->DrawIndexed((vert_count >> 2) * 6, 0, 0); + } + pos += vert_count; + } + } + } + + tag_resources(vb, r->tex[0], r->tex[1]); + + stats->nonzero_flags |= GDRAW_STATS_batches; + stats->num_batches += 1; + stats->drawn_indices += p->num_indices; + stats->drawn_vertices += p->num_vertices; } /////////////////////////////////////////////////////////////////////// @@ -1555,297 +1655,331 @@ static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState *r, GDrawPrimiti // Flash 8 filter effects // -static void *start_ps_constants(ID3D1X(Buffer) *buffer) -{ - return map_buffer(gdraw->d3d_context, buffer, true); +static void* start_ps_constants(ID3D1X(Buffer) * buffer) { + return map_buffer(gdraw->d3d_context, buffer, true); } -static void end_ps_constants(ID3D1X(Buffer) *buffer) -{ - unmap_buffer(gdraw->d3d_context, buffer); - gdraw->d3d_context->PSSetConstantBuffers(1, 1, &buffer); +static void end_ps_constants(ID3D1X(Buffer) * buffer) { + unmap_buffer(gdraw->d3d_context, buffer); + gdraw->d3d_context->PSSetConstantBuffers(1, 1, &buffer); } -static void set_pixel_constant(F32 *constant, F32 x, F32 y, F32 z, F32 w) -{ - constant[0] = x; - constant[1] = y; - constant[2] = z; - constant[3] = w; +static void set_pixel_constant(F32* constant, F32 x, F32 y, F32 z, F32 w) { + constant[0] = x; + constant[1] = y; + constant[2] = z; + constant[3] = w; } // caller sets up texture coordinates -static void do_screen_quad(gswf_recti *s, const F32 *tc, GDrawStats *stats) -{ - ID3D1XContext *d3d = gdraw->d3d_context; - F32 px0 = (F32) s->x0, py0 = (F32) s->y0, px1 = (F32) s->x1, py1 = (F32) s->y1; +static void do_screen_quad(gswf_recti* s, const F32* tc, GDrawStats* stats) { + ID3D1XContext* d3d = gdraw->d3d_context; + F32 px0 = (F32)s->x0, py0 = (F32)s->y0, px1 = (F32)s->x1, py1 = (F32)s->y1; - // generate vertex data - gswf_vertex_xyst *vert = (gswf_vertex_xyst *) start_write_dyn(&gdraw->dyn_vb, 4 * sizeof(gswf_vertex_xyst)); - if (!vert) - return; + // generate vertex data + gswf_vertex_xyst* vert = (gswf_vertex_xyst*)start_write_dyn( + &gdraw->dyn_vb, 4 * sizeof(gswf_vertex_xyst)); + if (!vert) return; - vert[0].x = px0; vert[0].y = py0; vert[0].s = tc[0]; vert[0].t = tc[1]; - vert[1].x = px1; vert[1].y = py0; vert[1].s = tc[2]; vert[1].t = tc[1]; - vert[2].x = px0; vert[2].y = py1; vert[2].s = tc[0]; vert[2].t = tc[3]; - vert[3].x = px1; vert[3].y = py1; vert[3].s = tc[2]; vert[3].t = tc[3]; - UINT offs = end_write_dyn(&gdraw->dyn_vb); - UINT stride = sizeof(gswf_vertex_xyst); + vert[0].x = px0; + vert[0].y = py0; + vert[0].s = tc[0]; + vert[0].t = tc[1]; + vert[1].x = px1; + vert[1].y = py0; + vert[1].s = tc[2]; + vert[1].t = tc[1]; + vert[2].x = px0; + vert[2].y = py1; + vert[2].s = tc[0]; + vert[2].t = tc[3]; + vert[3].x = px1; + vert[3].y = py1; + vert[3].s = tc[2]; + vert[3].t = tc[3]; + UINT offs = end_write_dyn(&gdraw->dyn_vb); + UINT stride = sizeof(gswf_vertex_xyst); - if (VertexVars *vvars = (VertexVars *) map_buffer(gdraw->d3d_context, gdraw->cb_vertex, true)) { - gdraw_PixelSpace(vvars->world[0]); - memcpy(vvars->x3d, gdraw->projmat, 12*sizeof(F32)); - unmap_buffer(gdraw->d3d_context, gdraw->cb_vertex); - d3d->VSSetConstantBuffers(0, 1, &gdraw->cb_vertex); + if (VertexVars* vvars = (VertexVars*)map_buffer(gdraw->d3d_context, + gdraw->cb_vertex, true)) { + gdraw_PixelSpace(vvars->world[0]); + memcpy(vvars->x3d, gdraw->projmat, 12 * sizeof(F32)); + unmap_buffer(gdraw->d3d_context, gdraw->cb_vertex); + d3d->VSSetConstantBuffers(0, 1, &gdraw->cb_vertex); - set_vertex_shader(d3d, gdraw->vert[GDRAW_vformat_v2tc2].vshader); + set_vertex_shader(d3d, gdraw->vert[GDRAW_vformat_v2tc2].vshader); - d3d->IASetInputLayout(gdraw->inlayout[GDRAW_vformat_v2tc2]); - d3d->IASetVertexBuffers(0, 1, &gdraw->dyn_vb.buffer, &stride, &offs); - d3d->IASetPrimitiveTopology(D3D1X_(PRIMITIVE_TOPOLOGY_TRIANGLESTRIP)); - d3d->Draw(4, 0); - d3d->IASetPrimitiveTopology(D3D1X_(PRIMITIVE_TOPOLOGY_TRIANGLELIST)); + d3d->IASetInputLayout(gdraw->inlayout[GDRAW_vformat_v2tc2]); + d3d->IASetVertexBuffers(0, 1, &gdraw->dyn_vb.buffer, &stride, &offs); + d3d->IASetPrimitiveTopology(D3D1X_(PRIMITIVE_TOPOLOGY_TRIANGLESTRIP)); + d3d->Draw(4, 0); + d3d->IASetPrimitiveTopology(D3D1X_(PRIMITIVE_TOPOLOGY_TRIANGLELIST)); - stats->nonzero_flags |= GDRAW_STATS_batches; - stats->num_batches += 1; - stats->drawn_indices += 6; - stats->drawn_vertices += 4; - } + stats->nonzero_flags |= GDRAW_STATS_batches; + stats->num_batches += 1; + stats->drawn_indices += 6; + stats->drawn_vertices += 4; + } } -static void manual_clear(gswf_recti *r, GDrawStats *stats) -{ - ID3D1XContext *d3d = gdraw->d3d_context; +static void manual_clear(gswf_recti* r, GDrawStats* stats) { + ID3D1XContext* d3d = gdraw->d3d_context; - // go to known render state - d3d->OMSetBlendState(gdraw->blend_state[GDRAW_BLEND_none], four_zeros, ~0u); - d3d->OMSetDepthStencilState(gdraw->depth_state[0][0], 0); - gdraw->blend_mode = GDRAW_BLEND_none; + // go to known render state + d3d->OMSetBlendState(gdraw->blend_state[GDRAW_BLEND_none], four_zeros, ~0u); + d3d->OMSetDepthStencilState(gdraw->depth_state[0][0], 0); + gdraw->blend_mode = GDRAW_BLEND_none; - set_viewport_raw(0, 0, gdraw->frametex_width, gdraw->frametex_height); - set_projection_raw(0, gdraw->frametex_width, gdraw->frametex_height, 0); - set_pixel_shader(d3d, gdraw->clear_ps.pshader); + set_viewport_raw(0, 0, gdraw->frametex_width, gdraw->frametex_height); + set_projection_raw(0, gdraw->frametex_width, gdraw->frametex_height, 0); + set_pixel_shader(d3d, gdraw->clear_ps.pshader); - if (PixelCommonVars *pvars = (PixelCommonVars *) map_buffer(gdraw->d3d_context, gdraw->cb_ps_common, true)) { - memset(pvars, 0, sizeof(*pvars)); - unmap_buffer(gdraw->d3d_context, gdraw->cb_ps_common); - d3d->PSSetConstantBuffers(0, 1, &gdraw->cb_ps_common); + if (PixelCommonVars* pvars = (PixelCommonVars*)map_buffer( + gdraw->d3d_context, gdraw->cb_ps_common, true)) { + memset(pvars, 0, sizeof(*pvars)); + unmap_buffer(gdraw->d3d_context, gdraw->cb_ps_common); + d3d->PSSetConstantBuffers(0, 1, &gdraw->cb_ps_common); - do_screen_quad(r, four_zeros, stats); - } + do_screen_quad(r, four_zeros, stats); + } } -static void gdraw_DriverBlurPass(GDrawRenderState *r, int taps, float *data, gswf_recti *s, float *tc, float /*height_max*/, float *clamp, GDrawStats *gstats) -{ - set_texture(0, r->tex[0], false, GDRAW_WRAP_clamp); +static void gdraw_DriverBlurPass(GDrawRenderState* r, int taps, float* data, + gswf_recti* s, float* tc, float /*height_max*/, + float* clamp, GDrawStats* gstats) { + set_texture(0, r->tex[0], false, GDRAW_WRAP_clamp); - set_pixel_shader(gdraw->d3d_context, gdraw->blur_prog[taps].pshader); - PixelParaBlur *para = (PixelParaBlur *) start_ps_constants(gdraw->cb_blur); - memcpy(para->clamp, clamp, 4 * sizeof(float)); - memcpy(para->tap, data, taps * 4 * sizeof(float)); - end_ps_constants(gdraw->cb_blur); + set_pixel_shader(gdraw->d3d_context, gdraw->blur_prog[taps].pshader); + PixelParaBlur* para = (PixelParaBlur*)start_ps_constants(gdraw->cb_blur); + memcpy(para->clamp, clamp, 4 * sizeof(float)); + memcpy(para->tap, data, taps * 4 * sizeof(float)); + end_ps_constants(gdraw->cb_blur); - do_screen_quad(s, tc, gstats); - tag_resources(r->tex[0]); + do_screen_quad(s, tc, gstats); + tag_resources(r->tex[0]); } -static void gdraw_Colormatrix(GDrawRenderState *r, gswf_recti *s, float *tc, GDrawStats *stats) -{ - if (!gdraw_TextureDrawBufferBegin(s, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, 0, stats)) - return; +static void gdraw_Colormatrix(GDrawRenderState* r, gswf_recti* s, float* tc, + GDrawStats* stats) { + if (!gdraw_TextureDrawBufferBegin( + s, GDRAW_TEXTURE_FORMAT_rgba32, + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, + 0, stats)) + return; - set_texture(0, r->tex[0], false, GDRAW_WRAP_clamp); - set_pixel_shader(gdraw->d3d_context, gdraw->colormatrix.pshader); + set_texture(0, r->tex[0], false, GDRAW_WRAP_clamp); + set_pixel_shader(gdraw->d3d_context, gdraw->colormatrix.pshader); - PixelParaColorMatrix *para = (PixelParaColorMatrix *) start_ps_constants(gdraw->cb_colormatrix); - memcpy(para->data, r->shader_data, 5 * 4 * sizeof(float)); - end_ps_constants(gdraw->cb_colormatrix); + PixelParaColorMatrix* para = + (PixelParaColorMatrix*)start_ps_constants(gdraw->cb_colormatrix); + memcpy(para->data, r->shader_data, 5 * 4 * sizeof(float)); + end_ps_constants(gdraw->cb_colormatrix); - do_screen_quad(s, tc, stats); - tag_resources(r->tex[0]); - r->tex[0] = gdraw_TextureDrawBufferEnd(stats); + do_screen_quad(s, tc, stats); + tag_resources(r->tex[0]); + r->tex[0] = gdraw_TextureDrawBufferEnd(stats); } -static gswf_recti *get_valid_rect(GDrawTexture *tex) -{ - GDrawHandle *h = (GDrawHandle *) tex; - S32 n = (S32) (h - gdraw->rendertargets.handle); - assert(n >= 0 && n <= MAX_RENDER_STACK_DEPTH+1); - return &gdraw->rt_valid[n]; +static gswf_recti* get_valid_rect(GDrawTexture* tex) { + GDrawHandle* h = (GDrawHandle*)tex; + S32 n = (S32)(h - gdraw->rendertargets.handle); + assert(n >= 0 && n <= MAX_RENDER_STACK_DEPTH + 1); + return &gdraw->rt_valid[n]; } -static void set_clamp_constant(F32 *constant, GDrawTexture *tex) -{ - gswf_recti *s = get_valid_rect(tex); - // when we make the valid data, we make sure there is an extra empty pixel at the border - set_pixel_constant(constant, - (s->x0-0.5f) / gdraw->frametex_width, - (s->y0-0.5f) / gdraw->frametex_height, - (s->x1+0.5f) / gdraw->frametex_width, - (s->y1+0.5f) / gdraw->frametex_height); +static void set_clamp_constant(F32* constant, GDrawTexture* tex) { + gswf_recti* s = get_valid_rect(tex); + // when we make the valid data, we make sure there is an extra empty pixel + // at the border + set_pixel_constant(constant, (s->x0 - 0.5f) / gdraw->frametex_width, + (s->y0 - 0.5f) / gdraw->frametex_height, + (s->x1 + 0.5f) / gdraw->frametex_width, + (s->y1 + 0.5f) / gdraw->frametex_height); } -static void gdraw_Filter(GDrawRenderState *r, gswf_recti *s, float *tc, int isbevel, GDrawStats *stats) -{ - if (!gdraw_TextureDrawBufferBegin(s, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, NULL, stats)) - return; +static void gdraw_Filter(GDrawRenderState* r, gswf_recti* s, float* tc, + int isbevel, GDrawStats* stats) { + if (!gdraw_TextureDrawBufferBegin( + s, GDRAW_TEXTURE_FORMAT_rgba32, + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, + NULL, stats)) + return; - set_texture(0, r->tex[0], false, GDRAW_WRAP_clamp); - set_texture(1, r->tex[1], false, GDRAW_WRAP_clamp); - set_texture(2, r->tex[2], false, GDRAW_WRAP_clamp); - set_pixel_shader(gdraw->d3d_context, gdraw->filter_prog[isbevel][r->filter_mode].pshader); + set_texture(0, r->tex[0], false, GDRAW_WRAP_clamp); + set_texture(1, r->tex[1], false, GDRAW_WRAP_clamp); + set_texture(2, r->tex[2], false, GDRAW_WRAP_clamp); + set_pixel_shader(gdraw->d3d_context, + gdraw->filter_prog[isbevel][r->filter_mode].pshader); - PixelParaFilter *para = (PixelParaFilter *) start_ps_constants(gdraw->cb_filter); - set_clamp_constant(para->clamp0, r->tex[0]); - set_clamp_constant(para->clamp1, r->tex[1]); - set_pixel_constant(para->color, r->shader_data[0], r->shader_data[1], r->shader_data[2], r->shader_data[3]); - set_pixel_constant(para->color2, r->shader_data[8], r->shader_data[9], r->shader_data[10], r->shader_data[11]); - set_pixel_constant(para->tc_off, -r->shader_data[4] / (F32)gdraw->frametex_width, -r->shader_data[5] / (F32)gdraw->frametex_height, r->shader_data[6], 0); - end_ps_constants(gdraw->cb_filter); + PixelParaFilter* para = + (PixelParaFilter*)start_ps_constants(gdraw->cb_filter); + set_clamp_constant(para->clamp0, r->tex[0]); + set_clamp_constant(para->clamp1, r->tex[1]); + set_pixel_constant(para->color, r->shader_data[0], r->shader_data[1], + r->shader_data[2], r->shader_data[3]); + set_pixel_constant(para->color2, r->shader_data[8], r->shader_data[9], + r->shader_data[10], r->shader_data[11]); + set_pixel_constant( + para->tc_off, -r->shader_data[4] / (F32)gdraw->frametex_width, + -r->shader_data[5] / (F32)gdraw->frametex_height, r->shader_data[6], 0); + end_ps_constants(gdraw->cb_filter); - do_screen_quad(s, tc, stats); - tag_resources(r->tex[0], r->tex[1], r->tex[2]); - r->tex[0] = gdraw_TextureDrawBufferEnd(stats); + do_screen_quad(s, tc, stats); + tag_resources(r->tex[0], r->tex[1], r->tex[2]); + r->tex[0] = gdraw_TextureDrawBufferEnd(stats); } -static void RADLINK gdraw_FilterQuad(GDrawRenderState *r, S32 x0, S32 y0, S32 x1, S32 y1, GDrawStats *stats) -{ - ID3D1XContext *d3d = gdraw->d3d_context; - F32 tc[4]; - gswf_recti s; +static void RADLINK gdraw_FilterQuad(GDrawRenderState* r, S32 x0, S32 y0, + S32 x1, S32 y1, GDrawStats* stats) { + ID3D1XContext* d3d = gdraw->d3d_context; + F32 tc[4]; + gswf_recti s; - // clip to tile boundaries - s.x0 = RR_MAX(x0, gdraw->tx0p); - s.y0 = RR_MAX(y0, gdraw->ty0p); - s.x1 = RR_MIN(x1, gdraw->tx0p + gdraw->tpw); - s.y1 = RR_MIN(y1, gdraw->ty0p + gdraw->tph); - if (s.x1 < s.x0 || s.y1 < s.y0) - return; + // clip to tile boundaries + s.x0 = RR_MAX(x0, gdraw->tx0p); + s.y0 = RR_MAX(y0, gdraw->ty0p); + s.x1 = RR_MIN(x1, gdraw->tx0p + gdraw->tpw); + s.y1 = RR_MIN(y1, gdraw->ty0p + gdraw->tph); + if (s.x1 < s.x0 || s.y1 < s.y0) return; - tc[0] = (s.x0 - gdraw->tx0p) / (F32) gdraw->frametex_width; - tc[1] = (s.y0 - gdraw->ty0p) / (F32) gdraw->frametex_height; - tc[2] = (s.x1 - gdraw->tx0p) / (F32) gdraw->frametex_width; - tc[3] = (s.y1 - gdraw->ty0p) / (F32) gdraw->frametex_height; + tc[0] = (s.x0 - gdraw->tx0p) / (F32)gdraw->frametex_width; + tc[1] = (s.y0 - gdraw->ty0p) / (F32)gdraw->frametex_height; + tc[2] = (s.x1 - gdraw->tx0p) / (F32)gdraw->frametex_width; + tc[3] = (s.y1 - gdraw->ty0p) / (F32)gdraw->frametex_height; - // clear to known render state - d3d->OMSetBlendState(gdraw->blend_state[GDRAW_BLEND_none], four_zeros, ~0u); - d3d->OMSetDepthStencilState(gdraw->depth_state[0][0], 0); - disable_scissor(0); - gdraw->blend_mode = GDRAW_BLEND_none; + // clear to known render state + d3d->OMSetBlendState(gdraw->blend_state[GDRAW_BLEND_none], four_zeros, ~0u); + d3d->OMSetDepthStencilState(gdraw->depth_state[0][0], 0); + disable_scissor(0); + gdraw->blend_mode = GDRAW_BLEND_none; - if (r->blend_mode == GDRAW_BLEND_filter) { - switch (r->filter) { - case GDRAW_FILTER_blur: { - GDrawBlurInfo b; - gswf_recti bounds = *get_valid_rect(r->tex[0]); - gdraw_ShiftRect(&s, &s, -gdraw->tx0p, -gdraw->ty0p); // blur uses physical rendertarget coordinates + if (r->blend_mode == GDRAW_BLEND_filter) { + switch (r->filter) { + case GDRAW_FILTER_blur: { + GDrawBlurInfo b; + gswf_recti bounds = *get_valid_rect(r->tex[0]); + gdraw_ShiftRect(&s, &s, -gdraw->tx0p, + -gdraw->ty0p); // blur uses physical + // rendertarget coordinates - b.BlurPass = gdraw_DriverBlurPass; - b.w = gdraw->tpw; - b.h = gdraw->tph; - b.frametex_width = gdraw->frametex_width; - b.frametex_height = gdraw->frametex_height; + b.BlurPass = gdraw_DriverBlurPass; + b.w = gdraw->tpw; + b.h = gdraw->tph; + b.frametex_width = gdraw->frametex_width; + b.frametex_height = gdraw->frametex_height; - // blur needs to draw with multiple passes, so set up special state - gdraw->in_blur = true; + // blur needs to draw with multiple passes, so set up special + // state + gdraw->in_blur = true; - // do the blur - gdraw_Blur(&gdraw_funcs, &b, r, &s, &bounds, stats); + // do the blur + gdraw_Blur(&gdraw_funcs, &b, r, &s, &bounds, stats); - // restore the normal state - gdraw->in_blur = false; - set_viewport(); - set_projection(); - break; - } - - case GDRAW_FILTER_colormatrix: - gdraw_Colormatrix(r, &s, tc, stats); - break; - - case GDRAW_FILTER_dropshadow: - gdraw_Filter(r, &s, tc, 0, stats); - break; - - case GDRAW_FILTER_bevel: - gdraw_Filter(r, &s, tc, 1, stats); - break; - - default: - assert(0); - } - } else { - GDrawHandle *blend_tex = NULL; - - // for crazy blend modes, we need to read back from the framebuffer - // and do the blending in the pixel shader. we do this with copies - // rather than trying to render-to-texture-all-along, because we want - // to be able to render over the user's existing framebuffer, which might - // not be a texture. note that this isn't optimal when MSAA is on! - F32 rescale1[4] = { 1.0f, 1.0f, 0.0f, 0.0f }; - if (r->blend_mode == GDRAW_BLEND_special) { - ID3D1XContext *d3d = gdraw->d3d_context; - ID3D1X(Resource) *cur_rt_rsrc; - get_active_render_target()->GetResource(&cur_rt_rsrc); - - if (gdraw->cur == gdraw->frame && gdraw->main_msaa) { - // source surface is main framebuffer and it uses MSAA. just resolve it first. - D3D1X_(SHADER_RESOURCE_VIEW_DESC) desc; - D3D1X_(TEXTURE2D_DESC) texdesc; - ID3D1X(Texture2D) *resolve_tex; - - gdraw->main_resolve_target->GetDesc(&desc); - gdraw->main_resolve_target->GetResource((ID3D1X(Resource) **) &resolve_tex); - resolve_tex->GetDesc(&texdesc); - d3d->ResolveSubresource(resolve_tex, 0, cur_rt_rsrc, 0, desc.Format); - resolve_tex->Release(); - - stats->nonzero_flags |= GDRAW_STATS_blits; - stats->num_blits += 1; - stats->num_blit_pixels += texdesc.Width * texdesc.Height; - - d3d->PSSetShaderResources(1, 1, &gdraw->main_resolve_target); - d3d->PSSetSamplers(1, 1, &gdraw->sampler_state[0][GDRAW_WRAP_clamp]); - - // calculate texture coordinate remapping - rescale1[0] = gdraw->frametex_width / (F32) texdesc.Width; - rescale1[1] = gdraw->frametex_height / (F32) texdesc.Height; - rescale1[2] = (gdraw->vx - gdraw->tx0 + gdraw->tx0p) / (F32) texdesc.Width; - rescale1[3] = (gdraw->vy - gdraw->ty0 + gdraw->ty0p) / (F32) texdesc.Height; - } else { - D3D1X_(BOX) box = { 0,0,0,0,0,1 }; - S32 dx = 0, dy = 0; - blend_tex = get_color_rendertarget(stats); - - if (gdraw->cur != gdraw->frame) - box.right=gdraw->tpw, box.bottom=gdraw->tph; - else { - box.left=gdraw->vx, box.top=gdraw->vy, box.right=gdraw->vx+gdraw->tw, box.bottom=gdraw->vy+gdraw->th; - dx = gdraw->tx0 - gdraw->tx0p; - dy = gdraw->ty0 - gdraw->ty0p; + // restore the normal state + gdraw->in_blur = false; + set_viewport(); + set_projection(); + break; } - d3d->CopySubresourceRegion(blend_tex->handle.tex.d3d, 0, dx, dy, 0, - cur_rt_rsrc, 0, &box); + case GDRAW_FILTER_colormatrix: + gdraw_Colormatrix(r, &s, tc, stats); + break; - stats->nonzero_flags |= GDRAW_STATS_blits; - stats->num_blits += 1; - stats->num_blit_pixels += (box.right - box.left) * (box.bottom - box.top); + case GDRAW_FILTER_dropshadow: + gdraw_Filter(r, &s, tc, 0, stats); + break; - set_texture(1, (GDrawTexture *) blend_tex, false, GDRAW_WRAP_clamp); - } - - cur_rt_rsrc->Release(); - } + case GDRAW_FILTER_bevel: + gdraw_Filter(r, &s, tc, 1, stats); + break; - if (!set_renderstate_full(GDRAW_vformat_v2tc2, r, stats, rescale1)) - return; + default: + assert(0); + } + } else { + GDrawHandle* blend_tex = NULL; - do_screen_quad(&s, tc, stats); - tag_resources(r->tex[0], r->tex[1]); - if (blend_tex) - gdraw_FreeTexture((GDrawTexture *) blend_tex, 0, stats); - } + // for crazy blend modes, we need to read back from the framebuffer + // and do the blending in the pixel shader. we do this with copies + // rather than trying to render-to-texture-all-along, because we want + // to be able to render over the user's existing framebuffer, which + // might not be a texture. note that this isn't optimal when MSAA is on! + F32 rescale1[4] = {1.0f, 1.0f, 0.0f, 0.0f}; + if (r->blend_mode == GDRAW_BLEND_special) { + ID3D1XContext* d3d = gdraw->d3d_context; + ID3D1X(Resource) * cur_rt_rsrc; + get_active_render_target()->GetResource(&cur_rt_rsrc); + + if (gdraw->cur == gdraw->frame && gdraw->main_msaa) { + // source surface is main framebuffer and it uses MSAA. just + // resolve it first. + D3D1X_(SHADER_RESOURCE_VIEW_DESC) desc; + D3D1X_(TEXTURE2D_DESC) texdesc; + ID3D1X(Texture2D) * resolve_tex; + + gdraw->main_resolve_target->GetDesc(&desc); + gdraw->main_resolve_target->GetResource( + (ID3D1X(Resource)**)&resolve_tex); + resolve_tex->GetDesc(&texdesc); + d3d->ResolveSubresource(resolve_tex, 0, cur_rt_rsrc, 0, + desc.Format); + resolve_tex->Release(); + + stats->nonzero_flags |= GDRAW_STATS_blits; + stats->num_blits += 1; + stats->num_blit_pixels += texdesc.Width * texdesc.Height; + + d3d->PSSetShaderResources(1, 1, &gdraw->main_resolve_target); + d3d->PSSetSamplers(1, 1, + &gdraw->sampler_state[0][GDRAW_WRAP_clamp]); + + // calculate texture coordinate remapping + rescale1[0] = gdraw->frametex_width / (F32)texdesc.Width; + rescale1[1] = gdraw->frametex_height / (F32)texdesc.Height; + rescale1[2] = + (gdraw->vx - gdraw->tx0 + gdraw->tx0p) / (F32)texdesc.Width; + rescale1[3] = (gdraw->vy - gdraw->ty0 + gdraw->ty0p) / + (F32)texdesc.Height; + } else { + D3D1X_(BOX) box = {0, 0, 0, 0, 0, 1}; + S32 dx = 0, dy = 0; + blend_tex = get_color_rendertarget(stats); + + if (gdraw->cur != gdraw->frame) + box.right = gdraw->tpw, box.bottom = gdraw->tph; + else { + box.left = gdraw->vx, box.top = gdraw->vy, + box.right = gdraw->vx + gdraw->tw, + box.bottom = gdraw->vy + gdraw->th; + dx = gdraw->tx0 - gdraw->tx0p; + dy = gdraw->ty0 - gdraw->ty0p; + } + + d3d->CopySubresourceRegion(blend_tex->handle.tex.d3d, 0, dx, dy, + 0, cur_rt_rsrc, 0, &box); + + stats->nonzero_flags |= GDRAW_STATS_blits; + stats->num_blits += 1; + stats->num_blit_pixels += + (box.right - box.left) * (box.bottom - box.top); + + set_texture(1, (GDrawTexture*)blend_tex, false, + GDRAW_WRAP_clamp); + } + + cur_rt_rsrc->Release(); + } + + if (!set_renderstate_full(GDRAW_vformat_v2tc2, r, stats, rescale1)) + return; + + do_screen_quad(&s, tc, stats); + tag_resources(r->tex[0], r->tex[1]); + if (blend_tex) gdraw_FreeTexture((GDrawTexture*)blend_tex, 0, stats); + } } /////////////////////////////////////////////////////////////////////// @@ -1855,214 +1989,260 @@ static void RADLINK gdraw_FilterQuad(GDrawRenderState *r, S32 x0, S32 y0, S32 x1 #include GDRAW_SHADER_FILE -static void destroy_shader(ProgramWithCachedVariableLocations *p) -{ - if (p->pshader) { - p->pshader->Release(); - p->pshader = NULL; - } +static void destroy_shader(ProgramWithCachedVariableLocations* p) { + if (p->pshader) { + p->pshader->Release(); + p->pshader = NULL; + } } -static ID3D1X(Buffer) *create_dynamic_buffer(U32 size, U32 bind) -{ - D3D1X_(BUFFER_DESC) desc = { size, D3D1X_(USAGE_DYNAMIC), bind, D3D1X_(CPU_ACCESS_WRITE), 0 }; - ID3D1X(Buffer) *buf = NULL; - HRESULT hr = gdraw->d3d_device->CreateBuffer(&desc, NULL, &buf); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateBuffer", " creating dynamic vertex buffer"); - buf = NULL; - } - return buf; +static ID3D1X(Buffer) * create_dynamic_buffer(U32 size, U32 bind) { + D3D1X_(BUFFER_DESC) + desc = {size, D3D1X_(USAGE_DYNAMIC), bind, D3D1X_(CPU_ACCESS_WRITE), 0}; + ID3D1X(Buffer)* buf = NULL; + HRESULT hr = gdraw->d3d_device->CreateBuffer(&desc, NULL, &buf); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateBuffer", " creating dynamic vertex buffer"); + buf = NULL; + } + return buf; } -static void init_dyn_buffer(DynBuffer *buf, U32 size, U32 bind) -{ - buf->buffer = create_dynamic_buffer(size, bind); - buf->size = size; - buf->write_pos = 0; - buf->alloc_pos = 0; +static void init_dyn_buffer(DynBuffer* buf, U32 size, U32 bind) { + buf->buffer = create_dynamic_buffer(size, bind); + buf->size = size; + buf->write_pos = 0; + buf->alloc_pos = 0; } -// These two functions are implemented by the D3D10- respectively D3D11-specific part. -static void create_pixel_shader(ProgramWithCachedVariableLocations *p, ProgramWithCachedVariableLocations *src); -static void create_vertex_shader(ProgramWithCachedVariableLocations *p, ProgramWithCachedVariableLocations *src); +// These two functions are implemented by the D3D10- respectively D3D11-specific +// part. +static void create_pixel_shader(ProgramWithCachedVariableLocations* p, + ProgramWithCachedVariableLocations* src); +static void create_vertex_shader(ProgramWithCachedVariableLocations* p, + ProgramWithCachedVariableLocations* src); -static void create_all_shaders_and_state(void) -{ - ID3D1X(Device) *d3d = gdraw->d3d_device; - HRESULT hr; - S32 i, j; +static void create_all_shaders_and_state(void) { + ID3D1X(Device)* d3d = gdraw->d3d_device; + HRESULT hr; + S32 i, j; - for (i=0; i < GDRAW_TEXTURE__count*3; ++i) create_pixel_shader(&gdraw->fprog[0][i], pshader_basic_arr + i); - for (i=0; i < GDRAW_BLENDSPECIAL__count; ++i) create_pixel_shader(&gdraw->exceptional_blend[i], pshader_exceptional_blend_arr + i); - for (i=0; i < 32; ++i) create_pixel_shader(&gdraw->filter_prog[0][i], pshader_filter_arr + i); - for (i=0; i < MAX_TAPS+1; ++i) create_pixel_shader(&gdraw->blur_prog[i], pshader_blur_arr + i); - create_pixel_shader(&gdraw->colormatrix, pshader_color_matrix_arr); - create_pixel_shader(&gdraw->clear_ps, pshader_manual_clear_arr); + for (i = 0; i < GDRAW_TEXTURE__count * 3; ++i) + create_pixel_shader(&gdraw->fprog[0][i], pshader_basic_arr + i); + for (i = 0; i < GDRAW_BLENDSPECIAL__count; ++i) + create_pixel_shader(&gdraw->exceptional_blend[i], + pshader_exceptional_blend_arr + i); + for (i = 0; i < 32; ++i) + create_pixel_shader(&gdraw->filter_prog[0][i], pshader_filter_arr + i); + for (i = 0; i < MAX_TAPS + 1; ++i) + create_pixel_shader(&gdraw->blur_prog[i], pshader_blur_arr + i); + create_pixel_shader(&gdraw->colormatrix, pshader_color_matrix_arr); + create_pixel_shader(&gdraw->clear_ps, pshader_manual_clear_arr); - for (i=0; i < GDRAW_vformat__basic_count; i++) { - ProgramWithCachedVariableLocations *vsh = vshader_vsd3d10_arr + i; + for (i = 0; i < GDRAW_vformat__basic_count; i++) { + ProgramWithCachedVariableLocations* vsh = vshader_vsd3d10_arr + i; - create_vertex_shader(&gdraw->vert[i], vsh); - HRESULT hr = d3d->CreateInputLayout(vformats[i].desc, vformats[i].nelem, vsh->bytecode, vsh->size, &gdraw->inlayout[i]); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateInputLayout", ""); - gdraw->inlayout[i] = NULL; - } - } + create_vertex_shader(&gdraw->vert[i], vsh); + HRESULT hr = d3d->CreateInputLayout(vformats[i].desc, vformats[i].nelem, + vsh->bytecode, vsh->size, + &gdraw->inlayout[i]); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateInputLayout", ""); + gdraw->inlayout[i] = NULL; + } + } - // create rasterizer state setups - for (i=0; i < 2; ++i) { - D3D1X_(RASTERIZER_DESC) raster_desc = { D3D1X_(FILL_SOLID), D3D1X_(CULL_NONE), FALSE, 0, 0.0f, 0.0f, TRUE, TRUE, FALSE, FALSE }; - raster_desc.MultisampleEnable = i; - hr = d3d->CreateRasterizerState(&raster_desc, &gdraw->raster_state[i]); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateRasterizerState", ""); - return; - } - } - - // create sampler state setups - static const D3D1X_(TEXTURE_ADDRESS_MODE) addrmode[ASSERT_COUNT(GDRAW_WRAP__count, 4)] = { - D3D1X_(TEXTURE_ADDRESS_CLAMP), // GDRAW_WRAP_clamp - D3D1X_(TEXTURE_ADDRESS_WRAP), // GDRAW_WRAP_repeat - D3D1X_(TEXTURE_ADDRESS_MIRROR), // GDRAW_WRAP_mirror - D3D1X_(TEXTURE_ADDRESS_CLAMP), // GDRAW_WRAP_clamp_to_border (unused for this renderer) - }; - - for (i=0; i < 2; ++i) { - for (j=0; j < GDRAW_WRAP__count; ++j) { - D3D1X_(SAMPLER_DESC) sampler_desc; - memset(&sampler_desc, 0, sizeof(sampler_desc)); - sampler_desc.Filter = i ? D3D1X_(FILTER_MIN_LINEAR_MAG_MIP_POINT) : D3D1X_(FILTER_MIN_MAG_MIP_LINEAR); - sampler_desc.AddressU = addrmode[j]; - sampler_desc.AddressV = addrmode[j]; - sampler_desc.AddressW = D3D1X_(TEXTURE_ADDRESS_CLAMP); - sampler_desc.MaxAnisotropy = 1; - sampler_desc.MaxLOD = D3D1X_(FLOAT32_MAX); - hr = d3d->CreateSamplerState(&sampler_desc, &gdraw->sampler_state[i][j]); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateSamplerState", ""); + // create rasterizer state setups + for (i = 0; i < 2; ++i) { + D3D1X_(RASTERIZER_DESC) + raster_desc = {D3D1X_(FILL_SOLID), + D3D1X_(CULL_NONE), + FALSE, + 0, + 0.0f, + 0.0f, + TRUE, + TRUE, + FALSE, + FALSE}; + raster_desc.MultisampleEnable = i; + hr = d3d->CreateRasterizerState(&raster_desc, &gdraw->raster_state[i]); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateRasterizerState", ""); return; - } - } - } + } + } - // create blend stage setups - static struct blendspec { - BOOL blend; - D3D1X_(BLEND) src; - D3D1X_(BLEND) dst; - } blends[ASSERT_COUNT(GDRAW_BLEND__count, 6)] = { - FALSE, D3D1X_(BLEND_ONE), D3D1X_(BLEND_ZERO), // GDRAW_BLEND_none - TRUE, D3D1X_(BLEND_ONE), D3D1X_(BLEND_INV_SRC_ALPHA), // GDRAW_BLEND_alpha - TRUE, D3D1X_(BLEND_DEST_COLOR), D3D1X_(BLEND_INV_SRC_ALPHA), // GDRAW_BLEND_multiply - TRUE, D3D1X_(BLEND_ONE), D3D1X_(BLEND_ONE), // GDRAW_BLEND_add + // create sampler state setups + static const D3D1X_(TEXTURE_ADDRESS_MODE) + addrmode[ASSERT_COUNT(GDRAW_WRAP__count, 4)] = { + D3D1X_(TEXTURE_ADDRESS_CLAMP), // GDRAW_WRAP_clamp + D3D1X_(TEXTURE_ADDRESS_WRAP), // GDRAW_WRAP_repeat + D3D1X_(TEXTURE_ADDRESS_MIRROR), // GDRAW_WRAP_mirror + D3D1X_(TEXTURE_ADDRESS_CLAMP), // GDRAW_WRAP_clamp_to_border + // (unused for this renderer) + }; - FALSE, D3D1X_(BLEND_ONE), D3D1X_(BLEND_ZERO), // GDRAW_BLEND_filter - FALSE, D3D1X_(BLEND_ONE), D3D1X_(BLEND_ZERO), // GDRAW_BLEND_special - }; + for (i = 0; i < 2; ++i) { + for (j = 0; j < GDRAW_WRAP__count; ++j) { + D3D1X_(SAMPLER_DESC) sampler_desc; + memset(&sampler_desc, 0, sizeof(sampler_desc)); + sampler_desc.Filter = i ? D3D1X_(FILTER_MIN_LINEAR_MAG_MIP_POINT) + : D3D1X_(FILTER_MIN_MAG_MIP_LINEAR); + sampler_desc.AddressU = addrmode[j]; + sampler_desc.AddressV = addrmode[j]; + sampler_desc.AddressW = D3D1X_(TEXTURE_ADDRESS_CLAMP); + sampler_desc.MaxAnisotropy = 1; + sampler_desc.MaxLOD = D3D1X_(FLOAT32_MAX); + hr = d3d->CreateSamplerState(&sampler_desc, + &gdraw->sampler_state[i][j]); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateSamplerState", ""); + return; + } + } + } - for (i=0; i < GDRAW_BLEND__count; ++i) { - gdraw->blend_state[i] = create_blend_state(d3d, blends[i].blend, blends[i].src, blends[i].dst); - if (!gdraw->blend_state[i]) - return; - } + // create blend stage setups + static struct blendspec { + BOOL blend; + D3D1X_(BLEND) src; + D3D1X_(BLEND) dst; + } blends[ASSERT_COUNT(GDRAW_BLEND__count, 6)] = { + FALSE, + D3D1X_(BLEND_ONE), + D3D1X_(BLEND_ZERO), // GDRAW_BLEND_none + TRUE, + D3D1X_(BLEND_ONE), + D3D1X_(BLEND_INV_SRC_ALPHA), // GDRAW_BLEND_alpha + TRUE, + D3D1X_(BLEND_DEST_COLOR), + D3D1X_(BLEND_INV_SRC_ALPHA), // GDRAW_BLEND_multiply + TRUE, + D3D1X_(BLEND_ONE), + D3D1X_(BLEND_ONE), // GDRAW_BLEND_add - D3D1X_(BLEND_DESC) blend_desc; - memset(&blend_desc, 0, sizeof(blend_desc)); - hr = d3d->CreateBlendState(&blend_desc, &gdraw->blend_no_color_write); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateBlendState", ""); - return; - } + FALSE, + D3D1X_(BLEND_ONE), + D3D1X_(BLEND_ZERO), // GDRAW_BLEND_filter + FALSE, + D3D1X_(BLEND_ONE), + D3D1X_(BLEND_ZERO), // GDRAW_BLEND_special + }; - // create depth/stencil setups - for (i=0; i < 2; ++i) { - for (j=0; j < 2; ++j) { - D3D1X_(DEPTH_STENCIL_DESC) depth_desc; - memset(&depth_desc, 0, sizeof(depth_desc)); + for (i = 0; i < GDRAW_BLEND__count; ++i) { + gdraw->blend_state[i] = create_blend_state( + d3d, blends[i].blend, blends[i].src, blends[i].dst); + if (!gdraw->blend_state[i]) return; + } - depth_desc.DepthEnable = (i || j); - depth_desc.DepthWriteMask = i ? D3D1X_(DEPTH_WRITE_MASK_ALL) : D3D1X_(DEPTH_WRITE_MASK_ZERO); - depth_desc.DepthFunc = j ? D3D1X_(COMPARISON_LESS) : D3D1X_(COMPARISON_ALWAYS); - depth_desc.StencilEnable = FALSE; + D3D1X_(BLEND_DESC) blend_desc; + memset(&blend_desc, 0, sizeof(blend_desc)); + hr = d3d->CreateBlendState(&blend_desc, &gdraw->blend_no_color_write); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateBlendState", ""); + return; + } - hr = d3d->CreateDepthStencilState(&depth_desc, &gdraw->depth_state[i][j]); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateDepthStencilState", ""); - return; - } - } - } + // create depth/stencil setups + for (i = 0; i < 2; ++i) { + for (j = 0; j < 2; ++j) { + D3D1X_(DEPTH_STENCIL_DESC) depth_desc; + memset(&depth_desc, 0, sizeof(depth_desc)); - // constant buffers - gdraw->cb_vertex = create_dynamic_buffer(sizeof(VertexVars), D3D1X_(BIND_CONSTANT_BUFFER)); - gdraw->cb_ps_common = create_dynamic_buffer(sizeof(PixelCommonVars), D3D1X_(BIND_CONSTANT_BUFFER)); - gdraw->cb_filter = create_dynamic_buffer(sizeof(PixelParaFilter), D3D1X_(BIND_CONSTANT_BUFFER)); - gdraw->cb_colormatrix = create_dynamic_buffer(sizeof(PixelParaColorMatrix), D3D1X_(BIND_CONSTANT_BUFFER)); - gdraw->cb_blur = create_dynamic_buffer(sizeof(PixelParaBlur), D3D1X_(BIND_CONSTANT_BUFFER)); - - // quad index buffer - assert(QUAD_IB_COUNT * 4 < 65535); // can't use more; we have 16-bit index buffers and 0xffff = primitive cut index - U16 *inds = (U16 *) IggyGDrawMalloc(QUAD_IB_COUNT * 6 * sizeof(U16)); - if (inds) { - D3D1X_(BUFFER_DESC) bufdesc = { }; - D3D1X_(SUBRESOURCE_DATA) data = { inds, 0, 0 }; + depth_desc.DepthEnable = (i || j); + depth_desc.DepthWriteMask = i ? D3D1X_(DEPTH_WRITE_MASK_ALL) + : D3D1X_(DEPTH_WRITE_MASK_ZERO); + depth_desc.DepthFunc = + j ? D3D1X_(COMPARISON_LESS) : D3D1X_(COMPARISON_ALWAYS); + depth_desc.StencilEnable = FALSE; - bufdesc.ByteWidth = QUAD_IB_COUNT * 6 * sizeof(U16); - bufdesc.Usage = D3D1X_(USAGE_IMMUTABLE); - bufdesc.BindFlags = D3D1X_(BIND_INDEX_BUFFER); + hr = d3d->CreateDepthStencilState(&depth_desc, + &gdraw->depth_state[i][j]); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateDepthStencilState", ""); + return; + } + } + } - for (U16 i=0; i < QUAD_IB_COUNT; i++) { - inds[i*6 + 0] = i*4 + 0; - inds[i*6 + 1] = i*4 + 1; - inds[i*6 + 2] = i*4 + 2; - inds[i*6 + 3] = i*4 + 0; - inds[i*6 + 4] = i*4 + 2; - inds[i*6 + 5] = i*4 + 3; - } + // constant buffers + gdraw->cb_vertex = + create_dynamic_buffer(sizeof(VertexVars), D3D1X_(BIND_CONSTANT_BUFFER)); + gdraw->cb_ps_common = create_dynamic_buffer(sizeof(PixelCommonVars), + D3D1X_(BIND_CONSTANT_BUFFER)); + gdraw->cb_filter = create_dynamic_buffer(sizeof(PixelParaFilter), + D3D1X_(BIND_CONSTANT_BUFFER)); + gdraw->cb_colormatrix = create_dynamic_buffer(sizeof(PixelParaColorMatrix), + D3D1X_(BIND_CONSTANT_BUFFER)); + gdraw->cb_blur = create_dynamic_buffer(sizeof(PixelParaBlur), + D3D1X_(BIND_CONSTANT_BUFFER)); - hr = gdraw->d3d_device->CreateBuffer(&bufdesc, &data, &gdraw->quad_ib); - if (FAILED(hr)) { - report_d3d_error(hr, "CreateBuffer", " for constants"); - gdraw->quad_ib = NULL; - } - IggyGDrawFree(inds); - } else - gdraw->quad_ib = NULL; + // quad index buffer + assert(QUAD_IB_COUNT * 4 < + 65535); // can't use more; we have 16-bit index buffers and 0xffff = + // primitive cut index + U16* inds = (U16*)IggyGDrawMalloc(QUAD_IB_COUNT * 6 * sizeof(U16)); + if (inds) { + D3D1X_(BUFFER_DESC) bufdesc = {}; + D3D1X_(SUBRESOURCE_DATA) data = {inds, 0, 0}; + + bufdesc.ByteWidth = QUAD_IB_COUNT * 6 * sizeof(U16); + bufdesc.Usage = D3D1X_(USAGE_IMMUTABLE); + bufdesc.BindFlags = D3D1X_(BIND_INDEX_BUFFER); + + for (U16 i = 0; i < QUAD_IB_COUNT; i++) { + inds[i * 6 + 0] = i * 4 + 0; + inds[i * 6 + 1] = i * 4 + 1; + inds[i * 6 + 2] = i * 4 + 2; + inds[i * 6 + 3] = i * 4 + 0; + inds[i * 6 + 4] = i * 4 + 2; + inds[i * 6 + 5] = i * 4 + 3; + } + + hr = gdraw->d3d_device->CreateBuffer(&bufdesc, &data, &gdraw->quad_ib); + if (FAILED(hr)) { + report_d3d_error(hr, "CreateBuffer", " for constants"); + gdraw->quad_ib = NULL; + } + IggyGDrawFree(inds); + } else + gdraw->quad_ib = NULL; } -static void destroy_all_shaders_and_state() -{ - S32 i; +static void destroy_all_shaders_and_state() { + S32 i; - for (i=0; i < GDRAW_TEXTURE__count*3; ++i) destroy_shader(&gdraw->fprog[0][i]); - for (i=0; i < GDRAW_BLENDSPECIAL__count; ++i) destroy_shader(&gdraw->exceptional_blend[i]); - for (i=0; i < 32; ++i) destroy_shader(&gdraw->filter_prog[0][i]); - for (i=0; i < MAX_TAPS+1; ++i) destroy_shader(&gdraw->blur_prog[i]); - destroy_shader(&gdraw->colormatrix); - destroy_shader(&gdraw->clear_ps); + for (i = 0; i < GDRAW_TEXTURE__count * 3; ++i) + destroy_shader(&gdraw->fprog[0][i]); + for (i = 0; i < GDRAW_BLENDSPECIAL__count; ++i) + destroy_shader(&gdraw->exceptional_blend[i]); + for (i = 0; i < 32; ++i) destroy_shader(&gdraw->filter_prog[0][i]); + for (i = 0; i < MAX_TAPS + 1; ++i) destroy_shader(&gdraw->blur_prog[i]); + destroy_shader(&gdraw->colormatrix); + destroy_shader(&gdraw->clear_ps); - for (i=0; i < GDRAW_vformat__basic_count; i++) { - safe_release(gdraw->inlayout[i]); - destroy_shader(&gdraw->vert[i]); - } + for (i = 0; i < GDRAW_vformat__basic_count; i++) { + safe_release(gdraw->inlayout[i]); + destroy_shader(&gdraw->vert[i]); + } - for (i=0; i < 2; ++i) safe_release(gdraw->raster_state[i]); - for (i=0; i < GDRAW_WRAP__count*2; ++i) safe_release(gdraw->sampler_state[0][i]); - for (i=0; i < GDRAW_BLEND__count; ++i) safe_release(gdraw->blend_state[i]); - for (i=0; i < 2*2; ++i) safe_release(gdraw->depth_state[0][i]); + for (i = 0; i < 2; ++i) safe_release(gdraw->raster_state[i]); + for (i = 0; i < GDRAW_WRAP__count * 2; ++i) + safe_release(gdraw->sampler_state[0][i]); + for (i = 0; i < GDRAW_BLEND__count; ++i) + safe_release(gdraw->blend_state[i]); + for (i = 0; i < 2 * 2; ++i) safe_release(gdraw->depth_state[0][i]); - safe_release(gdraw->blend_no_color_write); + safe_release(gdraw->blend_no_color_write); - safe_release(gdraw->cb_vertex); - safe_release(gdraw->cb_ps_common); - safe_release(gdraw->cb_filter); - safe_release(gdraw->cb_colormatrix); - safe_release(gdraw->cb_blur); + safe_release(gdraw->cb_vertex); + safe_release(gdraw->cb_ps_common); + safe_release(gdraw->cb_filter); + safe_release(gdraw->cb_colormatrix); + safe_release(gdraw->cb_blur); - safe_release(gdraw->quad_ib); + safe_release(gdraw->quad_ib); } //////////////////////////////////////////////////////////////////////// @@ -2070,422 +2250,473 @@ static void destroy_all_shaders_and_state() // Create and tear-down the state // -typedef struct -{ - S32 num_handles; - S32 num_bytes; +typedef struct { + S32 num_handles; + S32 num_bytes; } GDrawResourceLimit; -// These are the defaults limits used by GDraw unless the user specifies something else. +// These are the defaults limits used by GDraw unless the user specifies +// something else. static GDrawResourceLimit gdraw_limits[GDRAW_D3D1X_(RESOURCE__count)] = { - MAX_RENDER_STACK_DEPTH + 1, 16*1024*1024, // RESOURCE_rendertarget - 500, 16*1024*1024, // RESOURCE_texture - 1000, 2*1024*1024, // RESOURCE_vertexbuffer - 0, 256*1024, // RESOURCE_dynbuffer + MAX_RENDER_STACK_DEPTH + 1, + 16 * 1024 * 1024, // RESOURCE_rendertarget + 500, + 16 * 1024 * 1024, // RESOURCE_texture + 1000, + 2 * 1024 * 1024, // RESOURCE_vertexbuffer + 0, + 256 * 1024, // RESOURCE_dynbuffer }; -static GDrawHandleCache *make_handle_cache(gdraw_resourcetype type) -{ - S32 num_handles = gdraw_limits[type].num_handles; - S32 num_bytes = gdraw_limits[type].num_bytes; - GDrawHandleCache *cache = (GDrawHandleCache *) IggyGDrawMalloc(sizeof(GDrawHandleCache) + (num_handles - 1) * sizeof(GDrawHandle)); - if (cache) { - gdraw_HandleCacheInit(cache, num_handles, num_bytes); - cache->is_vertex = (type == GDRAW_D3D1X_(RESOURCE_vertexbuffer)); - } +static GDrawHandleCache* make_handle_cache(gdraw_resourcetype type) { + S32 num_handles = gdraw_limits[type].num_handles; + S32 num_bytes = gdraw_limits[type].num_bytes; + GDrawHandleCache* cache = (GDrawHandleCache*)IggyGDrawMalloc( + sizeof(GDrawHandleCache) + (num_handles - 1) * sizeof(GDrawHandle)); + if (cache) { + gdraw_HandleCacheInit(cache, num_handles, num_bytes); + cache->is_vertex = (type == GDRAW_D3D1X_(RESOURCE_vertexbuffer)); + } - return cache; + return cache; } -static void free_gdraw() -{ - if (!gdraw) return; - if (gdraw->texturecache) IggyGDrawFree(gdraw->texturecache); - if (gdraw->vbufcache) IggyGDrawFree(gdraw->vbufcache); - IggyGDrawFree(gdraw); - gdraw = NULL; +static void free_gdraw() { + if (!gdraw) return; + if (gdraw->texturecache) IggyGDrawFree(gdraw->texturecache); + if (gdraw->vbufcache) IggyGDrawFree(gdraw->vbufcache); + IggyGDrawFree(gdraw); + gdraw = NULL; } -static bool alloc_dynbuffer(U32 size) -{ - // specified input size is vertex buffer size. determine sensible size for the - // corresponding index buffer. iggy always uses 16-bit indices and has three - // primary types of geometry it sends: - // - // 1. filled polygons. these are triangulated simple polygons and thus have - // roughly as many triangles as they have vertices. they use either 8- or - // 16-byte vertex formats; this makes a worst case of 6 bytes of indices - // for every 8 bytes of vertex data. - // 2. strokes and edge antialiasing. they use a 16-byte vertex format and - // worst-case write a "double quadstrip" which has 4 triangles for every - // 3 vertices, which means 24 bytes of index data for every 48 bytes - // of vertex data. - // 3. textured quads. they use a 16-byte vertex format, have exactly 2 - // triangles for every 4 vertices, and use either a static index buffer - // (quad_ib) or a single triangle strip, so for our purposes they need no - // space to store indices at all. - // - // 1) argues for allocating index buffers at 3/4 the size of the corresponding - // vertex buffer, while 2) and 3) need 1/2 the size of the vertex buffer or less. - // 2) and 3) are the most common types of vertex data, while 1) is used only for - // morphed shapes and in certain cases when the RESOURCE_vertexbuffer pool is full. - // we just play it safe anyway and make sure we size the IB large enough to cover - // the worst case for 1). this is conservative, but it probably doesn't matter much. - U32 ibsize = (size * 3) / 4; +static bool alloc_dynbuffer(U32 size) { + // specified input size is vertex buffer size. determine sensible size for + // the corresponding index buffer. iggy always uses 16-bit indices and has + // three primary types of geometry it sends: + // + // 1. filled polygons. these are triangulated simple polygons and thus have + // roughly as many triangles as they have vertices. they use either 8- or + // 16-byte vertex formats; this makes a worst case of 6 bytes of indices + // for every 8 bytes of vertex data. + // 2. strokes and edge antialiasing. they use a 16-byte vertex format and + // worst-case write a "double quadstrip" which has 4 triangles for every + // 3 vertices, which means 24 bytes of index data for every 48 bytes + // of vertex data. + // 3. textured quads. they use a 16-byte vertex format, have exactly 2 + // triangles for every 4 vertices, and use either a static index buffer + // (quad_ib) or a single triangle strip, so for our purposes they need no + // space to store indices at all. + // + // 1) argues for allocating index buffers at 3/4 the size of the + // corresponding vertex buffer, while 2) and 3) need 1/2 the size of the + // vertex buffer or less. 2) and 3) are the most common types of vertex + // data, while 1) is used only for morphed shapes and in certain cases when + // the RESOURCE_vertexbuffer pool is full. we just play it safe anyway and + // make sure we size the IB large enough to cover the worst case for 1). + // this is conservative, but it probably doesn't matter much. + U32 ibsize = (size * 3) / 4; - init_dyn_buffer(&gdraw->dyn_vb, size, D3D1X_(BIND_VERTEX_BUFFER)); - init_dyn_buffer(&gdraw->dyn_ib, ibsize, D3D1X_(BIND_INDEX_BUFFER)); + init_dyn_buffer(&gdraw->dyn_vb, size, D3D1X_(BIND_VERTEX_BUFFER)); + init_dyn_buffer(&gdraw->dyn_ib, ibsize, D3D1X_(BIND_INDEX_BUFFER)); - gdraw->max_quad_vert_count = RR_MIN(size / sizeof(gswf_vertex_xyst), QUAD_IB_COUNT * 4); - gdraw->max_quad_vert_count &= ~3; // must be multiple of four + gdraw->max_quad_vert_count = + RR_MIN(size / sizeof(gswf_vertex_xyst), QUAD_IB_COUNT * 4); + gdraw->max_quad_vert_count &= ~3; // must be multiple of four - return gdraw->dyn_vb.buffer != NULL && gdraw->dyn_ib.buffer != NULL; + return gdraw->dyn_vb.buffer != NULL && gdraw->dyn_ib.buffer != NULL; } -int gdraw_D3D1X_(SetResourceLimits)(gdraw_resourcetype type, S32 num_handles, S32 num_bytes) -{ - GDrawStats stats={0}; +int gdraw_D3D1X_(SetResourceLimits)(gdraw_resourcetype type, S32 num_handles, + S32 num_bytes) { + GDrawStats stats = {0}; - if (type == GDRAW_D3D1X_(RESOURCE_rendertarget)) // RT count is small and space is preallocated - num_handles = MAX_RENDER_STACK_DEPTH + 1; + if (type == GDRAW_D3D1X_(RESOURCE_rendertarget)) // RT count is small and + // space is preallocated + num_handles = MAX_RENDER_STACK_DEPTH + 1; - assert(type >= GDRAW_D3D1X_(RESOURCE_rendertarget) && type < GDRAW_D3D1X_(RESOURCE__count)); - assert(num_handles >= 0); - assert(num_bytes >= 0); + assert(type >= GDRAW_D3D1X_(RESOURCE_rendertarget) && + type < GDRAW_D3D1X_(RESOURCE__count)); + assert(num_handles >= 0); + assert(num_bytes >= 0); - // nothing to do if the values are unchanged - if (gdraw_limits[type].num_handles == num_handles && - gdraw_limits[type].num_bytes == num_bytes) - return 1; + // nothing to do if the values are unchanged + if (gdraw_limits[type].num_handles == num_handles && + gdraw_limits[type].num_bytes == num_bytes) + return 1; - gdraw_limits[type].num_handles = num_handles; - gdraw_limits[type].num_bytes = num_bytes; + gdraw_limits[type].num_handles = num_handles; + gdraw_limits[type].num_bytes = num_bytes; - // if no gdraw context created, there's nothing to worry about - if (!gdraw) - return 1; + // if no gdraw context created, there's nothing to worry about + if (!gdraw) return 1; - // resize the appropriate pool - switch (type) { - case GDRAW_D3D1X_(RESOURCE_rendertarget): - flush_rendertargets(&stats); - gdraw_HandleCacheInit(&gdraw->rendertargets, num_handles, num_bytes); - return 1; - - case GDRAW_D3D1X_(RESOURCE_texture): - if (gdraw->texturecache) { - gdraw_res_flush(gdraw->texturecache, &stats); - IggyGDrawFree(gdraw->texturecache); - } - gdraw->texturecache = make_handle_cache(GDRAW_D3D1X_(RESOURCE_texture)); - return gdraw->texturecache != NULL; + // resize the appropriate pool + switch (type) { + case GDRAW_D3D1X_(RESOURCE_rendertarget): + flush_rendertargets(&stats); + gdraw_HandleCacheInit(&gdraw->rendertargets, num_handles, + num_bytes); + return 1; - case GDRAW_D3D1X_(RESOURCE_vertexbuffer): - if (gdraw->vbufcache) { - gdraw_res_flush(gdraw->vbufcache, &stats); - IggyGDrawFree(gdraw->vbufcache); - } - gdraw->vbufcache = make_handle_cache(GDRAW_D3D1X_(RESOURCE_vertexbuffer)); - return gdraw->vbufcache != NULL; + case GDRAW_D3D1X_(RESOURCE_texture): + if (gdraw->texturecache) { + gdraw_res_flush(gdraw->texturecache, &stats); + IggyGDrawFree(gdraw->texturecache); + } + gdraw->texturecache = + make_handle_cache(GDRAW_D3D1X_(RESOURCE_texture)); + return gdraw->texturecache != NULL; - case GDRAW_D3D1X_(RESOURCE_dynbuffer): - unbind_resources(); - safe_release(gdraw->dyn_vb.buffer); - safe_release(gdraw->dyn_ib.buffer); - return alloc_dynbuffer(num_bytes); + case GDRAW_D3D1X_(RESOURCE_vertexbuffer): + if (gdraw->vbufcache) { + gdraw_res_flush(gdraw->vbufcache, &stats); + IggyGDrawFree(gdraw->vbufcache); + } + gdraw->vbufcache = + make_handle_cache(GDRAW_D3D1X_(RESOURCE_vertexbuffer)); + return gdraw->vbufcache != NULL; - default: - return 0; - } + case GDRAW_D3D1X_(RESOURCE_dynbuffer): + unbind_resources(); + safe_release(gdraw->dyn_vb.buffer); + safe_release(gdraw->dyn_ib.buffer); + return alloc_dynbuffer(num_bytes); + + default: + return 0; + } } -static GDrawFunctions *create_context(ID3D1XDevice *dev, ID3D1XContext *ctx, S32 w, S32 h) -{ - gdraw = (GDraw *) IggyGDrawMalloc(sizeof(*gdraw)); - if (!gdraw) return NULL; +static GDrawFunctions* create_context(ID3D1XDevice* dev, ID3D1XContext* ctx, + S32 w, S32 h) { + gdraw = (GDraw*)IggyGDrawMalloc(sizeof(*gdraw)); + if (!gdraw) return NULL; - memset(gdraw, 0, sizeof(*gdraw)); + memset(gdraw, 0, sizeof(*gdraw)); - gdraw->frametex_width = w; - gdraw->frametex_height = h; - gdraw->d3d_device = dev; - gdraw->d3d_context = ctx; + gdraw->frametex_width = w; + gdraw->frametex_height = h; + gdraw->d3d_device = dev; + gdraw->d3d_context = ctx; - gdraw->texturecache = make_handle_cache(GDRAW_D3D1X_(RESOURCE_texture)); - gdraw->vbufcache = make_handle_cache(GDRAW_D3D1X_(RESOURCE_vertexbuffer)); - gdraw_HandleCacheInit(&gdraw->rendertargets, gdraw_limits[GDRAW_D3D1X_(RESOURCE_rendertarget)].num_handles, gdraw_limits[GDRAW_D3D1X_(RESOURCE_rendertarget)].num_bytes); + gdraw->texturecache = make_handle_cache(GDRAW_D3D1X_(RESOURCE_texture)); + gdraw->vbufcache = make_handle_cache(GDRAW_D3D1X_(RESOURCE_vertexbuffer)); + gdraw_HandleCacheInit( + &gdraw->rendertargets, + gdraw_limits[GDRAW_D3D1X_(RESOURCE_rendertarget)].num_handles, + gdraw_limits[GDRAW_D3D1X_(RESOURCE_rendertarget)].num_bytes); - if (!gdraw->texturecache || !gdraw->vbufcache || !alloc_dynbuffer(gdraw_limits[GDRAW_D3D1X_(RESOURCE_dynbuffer)].num_bytes)) { - free_gdraw(); - return NULL; - } + if (!gdraw->texturecache || !gdraw->vbufcache || + !alloc_dynbuffer( + gdraw_limits[GDRAW_D3D1X_(RESOURCE_dynbuffer)].num_bytes)) { + free_gdraw(); + return NULL; + } - create_all_shaders_and_state(); + create_all_shaders_and_state(); - gdraw_funcs.SetViewSizeAndWorldScale = gdraw_SetViewSizeAndWorldScale; - gdraw_funcs.GetInfo = gdraw_GetInfo; + gdraw_funcs.SetViewSizeAndWorldScale = gdraw_SetViewSizeAndWorldScale; + gdraw_funcs.GetInfo = gdraw_GetInfo; - gdraw_funcs.DescribeTexture = gdraw_DescribeTexture; - gdraw_funcs.DescribeVertexBuffer = gdraw_DescribeVertexBuffer; + gdraw_funcs.DescribeTexture = gdraw_DescribeTexture; + gdraw_funcs.DescribeVertexBuffer = gdraw_DescribeVertexBuffer; - gdraw_funcs.RenderingBegin = gdraw_RenderingBegin; - gdraw_funcs.RenderingEnd = gdraw_RenderingEnd; - gdraw_funcs.RenderTileBegin = gdraw_RenderTileBegin; - gdraw_funcs.RenderTileEnd = gdraw_RenderTileEnd; + gdraw_funcs.RenderingBegin = gdraw_RenderingBegin; + gdraw_funcs.RenderingEnd = gdraw_RenderingEnd; + gdraw_funcs.RenderTileBegin = gdraw_RenderTileBegin; + gdraw_funcs.RenderTileEnd = gdraw_RenderTileEnd; - gdraw_funcs.TextureDrawBufferBegin = gdraw_TextureDrawBufferBegin; - gdraw_funcs.TextureDrawBufferEnd = gdraw_TextureDrawBufferEnd; + gdraw_funcs.TextureDrawBufferBegin = gdraw_TextureDrawBufferBegin; + gdraw_funcs.TextureDrawBufferEnd = gdraw_TextureDrawBufferEnd; - gdraw_funcs.DrawIndexedTriangles = gdraw_DrawIndexedTriangles; - gdraw_funcs.FilterQuad = gdraw_FilterQuad; + gdraw_funcs.DrawIndexedTriangles = gdraw_DrawIndexedTriangles; + gdraw_funcs.FilterQuad = gdraw_FilterQuad; - gdraw_funcs.SetAntialiasTexture = gdraw_SetAntialiasTexture; + gdraw_funcs.SetAntialiasTexture = gdraw_SetAntialiasTexture; - gdraw_funcs.ClearStencilBits = gdraw_ClearStencilBits; - gdraw_funcs.ClearID = gdraw_ClearID; + gdraw_funcs.ClearStencilBits = gdraw_ClearStencilBits; + gdraw_funcs.ClearID = gdraw_ClearID; - gdraw_funcs.MakeTextureBegin = gdraw_MakeTextureBegin; - gdraw_funcs.MakeTextureMore = gdraw_MakeTextureMore; - gdraw_funcs.MakeTextureEnd = gdraw_MakeTextureEnd; + gdraw_funcs.MakeTextureBegin = gdraw_MakeTextureBegin; + gdraw_funcs.MakeTextureMore = gdraw_MakeTextureMore; + gdraw_funcs.MakeTextureEnd = gdraw_MakeTextureEnd; - gdraw_funcs.UpdateTextureBegin = gdraw_UpdateTextureBegin; - gdraw_funcs.UpdateTextureRect = gdraw_UpdateTextureRect; - gdraw_funcs.UpdateTextureEnd = gdraw_UpdateTextureEnd; + gdraw_funcs.UpdateTextureBegin = gdraw_UpdateTextureBegin; + gdraw_funcs.UpdateTextureRect = gdraw_UpdateTextureRect; + gdraw_funcs.UpdateTextureEnd = gdraw_UpdateTextureEnd; - gdraw_funcs.FreeTexture = gdraw_FreeTexture; - gdraw_funcs.TryToLockTexture = gdraw_TryToLockTexture; + gdraw_funcs.FreeTexture = gdraw_FreeTexture; + gdraw_funcs.TryToLockTexture = gdraw_TryToLockTexture; - gdraw_funcs.MakeTextureFromResource = (gdraw_make_texture_from_resource *) gdraw_D3D1X_(MakeTextureFromResource); - gdraw_funcs.FreeTextureFromResource = gdraw_D3D1X_(DestroyTextureFromResource); + gdraw_funcs.MakeTextureFromResource = + (gdraw_make_texture_from_resource*)gdraw_D3D1X_( + MakeTextureFromResource); + gdraw_funcs.FreeTextureFromResource = + gdraw_D3D1X_(DestroyTextureFromResource); - gdraw_funcs.MakeVertexBufferBegin = gdraw_MakeVertexBufferBegin; - gdraw_funcs.MakeVertexBufferMore = gdraw_MakeVertexBufferMore; - gdraw_funcs.MakeVertexBufferEnd = gdraw_MakeVertexBufferEnd; - gdraw_funcs.TryToLockVertexBuffer = gdraw_TryLockVertexBuffer; - gdraw_funcs.FreeVertexBuffer = gdraw_FreeVertexBuffer; + gdraw_funcs.MakeVertexBufferBegin = gdraw_MakeVertexBufferBegin; + gdraw_funcs.MakeVertexBufferMore = gdraw_MakeVertexBufferMore; + gdraw_funcs.MakeVertexBufferEnd = gdraw_MakeVertexBufferEnd; + gdraw_funcs.TryToLockVertexBuffer = gdraw_TryLockVertexBuffer; + gdraw_funcs.FreeVertexBuffer = gdraw_FreeVertexBuffer; - gdraw_funcs.UnlockHandles = gdraw_UnlockHandles; - gdraw_funcs.SetTextureUniqueID = gdraw_SetTextureUniqueID; + gdraw_funcs.UnlockHandles = gdraw_UnlockHandles; + gdraw_funcs.SetTextureUniqueID = gdraw_SetTextureUniqueID; - gdraw_funcs.Set3DTransform = gdraw_Set3DTransform; + gdraw_funcs.Set3DTransform = gdraw_Set3DTransform; - return &gdraw_funcs; + return &gdraw_funcs; } -void gdraw_D3D1X_(DestroyContext)(void) -{ - if (gdraw && gdraw->d3d_device) { - GDrawStats stats={0}; - clear_renderstate(); - stencil_state_cache_clear(); - destroy_all_shaders_and_state(); - safe_release(gdraw->aa_tex); - safe_release(gdraw->aa_tex_view); - safe_release(gdraw->dyn_vb.buffer); - safe_release(gdraw->dyn_ib.buffer); +void gdraw_D3D1X_(DestroyContext)(void) { + if (gdraw && gdraw->d3d_device) { + GDrawStats stats = {0}; + clear_renderstate(); + stencil_state_cache_clear(); + destroy_all_shaders_and_state(); + safe_release(gdraw->aa_tex); + safe_release(gdraw->aa_tex_view); + safe_release(gdraw->dyn_vb.buffer); + safe_release(gdraw->dyn_ib.buffer); - flush_rendertargets(&stats); - if (gdraw->texturecache) gdraw_res_flush(gdraw->texturecache, &stats); - if (gdraw->vbufcache) gdraw_res_flush(gdraw->vbufcache, &stats); + flush_rendertargets(&stats); + if (gdraw->texturecache) gdraw_res_flush(gdraw->texturecache, &stats); + if (gdraw->vbufcache) gdraw_res_flush(gdraw->vbufcache, &stats); - gdraw->d3d_device = NULL; - } + gdraw->d3d_device = NULL; + } - free_gdraw(); + free_gdraw(); } -void gdraw_D3D1X_(SetErrorHandler)(void (__cdecl *error_handler)(HRESULT hr)) -{ - if (gdraw) - gdraw->error_handler = error_handler; +void gdraw_D3D1X_(SetErrorHandler)(void(__cdecl* error_handler)(HRESULT hr)) { + if (gdraw) gdraw->error_handler = error_handler; } -void gdraw_D3D1X_(PreReset)(void) -{ - if (!gdraw) return; +void gdraw_D3D1X_(PreReset)(void) { + if (!gdraw) return; - GDrawStats stats={0}; - flush_rendertargets(&stats); + GDrawStats stats = {0}; + flush_rendertargets(&stats); - // we may end up resizing the frame buffer - gdraw->frametex_width = 0; - gdraw->frametex_height = 0; + // we may end up resizing the frame buffer + gdraw->frametex_width = 0; + gdraw->frametex_height = 0; } -void gdraw_D3D1X_(PostReset)(void) -{ - // maybe re-create rendertargets right now? +void gdraw_D3D1X_(PostReset)(void) { + // maybe re-create rendertargets right now? } -void RADLINK gdraw_D3D1X_(BeginCustomDraw)(IggyCustomDrawCallbackRegion * region, F32 mat[4][4]) -{ - clear_renderstate(); - gdraw_GetObjectSpaceMatrix(mat[0], region->o2w, gdraw->projection, 0, 0); +void RADLINK gdraw_D3D1X_(BeginCustomDraw)(IggyCustomDrawCallbackRegion* region, + F32 mat[4][4]) { + clear_renderstate(); + gdraw_GetObjectSpaceMatrix(mat[0], region->o2w, gdraw->projection, 0, 0); } -void RADLINK gdraw_D3D1X_(BeginCustomDraw_4J)(IggyCustomDrawCallbackRegion * region, F32 mat[16]) -{ - clear_renderstate(); - gdraw_GetObjectSpaceMatrix(mat, region->o2w, gdraw->projection, 0, 0); +void RADLINK gdraw_D3D1X_(BeginCustomDraw_4J)( + IggyCustomDrawCallbackRegion* region, F32 mat[16]) { + clear_renderstate(); + gdraw_GetObjectSpaceMatrix(mat, region->o2w, gdraw->projection, 0, 0); } -void RADLINK gdraw_D3D1X_(CalculateCustomDraw_4J)(IggyCustomDrawCallbackRegion * region, F32 mat[16]) -{ - gdraw_GetObjectSpaceMatrix(mat, region->o2w, gdraw->projection, 0, 0); +void RADLINK gdraw_D3D1X_(CalculateCustomDraw_4J)( + IggyCustomDrawCallbackRegion* region, F32 mat[16]) { + gdraw_GetObjectSpaceMatrix(mat, region->o2w, gdraw->projection, 0, 0); } -void RADLINK gdraw_D3D1X_(EndCustomDraw)(IggyCustomDrawCallbackRegion * /*region*/) -{ - GDrawStats stats={}; - set_common_renderstate(); - set_viewport(); - set_render_target(&stats); +void RADLINK +gdraw_D3D1X_(EndCustomDraw)(IggyCustomDrawCallbackRegion* /*region*/) { + GDrawStats stats = {}; + set_common_renderstate(); + set_viewport(); + set_render_target(&stats); } -void RADLINK gdraw_D3D1X_(GetResourceUsageStats)(gdraw_resourcetype type, S32 *handles_used, S32 *bytes_used) -{ - GDrawHandleCache *cache; +void RADLINK gdraw_D3D1X_(GetResourceUsageStats)(gdraw_resourcetype type, + S32* handles_used, + S32* bytes_used) { + GDrawHandleCache* cache; - switch (type) { - case GDRAW_D3D1X_(RESOURCE_rendertarget): cache = &gdraw->rendertargets; break; - case GDRAW_D3D1X_(RESOURCE_texture): cache = gdraw->texturecache; break; - case GDRAW_D3D1X_(RESOURCE_vertexbuffer): cache = gdraw->vbufcache; break; - case GDRAW_D3D1X_(RESOURCE_dynbuffer): *handles_used = 0; *bytes_used = gdraw->last_dyn_maxalloc; return; - default: cache = NULL; break; - } + switch (type) { + case GDRAW_D3D1X_(RESOURCE_rendertarget): + cache = &gdraw->rendertargets; + break; + case GDRAW_D3D1X_(RESOURCE_texture): + cache = gdraw->texturecache; + break; + case GDRAW_D3D1X_(RESOURCE_vertexbuffer): + cache = gdraw->vbufcache; + break; + case GDRAW_D3D1X_(RESOURCE_dynbuffer): + *handles_used = 0; + *bytes_used = gdraw->last_dyn_maxalloc; + return; + default: + cache = NULL; + break; + } - *handles_used = *bytes_used = 0; + *handles_used = *bytes_used = 0; - if (cache) { - S32 i; - U64 frame = gdraw->frame_counter; + if (cache) { + S32 i; + U64 frame = gdraw->frame_counter; - for (i=0; i < cache->max_handles; ++i) - if (cache->handle[i].bytes && cache->handle[i].owner && cache->handle[i].fence.value == frame) { - *handles_used += 1; - *bytes_used += cache->handle[i].bytes; - } - } + for (i = 0; i < cache->max_handles; ++i) + if (cache->handle[i].bytes && cache->handle[i].owner && + cache->handle[i].fence.value == frame) { + *handles_used += 1; + *bytes_used += cache->handle[i].bytes; + } + } } -static S32 num_pixels(S32 w, S32 h, S32 mipmaps) -{ - S32 k, pixels=0; - for (k=0; k < mipmaps; ++k) { - pixels += w*h*2; - w = (w>>1); w += !w; - h = (h>>1); h += !h; - } - return pixels; +static S32 num_pixels(S32 w, S32 h, S32 mipmaps) { + S32 k, pixels = 0; + for (k = 0; k < mipmaps; ++k) { + pixels += w * h * 2; + w = (w >> 1); + w += !w; + h = (h >> 1); + h += !h; + } + return pixels; } -GDrawTexture * RADLINK gdraw_D3D1X_(MakeTextureFromResource)(U8 *resource_file, S32 /*len*/, IggyFileTextureRaw *texture) -{ - char *failed_call=""; - U8 *free_data = 0; - GDrawTexture *t=0; - S32 width, height, mipmaps, size, blk; - ID3D1X(Texture2D) *tex=0; - ID3D1X(ShaderResourceView) *view=0; +GDrawTexture* RADLINK gdraw_D3D1X_(MakeTextureFromResource)( + U8* resource_file, S32 /*len*/, IggyFileTextureRaw* texture) { + char* failed_call = ""; + U8* free_data = 0; + GDrawTexture* t = 0; + S32 width, height, mipmaps, size, blk; + ID3D1X(Texture2D)* tex = 0; + ID3D1X(ShaderResourceView)* view = 0; - DXGI_FORMAT d3dfmt; - D3D1X_(SUBRESOURCE_DATA) mipdata[24] = { 0 }; - S32 k; + DXGI_FORMAT d3dfmt; + D3D1X_(SUBRESOURCE_DATA) mipdata[24] = {0}; + S32 k; - HRESULT hr = 0; + HRESULT hr = 0; - width = texture->w; - height = texture->h; - mipmaps = texture->mipmaps; - blk = 1; + width = texture->w; + height = texture->h; + mipmaps = texture->mipmaps; + blk = 1; - D3D1X_(TEXTURE2D_DESC) desc = { width, height, mipmaps, 1, DXGI_FORMAT_UNKNOWN, { 1, 0 }, - D3D1X_(USAGE_IMMUTABLE), D3D1X_(BIND_SHADER_RESOURCE), 0, 0 }; + D3D1X_(TEXTURE2D_DESC) + desc = {width, + height, + mipmaps, + 1, + DXGI_FORMAT_UNKNOWN, + {1, 0}, + D3D1X_(USAGE_IMMUTABLE), + D3D1X_(BIND_SHADER_RESOURCE), + 0, + 0}; - switch (texture->format) { - case IFT_FORMAT_rgba_8888 : size= 4; d3dfmt = DXGI_FORMAT_R8G8B8A8_UNORM; break; - case IFT_FORMAT_DXT1 : size= 8; d3dfmt = DXGI_FORMAT_BC1_UNORM; blk = 4; break; - case IFT_FORMAT_DXT3 : size=16; d3dfmt = DXGI_FORMAT_BC2_UNORM; blk = 4; break; - case IFT_FORMAT_DXT5 : size=16; d3dfmt = DXGI_FORMAT_BC3_UNORM; blk = 4; break; - default: { - IggyGDrawSendWarning(NULL, "GDraw .iggytex raw texture format %d not supported by hardware", texture->format); - goto done; - } - } + switch (texture->format) { + case IFT_FORMAT_rgba_8888: + size = 4; + d3dfmt = DXGI_FORMAT_R8G8B8A8_UNORM; + break; + case IFT_FORMAT_DXT1: + size = 8; + d3dfmt = DXGI_FORMAT_BC1_UNORM; + blk = 4; + break; + case IFT_FORMAT_DXT3: + size = 16; + d3dfmt = DXGI_FORMAT_BC2_UNORM; + blk = 4; + break; + case IFT_FORMAT_DXT5: + size = 16; + d3dfmt = DXGI_FORMAT_BC3_UNORM; + blk = 4; + break; + default: { + IggyGDrawSendWarning(NULL, + "GDraw .iggytex raw texture format %d not " + "supported by hardware", + texture->format); + goto done; + } + } - desc.Format = d3dfmt; + desc.Format = d3dfmt; - U8 *data = resource_file + texture->file_offset; + U8* data = resource_file + texture->file_offset; - if (texture->format == IFT_FORMAT_i_8 || texture->format == IFT_FORMAT_i_4) { - // convert from intensity to luma+alpha - S32 i; - S32 total_size = 2 * num_pixels(width,height,mipmaps); + if (texture->format == IFT_FORMAT_i_8 || + texture->format == IFT_FORMAT_i_4) { + // convert from intensity to luma+alpha + S32 i; + S32 total_size = 2 * num_pixels(width, height, mipmaps); - free_data = (U8 *) IggyGDrawMalloc(total_size); - if (!free_data) { - IggyGDrawSendWarning(NULL, "GDraw out of memory to store texture data to pass to D3D for %d x %d texture", width, height); - goto done; - } + free_data = (U8*)IggyGDrawMalloc(total_size); + if (!free_data) { + IggyGDrawSendWarning(NULL, + "GDraw out of memory to store texture data to " + "pass to D3D for %d x %d texture", + width, height); + goto done; + } - U8 *cur = free_data; + U8* cur = free_data; - for (k=0; k < mipmaps; ++k) { - S32 w = RR_MAX(width >> k, 1); - S32 h = RR_MAX(height >> k, 1); - for (i=0; i < w*h; ++i) { - cur[0] = cur[1] = *data++; - cur += 2; - } - } - data = free_data; - } + for (k = 0; k < mipmaps; ++k) { + S32 w = RR_MAX(width >> k, 1); + S32 h = RR_MAX(height >> k, 1); + for (i = 0; i < w * h; ++i) { + cur[0] = cur[1] = *data++; + cur += 2; + } + } + data = free_data; + } - for (k=0; k < mipmaps; ++k) { - S32 w = RR_MAX(width >> k, 1); - S32 h = RR_MAX(height >> k, 1); - S32 blkw = (w + blk-1) / blk; - S32 blkh = (h + blk-1) / blk; + for (k = 0; k < mipmaps; ++k) { + S32 w = RR_MAX(width >> k, 1); + S32 h = RR_MAX(height >> k, 1); + S32 blkw = (w + blk - 1) / blk; + S32 blkh = (h + blk - 1) / blk; - mipdata[k].pSysMem = data; - mipdata[k].SysMemPitch = blkw * size; - data += blkw * blkh * size; - } + mipdata[k].pSysMem = data; + mipdata[k].SysMemPitch = blkw * size; + data += blkw * blkh * size; + } - failed_call = "CreateTexture2D"; - hr = gdraw->d3d_device->CreateTexture2D(&desc, mipdata, &tex); - if (FAILED(hr)) goto done; + failed_call = "CreateTexture2D"; + hr = gdraw->d3d_device->CreateTexture2D(&desc, mipdata, &tex); + if (FAILED(hr)) goto done; - failed_call = "CreateShaderResourceView for texture creation"; - hr = gdraw->d3d_device->CreateShaderResourceView(tex, NULL, &view); - if (FAILED(hr)) goto done; + failed_call = "CreateShaderResourceView for texture creation"; + hr = gdraw->d3d_device->CreateShaderResourceView(tex, NULL, &view); + if (FAILED(hr)) goto done; - t = gdraw_D3D1X_(WrappedTextureCreate)(view); + t = gdraw_D3D1X_(WrappedTextureCreate)(view); done: - if (FAILED(hr)) { - report_d3d_error(hr, failed_call, ""); - } + if (FAILED(hr)) { + report_d3d_error(hr, failed_call, ""); + } - if (free_data) - IggyGDrawFree(free_data); + if (free_data) IggyGDrawFree(free_data); - if (!t) { - if (view) - view->Release(); - if (tex) - tex->Release(); - } else { - ((GDrawHandle *) t)->handle.tex.d3d = tex; - } - return t; + if (!t) { + if (view) view->Release(); + if (tex) tex->Release(); + } else { + ((GDrawHandle*)t)->handle.tex.d3d = tex; + } + return t; } -void RADLINK gdraw_D3D1X_(DestroyTextureFromResource)(GDrawTexture *tex) -{ - GDrawHandle *h = (GDrawHandle *) tex; - safe_release(h->handle.tex.d3d_view); - safe_release(h->handle.tex.d3d); - gdraw_D3D1X_(WrappedTextureDestroy)(tex); +void RADLINK gdraw_D3D1X_(DestroyTextureFromResource)(GDrawTexture* tex) { + GDrawHandle* h = (GDrawHandle*)tex; + safe_release(h->handle.tex.d3d_view); + safe_release(h->handle.tex.d3d); + gdraw_D3D1X_(WrappedTextureDestroy)(tex); } - diff --git a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shaders.inl b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shaders.inl index dc8a0484d..e252efbb3 100644 --- a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shaders.inl +++ b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shaders.inl @@ -1,1084 +1,1536 @@ // This file was automatically generated by shadergen. Do not edit by hand! static char pshader_basic_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; static char pshader_basic_frag1[] = ""; static char pshader_basic_frag2[] = - "COMMON_PSCONSTANTS;\n" - "\n" - "#ifdef TEX0\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" - "#endif\n" - "\n" - "#ifndef READ_ALPHA_TEX\n" - "#define READ_ALPHA_TEX(x) ((x).a)\n" - "#endif\n" - "\n" - "#ifndef AATEX_USE_SAMPLER1\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 7);\n" - "#else\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 1);\n" - "#endif\n" - "\n" - "MAIN((ARGS))\n" - "{\n" - " LOWP VEC4 z;\n" - " MEDIUMP VEC4 t;\n" - " \n" - " z = color_mul;\n" - " \n" - " #ifndef ADDITIVE_ALPHA\n" - " z.rgb *= z.a; // premultiply; could do outside\n" - " #endif\n" - " \n" - " #ifdef TEX0\n" - " MEDIUMP VEC2 c,tc0;\n" - " tc0 = TC0;\n" - "\n" - " #ifdef EXPLICIT_PROJECTION\n" - " float one_over_w = 1.0 / TC1.y;\n" - " tc0.x *= one_over_w;\n" - " tc0.y *= one_over_w;\n" - " #endif\n" - " \n" - " #ifdef TEX0_RADIAL\n" - " tc0.x = sqrt(dot(tc0.xy,tc0.xy));\n" - " tc0.y = tc0.x; // necessary on some OpenGL devices\n" - " #else\n" - " #ifdef TEX0_FOCAL\n" - " c.x = tc0.x + focal.x;\n" - " c.y = tc0.y;\n" - " t.x = c.x * focal.y;\n" - " t.y = (c.x*c.x + c.y*c.y) * focal.z;\n" - " tc0.x = sqrt(t.y + t.x*t.x) - t.x;\n" - " tc0.y = tc0.x;\n" - " #endif\n" - " #endif\n" - "\n" - " #ifdef TEX0_ALPHA\n" - " t.a = READ_ALPHA_TEX(TEX2D(tex0, tc0));\n" - " #ifdef ADDITIVE_ALPHA\n" - " z.a *= t.a;\n" - " #else\n" - " z *= t.a;\n" - " #endif\n" - " #else\n" - " t = TEX2D(tex0, tc0);\n" - " #ifdef ADDITIVE_ALPHA\n" - " if (t.a != 0.0) t.rgb = t.rgb * (1.0/t.a); // unpremultiply\n" - " #endif\n" - " z *= t;\n" - " #endif\n" - " #endif\n" - "\n" - " MEDIUMP VEC2 tc1;\n" - " tc1.xy = TC1.xy;\n" - "\n" - " #ifdef EXPLICIT_PROJECTION\n" - " tc1.x /= TC1.y;\n" - " #endif\n" - "\n" - " // antialiasing blend curve\n" - " t = TEX2D(tex1, tc1.xy);\n" - " #ifdef ADDITIVE_ALPHA\n" - " z.a *= t.a;\n" - " #else\n" - " z *= t;\n" - " #endif\n" - "\n" - " #ifdef ADDITIVE_ALPHA\n" - " z += color_add;\n" - " z.rgb *= z.a; // premultiply\n" - " #else\n" - " #ifdef ADDITIVE\n" - " z.rgb += color_add.rgb * z.a; // scale addend to match premultiply\n" - " z.rgb = min(z.rgb, z.a);\n" - " #endif\n" - " #endif\n" - " \n" - " #ifdef TEX0_ALPHA_TEST\n" - " SHADER_ALPHATEST(z.a);\n" - " #endif\n" - "\n" - " OUTPUT(z);\n" - "}\n"; -static char pshader_basic_frag3[] = - "#define ADDITIVE\n"; -static char pshader_basic_frag4[] = - "#define ADDITIVE_ALPHA\n"; -static char pshader_basic_frag5[] = - "#define TEX0\n"; + "COMMON_PSCONSTANTS;\n" + "\n" + "#ifdef TEX0\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" + "#endif\n" + "\n" + "#ifndef READ_ALPHA_TEX\n" + "#define READ_ALPHA_TEX(x) ((x).a)\n" + "#endif\n" + "\n" + "#ifndef AATEX_USE_SAMPLER1\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 7);\n" + "#else\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 1);\n" + "#endif\n" + "\n" + "MAIN((ARGS))\n" + "{\n" + " LOWP VEC4 z;\n" + " MEDIUMP VEC4 t;\n" + " \n" + " z = color_mul;\n" + " \n" + " #ifndef ADDITIVE_ALPHA\n" + " z.rgb *= z.a; // premultiply; could do outside\n" + " #endif\n" + " \n" + " #ifdef TEX0\n" + " MEDIUMP VEC2 c,tc0;\n" + " tc0 = TC0;\n" + "\n" + " #ifdef EXPLICIT_PROJECTION\n" + " float one_over_w = 1.0 / TC1.y;\n" + " tc0.x *= one_over_w;\n" + " tc0.y *= one_over_w;\n" + " #endif\n" + " \n" + " #ifdef TEX0_RADIAL\n" + " tc0.x = sqrt(dot(tc0.xy,tc0.xy));\n" + " tc0.y = tc0.x; // necessary on some OpenGL devices\n" + " #else\n" + " #ifdef TEX0_FOCAL\n" + " c.x = tc0.x + focal.x;\n" + " c.y = tc0.y;\n" + " t.x = c.x * focal.y;\n" + " t.y = (c.x*c.x + c.y*c.y) * focal.z;\n" + " tc0.x = sqrt(t.y + t.x*t.x) - t.x;\n" + " tc0.y = tc0.x;\n" + " #endif\n" + " #endif\n" + "\n" + " #ifdef TEX0_ALPHA\n" + " t.a = READ_ALPHA_TEX(TEX2D(tex0, tc0));\n" + " #ifdef ADDITIVE_ALPHA\n" + " z.a *= t.a;\n" + " #else\n" + " z *= t.a;\n" + " #endif\n" + " #else\n" + " t = TEX2D(tex0, tc0);\n" + " #ifdef ADDITIVE_ALPHA\n" + " if (t.a != 0.0) t.rgb = t.rgb * (1.0/t.a); // unpremultiply\n" + " #endif\n" + " z *= t;\n" + " #endif\n" + " #endif\n" + "\n" + " MEDIUMP VEC2 tc1;\n" + " tc1.xy = TC1.xy;\n" + "\n" + " #ifdef EXPLICIT_PROJECTION\n" + " tc1.x /= TC1.y;\n" + " #endif\n" + "\n" + " // antialiasing blend curve\n" + " t = TEX2D(tex1, tc1.xy);\n" + " #ifdef ADDITIVE_ALPHA\n" + " z.a *= t.a;\n" + " #else\n" + " z *= t;\n" + " #endif\n" + "\n" + " #ifdef ADDITIVE_ALPHA\n" + " z += color_add;\n" + " z.rgb *= z.a; // premultiply\n" + " #else\n" + " #ifdef ADDITIVE\n" + " z.rgb += color_add.rgb * z.a; // scale addend to match premultiply\n" + " z.rgb = min(z.rgb, z.a);\n" + " #endif\n" + " #endif\n" + " \n" + " #ifdef TEX0_ALPHA_TEST\n" + " SHADER_ALPHATEST(z.a);\n" + " #endif\n" + "\n" + " OUTPUT(z);\n" + "}\n"; +static char pshader_basic_frag3[] = "#define ADDITIVE\n"; +static char pshader_basic_frag4[] = "#define ADDITIVE_ALPHA\n"; +static char pshader_basic_frag5[] = "#define TEX0\n"; static char pshader_basic_frag6[] = - "#define TEX0\n" - "#define TEX0_ALPHA\n"; + "#define TEX0\n" + "#define TEX0_ALPHA\n"; static char pshader_basic_frag7[] = - "#define TEX0\n" - "#define TEX0_RADIAL\n"; + "#define TEX0\n" + "#define TEX0_RADIAL\n"; static char pshader_basic_frag8[] = - "#define TEX0\n" - "#define TEX0_FOCAL\n"; + "#define TEX0\n" + "#define TEX0_FOCAL\n"; static char pshader_basic_frag9[] = - "#define TEX0\n" - "#define TEX0_ALPHA\n" - "#define TEX0_ALPHA_TEST\n"; + "#define TEX0\n" + "#define TEX0_ALPHA\n" + "#define TEX0_ALPHA_TEST\n"; #define NUMFRAGMENTS_pshader_basic 4 -static char *pshader_basic_arr[18][NUMFRAGMENTS_pshader_basic] = { - { pshader_basic_frag0, pshader_basic_frag1, pshader_basic_frag1, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag1, pshader_basic_frag3, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag1, pshader_basic_frag4, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag5, pshader_basic_frag1, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag5, pshader_basic_frag3, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag5, pshader_basic_frag4, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag6, pshader_basic_frag1, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag6, pshader_basic_frag3, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag6, pshader_basic_frag4, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag7, pshader_basic_frag1, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag7, pshader_basic_frag3, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag7, pshader_basic_frag4, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag8, pshader_basic_frag1, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag8, pshader_basic_frag3, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag8, pshader_basic_frag4, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag9, pshader_basic_frag1, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag9, pshader_basic_frag3, pshader_basic_frag2, }, - { pshader_basic_frag0, pshader_basic_frag9, pshader_basic_frag4, pshader_basic_frag2, }, +static char* pshader_basic_arr[18][NUMFRAGMENTS_pshader_basic] = { + { + pshader_basic_frag0, + pshader_basic_frag1, + pshader_basic_frag1, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag1, + pshader_basic_frag3, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag1, + pshader_basic_frag4, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag5, + pshader_basic_frag1, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag5, + pshader_basic_frag3, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag5, + pshader_basic_frag4, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag6, + pshader_basic_frag1, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag6, + pshader_basic_frag3, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag6, + pshader_basic_frag4, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag7, + pshader_basic_frag1, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag7, + pshader_basic_frag3, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag7, + pshader_basic_frag4, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag8, + pshader_basic_frag1, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag8, + pshader_basic_frag3, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag8, + pshader_basic_frag4, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag9, + pshader_basic_frag1, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag9, + pshader_basic_frag3, + pshader_basic_frag2, + }, + { + pshader_basic_frag0, + pshader_basic_frag9, + pshader_basic_frag4, + pshader_basic_frag2, + }, }; -static char **pshader_basic(int tex0, int additive) -{ - return pshader_basic_arr[0 + tex0*3 + additive*1]; +static char** pshader_basic(int tex0, int additive) { + return pshader_basic_arr[0 + tex0 * 3 + additive * 1]; } -static char *pshader_basic_vars[] = { - "tex0", - "tex1", - "color_mul", - "color_add", - "focal", - NULL -}; +static char* pshader_basic_vars[] = {"tex0", "tex1", "color_mul", + "color_add", "focal", NULL}; static char pshader_general2_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; static char pshader_general2_frag1[] = - "COMMON_PCONSTANTS2\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" - "MAIN((ARGS2))\n" - "{\n" - " // get t, the basic texture color\n" - "\n" - " LOWP VEC4 t;\n" - " \n" - " t = TEX2D(tex0, tex_coord.xy);\n" - "\n" - " // now color-transform t\n" - " //\n" - " // to determine optimal format for vertex shader to output the color, let's\n" - " // start by doing the math assuming the texture is premultiplied, but not\n" - " // the color transform:\n" - " //\n" - " // out.r = (tex.r * color_mul.r * color_mul.a) + (color_add.r * tex.a * color_mul.a)\n" - " // out.a = tex.a * color_mul.a * color_add.a // color_add.a is blend mode emulation\n" - " //\n" - " // now, we can see in the above we can premultiply both mul and add by color_mul.a\n" - " //\n" - " // out.r = (tex.r * color_mulp.r) + (color_addp.r * tex.a)\n" - " // out.a = tex.a * color_mulp.a // can premultiply color_add.a here as well\n" - "\n" - " \n" - " LOWP VEC4 c;\n" - " c.rgb = t.rgb * color_mul.rgb + t.a * color_add.rgb;\n" - " c.a = t.a * color_mul.a;\n" - "\n" - " // apply clip rect\n" - " //\n" - " // naive math, using panel-space coordinates\n" - " //\n" - " // panel_offset = abs(pos-center) - half_width\n" - " //\n" - " // Above function is negative where not clipped, positive\n" - " // where clipped. Now, we want to capture a one-pixel boundary,\n" - " // so we need to go to pixel coordinates:\n" - " //\n" - " // panel_offset *= pixels_per_panel_unit;\n" - " // // note this doesn't account for non-uniform scale of panel\n" - " //\n" - " // And now, with an offset in pixels, we want to compute an AA mask:\n" - " //\n" - " // saturate(1-panel_offset)\n" - " //\n" - " // Note that we can just multiply pixels_per_panel_unit into\n" - " // each of the terms in panel offset, and we're left with:\n" - " //\n" - " // saturate(1 - (abs() - k))\n" - " //\n" - " // which becomes:\n" - " //\n" - " // saturate(k+1 - abs())\n" - " //\n" - " // and the +1 is folded into k.\n" - "\n" - " LOWP VEC2 cliprect_alpha = saturate(clip_rect.zw - abs(tex_coord.zw - clip_rect.xy));\n" - "\n" - " float edge_alpha = cliprect_alpha.x * cliprect_alpha.y;\n" - " // could be min, but multiply represents coverage better in theory; @TODO check visually\n" - "\n" - " // multiply it into c's alpha, but c's already premultiplied so multiply it all\n" - " c *= edge_alpha;\n" - "\n" - " OUTPUT(c);\n" - "}\n"; + "COMMON_PCONSTANTS2\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" + "MAIN((ARGS2))\n" + "{\n" + " // get t, the basic texture color\n" + "\n" + " LOWP VEC4 t;\n" + " \n" + " t = TEX2D(tex0, tex_coord.xy);\n" + "\n" + " // now color-transform t\n" + " //\n" + " // to determine optimal format for vertex shader to output the color, " + "let's\n" + " // start by doing the math assuming the texture is premultiplied, but " + "not\n" + " // the color transform:\n" + " //\n" + " // out.r = (tex.r * color_mul.r * color_mul.a) + (color_add.r * " + "tex.a * color_mul.a)\n" + " // out.a = tex.a * color_mul.a * color_add.a // color_add.a is " + "blend mode emulation\n" + " //\n" + " // now, we can see in the above we can premultiply both mul and add by " + "color_mul.a\n" + " //\n" + " // out.r = (tex.r * color_mulp.r) + (color_addp.r * tex.a)\n" + " // out.a = tex.a * color_mulp.a // can premultiply color_add.a " + "here as well\n" + "\n" + " \n" + " LOWP VEC4 c;\n" + " c.rgb = t.rgb * color_mul.rgb + t.a * color_add.rgb;\n" + " c.a = t.a * color_mul.a;\n" + "\n" + " // apply clip rect\n" + " //\n" + " // naive math, using panel-space coordinates\n" + " //\n" + " // panel_offset = abs(pos-center) - half_width\n" + " //\n" + " // Above function is negative where not clipped, positive\n" + " // where clipped. Now, we want to capture a one-pixel boundary,\n" + " // so we need to go to pixel coordinates:\n" + " //\n" + " // panel_offset *= pixels_per_panel_unit;\n" + " // // note this doesn't account for non-uniform scale of panel\n" + " //\n" + " // And now, with an offset in pixels, we want to compute an AA " + "mask:\n" + " //\n" + " // saturate(1-panel_offset)\n" + " //\n" + " // Note that we can just multiply pixels_per_panel_unit into\n" + " // each of the terms in panel offset, and we're left with:\n" + " //\n" + " // saturate(1 - (abs() - k))\n" + " //\n" + " // which becomes:\n" + " //\n" + " // saturate(k+1 - abs())\n" + " //\n" + " // and the +1 is folded into k.\n" + "\n" + " LOWP VEC2 cliprect_alpha = saturate(clip_rect.zw - abs(tex_coord.zw - " + "clip_rect.xy));\n" + "\n" + " float edge_alpha = cliprect_alpha.x * cliprect_alpha.y;\n" + " // could be min, but multiply represents coverage better in theory; " + "@TODO check visually\n" + "\n" + " // multiply it into c's alpha, but c's already premultiplied so " + "multiply it all\n" + " c *= edge_alpha;\n" + "\n" + " OUTPUT(c);\n" + "}\n"; #define NUMFRAGMENTS_pshader_general2 2 -static char *pshader_general2_arr[1][NUMFRAGMENTS_pshader_general2] = { - { pshader_general2_frag0, pshader_general2_frag1, }, +static char* pshader_general2_arr[1][NUMFRAGMENTS_pshader_general2] = { + { + pshader_general2_frag0, + pshader_general2_frag1, + }, }; -static char **pshader_general2(void) -{ - return pshader_general2_arr[0]; -} +static char** pshader_general2(void) { return pshader_general2_arr[0]; } -static char *pshader_general2_vars[] = { - "tex0", - NULL -}; +static char* pshader_general2_vars[] = {"tex0", NULL}; static char pshader_exceptional_blend_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; static char pshader_exceptional_blend_frag1[] = - "#define BLENDPROG return s*d;\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return s*d;\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag2[] = - "#define TEX0\n" - "\n" - "MEDIUMP float compute(MEDIUMP float s, MEDIUMP float sa, MEDIUMP float d, MEDIUMP float da)\n" - "{\n" - " BLENDPROG\n" - "}\n" - "\n" - "MEDIUMP float compute_a(MEDIUMP float sa, MEDIUMP float da)\n" - "{\n" - " ALPHAFUNC\n" - "}\n" - "\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 1);\n" - "COMMON_PSCONSTANTS;\n" - "\n" - "MAIN((ARGS))\n" - "{\n" - " MEDIUMP VEC4 srcc,dstc;\n" - " MEDIUMP VEC3 mixed;\n" - " MEDIUMP VEC2 tc;\n" - " srcc = TEX2D(tex0, TC0.xy);\n" - " srcc = srcc*VEC4(color_mul.rgb, 1.0)*color_mul.a + color_add*srcc.a;\n" - " srcc = clamp(srcc,VEC4(0.0,0.0,0.0,0.0),VEC4(1.0,1.0,1.0,1.0));\n" - " tc = TC0.xy;\n" - " #ifndef EXCEPTIONAL_BLEND_LOAD\n" - " #ifndef EXCEPTIONAL_BLEND_RESCALE\n" - " dstc = TEX2D(tex1, tc).rgba;\n" - " #else\n" - " dstc = TEX2D(tex1, tc*rescale1.xy + rescale1.zw).rgba;\n" - " #endif\n" - " #else\n" - " dstc = EXCEPTIONAL_BLEND_LOAD(tex1, tc);\n" - " #endif\n" - " mixed.r = compute(srcc.r,srcc.a, dstc.r,dstc.a);\n" - " mixed.g = compute(srcc.g,srcc.a, dstc.g,dstc.a);\n" - " mixed.b = compute(srcc.b,srcc.a, dstc.b,dstc.a);\n" - " MEDIUMP VEC4 res;\n" - " #ifdef DIRECT\n" - " res.rgb = mixed;\n" - " #else\n" - " res.rgb = mixed + (1.0-srcc.a)*dstc.rgb + (1.0-dstc.a)*srcc.rgb;\n" - " #endif\n" - " res.a = compute_a(srcc.a,dstc.a);\n" - " OUTPUT(res);\n" - "}\n"; + "#define TEX0\n" + "\n" + "MEDIUMP float compute(MEDIUMP float s, MEDIUMP float sa, MEDIUMP float d, " + "MEDIUMP float da)\n" + "{\n" + " BLENDPROG\n" + "}\n" + "\n" + "MEDIUMP float compute_a(MEDIUMP float sa, MEDIUMP float da)\n" + "{\n" + " ALPHAFUNC\n" + "}\n" + "\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 1);\n" + "COMMON_PSCONSTANTS;\n" + "\n" + "MAIN((ARGS))\n" + "{\n" + " MEDIUMP VEC4 srcc,dstc;\n" + " MEDIUMP VEC3 mixed;\n" + " MEDIUMP VEC2 tc;\n" + " srcc = TEX2D(tex0, TC0.xy);\n" + " srcc = srcc*VEC4(color_mul.rgb, 1.0)*color_mul.a + color_add*srcc.a;\n" + " srcc = clamp(srcc,VEC4(0.0,0.0,0.0,0.0),VEC4(1.0,1.0,1.0,1.0));\n" + " tc = TC0.xy;\n" + " #ifndef EXCEPTIONAL_BLEND_LOAD\n" + " #ifndef EXCEPTIONAL_BLEND_RESCALE\n" + " dstc = TEX2D(tex1, tc).rgba;\n" + " #else\n" + " dstc = TEX2D(tex1, tc*rescale1.xy + rescale1.zw).rgba;\n" + " #endif\n" + " #else\n" + " dstc = EXCEPTIONAL_BLEND_LOAD(tex1, tc);\n" + " #endif\n" + " mixed.r = compute(srcc.r,srcc.a, dstc.r,dstc.a);\n" + " mixed.g = compute(srcc.g,srcc.a, dstc.g,dstc.a);\n" + " mixed.b = compute(srcc.b,srcc.a, dstc.b,dstc.a);\n" + " MEDIUMP VEC4 res;\n" + " #ifdef DIRECT\n" + " res.rgb = mixed;\n" + " #else\n" + " res.rgb = mixed + (1.0-srcc.a)*dstc.rgb + (1.0-dstc.a)*srcc.rgb;\n" + " #endif\n" + " res.a = compute_a(srcc.a,dstc.a);\n" + " OUTPUT(res);\n" + "}\n"; static char pshader_exceptional_blend_frag3[] = - "#define BLENDPROG return sa*da - (da-d)*(sa-s);\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return sa*da - (da-d)*(sa-s);\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag4[] = - "#define BLENDPROG return max(sa*d,s*da);\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return max(sa*d,s*da);\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag5[] = - "#define BLENDPROG return min(sa*d,s*da);\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return min(sa*d,s*da);\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag6[] = - "#define DIRECT\n" - "#define BLENDPROG return min(d+s,1.0);\n" - "#define ALPHAFUNC return min(sa+da,1.0);\n"; + "#define DIRECT\n" + "#define BLENDPROG return min(d+s,1.0);\n" + "#define ALPHAFUNC return min(sa+da,1.0);\n"; static char pshader_exceptional_blend_frag7[] = - "#define DIRECT\n" - "#define BLENDPROG return max(d-s,0.0);\n" - "#define ALPHAFUNC return min(sa+da,1.0);\n"; + "#define DIRECT\n" + "#define BLENDPROG return max(d-s,0.0);\n" + "#define ALPHAFUNC return min(sa+da,1.0);\n"; static char pshader_exceptional_blend_frag8[] = - "#define BLENDPROG return abs(sa*d-s*da);\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return abs(sa*d-s*da);\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag9[] = - "#define BLENDPROG return sa*(da-d);\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return sa*(da-d);\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag10[] = - "#define BLENDPROG return d < da/2.0 ? (2.0*s*d) : (sa*da - 2.0*(da-d)*(sa-s));\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return d < da/2.0 ? (2.0*s*d) : (sa*da - " + "2.0*(da-d)*(sa-s));\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag11[] = - "#define BLENDPROG return s < sa/2.0 ? (2.0*s*d) : (sa*da - 2.0*(da-d)*(sa-s));\n" - "#define ALPHAFUNC return sa+da-sa*da;\n"; + "#define BLENDPROG return s < sa/2.0 ? (2.0*s*d) : (sa*da - " + "2.0*(da-d)*(sa-s));\n" + "#define ALPHAFUNC return sa+da-sa*da;\n"; static char pshader_exceptional_blend_frag12[] = - "#define DIRECT\n" - "#define BLENDPROG return d*(1.0-sa);\n" - "#define ALPHAFUNC return (1.0-sa)*da;\n"; + "#define DIRECT\n" + "#define BLENDPROG return d*(1.0-sa);\n" + "#define ALPHAFUNC return (1.0-sa)*da;\n"; static char pshader_exceptional_blend_frag13[] = - "#define DIRECT\n" - "#define BLENDPROG return d*sa;\n" - "#define ALPHAFUNC return sa*da;\n"; + "#define DIRECT\n" + "#define BLENDPROG return d*sa;\n" + "#define ALPHAFUNC return sa*da;\n"; #define NUMFRAGMENTS_pshader_exceptional_blend 3 -static char *pshader_exceptional_blend_arr[13][NUMFRAGMENTS_pshader_exceptional_blend] = { - { NULL, NULL, NULL, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag1, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag3, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag4, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag5, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag6, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag7, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag8, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag9, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag10, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag11, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag12, pshader_exceptional_blend_frag2, }, - { pshader_exceptional_blend_frag0, pshader_exceptional_blend_frag13, pshader_exceptional_blend_frag2, }, +static char* + pshader_exceptional_blend_arr[13][NUMFRAGMENTS_pshader_exceptional_blend] = + { + { + NULL, + NULL, + NULL, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag1, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag3, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag4, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag5, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag6, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag7, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag8, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag9, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag10, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag11, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag12, + pshader_exceptional_blend_frag2, + }, + { + pshader_exceptional_blend_frag0, + pshader_exceptional_blend_frag13, + pshader_exceptional_blend_frag2, + }, }; -static char **pshader_exceptional_blend(int blend_mode) -{ - return pshader_exceptional_blend_arr[0 + blend_mode*1]; +static char** pshader_exceptional_blend(int blend_mode) { + return pshader_exceptional_blend_arr[0 + blend_mode * 1]; } -static char *pshader_exceptional_blend_vars[] = { - "tex0", - "tex1", - "color_mul", - "color_add", - NULL -}; +static char* pshader_exceptional_blend_vars[] = {"tex0", "tex1", "color_mul", + "color_add", NULL}; static char pshader_filter_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; static char pshader_filter_frag1[] = ""; static char pshader_filter_frag2[] = - "#define TEX0\n" - "\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 1);\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex2, 2);\n" - "\n" - "COMMON_PSCONSTANTS;\n" - "\n" - "BEGIN_CONSTANTS \n" - " DECLARE_CONST_EXTRA(HIGHP VEC4, clamp0, 4);\n" - " DECLARE_CONST_EXTRA(HIGHP VEC4, clamp1, 5);\n" - " #define CLAMP(a,b) clamp(a.xy, b.xy, b.zw)\n" - "\n" - " DECLARE_CONST_EXTRA(LOWP VEC4, color, 6);\n" - " DECLARE_CONST_EXTRA(LOWP VEC4, color2, 7);\n" - " DECLARE_CONST_EXTRA(MEDIUMP VEC4, tc_off, 8);\n" - "END_CONSTANTS\n" - " \n" - "MAIN((ARGS))\n" - "{\n" - " LOWP VEC4 source;\n" - " source = TEX2D(tex1, CLAMP(TC0.xy,clamp1));\n" - " MEDIUMP float shadow_a = TEX2D(tex0, CLAMP(TC0.xy + tc_off.xy,clamp0)).a;\n" - " \n" - " #ifdef BEVEL\n" - " MEDIUMP float shadow_b = TEX2D(tex0, CLAMP(TC0.xy - tc_off.xy,clamp0)).a;\n" - " shadow_a = (shadow_b - shadow_a) * tc_off.z;\n" - " #ifdef GRADIENT\n" - " shadow_a = clamp(shadow_a*0.5 + 0.5, 0.0, 1.0);\n" - " #else\n" - " shadow_b = clamp(-shadow_a, 0.0, 1.0);\n" - " shadow_a = clamp(shadow_a, 0.0, 1.0);\n" - " #endif\n" - " #else\n" - " #ifdef INNER\n" - " #ifndef GRADIENT\n" - " shadow_a = 1.0-shadow_a;\n" - " #endif // !GRADIENT\n" - " #endif // INNER\n" - " shadow_a = min(shadow_a*tc_off.z,1.0);\n" - " #endif // BEVEL\n" - " \n" - " #ifdef GRADIENT\n" - " MEDIUMP VEC2 gtc = VEC2(shadow_a, 0.5);\n" - " MEDIUMP VEC4 ecolor = TEX2D(tex2, gtc);\n" - " shadow_a = 1.0;\n" - " #else\n" - " #ifdef BEVEL\n" - " MEDIUMP VEC4 ecolor = shadow_b*color + shadow_a*color2;\n" - " shadow_a = 1.0;\n" - " #else\n" - " MEDIUMP VEC4 ecolor = color;\n" - " #endif\n" - " #endif\n" - " \n" - " #ifdef ONTOP\n" - " #ifdef KNOCKOUT\n" - " OUTPUT(ecolor);\n" - " #else\n" - " OUTPUT(ecolor + source * (1.0-ecolor.a));\n" - " #endif\n" - " #else\n" - " \n" - " #ifdef KNOCKOUT\n" - " #ifdef INNER\n" - " // KNOCKOUT & INNER\n" - " OUTPUT(ecolor * source.a * shadow_a);\n" - " #else\n" - " // KNOCKOUT & !INNER\n" - " OUTPUT(ecolor * (1.0-source.a) * shadow_a);\n" - " #endif\n" - " #else // !KNOCKOUT\n" - " \n" - " #ifdef INNER\n" - " // !KNOCKOUT & INNER\n" - " /* this is particularly subtle; effectively computes\n" - " invert shadow\n" - " unpremultiply source\n" - " shadow*color over source.rgb (treat as opaque)\n" - " multiply through by source alpha (i.e. make premultiplied again)\n" - " but expressed without *actually* unpremultiplying\n" - " */\n" - " LOWP VEC4 shadow = ecolor * shadow_a;\n" - " LOWP VEC4 res;\n" - " res.rgb = shadow.rgb*source.a + source.rgb*(1.0-shadow.a);\n" - " res.a = source.a;\n" - " OUTPUT(res);\n" - " #else\n" - " // !KNOCKOUT & !INNER\n" - " LOWP VEC4 shadow = ecolor * shadow_a;\n" - " OUTPUT(shadow * (1.0-source.a) + source);\n" - " #endif // INNER\n" - "\n" - " #endif // KNOCKOUT\n" - " #endif // ONTOP\n" - "}\n"; -static char pshader_filter_frag3[] = - "#define KNOCKOUT\n"; -static char pshader_filter_frag4[] = - "#define GRADIENT\n"; -static char pshader_filter_frag5[] = - "#define INNER\n"; -static char pshader_filter_frag6[] = - "#define ONTOP\n"; -static char pshader_filter_frag7[] = - "#define BEVEL\n"; + "#define TEX0\n" + "\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex1, 1);\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex2, 2);\n" + "\n" + "COMMON_PSCONSTANTS;\n" + "\n" + "BEGIN_CONSTANTS \n" + " DECLARE_CONST_EXTRA(HIGHP VEC4, clamp0, 4);\n" + " DECLARE_CONST_EXTRA(HIGHP VEC4, clamp1, 5);\n" + " #define CLAMP(a,b) clamp(a.xy, b.xy, b.zw)\n" + "\n" + " DECLARE_CONST_EXTRA(LOWP VEC4, color, 6);\n" + " DECLARE_CONST_EXTRA(LOWP VEC4, color2, 7);\n" + " DECLARE_CONST_EXTRA(MEDIUMP VEC4, tc_off, 8);\n" + "END_CONSTANTS\n" + " \n" + "MAIN((ARGS))\n" + "{\n" + " LOWP VEC4 source;\n" + " source = TEX2D(tex1, CLAMP(TC0.xy,clamp1));\n" + " MEDIUMP float shadow_a = TEX2D(tex0, CLAMP(TC0.xy + " + "tc_off.xy,clamp0)).a;\n" + " \n" + " #ifdef BEVEL\n" + " MEDIUMP float shadow_b = TEX2D(tex0, CLAMP(TC0.xy - " + "tc_off.xy,clamp0)).a;\n" + " shadow_a = (shadow_b - shadow_a) * tc_off.z;\n" + " #ifdef GRADIENT\n" + " shadow_a = clamp(shadow_a*0.5 + 0.5, 0.0, 1.0);\n" + " #else\n" + " shadow_b = clamp(-shadow_a, 0.0, 1.0);\n" + " shadow_a = clamp(shadow_a, 0.0, 1.0);\n" + " #endif\n" + " #else\n" + " #ifdef INNER\n" + " #ifndef GRADIENT\n" + " shadow_a = 1.0-shadow_a;\n" + " #endif // !GRADIENT\n" + " #endif // INNER\n" + " shadow_a = min(shadow_a*tc_off.z,1.0);\n" + " #endif // BEVEL\n" + " \n" + " #ifdef GRADIENT\n" + " MEDIUMP VEC2 gtc = VEC2(shadow_a, 0.5);\n" + " MEDIUMP VEC4 ecolor = TEX2D(tex2, gtc);\n" + " shadow_a = 1.0;\n" + " #else\n" + " #ifdef BEVEL\n" + " MEDIUMP VEC4 ecolor = shadow_b*color + shadow_a*color2;\n" + " shadow_a = 1.0;\n" + " #else\n" + " MEDIUMP VEC4 ecolor = color;\n" + " #endif\n" + " #endif\n" + " \n" + " #ifdef ONTOP\n" + " #ifdef KNOCKOUT\n" + " OUTPUT(ecolor);\n" + " #else\n" + " OUTPUT(ecolor + source * (1.0-ecolor.a));\n" + " #endif\n" + " #else\n" + " \n" + " #ifdef KNOCKOUT\n" + " #ifdef INNER\n" + " // KNOCKOUT & INNER\n" + " OUTPUT(ecolor * source.a * shadow_a);\n" + " #else\n" + " // KNOCKOUT & !INNER\n" + " OUTPUT(ecolor * (1.0-source.a) * shadow_a);\n" + " #endif\n" + " #else // !KNOCKOUT\n" + " \n" + " #ifdef INNER\n" + " // !KNOCKOUT & INNER\n" + " /* this is particularly subtle; effectively computes\n" + " invert shadow\n" + " unpremultiply source\n" + " shadow*color over source.rgb (treat as opaque)\n" + " multiply through by source alpha (i.e. make premultiplied again)\n" + " but expressed without *actually* unpremultiplying\n" + " */\n" + " LOWP VEC4 shadow = ecolor * shadow_a;\n" + " LOWP VEC4 res;\n" + " res.rgb = shadow.rgb*source.a + source.rgb*(1.0-shadow.a);\n" + " res.a = source.a;\n" + " OUTPUT(res);\n" + " #else\n" + " // !KNOCKOUT & !INNER\n" + " LOWP VEC4 shadow = ecolor * shadow_a;\n" + " OUTPUT(shadow * (1.0-source.a) + source);\n" + " #endif // INNER\n" + "\n" + " #endif // KNOCKOUT\n" + " #endif // ONTOP\n" + "}\n"; +static char pshader_filter_frag3[] = "#define KNOCKOUT\n"; +static char pshader_filter_frag4[] = "#define GRADIENT\n"; +static char pshader_filter_frag5[] = "#define INNER\n"; +static char pshader_filter_frag6[] = "#define ONTOP\n"; +static char pshader_filter_frag7[] = "#define BEVEL\n"; #define NUMFRAGMENTS_pshader_filter 7 -static char *pshader_filter_arr[32][NUMFRAGMENTS_pshader_filter] = { - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag1, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag4, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag4, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag1, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag3, pshader_filter_frag2, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag1, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag4, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag1, pshader_filter_frag5, pshader_filter_frag4, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag1, pshader_filter_frag3, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag1, pshader_filter_frag2, }, - { pshader_filter_frag0, pshader_filter_frag7, pshader_filter_frag6, pshader_filter_frag1, pshader_filter_frag4, pshader_filter_frag3, pshader_filter_frag2, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, }, +static char* pshader_filter_arr[32][NUMFRAGMENTS_pshader_filter] = { + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag1, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag4, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag4, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag1, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag1, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag4, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag1, + pshader_filter_frag5, + pshader_filter_frag4, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag1, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag1, + pshader_filter_frag2, + }, + { + pshader_filter_frag0, + pshader_filter_frag7, + pshader_filter_frag6, + pshader_filter_frag1, + pshader_filter_frag4, + pshader_filter_frag3, + pshader_filter_frag2, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, + { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + }, }; -static char **pshader_filter(int bevel, int ontop, int inner, int gradient, int knockout) -{ - return pshader_filter_arr[0 + bevel*16 + ontop*8 + inner*4 + gradient*2 + knockout*1]; +static char** pshader_filter(int bevel, int ontop, int inner, int gradient, + int knockout) { + return pshader_filter_arr[0 + bevel * 16 + ontop * 8 + inner * 4 + + gradient * 2 + knockout * 1]; } -static char *pshader_filter_vars[] = { - "tex0", - "tex1", - "color", - "tc_off", - "tex2", - "clamp0", - "clamp1", - "color2", - NULL -}; +static char* pshader_filter_vars[] = {"tex0", "tex1", "color", + "tc_off", "tex2", "clamp0", + "clamp1", "color2", NULL}; static char pshader_blur_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; -static char pshader_blur_frag1[] = - "#define TAPS TAP(0); TAP(1);\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; +static char pshader_blur_frag1[] = "#define TAPS TAP(0); TAP(1);\n"; static char pshader_blur_frag2[] = - "#define TEX0\n" - "\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" - "COMMON_PSCONSTANTS;\n" - "\n" - "BEGIN_CONSTANTS\n" - " DECLARE_CONST_EXTRA(HIGHP VEC4, clampv, 4);\n" - " #define CLAMP(t) clamp(t, clampv.xy, clampv.zw)\n" - " \n" - " DECLARE_CONST_EXTRA(MEDIUMP VEC4, tap[9], 5);\n" - "END_CONSTANTS\n" - "\n" - "MAIN((ARGS))\n" - "{\n" - " MEDIUMP VEC4 s = VEC4(0,0,0,0);\n" - " \n" - " #define TAP(i) s += TEX2D(tex0, CLAMP(TC0.xy + tap[i].xy)) * tap[i].z\n" - " TAPS\n" - " \n" - " OUTPUT(s);\n" - "}\n"; -static char pshader_blur_frag3[] = - "#define TAPS TAP(0); TAP(1); TAP(2);\n"; + "#define TEX0\n" + "\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" + "COMMON_PSCONSTANTS;\n" + "\n" + "BEGIN_CONSTANTS\n" + " DECLARE_CONST_EXTRA(HIGHP VEC4, clampv, 4);\n" + " #define CLAMP(t) clamp(t, clampv.xy, clampv.zw)\n" + " \n" + " DECLARE_CONST_EXTRA(MEDIUMP VEC4, tap[9], 5);\n" + "END_CONSTANTS\n" + "\n" + "MAIN((ARGS))\n" + "{\n" + " MEDIUMP VEC4 s = VEC4(0,0,0,0);\n" + " \n" + " #define TAP(i) s += TEX2D(tex0, CLAMP(TC0.xy + tap[i].xy)) * " + "tap[i].z\n" + " TAPS\n" + " \n" + " OUTPUT(s);\n" + "}\n"; +static char pshader_blur_frag3[] = "#define TAPS TAP(0); TAP(1); TAP(2);\n"; static char pshader_blur_frag4[] = - "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3);\n"; + "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3);\n"; static char pshader_blur_frag5[] = - "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4);\n"; + "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4);\n"; static char pshader_blur_frag6[] = - "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5);\n"; + "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5);\n"; static char pshader_blur_frag7[] = - "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5); TAP(6);\n"; + "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5); TAP(6);\n"; static char pshader_blur_frag8[] = - "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5); TAP(6); TAP(7);\n"; + "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5); TAP(6); " + "TAP(7);\n"; static char pshader_blur_frag9[] = - "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5); TAP(6); TAP(7); TAP(8);\n"; + "#define TAPS TAP(0); TAP(1); TAP(2); TAP(3); TAP(4); TAP(5); TAP(6); " + "TAP(7); TAP(8);\n"; #define NUMFRAGMENTS_pshader_blur 3 -static char *pshader_blur_arr[10][NUMFRAGMENTS_pshader_blur] = { - { NULL, NULL, NULL, }, - { NULL, NULL, NULL, }, - { pshader_blur_frag0, pshader_blur_frag1, pshader_blur_frag2, }, - { pshader_blur_frag0, pshader_blur_frag3, pshader_blur_frag2, }, - { pshader_blur_frag0, pshader_blur_frag4, pshader_blur_frag2, }, - { pshader_blur_frag0, pshader_blur_frag5, pshader_blur_frag2, }, - { pshader_blur_frag0, pshader_blur_frag6, pshader_blur_frag2, }, - { pshader_blur_frag0, pshader_blur_frag7, pshader_blur_frag2, }, - { pshader_blur_frag0, pshader_blur_frag8, pshader_blur_frag2, }, - { pshader_blur_frag0, pshader_blur_frag9, pshader_blur_frag2, }, +static char* pshader_blur_arr[10][NUMFRAGMENTS_pshader_blur] = { + { + NULL, + NULL, + NULL, + }, + { + NULL, + NULL, + NULL, + }, + { + pshader_blur_frag0, + pshader_blur_frag1, + pshader_blur_frag2, + }, + { + pshader_blur_frag0, + pshader_blur_frag3, + pshader_blur_frag2, + }, + { + pshader_blur_frag0, + pshader_blur_frag4, + pshader_blur_frag2, + }, + { + pshader_blur_frag0, + pshader_blur_frag5, + pshader_blur_frag2, + }, + { + pshader_blur_frag0, + pshader_blur_frag6, + pshader_blur_frag2, + }, + { + pshader_blur_frag0, + pshader_blur_frag7, + pshader_blur_frag2, + }, + { + pshader_blur_frag0, + pshader_blur_frag8, + pshader_blur_frag2, + }, + { + pshader_blur_frag0, + pshader_blur_frag9, + pshader_blur_frag2, + }, }; -static char **pshader_blur(int numtaps) -{ - return pshader_blur_arr[0 + numtaps*1]; +static char** pshader_blur(int numtaps) { + return pshader_blur_arr[0 + numtaps * 1]; } -static char *pshader_blur_vars[] = { - "tex0", - "tap", - "clampv", - NULL -}; +static char* pshader_blur_vars[] = {"tex0", "tap", "clampv", NULL}; static char pshader_color_matrix_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; static char pshader_color_matrix_frag1[] = - "#define TEX0\n" - "\n" - "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" - "COMMON_PSCONSTANTS;\n" - "\n" - "BEGIN_CONSTANTS\n" - " DECLARE_CONST_EXTRA(MEDIUMP VEC4, data[5], 4);\n" - "END_CONSTANTS\n" - "\n" - "MAIN((ARGS))\n" - "{\n" - " MEDIUMP VEC4 t,color;\n" - " t = TEX2D(tex0, TC0.xy);\n" - " \n" - "#ifndef COLORMATRIX_HAS_ALPHA_EFFECTS\n" - " // version of colormatrix assuming no additive alpha in matrix,\n" - " // which is all CS3 seems to be able to output\n" - " color.r = dot(data[0], t) + data[4].r*t.a;\n" - " color.g = dot(data[1], t) + data[4].g*t.a;\n" - " color.b = dot(data[2], t) + data[4].b*t.a;\n" - " color.a = data[3].a * t.a;\n" - " color.rgb = color.rgb * data[3].a;\n" - "#else\n" - " // version of colormatrix that matches spec \n" - " if (t.a == 0.0)\n" - " t.rgb = VEC3(0.0);\n" - " else\n" - " t.rgb /= t.a;\n" - " color.r = dot(data[0], t) + data[4].r;\n" - " color.g = dot(data[1], t) + data[4].g;\n" - " color.b = dot(data[2], t) + data[4].b;\n" - " color.a = dot(data[3], t) + data[4].a;\n" - " color.rgb = color.rgb * color.a;\n" - "#endif\n" - " OUTPUT(color);\n" - "}\n"; + "#define TEX0\n" + "\n" + "DECLARE_SAMPLER(LOWP SAMPLER, tex0, 0);\n" + "COMMON_PSCONSTANTS;\n" + "\n" + "BEGIN_CONSTANTS\n" + " DECLARE_CONST_EXTRA(MEDIUMP VEC4, data[5], 4);\n" + "END_CONSTANTS\n" + "\n" + "MAIN((ARGS))\n" + "{\n" + " MEDIUMP VEC4 t,color;\n" + " t = TEX2D(tex0, TC0.xy);\n" + " \n" + "#ifndef COLORMATRIX_HAS_ALPHA_EFFECTS\n" + " // version of colormatrix assuming no additive alpha in matrix,\n" + " // which is all CS3 seems to be able to output\n" + " color.r = dot(data[0], t) + data[4].r*t.a;\n" + " color.g = dot(data[1], t) + data[4].g*t.a;\n" + " color.b = dot(data[2], t) + data[4].b*t.a;\n" + " color.a = data[3].a * t.a;\n" + " color.rgb = color.rgb * data[3].a;\n" + "#else\n" + " // version of colormatrix that matches spec \n" + " if (t.a == 0.0)\n" + " t.rgb = VEC3(0.0);\n" + " else\n" + " t.rgb /= t.a;\n" + " color.r = dot(data[0], t) + data[4].r;\n" + " color.g = dot(data[1], t) + data[4].g;\n" + " color.b = dot(data[2], t) + data[4].b;\n" + " color.a = dot(data[3], t) + data[4].a;\n" + " color.rgb = color.rgb * color.a;\n" + "#endif\n" + " OUTPUT(color);\n" + "}\n"; #define NUMFRAGMENTS_pshader_color_matrix 2 -static char *pshader_color_matrix_arr[1][NUMFRAGMENTS_pshader_color_matrix] = { - { pshader_color_matrix_frag0, pshader_color_matrix_frag1, }, +static char* pshader_color_matrix_arr[1][NUMFRAGMENTS_pshader_color_matrix] = { + { + pshader_color_matrix_frag0, + pshader_color_matrix_frag1, + }, }; -static char **pshader_color_matrix(void) -{ - return pshader_color_matrix_arr[0]; -} +static char** pshader_color_matrix(void) { return pshader_color_matrix_arr[0]; } -static char *pshader_color_matrix_vars[] = { - "tex0", - "data", - NULL -}; +static char* pshader_color_matrix_vars[] = {"tex0", "data", NULL}; static char pshader_manual_clear_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; static char pshader_manual_clear_frag1[] = - "COMMON_PSCONSTANTS;\n" - "\n" - "MAIN((ARGS))\n" - "{\n" - " OUTPUT(color_mul);\n" - "}\n"; + "COMMON_PSCONSTANTS;\n" + "\n" + "MAIN((ARGS))\n" + "{\n" + " OUTPUT(color_mul);\n" + "}\n"; #define NUMFRAGMENTS_pshader_manual_clear 2 -static char *pshader_manual_clear_arr[1][NUMFRAGMENTS_pshader_manual_clear] = { - { pshader_manual_clear_frag0, pshader_manual_clear_frag1, }, +static char* pshader_manual_clear_arr[1][NUMFRAGMENTS_pshader_manual_clear] = { + { + pshader_manual_clear_frag0, + pshader_manual_clear_frag1, + }, }; -static char **pshader_manual_clear(void) -{ - return pshader_manual_clear_arr[0]; -} +static char** pshader_manual_clear(void) { return pshader_manual_clear_arr[0]; } -static char *pshader_manual_clear_vars[] = { - "color_mul", - NULL -}; +static char* pshader_manual_clear_vars[] = {"color_mul", NULL}; static char vshader_vsgl_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; -static char vshader_vsgl_frag1[] = - "#define FORMAT_V2\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; +static char vshader_vsgl_frag1[] = "#define FORMAT_V2\n"; static char vshader_vsgl_frag2[] = - " uniform vec4 world0;\n" - " uniform vec4 world1;\n" - " uniform vec4 x_off;\n" - " uniform vec4 texgen_s;\n" - " uniform vec4 texgen_t;\n" - "#ifdef FLASH_10\n" - " uniform vec4 x3d;\n" - " uniform vec4 y3d;\n" - " uniform vec4 w3d;\n" - "#else\n" - " uniform vec4 viewproj;\n" - "#endif\n" - "\n" - " attribute vec4 position;\n" - " attribute vec4 in_attr;\n" - "\n" - " varying vec4 tex_coord;\n" - " \n" - " void main() {\n" - " // world transform\n" - " HIGHP vec4 wpos = vec4(dot(world0, position), dot(world1, position), world0.z, 1.0);\n" - " \n" - " // texture coordinates\n" - " tex_coord = vec4(dot(texgen_s, position), dot(texgen_t, position), 1.0, 0.0);\n" - " #ifdef FORMAT_V2TC2\n" - " tex_coord.xy = in_attr.xy;\n" - " #endif\n" - " \n" - " // antialias processing\n" - " #ifdef FORMAT_V2C4\n" - " HIGHP vec4 q,p;\n" - " HIGHP float len,newlen;\n" - " q.xy = in_attr.yz / 64.0;\n" - " len = length(q.xy);\n" - " p.x = q.x*x_off.x + q.y*x_off.y;\n" - " p.y = q.x*x_off.z + q.y*x_off.w;\n" - " p.z = 0.0; p.w = 0.0;\n" - " p.xy = vec2(dot(world0, p), dot(world1, p));\n" - " newlen = length(p.xy);\n" - " p *= (newlen!=0.0) ? len / newlen : 0.0;\n" - " wpos.xy += p.xy;\n" - " tex_coord.z = in_attr.x / 32.0;\n" - " #endif\n" - " \n" - " // view/projection transform\n" - " gl_Position = vec4(wpos.xy * viewproj.xy + viewproj.zw, wpos.zw);\n" - "\n" - " #ifdef FLASH_10\n" - " gl_Position = wpos.x * x3d + wpos.y * y3d + w3d; // z is ignored!\n" - " gl_Position.w = gl_Position.z;\n" - " gl_Position.z = wpos.z * gl_Position.w;\n" - " #endif\n" - " } \n"; -static char vshader_vsgl_frag3[] = - "#define FORMAT_V2C4\n"; -static char vshader_vsgl_frag4[] = - "#define FORMAT_V2TC2\n"; + " uniform vec4 world0;\n" + " uniform vec4 world1;\n" + " uniform vec4 x_off;\n" + " uniform vec4 texgen_s;\n" + " uniform vec4 texgen_t;\n" + "#ifdef FLASH_10\n" + " uniform vec4 x3d;\n" + " uniform vec4 y3d;\n" + " uniform vec4 w3d;\n" + "#else\n" + " uniform vec4 viewproj;\n" + "#endif\n" + "\n" + " attribute vec4 position;\n" + " attribute vec4 in_attr;\n" + "\n" + " varying vec4 tex_coord;\n" + " \n" + " void main() {\n" + " // world transform\n" + " HIGHP vec4 wpos = vec4(dot(world0, position), dot(world1, " + "position), world0.z, 1.0);\n" + " \n" + " // texture coordinates\n" + " tex_coord = vec4(dot(texgen_s, position), dot(texgen_t, " + "position), 1.0, 0.0);\n" + " #ifdef FORMAT_V2TC2\n" + " tex_coord.xy = in_attr.xy;\n" + " #endif\n" + " \n" + " // antialias processing\n" + " #ifdef FORMAT_V2C4\n" + " HIGHP vec4 q,p;\n" + " HIGHP float len,newlen;\n" + " q.xy = in_attr.yz / 64.0;\n" + " len = length(q.xy);\n" + " p.x = q.x*x_off.x + q.y*x_off.y;\n" + " p.y = q.x*x_off.z + q.y*x_off.w;\n" + " p.z = 0.0; p.w = 0.0;\n" + " p.xy = vec2(dot(world0, p), dot(world1, p));\n" + " newlen = length(p.xy);\n" + " p *= (newlen!=0.0) ? len / newlen : 0.0;\n" + " wpos.xy += p.xy;\n" + " tex_coord.z = in_attr.x / 32.0;\n" + " #endif\n" + " \n" + " // view/projection transform\n" + " gl_Position = vec4(wpos.xy * viewproj.xy + viewproj.zw, " + "wpos.zw);\n" + "\n" + " #ifdef FLASH_10\n" + " gl_Position = wpos.x * x3d + wpos.y * y3d + w3d; // z is " + "ignored!\n" + " gl_Position.w = gl_Position.z;\n" + " gl_Position.z = wpos.z * gl_Position.w;\n" + " #endif\n" + " } \n"; +static char vshader_vsgl_frag3[] = "#define FORMAT_V2C4\n"; +static char vshader_vsgl_frag4[] = "#define FORMAT_V2TC2\n"; #define NUMFRAGMENTS_vshader_vsgl 3 -static char *vshader_vsgl_arr[3][NUMFRAGMENTS_vshader_vsgl] = { - { vshader_vsgl_frag0, vshader_vsgl_frag1, vshader_vsgl_frag2, }, - { vshader_vsgl_frag0, vshader_vsgl_frag3, vshader_vsgl_frag2, }, - { vshader_vsgl_frag0, vshader_vsgl_frag4, vshader_vsgl_frag2, }, +static char* vshader_vsgl_arr[3][NUMFRAGMENTS_vshader_vsgl] = { + { + vshader_vsgl_frag0, + vshader_vsgl_frag1, + vshader_vsgl_frag2, + }, + { + vshader_vsgl_frag0, + vshader_vsgl_frag3, + vshader_vsgl_frag2, + }, + { + vshader_vsgl_frag0, + vshader_vsgl_frag4, + vshader_vsgl_frag2, + }, }; -static char **vshader_vsgl(int vformat) -{ - return vshader_vsgl_arr[0 + vformat*1]; +static char** vshader_vsgl(int vformat) { + return vshader_vsgl_arr[0 + vformat * 1]; } -static char *vshader_vsgl_vars[] = { - "world0", - "world1", - "x_off", - "texgen_s", - "texgen_t", - "viewproj", - NULL -}; +static char* vshader_vsgl_vars[] = {"world0", "world1", "x_off", "texgen_s", + "texgen_t", "viewproj", NULL}; static char vshader_vsglihud_frag0[] = - "#version 110 // only need 100, but 110 works around a driver issue\n" - "#define MAIN(x) void main()\n" - "#define ARGS\n" - "#define ARGS2\n" - "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" - "#define DECLARE_CONST(type, name, reg) uniform type name\n" - "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" - "#define SAMPLER sampler2D\n" - "#define TEX2D texture2D\n" - "#define VEC4 vec4\n" - "#define VEC3 vec3\n" - "#define VEC2 vec2\n" - "#define LOWP\n" - "#define MEDIUMP\n" - "#define HIGHP\n" - "#define TC0 tex_coord.xy\n" - "#define TC1 tex_coord.zw\n" - "#define OUTPUT(x) gl_FragColor = x\n" - "\n" - "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" - "\n" - "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying VEC4 tex_coord\n" - "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" - "#define BEGIN_CONSTANTS\n" - "#define END_CONSTANTS\n" - "\n" - "#define saturate(x) clamp(x,0.0,1.0)\n"; + "#version 110 // only need 100, but 110 works around a driver " + "issue\n" + "#define MAIN(x) void main()\n" + "#define ARGS\n" + "#define ARGS2\n" + "#define DECLARE_SAMPLER(type, name, reg) uniform type name\n" + "#define DECLARE_CONST(type, name, reg) uniform type name\n" + "#define DECLARE_CONST_EXTRA(type, name, reg) uniform type name\n" + "#define SAMPLER sampler2D\n" + "#define TEX2D texture2D\n" + "#define VEC4 vec4\n" + "#define VEC3 vec3\n" + "#define VEC2 vec2\n" + "#define LOWP\n" + "#define MEDIUMP\n" + "#define HIGHP\n" + "#define TC0 tex_coord.xy\n" + "#define TC1 tex_coord.zw\n" + "#define OUTPUT(x) gl_FragColor = x\n" + "\n" + "#define SHADER_ALPHATEST(x) if (x < 0.5) discard\n" + "\n" + "#define COMMON_PSCONSTANTS DECLARE_CONST(VEC4, color_mul, 0); " + "DECLARE_CONST(VEC4, color_add, 1); DECLARE_CONST(VEC4, focal, 2); varying " + "VEC4 tex_coord\n" + "#define COMMON_PCONSTANTS2 varying VEC4 tex_coord; varying VEC4 " + "color_mul; varying VEC4 color_add; varying VEC4 clip_rect;\n" + "#define BEGIN_CONSTANTS\n" + "#define END_CONSTANTS\n" + "\n" + "#define saturate(x) clamp(x,0.0,1.0)\n"; static char vshader_vsglihud_frag1[] = - "uniform vec4 worldview[2];\n" - "uniform vec4 material[96];\n" - "uniform float textmode;\n" - "\n" - "#define pixels_per_panel_unit 1.0\n" - "\n" - "attribute vec2 position;\n" - "attribute vec2 texcoord;\n" - "attribute vec4 material_index; \n" - "\n" - "varying vec4 tex_coord;\n" - "varying vec4 color_mul;\n" - "varying vec4 color_add;\n" - "varying vec4 clip_rect;\n" - "\n" - "void main() {\n" - " // view/projection transform\n" - " gl_Position = vec4(worldview[0].w + dot(worldview[0].xy, position),\n" - " worldview[1].w + dot(worldview[1].xy, position),\n" - " 0.0,\n" - " 1.0);\n" - "\n" - " LOWP VEC4 c1_mul,c1_add,c2_mul,c2_add, c_mul,c_add;\n" - " HIGHP VEC4 clip;\n" - "\n" - " // convert 8-bit material_info loaded as float back to integers\n" - " LOWP VEC3 mat = floor(255.0*material_index.xyz + 0.5);\n" - "\n" - " // @TODO: flatten these into a single array\n" - " c1_mul = material[int(mat.r )];\n" - " c1_add = material[int(mat.r+1.0)];\n" - " c2_mul = material[int(mat.g )];\n" - " c2_add = material[int(mat.g+1.0)];\n" - " clip = material[int(mat.b )];\n" - "\n" - " // if textmode is 0, suppress c2_add.rgba\n" - "\n" - " // combine hierarchical and local colors\n" - " color_add.rgb = c1_mul.rgb * (c2_add.rgb * textmode) + c1_add.rgb;\n" - " color_mul = c1_mul * c2_mul;\n" - " color_mul.a *= material_index.w;\n" - "\n" - " // compute premultiplied alpha\n" - " color_mul.rgb *= color_mul.a;\n" - " color_add.rgb *= color_mul.a;\n" - "\n" - " // pass additive blending flag stored in c1_add.a and c2_add.a to pixel shader\n" - " color_add.a = clamp(c1_add.a + c2_add.a * textmode,0.0,1.0);\n" - "\n" - " // except actually we'll premultiply that into color_mul.a\n" - " color_mul.a *= (1.0-color_add.a);\n" - "\n" - " // compute premultiplied cliprect\n" - " // for now cliprect comes in as x0,y0,x1,y1, not center/offset\n" - " \n" - " // coordinates come in already rotated into panel space, which is also where cliprect is defined\n" - " HIGHP VEC2 center = (clip.xy + clip.zw) / 2.0;\n" - " HIGHP VEC2 offset = (clip.zw - clip.xy) / 2.0;\n" - "\n" - " // use of pixels_per_panel_unit here ignores effect of non-uniform scaling\n" - " clip_rect.xy = center * pixels_per_panel_unit;\n" - " clip_rect.zw = offset * pixels_per_panel_unit + 1.0; // offset is location where alpha goes to 0, so it's 1 pixel out\n" - "\n" - " tex_coord.zw = position * pixels_per_panel_unit;\n" - " tex_coord.xy = texcoord;\n" - "} \n"; + "uniform vec4 worldview[2];\n" + "uniform vec4 material[96];\n" + "uniform float textmode;\n" + "\n" + "#define pixels_per_panel_unit 1.0\n" + "\n" + "attribute vec2 position;\n" + "attribute vec2 texcoord;\n" + "attribute vec4 material_index; \n" + "\n" + "varying vec4 tex_coord;\n" + "varying vec4 color_mul;\n" + "varying vec4 color_add;\n" + "varying vec4 clip_rect;\n" + "\n" + "void main() {\n" + " // view/projection transform\n" + " gl_Position = vec4(worldview[0].w + dot(worldview[0].xy, position),\n" + " worldview[1].w + dot(worldview[1].xy, position),\n" + " 0.0,\n" + " 1.0);\n" + "\n" + " LOWP VEC4 c1_mul,c1_add,c2_mul,c2_add, c_mul,c_add;\n" + " HIGHP VEC4 clip;\n" + "\n" + " // convert 8-bit material_info loaded as float back to integers\n" + " LOWP VEC3 mat = floor(255.0*material_index.xyz + 0.5);\n" + "\n" + " // @TODO: flatten these into a single array\n" + " c1_mul = material[int(mat.r )];\n" + " c1_add = material[int(mat.r+1.0)];\n" + " c2_mul = material[int(mat.g )];\n" + " c2_add = material[int(mat.g+1.0)];\n" + " clip = material[int(mat.b )];\n" + "\n" + " // if textmode is 0, suppress c2_add.rgba\n" + "\n" + " // combine hierarchical and local colors\n" + " color_add.rgb = c1_mul.rgb * (c2_add.rgb * textmode) + c1_add.rgb;\n" + " color_mul = c1_mul * c2_mul;\n" + " color_mul.a *= material_index.w;\n" + "\n" + " // compute premultiplied alpha\n" + " color_mul.rgb *= color_mul.a;\n" + " color_add.rgb *= color_mul.a;\n" + "\n" + " // pass additive blending flag stored in c1_add.a and c2_add.a to " + "pixel shader\n" + " color_add.a = clamp(c1_add.a + c2_add.a * textmode,0.0,1.0);\n" + "\n" + " // except actually we'll premultiply that into color_mul.a\n" + " color_mul.a *= (1.0-color_add.a);\n" + "\n" + " // compute premultiplied cliprect\n" + " // for now cliprect comes in as x0,y0,x1,y1, not center/offset\n" + " \n" + " // coordinates come in already rotated into panel space, which is " + "also where cliprect is defined\n" + " HIGHP VEC2 center = (clip.xy + clip.zw) / 2.0;\n" + " HIGHP VEC2 offset = (clip.zw - clip.xy) / 2.0;\n" + "\n" + " // use of pixels_per_panel_unit here ignores effect of non-uniform " + "scaling\n" + " clip_rect.xy = center * pixels_per_panel_unit;\n" + " clip_rect.zw = offset * pixels_per_panel_unit + 1.0; // offset is " + "location where alpha goes to 0, so it's 1 pixel out\n" + "\n" + " tex_coord.zw = position * pixels_per_panel_unit;\n" + " tex_coord.xy = texcoord;\n" + "} \n"; #define NUMFRAGMENTS_vshader_vsglihud 2 -static char *vshader_vsglihud_arr[1][NUMFRAGMENTS_vshader_vsglihud] = { - { vshader_vsglihud_frag0, vshader_vsglihud_frag1, }, +static char* vshader_vsglihud_arr[1][NUMFRAGMENTS_vshader_vsglihud] = { + { + vshader_vsglihud_frag0, + vshader_vsglihud_frag1, + }, }; -static char **vshader_vsglihud(void) -{ - return vshader_vsglihud_arr[0]; -} - -static char *vshader_vsglihud_vars[] = { - "worldview", - "material", - "textmode", - NULL -}; +static char** vshader_vsglihud(void) { return vshader_vsglihud_arr[0]; } +static char* vshader_vsglihud_vars[] = {"worldview", "material", "textmode", + NULL}; diff --git a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shared.inl b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shared.inl index e24dd7202..9b5be4efc 100644 --- a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shared.inl +++ b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_gl_shared.inl @@ -1,13 +1,13 @@ // gdraw_gl_shared.inl - copyright 2012 RAD Game Tools // -// This file implements the part of the Iggy graphics driver layer shared between -// GL and GL ES 2 (which is most of it). It heavily depends on a bunch of typedefs, -// #defines and some utility functions that need to be set up correctly for the GL -// version being targeted. It also targets a kind of pseudo-GL 2.0; the platform -// implementation has to set up some #defines and perform extra initialization -// work if we go through extensions instead. This is all a bit ugly, but much -// easier to maintain than the original solution, where we just kept two almost -// identical versions of this code. +// This file implements the part of the Iggy graphics driver layer shared +// between GL and GL ES 2 (which is most of it). It heavily depends on a bunch +// of typedefs, #defines and some utility functions that need to be set up +// correctly for the GL version being targeted. It also targets a kind of +// pseudo-GL 2.0; the platform implementation has to set up some #defines and +// perform extra initialization work if we go through extensions instead. This +// is all a bit ugly, but much easier to maintain than the original solution, +// where we just kept two almost identical versions of this code. ///////////////////////////////////////////////////////////// // @@ -16,44 +16,44 @@ // The native handle type holds resource handles and a coarse description. typedef union { - // handle that is a texture - struct { - GLuint gl; - GLuint gl_renderbuf; - U32 w:24; - U32 nonpow2:8; - U32 h:24; - U32 reserved:8; - } tex; + // handle that is a texture + struct { + GLuint gl; + GLuint gl_renderbuf; + U32 w : 24; + U32 nonpow2 : 8; + U32 h : 24; + U32 reserved : 8; + } tex; - // handle that is a vertex buffer - struct { - GLuint base; - GLuint indices; - } vbuf; + // handle that is a vertex buffer + struct { + GLuint base; + GLuint indices; + } vbuf; } GDrawNativeHandle; #include "gdraw_shared.inl" // max rendertarget stack depth. this depends on the extent to which you // use filters and non-standard blend modes, and how nested they are. -#define MAX_RENDER_STACK_DEPTH 8 // Iggy is hardcoded to a limit of 16... probably 1-3 is realistic -#define AATEX_SAMPLER 3 // sampler that aa_tex gets set in -#define QUAD_IB_COUNT 4096 // quad index buffer has indices for this many quads +#define MAX_RENDER_STACK_DEPTH \ + 8 // Iggy is hardcoded to a limit of 16... probably 1-3 is realistic +#define AATEX_SAMPLER 3 // sampler that aa_tex gets set in +#define QUAD_IB_COUNT 4096 // quad index buffer has indices for this many quads -#define ASSERT_COUNT(a,b) ((a) == (b) ? (b) : -1) +#define ASSERT_COUNT(a, b) ((a) == (b) ? (b) : -1) /////////////////////////////////////////////////////////////////////////////// // // debugging/validation // -static RADINLINE void break_on_err(GLint e) -{ +static RADINLINE void break_on_err(GLint e) { #ifdef _DEBUG - if (e) { - RR_BREAK(); - } + if (e) { + RR_BREAK(); + } #endif } @@ -61,41 +61,32 @@ static RADINLINE void break_on_err(GLint e) #define GDRAW_PLATFORM_REPORT_GL_SITE(site) ((void)0) #endif -static void report_err(GLint e) -{ - break_on_err(e); - IggyGDrawSendWarning(NULL, "OpenGL glGetError error"); +static void report_err(GLint e) { + break_on_err(e); + IggyGDrawSendWarning(NULL, "OpenGL glGetError error"); } -static void compilation_err(const char *msg) -{ - error_msg_platform_specific(msg); - report_err(GL_INVALID_VALUE); +static void compilation_err(const char* msg) { + error_msg_platform_specific(msg); + report_err(GL_INVALID_VALUE); } -static void eat_gl_err(void) -{ - while (glGetError() != GL_NO_ERROR); -} +static void eat_gl_err(void) { while (glGetError() != GL_NO_ERROR); } -static void opengl_check_site(const char *site); +static void opengl_check_site(const char* site); -static void opengl_check(void) -{ - opengl_check_site(NULL); -} +static void opengl_check(void) { opengl_check_site(NULL); } -static void opengl_check_site(const char *site) -{ +static void opengl_check_site(const char* site) { #ifdef _DEBUG - GLint e = glGetError(); - if (e != GL_NO_ERROR) { - GDRAW_PLATFORM_REPORT_GL_SITE(site); - report_err(e); - eat_gl_err(); - } + GLint e = glGetError(); + if (e != GL_NO_ERROR) { + GDRAW_PLATFORM_REPORT_GL_SITE(site); + report_err(e); + eat_gl_err(); + } #else - (void) site; + (void)site; #endif } @@ -103,10 +94,7 @@ static void opengl_check_site(const char *site) #define OPENGL_CHECK_SITE(site) opengl_check_site(site) #endif -static U32 is_pow2(S32 n) -{ - return ((U32) n & (U32) (n-1)) == 0; -} +static U32 is_pow2(S32 n) { return ((U32)n & (U32)(n - 1)) == 0; } /////////////////////////////////////////////////////////////////////////////// // @@ -118,36 +106,35 @@ static U32 is_pow2(S32 n) // fragment and vertex program -// The mac doesn't use extensions for the functions dealing with programs, and the non-extension versions -// take GLuint instead of GLhandle. The mac defines GDrawGLProgram to GLuint before including gdraw_gl_shared.inl -// to account for this. +// The mac doesn't use extensions for the functions dealing with programs, and +// the non-extension versions take GLuint instead of GLhandle. The mac defines +// GDrawGLProgram to GLuint before including gdraw_gl_shared.inl to account for +// this. #ifndef GDrawGLProgram #define GDrawGLProgram GLhandle #endif -typedef struct ProgramWithCachedVariableLocations -{ - GDrawGLProgram program; - GLint vars[2][MAX_VARS]; +typedef struct ProgramWithCachedVariableLocations { + GDrawGLProgram program; + GLint vars[2][MAX_VARS]; } ProgramWithCachedVariableLocations; // render-stack state -typedef struct -{ - GDrawHandle *color_buffer; - GDrawHandle *stencil_depth; - S32 base_x, base_y, width, height; - rrbool cached; +typedef struct { + GDrawHandle* color_buffer; + GDrawHandle* stencil_depth; + S32 base_x, base_y, width, height; + rrbool cached; } GDrawFramebufferState; // texture format description typedef struct { - U8 iggyfmt; // IFT_FORMAT_* - U8 blkx, blky; // compressed block size in pixels (for compressed formats) - U8 blkbytes; // block bytes - GLenum intfmt; // GL internal format - GLenum fmt; // GL_TEXTURE_COMPRESSED for compressed formats! - GLenum type; + U8 iggyfmt; // IFT_FORMAT_* + U8 blkx, blky; // compressed block size in pixels (for compressed formats) + U8 blkbytes; // block bytes + GLenum intfmt; // GL internal format + GLenum fmt; // GL_TEXTURE_COMPRESSED for compressed formats! + GLenum type; } TextureFormatDesc; static GDrawFunctions gdraw_funcs; @@ -163,98 +150,106 @@ static GDrawFunctions gdraw_funcs; // graphics state so that it doesn't have to callback into /G/ // to get at that graphics state. -static struct -{ - S32 multisampling; // number of samples if multisampling (always 0 if no GDRAW_MULTISAMPLING) +static struct { + S32 multisampling; // number of samples if multisampling (always 0 if no + // GDRAW_MULTISAMPLING) - S32 vx,vy; // viewport width/height in pixels - S32 fw,fh; // full width/height of bound rendertarget - S32 tw,th; // actual width/height of current tile - S32 tpw,tph; // width/height of padded version of tile + S32 vx, vy; // viewport width/height in pixels + S32 fw, fh; // full width/height of bound rendertarget + S32 tw, th; // actual width/height of current tile + S32 tpw, tph; // width/height of padded version of tile - // tile origin location (without and with padding) - rrbool tile_enabled; - S32 tx0,ty0; - S32 tx0p,ty0p; + // tile origin location (without and with padding) + rrbool tile_enabled; + S32 tx0, ty0; + S32 tx0p, ty0p; - // if we're in the middle of rendering a blur, certain viewport-related - // functions have to behave differently, so they check this flag - rrbool in_blur; + // if we're in the middle of rendering a blur, certain viewport-related + // functions have to behave differently, so they check this flag + rrbool in_blur; - F32 projection[4]; // scalex, scaley, transx, transy + F32 projection[4]; // scalex, scaley, transx, transy - // conversion from worldspace to viewspace <0,0>.. -- no translation or rotation - F32 world_to_pixel[2]; + // conversion from worldspace to viewspace <0,0>.. -- no translation or + // rotation + F32 world_to_pixel[2]; - // 3d transformation - F32 xform_3d[3][4]; - rrbool use_3d; + // 3d transformation + F32 xform_3d[3][4]; + rrbool use_3d; - // render-state stack for 'temporary' rendering - GDrawFramebufferState frame[MAX_RENDER_STACK_DEPTH]; - GDrawFramebufferState *cur; + // render-state stack for 'temporary' rendering + GDrawFramebufferState frame[MAX_RENDER_STACK_DEPTH]; + GDrawFramebufferState* cur; - // texture and vertex buffer pools - GDrawHandleCache *texturecache; - GDrawHandleCache *vbufcache; + // texture and vertex buffer pools + GDrawHandleCache* texturecache; + GDrawHandleCache* vbufcache; - // GL_EXT_separate_shader_objects isn't sufficiently standard, - // so we have to bind every vertex shader to every fragment shader + // GL_EXT_separate_shader_objects isn't sufficiently standard, + // so we have to bind every vertex shader to every fragment shader - // raw vertex shaders - GLuint vert[GDRAW_vformat__count]; + // raw vertex shaders + GLuint vert[GDRAW_vformat__count]; - // fragment shaders with vertex shaders - ProgramWithCachedVariableLocations fprog[GDRAW_TEXTURE__count][3][3]; // [tex0mode][additive][vformat] - ProgramWithCachedVariableLocations ihud[2]; + // fragment shaders with vertex shaders + ProgramWithCachedVariableLocations + fprog[GDRAW_TEXTURE__count][3][3]; // [tex0mode][additive][vformat] + ProgramWithCachedVariableLocations ihud[2]; - // fragment shaders with fixed-function - ProgramWithCachedVariableLocations exceptional_blend[GDRAW_BLENDSPECIAL__count]; - ProgramWithCachedVariableLocations filter_prog[2][16]; - ProgramWithCachedVariableLocations blur_prog[MAX_TAPS+1]; - ProgramWithCachedVariableLocations colormatrix; - ProgramWithCachedVariableLocations manual_clear; + // fragment shaders with fixed-function + ProgramWithCachedVariableLocations + exceptional_blend[GDRAW_BLENDSPECIAL__count]; + ProgramWithCachedVariableLocations filter_prog[2][16]; + ProgramWithCachedVariableLocations blur_prog[MAX_TAPS + 1]; + ProgramWithCachedVariableLocations colormatrix; + ProgramWithCachedVariableLocations manual_clear; - // render targets + // render targets - // these two lines must be adjacent because of how rendertargets works - GDrawHandleCache rendertargets; - GDrawHandle rendertarget_handles[MAX_RENDER_STACK_DEPTH]; // not -1, because we use +1 to initialize + // these two lines must be adjacent because of how rendertargets works + GDrawHandleCache rendertargets; + GDrawHandle + rendertarget_handles[MAX_RENDER_STACK_DEPTH]; // not -1, because we use + // +1 to initialize - gswf_recti rt_valid[MAX_RENDER_STACK_DEPTH + 1]; - GDrawHandle stencil_depth; + gswf_recti rt_valid[MAX_RENDER_STACK_DEPTH + 1]; + GDrawHandle stencil_depth; - // size of our render targets - S32 frametex_width, frametex_height; + // size of our render targets + S32 frametex_width, frametex_height; - // framebuffer object used for render-to-texture - GLuint framebuffer_stack_object; + // framebuffer object used for render-to-texture + GLuint framebuffer_stack_object; - // framebuffer object used to copy from MSAA renderbuffer to texture - GLuint framebuffer_copy_to_texture; + // framebuffer object used to copy from MSAA renderbuffer to texture + GLuint framebuffer_copy_to_texture; - // framebuffer object used for main screen (set to non-0 to do render to texture) - GLuint main_framebuffer; + // framebuffer object used for main screen (set to non-0 to do render to + // texture) + GLuint main_framebuffer; - // antialias texture - GLuint aa_tex; + // antialias texture + GLuint aa_tex; - // canned quad indices - GLuint quad_ib; + // canned quad indices + GLuint quad_ib; - // texture formats - const TextureFormatDesc *tex_formats; + // texture formats + const TextureFormatDesc* tex_formats; - // caps - U32 has_conditional_non_power_of_two : 1; // non-power-of-2 supported, but only CLAMP_TO_EDGE and can't have mipmaps - U32 has_packed_depth_stencil : 1; - U32 has_depth24 : 1; - U32 has_mapbuffer : 1; - U32 has_texture_max_level : 1; + // caps + U32 has_conditional_non_power_of_two + : 1; // non-power-of-2 supported, but only CLAMP_TO_EDGE and can't have + // mipmaps + U32 has_packed_depth_stencil : 1; + U32 has_depth24 : 1; + U32 has_mapbuffer : 1; + U32 has_texture_max_level : 1; - // fake fence tracking for thrashing detection - U64 frame_counter; -} *gdraw; + // fake fence tracking for thrashing detection + U64 frame_counter; +}* gdraw; //////////////////////////////////////////////////////////////////////// // @@ -262,45 +257,45 @@ static struct // // make a texture with reasonable default state -static void make_texture(GLuint tex) -{ - glBindTexture(GL_TEXTURE_2D, tex); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); +static void make_texture(GLuint tex) { + glBindTexture(GL_TEXTURE_2D, tex); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); } -static void make_rendertarget(GDrawHandle *t, GLuint tex, GLenum int_type, GLenum ext_type, GLenum data_type, S32 w, S32 h, S32 size) -{ - glBindTexture(GL_TEXTURE_2D, tex); - glTexImage2D(GL_TEXTURE_2D, 0, int_type, w, h, 0, ext_type, data_type, NULL); - make_texture(tex); - glBindTexture(GL_TEXTURE_2D, 0); +static void make_rendertarget(GDrawHandle* t, GLuint tex, GLenum int_type, + GLenum ext_type, GLenum data_type, S32 w, S32 h, + S32 size) { + glBindTexture(GL_TEXTURE_2D, tex); + glTexImage2D(GL_TEXTURE_2D, 0, int_type, w, h, 0, ext_type, data_type, + NULL); + make_texture(tex); + glBindTexture(GL_TEXTURE_2D, 0); } -static void api_free_resource(GDrawHandle *r) -{ - if (r->state == GDRAW_HANDLE_STATE_user_owned) - return; +static void api_free_resource(GDrawHandle* r) { + if (r->state == GDRAW_HANDLE_STATE_user_owned) return; - if (!r->cache->is_vertex) { - glDeleteTextures(1, &r->handle.tex.gl); - if (r->handle.tex.gl_renderbuf && r->handle.tex.gl_renderbuf != r->handle.tex.gl) - glDeleteRenderbuffers(1, &r->handle.tex.gl_renderbuf); - } else { - glDeleteBuffers(1, &r->handle.vbuf.base); - glDeleteBuffers(1, &r->handle.vbuf.indices); - } - opengl_check(); + if (!r->cache->is_vertex) { + glDeleteTextures(1, &r->handle.tex.gl); + if (r->handle.tex.gl_renderbuf && + r->handle.tex.gl_renderbuf != r->handle.tex.gl) + glDeleteRenderbuffers(1, &r->handle.tex.gl_renderbuf); + } else { + glDeleteBuffers(1, &r->handle.vbuf.base); + glDeleteBuffers(1, &r->handle.vbuf.indices); + } + opengl_check(); } -static void RADLINK gdraw_UnlockHandles(GDrawStats *gstats) -{ - // since we're not using fences for this implementation, move all textures off the active list - // if you're using fences, this is when the fence needs to actually occur - gdraw_HandleCacheUnlockAll(gdraw->texturecache); - gdraw_HandleCacheUnlockAll(gdraw->vbufcache); +static void RADLINK gdraw_UnlockHandles(GDrawStats* gstats) { + // since we're not using fences for this implementation, move all textures + // off the active list if you're using fences, this is when the fence needs + // to actually occur + gdraw_HandleCacheUnlockAll(gdraw->texturecache); + gdraw_HandleCacheUnlockAll(gdraw->vbufcache); } //////////////////////////////////////////////////////////////////////// @@ -308,218 +303,234 @@ static void RADLINK gdraw_UnlockHandles(GDrawStats *gstats) // Texture creation/updating // -extern GDrawTexture *gdraw_GLx_(WrappedTextureCreate)(S32 gl_texture_handle, S32 width, S32 height, rrbool has_mipmaps) -{ - GDrawStats stats={0}; - GDrawHandle *p = gdraw_res_alloc_begin(gdraw->texturecache, 0, &stats); // it may need to free one item to give us a handle - GLint old; +extern GDrawTexture* gdraw_GLx_(WrappedTextureCreate)(S32 gl_texture_handle, + S32 width, S32 height, + rrbool has_mipmaps) { + GDrawStats stats = {0}; + GDrawHandle* p = gdraw_res_alloc_begin( + gdraw->texturecache, 0, + &stats); // it may need to free one item to give us a handle + GLint old; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &old); - glBindTexture(GL_TEXTURE_2D, gl_texture_handle); - if (has_mipmaps) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glBindTexture(GL_TEXTURE_2D, old); + glGetIntegerv(GL_TEXTURE_BINDING_2D, &old); + glBindTexture(GL_TEXTURE_2D, gl_texture_handle); + if (has_mipmaps) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_LINEAR_MIPMAP_LINEAR); + else + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glBindTexture(GL_TEXTURE_2D, old); - p->bytes = 0; - p->handle.tex.gl = gl_texture_handle; - p->handle.tex.w = width; - p->handle.tex.h = height; - p->handle.tex.nonpow2 = !(is_pow2(width) && is_pow2(height)); - gdraw_HandleCacheAllocateEnd(p, 0, NULL, GDRAW_HANDLE_STATE_user_owned); - return (GDrawTexture *) p; + p->bytes = 0; + p->handle.tex.gl = gl_texture_handle; + p->handle.tex.w = width; + p->handle.tex.h = height; + p->handle.tex.nonpow2 = !(is_pow2(width) && is_pow2(height)); + gdraw_HandleCacheAllocateEnd(p, 0, NULL, GDRAW_HANDLE_STATE_user_owned); + return (GDrawTexture*)p; } -extern void gdraw_GLx_(WrappedTextureChange)(GDrawTexture *tex, S32 new_gl_texture_handle, S32 new_width, S32 new_height, rrbool has_mipmaps) -{ - GDrawHandle *p = (GDrawHandle *) tex; - GLint old; +extern void gdraw_GLx_(WrappedTextureChange)(GDrawTexture* tex, + S32 new_gl_texture_handle, + S32 new_width, S32 new_height, + rrbool has_mipmaps) { + GDrawHandle* p = (GDrawHandle*)tex; + GLint old; - glGetIntegerv(GL_TEXTURE_BINDING_2D, &old); - glBindTexture(GL_TEXTURE_2D, new_gl_texture_handle); - if (has_mipmaps) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glBindTexture(GL_TEXTURE_2D, old); + glGetIntegerv(GL_TEXTURE_BINDING_2D, &old); + glBindTexture(GL_TEXTURE_2D, new_gl_texture_handle); + if (has_mipmaps) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_LINEAR_MIPMAP_LINEAR); + else + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glBindTexture(GL_TEXTURE_2D, old); - p->handle.tex.gl = new_gl_texture_handle; - p->handle.tex.w = new_width; - p->handle.tex.h = new_height; - p->handle.tex.nonpow2 = !(is_pow2(new_width) && is_pow2(new_height)); + p->handle.tex.gl = new_gl_texture_handle; + p->handle.tex.w = new_width; + p->handle.tex.h = new_height; + p->handle.tex.nonpow2 = !(is_pow2(new_width) && is_pow2(new_height)); } -extern void gdraw_GLx_(WrappedTextureDestroy)(GDrawTexture *tex) -{ - GDrawStats stats={0}; - gdraw_res_free((GDrawHandle *) tex, &stats); +extern void gdraw_GLx_(WrappedTextureDestroy)(GDrawTexture* tex) { + GDrawStats stats = {0}; + gdraw_res_free((GDrawHandle*)tex, &stats); } -static void RADLINK gdraw_SetTextureUniqueID(GDrawTexture *tex, void *old_id, void *new_id) -{ - GDrawHandle *p = (GDrawHandle *) tex; - // if this is still the handle it's thought to be, change the owner; - // if the owner *doesn't* match, then they're changing a stale handle, so ignore - if (p->owner == old_id) - p->owner = new_id; +static void RADLINK gdraw_SetTextureUniqueID(GDrawTexture* tex, void* old_id, + void* new_id) { + GDrawHandle* p = (GDrawHandle*)tex; + // if this is still the handle it's thought to be, change the owner; + // if the owner *doesn't* match, then they're changing a stale handle, so + // ignore + if (p->owner == old_id) p->owner = new_id; } -static rrbool RADLINK gdraw_MakeTextureBegin(void *owner, S32 width, S32 height, gdraw_texture_format format, U32 flags, GDraw_MakeTexture_ProcessingInfo *p, GDrawStats *gstats) -{ - S32 size=0, asize, stride; - GDrawHandle *t = NULL; - opengl_check(); +static rrbool RADLINK gdraw_MakeTextureBegin( + void* owner, S32 width, S32 height, gdraw_texture_format format, U32 flags, + GDraw_MakeTexture_ProcessingInfo* p, GDrawStats* gstats) { + S32 size = 0, asize, stride; + GDrawHandle* t = NULL; + opengl_check(); - stride = width; - if (format == GDRAW_TEXTURE_FORMAT_rgba32) stride *= 4; - size = stride*height; + stride = width; + if (format == GDRAW_TEXTURE_FORMAT_rgba32) stride *= 4; + size = stride * height; - asize = size; - if (flags & GDRAW_MAKETEXTURE_FLAGS_mipmap) asize = asize*4/3; + asize = size; + if (flags & GDRAW_MAKETEXTURE_FLAGS_mipmap) asize = asize * 4 / 3; - t = gdraw_res_alloc_begin(gdraw->texturecache, asize, gstats); - if (!t) - return IGGY_RESULT_Error_GDraw; + t = gdraw_res_alloc_begin(gdraw->texturecache, asize, gstats); + if (!t) return IGGY_RESULT_Error_GDraw; - glGenTextures(1, &t->handle.tex.gl); + glGenTextures(1, &t->handle.tex.gl); - p->texture_data = IggyGDrawMalloc(size); - if (!p->texture_data) { - gdraw_HandleCacheAllocateFail(t); - IggyGDrawSendWarning(NULL, "GDraw malloc for texture data failed"); - return false; - } - - t->handle.tex.w = width; - t->handle.tex.h = height; - t->handle.tex.nonpow2 = !(is_pow2(width) && is_pow2(height)); + p->texture_data = IggyGDrawMalloc(size); + if (!p->texture_data) { + gdraw_HandleCacheAllocateFail(t); + IggyGDrawSendWarning(NULL, "GDraw malloc for texture data failed"); + return false; + } - p->num_rows = height; - p->p0 = t; - p->p1 = owner; - p->stride_in_bytes = stride; - p->texture_type = GDRAW_TEXTURE_TYPE_rgba; - p->i0 = format; - p->i1 = flags; - p->i2 = width; - p->i3 = height; - p->i4 = asize; - opengl_check(); - return true; + t->handle.tex.w = width; + t->handle.tex.h = height; + t->handle.tex.nonpow2 = !(is_pow2(width) && is_pow2(height)); + + p->num_rows = height; + p->p0 = t; + p->p1 = owner; + p->stride_in_bytes = stride; + p->texture_type = GDRAW_TEXTURE_TYPE_rgba; + p->i0 = format; + p->i1 = flags; + p->i2 = width; + p->i3 = height; + p->i4 = asize; + opengl_check(); + return true; } -static GDrawTexture * RADLINK gdraw_MakeTextureEnd(GDraw_MakeTexture_ProcessingInfo *p, GDrawStats *stats) -{ - gdraw_texture_format format = (gdraw_texture_format) p->i0; - S32 flags = p->i1; - rrbool mipmap = (flags & GDRAW_MAKETEXTURE_FLAGS_mipmap) != 0; - S32 width = p->i2, height = p->i3; - GLuint z,e; - GDrawHandle *t = (GDrawHandle *) p->p0; +static GDrawTexture* RADLINK +gdraw_MakeTextureEnd(GDraw_MakeTexture_ProcessingInfo* p, GDrawStats* stats) { + gdraw_texture_format format = (gdraw_texture_format)p->i0; + S32 flags = p->i1; + rrbool mipmap = (flags & GDRAW_MAKETEXTURE_FLAGS_mipmap) != 0; + S32 width = p->i2, height = p->i3; + GLuint z, e; + GDrawHandle* t = (GDrawHandle*)p->p0; - z = t->handle.tex.gl; - assert(z != 0); + z = t->handle.tex.gl; + assert(z != 0); - make_texture(z); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + make_texture(z); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - if (format == GDRAW_TEXTURE_FORMAT_font) - glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, p->texture_data); - else - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, p->texture_data); - e = glGetError(); - break_on_err(e); + if (format == GDRAW_TEXTURE_FORMAT_font) + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, + GL_UNSIGNED_BYTE, p->texture_data); + else + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, + GL_UNSIGNED_BYTE, p->texture_data); + e = glGetError(); + break_on_err(e); - if (mipmap) - glGenerateMipmap(GL_TEXTURE_2D); - if (!e) e = glGetError(); + if (mipmap) glGenerateMipmap(GL_TEXTURE_2D); + if (!e) e = glGetError(); - if (e != 0) { - gdraw_HandleCacheAllocateFail(t); - IggyGDrawSendWarning(NULL, "GDraw OpenGL error creating texture"); - eat_gl_err(); - return NULL; - } else { - gdraw_HandleCacheAllocateEnd(t, p->i4, p->p1, (flags & GDRAW_MAKETEXTURE_FLAGS_never_flush) ? GDRAW_HANDLE_STATE_pinned : GDRAW_HANDLE_STATE_locked); - stats->nonzero_flags |= GDRAW_STATS_alloc_tex; - stats->alloc_tex += 1; - stats->alloc_tex_bytes += p->i4; - } + if (e != 0) { + gdraw_HandleCacheAllocateFail(t); + IggyGDrawSendWarning(NULL, "GDraw OpenGL error creating texture"); + eat_gl_err(); + return NULL; + } else { + gdraw_HandleCacheAllocateEnd( + t, p->i4, p->p1, + (flags & GDRAW_MAKETEXTURE_FLAGS_never_flush) + ? GDRAW_HANDLE_STATE_pinned + : GDRAW_HANDLE_STATE_locked); + stats->nonzero_flags |= GDRAW_STATS_alloc_tex; + stats->alloc_tex += 1; + stats->alloc_tex_bytes += p->i4; + } - // default wrap mode is clamp to edge - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + // default wrap mode is clamp to edge + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - if (mipmap) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + if (mipmap) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_LINEAR_MIPMAP_LINEAR); + else + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - IggyGDrawFree(p->texture_data); + IggyGDrawFree(p->texture_data); - opengl_check(); - return (GDrawTexture *) t; + opengl_check(); + return (GDrawTexture*)t; } -static rrbool RADLINK gdraw_UpdateTextureBegin(GDrawTexture *tex, void *unique_id, GDrawStats *stats) -{ - RR_UNUSED_VARIABLE(stats); - return gdraw_HandleCacheLock((GDrawHandle *) tex, unique_id); +static rrbool RADLINK gdraw_UpdateTextureBegin(GDrawTexture* tex, + void* unique_id, + GDrawStats* stats) { + RR_UNUSED_VARIABLE(stats); + return gdraw_HandleCacheLock((GDrawHandle*)tex, unique_id); } -static void RADLINK gdraw_UpdateTextureRect(GDrawTexture *tex, void *unique_id, S32 x, S32 y, S32 stride, S32 w, S32 h, U8 *data, gdraw_texture_format format) -{ - glBindTexture(GL_TEXTURE_2D, ((GDrawHandle *) tex)->handle.tex.gl); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - // @TODO: use 'stride' - glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, (format == GDRAW_TEXTURE_FORMAT_font) ? GL_ALPHA : GL_RGBA, GL_UNSIGNED_BYTE, data); - opengl_check(); +static void RADLINK gdraw_UpdateTextureRect(GDrawTexture* tex, void* unique_id, + S32 x, S32 y, S32 stride, S32 w, + S32 h, U8* data, + gdraw_texture_format format) { + glBindTexture(GL_TEXTURE_2D, ((GDrawHandle*)tex)->handle.tex.gl); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + // @TODO: use 'stride' + glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, + (format == GDRAW_TEXTURE_FORMAT_font) ? GL_ALPHA : GL_RGBA, + GL_UNSIGNED_BYTE, data); + opengl_check(); } -static void RADLINK gdraw_UpdateTextureEnd(GDrawTexture *tex, void *unique_id, GDrawStats *stats) -{ - gdraw_HandleCacheUnlock((GDrawHandle *) tex); +static void RADLINK gdraw_UpdateTextureEnd(GDrawTexture* tex, void* unique_id, + GDrawStats* stats) { + gdraw_HandleCacheUnlock((GDrawHandle*)tex); } -static void RADLINK gdraw_FreeTexture(GDrawTexture *tt, void *unique_id, GDrawStats *gstats) -{ - GDrawHandle *t = (GDrawHandle *) tt; - assert(t != NULL); - if (t->owner == unique_id || unique_id == NULL) { - if (t->cache == &gdraw->rendertargets) { - gdraw_HandleCacheUnlock(t); - // cache it by simply not freeing it - return; - } +static void RADLINK gdraw_FreeTexture(GDrawTexture* tt, void* unique_id, + GDrawStats* gstats) { + GDrawHandle* t = (GDrawHandle*)tt; + assert(t != NULL); + if (t->owner == unique_id || unique_id == NULL) { + if (t->cache == &gdraw->rendertargets) { + gdraw_HandleCacheUnlock(t); + // cache it by simply not freeing it + return; + } - gdraw_res_free(t, gstats); - } + gdraw_res_free(t, gstats); + } } -static rrbool RADLINK gdraw_TryToLockTexture(GDrawTexture *t, void *unique_id, GDrawStats *gstats) -{ - RR_UNUSED_VARIABLE(gstats); - return gdraw_HandleCacheLock((GDrawHandle *) t, unique_id); +static rrbool RADLINK gdraw_TryToLockTexture(GDrawTexture* t, void* unique_id, + GDrawStats* gstats) { + RR_UNUSED_VARIABLE(gstats); + return gdraw_HandleCacheLock((GDrawHandle*)t, unique_id); } -static void RADLINK gdraw_DescribeTexture(GDrawTexture *tex, GDraw_Texture_Description *desc) -{ - GDrawHandle *p = (GDrawHandle *) tex; - desc->width = p->handle.tex.w; - desc->height = p->handle.tex.h; - desc->size_in_bytes = p->bytes; +static void RADLINK gdraw_DescribeTexture(GDrawTexture* tex, + GDraw_Texture_Description* desc) { + GDrawHandle* p = (GDrawHandle*)tex; + desc->width = p->handle.tex.w; + desc->height = p->handle.tex.h; + desc->size_in_bytes = p->bytes; } -static void RADLINK gdraw_SetAntialiasTexture(S32 width, U8 *rgba) -{ - if (!gdraw->aa_tex) - glGenTextures(1, &gdraw->aa_tex); +static void RADLINK gdraw_SetAntialiasTexture(S32 width, U8* rgba) { + if (!gdraw->aa_tex) glGenTextures(1, &gdraw->aa_tex); - make_texture(gdraw->aa_tex); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, rgba); - opengl_check(); + make_texture(gdraw->aa_tex); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, 1, 0, GL_RGBA, + GL_UNSIGNED_BYTE, rgba); + opengl_check(); } //////////////////////////////////////////////////////////////////////// @@ -527,125 +538,131 @@ static void RADLINK gdraw_SetAntialiasTexture(S32 width, U8 *rgba) // Vertex buffer creation/deletion // -static rrbool RADLINK gdraw_MakeVertexBufferBegin(void *unique_id, gdraw_vformat vformat, S32 vbuf_size, S32 ibuf_size, GDraw_MakeVertexBuffer_ProcessingInfo *p, GDrawStats *gstats) -{ - GLuint e; - GDrawHandle *vb; - opengl_check(); - vb = gdraw_res_alloc_begin(gdraw->vbufcache, vbuf_size + ibuf_size, gstats); - if (!vb) { - IggyGDrawSendWarning(NULL, "GDraw out of vertex buffer memory"); - return false; - } +static rrbool RADLINK gdraw_MakeVertexBufferBegin( + void* unique_id, gdraw_vformat vformat, S32 vbuf_size, S32 ibuf_size, + GDraw_MakeVertexBuffer_ProcessingInfo* p, GDrawStats* gstats) { + GLuint e; + GDrawHandle* vb; + opengl_check(); + vb = gdraw_res_alloc_begin(gdraw->vbufcache, vbuf_size + ibuf_size, gstats); + if (!vb) { + IggyGDrawSendWarning(NULL, "GDraw out of vertex buffer memory"); + return false; + } - e = glGetError(); - vb->handle.vbuf.base = 0; - vb->handle.vbuf.indices = 0; - glGenBuffers(1, &vb->handle.vbuf.base); - glGenBuffers(1, &vb->handle.vbuf.indices); - glBindBuffer(GL_ARRAY_BUFFER, vb->handle.vbuf.base); - glBufferData(GL_ARRAY_BUFFER, vbuf_size, NULL, GL_STATIC_DRAW); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vb->handle.vbuf.indices); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, ibuf_size, NULL, GL_STATIC_DRAW); - if (!e) e = glGetError(); - if (e != GL_NO_ERROR) { - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - glDeleteBuffers(1, &vb->handle.vbuf.base); - glDeleteBuffers(1, &vb->handle.vbuf.indices); - gdraw_HandleCacheAllocateFail(vb); - eat_gl_err(); - IggyGDrawSendWarning(NULL, "GDraw OpenGL vertex buffer creation failed"); - return false; - } + e = glGetError(); + vb->handle.vbuf.base = 0; + vb->handle.vbuf.indices = 0; + glGenBuffers(1, &vb->handle.vbuf.base); + glGenBuffers(1, &vb->handle.vbuf.indices); + glBindBuffer(GL_ARRAY_BUFFER, vb->handle.vbuf.base); + glBufferData(GL_ARRAY_BUFFER, vbuf_size, NULL, GL_STATIC_DRAW); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vb->handle.vbuf.indices); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, ibuf_size, NULL, GL_STATIC_DRAW); + if (!e) e = glGetError(); + if (e != GL_NO_ERROR) { + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + glDeleteBuffers(1, &vb->handle.vbuf.base); + glDeleteBuffers(1, &vb->handle.vbuf.indices); + gdraw_HandleCacheAllocateFail(vb); + eat_gl_err(); + IggyGDrawSendWarning(NULL, + "GDraw OpenGL vertex buffer creation failed"); + return false; + } - p->i0 = vbuf_size; - p->i1 = ibuf_size; - p->p0 = vb; - p->p1 = unique_id; - - if (!gdraw->has_mapbuffer) { - p->vertex_data = IggyGDrawMalloc(vbuf_size); - p->vertex_data_length = vbuf_size; - p->index_data = IggyGDrawMalloc(ibuf_size); - p->index_data_length = ibuf_size; + p->i0 = vbuf_size; + p->i1 = ibuf_size; + p->p0 = vb; + p->p1 = unique_id; - // check for out of memory conditions - if (!p->vertex_data || !p->index_data) { - if (p->vertex_data) IggyGDrawFree(p->vertex_data); - if (p->index_data) IggyGDrawFree(p->index_data); - IggyGDrawSendWarning(NULL, "GDraw malloc for vertex buffer temporary memory failed"); - return false; - } - } else { - p->vertex_data = (U8 *)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); - p->vertex_data_length = vbuf_size; + if (!gdraw->has_mapbuffer) { + p->vertex_data = IggyGDrawMalloc(vbuf_size); + p->vertex_data_length = vbuf_size; + p->index_data = IggyGDrawMalloc(ibuf_size); + p->index_data_length = ibuf_size; - p->index_data = (U8 *)glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); - p->index_data_length = ibuf_size; - } + // check for out of memory conditions + if (!p->vertex_data || !p->index_data) { + if (p->vertex_data) IggyGDrawFree(p->vertex_data); + if (p->index_data) IggyGDrawFree(p->index_data); + IggyGDrawSendWarning( + NULL, "GDraw malloc for vertex buffer temporary memory failed"); + return false; + } + } else { + p->vertex_data = (U8*)glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); + p->vertex_data_length = vbuf_size; - opengl_check(); - return true; + p->index_data = + (U8*)glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); + p->index_data_length = ibuf_size; + } + + opengl_check(); + return true; } -static rrbool RADLINK gdraw_MakeVertexBufferMore(GDraw_MakeVertexBuffer_ProcessingInfo *p) -{ - assert(0); - return false; +static rrbool RADLINK +gdraw_MakeVertexBufferMore(GDraw_MakeVertexBuffer_ProcessingInfo* p) { + assert(0); + return false; } -static GDrawVertexBuffer * RADLINK gdraw_MakeVertexBufferEnd(GDraw_MakeVertexBuffer_ProcessingInfo *p, GDrawStats *stats) -{ - GDrawHandle *vb = (GDrawHandle *) p->p0; - rrbool ok = true; - GLuint e; +static GDrawVertexBuffer* RADLINK gdraw_MakeVertexBufferEnd( + GDraw_MakeVertexBuffer_ProcessingInfo* p, GDrawStats* stats) { + GDrawHandle* vb = (GDrawHandle*)p->p0; + rrbool ok = true; + GLuint e; - if (!gdraw->has_mapbuffer) { - glBufferData(GL_ARRAY_BUFFER, p->i0, p->vertex_data, GL_STATIC_DRAW); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, p->i1, p->index_data, GL_STATIC_DRAW); - IggyGDrawFree(p->vertex_data); - IggyGDrawFree(p->index_data); - } else { - if (!glUnmapBuffer(GL_ARRAY_BUFFER)) ok = false; - if (!glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER)) ok = false; - } + if (!gdraw->has_mapbuffer) { + glBufferData(GL_ARRAY_BUFFER, p->i0, p->vertex_data, GL_STATIC_DRAW); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, p->i1, p->index_data, + GL_STATIC_DRAW); + IggyGDrawFree(p->vertex_data); + IggyGDrawFree(p->index_data); + } else { + if (!glUnmapBuffer(GL_ARRAY_BUFFER)) ok = false; + if (!glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER)) ok = false; + } - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - e = glGetError(); - if (!ok || e != GL_NO_ERROR) { - glDeleteBuffers(1, &vb->handle.vbuf.base); - glDeleteBuffers(1, &vb->handle.vbuf.indices); - gdraw_HandleCacheAllocateFail(vb); - eat_gl_err(); - return NULL; - } else - gdraw_HandleCacheAllocateEnd(vb, p->i0 + p->i1, p->p1, GDRAW_HANDLE_STATE_locked); + e = glGetError(); + if (!ok || e != GL_NO_ERROR) { + glDeleteBuffers(1, &vb->handle.vbuf.base); + glDeleteBuffers(1, &vb->handle.vbuf.indices); + gdraw_HandleCacheAllocateFail(vb); + eat_gl_err(); + return NULL; + } else + gdraw_HandleCacheAllocateEnd(vb, p->i0 + p->i1, p->p1, + GDRAW_HANDLE_STATE_locked); - opengl_check(); - return (GDrawVertexBuffer *) vb; + opengl_check(); + return (GDrawVertexBuffer*)vb; } -static rrbool RADLINK gdraw_TryToLockVertexBuffer(GDrawVertexBuffer *vb, void *unique_id, GDrawStats *stats) -{ - RR_UNUSED_VARIABLE(stats); - return gdraw_HandleCacheLock((GDrawHandle *) vb, unique_id); +static rrbool RADLINK gdraw_TryToLockVertexBuffer(GDrawVertexBuffer* vb, + void* unique_id, + GDrawStats* stats) { + RR_UNUSED_VARIABLE(stats); + return gdraw_HandleCacheLock((GDrawHandle*)vb, unique_id); } -static void RADLINK gdraw_FreeVertexBuffer(GDrawVertexBuffer *vb, void *unique_id, GDrawStats *stats) -{ - GDrawHandle *h = (GDrawHandle *) vb; - assert(h != NULL); - if (h->owner == unique_id) - gdraw_res_free(h, stats); +static void RADLINK gdraw_FreeVertexBuffer(GDrawVertexBuffer* vb, + void* unique_id, GDrawStats* stats) { + GDrawHandle* h = (GDrawHandle*)vb; + assert(h != NULL); + if (h->owner == unique_id) gdraw_res_free(h, stats); } -static void RADLINK gdraw_DescribeVertexBuffer(GDrawVertexBuffer *vbuf, GDraw_VertexBuffer_Description *desc) -{ - GDrawHandle *p = (GDrawHandle *) vbuf; - desc->size_in_bytes = p->bytes; +static void RADLINK gdraw_DescribeVertexBuffer( + GDrawVertexBuffer* vbuf, GDraw_VertexBuffer_Description* desc) { + GDrawHandle* p = (GDrawHandle*)vbuf; + desc->size_in_bytes = p->bytes; } //////////////////////////////////////////////////////////////////////// @@ -654,228 +671,262 @@ static void RADLINK gdraw_DescribeVertexBuffer(GDrawVertexBuffer *vbuf, GDraw_Ve // #ifdef __linux__ -typedef struct -{ - S32 free_count; - S32 live_count; - S32 locked_count; - S32 dead_count; - S32 pinned_count; - S32 user_owned_count; - S32 alloc_count; +typedef struct { + S32 free_count; + S32 live_count; + S32 locked_count; + S32 dead_count; + S32 pinned_count; + S32 user_owned_count; + S32 alloc_count; } GDrawHandleStateCounts; -enum -{ - GDRAW_RT_DIAG_color_memory = 1 << 0, - GDRAW_RT_DIAG_color_handles = 1 << 1, - GDRAW_RT_DIAG_cache_bitmap = 1 << 2, - GDRAW_RT_DIAG_stack_depth = 1 << 3, - GDRAW_RT_DIAG_empty_request = 1 << 4, +enum { + GDRAW_RT_DIAG_color_memory = 1 << 0, + GDRAW_RT_DIAG_color_handles = 1 << 1, + GDRAW_RT_DIAG_cache_bitmap = 1 << 2, + GDRAW_RT_DIAG_stack_depth = 1 << 3, + GDRAW_RT_DIAG_empty_request = 1 << 4, }; static U32 gdraw_rt_diag_emitted = 0; -static void gdraw_CountHandleStates(GDrawHandleCache *cache, - GDrawHandleStateCounts *counts) -{ - S32 i; - counts->free_count = 0; - counts->live_count = 0; - counts->locked_count = 0; - counts->dead_count = 0; - counts->pinned_count = 0; - counts->user_owned_count = 0; - counts->alloc_count = 0; +static void gdraw_CountHandleStates(GDrawHandleCache* cache, + GDrawHandleStateCounts* counts) { + S32 i; + counts->free_count = 0; + counts->live_count = 0; + counts->locked_count = 0; + counts->dead_count = 0; + counts->pinned_count = 0; + counts->user_owned_count = 0; + counts->alloc_count = 0; - if (!cache) - return; + if (!cache) return; - for (i = 0; i < cache->max_handles; ++i) { - switch (cache->handle[i].state) { - case GDRAW_HANDLE_STATE_free: ++counts->free_count; break; - case GDRAW_HANDLE_STATE_live: ++counts->live_count; break; - case GDRAW_HANDLE_STATE_locked: ++counts->locked_count; break; - case GDRAW_HANDLE_STATE_dead: ++counts->dead_count; break; - case GDRAW_HANDLE_STATE_pinned: ++counts->pinned_count; break; - case GDRAW_HANDLE_STATE_user_owned: ++counts->user_owned_count; break; - case GDRAW_HANDLE_STATE_alloc: ++counts->alloc_count; break; - default: break; - } - } + for (i = 0; i < cache->max_handles; ++i) { + switch (cache->handle[i].state) { + case GDRAW_HANDLE_STATE_free: + ++counts->free_count; + break; + case GDRAW_HANDLE_STATE_live: + ++counts->live_count; + break; + case GDRAW_HANDLE_STATE_locked: + ++counts->locked_count; + break; + case GDRAW_HANDLE_STATE_dead: + ++counts->dead_count; + break; + case GDRAW_HANDLE_STATE_pinned: + ++counts->pinned_count; + break; + case GDRAW_HANDLE_STATE_user_owned: + ++counts->user_owned_count; + break; + case GDRAW_HANDLE_STATE_alloc: + ++counts->alloc_count; + break; + default: + break; + } + } } -static void gdraw_ReportHandleCacheDiag(char const *label, - GDrawHandleCache *cache, - U32 once_bit, - S32 req_w, - S32 req_h) -{ - GDrawHandleStateCounts counts; +static void gdraw_ReportHandleCacheDiag(char const* label, + GDrawHandleCache* cache, U32 once_bit, + S32 req_w, S32 req_h) { + GDrawHandleStateCounts counts; - if (gdraw_rt_diag_emitted & once_bit) - return; - gdraw_rt_diag_emitted |= once_bit; + if (gdraw_rt_diag_emitted & once_bit) return; + gdraw_rt_diag_emitted |= once_bit; - gdraw_CountHandleStates(cache, &counts); - IggyGDrawSendWarning(NULL, - "GDraw[%s] diag: frame=%dx%d tile=%dx%d padded=%dx%d req=%dx%d depth=%d bytes_free=%d total_bytes=%d handles free=%d live=%d locked=%d dead=%d pinned=%d user=%d alloc=%d", - label, - gdraw->frametex_width, gdraw->frametex_height, - gdraw->tw, gdraw->th, - gdraw->tpw, gdraw->tph, - req_w, req_h, - (int) (gdraw->cur - gdraw->frame), - cache ? cache->bytes_free : 0, - cache ? cache->total_bytes : 0, - counts.free_count, counts.live_count, counts.locked_count, - counts.dead_count, counts.pinned_count, counts.user_owned_count, - counts.alloc_count); + gdraw_CountHandleStates(cache, &counts); + IggyGDrawSendWarning( + NULL, + "GDraw[%s] diag: frame=%dx%d tile=%dx%d padded=%dx%d req=%dx%d " + "depth=%d bytes_free=%d total_bytes=%d handles free=%d live=%d " + "locked=%d dead=%d pinned=%d user=%d alloc=%d", + label, gdraw->frametex_width, gdraw->frametex_height, gdraw->tw, + gdraw->th, gdraw->tpw, gdraw->tph, req_w, req_h, + (int)(gdraw->cur - gdraw->frame), cache ? cache->bytes_free : 0, + cache ? cache->total_bytes : 0, counts.free_count, counts.live_count, + counts.locked_count, counts.dead_count, counts.pinned_count, + counts.user_owned_count, counts.alloc_count); } #else #define gdraw_ReportHandleCacheDiag(label, cache, once_bit, req_w, req_h) \ - ((void) 0) + ((void)0) #endif -static GDrawHandle *get_rendertarget_texture(int width, int height, void *owner, GDrawStats *gstats) -{ - S32 size; - GDrawHandle *t; - opengl_check(); - t = gdraw_HandleCacheGetLRU(&gdraw->rendertargets); - if (t) { - gdraw_HandleCacheLock(t, (void *) (UINTa) 1); - return t; - } +static GDrawHandle* get_rendertarget_texture(int width, int height, void* owner, + GDrawStats* gstats) { + S32 size; + GDrawHandle* t; + opengl_check(); + t = gdraw_HandleCacheGetLRU(&gdraw->rendertargets); + if (t) { + gdraw_HandleCacheLock(t, (void*)(UINTa)1); + return t; + } - size = gdraw->frametex_width * gdraw->frametex_height * 4; - t = gdraw_res_alloc_begin(gdraw->texturecache, size, gstats); - if (!t) return t; + size = gdraw->frametex_width * gdraw->frametex_height * 4; + t = gdraw_res_alloc_begin(gdraw->texturecache, size, gstats); + if (!t) return t; - glGenTextures(1, &t->handle.tex.gl); - make_rendertarget(t, t->handle.tex.gl, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, width, height, 4); - t->handle.tex.w = gdraw->frametex_width; - t->handle.tex.h = gdraw->frametex_height; - t->handle.tex.nonpow2 = 1; // assume all rendertargets are non-pow2 for consistency - gstats->nonzero_flags |= GDRAW_STATS_alloc_tex; - gstats->alloc_tex += 1; - gstats->alloc_tex_bytes += size; - opengl_check(); - gdraw_HandleCacheAllocateEnd(t, size, owner, GDRAW_HANDLE_STATE_locked); + glGenTextures(1, &t->handle.tex.gl); + make_rendertarget(t, t->handle.tex.gl, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, + width, height, 4); + t->handle.tex.w = gdraw->frametex_width; + t->handle.tex.h = gdraw->frametex_height; + t->handle.tex.nonpow2 = + 1; // assume all rendertargets are non-pow2 for consistency + gstats->nonzero_flags |= GDRAW_STATS_alloc_tex; + gstats->alloc_tex += 1; + gstats->alloc_tex_bytes += size; + opengl_check(); + gdraw_HandleCacheAllocateEnd(t, size, owner, GDRAW_HANDLE_STATE_locked); - return t; + return t; } -static GDrawHandle *get_color_rendertarget(GDrawStats *gstats) -{ - S32 size; - GDrawHandle *t; - opengl_check(); - t = gdraw_HandleCacheGetLRU(&gdraw->rendertargets); - if (t) { - gdraw_HandleCacheLock(t, (void *) (UINTa) 1); - return t; - } +static GDrawHandle* get_color_rendertarget(GDrawStats* gstats) { + S32 size; + GDrawHandle* t; + opengl_check(); + t = gdraw_HandleCacheGetLRU(&gdraw->rendertargets); + if (t) { + gdraw_HandleCacheLock(t, (void*)(UINTa)1); + return t; + } - // ran out of RTs, allocate a new one - size = gdraw->frametex_width * gdraw->frametex_height * 4; - if (gdraw->rendertargets.bytes_free < size) { - gdraw_ReportHandleCacheDiag("rt-color-memory", &gdraw->rendertargets, - GDRAW_RT_DIAG_color_memory, gdraw->tpw, gdraw->tph); - IggyGDrawSendWarning(NULL, "GDraw[rt-color] exceeded available rendertarget memory"); - return NULL; - } + // ran out of RTs, allocate a new one + size = gdraw->frametex_width * gdraw->frametex_height * 4; + if (gdraw->rendertargets.bytes_free < size) { + gdraw_ReportHandleCacheDiag("rt-color-memory", &gdraw->rendertargets, + GDRAW_RT_DIAG_color_memory, gdraw->tpw, + gdraw->tph); + IggyGDrawSendWarning( + NULL, "GDraw[rt-color] exceeded available rendertarget memory"); + return NULL; + } - t = gdraw_HandleCacheAllocateBegin(&gdraw->rendertargets); - if (!t) { - gdraw_ReportHandleCacheDiag("rt-color-handles", &gdraw->rendertargets, - GDRAW_RT_DIAG_color_handles, gdraw->tpw, gdraw->tph); - IggyGDrawSendWarning(NULL, "GDraw[rt-color] exceeded available rendertarget handles"); - return t; - } + t = gdraw_HandleCacheAllocateBegin(&gdraw->rendertargets); + if (!t) { + gdraw_ReportHandleCacheDiag("rt-color-handles", &gdraw->rendertargets, + GDRAW_RT_DIAG_color_handles, gdraw->tpw, + gdraw->tph); + IggyGDrawSendWarning( + NULL, "GDraw[rt-color] exceeded available rendertarget handles"); + return t; + } - glGenTextures(1, &t->handle.tex.gl); - make_rendertarget(t, t->handle.tex.gl, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, gdraw->frametex_width,gdraw->frametex_height, 4); - t->handle.tex.w = gdraw->frametex_width; - t->handle.tex.h = gdraw->frametex_height; - t->handle.tex.nonpow2 = 1; // assume all rendertargets are non-pow2 for consistency + glGenTextures(1, &t->handle.tex.gl); + make_rendertarget(t, t->handle.tex.gl, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, + gdraw->frametex_width, gdraw->frametex_height, 4); + t->handle.tex.w = gdraw->frametex_width; + t->handle.tex.h = gdraw->frametex_height; + t->handle.tex.nonpow2 = + 1; // assume all rendertargets are non-pow2 for consistency #ifdef GDRAW_MULTISAMPLING - if (gdraw->multisampling) { - glGenRenderbuffers(1, &t->handle.tex.gl_renderbuf); - glBindRenderbuffer(GL_RENDERBUFFER, t->handle.tex.gl_renderbuf); - glRenderbufferStorageMultisample(GL_RENDERBUFFER, gdraw->multisampling, GL_RGBA, gdraw->frametex_width, gdraw->frametex_height); - glBindRenderbuffer(GL_RENDERBUFFER, 0); - } + if (gdraw->multisampling) { + glGenRenderbuffers(1, &t->handle.tex.gl_renderbuf); + glBindRenderbuffer(GL_RENDERBUFFER, t->handle.tex.gl_renderbuf); + glRenderbufferStorageMultisample(GL_RENDERBUFFER, gdraw->multisampling, + GL_RGBA, gdraw->frametex_width, + gdraw->frametex_height); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } #endif - opengl_check(); + opengl_check(); - gdraw_HandleCacheAllocateEnd(t, size, (void *) (UINTa) 1, GDRAW_HANDLE_STATE_locked); - gstats->nonzero_flags |= GDRAW_STATS_alloc_tex; - gstats->alloc_tex += gdraw->multisampling ? 2 : 1; - gstats->alloc_tex_bytes += (1 + gdraw->multisampling) * size; + gdraw_HandleCacheAllocateEnd(t, size, (void*)(UINTa)1, + GDRAW_HANDLE_STATE_locked); + gstats->nonzero_flags |= GDRAW_STATS_alloc_tex; + gstats->alloc_tex += gdraw->multisampling ? 2 : 1; + gstats->alloc_tex_bytes += (1 + gdraw->multisampling) * size; - return t; + return t; } -static GDrawHandle *get_depthstencil_renderbuffer(GDrawStats *gstats) -{ - if (!gdraw->stencil_depth.handle.tex.gl) { - gstats->nonzero_flags |= GDRAW_STATS_alloc_tex; - gstats->alloc_tex += 1; +static GDrawHandle* get_depthstencil_renderbuffer(GDrawStats* gstats) { + if (!gdraw->stencil_depth.handle.tex.gl) { + gstats->nonzero_flags |= GDRAW_STATS_alloc_tex; + gstats->alloc_tex += 1; #ifdef GDRAW_MULTISAMPLING - if (gdraw->multisampling) { - glGenRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl); - glBindRenderbuffer(GL_RENDERBUFFER, gdraw->stencil_depth.handle.tex.gl); - glRenderbufferStorageMultisample(GL_RENDERBUFFER, gdraw->multisampling, GL_DEPTH24_STENCIL8, gdraw->frametex_width, gdraw->frametex_height); - - gstats->alloc_tex_bytes += gdraw->multisampling * 4 * gdraw->frametex_width * gdraw->frametex_height; - } else { -#endif - if (gdraw->has_packed_depth_stencil) { + if (gdraw->multisampling) { glGenRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl); - glBindRenderbuffer(GL_RENDERBUFFER, gdraw->stencil_depth.handle.tex.gl); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, gdraw->frametex_width, gdraw->frametex_height); + glBindRenderbuffer(GL_RENDERBUFFER, + gdraw->stencil_depth.handle.tex.gl); + glRenderbufferStorageMultisample( + GL_RENDERBUFFER, gdraw->multisampling, GL_DEPTH24_STENCIL8, + gdraw->frametex_width, gdraw->frametex_height); - gdraw->stencil_depth.handle.tex.gl_renderbuf = gdraw->stencil_depth.handle.tex.gl; - } else { - // this path is mainly for the iOS simulator - glGenRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl); - glBindRenderbuffer(GL_RENDERBUFFER, gdraw->stencil_depth.handle.tex.gl); - glRenderbufferStorage(GL_RENDERBUFFER, gdraw->has_depth24 ? GL_DEPTH_COMPONENT24 : GL_DEPTH_COMPONENT16, gdraw->frametex_width, gdraw->frametex_height); + gstats->alloc_tex_bytes += gdraw->multisampling * 4 * + gdraw->frametex_width * + gdraw->frametex_height; + } else { +#endif + if (gdraw->has_packed_depth_stencil) { + glGenRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl); + glBindRenderbuffer(GL_RENDERBUFFER, + gdraw->stencil_depth.handle.tex.gl); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, + gdraw->frametex_width, + gdraw->frametex_height); - glGenRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl_renderbuf); - glBindRenderbuffer(GL_RENDERBUFFER, gdraw->stencil_depth.handle.tex.gl_renderbuf); - glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, gdraw->frametex_width, gdraw->frametex_height); - } + gdraw->stencil_depth.handle.tex.gl_renderbuf = + gdraw->stencil_depth.handle.tex.gl; + } else { + // this path is mainly for the iOS simulator + glGenRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl); + glBindRenderbuffer(GL_RENDERBUFFER, + gdraw->stencil_depth.handle.tex.gl); + glRenderbufferStorage(GL_RENDERBUFFER, + gdraw->has_depth24 ? GL_DEPTH_COMPONENT24 + : GL_DEPTH_COMPONENT16, + gdraw->frametex_width, + gdraw->frametex_height); - gstats->alloc_tex_bytes += 4 * gdraw->frametex_width * gdraw->frametex_height; + glGenRenderbuffers( + 1, &gdraw->stencil_depth.handle.tex.gl_renderbuf); + glBindRenderbuffer( + GL_RENDERBUFFER, + gdraw->stencil_depth.handle.tex.gl_renderbuf); + glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, + gdraw->frametex_width, + gdraw->frametex_height); + } + + gstats->alloc_tex_bytes += + 4 * gdraw->frametex_width * gdraw->frametex_height; #ifdef GDRAW_MULTISAMPLING - } + } #endif - glBindRenderbuffer(GL_RENDERBUFFER, 0); - opengl_check(); - } - return &gdraw->stencil_depth; + glBindRenderbuffer(GL_RENDERBUFFER, 0); + opengl_check(); + } + return &gdraw->stencil_depth; } -static void flush_rendertargets(GDrawStats *stats) -{ - gdraw_res_flush(&gdraw->rendertargets, stats); +static void flush_rendertargets(GDrawStats* stats) { + gdraw_res_flush(&gdraw->rendertargets, stats); - if (gdraw->stencil_depth.handle.tex.gl_renderbuf && - gdraw->stencil_depth.handle.tex.gl_renderbuf != gdraw->stencil_depth.handle.tex.gl) { - glDeleteRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl_renderbuf); - gdraw->stencil_depth.handle.tex.gl_renderbuf = 0; - } + if (gdraw->stencil_depth.handle.tex.gl_renderbuf && + gdraw->stencil_depth.handle.tex.gl_renderbuf != + gdraw->stencil_depth.handle.tex.gl) { + glDeleteRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl_renderbuf); + gdraw->stencil_depth.handle.tex.gl_renderbuf = 0; + } - if (gdraw->stencil_depth.handle.tex.gl) { - glDeleteRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl); - gdraw->stencil_depth.handle.tex.gl = 0; - } - opengl_check(); + if (gdraw->stencil_depth.handle.tex.gl) { + glDeleteRenderbuffers(1, &gdraw->stencil_depth.handle.tex.gl); + gdraw->stencil_depth.handle.tex.gl = 0; + } + opengl_check(); } //////////////////////////////////////////////////////////////////////// @@ -883,448 +934,483 @@ static void flush_rendertargets(GDrawStats *stats) // Begin rendering for a frame // -static void lazy_shader(ProgramWithCachedVariableLocations *ptr); +static void lazy_shader(ProgramWithCachedVariableLocations* ptr); -static RADINLINE void use_lazy_shader(ProgramWithCachedVariableLocations *prg) -{ - if (!prg->program) - lazy_shader(prg); // already does a glUseProgram! - else - glUseProgram(prg->program); +static RADINLINE void use_lazy_shader(ProgramWithCachedVariableLocations* prg) { + if (!prg->program) + lazy_shader(prg); // already does a glUseProgram! + else + glUseProgram(prg->program); } -static void set_viewport(void) -{ - if (gdraw->in_blur) { - glViewport(0, 0, gdraw->tpw, gdraw->tph); - } else if (gdraw->cur == gdraw->frame) { - glViewport(gdraw->vx, gdraw->vy, gdraw->tw, gdraw->th); - } else if (gdraw->cur->cached) { - glViewport(0, 0, gdraw->cur->width, gdraw->cur->height); - } else { - glViewport(0, 0, gdraw->tpw, gdraw->tph); - // we need to translate from naive pixel space to align a tile - } - opengl_check(); +static void set_viewport(void) { + if (gdraw->in_blur) { + glViewport(0, 0, gdraw->tpw, gdraw->tph); + } else if (gdraw->cur == gdraw->frame) { + glViewport(gdraw->vx, gdraw->vy, gdraw->tw, gdraw->th); + } else if (gdraw->cur->cached) { + glViewport(0, 0, gdraw->cur->width, gdraw->cur->height); + } else { + glViewport(0, 0, gdraw->tpw, gdraw->tph); + // we need to translate from naive pixel space to align a tile + } + opengl_check(); } -static void set_projection_raw(S32 x0, S32 x1, S32 y0, S32 y1) -{ - gdraw->projection[0] = 2.0f / (x1-x0); - gdraw->projection[1] = 2.0f / (y1-y0); - gdraw->projection[2] = (x1+x0)/(F32)(x0-x1); - gdraw->projection[3] = (y1+y0)/(F32)(y0-y1); +static void set_projection_raw(S32 x0, S32 x1, S32 y0, S32 y1) { + gdraw->projection[0] = 2.0f / (x1 - x0); + gdraw->projection[1] = 2.0f / (y1 - y0); + gdraw->projection[2] = (x1 + x0) / (F32)(x0 - x1); + gdraw->projection[3] = (y1 + y0) / (F32)(y0 - y1); } -static void set_projection(void) -{ - if (gdraw->in_blur) - set_projection_raw(0, gdraw->tpw, gdraw->tph, 0); - else if (gdraw->cur == gdraw->frame) - set_projection_raw(gdraw->tx0, gdraw->tx0 + gdraw->tw, gdraw->ty0 + gdraw->th, gdraw->ty0); - else if (gdraw->cur->cached) - set_projection_raw(gdraw->cur->base_x, gdraw->cur->base_x + gdraw->cur->width, gdraw->cur->base_y, gdraw->cur->base_y + gdraw->cur->height); - else - set_projection_raw(gdraw->tx0p, gdraw->tx0p + gdraw->tpw, gdraw->ty0p + gdraw->tph, gdraw->ty0p); +static void set_projection(void) { + if (gdraw->in_blur) + set_projection_raw(0, gdraw->tpw, gdraw->tph, 0); + else if (gdraw->cur == gdraw->frame) + set_projection_raw(gdraw->tx0, gdraw->tx0 + gdraw->tw, + gdraw->ty0 + gdraw->th, gdraw->ty0); + else if (gdraw->cur->cached) + set_projection_raw( + gdraw->cur->base_x, gdraw->cur->base_x + gdraw->cur->width, + gdraw->cur->base_y, gdraw->cur->base_y + gdraw->cur->height); + else + set_projection_raw(gdraw->tx0p, gdraw->tx0p + gdraw->tpw, + gdraw->ty0p + gdraw->tph, gdraw->ty0p); } -static void clear_renderstate(void) -{ - clear_renderstate_platform_specific(); +static void clear_renderstate(void) { + clear_renderstate_platform_specific(); - // deactivate aa_tex - glActiveTexture(GL_TEXTURE0 + AATEX_SAMPLER); - glBindTexture(GL_TEXTURE_2D, 0); + // deactivate aa_tex + glActiveTexture(GL_TEXTURE0 + AATEX_SAMPLER); + glBindTexture(GL_TEXTURE_2D, 0); - glColorMask(1,1,1,1); - glDepthMask(GL_TRUE); + glColorMask(1, 1, 1, 1); + glDepthMask(GL_TRUE); - glDisable(GL_CULL_FACE); - glDisable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - glDisable(GL_STENCIL_TEST); - glDisable(GL_SCISSOR_TEST); - glActiveTexture(GL_TEXTURE0); + glDisable(GL_CULL_FACE); + glDisable(GL_BLEND); + glDisable(GL_DEPTH_TEST); + glDisable(GL_STENCIL_TEST); + glDisable(GL_SCISSOR_TEST); + glActiveTexture(GL_TEXTURE0); - glUseProgram(0); - opengl_check(); + glUseProgram(0); + opengl_check(); } -static void set_common_renderstate(void) -{ - clear_renderstate(); +static void set_common_renderstate(void) { + clear_renderstate(); - // activate aa_tex - glActiveTexture(GL_TEXTURE0 + AATEX_SAMPLER); - glBindTexture(GL_TEXTURE_2D, gdraw->aa_tex); - glActiveTexture(GL_TEXTURE0); + // activate aa_tex + glActiveTexture(GL_TEXTURE0 + AATEX_SAMPLER); + glBindTexture(GL_TEXTURE_2D, gdraw->aa_tex); + glActiveTexture(GL_TEXTURE0); } -void gdraw_GLx_(SetTileOrigin)(S32 x, S32 y, U32 framebuffer) -{ - gdraw->vx = x; - gdraw->vy = y; - gdraw->main_framebuffer = framebuffer; +void gdraw_GLx_(SetTileOrigin)(S32 x, S32 y, U32 framebuffer) { + gdraw->vx = x; + gdraw->vy = y; + gdraw->main_framebuffer = framebuffer; } -static void RADLINK gdraw_SetViewSizeAndWorldScale(S32 w, S32 h, F32 scalex, F32 scaley) -{ - memset(gdraw->frame, 0, sizeof(gdraw->frame)); - gdraw->cur = gdraw->frame; - gdraw->fw = w; - gdraw->fh = h; - gdraw->world_to_pixel[0] = scalex; - gdraw->world_to_pixel[1] = scaley; +static void RADLINK gdraw_SetViewSizeAndWorldScale(S32 w, S32 h, F32 scalex, + F32 scaley) { + memset(gdraw->frame, 0, sizeof(gdraw->frame)); + gdraw->cur = gdraw->frame; + gdraw->fw = w; + gdraw->fh = h; + gdraw->world_to_pixel[0] = scalex; + gdraw->world_to_pixel[1] = scaley; } -static void RADLINK gdraw_Set3DTransform(F32 *mat) -{ - if (mat == NULL) - gdraw->use_3d = 0; - else { - gdraw->use_3d = 1; - memcpy(gdraw->xform_3d, mat, sizeof(gdraw->xform_3d)); - } +static void RADLINK gdraw_Set3DTransform(F32* mat) { + if (mat == NULL) + gdraw->use_3d = 0; + else { + gdraw->use_3d = 1; + memcpy(gdraw->xform_3d, mat, sizeof(gdraw->xform_3d)); + } } // must include anything necessary for texture creation/update -static void RADLINK gdraw_RenderingBegin(void) -{ -} -static void RADLINK gdraw_RenderingEnd(void) -{ +static void RADLINK gdraw_RenderingBegin(void) {} +static void RADLINK gdraw_RenderingEnd(void) {} + +static void RADLINK gdraw_RenderTileBegin(S32 x0, S32 y0, S32 x1, S32 y1, + S32 pad, GDrawStats* gstats) { + opengl_check(); + + if (x0 == 0 && y0 == 0 && x1 == gdraw->fw && y1 == gdraw->fh) { + pad = 0; + gdraw->tile_enabled = false; + } else { + gdraw->tile_enabled = true; + } + + gdraw->tx0 = x0; + gdraw->ty0 = y0; + gdraw->tw = x1 - x0; + gdraw->th = y1 - y0; + gdraw->tpw = gdraw->tw + pad * 2; + gdraw->tph = gdraw->th + pad * 2; + // origin of padded region + gdraw->tx0p = x0 - pad; + gdraw->ty0p = y0 - pad; + + if (gdraw->tpw > gdraw->frametex_width || + gdraw->tph > gdraw->frametex_height) { + gdraw->frametex_width = RR_MAX(gdraw->tpw, gdraw->frametex_width); + gdraw->frametex_height = RR_MAX(gdraw->tph, gdraw->frametex_height); + + flush_rendertargets(gstats); + } + + set_viewport(); + set_projection(); + set_common_renderstate(); + + glBindFramebuffer(GL_FRAMEBUFFER, gdraw->main_framebuffer); + opengl_check(); } -static void RADLINK gdraw_RenderTileBegin(S32 x0, S32 y0, S32 x1, S32 y1, S32 pad, GDrawStats *gstats) -{ - opengl_check(); - - if (x0 == 0 && y0 == 0 && x1 == gdraw->fw && y1 == gdraw->fh) { - pad = 0; - gdraw->tile_enabled = false; - } else { - gdraw->tile_enabled = true; - } - - gdraw->tx0 = x0; - gdraw->ty0 = y0; - gdraw->tw = x1-x0; - gdraw->th = y1-y0; - gdraw->tpw = gdraw->tw + pad*2; - gdraw->tph = gdraw->th + pad*2; - // origin of padded region - gdraw->tx0p = x0 - pad; - gdraw->ty0p = y0 - pad; - - if (gdraw->tpw > gdraw->frametex_width || gdraw->tph > gdraw->frametex_height) { - gdraw->frametex_width = RR_MAX(gdraw->tpw, gdraw->frametex_width); - gdraw->frametex_height = RR_MAX(gdraw->tph, gdraw->frametex_height); - - flush_rendertargets(gstats); - } - - set_viewport(); - set_projection(); - set_common_renderstate(); - - glBindFramebuffer(GL_FRAMEBUFFER, gdraw->main_framebuffer); - opengl_check(); +static void RADLINK gdraw_RenderTileEnd(GDrawStats* stats) { + clear_renderstate(); } -static void RADLINK gdraw_RenderTileEnd(GDrawStats *stats) -{ - clear_renderstate(); +#define MAX_DEPTH_VALUE (1 << 13) + +static void RADLINK gdraw_GetInfo(GDrawInfo* d) { + GLint maxtex; + + opengl_check(); + glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxtex); + + d->num_stencil_bits = 8; + d->max_id = MAX_DEPTH_VALUE - 2; + // for floating point depth, just use mantissa, e.g. 16-20 bits + d->max_texture_size = maxtex; + d->buffer_format = GDRAW_BFORMAT_vbib; + d->shared_depth_stencil = 0; + d->always_mipmap = 0; + d->conditional_nonpow2 = gdraw->has_conditional_non_power_of_two; + opengl_check(); } -#define MAX_DEPTH_VALUE (1 << 13) - -static void RADLINK gdraw_GetInfo(GDrawInfo *d) -{ - GLint maxtex; - - opengl_check(); - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxtex); - - d->num_stencil_bits = 8; - d->max_id = MAX_DEPTH_VALUE-2; - // for floating point depth, just use mantissa, e.g. 16-20 bits - d->max_texture_size = maxtex; - d->buffer_format = GDRAW_BFORMAT_vbib; - d->shared_depth_stencil = 0; - d->always_mipmap = 0; - d->conditional_nonpow2 = gdraw->has_conditional_non_power_of_two; - opengl_check(); -} - - //////////////////////////////////////////////////////////////////////// // // Enable/disable rendertargets in stack fashion // -static void clear_with_rect(gswf_recti *region, rrbool clear_depth, GDrawStats *stats); +static void clear_with_rect(gswf_recti* region, rrbool clear_depth, + GDrawStats* stats); -static void set_render_target_state(void) -{ - GLint h; +static void set_render_target_state(void) { + GLint h; #ifdef GDRAW_MULTISAMPLING - if (gdraw->multisampling) { - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &h); - h = gdraw->cur->color_buffer ? gdraw->cur->color_buffer->handle.tex.gl_renderbuf : 0; - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 , GL_RENDERBUFFER, h); - h = gdraw->cur->stencil_depth ? gdraw->cur->stencil_depth->handle.tex.gl : 0; - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT , GL_RENDERBUFFER, h); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, h); - } else { + if (gdraw->multisampling) { + glGetIntegerv(GL_FRAMEBUFFER_BINDING, &h); + h = gdraw->cur->color_buffer + ? gdraw->cur->color_buffer->handle.tex.gl_renderbuf + : 0; + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, h); + h = gdraw->cur->stencil_depth ? gdraw->cur->stencil_depth->handle.tex.gl + : 0; + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, h); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER, h); + } else { #endif - h = gdraw->cur->color_buffer ? gdraw->cur->color_buffer->handle.tex.gl : 0; - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D, h, 0); - if (gdraw->cur->stencil_depth) { - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, gdraw->cur->stencil_depth->handle.tex.gl); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, gdraw->cur->stencil_depth->handle.tex.gl_renderbuf); - } else { - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); - } + h = gdraw->cur->color_buffer ? gdraw->cur->color_buffer->handle.tex.gl + : 0; + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, h, 0); + if (gdraw->cur->stencil_depth) { + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, + gdraw->cur->stencil_depth->handle.tex.gl); + glFramebufferRenderbuffer( + GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, + gdraw->cur->stencil_depth->handle.tex.gl_renderbuf); + } else { + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER, 0); + } #ifdef GDRAW_MULTISAMPLING - } + } #endif - opengl_check(); + opengl_check(); } -static rrbool RADLINK gdraw_TextureDrawBufferBegin(gswf_recti *region, gdraw_texture_format format, U32 flags, void *owner, GDrawStats *gstats) -{ - GDrawFramebufferState *n = gdraw->cur+1; - GDrawHandle *t; - int k; - if (gdraw->tw == 0 || gdraw->th == 0) { - gdraw_ReportHandleCacheDiag("rt-empty", &gdraw->rendertargets, - GDRAW_RT_DIAG_empty_request, region->x1 - region->x0, region->y1 - region->y0); - IggyGDrawSendWarning(NULL, "GDraw[rt-stack] got a request for an empty rendertarget"); - return false; - } +static rrbool RADLINK gdraw_TextureDrawBufferBegin(gswf_recti* region, + gdraw_texture_format format, + U32 flags, void* owner, + GDrawStats* gstats) { + GDrawFramebufferState* n = gdraw->cur + 1; + GDrawHandle* t; + int k; + if (gdraw->tw == 0 || gdraw->th == 0) { + gdraw_ReportHandleCacheDiag( + "rt-empty", &gdraw->rendertargets, GDRAW_RT_DIAG_empty_request, + region->x1 - region->x0, region->y1 - region->y0); + IggyGDrawSendWarning( + NULL, "GDraw[rt-stack] got a request for an empty rendertarget"); + return false; + } - if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) { - gdraw_ReportHandleCacheDiag("rt-stack-depth", &gdraw->rendertargets, - GDRAW_RT_DIAG_stack_depth, region->x1 - region->x0, region->y1 - region->y0); - IggyGDrawSendWarning(NULL, "GDraw[rt-stack] rendertarget nesting exceeded MAX_RENDER_STACK_DEPTH"); - return false; - } + if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) { + gdraw_ReportHandleCacheDiag( + "rt-stack-depth", &gdraw->rendertargets, GDRAW_RT_DIAG_stack_depth, + region->x1 - region->x0, region->y1 - region->y0); + IggyGDrawSendWarning(NULL, + "GDraw[rt-stack] rendertarget nesting exceeded " + "MAX_RENDER_STACK_DEPTH"); + return false; + } - if (owner) { - t = get_rendertarget_texture(region->x1 - region->x0, region->y1 - region->y0, owner, gstats); - if (!t) { - gdraw_ReportHandleCacheDiag("rt-cacheAsBitmap", gdraw->texturecache, - GDRAW_RT_DIAG_cache_bitmap, region->x1 - region->x0, region->y1 - region->y0); - IggyGDrawSendWarning(NULL, "GDraw[rt-cacheAsBitmap] ran out of rendertargets"); - return false; - } - } else { - t = get_color_rendertarget(gstats); - if (!t) { - IggyGDrawSendWarning(NULL, "GDraw[rt-color] ran out of rendertargets"); - return false; - } - } - n->color_buffer = t; - assert(n->color_buffer != NULL); + if (owner) { + t = get_rendertarget_texture(region->x1 - region->x0, + region->y1 - region->y0, owner, gstats); + if (!t) { + gdraw_ReportHandleCacheDiag("rt-cacheAsBitmap", gdraw->texturecache, + GDRAW_RT_DIAG_cache_bitmap, + region->x1 - region->x0, + region->y1 - region->y0); + IggyGDrawSendWarning( + NULL, "GDraw[rt-cacheAsBitmap] ran out of rendertargets"); + return false; + } + } else { + t = get_color_rendertarget(gstats); + if (!t) { + IggyGDrawSendWarning(NULL, + "GDraw[rt-color] ran out of rendertargets"); + return false; + } + } + n->color_buffer = t; + assert(n->color_buffer != NULL); - if (n == gdraw->frame+1) - n->stencil_depth = get_depthstencil_renderbuffer(gstats); - else - n->stencil_depth = (n-1)->stencil_depth; - ++gdraw->cur; + if (n == gdraw->frame + 1) + n->stencil_depth = get_depthstencil_renderbuffer(gstats); + else + n->stencil_depth = (n - 1)->stencil_depth; + ++gdraw->cur; - gdraw->cur->cached = owner != NULL; - if (owner) { - gdraw->cur->base_x = region->x0; - gdraw->cur->base_y = region->y0; - gdraw->cur->width = region->x1 - region->x0; - gdraw->cur->height = region->y1 - region->y0; - } + gdraw->cur->cached = owner != NULL; + if (owner) { + gdraw->cur->base_x = region->x0; + gdraw->cur->base_y = region->y0; + gdraw->cur->width = region->x1 - region->x0; + gdraw->cur->height = region->y1 - region->y0; + } - gstats->nonzero_flags |= GDRAW_STATS_rendtarg; + gstats->nonzero_flags |= GDRAW_STATS_rendtarg; - glBindFramebuffer(GL_FRAMEBUFFER, gdraw->framebuffer_stack_object); - set_render_target_state(); + glBindFramebuffer(GL_FRAMEBUFFER, gdraw->framebuffer_stack_object); + set_render_target_state(); - assert(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE); + assert(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE); - // viewport for clear (make sure scissor is inside viewport just in case) - glViewport(0, 0, gdraw->frametex_width, gdraw->frametex_height); + // viewport for clear (make sure scissor is inside viewport just in case) + glViewport(0, 0, gdraw->frametex_width, gdraw->frametex_height); - k = (int) (n->color_buffer - gdraw->rendertargets.handle); - if (region) { - S32 ox, oy; - - // in a perfect world, we'd only need 1 pixel of border on all sides for - // bilinear filtering, which would mean pad = 1. however, texture interpolator - // precision is not that high even on PC parts, and if we only use 1 pixel of - // padding we will often get some un-filled pixels "creeping in" from the sides. - // pad = 2 is fine on recent PC parts, but not old PC parts or even fairly new - // mobile parts, so we play it safe and use 3 pixels which so far gives good - // results everywhere. - S32 pad = 3; + k = (int)(n->color_buffer - gdraw->rendertargets.handle); + if (region) { + S32 ox, oy; - // region.x0,y0 are the top left of the rectangle in display space - // x,y are the *bottom* left of the rectangle in window space - S32 h = gdraw->tph; - S32 xt0, yt0, xt1, yt1; - S32 x0, y0, x1, y1; + // in a perfect world, we'd only need 1 pixel of border on all sides for + // bilinear filtering, which would mean pad = 1. however, texture + // interpolator precision is not that high even on PC parts, and if we + // only use 1 pixel of padding we will often get some un-filled pixels + // "creeping in" from the sides. pad = 2 is fine on recent PC parts, but + // not old PC parts or even fairly new mobile parts, so we play it safe + // and use 3 pixels which so far gives good results everywhere. + S32 pad = 3; - if (gdraw->in_blur || !gdraw->tile_enabled) - ox = oy = 0; - else - ox = gdraw->tx0, oy = gdraw->ty0; + // region.x0,y0 are the top left of the rectangle in display space + // x,y are the *bottom* left of the rectangle in window space + S32 h = gdraw->tph; + S32 xt0, yt0, xt1, yt1; + S32 x0, y0, x1, y1; - // clamp region to tile (in gdraw coords) - xt0 = RR_MAX(region->x0 - ox, 0); - yt0 = RR_MAX(region->y0 - oy, 0); - xt1 = RR_MIN(region->x1 - ox, gdraw->tpw); - yt1 = RR_MIN(region->y1 - oy, gdraw->tph); + if (gdraw->in_blur || !gdraw->tile_enabled) + ox = oy = 0; + else + ox = gdraw->tx0, oy = gdraw->ty0; - // but the padding gets clamped to framebuffer coords! also transfer to window space here. - x0 = RR_MAX( xt0 - pad, 0); - y0 = RR_MAX(h - yt1 - pad, 0); - x1 = RR_MIN( xt1 + pad, gdraw->frametex_width); - y1 = RR_MIN(h - yt0 + pad, gdraw->frametex_height); + // clamp region to tile (in gdraw coords) + xt0 = RR_MAX(region->x0 - ox, 0); + yt0 = RR_MAX(region->y0 - oy, 0); + xt1 = RR_MIN(region->x1 - ox, gdraw->tpw); + yt1 = RR_MIN(region->y1 - oy, gdraw->tph); - if (x1 <= x0 || y1 <= y0) { // region doesn't intersect with current tile - --gdraw->cur; + // but the padding gets clamped to framebuffer coords! also transfer to + // window space here. + x0 = RR_MAX(xt0 - pad, 0); + y0 = RR_MAX(h - yt1 - pad, 0); + x1 = RR_MIN(xt1 + pad, gdraw->frametex_width); + y1 = RR_MIN(h - yt0 + pad, gdraw->frametex_height); - // remove color and stencil buffers - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 , GL_TEXTURE_2D, 0, 0); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT , GL_TEXTURE_2D, 0, 0); - - // switch render target back - if (gdraw->cur == gdraw->frame) - glBindFramebuffer(GL_FRAMEBUFFER, gdraw->main_framebuffer); - else - set_render_target_state(); + if (x1 <= x0 || + y1 <= y0) { // region doesn't intersect with current tile + --gdraw->cur; - set_viewport(); - set_projection(); - opengl_check(); + // remove color and stencil buffers + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, 0, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_TEXTURE_2D, 0, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_TEXTURE_2D, 0, 0); - // free our render target - gdraw_FreeTexture((GDrawTexture *) n->color_buffer, 0, gstats); + // switch render target back + if (gdraw->cur == gdraw->frame) + glBindFramebuffer(GL_FRAMEBUFFER, gdraw->main_framebuffer); + else + set_render_target_state(); - // note: don't send a warning since this will happen during regular tiled rendering - return false; - } + set_viewport(); + set_projection(); + opengl_check(); - glEnable(GL_SCISSOR_TEST); - glScissor(x0, y0, x1 - x0, y1 - y0); - gdraw->rt_valid[k].x0 = xt0; - gdraw->rt_valid[k].y0 = yt0; - gdraw->rt_valid[k].x1 = xt1; - gdraw->rt_valid[k].y1 = yt1; - gstats->cleared_pixels += (x1 - x0) * (y1 - y0); - } else { - glDisable(GL_SCISSOR_TEST); - gdraw->rt_valid[k].x0 = 0; - gdraw->rt_valid[k].y0 = 0; - gdraw->rt_valid[k].x1 = gdraw->frametex_width; - gdraw->rt_valid[k].y1 = gdraw->frametex_height; - gstats->cleared_pixels += gdraw->frametex_width * gdraw->frametex_height; - } + // free our render target + gdraw_FreeTexture((GDrawTexture*)n->color_buffer, 0, gstats); - gstats->nonzero_flags |= GDRAW_STATS_clears; - gstats->num_clears += 1; + // note: don't send a warning since this will happen during regular + // tiled rendering + return false; + } + + glEnable(GL_SCISSOR_TEST); + glScissor(x0, y0, x1 - x0, y1 - y0); + gdraw->rt_valid[k].x0 = xt0; + gdraw->rt_valid[k].y0 = yt0; + gdraw->rt_valid[k].x1 = xt1; + gdraw->rt_valid[k].y1 = yt1; + gstats->cleared_pixels += (x1 - x0) * (y1 - y0); + } else { + glDisable(GL_SCISSOR_TEST); + gdraw->rt_valid[k].x0 = 0; + gdraw->rt_valid[k].y0 = 0; + gdraw->rt_valid[k].x1 = gdraw->frametex_width; + gdraw->rt_valid[k].y1 = gdraw->frametex_height; + gstats->cleared_pixels += + gdraw->frametex_width * gdraw->frametex_height; + } + + gstats->nonzero_flags |= GDRAW_STATS_clears; + gstats->num_clears += 1; #ifdef GDRAW_FEWER_CLEARS - if (region) { - clear_with_rect(region, n==gdraw->frame+1, gstats); - } else -#endif // GDRAW_FEWER_CLEARS - { - glClearColor(0,0,0,0); // must clear destination alpha - glClearStencil(0); - glClearDepth(1); - glStencilMask(255); - glDepthMask(GL_TRUE); - glColorMask(1,1,1,1); - glDisable(GL_STENCIL_TEST); - if (n == gdraw->frame+1) - glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - else - glClear(GL_COLOR_BUFFER_BIT); - } + if (region) { + clear_with_rect(region, n == gdraw->frame + 1, gstats); + } else +#endif // GDRAW_FEWER_CLEARS + { + glClearColor(0, 0, 0, 0); // must clear destination alpha + glClearStencil(0); + glClearDepth(1); + glStencilMask(255); + glDepthMask(GL_TRUE); + glColorMask(1, 1, 1, 1); + glDisable(GL_STENCIL_TEST); + if (n == gdraw->frame + 1) + glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | + GL_DEPTH_BUFFER_BIT); + else + glClear(GL_COLOR_BUFFER_BIT); + } - set_viewport(); - set_projection(); + set_viewport(); + set_projection(); - opengl_check(); + opengl_check(); - return true; + return true; } +static GDrawTexture* RADLINK gdraw_TextureDrawBufferEnd(GDrawStats* gstats) { + GDrawFramebufferState* n = gdraw->cur; + GDrawFramebufferState* m = --gdraw->cur; + if (gdraw->fw == 0 || gdraw->fh == 0) return 0; -static GDrawTexture *RADLINK gdraw_TextureDrawBufferEnd(GDrawStats *gstats) -{ - GDrawFramebufferState *n = gdraw->cur; - GDrawFramebufferState *m = --gdraw->cur; - if (gdraw->fw == 0 || gdraw->fh == 0) return 0; + if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) + return 0; // already returned a warning in Start...() - if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) - return 0; // already returned a warning in Start...() + assert(m >= gdraw->frame); // bug in Iggy -- unbalanced - assert(m >= gdraw->frame); // bug in Iggy -- unbalanced + if (m != gdraw->frame) assert(m->color_buffer != NULL); + assert(n->color_buffer != NULL); - if (m != gdraw->frame) - assert(m->color_buffer != NULL); - assert(n->color_buffer != NULL); - - // remove color and stencil buffers - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 , GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT , GL_RENDERBUFFER, 0); + // remove color and stencil buffers + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, 0); #ifdef GDRAW_MULTISAMPLING - if (gdraw->multisampling) { - // blit from multisample to texture - if (n->color_buffer->handle.tex.gl_renderbuf) { - GLuint res; - glBindFramebuffer(GL_READ_FRAMEBUFFER, gdraw->framebuffer_copy_to_texture); - glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, n->color_buffer->handle.tex.gl_renderbuf); - glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, n->color_buffer->handle.tex.gl, 0); - res = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER); - glBlitFramebuffer(0,0,gdraw->tpw,gdraw->tph,0,0,gdraw->tpw,gdraw->tph, GL_COLOR_BUFFER_BIT, GL_NEAREST); - gstats->nonzero_flags |= GDRAW_STATS_blits; - gstats->num_blits += 1; - gstats->num_blit_pixels += (gdraw->tpw * gdraw->tph); + if (gdraw->multisampling) { + // blit from multisample to texture + if (n->color_buffer->handle.tex.gl_renderbuf) { + GLuint res; + glBindFramebuffer(GL_READ_FRAMEBUFFER, + gdraw->framebuffer_copy_to_texture); + glFramebufferRenderbuffer( + GL_READ_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer( + GL_DRAW_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, + n->color_buffer->handle.tex.gl_renderbuf); + glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, + n->color_buffer->handle.tex.gl, 0); + res = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER); + glBlitFramebuffer(0, 0, gdraw->tpw, gdraw->tph, 0, 0, gdraw->tpw, + gdraw->tph, GL_COLOR_BUFFER_BIT, GL_NEAREST); + gstats->nonzero_flags |= GDRAW_STATS_blits; + gstats->num_blits += 1; + gstats->num_blit_pixels += (gdraw->tpw * gdraw->tph); - glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0); - glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, 0); - glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); - } - } + glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, 0); + glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); + } + } #endif - gstats->nonzero_flags |= GDRAW_STATS_rendtarg; - gstats->rendertarget_changes += 1; + gstats->nonzero_flags |= GDRAW_STATS_rendtarg; + gstats->rendertarget_changes += 1; - // set the new state - if (m == gdraw->frame) // back to initial framebuffer - glBindFramebuffer(GL_FRAMEBUFFER, gdraw->main_framebuffer); - else - set_render_target_state(); + // set the new state + if (m == gdraw->frame) // back to initial framebuffer + glBindFramebuffer(GL_FRAMEBUFFER, gdraw->main_framebuffer); + else + set_render_target_state(); - // reset the viewport if we've reached the root scope - set_viewport(); - set_projection(); + // reset the viewport if we've reached the root scope + set_viewport(); + set_projection(); - opengl_check(); + opengl_check(); - return (GDrawTexture *) n->color_buffer; + return (GDrawTexture*)n->color_buffer; } - //////////////////////////////////////////////////////////////////////// // // Clear stencil/depth buffers @@ -1333,27 +1419,24 @@ static GDrawTexture *RADLINK gdraw_TextureDrawBufferEnd(GDrawStats *gstats) // and only clearing those; it depends exactly how fast clearing works. // -static void RADLINK gdraw_ClearStencilBits(U32 bits) -{ - glDisable(GL_SCISSOR_TEST); - glStencilMask(bits); - glClearStencil(0); - glClear(GL_STENCIL_BUFFER_BIT); - opengl_check(); +static void RADLINK gdraw_ClearStencilBits(U32 bits) { + glDisable(GL_SCISSOR_TEST); + glStencilMask(bits); + glClearStencil(0); + glClear(GL_STENCIL_BUFFER_BIT); + opengl_check(); } // this only happens rarely (hopefully never) if we use the depth buffer, // so we can just clear the whole thing -static void RADLINK gdraw_ClearID(void) -{ - glDisable(GL_SCISSOR_TEST); - glClearDepth(1); - glDepthMask(GL_TRUE); - glClear(GL_DEPTH_BUFFER_BIT); - opengl_check(); +static void RADLINK gdraw_ClearID(void) { + glDisable(GL_SCISSOR_TEST); + glClearDepth(1); + glDepthMask(GL_TRUE); + glClear(GL_DEPTH_BUFFER_BIT); + opengl_check(); } - //////////////////////////////////////////////////////////////////////// // // Set all the render state from GDrawRenderState @@ -1363,250 +1446,262 @@ static void RADLINK gdraw_ClearID(void) // the native blend operators. (E.g. "screen") // -enum -{ - VVAR_world0 = 0, - VVAR_world1 = 1, - VVAR_xoff = 2, - VVAR_texgen_s = 3, - VVAR_texgen_t = 4, - VVAR_viewproj = 5, - VVAR_x3d = 5, - VVAR_y3d = 6, - VVAR_z3d = 7, +enum { + VVAR_world0 = 0, + VVAR_world1 = 1, + VVAR_xoff = 2, + VVAR_texgen_s = 3, + VVAR_texgen_t = 4, + VVAR_viewproj = 5, + VVAR_x3d = 5, + VVAR_y3d = 6, + VVAR_z3d = 7, }; // convert an ID request to a value suitable for the depth buffer, // in homogeneous clip space with w=1 (depth from -1..1) -static float depth_from_id(S32 id) -{ - return 1.0f - 2.0f*(id+1) / (F32) MAX_DEPTH_VALUE; +static float depth_from_id(S32 id) { + return 1.0f - 2.0f * (id + 1) / (F32)MAX_DEPTH_VALUE; } -static void set_texture(U32 texunit, GDrawTexture *tex) -{ - glActiveTexture(GL_TEXTURE0 + texunit); - if (tex == NULL) - glBindTexture(GL_TEXTURE_2D, 0); - else - glBindTexture(GL_TEXTURE_2D, ((GDrawHandle *) tex)->handle.tex.gl); +static void set_texture(U32 texunit, GDrawTexture* tex) { + glActiveTexture(GL_TEXTURE0 + texunit); + if (tex == NULL) + glBindTexture(GL_TEXTURE_2D, 0); + else + glBindTexture(GL_TEXTURE_2D, ((GDrawHandle*)tex)->handle.tex.gl); } -static void set_world_projection(const int *vvars, const F32 world[2*4]) -{ - assert(vvars[VVAR_world0] >= 0 && vvars[VVAR_world1] >= 0 && vvars[VVAR_viewproj] >= 0); - glUniform4fv(vvars[VVAR_world0], 1, world + 0); - glUniform4fv(vvars[VVAR_world1], 1, world + 4); - glUniform4fv(vvars[VVAR_viewproj], 1, gdraw->projection); +static void set_world_projection(const int* vvars, const F32 world[2 * 4]) { + assert(vvars[VVAR_world0] >= 0 && vvars[VVAR_world1] >= 0 && + vvars[VVAR_viewproj] >= 0); + glUniform4fv(vvars[VVAR_world0], 1, world + 0); + glUniform4fv(vvars[VVAR_world1], 1, world + 4); + glUniform4fv(vvars[VVAR_viewproj], 1, gdraw->projection); } -static void set_3d_projection(const int *vvars, const F32 world[2*4], const F32 xform[3][4]) -{ - assert(vvars[VVAR_world0] >= 0 && vvars[VVAR_world1] >= 0); - glUniform4fv(vvars[VVAR_world0], 1, world + 0); - glUniform4fv(vvars[VVAR_world1], 1, world + 4); +static void set_3d_projection(const int* vvars, const F32 world[2 * 4], + const F32 xform[3][4]) { + assert(vvars[VVAR_world0] >= 0 && vvars[VVAR_world1] >= 0); + glUniform4fv(vvars[VVAR_world0], 1, world + 0); + glUniform4fv(vvars[VVAR_world1], 1, world + 4); - assert(vvars[VVAR_x3d] >= 0 && vvars[VVAR_y3d] >= 0 && vvars[VVAR_z3d] >= 0); - glUniform4fv(vvars[VVAR_x3d], 1, xform[0]); - glUniform4fv(vvars[VVAR_y3d], 1, xform[1]); - glUniform4fv(vvars[VVAR_z3d], 1, xform[2]); + assert(vvars[VVAR_x3d] >= 0 && vvars[VVAR_y3d] >= 0 && + vvars[VVAR_z3d] >= 0); + glUniform4fv(vvars[VVAR_x3d], 1, xform[0]); + glUniform4fv(vvars[VVAR_y3d], 1, xform[1]); + glUniform4fv(vvars[VVAR_z3d], 1, xform[2]); } +static int set_render_state(GDrawRenderState* r, S32 vformat, + const int** ovvars, GDrawPrimitive* p, + GDrawStats* gstats) { + static struct gdraw_gl_blendspec { + GLboolean enable; + GLenum src; + GLenum dst; + } blends[ASSERT_COUNT(GDRAW_BLEND__count, 6)] = { + {GL_FALSE, GL_ONE, GL_ZERO}, // GDRAW_BLEND_none + {GL_TRUE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA}, // GDRAW_BLEND_alpha + {GL_TRUE, GL_DST_COLOR, + GL_ONE_MINUS_SRC_ALPHA}, // GDRAW_BLEND_multiply + {GL_TRUE, GL_ONE, GL_ONE}, // GDRAW_BLEND_add -static int set_render_state(GDrawRenderState *r, S32 vformat, const int **ovvars, GDrawPrimitive *p, GDrawStats *gstats) -{ - static struct gdraw_gl_blendspec { - GLboolean enable; - GLenum src; - GLenum dst; - } blends[ASSERT_COUNT(GDRAW_BLEND__count, 6)] = { - { GL_FALSE, GL_ONE, GL_ZERO }, // GDRAW_BLEND_none - { GL_TRUE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA }, // GDRAW_BLEND_alpha - { GL_TRUE, GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA }, // GDRAW_BLEND_multiply - { GL_TRUE, GL_ONE, GL_ONE }, // GDRAW_BLEND_add + {GL_FALSE, GL_ONE, GL_ZERO}, // GDRAW_BLEND_filter + {GL_FALSE, GL_ONE, GL_ZERO}, // GDRAW_BLEND_special + }; - { GL_FALSE, GL_ONE, GL_ZERO }, // GDRAW_BLEND_filter - { GL_FALSE, GL_ONE, GL_ZERO }, // GDRAW_BLEND_special - }; + F32 world[2 * 4]; + ProgramWithCachedVariableLocations* prg; + int *fvars, *vvars; + int blend_mode; - F32 world[2*4]; - ProgramWithCachedVariableLocations *prg; - int *fvars, *vvars; - int blend_mode; + opengl_check(); + assert((vformat >= 0 && vformat < GDRAW_vformat__basic_count) || + vformat == GDRAW_vformat_ihud1); - opengl_check(); - assert((vformat >= 0 && vformat < GDRAW_vformat__basic_count) || vformat == GDRAW_vformat_ihud1); + if (vformat == GDRAW_vformat_ihud1) { + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, + GL_ONE_MINUS_SRC_ALPHA); // premultiplied alpha blend mode + prg = &gdraw->ihud[0]; + } else { + // apply the major blend mode + blend_mode = r->blend_mode; + assert(blend_mode >= 0 && + blend_mode < sizeof(blends) / sizeof(*blends)); + if (blends[blend_mode].enable) { + glEnable(GL_BLEND); + glBlendFunc(blends[blend_mode].src, blends[blend_mode].dst); + } else + glDisable(GL_BLEND); - if (vformat == GDRAW_vformat_ihud1) { - glEnable(GL_BLEND); - glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); // premultiplied alpha blend mode - prg = &gdraw->ihud[0]; - } else { - // apply the major blend mode - blend_mode = r->blend_mode; - assert(blend_mode >= 0 && blend_mode < sizeof(blends)/sizeof(*blends)); - if (blends[blend_mode].enable) { - glEnable(GL_BLEND); - glBlendFunc(blends[blend_mode].src, blends[blend_mode].dst); - } else - glDisable(GL_BLEND); + // set the fragment program if it wasn't set above + if (r->blend_mode != GDRAW_BLEND_special) { + // make sure data has been initialized + int which = r->tex0_mode, additive = 0; - // set the fragment program if it wasn't set above - if (r->blend_mode != GDRAW_BLEND_special) { - // make sure data has been initialized - int which = r->tex0_mode, additive = 0; + if (r->cxf_add) { + additive = 1; + if (r->cxf_add[3]) additive = 2; + } - if (r->cxf_add) { - additive = 1; - if (r->cxf_add[3]) additive = 2; - } + prg = &gdraw->fprog[which][additive][vformat]; + } else + prg = &gdraw->exceptional_blend[r->special_blend]; + } - prg = &gdraw->fprog[which][additive][vformat]; - } else - prg = &gdraw->exceptional_blend[r->special_blend]; - } + use_lazy_shader(prg); + OPENGL_CHECK_SITE("set_render_state:use_lazy_shader"); + fvars = prg->vars[0]; + vvars = prg->vars[1]; - use_lazy_shader(prg); - OPENGL_CHECK_SITE("set_render_state:use_lazy_shader"); - fvars = prg->vars[0]; - vvars = prg->vars[1]; + if (vformat == GDRAW_vformat_ihud1) { + F32 wv[2][4] = {1.0f / 960, 0, 0, -1.0, 0, -1.0f / 540, 0, +1.0}; + glUniform4fv(vvars[VAR_ihudv_worldview], 2, wv[0]); + OPENGL_CHECK_SITE("set_render_state:ihud_worldview"); + glUniform4fv(vvars[VAR_ihudv_material], p->uniform_count, p->uniforms); + OPENGL_CHECK_SITE("set_render_state:ihud_material"); + glUniform1f(vvars[VAR_ihudv_textmode], p->drawprim_mode ? 0.0f : 1.0f); + OPENGL_CHECK_SITE("set_render_state:ihud_textmode"); + } else { + // set vertex shader constants + if (!r->use_world_space) + gdraw_ObjectSpace(world, r->o2w, depth_from_id(r->id), 0.0f); + else + gdraw_WorldSpace(world, gdraw->world_to_pixel, depth_from_id(r->id), + 0.0f); - if (vformat == GDRAW_vformat_ihud1) { - F32 wv[2][4] = { 1.0f/960,0,0,-1.0, 0,-1.0f/540,0,+1.0 }; - glUniform4fv(vvars[VAR_ihudv_worldview], 2, wv[0]); - OPENGL_CHECK_SITE("set_render_state:ihud_worldview"); - glUniform4fv(vvars[VAR_ihudv_material], p->uniform_count, p->uniforms); - OPENGL_CHECK_SITE("set_render_state:ihud_material"); - glUniform1f(vvars[VAR_ihudv_textmode], p->drawprim_mode ? 0.0f : 1.0f); - OPENGL_CHECK_SITE("set_render_state:ihud_textmode"); - } else { +#ifdef FLASH_10 + set_3d_projection(vvars, world, gdraw->xform_3d); +#else + set_world_projection(vvars, world); +#endif - // set vertex shader constants - if (!r->use_world_space) - gdraw_ObjectSpace(world, r->o2w, depth_from_id(r->id), 0.0f); - else - gdraw_WorldSpace(world, gdraw->world_to_pixel, depth_from_id(r->id), 0.0f); + if (vvars[VVAR_xoff] >= 0) + glUniform4fv(vvars[VVAR_xoff], 1, r->edge_matrix); - #ifdef FLASH_10 - set_3d_projection(vvars, world, gdraw->xform_3d); - #else - set_world_projection(vvars, world); - #endif + if (r->texgen0_enabled) { + assert(vvars[VVAR_texgen_s] >= 0 && vvars[VVAR_texgen_t] >= 0); + glUniform4fv(vvars[VVAR_texgen_s], 1, r->s0_texgen); + glUniform4fv(vvars[VVAR_texgen_t], 1, r->t0_texgen); + } + } - if (vvars[VVAR_xoff] >= 0) - glUniform4fv(vvars[VVAR_xoff], 1, r->edge_matrix); + // texture stuff + set_texture(0, r->tex[0]); + OPENGL_CHECK_SITE("set_render_state:set_texture0"); - if (r->texgen0_enabled) { - assert(vvars[VVAR_texgen_s] >= 0 && vvars[VVAR_texgen_t] >= 0); - glUniform4fv(vvars[VVAR_texgen_s], 1, r->s0_texgen); - glUniform4fv(vvars[VVAR_texgen_t], 1, r->t0_texgen); - } - } + if (r->tex[0] && gdraw->has_conditional_non_power_of_two && + ((GDrawHandle*)r->tex[0])->handle.tex.nonpow2) { + // only wrap mode allowed in conditional nonpow2 is clamp; this should + // have been set when the texture was created, but to be on the safe + // side... + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + } else + switch (r->wrap0) { + case GDRAW_WRAP_repeat: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + break; + case GDRAW_WRAP_clamp: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, + GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, + GL_CLAMP_TO_EDGE); + break; + case GDRAW_WRAP_mirror: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, + GL_MIRRORED_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, + GL_MIRRORED_REPEAT); + break; + } - // texture stuff - set_texture(0, r->tex[0]); - OPENGL_CHECK_SITE("set_render_state:set_texture0"); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, + r->nearest0 ? GL_NEAREST : GL_LINEAR); - if (r->tex[0] && gdraw->has_conditional_non_power_of_two && ((GDrawHandle*) r->tex[0])->handle.tex.nonpow2) { - // only wrap mode allowed in conditional nonpow2 is clamp; this should - // have been set when the texture was created, but to be on the safe side... - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - } else switch (r->wrap0) { - case GDRAW_WRAP_repeat: - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - break; - case GDRAW_WRAP_clamp: - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - break; - case GDRAW_WRAP_mirror: - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT); - break; - } + // fragment shader constants - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, r->nearest0 ? GL_NEAREST : GL_LINEAR); + if (fvars[VAR_cmul] >= 0) + glUniform4f(fvars[VAR_cmul], r->color[0], r->color[1], r->color[2], + r->color[3]); + if (fvars[VAR_cadd] >= 0) { + if (r->cxf_add) + glUniform4f(fvars[VAR_cadd], r->cxf_add[0] / 255.0f, + r->cxf_add[1] / 255.0f, r->cxf_add[2] / 255.0f, + r->cxf_add[3] / 255.0f); + else + glUniform4f(fvars[VAR_cadd], 0, 0, 0, 0); + } + if (fvars[VAR_focal] >= 0) + glUniform4fv(fvars[VAR_focal], 1, r->focal_point); - // fragment shader constants + glActiveTexture(GL_TEXTURE0); - if (fvars[VAR_cmul] >= 0) - glUniform4f(fvars[VAR_cmul], r->color[0], r->color[1], r->color[2], r->color[3]); - if (fvars[VAR_cadd] >= 0) { - if (r->cxf_add) - glUniform4f(fvars[VAR_cadd], r->cxf_add[0]/255.0f, r->cxf_add[1]/255.0f, r->cxf_add[2]/255.0f, r->cxf_add[3]/255.0f); - else - glUniform4f(fvars[VAR_cadd], 0,0,0,0); - } - if (fvars[VAR_focal] >= 0) - glUniform4fv(fvars[VAR_focal], 1, r->focal_point); + // Set pixel operation states - glActiveTexture(GL_TEXTURE0); + if (r->scissor) { + S32 x0, y0, x1, y1; + // scissor.x0,y0 are the top left of the rectangle in display space + // x,y are the *bottom* left of the rectangle in window space + x0 = r->scissor_rect.x0; + y0 = r->scissor_rect.y1; + x1 = r->scissor_rect.x1; + y1 = r->scissor_rect.y0; + // convert into tile-relative coordinates + if (gdraw->tile_enabled) { + x0 -= gdraw->tx0; + y0 -= gdraw->ty0; + x1 -= gdraw->tx0; + y1 -= gdraw->ty0; + } + // convert bottom-most edge to bottom-relative + y0 = (gdraw->th) - y0; + y1 = (gdraw->th) - y1; + if (gdraw->cur == gdraw->frame) { + // move into viewport space + x0 += gdraw->vx; + y0 += gdraw->vy; + x1 += gdraw->vx; + y1 += gdraw->vy; + } + glScissor(x0, y0, x1 - x0, y1 - y0); + glEnable(GL_SCISSOR_TEST); + } else + glDisable(GL_SCISSOR_TEST); - // Set pixel operation states + glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); + glStencilMask(r->stencil_set); + glStencilFunc(GL_EQUAL, 255, r->stencil_test); + if (r->stencil_set | r->stencil_test) + glEnable(GL_STENCIL_TEST); + else + glDisable(GL_STENCIL_TEST); - if (r->scissor) { - S32 x0,y0,x1,y1; - // scissor.x0,y0 are the top left of the rectangle in display space - // x,y are the *bottom* left of the rectangle in window space - x0 = r->scissor_rect.x0; - y0 = r->scissor_rect.y1; - x1 = r->scissor_rect.x1; - y1 = r->scissor_rect.y0; - // convert into tile-relative coordinates - if (gdraw->tile_enabled) { - x0 -= gdraw->tx0; - y0 -= gdraw->ty0; - x1 -= gdraw->tx0; - y1 -= gdraw->ty0; - } - // convert bottom-most edge to bottom-relative - y0 = (gdraw->th) - y0; - y1 = (gdraw->th) - y1; - if (gdraw->cur == gdraw->frame) { - // move into viewport space - x0 += gdraw->vx; - y0 += gdraw->vy; - x1 += gdraw->vx; - y1 += gdraw->vy; - } - glScissor(x0,y0,x1-x0,y1-y0); - glEnable(GL_SCISSOR_TEST); - } else - glDisable(GL_SCISSOR_TEST); + if (r->stencil_set) + glColorMask(0, 0, 0, 0); + else + glColorMask(1, 1, 1, 1); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - glStencilMask(r->stencil_set); - glStencilFunc(GL_EQUAL, 255, r->stencil_test); - if (r->stencil_set | r->stencil_test) - glEnable(GL_STENCIL_TEST); - else - glDisable(GL_STENCIL_TEST); + if (r->test_id) { + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); + } else { + glDisable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); + } - if (r->stencil_set) - glColorMask(0,0,0,0); - else - glColorMask(1,1,1,1); + if (r->set_id) + glDepthMask(GL_TRUE); + else + glDepthMask(GL_FALSE); - if (r->test_id) { - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - } else { - glDisable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - } + OPENGL_CHECK_SITE("set_render_state:final"); + if (ovvars) *ovvars = vvars; - if (r->set_id) - glDepthMask(GL_TRUE); - else - glDepthMask(GL_FALSE); - - OPENGL_CHECK_SITE("set_render_state:final"); - if (ovvars) - *ovvars = vvars; - - return 1; + return 1; } //////////////////////////////////////////////////////////////////////// @@ -1614,53 +1709,61 @@ static int set_render_state(GDrawRenderState *r, S32 vformat, const int **ovvars // Vertex formats // -static void set_vertex_format(S32 format, F32 *vertices) -{ - const void *vertex_offset_0 = (const void *) (size_t) vertices; - const void *vertex_offset_8 = (const void *) ((size_t) vertices + (2 * sizeof(F32))); - const void *vertex_offset_16 = (const void *) ((size_t) vertices + (4 * sizeof(F32))); +static void set_vertex_format(S32 format, F32* vertices) { + const void* vertex_offset_0 = (const void*)(size_t)vertices; + const void* vertex_offset_8 = + (const void*)((size_t)vertices + (2 * sizeof(F32))); + const void* vertex_offset_16 = + (const void*)((size_t)vertices + (4 * sizeof(F32))); - switch (format) { - case GDRAW_vformat_v2: - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, vertex_offset_0); - glEnableVertexAttribArray(0); - break; + switch (format) { + case GDRAW_vformat_v2: + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, vertex_offset_0); + glEnableVertexAttribArray(0); + break; - case GDRAW_vformat_v2aa: - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 16, vertex_offset_0); - glVertexAttribPointer(1, 4, GL_SHORT, GL_FALSE, 16, vertex_offset_8); - glEnableVertexAttribArray(0); - glEnableVertexAttribArray(1); - break; + case GDRAW_vformat_v2aa: + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 16, + vertex_offset_0); + glVertexAttribPointer(1, 4, GL_SHORT, GL_FALSE, 16, + vertex_offset_8); + glEnableVertexAttribArray(0); + glEnableVertexAttribArray(1); + break; - case GDRAW_vformat_v2tc2: - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 16, vertex_offset_0); - glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 16, vertex_offset_8); - glEnableVertexAttribArray(0); - glEnableVertexAttribArray(1); - break; + case GDRAW_vformat_v2tc2: + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 16, + vertex_offset_0); + glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 16, + vertex_offset_8); + glEnableVertexAttribArray(0); + glEnableVertexAttribArray(1); + break; - case GDRAW_vformat_ihud1: - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 20, vertex_offset_0); - glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 20, vertex_offset_8); - glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, 20, vertex_offset_16); - glEnableVertexAttribArray(0); - glEnableVertexAttribArray(1); - glEnableVertexAttribArray(2); - break; + case GDRAW_vformat_ihud1: + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 20, + vertex_offset_0); + glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 20, + vertex_offset_8); + glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, 20, + vertex_offset_16); + glEnableVertexAttribArray(0); + glEnableVertexAttribArray(1); + glEnableVertexAttribArray(2); + break; - default: - assert(0); - } + default: + assert(0); + } } -static void reset_vertex_format(S32 format) -{ - // we don't use attrib #1 for all formats, but doesn't seem worthwhile to check - format = format; - glDisableVertexAttribArray(0); - glDisableVertexAttribArray(1); - glDisableVertexAttribArray(2); +static void reset_vertex_format(S32 format) { + // we don't use attrib #1 for all formats, but doesn't seem worthwhile to + // check + format = format; + glDisableVertexAttribArray(0); + glDisableVertexAttribArray(1); + glDisableVertexAttribArray(2); } //////////////////////////////////////////////////////////////////////// @@ -1668,63 +1771,64 @@ static void reset_vertex_format(S32 format) // Draw triangles with a given renderstate // -static void tag_resources(void *r1, void *r2, void *r3) -{ - U64 now = gdraw->frame_counter; - if (r1) ((GDrawHandle *) r1)->fence.value = now; - if (r2) ((GDrawHandle *) r2)->fence.value = now; - if (r3) ((GDrawHandle *) r3)->fence.value = now; +static void tag_resources(void* r1, void* r2, void* r3) { + U64 now = gdraw->frame_counter; + if (r1) ((GDrawHandle*)r1)->fence.value = now; + if (r2) ((GDrawHandle*)r2)->fence.value = now; + if (r3) ((GDrawHandle*)r3)->fence.value = now; } -static int vformat_stride[] = -{ - 2,4,4,5 -}; +static int vformat_stride[] = {2, 4, 4, 5}; -static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState *r, GDrawPrimitive *p, GDrawVertexBuffer *buf, GDrawStats *gstats) -{ - GDrawHandle *vb = (GDrawHandle *) buf; - if (vb) { - glBindBuffer(GL_ARRAY_BUFFER, vb->handle.vbuf.base); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vb->handle.vbuf.indices); - } else { - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } +static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState* r, + GDrawPrimitive* p, + GDrawVertexBuffer* buf, + GDrawStats* gstats) { + GDrawHandle* vb = (GDrawHandle*)buf; + if (vb) { + glBindBuffer(GL_ARRAY_BUFFER, vb->handle.vbuf.base); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vb->handle.vbuf.indices); + } else { + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } - if (!set_render_state(r,p->vertex_format, NULL, p, gstats)) return; - gstats->nonzero_flags |= GDRAW_STATS_batches; - gstats->num_batches += 1; - gstats->drawn_indices += p->num_indices; - gstats->drawn_vertices += p->num_vertices; + if (!set_render_state(r, p->vertex_format, NULL, p, gstats)) return; + gstats->nonzero_flags |= GDRAW_STATS_batches; + gstats->num_batches += 1; + gstats->drawn_indices += p->num_indices; + gstats->drawn_vertices += p->num_vertices; - if (vb || p->indices) { // regular path - set_vertex_format(p->vertex_format, p->vertices); - glDrawElements(GL_TRIANGLES, p->num_indices, GL_UNSIGNED_SHORT, p->indices); - } else { // dynamic quads - S32 pos = 0; - U32 stride = vformat_stride[p->vertex_format]; // in units of sizeof(F32) - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, gdraw->quad_ib); - assert(p->num_vertices % 4 == 0); + if (vb || p->indices) { // regular path + set_vertex_format(p->vertex_format, p->vertices); + glDrawElements(GL_TRIANGLES, p->num_indices, GL_UNSIGNED_SHORT, + p->indices); + } else { // dynamic quads + S32 pos = 0; + U32 stride = + vformat_stride[p->vertex_format]; // in units of sizeof(F32) + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, gdraw->quad_ib); + assert(p->num_vertices % 4 == 0); - while (pos < p->num_vertices) { - S32 vert_count = RR_MIN(p->num_vertices - pos, QUAD_IB_COUNT * 4); - set_vertex_format(p->vertex_format, p->vertices + pos*stride); - glDrawElements(GL_TRIANGLES, (vert_count >> 2) * 6, GL_UNSIGNED_SHORT, NULL); - pos += vert_count; - } - - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } - reset_vertex_format(p->vertex_format); + while (pos < p->num_vertices) { + S32 vert_count = RR_MIN(p->num_vertices - pos, QUAD_IB_COUNT * 4); + set_vertex_format(p->vertex_format, p->vertices + pos * stride); + glDrawElements(GL_TRIANGLES, (vert_count >> 2) * 6, + GL_UNSIGNED_SHORT, NULL); + pos += vert_count; + } - if (vb) { - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } + reset_vertex_format(p->vertex_format); - OPENGL_CHECK_SITE("gdraw_DrawIndexedTriangles:final"); - tag_resources(vb, r->tex[0], r->tex[1]); + if (vb) { + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + } + + OPENGL_CHECK_SITE("gdraw_DrawIndexedTriangles:final"); + tag_resources(vb, r->tex[0], r->tex[1]); } /////////////////////////////////////////////////////////////////////// @@ -1733,281 +1837,310 @@ static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState *r, GDrawPrimiti // // caller sets up texture coordinates -static void do_screen_quad(gswf_recti *s, F32 *tc, const int *vvars, GDrawStats *gstats, F32 depth) -{ - F32 px0 = (F32) s->x0, py0 = (F32) s->y0, px1 = (F32) s->x1, py1 = (F32) s->y1; - F32 s0 = tc[0], t0 = tc[1], s1 = tc[2], t1 = tc[3]; - F32 vert[4][4]; - F32 world[2*4]; +static void do_screen_quad(gswf_recti* s, F32* tc, const int* vvars, + GDrawStats* gstats, F32 depth) { + F32 px0 = (F32)s->x0, py0 = (F32)s->y0, px1 = (F32)s->x1, py1 = (F32)s->y1; + F32 s0 = tc[0], t0 = tc[1], s1 = tc[2], t1 = tc[3]; + F32 vert[4][4]; + F32 world[2 * 4]; - OPENGL_CHECK_SITE("do_screen_quad:begin"); + OPENGL_CHECK_SITE("do_screen_quad:begin"); - vert[0][0] = px0; vert[0][1] = py0; vert[0][2] = s0; vert[0][3] = t0; - vert[1][0] = px1; vert[1][1] = py0; vert[1][2] = s1; vert[1][3] = t0; - vert[2][0] = px1; vert[2][1] = py1; vert[2][2] = s1; vert[2][3] = t1; - vert[3][0] = px0; vert[3][1] = py1; vert[3][2] = s0; vert[3][3] = t1; + vert[0][0] = px0; + vert[0][1] = py0; + vert[0][2] = s0; + vert[0][3] = t0; + vert[1][0] = px1; + vert[1][1] = py0; + vert[1][2] = s1; + vert[1][3] = t0; + vert[2][0] = px1; + vert[2][1] = py1; + vert[2][2] = s1; + vert[2][3] = t1; + vert[3][0] = px0; + vert[3][1] = py1; + vert[3][2] = s0; + vert[3][3] = t1; - OPENGL_CHECK_SITE("do_screen_quad:after_vertices"); - gdraw_PixelSpace(world); - world[2] = depth; - set_world_projection(vvars, world); - OPENGL_CHECK_SITE("do_screen_quad:after_projection"); + OPENGL_CHECK_SITE("do_screen_quad:after_vertices"); + gdraw_PixelSpace(world); + world[2] = depth; + set_world_projection(vvars, world); + OPENGL_CHECK_SITE("do_screen_quad:after_projection"); - set_vertex_format(GDRAW_vformat_v2tc2, vert[0]); - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - OPENGL_CHECK_SITE("do_screen_quad:before_draw"); - glDrawArrays(GL_TRIANGLE_FAN, 0, 4); - reset_vertex_format(GDRAW_vformat_v2tc2); - OPENGL_CHECK_SITE("do_screen_quad:after_draw"); + set_vertex_format(GDRAW_vformat_v2tc2, vert[0]); + glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + OPENGL_CHECK_SITE("do_screen_quad:before_draw"); + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + reset_vertex_format(GDRAW_vformat_v2tc2); + OPENGL_CHECK_SITE("do_screen_quad:after_draw"); - gstats->nonzero_flags |= GDRAW_STATS_batches; - gstats->num_batches += 1; - gstats->drawn_vertices += 4; - gstats->drawn_indices += 6; + gstats->nonzero_flags |= GDRAW_STATS_batches; + gstats->num_batches += 1; + gstats->drawn_vertices += 4; + gstats->drawn_indices += 6; - OPENGL_CHECK_SITE("do_screen_quad:final"); + OPENGL_CHECK_SITE("do_screen_quad:final"); } #ifdef GDRAW_FEWER_CLEARS -static void clear_with_rect(gswf_recti *region, rrbool clear_depth, GDrawStats *gstats) -{ - F32 tc[4] = { 0,0,0,0 }; +static void clear_with_rect(gswf_recti* region, rrbool clear_depth, + GDrawStats* gstats) { + F32 tc[4] = {0, 0, 0, 0}; - use_lazy_shader(&gdraw->manual_clear); - glUniform4f(gdraw->manual_clear.vars[0][0], 0.0, 0,0,0); + use_lazy_shader(&gdraw->manual_clear); + glUniform4f(gdraw->manual_clear.vars[0][0], 0.0, 0, 0, 0); - glDisable(GL_BLEND); + glDisable(GL_BLEND); - if (clear_depth) { - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_ALWAYS); - glDepthMask(GL_TRUE); + if (clear_depth) { + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_ALWAYS); + glDepthMask(GL_TRUE); - glEnable(GL_STENCIL_TEST); - glStencilMask(255); - glStencilOp(GL_REPLACE,GL_REPLACE,GL_REPLACE); - glStencilFunc(GL_ALWAYS,0,255); - } else { - glDisable(GL_DEPTH_TEST); - glDisable(GL_STENCIL_TEST); - } + glEnable(GL_STENCIL_TEST); + glStencilMask(255); + glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE); + glStencilFunc(GL_ALWAYS, 0, 255); + } else { + glDisable(GL_DEPTH_TEST); + glDisable(GL_STENCIL_TEST); + } - glColorMask(1,1,1,1); - glColor4f(0,0,0,0); + glColorMask(1, 1, 1, 1); + glColor4f(0, 0, 0, 0); - { - // coordinate system doesn't match, so just draw whole screen, rely on scissor to clip it properly - gswf_recti foo = { -10000,-10000,10000,10000 }; - do_screen_quad(&foo, tc, gdraw->manual_clear.vars[1], gstats, 1.0f); - } + { + // coordinate system doesn't match, so just draw whole screen, rely on + // scissor to clip it properly + gswf_recti foo = {-10000, -10000, 10000, 10000}; + do_screen_quad(&foo, tc, gdraw->manual_clear.vars[1], gstats, 1.0f); + } } #endif -static void gdraw_DriverBlurPass(GDrawRenderState *r, int taps, F32 *data, gswf_recti *s, F32 *tc, F32 height_max, F32 *clamp, GDrawStats *gstats) -{ - ProgramWithCachedVariableLocations *prg = &gdraw->blur_prog[taps]; - F32 clampv[4]; +static void gdraw_DriverBlurPass(GDrawRenderState* r, int taps, F32* data, + gswf_recti* s, F32* tc, F32 height_max, + F32* clamp, GDrawStats* gstats) { + ProgramWithCachedVariableLocations* prg = &gdraw->blur_prog[taps]; + F32 clampv[4]; - // fix OpenGL t values for rendertargets are from bottom, not top - tc[1] = height_max - tc[1]; - tc[3] = height_max - tc[3]; + // fix OpenGL t values for rendertargets are from bottom, not top + tc[1] = height_max - tc[1]; + tc[3] = height_max - tc[3]; - clampv[0] = clamp[0]; - clampv[1] = height_max - clamp[3]; - clampv[2] = clamp[2]; - clampv[3] = height_max - clamp[1]; + clampv[0] = clamp[0]; + clampv[1] = height_max - clamp[3]; + clampv[2] = clamp[2]; + clampv[3] = height_max - clamp[1]; - use_lazy_shader(prg); - set_texture(0, r->tex[0]); + use_lazy_shader(prg); + set_texture(0, r->tex[0]); - glColorMask(1,1,1,1); - glDisable(GL_BLEND); - glDisable(GL_SCISSOR_TEST); + glColorMask(1, 1, 1, 1); + glDisable(GL_BLEND); + glDisable(GL_SCISSOR_TEST); - assert(prg->vars[0][VAR_blur_tap] >= 0); - glUniform4fv(prg->vars[0][VAR_blur_tap], taps, data); - glUniform4fv(prg->vars[0][VAR_blur_clampv], 1, clampv); + assert(prg->vars[0][VAR_blur_tap] >= 0); + glUniform4fv(prg->vars[0][VAR_blur_tap], taps, data); + glUniform4fv(prg->vars[0][VAR_blur_clampv], 1, clampv); - do_screen_quad(s, tc, prg->vars[1], gstats, 0); - tag_resources(r->tex[0],0,0); + do_screen_quad(s, tc, prg->vars[1], gstats, 0); + tag_resources(r->tex[0], 0, 0); } -static void gdraw_Colormatrix(GDrawRenderState *r, gswf_recti *s, float *tc, GDrawStats *gstats) -{ - ProgramWithCachedVariableLocations *prg = &gdraw->colormatrix; - if (!gdraw_TextureDrawBufferBegin(s, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, NULL, gstats)) - return; - use_lazy_shader(prg); - set_texture(0, r->tex[0]); - glUniform4fv(prg->vars[0][VAR_colormatrix_data], 5, r->shader_data); - do_screen_quad(s, tc, gdraw->colormatrix.vars[1], gstats, 0); - tag_resources(r->tex[0],0,0); - r->tex[0] = gdraw_TextureDrawBufferEnd(gstats); +static void gdraw_Colormatrix(GDrawRenderState* r, gswf_recti* s, float* tc, + GDrawStats* gstats) { + ProgramWithCachedVariableLocations* prg = &gdraw->colormatrix; + if (!gdraw_TextureDrawBufferBegin( + s, GDRAW_TEXTURE_FORMAT_rgba32, + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, + NULL, gstats)) + return; + use_lazy_shader(prg); + set_texture(0, r->tex[0]); + glUniform4fv(prg->vars[0][VAR_colormatrix_data], 5, r->shader_data); + do_screen_quad(s, tc, gdraw->colormatrix.vars[1], gstats, 0); + tag_resources(r->tex[0], 0, 0); + r->tex[0] = gdraw_TextureDrawBufferEnd(gstats); } -static gswf_recti *get_valid_rect(GDrawTexture *tex) -{ - GDrawHandle *h = (GDrawHandle *) tex; - S32 n = (S32) (h - gdraw->rendertargets.handle); - assert(n >= 0 && n <= MAX_RENDER_STACK_DEPTH+1); - return &gdraw->rt_valid[n]; +static gswf_recti* get_valid_rect(GDrawTexture* tex) { + GDrawHandle* h = (GDrawHandle*)tex; + S32 n = (S32)(h - gdraw->rendertargets.handle); + assert(n >= 0 && n <= MAX_RENDER_STACK_DEPTH + 1); + return &gdraw->rt_valid[n]; } -static void set_clamp_constant(GLint constant, GDrawTexture *tex) -{ - gswf_recti *s = get_valid_rect(tex); - // when we make the valid data, we make sure there is an extra empty pixel at the border - // we also have to convert from GDraw coords to GL coords here. - glUniform4f(constant, - ( s->x0-0.5f) / gdraw->frametex_width, - (gdraw->tph-s->y1-0.5f) / gdraw->frametex_height, - ( s->x1+0.5f) / gdraw->frametex_width, - (gdraw->tph-s->y0+0.5f) / gdraw->frametex_height); +static void set_clamp_constant(GLint constant, GDrawTexture* tex) { + gswf_recti* s = get_valid_rect(tex); + // when we make the valid data, we make sure there is an extra empty pixel + // at the border we also have to convert from GDraw coords to GL coords + // here. + glUniform4f(constant, (s->x0 - 0.5f) / gdraw->frametex_width, + (gdraw->tph - s->y1 - 0.5f) / gdraw->frametex_height, + (s->x1 + 0.5f) / gdraw->frametex_width, + (gdraw->tph - s->y0 + 0.5f) / gdraw->frametex_height); } -static void gdraw_Filter(GDrawRenderState *r, gswf_recti *s, float *tc, int isbevel, GDrawStats *gstats) -{ - ProgramWithCachedVariableLocations *prg = &gdraw->filter_prog[isbevel][r->filter_mode]; - if (!gdraw_TextureDrawBufferBegin(s, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, NULL, gstats)) - return; - use_lazy_shader(prg); - set_texture(0, r->tex[0]); - set_texture(1, r->tex[1]); - set_texture(2, r->tex[2]); - glUniform4fv(prg->vars[0][VAR_filter_color], 1, &r->shader_data[0]); - glUniform4f(prg->vars[0][VAR_filter_tc_off], -r->shader_data[4] / (F32)gdraw->frametex_width, r->shader_data[5] / (F32)gdraw->frametex_height, r->shader_data[6], 0); - if (prg->vars[0][VAR_filter_color2] >= 0) - glUniform4fv(prg->vars[0][VAR_filter_color2], 1, &r->shader_data[8]); - set_clamp_constant(prg->vars[0][VAR_filter_clamp0], r->tex[0]); - set_clamp_constant(prg->vars[0][VAR_filter_clamp1], r->tex[1]); - do_screen_quad(s, tc, prg->vars[1], gstats, 0); - tag_resources(r->tex[0],0,0); - r->tex[0] = gdraw_TextureDrawBufferEnd(gstats); +static void gdraw_Filter(GDrawRenderState* r, gswf_recti* s, float* tc, + int isbevel, GDrawStats* gstats) { + ProgramWithCachedVariableLocations* prg = + &gdraw->filter_prog[isbevel][r->filter_mode]; + if (!gdraw_TextureDrawBufferBegin( + s, GDRAW_TEXTURE_FORMAT_rgba32, + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, + NULL, gstats)) + return; + use_lazy_shader(prg); + set_texture(0, r->tex[0]); + set_texture(1, r->tex[1]); + set_texture(2, r->tex[2]); + glUniform4fv(prg->vars[0][VAR_filter_color], 1, &r->shader_data[0]); + glUniform4f(prg->vars[0][VAR_filter_tc_off], + -r->shader_data[4] / (F32)gdraw->frametex_width, + r->shader_data[5] / (F32)gdraw->frametex_height, + r->shader_data[6], 0); + if (prg->vars[0][VAR_filter_color2] >= 0) + glUniform4fv(prg->vars[0][VAR_filter_color2], 1, &r->shader_data[8]); + set_clamp_constant(prg->vars[0][VAR_filter_clamp0], r->tex[0]); + set_clamp_constant(prg->vars[0][VAR_filter_clamp1], r->tex[1]); + do_screen_quad(s, tc, prg->vars[1], gstats, 0); + tag_resources(r->tex[0], 0, 0); + r->tex[0] = gdraw_TextureDrawBufferEnd(gstats); } -static void RADLINK gdraw_FilterQuad(GDrawRenderState *r, S32 x0, S32 y0, S32 x1, S32 y1, GDrawStats *gstats) -{ - F32 tc[4]; - gswf_recti s; +static void RADLINK gdraw_FilterQuad(GDrawRenderState* r, S32 x0, S32 y0, + S32 x1, S32 y1, GDrawStats* gstats) { + F32 tc[4]; + gswf_recti s; - // clip to tile boundaries - s.x0 = RR_MAX(x0, gdraw->tx0p); - s.y0 = RR_MAX(y0, gdraw->ty0p); - s.x1 = RR_MIN(x1, gdraw->tx0p + gdraw->tpw); - s.y1 = RR_MIN(y1, gdraw->ty0p + gdraw->tph); - if (s.x1 <= s.x0 || s.y1 <= s.y0) - return; + // clip to tile boundaries + s.x0 = RR_MAX(x0, gdraw->tx0p); + s.y0 = RR_MAX(y0, gdraw->ty0p); + s.x1 = RR_MIN(x1, gdraw->tx0p + gdraw->tpw); + s.y1 = RR_MIN(y1, gdraw->ty0p + gdraw->tph); + if (s.x1 <= s.x0 || s.y1 <= s.y0) return; - // if it's a rendertarget, it's inverted from our design because OpenGL is bottom-left 0,0 - // and we have to compensate for scaling - tc[0] = (s.x0 - gdraw->tx0p) / (F32) gdraw->frametex_width; - tc[1] = (gdraw->tph - (s.y0 + gdraw->ty0p)) / (F32) gdraw->frametex_height; - tc[2] = (s.x1 - gdraw->tx0p) / (F32) gdraw->frametex_width; - tc[3] = (gdraw->tph - (s.y1 - gdraw->ty0p)) / (F32) gdraw->frametex_height; + // if it's a rendertarget, it's inverted from our design because OpenGL is + // bottom-left 0,0 and we have to compensate for scaling + tc[0] = (s.x0 - gdraw->tx0p) / (F32)gdraw->frametex_width; + tc[1] = (gdraw->tph - (s.y0 + gdraw->ty0p)) / (F32)gdraw->frametex_height; + tc[2] = (s.x1 - gdraw->tx0p) / (F32)gdraw->frametex_width; + tc[3] = (gdraw->tph - (s.y1 - gdraw->ty0p)) / (F32)gdraw->frametex_height; - glUseProgram(0); - set_texture(0, 0); - set_texture(1, 0); - set_texture(2, 0); + glUseProgram(0); + set_texture(0, 0); + set_texture(1, 0); + set_texture(2, 0); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - glStencilMask(255); - glDisable(GL_STENCIL_TEST); - glColorMask(1,1,1,1); - glDisable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - OPENGL_CHECK_SITE("gdraw_FilterQuad:pre_filter"); + glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); + glStencilMask(255); + glDisable(GL_STENCIL_TEST); + glColorMask(1, 1, 1, 1); + glDisable(GL_BLEND); + glDisable(GL_DEPTH_TEST); + OPENGL_CHECK_SITE("gdraw_FilterQuad:pre_filter"); - if (r->blend_mode == GDRAW_BLEND_filter) { - switch (r->filter) { - case GDRAW_FILTER_blur: { - GDrawBlurInfo b; - gswf_recti bounds = *get_valid_rect(r->tex[0]); - gdraw_ShiftRect(&s, &s, -gdraw->tx0p, -gdraw->ty0p); // blur uses physical rendertarget coordinates + if (r->blend_mode == GDRAW_BLEND_filter) { + switch (r->filter) { + case GDRAW_FILTER_blur: { + GDrawBlurInfo b; + gswf_recti bounds = *get_valid_rect(r->tex[0]); + gdraw_ShiftRect(&s, &s, -gdraw->tx0p, + -gdraw->ty0p); // blur uses physical + // rendertarget coordinates - b.BlurPass = gdraw_DriverBlurPass; - b.w = gdraw->tpw; - b.h = gdraw->tph; - b.frametex_width = gdraw->frametex_width; - b.frametex_height = gdraw->frametex_height; + b.BlurPass = gdraw_DriverBlurPass; + b.w = gdraw->tpw; + b.h = gdraw->tph; + b.frametex_width = gdraw->frametex_width; + b.frametex_height = gdraw->frametex_height; - // blur passes must override the viewport/ortho projection + // blur passes must override the viewport/ortho projection - gdraw->in_blur = true; // prevent viewport/projection munging in start/end texture - set_viewport(); - set_projection(); - gdraw_Blur(&gdraw_funcs, &b,r, &s, &bounds, gstats); + gdraw->in_blur = true; // prevent viewport/projection munging + // in start/end texture + set_viewport(); + set_projection(); + gdraw_Blur(&gdraw_funcs, &b, r, &s, &bounds, gstats); - gdraw->in_blur = false; + gdraw->in_blur = false; - set_viewport(); - set_projection(); - break; - } + set_viewport(); + set_projection(); + break; + } - case GDRAW_FILTER_colormatrix: - gdraw_Colormatrix(r, &s, tc, gstats); - break; + case GDRAW_FILTER_colormatrix: + gdraw_Colormatrix(r, &s, tc, gstats); + break; - case GDRAW_FILTER_dropshadow: - gdraw_Filter(r, &s, tc, 0, gstats); - break; + case GDRAW_FILTER_dropshadow: + gdraw_Filter(r, &s, tc, 0, gstats); + break; - case GDRAW_FILTER_bevel: - gdraw_Filter(r, &s, tc, 1, gstats); - break; + case GDRAW_FILTER_bevel: + gdraw_Filter(r, &s, tc, 1, gstats); + break; - default: - assert(0); - } - } else { - GDrawTexture *blend_tex = NULL; - const int *vvars; + default: + assert(0); + } + } else { + GDrawTexture* blend_tex = NULL; + const int* vvars; - // for crazy blend modes, we need to read back from the framebuffer - // and do the blending in the pixel shader. we do this with CopyTexSubImage, - // rather than trying to render-to-texture-all-along, because that's a pain. - // @TODO: propogate the rectangle down and only copy what we need, like in 360 + // for crazy blend modes, we need to read back from the framebuffer + // and do the blending in the pixel shader. we do this with + // CopyTexSubImage, rather than trying to render-to-texture-all-along, + // because that's a pain. + // @TODO: propogate the rectangle down and only copy what we need, like + // in 360 - if (r->blend_mode == GDRAW_BLEND_special) { - blend_tex = (GDrawTexture *) get_color_rendertarget(gstats); - glBindTexture(GL_TEXTURE_2D, ((GDrawHandle *) blend_tex)->handle.tex.gl); - if (gdraw->cur != gdraw->frame) - glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0,0, 0,0,gdraw->tpw,gdraw->tph); - else - glCopyTexSubImage2D(GL_TEXTURE_2D, 0, gdraw->tx0 - gdraw->tx0p, gdraw->ty0 - gdraw->ty0p, gdraw->vx,gdraw->vy,gdraw->tw,gdraw->th); + if (r->blend_mode == GDRAW_BLEND_special) { + blend_tex = (GDrawTexture*)get_color_rendertarget(gstats); + glBindTexture(GL_TEXTURE_2D, + ((GDrawHandle*)blend_tex)->handle.tex.gl); + if (gdraw->cur != gdraw->frame) + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, gdraw->tpw, + gdraw->tph); + else + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, gdraw->tx0 - gdraw->tx0p, + gdraw->ty0 - gdraw->ty0p, gdraw->vx, + gdraw->vy, gdraw->tw, gdraw->th); - set_texture(1, blend_tex); - } + set_texture(1, blend_tex); + } - if (!set_render_state(r, GDRAW_vformat_v2tc2, &vvars, NULL, gstats)) - return; - do_screen_quad(&s, tc, vvars, gstats, 0); - tag_resources(r->tex[0],r->tex[1],0); - if (blend_tex) - gdraw_FreeTexture(blend_tex, 0, gstats); - } + if (!set_render_state(r, GDRAW_vformat_v2tc2, &vvars, NULL, gstats)) + return; + do_screen_quad(&s, tc, vvars, gstats, 0); + tag_resources(r->tex[0], r->tex[1], 0); + if (blend_tex) gdraw_FreeTexture(blend_tex, 0, gstats); + } } -void gdraw_GLx_(NoMoreGDrawThisFrame)(void) -{ - clear_renderstate(); - ++gdraw->frame_counter; +void gdraw_GLx_(NoMoreGDrawThisFrame)(void) { + clear_renderstate(); + ++gdraw->frame_counter; } -void gdraw_GLx_(BeginCustomDraw)(IggyCustomDrawCallbackRegion *region, F32 *matrix) -{ - clear_renderstate(); - gdraw_GetObjectSpaceMatrix(matrix, region->o2w, gdraw->projection, depth_from_id(0), 1); +void gdraw_GLx_(BeginCustomDraw)(IggyCustomDrawCallbackRegion* region, + F32* matrix) { + clear_renderstate(); + gdraw_GetObjectSpaceMatrix(matrix, region->o2w, gdraw->projection, + depth_from_id(0), 1); } -void gdraw_GLx_(EndCustomDraw)(IggyCustomDrawCallbackRegion *region) -{ - set_common_renderstate(); +void gdraw_GLx_(EndCustomDraw)(IggyCustomDrawCallbackRegion* region) { + set_common_renderstate(); } - /////////////////////////////////////////////////////////////////////// // // Vertex and Fragment program initialization @@ -2015,230 +2148,238 @@ void gdraw_GLx_(EndCustomDraw)(IggyCustomDrawCallbackRegion *region) #include GDRAW_SHADERS -static void make_vars(GDrawGLProgram prog, S32 vars[2][8], char **varn) -{ - if (prog) { - char **varn2 = (varn == pshader_general2_vars ? vshader_vsglihud_vars : vshader_vsgl_vars); - S32 k; - for (k=0; varn[k]; ++k) - if (varn[k][0]) - vars[0][k] = glGetUniformLocation(prog, varn[k]); - else - vars[0][k] = -1; +static void make_vars(GDrawGLProgram prog, S32 vars[2][8], char** varn) { + if (prog) { + char** varn2 = (varn == pshader_general2_vars ? vshader_vsglihud_vars + : vshader_vsgl_vars); + S32 k; + for (k = 0; varn[k]; ++k) + if (varn[k][0]) + vars[0][k] = glGetUniformLocation(prog, varn[k]); + else + vars[0][k] = -1; - for (k=0; varn2[k]; ++k) - if (varn2[k][0]) - vars[1][k] = glGetUniformLocation(prog, varn2[k]); - else - vars[1][k] = -1; + for (k = 0; varn2[k]; ++k) + if (varn2[k][0]) + vars[1][k] = glGetUniformLocation(prog, varn2[k]); + else + vars[1][k] = -1; - if (vars[0][0] >= 0) - assert(vars[0][0] != vars[0][1]); - } + if (vars[0][0] >= 0) assert(vars[0][0] != vars[0][1]); + } } -static void make_fragment_program(ProgramWithCachedVariableLocations *p, int num_strings, char **strings, char **varn) -{ - S32 i; - GLint res; - GDrawGLProgram shad; - opengl_check(); - for (i=0; i < MAX_VARS; ++i) { - p->vars[0][i] = -1; - p->vars[1][i] = -1; - } +static void make_fragment_program(ProgramWithCachedVariableLocations* p, + int num_strings, char** strings, + char** varn) { + S32 i; + GLint res; + GDrawGLProgram shad; + opengl_check(); + for (i = 0; i < MAX_VARS; ++i) { + p->vars[0][i] = -1; + p->vars[1][i] = -1; + } - shad = glCreateShader(GL_FRAGMENT_SHADER); - glShaderSource(shad, num_strings, (const GLchar **)strings, NULL); - glCompileShader(shad); - glGetShaderiv(shad, GL_COMPILE_STATUS, &res); - if (!res) { - char errors[512]; - glGetShaderInfoLog(shad, sizeof(errors)-2, &res, errors); - compilation_err(errors); - p->program = 0; - } else { - S32 vert = GDRAW_vformat_v2tc2; - ProgramWithCachedVariableLocations *basic_fprog_begin = &gdraw->fprog[0][0][0]; - ProgramWithCachedVariableLocations *basic_fprog_end = - basic_fprog_begin + (sizeof(gdraw->fprog) / sizeof(gdraw->fprog[0][0][0])); - if (p >= basic_fprog_begin && p < basic_fprog_end) { - // for basic rendering shaders, we have three versions corresponding to the - // three vertex formats we support. - S32 n = (S32) (p - basic_fprog_begin); - vert = n % 3; - } + shad = glCreateShader(GL_FRAGMENT_SHADER); + glShaderSource(shad, num_strings, (const GLchar**)strings, NULL); + glCompileShader(shad); + glGetShaderiv(shad, GL_COMPILE_STATUS, &res); + if (!res) { + char errors[512]; + glGetShaderInfoLog(shad, sizeof(errors) - 2, &res, errors); + compilation_err(errors); + p->program = 0; + } else { + S32 vert = GDRAW_vformat_v2tc2; + ProgramWithCachedVariableLocations* basic_fprog_begin = + &gdraw->fprog[0][0][0]; + ProgramWithCachedVariableLocations* basic_fprog_end = + basic_fprog_begin + + (sizeof(gdraw->fprog) / sizeof(gdraw->fprog[0][0][0])); + if (p >= basic_fprog_begin && p < basic_fprog_end) { + // for basic rendering shaders, we have three versions corresponding + // to the three vertex formats we support. + S32 n = (S32)(p - basic_fprog_begin); + vert = n % 3; + } - if (p == &gdraw->ihud[0]) - vert = GDRAW_vformat_ihud1; + if (p == &gdraw->ihud[0]) vert = GDRAW_vformat_ihud1; - opengl_check(); - p->program = glCreateProgram(); - glAttachShader(p->program, shad); - glAttachShader(p->program, gdraw->vert[vert]); - opengl_check(); + opengl_check(); + p->program = glCreateProgram(); + glAttachShader(p->program, shad); + glAttachShader(p->program, gdraw->vert[vert]); + opengl_check(); - if (vert == GDRAW_vformat_ihud1) { - glBindAttribLocation(p->program, 0, "position"); - glBindAttribLocation(p->program, 1, "texcoord"); - glBindAttribLocation(p->program, 2, "material_index"); - } else { - glBindAttribLocation(p->program, 0, "position"); - glBindAttribLocation(p->program, 1, "in_attr"); - } + if (vert == GDRAW_vformat_ihud1) { + glBindAttribLocation(p->program, 0, "position"); + glBindAttribLocation(p->program, 1, "texcoord"); + glBindAttribLocation(p->program, 2, "material_index"); + } else { + glBindAttribLocation(p->program, 0, "position"); + glBindAttribLocation(p->program, 1, "in_attr"); + } - glLinkProgram(p->program); - glGetProgramiv(p->program, GL_LINK_STATUS, &res); - if (!res) { - char errors[512]; - glGetProgramiv(p->program, GL_INFO_LOG_LENGTH, &res); - glGetProgramInfoLog(p->program, sizeof(errors)-2, &res, errors); - compilation_err(errors); - glDeleteShader(shad); - glDeleteProgram(p->program); - p->program = 0; - } else - make_vars(p->program, p->vars, varn); - } - opengl_check(); - glUseProgram(p->program); // now activate the program - opengl_check(); + glLinkProgram(p->program); + glGetProgramiv(p->program, GL_LINK_STATUS, &res); + if (!res) { + char errors[512]; + glGetProgramiv(p->program, GL_INFO_LOG_LENGTH, &res); + glGetProgramInfoLog(p->program, sizeof(errors) - 2, &res, errors); + compilation_err(errors); + glDeleteShader(shad); + glDeleteProgram(p->program); + p->program = 0; + } else + make_vars(p->program, p->vars, varn); + } + opengl_check(); + glUseProgram(p->program); // now activate the program + opengl_check(); } -static void make_vertex_program(GLuint *vprog, int num_strings, char **strings) -{ - GLint res; - GDrawGLProgram shad; - opengl_check(); +static void make_vertex_program(GLuint* vprog, int num_strings, + char** strings) { + GLint res; + GDrawGLProgram shad; + opengl_check(); - if(strings[0]) - { - shad = glCreateShader(GL_VERTEX_SHADER); - glShaderSource(shad, num_strings, (const GLchar **)strings, NULL); - glCompileShader(shad); - glGetShaderiv(shad, GL_COMPILE_STATUS, &res); - if (!res) { - char errors[512]; - glGetShaderInfoLog(shad, sizeof(errors)-2, &res, errors); - compilation_err(errors); - glDeleteShader(shad); - shad = 0; - } - opengl_check(); - *vprog = shad; - } - else - { - *vprog = 0; - } + if (strings[0]) { + shad = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(shad, num_strings, (const GLchar**)strings, NULL); + glCompileShader(shad); + glGetShaderiv(shad, GL_COMPILE_STATUS, &res); + if (!res) { + char errors[512]; + glGetShaderInfoLog(shad, sizeof(errors) - 2, &res, errors); + compilation_err(errors); + glDeleteShader(shad); + shad = 0; + } + opengl_check(); + *vprog = shad; + } else { + *vprog = 0; + } } -static void bind_sampler(ProgramWithCachedVariableLocations *prog, int varidx, int sampleridx) -{ - int var = prog->vars[0][varidx]; - if (var >= 0) - glUniform1i(var, sampleridx); +static void bind_sampler(ProgramWithCachedVariableLocations* prog, int varidx, + int sampleridx) { + int var = prog->vars[0][varidx]; + if (var >= 0) glUniform1i(var, sampleridx); } -static void make_vertex_programs(void) -{ - int type; - for (type=0; type < GDRAW_vformat__basic_count; type++) - make_vertex_program(&gdraw->vert[type], NUMFRAGMENTS_vshader_vsgl, vshader_vsgl(type)); - type = GDRAW_vformat_ihud1; - make_vertex_program(&gdraw->vert[type], NUMFRAGMENTS_vshader_vsglihud, vshader_vsglihud()); +static void make_vertex_programs(void) { + int type; + for (type = 0; type < GDRAW_vformat__basic_count; type++) + make_vertex_program(&gdraw->vert[type], NUMFRAGMENTS_vshader_vsgl, + vshader_vsgl(type)); + type = GDRAW_vformat_ihud1; + make_vertex_program(&gdraw->vert[type], NUMFRAGMENTS_vshader_vsglihud, + vshader_vsglihud()); } -static void lazy_shader(ProgramWithCachedVariableLocations *ptr) -{ - ProgramWithCachedVariableLocations *basic_fprog_begin = &gdraw->fprog[0][0][0]; - ProgramWithCachedVariableLocations *basic_fprog_end = - basic_fprog_begin + (sizeof(gdraw->fprog) / sizeof(gdraw->fprog[0][0][0])); +static void lazy_shader(ProgramWithCachedVariableLocations* ptr) { + ProgramWithCachedVariableLocations* basic_fprog_begin = + &gdraw->fprog[0][0][0]; + ProgramWithCachedVariableLocations* basic_fprog_end = + basic_fprog_begin + + (sizeof(gdraw->fprog) / sizeof(gdraw->fprog[0][0][0])); - if (ptr >= basic_fprog_begin && ptr < basic_fprog_end) { - S32 n = (S32) (ptr - basic_fprog_begin); - n /= 3; + if (ptr >= basic_fprog_begin && ptr < basic_fprog_end) { + S32 n = (S32)(ptr - basic_fprog_begin); + n /= 3; - make_fragment_program(ptr, NUMFRAGMENTS_pshader_basic, pshader_basic_arr[n], pshader_basic_vars); - bind_sampler(ptr, VAR_tex0, 0); - bind_sampler(ptr, VAR_tex1, AATEX_SAMPLER); - return; - } + make_fragment_program(ptr, NUMFRAGMENTS_pshader_basic, + pshader_basic_arr[n], pshader_basic_vars); + bind_sampler(ptr, VAR_tex0, 0); + bind_sampler(ptr, VAR_tex1, AATEX_SAMPLER); + return; + } - if (ptr >= &gdraw->exceptional_blend[0] && ptr < &gdraw->exceptional_blend[GDRAW_BLENDSPECIAL__count]) { - S32 n = (S32) (ptr - gdraw->exceptional_blend); - make_fragment_program(ptr, NUMFRAGMENTS_pshader_exceptional_blend, pshader_exceptional_blend_arr[n], pshader_exceptional_blend_vars); - bind_sampler(ptr, VAR_tex0, 0); - bind_sampler(ptr, VAR_tex1, 1); - return; - } + if (ptr >= &gdraw->exceptional_blend[0] && + ptr < &gdraw->exceptional_blend[GDRAW_BLENDSPECIAL__count]) { + S32 n = (S32)(ptr - gdraw->exceptional_blend); + make_fragment_program(ptr, NUMFRAGMENTS_pshader_exceptional_blend, + pshader_exceptional_blend_arr[n], + pshader_exceptional_blend_vars); + bind_sampler(ptr, VAR_tex0, 0); + bind_sampler(ptr, VAR_tex1, 1); + return; + } - if (ptr >= &gdraw->filter_prog[0][0] && ptr <= &gdraw->filter_prog[1][15]) { - S32 n = (S32) (ptr - gdraw->filter_prog[0]); - make_fragment_program(ptr, NUMFRAGMENTS_pshader_filter, pshader_filter_arr[n], pshader_filter_vars); - bind_sampler(ptr, VAR_filter_tex0, 0); - bind_sampler(ptr, VAR_filter_tex1, 1); - bind_sampler(ptr, VAR_filter_tex2, 2); - return; - } + if (ptr >= &gdraw->filter_prog[0][0] && ptr <= &gdraw->filter_prog[1][15]) { + S32 n = (S32)(ptr - gdraw->filter_prog[0]); + make_fragment_program(ptr, NUMFRAGMENTS_pshader_filter, + pshader_filter_arr[n], pshader_filter_vars); + bind_sampler(ptr, VAR_filter_tex0, 0); + bind_sampler(ptr, VAR_filter_tex1, 1); + bind_sampler(ptr, VAR_filter_tex2, 2); + return; + } - if (ptr >= &gdraw->blur_prog[0] && ptr <= &gdraw->blur_prog[MAX_TAPS]) { - S32 n = (S32) (ptr - gdraw->blur_prog); - make_fragment_program(ptr, NUMFRAGMENTS_pshader_blur, pshader_blur_arr[n], pshader_blur_vars); - bind_sampler(ptr, VAR_blur_tex0, 0); - return; - } + if (ptr >= &gdraw->blur_prog[0] && ptr <= &gdraw->blur_prog[MAX_TAPS]) { + S32 n = (S32)(ptr - gdraw->blur_prog); + make_fragment_program(ptr, NUMFRAGMENTS_pshader_blur, + pshader_blur_arr[n], pshader_blur_vars); + bind_sampler(ptr, VAR_blur_tex0, 0); + return; + } - if (ptr == &gdraw->colormatrix) { - make_fragment_program(ptr, NUMFRAGMENTS_pshader_color_matrix, pshader_color_matrix_arr[0], pshader_color_matrix_vars); - bind_sampler(ptr, VAR_colormatrix_tex0, 0); - return; - } + if (ptr == &gdraw->colormatrix) { + make_fragment_program(ptr, NUMFRAGMENTS_pshader_color_matrix, + pshader_color_matrix_arr[0], + pshader_color_matrix_vars); + bind_sampler(ptr, VAR_colormatrix_tex0, 0); + return; + } - if (ptr == &gdraw->manual_clear) { - make_fragment_program(ptr, NUMFRAGMENTS_pshader_manual_clear, pshader_manual_clear_arr[0], pshader_manual_clear_vars); - return; - } + if (ptr == &gdraw->manual_clear) { + make_fragment_program(ptr, NUMFRAGMENTS_pshader_manual_clear, + pshader_manual_clear_arr[0], + pshader_manual_clear_vars); + return; + } - if (ptr == &gdraw->ihud[0]) { - make_fragment_program(ptr, NUMFRAGMENTS_pshader_general2, pshader_general2_arr[0], pshader_general2_vars); - bind_sampler(ptr, VAR_tex0, 0); - return; - } + if (ptr == &gdraw->ihud[0]) { + make_fragment_program(ptr, NUMFRAGMENTS_pshader_general2, + pshader_general2_arr[0], pshader_general2_vars); + bind_sampler(ptr, VAR_tex0, 0); + return; + } - RR_BREAK(); + RR_BREAK(); } -static rrbool make_quad_indices(void) -{ - int size = QUAD_IB_COUNT * 6 * sizeof(GLushort); - GLushort *inds = IggyGDrawMalloc(size); - int i, e; +static rrbool make_quad_indices(void) { + int size = QUAD_IB_COUNT * 6 * sizeof(GLushort); + GLushort* inds = IggyGDrawMalloc(size); + int i, e; - if (!inds) - return 0; + if (!inds) return 0; - // make quad inds - for (i=0; i < QUAD_IB_COUNT; i++) { - inds[i*6 + 0] = (GLushort) (i*4 + 0); - inds[i*6 + 1] = (GLushort) (i*4 + 1); - inds[i*6 + 2] = (GLushort) (i*4 + 2); - inds[i*6 + 3] = (GLushort) (i*4 + 0); - inds[i*6 + 4] = (GLushort) (i*4 + 2); - inds[i*6 + 5] = (GLushort) (i*4 + 3); - } + // make quad inds + for (i = 0; i < QUAD_IB_COUNT; i++) { + inds[i * 6 + 0] = (GLushort)(i * 4 + 0); + inds[i * 6 + 1] = (GLushort)(i * 4 + 1); + inds[i * 6 + 2] = (GLushort)(i * 4 + 2); + inds[i * 6 + 3] = (GLushort)(i * 4 + 0); + inds[i * 6 + 4] = (GLushort)(i * 4 + 2); + inds[i * 6 + 5] = (GLushort)(i * 4 + 3); + } - glGenBuffers(1, &gdraw->quad_ib); - glBindBuffer(GL_ARRAY_BUFFER, gdraw->quad_ib); - glBufferData(GL_ARRAY_BUFFER, size, inds, GL_STATIC_DRAW); - IggyGDrawFree(inds); - e = glGetError(); - if (e != GL_NO_ERROR) { - eat_gl_err(); - return 0; - } + glGenBuffers(1, &gdraw->quad_ib); + glBindBuffer(GL_ARRAY_BUFFER, gdraw->quad_ib); + glBufferData(GL_ARRAY_BUFFER, size, inds, GL_STATIC_DRAW); + IggyGDrawFree(inds); + e = glGetError(); + if (e != GL_NO_ERROR) { + eat_gl_err(); + return 0; + } - return 1; + return 1; } //////////////////////////////////////////////////////////////////////// @@ -2246,306 +2387,309 @@ static rrbool make_quad_indices(void) // Create and tear-down the state // -typedef struct -{ - S32 num_handles; - S32 num_bytes; +typedef struct { + S32 num_handles; + S32 num_bytes; } GDrawResourceLimit; -// These are the defaults limits used by GDraw unless the user specifies something else. +// These are the defaults limits used by GDraw unless the user specifies +// something else. static GDrawResourceLimit gdraw_limits[GDRAW_GLx_(RESOURCE__count)] = { - MAX_RENDER_STACK_DEPTH + 1, 16*1024*1024, // GDRAW_GLx_RESOURCE_rendertarget - 500, 20*1024*1024, // GDRAW_GLx_RESOURCE_texture - 1000, 2*1024*1024, // GDRAW_GLx_RESOURCE_vertexbuffer + MAX_RENDER_STACK_DEPTH + 1, + 16 * 1024 * 1024, // GDRAW_GLx_RESOURCE_rendertarget + 500, + 20 * 1024 * 1024, // GDRAW_GLx_RESOURCE_texture + 1000, + 2 * 1024 * 1024, // GDRAW_GLx_RESOURCE_vertexbuffer }; -static GDrawHandleCache *make_handle_cache(gdraw_resourcetype type) -{ - S32 num_handles = gdraw_limits[type].num_handles; - S32 num_bytes = gdraw_limits[type].num_bytes; - GDrawHandleCache *cache = (GDrawHandleCache *) IggyGDrawMalloc(sizeof(GDrawHandleCache) + (num_handles - 1) * sizeof(GDrawHandle)); - if (cache) { - gdraw_HandleCacheInit(cache, num_handles, num_bytes); - cache->is_vertex = (type == GDRAW_GLx_(RESOURCE_vertexbuffer)); - } +static GDrawHandleCache* make_handle_cache(gdraw_resourcetype type) { + S32 num_handles = gdraw_limits[type].num_handles; + S32 num_bytes = gdraw_limits[type].num_bytes; + GDrawHandleCache* cache = (GDrawHandleCache*)IggyGDrawMalloc( + sizeof(GDrawHandleCache) + (num_handles - 1) * sizeof(GDrawHandle)); + if (cache) { + gdraw_HandleCacheInit(cache, num_handles, num_bytes); + cache->is_vertex = (type == GDRAW_GLx_(RESOURCE_vertexbuffer)); + } - return cache; + return cache; } -static void free_gdraw() -{ - if (!gdraw) return; - if (gdraw->texturecache) IggyGDrawFree(gdraw->texturecache); - if (gdraw->vbufcache) IggyGDrawFree(gdraw->vbufcache); - IggyGDrawFree(gdraw); - gdraw = NULL; +static void free_gdraw() { + if (!gdraw) return; + if (gdraw->texturecache) IggyGDrawFree(gdraw->texturecache); + if (gdraw->vbufcache) IggyGDrawFree(gdraw->vbufcache); + IggyGDrawFree(gdraw); + gdraw = NULL; } -int gdraw_GLx_(SetResourceLimits)(gdraw_resourcetype type, S32 num_handles, S32 num_bytes) -{ - GDrawStats stats={0}; +int gdraw_GLx_(SetResourceLimits)(gdraw_resourcetype type, S32 num_handles, + S32 num_bytes) { + GDrawStats stats = {0}; - if (type == GDRAW_GLx_(RESOURCE_rendertarget)) // RT count is small and space is preallocated - num_handles = MAX_RENDER_STACK_DEPTH + 1; + if (type == GDRAW_GLx_(RESOURCE_rendertarget)) // RT count is small and + // space is preallocated + num_handles = MAX_RENDER_STACK_DEPTH + 1; - assert(type >= GDRAW_GLx_(RESOURCE_rendertarget) && type < GDRAW_GLx_(RESOURCE__count)); - assert(num_handles >= 0); - assert(num_bytes >= 0); + assert(type >= GDRAW_GLx_(RESOURCE_rendertarget) && + type < GDRAW_GLx_(RESOURCE__count)); + assert(num_handles >= 0); + assert(num_bytes >= 0); - // nothing to do if the values are unchanged - if (gdraw_limits[type].num_handles == num_handles && - gdraw_limits[type].num_bytes == num_bytes) - return 1; + // nothing to do if the values are unchanged + if (gdraw_limits[type].num_handles == num_handles && + gdraw_limits[type].num_bytes == num_bytes) + return 1; - gdraw_limits[type].num_handles = num_handles; - gdraw_limits[type].num_bytes = num_bytes; + gdraw_limits[type].num_handles = num_handles; + gdraw_limits[type].num_bytes = num_bytes; - // if no gdraw context created, there's nothing to worry about - if (!gdraw) - return 1; + // if no gdraw context created, there's nothing to worry about + if (!gdraw) return 1; - // resize the appropriate pool - switch (type) { - case GDRAW_GLx_(RESOURCE_rendertarget): - flush_rendertargets(&stats); - gdraw_HandleCacheInit(&gdraw->rendertargets, num_handles, num_bytes); - return 1; - - case GDRAW_GLx_(RESOURCE_texture): - if (gdraw->texturecache) { - gdraw_res_flush(gdraw->texturecache, &stats); - IggyGDrawFree(gdraw->texturecache); - } - gdraw->texturecache = make_handle_cache(GDRAW_GLx_(RESOURCE_texture)); - return gdraw->texturecache != NULL; + // resize the appropriate pool + switch (type) { + case GDRAW_GLx_(RESOURCE_rendertarget): + flush_rendertargets(&stats); + gdraw_HandleCacheInit(&gdraw->rendertargets, num_handles, + num_bytes); + return 1; - case GDRAW_GLx_(RESOURCE_vertexbuffer): - if (gdraw->vbufcache) { - gdraw_res_flush(gdraw->vbufcache, &stats); - IggyGDrawFree(gdraw->vbufcache); - } - gdraw->vbufcache = make_handle_cache(GDRAW_GLx_(RESOURCE_vertexbuffer)); - return gdraw->vbufcache != NULL; + case GDRAW_GLx_(RESOURCE_texture): + if (gdraw->texturecache) { + gdraw_res_flush(gdraw->texturecache, &stats); + IggyGDrawFree(gdraw->texturecache); + } + gdraw->texturecache = + make_handle_cache(GDRAW_GLx_(RESOURCE_texture)); + return gdraw->texturecache != NULL; - default: - return 0; - } + case GDRAW_GLx_(RESOURCE_vertexbuffer): + if (gdraw->vbufcache) { + gdraw_res_flush(gdraw->vbufcache, &stats); + IggyGDrawFree(gdraw->vbufcache); + } + gdraw->vbufcache = + make_handle_cache(GDRAW_GLx_(RESOURCE_vertexbuffer)); + return gdraw->vbufcache != NULL; + + default: + return 0; + } } -GDrawTexture * RADLINK gdraw_GLx_(MakeTextureFromResource)(U8 *resource_file, S32 len, IggyFileTextureRaw *texture) -{ - int i, offset, mips; - const TextureFormatDesc *fmt; - GDrawTexture *tex; - GLuint gl_texture_handle; +GDrawTexture* RADLINK gdraw_GLx_(MakeTextureFromResource)( + U8* resource_file, S32 len, IggyFileTextureRaw* texture) { + int i, offset, mips; + const TextureFormatDesc* fmt; + GDrawTexture* tex; + GLuint gl_texture_handle; - // look up the texture format - fmt = gdraw->tex_formats; - while (fmt->iggyfmt != texture->format && fmt->blkbytes) - fmt++; - if (!fmt->blkbytes) // end of list - i.e. format not supported - return NULL; + // look up the texture format + fmt = gdraw->tex_formats; + while (fmt->iggyfmt != texture->format && fmt->blkbytes) fmt++; + if (!fmt->blkbytes) // end of list - i.e. format not supported + return NULL; - // prepare texture - glGenTextures(1, &gl_texture_handle); - if (gl_texture_handle == 0) - return NULL; + // prepare texture + glGenTextures(1, &gl_texture_handle); + if (gl_texture_handle == 0) return NULL; - opengl_check(); - make_texture(gl_texture_handle); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + opengl_check(); + make_texture(gl_texture_handle); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - offset = texture->file_offset; - mips = RR_MAX(texture->mipmaps, 1); + offset = texture->file_offset; + mips = RR_MAX(texture->mipmaps, 1); - // disable mipmaps if non-pow-2 is unsupported - if (gdraw->has_conditional_non_power_of_two) - if (!is_pow2(texture->w) || !is_pow2(texture->h)) - mips = 1; + // disable mipmaps if non-pow-2 is unsupported + if (gdraw->has_conditional_non_power_of_two) + if (!is_pow2(texture->w) || !is_pow2(texture->h)) mips = 1; - // disable mipmaps if chain is incomplete and GL_TEXTURE_MAX_LEVEL is unsupported - if (!gdraw->has_texture_max_level && mips > 1) { - int lastmip = mips-1; - if ((texture->w >> lastmip) > 1 || (texture->h >> lastmip) > 1) - mips = 1; - } + // disable mipmaps if chain is incomplete and GL_TEXTURE_MAX_LEVEL is + // unsupported + if (!gdraw->has_texture_max_level && mips > 1) { + int lastmip = mips - 1; + if ((texture->w >> lastmip) > 1 || (texture->h >> lastmip) > 1) + mips = 1; + } - for (i=0; i < mips; i++) { - U8 *data = resource_file + offset; - int w = RR_MAX(texture->w >> i, 1); - int h = RR_MAX(texture->h >> i, 1); - int j; + for (i = 0; i < mips; i++) { + U8* data = resource_file + offset; + int w = RR_MAX(texture->w >> i, 1); + int h = RR_MAX(texture->h >> i, 1); + int j; - if (texture->format == IFT_FORMAT_rgba_4444_LE) { - for (j=0; j < w * h; ++j) { - unsigned short x = * (unsigned short *) (data + j*2); - x = ((x>>12) & 0xf) | ((x<<4) & 0xfff0); - * (unsigned short *) (data + j*2) = x; - } - } - if (texture->format == IFT_FORMAT_rgba_5551_LE) { - for (j=0; j < w * h; ++j) { - unsigned short x = * (unsigned short *) (data + j*2); - x = (x >> 15) | (x << 1); - * (unsigned short *) (data + j*2) = x; - } - } + if (texture->format == IFT_FORMAT_rgba_4444_LE) { + for (j = 0; j < w * h; ++j) { + unsigned short x = *(unsigned short*)(data + j * 2); + x = ((x >> 12) & 0xf) | ((x << 4) & 0xfff0); + *(unsigned short*)(data + j * 2) = x; + } + } + if (texture->format == IFT_FORMAT_rgba_5551_LE) { + for (j = 0; j < w * h; ++j) { + unsigned short x = *(unsigned short*)(data + j * 2); + x = (x >> 15) | (x << 1); + *(unsigned short*)(data + j * 2) = x; + } + } - if (fmt->fmt != 0) { - glTexImage2D(GL_TEXTURE_2D, i, fmt->intfmt, w, h, 0, fmt->fmt, fmt->type, data); - offset += w * h * fmt->blkbytes; - } else { - int size = ((w + fmt->blkx-1) / fmt->blkx) * ((h + fmt->blky-1) / fmt->blky) * fmt->blkbytes; - glCompressedTexImage2D(GL_TEXTURE_2D, i, fmt->intfmt, w, h, 0, size, data); - offset += size; - } + if (fmt->fmt != 0) { + glTexImage2D(GL_TEXTURE_2D, i, fmt->intfmt, w, h, 0, fmt->fmt, + fmt->type, data); + offset += w * h * fmt->blkbytes; + } else { + int size = ((w + fmt->blkx - 1) / fmt->blkx) * + ((h + fmt->blky - 1) / fmt->blky) * fmt->blkbytes; + glCompressedTexImage2D(GL_TEXTURE_2D, i, fmt->intfmt, w, h, 0, size, + data); + offset += size; + } - opengl_check(); - } + opengl_check(); + } - if (gdraw->has_texture_max_level) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, mips-1); + if (gdraw->has_texture_max_level) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, mips - 1); - tex = gdraw_GLx_(WrappedTextureCreate)(gl_texture_handle, texture->w, texture->h, mips > 1); - if (tex == NULL) - glDeleteTextures(1, &gl_texture_handle); - opengl_check(); - return tex; + tex = gdraw_GLx_(WrappedTextureCreate)(gl_texture_handle, texture->w, + texture->h, mips > 1); + if (tex == NULL) glDeleteTextures(1, &gl_texture_handle); + opengl_check(); + return tex; } -void RADLINK gdraw_GLx_(DestroyTextureFromResource)(GDrawTexture *tex) -{ - if (tex) - gdraw_GLx_(WrappedTextureDestroy)(tex); +void RADLINK gdraw_GLx_(DestroyTextureFromResource)(GDrawTexture* tex) { + if (tex) gdraw_GLx_(WrappedTextureDestroy)(tex); } -static rrbool hasext(const char *exts, const char *which) -{ - const char *where; - size_t len; +static rrbool hasext(const char* exts, const char* which) { + const char* where; + size_t len; #ifdef GDRAW_USE_glGetStringi - if (exts == NULL) { - GLint i, num_exts; - glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts); - for (i=0; i < num_exts; ++i) - if (0==strcmp(which, (char const *) glGetStringi(GL_EXTENSIONS, i))) - return 1; - return 0; - } + if (exts == NULL) { + GLint i, num_exts; + glGetIntegerv(GL_NUM_EXTENSIONS, &num_exts); + for (i = 0; i < num_exts; ++i) + if (0 == strcmp(which, (char const*)glGetStringi(GL_EXTENSIONS, i))) + return 1; + return 0; + } #endif - where = exts; - len = strlen(which); + where = exts; + len = strlen(which); - for(;;) { - where = strstr(where, which); - if (where == NULL) - return false; + for (;;) { + where = strstr(where, which); + if (where == NULL) return false; - if ( (where == exts || *(where - 1) == ' ') // starts with terminator - && (where[len] == ' ' || where[len] == 0)) // ends with terminator - return true; - where += len; - } + if ((where == exts || *(where - 1) == ' ') // starts with terminator + && (where[len] == ' ' || where[len] == 0)) // ends with terminator + return true; + where += len; + } } -static GDrawFunctions *create_context(S32 w, S32 h) -{ - gdraw = IggyGDrawMalloc(sizeof(*gdraw)); - if (!gdraw) return NULL; +static GDrawFunctions* create_context(S32 w, S32 h) { + gdraw = IggyGDrawMalloc(sizeof(*gdraw)); + if (!gdraw) return NULL; - memset(gdraw, 0, sizeof(*gdraw)); + memset(gdraw, 0, sizeof(*gdraw)); - gdraw->texturecache = make_handle_cache(GDRAW_GLx_(RESOURCE_texture)); - gdraw->vbufcache = make_handle_cache(GDRAW_GLx_(RESOURCE_vertexbuffer)); - gdraw_HandleCacheInit(&gdraw->rendertargets, gdraw_limits[GDRAW_GLx_(RESOURCE_rendertarget)].num_handles, gdraw_limits[GDRAW_GLx_(RESOURCE_rendertarget)].num_bytes); + gdraw->texturecache = make_handle_cache(GDRAW_GLx_(RESOURCE_texture)); + gdraw->vbufcache = make_handle_cache(GDRAW_GLx_(RESOURCE_vertexbuffer)); + gdraw_HandleCacheInit( + &gdraw->rendertargets, + gdraw_limits[GDRAW_GLx_(RESOURCE_rendertarget)].num_handles, + gdraw_limits[GDRAW_GLx_(RESOURCE_rendertarget)].num_bytes); - if (!gdraw->texturecache || !gdraw->vbufcache || !make_quad_indices()) { - free_gdraw(); - return NULL; - } + if (!gdraw->texturecache || !gdraw->vbufcache || !make_quad_indices()) { + free_gdraw(); + return NULL; + } - opengl_check(); + opengl_check(); - gdraw->frametex_width = w; - gdraw->frametex_height = h; - gdraw->frame->cached = false; + gdraw->frametex_width = w; + gdraw->frametex_height = h; + gdraw->frame->cached = false; - // if the globals have already been initialized, this has no effect; - // otherwise it initializes them with no global texture storage and the - // default global rendertarget storage + // if the globals have already been initialized, this has no effect; + // otherwise it initializes them with no global texture storage and the + // default global rendertarget storage - glGenFramebuffers(1, &gdraw->framebuffer_stack_object); - glGenFramebuffers(1, &gdraw->framebuffer_copy_to_texture); - opengl_check(); + glGenFramebuffers(1, &gdraw->framebuffer_stack_object); + glGenFramebuffers(1, &gdraw->framebuffer_copy_to_texture); + opengl_check(); - make_vertex_programs(); - // fragment shaders are created lazily + make_vertex_programs(); + // fragment shaders are created lazily - gdraw_funcs.SetViewSizeAndWorldScale = gdraw_SetViewSizeAndWorldScale; - gdraw_funcs.RenderingBegin = gdraw_RenderingBegin; - gdraw_funcs.RenderingEnd = gdraw_RenderingEnd; - gdraw_funcs.RenderTileBegin = gdraw_RenderTileBegin; - gdraw_funcs.RenderTileEnd = gdraw_RenderTileEnd; - gdraw_funcs.GetInfo = gdraw_GetInfo; - gdraw_funcs.DescribeTexture = gdraw_DescribeTexture; - gdraw_funcs.DescribeVertexBuffer = gdraw_DescribeVertexBuffer; + gdraw_funcs.SetViewSizeAndWorldScale = gdraw_SetViewSizeAndWorldScale; + gdraw_funcs.RenderingBegin = gdraw_RenderingBegin; + gdraw_funcs.RenderingEnd = gdraw_RenderingEnd; + gdraw_funcs.RenderTileBegin = gdraw_RenderTileBegin; + gdraw_funcs.RenderTileEnd = gdraw_RenderTileEnd; + gdraw_funcs.GetInfo = gdraw_GetInfo; + gdraw_funcs.DescribeTexture = gdraw_DescribeTexture; + gdraw_funcs.DescribeVertexBuffer = gdraw_DescribeVertexBuffer; - gdraw_funcs.TextureDrawBufferBegin = gdraw_TextureDrawBufferBegin; - gdraw_funcs.TextureDrawBufferEnd = gdraw_TextureDrawBufferEnd; + gdraw_funcs.TextureDrawBufferBegin = gdraw_TextureDrawBufferBegin; + gdraw_funcs.TextureDrawBufferEnd = gdraw_TextureDrawBufferEnd; - gdraw_funcs.DrawIndexedTriangles = gdraw_DrawIndexedTriangles; - gdraw_funcs.FilterQuad = gdraw_FilterQuad; + gdraw_funcs.DrawIndexedTriangles = gdraw_DrawIndexedTriangles; + gdraw_funcs.FilterQuad = gdraw_FilterQuad; - gdraw_funcs.SetAntialiasTexture = gdraw_SetAntialiasTexture; + gdraw_funcs.SetAntialiasTexture = gdraw_SetAntialiasTexture; - gdraw_funcs.ClearStencilBits = gdraw_ClearStencilBits; - gdraw_funcs.ClearID = gdraw_ClearID; + gdraw_funcs.ClearStencilBits = gdraw_ClearStencilBits; + gdraw_funcs.ClearID = gdraw_ClearID; - gdraw_funcs.MakeTextureBegin = gdraw_MakeTextureBegin; - gdraw_funcs.MakeTextureMore = NULL; - gdraw_funcs.MakeTextureEnd = gdraw_MakeTextureEnd; + gdraw_funcs.MakeTextureBegin = gdraw_MakeTextureBegin; + gdraw_funcs.MakeTextureMore = NULL; + gdraw_funcs.MakeTextureEnd = gdraw_MakeTextureEnd; - gdraw_funcs.UpdateTextureRect = gdraw_UpdateTextureRect; - gdraw_funcs.UpdateTextureBegin = gdraw_UpdateTextureBegin; - gdraw_funcs.UpdateTextureEnd = gdraw_UpdateTextureEnd; - gdraw_funcs.FreeTexture = gdraw_FreeTexture; - gdraw_funcs.TryToLockTexture = gdraw_TryToLockTexture; + gdraw_funcs.UpdateTextureRect = gdraw_UpdateTextureRect; + gdraw_funcs.UpdateTextureBegin = gdraw_UpdateTextureBegin; + gdraw_funcs.UpdateTextureEnd = gdraw_UpdateTextureEnd; + gdraw_funcs.FreeTexture = gdraw_FreeTexture; + gdraw_funcs.TryToLockTexture = gdraw_TryToLockTexture; - gdraw_funcs.MakeVertexBufferBegin = gdraw_MakeVertexBufferBegin; - gdraw_funcs.MakeVertexBufferMore = gdraw_MakeVertexBufferMore; - gdraw_funcs.MakeVertexBufferEnd = gdraw_MakeVertexBufferEnd; - gdraw_funcs.TryToLockVertexBuffer = gdraw_TryToLockVertexBuffer; - gdraw_funcs.FreeVertexBuffer = gdraw_FreeVertexBuffer; + gdraw_funcs.MakeVertexBufferBegin = gdraw_MakeVertexBufferBegin; + gdraw_funcs.MakeVertexBufferMore = gdraw_MakeVertexBufferMore; + gdraw_funcs.MakeVertexBufferEnd = gdraw_MakeVertexBufferEnd; + gdraw_funcs.TryToLockVertexBuffer = gdraw_TryToLockVertexBuffer; + gdraw_funcs.FreeVertexBuffer = gdraw_FreeVertexBuffer; - gdraw_funcs.UnlockHandles = gdraw_UnlockHandles; - gdraw_funcs.SetTextureUniqueID = gdraw_SetTextureUniqueID; + gdraw_funcs.UnlockHandles = gdraw_UnlockHandles; + gdraw_funcs.SetTextureUniqueID = gdraw_SetTextureUniqueID; - gdraw_funcs.MakeTextureFromResource = (gdraw_make_texture_from_resource *) gdraw_GLx_(MakeTextureFromResource); - gdraw_funcs.FreeTextureFromResource = gdraw_GLx_(DestroyTextureFromResource); + gdraw_funcs.MakeTextureFromResource = + (gdraw_make_texture_from_resource*)gdraw_GLx_(MakeTextureFromResource); + gdraw_funcs.FreeTextureFromResource = + gdraw_GLx_(DestroyTextureFromResource); - gdraw_funcs.Set3DTransform = gdraw_Set3DTransform; + gdraw_funcs.Set3DTransform = gdraw_Set3DTransform; - return &gdraw_funcs; + return &gdraw_funcs; } -void gdraw_GLx_(DestroyContext)(void) -{ - if (gdraw) - { - GDrawStats stats={0}; - if (gdraw->texturecache) gdraw_res_flush(gdraw->texturecache, &stats); - if (gdraw->vbufcache) gdraw_res_flush(gdraw->vbufcache, &stats); - flush_rendertargets(&stats); +void gdraw_GLx_(DestroyContext)(void) { + if (gdraw) { + GDrawStats stats = {0}; + if (gdraw->texturecache) gdraw_res_flush(gdraw->texturecache, &stats); + if (gdraw->vbufcache) gdraw_res_flush(gdraw->vbufcache, &stats); + flush_rendertargets(&stats); - if (gdraw->aa_tex) - glDeleteTextures(1, &gdraw->aa_tex); + if (gdraw->aa_tex) glDeleteTextures(1, &gdraw->aa_tex); - if (gdraw->quad_ib) - glDeleteBuffers(1, &gdraw->quad_ib); - } + if (gdraw->quad_ib) glDeleteBuffers(1, &gdraw->quad_ib); + } - opengl_check(); - free_gdraw(); + opengl_check(); + free_gdraw(); } diff --git a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_shared.inl b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_shared.inl index 415f3f695..6fa38f455 100644 --- a/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_shared.inl +++ b/targets/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_shared.inl @@ -78,47 +78,46 @@ typedef struct GDrawHandleCache GDrawHandleCache; typedef struct GDrawHandle GDrawHandle; -typedef struct -{ - U64 value; +typedef struct { + U64 value; } GDrawFence; -typedef enum -{ - GDRAW_HANDLE_STATE_free = 0, - GDRAW_HANDLE_STATE_live, - GDRAW_HANDLE_STATE_locked, - GDRAW_HANDLE_STATE_dead, - GDRAW_HANDLE_STATE_pinned, - GDRAW_HANDLE_STATE_user_owned, - GDRAW_HANDLE_STATE_alloc, - GDRAW_HANDLE_STATE__count, +typedef enum { + GDRAW_HANDLE_STATE_free = 0, + GDRAW_HANDLE_STATE_live, + GDRAW_HANDLE_STATE_locked, + GDRAW_HANDLE_STATE_dead, + GDRAW_HANDLE_STATE_pinned, + GDRAW_HANDLE_STATE_user_owned, + GDRAW_HANDLE_STATE_alloc, + GDRAW_HANDLE_STATE__count, - // not an actual state! - GDRAW_HANDLE_STATE_sentinel = GDRAW_HANDLE_STATE__count, + // not an actual state! + GDRAW_HANDLE_STATE_sentinel = GDRAW_HANDLE_STATE__count, } GDrawHandleState; -struct GDrawHandle -{ - GDrawNativeHandle handle; // platform handle to a resource (variable size) - void * owner; // 4/8 // opaque handle used to allow freeing resources without calling back to owner +struct GDrawHandle { + GDrawNativeHandle handle; // platform handle to a resource (variable size) + void* owner; // 4/8 // opaque handle used to allow freeing resources + // without calling back to owner - GDrawHandleCache * cache; // 4/8 // which cache this handle came from + GDrawHandleCache* cache; // 4/8 // which cache this handle came from - GDrawHandle * next,*prev; // 8/16 // doubly-linked list + GDrawHandle *next, *prev; // 8/16 // doubly-linked list #if defined(GDRAW_MANAGE_MEM) - void * raw_ptr; // 4/8 // pointer to allocation - when you're managing memory manually + void* raw_ptr; // 4/8 // pointer to allocation - when you're managing + // memory manually #if defined(GDRAW_CORRUPTION_CHECK) - U32 cached_raw_value[4]; - rrbool has_check_value; + U32 cached_raw_value[4]; + rrbool has_check_value; #endif #endif - GDrawFence fence; // 8 // (optional) platform fence for resource - // 4 - U32 bytes:28; // estimated storage cost to allow setting a loose limit - U32 state:4; // state the handle is in + GDrawFence fence; // 8 // (optional) platform fence for resource + // 4 + U32 bytes : 28; // estimated storage cost to allow setting a loose limit + U32 state : 4; // state the handle is in }; // validate alignment to make sure structure will pack correctly @@ -128,445 +127,462 @@ RR_COMPILER_ASSERT((sizeof(GDrawHandle) & 7) == 0); RR_COMPILER_ASSERT((sizeof(GDrawHandle) & 3) == 0); #endif -struct GDrawHandleCache -{ - S32 bytes_free; - S32 total_bytes; - S32 max_handles; - U32 is_vertex : 1; // vertex buffers have different warning codes and generate discard callbacks - U32 is_thrashing : 1; - U32 did_defragment : 1; - // 30 unused bits - GDrawHandle state[GDRAW_HANDLE_STATE__count]; // sentinel nodes for all of the state lists +struct GDrawHandleCache { + S32 bytes_free; + S32 total_bytes; + S32 max_handles; + U32 is_vertex : 1; // vertex buffers have different warning codes and + // generate discard callbacks + U32 is_thrashing : 1; + U32 did_defragment : 1; + // 30 unused bits + GDrawHandle state[GDRAW_HANDLE_STATE__count]; // sentinel nodes for all of + // the state lists #if defined(GDRAW_MANAGE_MEM) - struct gfx_allocator *alloc; + struct gfx_allocator* alloc; #endif #if defined(GDRAW_MANAGE_MEM_TWOPOOL) - struct gfx_allocator *alloc_other; + struct gfx_allocator* alloc_other; #endif - GDrawFence prev_frame_start, prev_frame_end; // fence value at start/end of previous frame, for thrashing detection - GDrawHandle handle[1]; // the rest of the handles must be stored right after this in the containing structure + GDrawFence prev_frame_start, + prev_frame_end; // fence value at start/end of previous frame, for + // thrashing detection + GDrawHandle handle[1]; // the rest of the handles must be stored right + // after this in the containing structure }; #if defined(GDRAW_CORRUPTION_CHECK) // values for corruption checking -#define GDRAW_CORRUPTIONCHECK_renderbegin 0x10 -#define GDRAW_CORRUPTIONCHECK_renderend 0x20 -#define GDRAW_CORRUPTIONCHECK_nomoregdraw 0x30 -#define GDRAW_CORRUPTIONCHECK_maketexbegin 0x40 -#define GDRAW_CORRUPTIONCHECK_maketexend 0x50 +#define GDRAW_CORRUPTIONCHECK_renderbegin 0x10 +#define GDRAW_CORRUPTIONCHECK_renderend 0x20 +#define GDRAW_CORRUPTIONCHECK_nomoregdraw 0x30 +#define GDRAW_CORRUPTIONCHECK_maketexbegin 0x40 +#define GDRAW_CORRUPTIONCHECK_maketexend 0x50 -#define GDRAW_CORRUPTIONCHECK_wrappedcreateend 0x60 -#define GDRAW_CORRUPTIONCHECK_wrappedcreatebegin 0x61 -#define GDRAW_CORRUPTIONCHECK_wrappeddestroyend 0x70 -#define GDRAW_CORRUPTIONCHECK_wrappeddestroybegin 0x71 +#define GDRAW_CORRUPTIONCHECK_wrappedcreateend 0x60 +#define GDRAW_CORRUPTIONCHECK_wrappedcreatebegin 0x61 +#define GDRAW_CORRUPTIONCHECK_wrappeddestroyend 0x70 +#define GDRAW_CORRUPTIONCHECK_wrappeddestroybegin 0x71 -#define GDRAW_CORRUPTIONCHECK_allochandle 0x80 -#define GDRAW_CORRUPTIONCHECK_allochandle_begin 0x81 -#define GDRAW_CORRUPTIONCHECK_allochandle_postreap 0x82 -#define GDRAW_CORRUPTIONCHECK_allochandle_postfree1 0x83 -#define GDRAW_CORRUPTIONCHECK_allochandle_postfree2 0x84 -#define GDRAW_CORRUPTIONCHECK_allochandle_postfree3 0x85 -#define GDRAW_CORRUPTIONCHECK_allochandle_postalloc1 0x86 -#define GDRAW_CORRUPTIONCHECK_allochandle_postalloc2 0x87 -#define GDRAW_CORRUPTIONCHECK_allochandle_postalloc3 0x88 -#define GDRAW_CORRUPTIONCHECK_allochandle_defrag 0x89 +#define GDRAW_CORRUPTIONCHECK_allochandle 0x80 +#define GDRAW_CORRUPTIONCHECK_allochandle_begin 0x81 +#define GDRAW_CORRUPTIONCHECK_allochandle_postreap 0x82 +#define GDRAW_CORRUPTIONCHECK_allochandle_postfree1 0x83 +#define GDRAW_CORRUPTIONCHECK_allochandle_postfree2 0x84 +#define GDRAW_CORRUPTIONCHECK_allochandle_postfree3 0x85 +#define GDRAW_CORRUPTIONCHECK_allochandle_postalloc1 0x86 +#define GDRAW_CORRUPTIONCHECK_allochandle_postalloc2 0x87 +#define GDRAW_CORRUPTIONCHECK_allochandle_postalloc3 0x88 +#define GDRAW_CORRUPTIONCHECK_allochandle_defrag 0x89 -#define GDRAW_CORRUPTIONCHECK_freetex 0x90 +#define GDRAW_CORRUPTIONCHECK_freetex 0x90 -static U32 *debug_raw_address(GDrawHandle *t, int choice) -{ - static int offset_table[4] = { 0x555555, 0xaaaaaa, 0x333333, 0x6e6e6e }; - U8 *base = (U8 *) t->raw_ptr; - int offset = offset_table[choice] & (t->bytes-1) & ~3; - return (U32 *) (base + offset); +static U32* debug_raw_address(GDrawHandle* t, int choice) { + static int offset_table[4] = {0x555555, 0xaaaaaa, 0x333333, 0x6e6e6e}; + U8* base = (U8*)t->raw_ptr; + int offset = offset_table[choice] & (t->bytes - 1) & ~3; + return (U32*)(base + offset); } -static void debug_check_overlap_one(GDrawHandle *t, U8 *ptr, S32 len) -{ - assert(len >= 0); - if (t->raw_ptr && t->raw_ptr != ptr) { - assert(t->raw_ptr < ptr || t->raw_ptr >= ptr+len); - } +static void debug_check_overlap_one(GDrawHandle* t, U8* ptr, S32 len) { + assert(len >= 0); + if (t->raw_ptr && t->raw_ptr != ptr) { + assert(t->raw_ptr < ptr || t->raw_ptr >= ptr + len); + } } -static void debug_check_overlap(GDrawHandleCache *c, U8 *ptr, S32 len) -{ - GDrawHandle *t = c->head; - while (t) { - debug_check_overlap_one(t, ptr, len); - t = t->next; - } - t = c->active; - while (t) { - debug_check_overlap_one(t, ptr, len); - t = t->next; - } +static void debug_check_overlap(GDrawHandleCache* c, U8* ptr, S32 len) { + GDrawHandle* t = c->head; + while (t) { + debug_check_overlap_one(t, ptr, len); + t = t->next; + } + t = c->active; + while (t) { + debug_check_overlap_one(t, ptr, len); + t = t->next; + } } -static void debug_check_raw_values(GDrawHandleCache *c) -{ - GDrawHandle *t = c->head; - while (t) { - if (t->raw_ptr && t->has_check_value) { - int i; - for (i=0; i < 4; ++i) { - if (*debug_raw_address(t, i) != t->cached_raw_value[i]) { - //zlog("!Iggy texture corruption found\n"); - //zlog("t=%p, t->raw_ptr=%p\n", t, t->raw_ptr); - //zlog("Cached values: %08x %08x %08x %08x\n", t->cached_raw_value[0], t->cached_raw_value[1], t->cached_raw_value[2], t->cached_raw_value[3]); - //zlog("Current values: %08x %08x %08x %08x\n", *debug_raw_address(t,0), *debug_raw_address(t,1), *debug_raw_address(t,2), *debug_raw_address(t,3)); - assert(0); +static void debug_check_raw_values(GDrawHandleCache* c) { + GDrawHandle* t = c->head; + while (t) { + if (t->raw_ptr && t->has_check_value) { + int i; + for (i = 0; i < 4; ++i) { + if (*debug_raw_address(t, i) != t->cached_raw_value[i]) { + // zlog("!Iggy texture corruption found\n"); + // zlog("t=%p, t->raw_ptr=%p\n", t, t->raw_ptr); + // zlog("Cached values: %08x %08x %08x %08x\n", + // t->cached_raw_value[0], t->cached_raw_value[1], + // t->cached_raw_value[2], t->cached_raw_value[3]); + // zlog("Current values: %08x %08x %08x %08x\n", + // *debug_raw_address(t,0), *debug_raw_address(t,1), + // *debug_raw_address(t,2), *debug_raw_address(t,3)); + assert(0); + } } - } - } - t = t->next; - } - t = c->active; - while (t) { - if (t->raw_ptr && t->has_check_value) { - int i; - for (i=0; i < 4; ++i) { - if (*debug_raw_address(t, i) != t->cached_raw_value[i]) { - //zlog("!Iggy texture corruption found\n"); - //zlog("t=%p, t->raw_ptr=%p\n", t, t->raw_ptr); - //zlog("Cached values: %08x %08x %08x %08x\n", t->cached_raw_value[0], t->cached_raw_value[1], t->cached_raw_value[2], t->cached_raw_value[3]); - //zlog("Current values: %08x %08x %08x %08x\n", *debug_raw_address(t,0), *debug_raw_address(t,1), *debug_raw_address(t,2), *debug_raw_address(t,3)); - assert(0); + } + t = t->next; + } + t = c->active; + while (t) { + if (t->raw_ptr && t->has_check_value) { + int i; + for (i = 0; i < 4; ++i) { + if (*debug_raw_address(t, i) != t->cached_raw_value[i]) { + // zlog("!Iggy texture corruption found\n"); + // zlog("t=%p, t->raw_ptr=%p\n", t, t->raw_ptr); + // zlog("Cached values: %08x %08x %08x %08x\n", + // t->cached_raw_value[0], t->cached_raw_value[1], + // t->cached_raw_value[2], t->cached_raw_value[3]); + // zlog("Current values: %08x %08x %08x %08x\n", + // *debug_raw_address(t,0), *debug_raw_address(t,1), + // *debug_raw_address(t,2), *debug_raw_address(t,3)); + assert(0); + } } - } - } - t = t->next; - } + } + t = t->next; + } } #if !defined(GDRAW_CORRUPTION_MASK) #define GDRAW_CORRUPTION_MASK 0 #endif -#define debug_check_raw_values_if(c,v) \ - if ((GDRAW_CORRUPTION_CHECK & ~GDRAW_CORRUPTION_MASK) == ((v) & ~GDRAW_CORRUPTION_MASK)) \ - debug_check_raw_values(c); \ - else +#define debug_check_raw_values_if(c, v) \ + if ((GDRAW_CORRUPTION_CHECK & ~GDRAW_CORRUPTION_MASK) == \ + ((v) & ~GDRAW_CORRUPTION_MASK)) \ + debug_check_raw_values(c); \ + else -static void debug_set_raw_value(GDrawHandle *t) -{ - if (t->raw_ptr) { - int i; - for (i=0; i < 4; ++i) - t->cached_raw_value[i] = *debug_raw_address(t, i); - t->has_check_value = true; - } +static void debug_set_raw_value(GDrawHandle* t) { + if (t->raw_ptr) { + int i; + for (i = 0; i < 4; ++i) + t->cached_raw_value[i] = *debug_raw_address(t, i); + t->has_check_value = true; + } } -static void debug_unset_raw_value(GDrawHandle *t) -{ - t->has_check_value = false; +static void debug_unset_raw_value(GDrawHandle* t) { + t->has_check_value = false; } -static void debug_check_value_is_unreferenced(GDrawHandleCache *c, void *ptr) -{ - GDrawHandle *t = c->head; - while (t) { - assert(t->raw_ptr != ptr); - t = t->next; - } - t = c->active; - while (t) { - assert(t->raw_ptr != ptr); - t = t->next; - } +static void debug_check_value_is_unreferenced(GDrawHandleCache* c, void* ptr) { + GDrawHandle* t = c->head; + while (t) { + assert(t->raw_ptr != ptr); + t = t->next; + } + t = c->active; + while (t) { + assert(t->raw_ptr != ptr); + t = t->next; + } } #else -#define debug_check_overlap(c,p,len) +#define debug_check_overlap(c, p, len) #define debug_set_raw_value(t) -#define debug_check_value_is_unreferenced(c,p) +#define debug_check_value_is_unreferenced(c, p) #define debug_unset_raw_value(t) #define debug_check_raw_values(c) -#define debug_check_raw_values_if(c,v) +#define debug_check_raw_values_if(c, v) #endif #if defined(SUPERDEBUG) -static void check_lists(GDrawHandleCache *c) -{ - GDrawHandle *sentinel, *t; - U32 state; +static void check_lists(GDrawHandleCache* c) { + GDrawHandle *sentinel, *t; + U32 state; - // for all lists, verify that they are consistent and - // properly linked - for (state = 0; state < GDRAW_HANDLE_STATE__count; state++) { - S32 count = 0; - sentinel = &c->state[state]; + // for all lists, verify that they are consistent and + // properly linked + for (state = 0; state < GDRAW_HANDLE_STATE__count; state++) { + S32 count = 0; + sentinel = &c->state[state]; - assert(!sentinel->cache); - assert(sentinel->state == GDRAW_HANDLE_STATE_sentinel); - for (t = sentinel->next; t != sentinel; t = t->next) { - count++; - assert(t->cache == c); - assert(t->state == state); - assert(t->prev->next == t); - assert(t->next->prev == t); - assert(count < 50000); - } - } + assert(!sentinel->cache); + assert(sentinel->state == GDRAW_HANDLE_STATE_sentinel); + for (t = sentinel->next; t != sentinel; t = t->next) { + count++; + assert(t->cache == c); + assert(t->state == state); + assert(t->prev->next == t); + assert(t->next->prev == t); + assert(count < 50000); + } + } - // for dead list, additionally verify that it's in the right - // order (namely, sorted by ascending fence index) - sentinel = &c->state[GDRAW_HANDLE_STATE_dead]; - for (t = sentinel->next; t != sentinel; t = t->next) { - assert(t->prev == sentinel || t->fence.value >= t->prev->fence.value); - } + // for dead list, additionally verify that it's in the right + // order (namely, sorted by ascending fence index) + sentinel = &c->state[GDRAW_HANDLE_STATE_dead]; + for (t = sentinel->next; t != sentinel; t = t->next) { + assert(t->prev == sentinel || t->fence.value >= t->prev->fence.value); + } } #include -static const char *gdraw_StateName(U32 state) -{ - switch (state) { - case GDRAW_HANDLE_STATE_free: return "free"; - case GDRAW_HANDLE_STATE_live: return "live"; - case GDRAW_HANDLE_STATE_locked: return "locked"; - case GDRAW_HANDLE_STATE_dead: return "dead"; - case GDRAW_HANDLE_STATE_pinned: return "pinned"; - case GDRAW_HANDLE_STATE_user_owned: return "user-owned"; - case GDRAW_HANDLE_STATE_alloc: return "alloc"; - case GDRAW_HANDLE_STATE_sentinel: return ""; - default: return "???"; - } +static const char* gdraw_StateName(U32 state) { + switch (state) { + case GDRAW_HANDLE_STATE_free: + return "free"; + case GDRAW_HANDLE_STATE_live: + return "live"; + case GDRAW_HANDLE_STATE_locked: + return "locked"; + case GDRAW_HANDLE_STATE_dead: + return "dead"; + case GDRAW_HANDLE_STATE_pinned: + return "pinned"; + case GDRAW_HANDLE_STATE_user_owned: + return "user-owned"; + case GDRAW_HANDLE_STATE_alloc: + return "alloc"; + case GDRAW_HANDLE_STATE_sentinel: + return ""; + default: + return "???"; + } } #else -static RADINLINE void check_lists(GDrawHandleCache *c) -{ - RR_UNUSED_VARIABLE(c); +static RADINLINE void check_lists(GDrawHandleCache* c) { + RR_UNUSED_VARIABLE(c); } #endif -static void gdraw_HandleTransitionInsertBefore(GDrawHandle *t, GDrawHandleState new_state, GDrawHandle *succ) -{ - check_lists(t->cache); - assert(t->state != GDRAW_HANDLE_STATE_sentinel); // sentinels should never get here! - assert(t->state != (U32) new_state); // code should never call "transition" if it's not transitioning! - // unlink from prev state - t->prev->next = t->next; - t->next->prev = t->prev; - // add to list for new state - t->next = succ; - t->prev = succ->prev; - t->prev->next = t; - t->next->prev = t; +static void gdraw_HandleTransitionInsertBefore(GDrawHandle* t, + GDrawHandleState new_state, + GDrawHandle* succ) { + check_lists(t->cache); + assert(t->state != + GDRAW_HANDLE_STATE_sentinel); // sentinels should never get here! + assert(t->state != (U32)new_state); // code should never call "transition" + // if it's not transitioning! + // unlink from prev state + t->prev->next = t->next; + t->next->prev = t->prev; + // add to list for new state + t->next = succ; + t->prev = succ->prev; + t->prev->next = t; + t->next->prev = t; #if defined(SUPERDEBUG) - printf("GD %chandle %p %s->%s\n", t->cache->is_vertex ? 'v' : 't', t, gdraw_StateName(t->state), gdraw_StateName(new_state)); + printf("GD %chandle %p %s->%s\n", t->cache->is_vertex ? 'v' : 't', t, + gdraw_StateName(t->state), gdraw_StateName(new_state)); #endif - t->state = new_state; - check_lists(t->cache); + t->state = new_state; + check_lists(t->cache); } -static RADINLINE void gdraw_HandleTransitionTo(GDrawHandle *t, GDrawHandleState new_state) -{ - gdraw_HandleTransitionInsertBefore(t, new_state, &t->cache->state[new_state]); +static RADINLINE void gdraw_HandleTransitionTo(GDrawHandle* t, + GDrawHandleState new_state) { + gdraw_HandleTransitionInsertBefore(t, new_state, + &t->cache->state[new_state]); } #if defined(GDRAW_MANAGE_MEM_TWOPOOL) -static rrbool gdraw_MigrateResource(GDrawHandle *t, GDrawStats *stats); -static void gdraw_res_free(GDrawHandle *t, GDrawStats *stats); +static rrbool gdraw_MigrateResource(GDrawHandle* t, GDrawStats* stats); +static void gdraw_res_free(GDrawHandle* t, GDrawStats* stats); #endif -static rrbool gdraw_HandleCacheLockStats(GDrawHandle *t, void *owner, GDrawStats *stats) -{ - RR_UNUSED_VARIABLE(stats); +static rrbool gdraw_HandleCacheLockStats(GDrawHandle* t, void* owner, + GDrawStats* stats) { + RR_UNUSED_VARIABLE(stats); - // if the GPU memory is owned by the user, then we never spontaneously - // free it, and we can always report true. moreover, Iggy doesn't bother - // keeping 'owner' consistent in this case, so we must check this before - // verifying t->owner. - if (t->state == GDRAW_HANDLE_STATE_user_owned) - return true; + // if the GPU memory is owned by the user, then we never spontaneously + // free it, and we can always report true. moreover, Iggy doesn't bother + // keeping 'owner' consistent in this case, so we must check this before + // verifying t->owner. + if (t->state == GDRAW_HANDLE_STATE_user_owned) return true; - // if t->owner has changed, then Iggy is trying to lock an old version - // of this handle from before (the handle has already been recycled to - // point to a new resource) - if (t->owner != owner) - return false; + // if t->owner has changed, then Iggy is trying to lock an old version + // of this handle from before (the handle has already been recycled to + // point to a new resource) + if (t->owner != owner) return false; - // otherwise, it's a valid resource and we should lock it until the next - // unlock call - assert(t->state == GDRAW_HANDLE_STATE_live || t->state == GDRAW_HANDLE_STATE_locked || t->state == GDRAW_HANDLE_STATE_pinned); - if (t->state == GDRAW_HANDLE_STATE_live) { + // otherwise, it's a valid resource and we should lock it until the next + // unlock call + assert(t->state == GDRAW_HANDLE_STATE_live || + t->state == GDRAW_HANDLE_STATE_locked || + t->state == GDRAW_HANDLE_STATE_pinned); + if (t->state == GDRAW_HANDLE_STATE_live) { #if defined(GDRAW_MANAGE_MEM_TWOPOOL) - // if we defragmented this frame, we can't just make resources live; - // we need to migrate them to their new location. (which might fail - // if we don't have enough memory left in the new pool) - if (t->cache->did_defragment) { - if (!gdraw_MigrateResource(t, stats)) { - gdraw_res_free(t, stats); - return false; - } - } + // if we defragmented this frame, we can't just make resources live; + // we need to migrate them to their new location. (which might fail + // if we don't have enough memory left in the new pool) + if (t->cache->did_defragment) { + if (!gdraw_MigrateResource(t, stats)) { + gdraw_res_free(t, stats); + return false; + } + } #endif - gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_locked); - } - return true; + gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_locked); + } + return true; } -static rrbool gdraw_HandleCacheLock(GDrawHandle *t, void *owner) -{ - return gdraw_HandleCacheLockStats(t, owner, NULL); +static rrbool gdraw_HandleCacheLock(GDrawHandle* t, void* owner) { + return gdraw_HandleCacheLockStats(t, owner, NULL); } -static void gdraw_HandleCacheUnlock(GDrawHandle *t) -{ - assert(t->state == GDRAW_HANDLE_STATE_locked || t->state == GDRAW_HANDLE_STATE_pinned || t->state == GDRAW_HANDLE_STATE_user_owned); - if (t->state == GDRAW_HANDLE_STATE_locked) - gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_live); +static void gdraw_HandleCacheUnlock(GDrawHandle* t) { + assert(t->state == GDRAW_HANDLE_STATE_locked || + t->state == GDRAW_HANDLE_STATE_pinned || + t->state == GDRAW_HANDLE_STATE_user_owned); + if (t->state == GDRAW_HANDLE_STATE_locked) + gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_live); } -static void gdraw_HandleCacheUnlockAll(GDrawHandleCache *c) -{ - GDrawHandle *sentinel = &c->state[GDRAW_HANDLE_STATE_locked]; - while (sentinel->next != sentinel) - gdraw_HandleTransitionTo(sentinel->next, GDRAW_HANDLE_STATE_live); +static void gdraw_HandleCacheUnlockAll(GDrawHandleCache* c) { + GDrawHandle* sentinel = &c->state[GDRAW_HANDLE_STATE_locked]; + while (sentinel->next != sentinel) + gdraw_HandleTransitionTo(sentinel->next, GDRAW_HANDLE_STATE_live); } -static void gdraw_HandleCacheInit(GDrawHandleCache *c, S32 num_handles, S32 bytes) -{ - S32 i; - assert(num_handles > 0); - c->max_handles = num_handles; - c->total_bytes = bytes; - c->bytes_free = c->total_bytes; - c->is_vertex = false; - c->is_thrashing = false; - c->did_defragment = false; - for (i=0; i < GDRAW_HANDLE_STATE__count; i++) { - c->state[i].owner = NULL; - c->state[i].cache = NULL; // should never follow cache link from sentinels! - c->state[i].next = c->state[i].prev = &c->state[i]; +static void gdraw_HandleCacheInit(GDrawHandleCache* c, S32 num_handles, + S32 bytes) { + S32 i; + assert(num_handles > 0); + c->max_handles = num_handles; + c->total_bytes = bytes; + c->bytes_free = c->total_bytes; + c->is_vertex = false; + c->is_thrashing = false; + c->did_defragment = false; + for (i = 0; i < GDRAW_HANDLE_STATE__count; i++) { + c->state[i].owner = NULL; + c->state[i].cache = + NULL; // should never follow cache link from sentinels! + c->state[i].next = c->state[i].prev = &c->state[i]; #if defined(GDRAW_MANAGE_MEM) - c->state[i].raw_ptr = NULL; + c->state[i].raw_ptr = NULL; #endif - c->state[i].fence.value = 0; - c->state[i].bytes = 0; - c->state[i].state = GDRAW_HANDLE_STATE_sentinel; - } - for (i=0; i < num_handles; ++i) { - c->handle[i].cache = c; - c->handle[i].prev = (i == 0) ? &c->state[GDRAW_HANDLE_STATE_free] : &c->handle[i-1]; - c->handle[i].next = (i == num_handles - 1) ? &c->state[GDRAW_HANDLE_STATE_free] : &c->handle[i+1]; - c->handle[i].bytes = 0; - c->handle[i].state = GDRAW_HANDLE_STATE_free; + c->state[i].fence.value = 0; + c->state[i].bytes = 0; + c->state[i].state = GDRAW_HANDLE_STATE_sentinel; + } + for (i = 0; i < num_handles; ++i) { + c->handle[i].cache = c; + c->handle[i].prev = + (i == 0) ? &c->state[GDRAW_HANDLE_STATE_free] : &c->handle[i - 1]; + c->handle[i].next = (i == num_handles - 1) + ? &c->state[GDRAW_HANDLE_STATE_free] + : &c->handle[i + 1]; + c->handle[i].bytes = 0; + c->handle[i].state = GDRAW_HANDLE_STATE_free; #if defined(GDRAW_MANAGE_MEM) - c->handle[i].raw_ptr = NULL; + c->handle[i].raw_ptr = NULL; #endif - } - c->state[GDRAW_HANDLE_STATE_free].next = &c->handle[0]; - c->state[GDRAW_HANDLE_STATE_free].prev = &c->handle[num_handles - 1]; - c->prev_frame_start.value = 0; - c->prev_frame_end.value = 0; + } + c->state[GDRAW_HANDLE_STATE_free].next = &c->handle[0]; + c->state[GDRAW_HANDLE_STATE_free].prev = &c->handle[num_handles - 1]; + c->prev_frame_start.value = 0; + c->prev_frame_end.value = 0; #if defined(GDRAW_MANAGE_MEM) - c->alloc = NULL; + c->alloc = NULL; #endif #if defined(GDRAW_MANAGE_MEM_TWOPOOL) - c->alloc_other = NULL; + c->alloc_other = NULL; #endif - check_lists(c); + check_lists(c); } -static GDrawHandle *gdraw_HandleCacheAllocateBegin(GDrawHandleCache *c) -{ - GDrawHandle *free_list = &c->state[GDRAW_HANDLE_STATE_free]; - GDrawHandle *t = NULL; - if (free_list->next != free_list) { - t = free_list->next; - gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_alloc); - t->bytes = 0; - t->owner = 0; +static GDrawHandle* gdraw_HandleCacheAllocateBegin(GDrawHandleCache* c) { + GDrawHandle* free_list = &c->state[GDRAW_HANDLE_STATE_free]; + GDrawHandle* t = NULL; + if (free_list->next != free_list) { + t = free_list->next; + gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_alloc); + t->bytes = 0; + t->owner = 0; #if defined(GDRAW_MANAGE_MEM) - t->raw_ptr = NULL; + t->raw_ptr = NULL; #endif #if defined(GDRAW_CORRUPTION_CHECK) - t->has_check_value = false; + t->has_check_value = false; #endif - } - return t; + } + return t; } -static void gdraw_HandleCacheAllocateEnd(GDrawHandle *t, S32 bytes, void *owner, GDrawHandleState new_state) -{ - assert(t->cache); - assert(t->bytes == 0); - assert(t->owner == 0); - assert(t->state == GDRAW_HANDLE_STATE_alloc); - if (bytes == 0) - assert(new_state == GDRAW_HANDLE_STATE_user_owned); - else - assert(new_state == GDRAW_HANDLE_STATE_locked || new_state == GDRAW_HANDLE_STATE_pinned); - t->bytes = bytes; - t->owner = owner; - t->cache->bytes_free -= bytes; +static void gdraw_HandleCacheAllocateEnd(GDrawHandle* t, S32 bytes, void* owner, + GDrawHandleState new_state) { + assert(t->cache); + assert(t->bytes == 0); + assert(t->owner == 0); + assert(t->state == GDRAW_HANDLE_STATE_alloc); + if (bytes == 0) + assert(new_state == GDRAW_HANDLE_STATE_user_owned); + else + assert(new_state == GDRAW_HANDLE_STATE_locked || + new_state == GDRAW_HANDLE_STATE_pinned); + t->bytes = bytes; + t->owner = owner; + t->cache->bytes_free -= bytes; - gdraw_HandleTransitionTo(t, new_state); + gdraw_HandleTransitionTo(t, new_state); } -static void gdraw_HandleCacheFree(GDrawHandle *t) -{ - GDrawHandleCache *c = t->cache; - assert(t->state != GDRAW_HANDLE_STATE_alloc && t->state != GDRAW_HANDLE_STATE_sentinel); - c->bytes_free += t->bytes; - t->bytes = 0; - t->owner = 0; +static void gdraw_HandleCacheFree(GDrawHandle* t) { + GDrawHandleCache* c = t->cache; + assert(t->state != GDRAW_HANDLE_STATE_alloc && + t->state != GDRAW_HANDLE_STATE_sentinel); + c->bytes_free += t->bytes; + t->bytes = 0; + t->owner = 0; #if defined(GDRAW_MANAGE_MEM) - t->raw_ptr = 0; + t->raw_ptr = 0; #endif #if defined(GDRAW_CORRUPTION_CHECK) - t->has_check_value = false; + t->has_check_value = false; #endif - gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_free); + gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_free); } -static void gdraw_HandleCacheAllocateFail(GDrawHandle *t) -{ - assert(t->state == GDRAW_HANDLE_STATE_alloc); - gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_free); +static void gdraw_HandleCacheAllocateFail(GDrawHandle* t) { + assert(t->state == GDRAW_HANDLE_STATE_alloc); + gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_free); } -static GDrawHandle *gdraw_HandleCacheGetLRU(GDrawHandleCache *c) -{ - // TransitionTo always inserts at the end, which means that the resources - // at the front of the LRU list are the oldest ones, since in-use resources - // will get appended on every transition from "locked" to "live". - GDrawHandle *sentinel = &c->state[GDRAW_HANDLE_STATE_live]; - return (sentinel->next != sentinel) ? sentinel->next : NULL; +static GDrawHandle* gdraw_HandleCacheGetLRU(GDrawHandleCache* c) { + // TransitionTo always inserts at the end, which means that the resources + // at the front of the LRU list are the oldest ones, since in-use resources + // will get appended on every transition from "locked" to "live". + GDrawHandle* sentinel = &c->state[GDRAW_HANDLE_STATE_live]; + return (sentinel->next != sentinel) ? sentinel->next : NULL; } -static void gdraw_HandleCacheTick(GDrawHandleCache *c, GDrawFence now) -{ - c->prev_frame_start = c->prev_frame_end; - c->prev_frame_end = now; +static void gdraw_HandleCacheTick(GDrawHandleCache* c, GDrawFence now) { + c->prev_frame_start = c->prev_frame_end; + c->prev_frame_end = now; - // reset these flags every frame - c->is_thrashing = false; - c->did_defragment = false; + // reset these flags every frame + c->is_thrashing = false; + c->did_defragment = false; } #if defined(GDRAW_MANAGE_MEM) -static void gdraw_HandleCacheInsertDead(GDrawHandle *t) -{ - GDrawHandle *s, *sentinel; +static void gdraw_HandleCacheInsertDead(GDrawHandle* t) { + GDrawHandle *s, *sentinel; - assert(t->state == GDRAW_HANDLE_STATE_live || t->state == GDRAW_HANDLE_STATE_locked || t->state == GDRAW_HANDLE_STATE_pinned); + assert(t->state == GDRAW_HANDLE_STATE_live || + t->state == GDRAW_HANDLE_STATE_locked || + t->state == GDRAW_HANDLE_STATE_pinned); - // figure out where t belongs in the dead list in "chronological order" - // do this by finding its (chronological) successor s - sentinel = &t->cache->state[GDRAW_HANDLE_STATE_dead]; - s = sentinel->next; - while (s != sentinel && s->fence.value <= t->fence.value) - s = s->next; + // figure out where t belongs in the dead list in "chronological order" + // do this by finding its (chronological) successor s + sentinel = &t->cache->state[GDRAW_HANDLE_STATE_dead]; + s = sentinel->next; + while (s != sentinel && s->fence.value <= t->fence.value) s = s->next; - // and then insert it there - gdraw_HandleTransitionInsertBefore(t, GDRAW_HANDLE_STATE_dead, s); + // and then insert it there + gdraw_HandleTransitionInsertBefore(t, GDRAW_HANDLE_STATE_dead, s); } #endif @@ -597,515 +613,572 @@ static void gdraw_HandleCacheInsertDead(GDrawHandle *t) // 0 0 1 0 // 0 0 0 1 // -// just store (p[0],p[1],p[2],p[3]) in a 4-component vector and the projection -// transform is a single multiply-add. +// just store (p[0],p[1],p[2],p[3]) in a 4-component vector and the +// projection transform is a single multiply-add. // // The output is volatile since it's often in Write-Combined memory where we // really don't want compiler reordering. -static RADINLINE void gdraw_PixelSpace(volatile F32 * RADRESTRICT vvec) -{ - // 1:1 pixel mapping - just identity since our "view space" is pixels - vvec[0] = 1.0f; vvec[1] = 0.0f; vvec[2] = 0.0f; vvec[3] = 0.0f; - vvec[4] = 0.0f; vvec[5] = 1.0f; vvec[6] = 0.0f; vvec[7] = 0.0f; +static RADINLINE void gdraw_PixelSpace(volatile F32* RADRESTRICT vvec) { + // 1:1 pixel mapping - just identity since our "view space" is pixels + vvec[0] = 1.0f; + vvec[1] = 0.0f; + vvec[2] = 0.0f; + vvec[3] = 0.0f; + vvec[4] = 0.0f; + vvec[5] = 1.0f; + vvec[6] = 0.0f; + vvec[7] = 0.0f; } -static RADINLINE void gdraw_WorldSpace(volatile F32 * RADRESTRICT vvec, F32 * RADRESTRICT world_to_pixel, F32 depth, F32 misc) -{ - // World->pixel space transform is just a scale - vvec[0] = world_to_pixel[0]; vvec[1] = 0.0f; vvec[2] = depth; vvec[3] = 0.0f; - vvec[4] = 0.0f; vvec[5] = world_to_pixel[1]; vvec[6] = misc; vvec[7] = 0.0f; +static RADINLINE void gdraw_WorldSpace(volatile F32* RADRESTRICT vvec, + F32* RADRESTRICT world_to_pixel, + F32 depth, F32 misc) { + // World->pixel space transform is just a scale + vvec[0] = world_to_pixel[0]; + vvec[1] = 0.0f; + vvec[2] = depth; + vvec[3] = 0.0f; + vvec[4] = 0.0f; + vvec[5] = world_to_pixel[1]; + vvec[6] = misc; + vvec[7] = 0.0f; } -static RADINLINE void gdraw_ObjectSpace(volatile F32 * RADRESTRICT vvec, gswf_matrix * RADRESTRICT xform, F32 depth, F32 misc) -{ - // Object->pixel transform is a 2D homogeneous matrix transform - F32 m00 = xform->m00; - F32 m01 = xform->m01; - F32 m10 = xform->m10; - F32 m11 = xform->m11; - F32 trans0 = xform->trans[0]; - F32 trans1 = xform->trans[1]; +static RADINLINE void gdraw_ObjectSpace(volatile F32* RADRESTRICT vvec, + gswf_matrix* RADRESTRICT xform, + F32 depth, F32 misc) { + // Object->pixel transform is a 2D homogeneous matrix transform + F32 m00 = xform->m00; + F32 m01 = xform->m01; + F32 m10 = xform->m10; + F32 m11 = xform->m11; + F32 trans0 = xform->trans[0]; + F32 trans1 = xform->trans[1]; - vvec[0] = m00; vvec[1] = m01; vvec[2] = depth; vvec[3] = trans0; - vvec[4] = m10; vvec[5] = m11; vvec[6] = misc; vvec[7] = trans1; + vvec[0] = m00; + vvec[1] = m01; + vvec[2] = depth; + vvec[3] = trans0; + vvec[4] = m10; + vvec[5] = m11; + vvec[6] = misc; + vvec[7] = trans1; } -static void gdraw_GetObjectSpaceMatrix(F32 * RADRESTRICT mat, gswf_matrix * RADRESTRICT xform, F32 * RADRESTRICT proj, F32 depth, int out_col_major) -{ - int row = out_col_major ? 1 : 4; - int col = out_col_major ? 4 : 1; +static void gdraw_GetObjectSpaceMatrix(F32* RADRESTRICT mat, + gswf_matrix* RADRESTRICT xform, + F32* RADRESTRICT proj, F32 depth, + int out_col_major) { + int row = out_col_major ? 1 : 4; + int col = out_col_major ? 4 : 1; - F32 xs = proj[0]; - F32 ys = proj[1]; + F32 xs = proj[0]; + F32 ys = proj[1]; - mat[0*row+0*col] = xform->m00 * xs; - mat[0*row+1*col] = xform->m01 * xs; - mat[0*row+2*col] = 0.0f; - mat[0*row+3*col] = xform->trans[0] * xs + proj[2]; + mat[0 * row + 0 * col] = xform->m00 * xs; + mat[0 * row + 1 * col] = xform->m01 * xs; + mat[0 * row + 2 * col] = 0.0f; + mat[0 * row + 3 * col] = xform->trans[0] * xs + proj[2]; - mat[1*row+0*col] = xform->m10 * ys; - mat[1*row+1*col] = xform->m11 * ys; - mat[1*row+2*col] = 0.0f; - mat[1*row+3*col] = xform->trans[1] * ys + proj[3]; + mat[1 * row + 0 * col] = xform->m10 * ys; + mat[1 * row + 1 * col] = xform->m11 * ys; + mat[1 * row + 2 * col] = 0.0f; + mat[1 * row + 3 * col] = xform->trans[1] * ys + proj[3]; - mat[2*row+0*col] = 0.0f; - mat[2*row+1*col] = 0.0f; - mat[2*row+2*col] = 0.0f; - mat[2*row+3*col] = depth; + mat[2 * row + 0 * col] = 0.0f; + mat[2 * row + 1 * col] = 0.0f; + mat[2 * row + 2 * col] = 0.0f; + mat[2 * row + 3 * col] = depth; - mat[3*row+0*col] = 0.0f; - mat[3*row+1*col] = 0.0f; - mat[3*row+2*col] = 0.0f; - mat[3*row+3*col] = 1.0f; + mat[3 * row + 0 * col] = 0.0f; + mat[3 * row + 1 * col] = 0.0f; + mat[3 * row + 2 * col] = 0.0f; + mat[3 * row + 3 * col] = 1.0f; } - //////////////////////////////////////////////////////////////////////// // // Blurs // -// symmetrically expand a rectangle by ex/ey pixels on both sides, then clamp to tile bounds -static void gdraw_ExpandRect(gswf_recti *out, gswf_recti const *in, S32 ex, S32 ey, S32 w, S32 h) -{ - out->x0 = RR_MAX(in->x0 - ex, 0); - out->y0 = RR_MAX(in->y0 - ey, 0); - out->x1 = RR_MIN(in->x1 + ex, w); - out->y1 = RR_MIN(in->y1 + ey, h); +// symmetrically expand a rectangle by ex/ey pixels on both sides, then clamp to +// tile bounds +static void gdraw_ExpandRect(gswf_recti* out, gswf_recti const* in, S32 ex, + S32 ey, S32 w, S32 h) { + out->x0 = RR_MAX(in->x0 - ex, 0); + out->y0 = RR_MAX(in->y0 - ey, 0); + out->x1 = RR_MIN(in->x1 + ex, w); + out->y1 = RR_MIN(in->y1 + ey, h); } -static void gdraw_ShiftRect(gswf_recti *out, gswf_recti const *in, S32 dx, S32 dy) -{ - out->x0 = in->x0 + dx; - out->y0 = in->y0 + dy; - out->x1 = in->x1 + dx; - out->y1 = in->y1 + dy; +static void gdraw_ShiftRect(gswf_recti* out, gswf_recti const* in, S32 dx, + S32 dy) { + out->x0 = in->x0 + dx; + out->y0 = in->y0 + dy; + out->x1 = in->x1 + dx; + out->y1 = in->y1 + dy; } -#define MAX_TAPS 9 // max # of bilinear samples in one 'convolution' step +#define MAX_TAPS 9 // max # of bilinear samples in one 'convolution' step -enum -{ - // basic shader family - VAR_tex0 = 0, - VAR_tex1, - VAR_cmul, - VAR_cadd, - VAR_focal, +enum { + // basic shader family + VAR_tex0 = 0, + VAR_tex1, + VAR_cmul, + VAR_cadd, + VAR_focal, - // filter family - VAR_filter_tex0 = 0, - VAR_filter_tex1, - VAR_filter_color, - VAR_filter_tc_off, - VAR_filter_tex2, - VAR_filter_clamp0, - VAR_filter_clamp1, - VAR_filter_color2, - MAX_VARS, + // filter family + VAR_filter_tex0 = 0, + VAR_filter_tex1, + VAR_filter_color, + VAR_filter_tc_off, + VAR_filter_tex2, + VAR_filter_clamp0, + VAR_filter_clamp1, + VAR_filter_color2, + MAX_VARS, - // blur family - VAR_blur_tex0 = 0, - VAR_blur_tap, - VAR_blur_clampv, + // blur family + VAR_blur_tex0 = 0, + VAR_blur_tap, + VAR_blur_clampv, - // color matrix family - VAR_colormatrix_tex0 = 0, - VAR_colormatrix_data, + // color matrix family + VAR_colormatrix_tex0 = 0, + VAR_colormatrix_data, - // ihud family - VAR_ihudv_worldview = 0, - VAR_ihudv_material, - VAR_ihudv_textmode, + // ihud family + VAR_ihudv_worldview = 0, + VAR_ihudv_material, + VAR_ihudv_textmode, }; -typedef struct -{ - S32 w,h, frametex_width, frametex_height; - void (*BlurPass)(GDrawRenderState *r, int taps, float *data, gswf_recti *s, float *tc, float height_max, float *clampv, GDrawStats *gstats); +typedef struct { + S32 w, h, frametex_width, frametex_height; + void (*BlurPass)(GDrawRenderState* r, int taps, float* data, gswf_recti* s, + float* tc, float height_max, float* clampv, + GDrawStats* gstats); } GDrawBlurInfo; -static GDrawTexture *gdraw_BlurPass(GDrawFunctions *g, GDrawBlurInfo *c, GDrawRenderState *r, int taps, float *data, gswf_recti *draw_bounds, gswf_recti *sample_bounds, GDrawStats *gstats) -{ - F32 tc[4]; - F32 clamp[4]; - F32 t=0; - F32 texel_scale_s = 1.0f / c->frametex_width; - F32 texel_scale_t = 1.0f / c->frametex_height; - S32 i; - for (i=0; i < taps; ++i) - t += data[4*i+2]; - assert(t >= 0.99f && t <= 1.01f); +static GDrawTexture* gdraw_BlurPass(GDrawFunctions* g, GDrawBlurInfo* c, + GDrawRenderState* r, int taps, float* data, + gswf_recti* draw_bounds, + gswf_recti* sample_bounds, + GDrawStats* gstats) { + F32 tc[4]; + F32 clamp[4]; + F32 t = 0; + F32 texel_scale_s = 1.0f / c->frametex_width; + F32 texel_scale_t = 1.0f / c->frametex_height; + S32 i; + for (i = 0; i < taps; ++i) t += data[4 * i + 2]; + assert(t >= 0.99f && t <= 1.01f); - tc[0] = texel_scale_s * draw_bounds->x0; - tc[1] = texel_scale_t * draw_bounds->y0; - tc[2] = texel_scale_s * draw_bounds->x1; - tc[3] = texel_scale_t * draw_bounds->y1; + tc[0] = texel_scale_s * draw_bounds->x0; + tc[1] = texel_scale_t * draw_bounds->y0; + tc[2] = texel_scale_s * draw_bounds->x1; + tc[3] = texel_scale_t * draw_bounds->y1; - // sample_bounds is (x0,y0) inclusive, (x1,y1) exclusive - // texel centers are offset by 0.5 from integer coordinates and we don't want to sample outside sample_bounds - clamp[0] = texel_scale_s * (sample_bounds->x0 + 0.5f); - clamp[1] = texel_scale_t * (sample_bounds->y0 + 0.5f); - clamp[2] = texel_scale_s * (sample_bounds->x1 - 0.5f); - clamp[3] = texel_scale_t * (sample_bounds->y1 - 0.5f); + // sample_bounds is (x0,y0) inclusive, (x1,y1) exclusive + // texel centers are offset by 0.5 from integer coordinates and we don't + // want to sample outside sample_bounds + clamp[0] = texel_scale_s * (sample_bounds->x0 + 0.5f); + clamp[1] = texel_scale_t * (sample_bounds->y0 + 0.5f); + clamp[2] = texel_scale_s * (sample_bounds->x1 - 0.5f); + clamp[3] = texel_scale_t * (sample_bounds->y1 - 0.5f); - if (!g->TextureDrawBufferBegin(draw_bounds, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, 0, gstats)) - return r->tex[0]; + if (!g->TextureDrawBufferBegin( + draw_bounds, GDRAW_TEXTURE_FORMAT_rgba32, + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, + 0, gstats)) + return r->tex[0]; - c->BlurPass(r, taps, data, draw_bounds, tc, (F32) c->h / c->frametex_height, clamp, gstats); - return g->TextureDrawBufferEnd(gstats); + c->BlurPass(r, taps, data, draw_bounds, tc, (F32)c->h / c->frametex_height, + clamp, gstats); + return g->TextureDrawBufferEnd(gstats); } -static GDrawTexture *gdraw_BlurPassDownsample(GDrawFunctions *g, GDrawBlurInfo *c, GDrawRenderState *r, int taps, float *data, gswf_recti *draw_bounds, int axis, int divisor, int tex_w, int tex_h, gswf_recti *sample_bounds, GDrawStats *gstats) -{ - S32 i; - F32 t=0; - F32 tc[4]; - F32 clamp[4]; - F32 texel_scale_s = 1.0f / tex_w; - F32 texel_scale_t = 1.0f / tex_h; - gswf_recti z; +static GDrawTexture* gdraw_BlurPassDownsample( + GDrawFunctions* g, GDrawBlurInfo* c, GDrawRenderState* r, int taps, + float* data, gswf_recti* draw_bounds, int axis, int divisor, int tex_w, + int tex_h, gswf_recti* sample_bounds, GDrawStats* gstats) { + S32 i; + F32 t = 0; + F32 tc[4]; + F32 clamp[4]; + F32 texel_scale_s = 1.0f / tex_w; + F32 texel_scale_t = 1.0f / tex_h; + gswf_recti z; - for (i=0; i < taps; ++i) - t += data[4*i+2]; - assert(t >= 0.99f && t <= 1.01f); + for (i = 0; i < taps; ++i) t += data[4 * i + 2]; + assert(t >= 0.99f && t <= 1.01f); - // following must be integer divides! - if (axis == 0) { - z.x0 = draw_bounds->x0 / divisor; - z.x1 = (draw_bounds->x1-1) / divisor + 1; - z.y0 = draw_bounds->y0; - z.y1 = draw_bounds->y1; + // following must be integer divides! + if (axis == 0) { + z.x0 = draw_bounds->x0 / divisor; + z.x1 = (draw_bounds->x1 - 1) / divisor + 1; + z.y0 = draw_bounds->y0; + z.y1 = draw_bounds->y1; - tc[0] = ((z.x0 - 0.5f)*divisor+0.5f)*texel_scale_s; - tc[2] = ((z.x1 - 0.5f)*divisor+0.5f)*texel_scale_s; - tc[1] = z.y0*texel_scale_t; - tc[3] = z.y1*texel_scale_t; - } else { - z.x0 = draw_bounds->x0; - z.x1 = draw_bounds->x1; - z.y0 = draw_bounds->y0 / divisor; - z.y1 = (draw_bounds->y1-1) / divisor + 1; + tc[0] = ((z.x0 - 0.5f) * divisor + 0.5f) * texel_scale_s; + tc[2] = ((z.x1 - 0.5f) * divisor + 0.5f) * texel_scale_s; + tc[1] = z.y0 * texel_scale_t; + tc[3] = z.y1 * texel_scale_t; + } else { + z.x0 = draw_bounds->x0; + z.x1 = draw_bounds->x1; + z.y0 = draw_bounds->y0 / divisor; + z.y1 = (draw_bounds->y1 - 1) / divisor + 1; - tc[0] = z.x0*texel_scale_s; - tc[2] = z.x1*texel_scale_s; - tc[1] = ((z.y0 - 0.5f)*divisor+0.5f)*texel_scale_t; - tc[3] = ((z.y1 - 0.5f)*divisor+0.5f)*texel_scale_t; - } + tc[0] = z.x0 * texel_scale_s; + tc[2] = z.x1 * texel_scale_s; + tc[1] = ((z.y0 - 0.5f) * divisor + 0.5f) * texel_scale_t; + tc[3] = ((z.y1 - 0.5f) * divisor + 0.5f) * texel_scale_t; + } - if (!g->TextureDrawBufferBegin(&z, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, 0, gstats)) - return r->tex[0]; + if (!g->TextureDrawBufferBegin( + &z, GDRAW_TEXTURE_FORMAT_rgba32, + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | + GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, + 0, gstats)) + return r->tex[0]; - clamp[0] = texel_scale_s * (sample_bounds->x0 + 0.5f); - clamp[1] = texel_scale_t * (sample_bounds->y0 + 0.5f); - clamp[2] = texel_scale_s * (sample_bounds->x1 - 0.5f); - clamp[3] = texel_scale_t * (sample_bounds->y1 - 0.5f); + clamp[0] = texel_scale_s * (sample_bounds->x0 + 0.5f); + clamp[1] = texel_scale_t * (sample_bounds->y0 + 0.5f); + clamp[2] = texel_scale_s * (sample_bounds->x1 - 0.5f); + clamp[3] = texel_scale_t * (sample_bounds->y1 - 0.5f); - assert(clamp[0] <= clamp[2]); - assert(clamp[1] <= clamp[3]); + assert(clamp[0] <= clamp[2]); + assert(clamp[1] <= clamp[3]); - c->BlurPass(r, taps, data, &z, tc, (F32) c->h / c->frametex_height, clamp, gstats); - return g->TextureDrawBufferEnd(gstats); + c->BlurPass(r, taps, data, &z, tc, (F32)c->h / c->frametex_height, clamp, + gstats); + return g->TextureDrawBufferEnd(gstats); } -#define unmap(t,a,b) (((t)-(a))/(F32) ((b)-(a))) -#define linear_remap(t,a,b,c,d) ((c) + unmap(t,a,b)*((d)-(c))) +#define unmap(t, a, b) (((t) - (a)) / (F32)((b) - (a))) +#define linear_remap(t, a, b, c, d) ((c) + unmap(t, a, b) * ((d) - (c))) -static void gdraw_BlurAxis(S32 axis, GDrawFunctions *g, GDrawBlurInfo *c, GDrawRenderState *r, F32 blur_width, F32 texel, gswf_recti *draw_bounds, gswf_recti *sample_bounds, GDrawTexture *protect, GDrawStats *gstats) -{ - GDrawTexture *t; - F32 data[MAX_TAPS][4]; - S32 off_axis = 1-axis; - S32 w = ((S32) ceil((blur_width-1)/2))*2+1; // 1.2 => 3, 2.8 => 3, 3.2 => 5 - F32 edge_weight = 1 - (w - blur_width)/2; // 3 => 0 => 1; 1.2 => 1.8 => 0.9 => 0.1 - F32 inverse_weight = 1.0f / blur_width; +static void gdraw_BlurAxis(S32 axis, GDrawFunctions* g, GDrawBlurInfo* c, + GDrawRenderState* r, F32 blur_width, F32 texel, + gswf_recti* draw_bounds, gswf_recti* sample_bounds, + GDrawTexture* protect, GDrawStats* gstats) { + GDrawTexture* t; + F32 data[MAX_TAPS][4]; + S32 off_axis = 1 - axis; + S32 w = ((S32)ceil((blur_width - 1) / 2)) * 2 + + 1; // 1.2 => 3, 2.8 => 3, 3.2 => 5 + F32 edge_weight = + 1 - (w - blur_width) / 2; // 3 => 0 => 1; 1.2 => 1.8 => 0.9 => 0.1 + F32 inverse_weight = 1.0f / blur_width; - w = ((w-1) >> 1) + 1; // 3 => 2, 5 => 3, 7 => 4 (number of texture samples) + w = ((w - 1) >> 1) + + 1; // 3 => 2, 5 => 3, 7 => 4 (number of texture samples) - if (!r->tex[0]) - return; + if (!r->tex[0]) return; - // horizontal filter - if (w > 1) { - if (w <= MAX_TAPS) { - // we have enough taps to just do it - // use 'w' taps - S32 i, expand; - - // just go through and place all the taps in the right place - - // if w is 2 (sample from -1,0,1) - // 0 => -0.5 - // 1 => 1 - - // if w is 3: - // 0 => -1.5 samples from -2,-1 - // 1 => 0.5 samples from 0,1 - // 2 => 2 samples from 2 - - // if w is 4: - // 0 => -2.5 samples from -3,-2 - // 1 => -0.5 samples from -1,0 - // 2 => 1.5 samples from 1,2 - // 3 => 3 samples from 3 - - for (i=0; i < w; ++i) { - // first texsample samples from -w+1 and -w+2, e.g. w=2 => -1,0,1 - data[i][axis] = (-w+1.5f + i*2)*texel; - data[i][off_axis] = 0; - data[i][2] = 2*inverse_weight; // 2 full-weight samples - data[i][3] = 0; - } - // now reweight the last one - data[i-1][axis] = (w-1)*texel; - data[i-1][2] = edge_weight*inverse_weight; - // now reweight the first one - // (ew*0 + 1*1)/(1+ew) = 1/(1+ew) - data[0][axis] = (-w + 1.0f + 1/(edge_weight+1)) * texel; - data[0][2] = (edge_weight+1)*inverse_weight; - - expand = w-1; - gdraw_ExpandRect(draw_bounds, draw_bounds, axis ? 0 : expand, axis ? expand : 0, c->w, c->h); - - t = gdraw_BlurPass(g, c, r, w, data[0], draw_bounds, sample_bounds, gstats); - if (r->tex[0] != protect && r->tex[0] != t) - g->FreeTexture(r->tex[0], 0, gstats); - r->tex[0] = t; - gdraw_ExpandRect(sample_bounds, draw_bounds, 1, 1, c->w, c->h); // for next pass - } else { - // @OPTIMIZE: for symmetrical blurs we can get a 2-wide blur in the *off* axis at the same - // time we get N-wide in the on axis, which could double our max width - S32 i, expand; - // @HACK: this is really a dumb way to do it, i kind of had a brain fart, you could get - // the exact same result by just doing the downsample the naive way and then the - // final sample uses texture samples spaced by a texel rather than spaced by two - // texels -- the current method is just as inefficient, it just puts the inefficiency - // in the way the downsampled texture is self-overlapping, so the downsampled texture - // is twice as larger as it should be. - - // we COULD be exact by generating a mipmap, then sampling some number of samples - // from the mipmap and some from the original, but that would require being polyphase. - // instead we just are approximate. the mipmap weights the edge pixels by one half - // and overlaps them by one sample, so then in phase two we sample N slightly-overlapping - // mipmap samples - // - // instead we do the following. - // divide the source data up into clusters that are K samples long. - // ...K0... ...K1... ...K2... ...K3... - // - // Suppose K[i] is the average of all the items in cluster i. - // - // We compute a downsampled texture where T[i] = K[i] + K[i+1]. - // - // Now, we sample N taps from adjacent elements of T, allowing the texture unit - // to bilerp. Suppose a given sample falls at coordinate i with sub-position p. - // Then tap #j will compute: - // T[i+j]*(1-p) + T[i+j+1]*p - // But tap #j+1 will compute: - // T[i+j+1]*(1-p) + T[i+j+2]*p - // so we end up computing: - // sum(T[i+j]) except for the end samples. - // - // So, how do we create these initial clusters? That's easy, we use K taps - // to sample 2K texels. - // - // What value of k do we use? Well, we're constrained to using MAX_TAPS - // on each pass. So at the high end, we're bounded by: - // K = MAX_TAPS - // S = MAX_TAPS (S is number of samples in second pass) - // S addresses S*2-1 texels of T, and each texel adds K more samples, - // so (ignoring the edges) we basically have w = K*S - - // if w == MAX_TAPS*MAX_TAPS, then k = MAX_TAPS - // if w == MAX_TAPS+1, then k = 2 - // - // suppose we have 3 taps, then we can sample 5 samples in one pass, so then our - // max coverage is 25 samples, or a filter width of 13. with 7 taps, we sample - // 13 samples in one pass, max coverage is 13*13 samples or (13*13-1)/2 width, - // which is ((2T-1)*(2T-1)-1)/2 or (4T^2 - 4T + 1 -1)/2 or 2T^2 - 2T or 2T*(T-1) - S32 w_mip = (S32) ceil(linear_remap(w, MAX_TAPS+1, MAX_TAPS*MAX_TAPS, 2, MAX_TAPS)); - S32 downsample = w_mip; - F32 sample_spacing = texel; - if (downsample < 2) downsample = 2; - if (w_mip > MAX_TAPS) { - // if w_mip > MAX_TAPS, then we ought to use more than one mipmap pass, but - // since that's a huge filter ( > 80 pixels) let's just try subsampling and - // see if it's good enough. - sample_spacing *= w_mip / MAX_TAPS; - w_mip = MAX_TAPS; - } else { - assert(w / downsample <= MAX_TAPS); - } - inverse_weight = 1.0f / (2*w_mip); - for (i=0; i < w_mip; ++i) { - data[i][axis] = (-w_mip+1 + i*2+0.5f)*sample_spacing; - data[i][off_axis] = 0; - data[i][2] = 2*inverse_weight; - data[i][3] = 0; - } - w = w*2 / w_mip; - - // @TODO: compute the correct bboxes for this size - // the downsampled texture samples from -w_mip+1 to w_mip - // the sample from within that samples w spots within that, - // or w/2 of those, but they're overlapping by 50%. - // so if a sample is a point i, it samples from the original - // from -w_mip+1 to w_mip + i*w_mip. - // So then the minimum is: -w_mip+1 + (w/2)*w_mip, and - // the maximum is w_mip + (w/2)*w_mip - expand = (((w+1)>>1)+1)*w_mip+1; - gdraw_ExpandRect(draw_bounds, draw_bounds, axis ? 0 : expand, axis ? expand : 0, c->w, c->h); - - t = gdraw_BlurPassDownsample(g, c, r, w_mip, data[0], draw_bounds, axis, downsample, c->frametex_width, c->frametex_height, sample_bounds, gstats); - if (r->tex[0] != protect && r->tex[0] != t) - g->FreeTexture(r->tex[0], 0, gstats); - r->tex[0] = t; - gdraw_ExpandRect(sample_bounds, draw_bounds, 1, 1, c->w, c->h); - if (!r->tex[0]) - return; - - // now do a regular blur pass sampling from that - // the raw texture now contains 'downsample' samples per texel - if (w > 2*MAX_TAPS) { - sample_spacing = texel * (w-1) / (2*MAX_TAPS-1); - w = 2*MAX_TAPS; - } else { - sample_spacing = texel; - } - //sample_spacing *= 1.0f/2; - assert(w >= 2 && w <= 2*MAX_TAPS); - - if (w & 1) { - // we just want to evenly weight even-spaced samples - inverse_weight = 1.0f / w; + // horizontal filter + if (w > 1) { + if (w <= MAX_TAPS) { + // we have enough taps to just do it + // use 'w' taps + S32 i, expand; // just go through and place all the taps in the right place - w = (w+1)>>1; - for (i=0; i < w; ++i) { - data[i][axis] = (-w+1.0f + 0.5f + i*2)*sample_spacing; - data[i][off_axis] = 0; - data[i][2] = 2*inverse_weight; // 2 full-weight samples - data[i][3] = 0; + // if w is 2 (sample from -1,0,1) + // 0 => -0.5 + // 1 => 1 + + // if w is 3: + // 0 => -1.5 samples from -2,-1 + // 1 => 0.5 samples from 0,1 + // 2 => 2 samples from 2 + + // if w is 4: + // 0 => -2.5 samples from -3,-2 + // 1 => -0.5 samples from -1,0 + // 2 => 1.5 samples from 1,2 + // 3 => 3 samples from 3 + + for (i = 0; i < w; ++i) { + // first texsample samples from -w+1 and -w+2, e.g. w=2 => + // -1,0,1 + data[i][axis] = (-w + 1.5f + i * 2) * texel; + data[i][off_axis] = 0; + data[i][2] = 2 * inverse_weight; // 2 full-weight samples + data[i][3] = 0; + } + // now reweight the last one + data[i - 1][axis] = (w - 1) * texel; + data[i - 1][2] = edge_weight * inverse_weight; + // now reweight the first one + // (ew*0 + 1*1)/(1+ew) = 1/(1+ew) + data[0][axis] = (-w + 1.0f + 1 / (edge_weight + 1)) * texel; + data[0][2] = (edge_weight + 1) * inverse_weight; + + expand = w - 1; + gdraw_ExpandRect(draw_bounds, draw_bounds, axis ? 0 : expand, + axis ? expand : 0, c->w, c->h); + + t = gdraw_BlurPass(g, c, r, w, data[0], draw_bounds, sample_bounds, + gstats); + if (r->tex[0] != protect && r->tex[0] != t) + g->FreeTexture(r->tex[0], 0, gstats); + r->tex[0] = t; + gdraw_ExpandRect(sample_bounds, draw_bounds, 1, 1, c->w, + c->h); // for next pass + } else { + // @OPTIMIZE: for symmetrical blurs we can get a 2-wide blur in the + // *off* axis at the same time we get N-wide in the on axis, which + // could double our max width + S32 i, expand; + // @HACK: this is really a dumb way to do it, i kind of had a brain + // fart, you could get the exact same result by just doing the + // downsample the naive way and then the final sample uses texture + // samples spaced by a texel rather than spaced by two texels -- the + // current method is just as inefficient, it just puts the + // inefficiency in the way the downsampled texture is + // self-overlapping, so the downsampled texture is twice as larger + // as it should be. + + // we COULD be exact by generating a mipmap, then sampling some + // number of samples from the mipmap and some from the original, but + // that would require being polyphase. instead we just are + // approximate. the mipmap weights the edge pixels by one half and + // overlaps them by one sample, so then in phase two we sample N + // slightly-overlapping mipmap samples + // + // instead we do the following. + // divide the source data up into clusters that are K samples + // long. + // ...K0... ...K1... ...K2... ...K3... + // + // Suppose K[i] is the average of all the items in cluster i. + // + // We compute a downsampled texture where T[i] = K[i] + K[i+1]. + // + // Now, we sample N taps from adjacent elements of T, allowing the + // texture unit to bilerp. Suppose a given sample falls at + // coordinate i with sub-position p. Then tap #j will compute: + // T[i+j]*(1-p) + T[i+j+1]*p + // But tap #j+1 will compute: + // T[i+j+1]*(1-p) + T[i+j+2]*p + // so we end up computing: + // sum(T[i+j]) except for the end samples. + // + // So, how do we create these initial clusters? That's easy, we use + // K taps to sample 2K texels. + // + // What value of k do we use? Well, we're constrained to using + // MAX_TAPS on each pass. So at the high end, we're bounded by: + // K = MAX_TAPS + // S = MAX_TAPS (S is number of samples in second pass) + // S addresses S*2-1 texels of T, and each texel adds K more + // samples, so (ignoring the edges) we basically have w = K*S + + // if w == MAX_TAPS*MAX_TAPS, then k = MAX_TAPS + // if w == MAX_TAPS+1, then k = 2 + // + // suppose we have 3 taps, then we can sample 5 samples in one pass, + // so then our max coverage is 25 samples, or a filter width of 13. + // with 7 taps, we sample 13 samples in one pass, max coverage is + // 13*13 samples or (13*13-1)/2 width, which is ((2T-1)*(2T-1)-1)/2 + // or (4T^2 - 4T + 1 -1)/2 or 2T^2 - 2T or 2T*(T-1) + S32 w_mip = (S32)ceil(linear_remap( + w, MAX_TAPS + 1, MAX_TAPS * MAX_TAPS, 2, MAX_TAPS)); + S32 downsample = w_mip; + F32 sample_spacing = texel; + if (downsample < 2) downsample = 2; + if (w_mip > MAX_TAPS) { + // if w_mip > MAX_TAPS, then we ought to use more than one + // mipmap pass, but since that's a huge filter ( > 80 pixels) + // let's just try subsampling and see if it's good enough. + sample_spacing *= w_mip / MAX_TAPS; + w_mip = MAX_TAPS; + } else { + assert(w / downsample <= MAX_TAPS); + } + inverse_weight = 1.0f / (2 * w_mip); + for (i = 0; i < w_mip; ++i) { + data[i][axis] = (-w_mip + 1 + i * 2 + 0.5f) * sample_spacing; + data[i][off_axis] = 0; + data[i][2] = 2 * inverse_weight; + data[i][3] = 0; + } + w = w * 2 / w_mip; + + // @TODO: compute the correct bboxes for this size + // the downsampled texture samples from -w_mip+1 to w_mip + // the sample from within that samples w spots within that, + // or w/2 of those, but they're overlapping by 50%. + // so if a sample is a point i, it samples from the original + // from -w_mip+1 to w_mip + i*w_mip. + // So then the minimum is: -w_mip+1 + (w/2)*w_mip, and + // the maximum is w_mip + (w/2)*w_mip + expand = (((w + 1) >> 1) + 1) * w_mip + 1; + gdraw_ExpandRect(draw_bounds, draw_bounds, axis ? 0 : expand, + axis ? expand : 0, c->w, c->h); + + t = gdraw_BlurPassDownsample( + g, c, r, w_mip, data[0], draw_bounds, axis, downsample, + c->frametex_width, c->frametex_height, sample_bounds, gstats); + if (r->tex[0] != protect && r->tex[0] != t) + g->FreeTexture(r->tex[0], 0, gstats); + r->tex[0] = t; + gdraw_ExpandRect(sample_bounds, draw_bounds, 1, 1, c->w, c->h); + if (!r->tex[0]) return; + + // now do a regular blur pass sampling from that + // the raw texture now contains 'downsample' samples per texel + if (w > 2 * MAX_TAPS) { + sample_spacing = texel * (w - 1) / (2 * MAX_TAPS - 1); + w = 2 * MAX_TAPS; + } else { + sample_spacing = texel; + } + // sample_spacing *= 1.0f/2; + assert(w >= 2 && w <= 2 * MAX_TAPS); + + if (w & 1) { + // we just want to evenly weight even-spaced samples + inverse_weight = 1.0f / w; + + // just go through and place all the taps in the right place + + w = (w + 1) >> 1; + for (i = 0; i < w; ++i) { + data[i][axis] = (-w + 1.0f + 0.5f + i * 2) * sample_spacing; + data[i][off_axis] = 0; + data[i][2] = 2 * inverse_weight; // 2 full-weight samples + data[i][3] = 0; + } + + // fix up the last tap + + // the following test is always true, but we're testing it here + // explicitly so as to make VS2012's static analyzer not + // complain + if (i > 0) { + data[i - 1][axis] = + (-w + 1.0f + (i - 1) * 2) * sample_spacing; + data[i - 1][2] = inverse_weight; + } + } else { + // we just want to evenly weight even-spaced samples + inverse_weight = 1.0f / w; + + // just go through and place all the taps in the right place + w >>= 1; + for (i = 0; i < w; ++i) { + data[i][axis] = (-w + 1.0f + i * 2) * sample_spacing; + data[i][off_axis] = 0; + data[i][2] = 2 * inverse_weight; // 2 full-weight samples + data[i][3] = 0; + } } - // fix up the last tap - - // the following test is always true, but we're testing it here - // explicitly so as to make VS2012's static analyzer not complain - if (i > 0) { - data[i-1][axis] = (-w+1.0f+(i-1)*2)*sample_spacing; - data[i-1][2] = inverse_weight; - } - } else { - // we just want to evenly weight even-spaced samples - inverse_weight = 1.0f / w; - - // just go through and place all the taps in the right place - w >>= 1; - for (i=0; i < w; ++i) { - data[i][axis] = (-w+1.0f + i*2)*sample_spacing; - data[i][off_axis] = 0; - data[i][2] = 2*inverse_weight; // 2 full-weight samples - data[i][3] = 0; - } - } - - t = gdraw_BlurPassDownsample(g, c, r, w, data[0], draw_bounds, axis, 1, - axis==0 ? c->frametex_width*downsample : c->frametex_width, - axis==1 ? c->frametex_height*downsample : c->frametex_height, sample_bounds, gstats); - if (r->tex[0] != protect && r->tex[0] != t) - g->FreeTexture(r->tex[0], 0, gstats); - r->tex[0] = t; - gdraw_ExpandRect(sample_bounds, draw_bounds, 1, 1, c->w, c->h); - } - } + t = gdraw_BlurPassDownsample( + g, c, r, w, data[0], draw_bounds, axis, 1, + axis == 0 ? c->frametex_width * downsample : c->frametex_width, + axis == 1 ? c->frametex_height * downsample + : c->frametex_height, + sample_bounds, gstats); + if (r->tex[0] != protect && r->tex[0] != t) + g->FreeTexture(r->tex[0], 0, gstats); + r->tex[0] = t; + gdraw_ExpandRect(sample_bounds, draw_bounds, 1, 1, c->w, c->h); + } + } } -static void gdraw_Blur(GDrawFunctions *g, GDrawBlurInfo *c, GDrawRenderState *r, gswf_recti *draw_bounds, gswf_recti *sample_bounds, GDrawStats *gstats) -{ - S32 p; - GDrawTexture *protect = r->tex[0]; - gswf_recti sbounds; +static void gdraw_Blur(GDrawFunctions* g, GDrawBlurInfo* c, GDrawRenderState* r, + gswf_recti* draw_bounds, gswf_recti* sample_bounds, + GDrawStats* gstats) { + S32 p; + GDrawTexture* protect = r->tex[0]; + gswf_recti sbounds; - // compute texel offset size - F32 dx = 1.0f / c->frametex_width; - F32 dy = 1.0f / c->frametex_height; + // compute texel offset size + F32 dx = 1.0f / c->frametex_width; + F32 dy = 1.0f / c->frametex_height; - // blur = 1 => 1 tap - // blur = 1.2 => 3 taps (0.1, 1, 0.1) - // blur = 2.2 => 3 taps (0.6, 1, 0.6) - // blur = 2.8 => 3 taps (0.9, 1, 0.9) - // blur = 3 => 3 taps (1 , 1, 1 ) - // blur = 3.2 => 5 taps (0.1, 1, 1, 1, 0.1) + // blur = 1 => 1 tap + // blur = 1.2 => 3 taps (0.1, 1, 0.1) + // blur = 2.2 => 3 taps (0.6, 1, 0.6) + // blur = 2.8 => 3 taps (0.9, 1, 0.9) + // blur = 3 => 3 taps (1 , 1, 1 ) + // blur = 3.2 => 5 taps (0.1, 1, 1, 1, 0.1) - //S32 w = ((S32) ceil((r->blur_x-1)/2))*2+1; // 1.2 => (1.2-1)/2 => 0.1 => 1.0 => 1 => 2 => 3 - //S32 h = ((S32) ceil((r->blur_y-1)/2))*2+1; // 3 => (3-1)/2 => 1.0 => 1 => 2 => 3 + // S32 w = ((S32) ceil((r->blur_x-1)/2))*2+1; // 1.2 => (1.2-1)/2 => 0.1 + // => 1.0 => 1 => 2 => 3 S32 h = ((S32) ceil((r->blur_y-1)/2))*2+1; // 3 + // => (3-1)/2 => 1.0 => 1 => 2 => 3 - // gdraw puts 1 border pixel around everything when producing rendertargets and we use this - // so expand the input sample bounds accordingly - gdraw_ExpandRect(&sbounds, sample_bounds, 1, 1, c->w, c->h); + // gdraw puts 1 border pixel around everything when producing rendertargets + // and we use this so expand the input sample bounds accordingly + gdraw_ExpandRect(&sbounds, sample_bounds, 1, 1, c->w, c->h); - for (p=0; p < r->blur_passes; ++p) { - { - // do the filter separably - gdraw_BlurAxis(0,g,c,r,r->blur_x,dx, draw_bounds, &sbounds, protect, gstats); - gdraw_BlurAxis(1,g,c,r,r->blur_y,dy, draw_bounds, &sbounds, protect, gstats); - } - } + for (p = 0; p < r->blur_passes; ++p) { + { + // do the filter separably + gdraw_BlurAxis(0, g, c, r, r->blur_x, dx, draw_bounds, &sbounds, + protect, gstats); + gdraw_BlurAxis(1, g, c, r, r->blur_y, dy, draw_bounds, &sbounds, + protect, gstats); + } + } } #if defined(GDRAW_MANAGE_MEM) -static void make_pool_aligned(void **start, S32 *num_bytes, U32 alignment) -{ - UINTa addr_orig = (UINTa) *start; - UINTa addr_aligned = (addr_orig + alignment-1) & ~((UINTa) alignment - 1); +static void make_pool_aligned(void** start, S32* num_bytes, U32 alignment) { + UINTa addr_orig = (UINTa)*start; + UINTa addr_aligned = (addr_orig + alignment - 1) & ~((UINTa)alignment - 1); - if (addr_aligned != addr_orig) { - S32 diff = (S32) (addr_aligned - addr_orig); - if (*num_bytes < diff) { - *start = NULL; - *num_bytes = 0; - return; - } else { - *start = (void *)addr_aligned; - *num_bytes -= diff; - } - } + if (addr_aligned != addr_orig) { + S32 diff = (S32)(addr_aligned - addr_orig); + if (*num_bytes < diff) { + *start = NULL; + *num_bytes = 0; + return; + } else { + *start = (void*)addr_aligned; + *num_bytes -= diff; + } + } } // Very simple arena allocator -typedef struct -{ - U8 *begin; - U8 *current; - U8 *end; +typedef struct { + U8* begin; + U8* current; + U8* end; } GDrawArena; -static void gdraw_arena_init(GDrawArena *arena, void *start, U32 size) -{ - arena->begin = (U8 *)start; - arena->current = (U8 *)start; - arena->end = (U8 *)start + size; +static void gdraw_arena_init(GDrawArena* arena, void* start, U32 size) { + arena->begin = (U8*)start; + arena->current = (U8*)start; + arena->end = (U8*)start + size; } -static GDRAW_MAYBE_UNUSED void gdraw_arena_reset(GDrawArena *arena) -{ - arena->current = arena->begin; +static GDRAW_MAYBE_UNUSED void gdraw_arena_reset(GDrawArena* arena) { + arena->current = arena->begin; } -static void *gdraw_arena_alloc(GDrawArena *arena, U32 size, U32 align) -{ - UINTa start_addr = ((UINTa)arena->current + align-1) & ~((UINTa) align - 1); - U8 *ptr = (U8 *)start_addr; - UINTa remaining = arena->end - arena->current; - UINTa total_size = (ptr - arena->current) + size; - if (remaining < total_size) // doesn't fit - return NULL; +static void* gdraw_arena_alloc(GDrawArena* arena, U32 size, U32 align) { + UINTa start_addr = + ((UINTa)arena->current + align - 1) & ~((UINTa)align - 1); + U8* ptr = (U8*)start_addr; + UINTa remaining = arena->end - arena->current; + UINTa total_size = (ptr - arena->current) + size; + if (remaining < total_size) // doesn't fit + return NULL; - arena->current = ptr + size; - return ptr; + arena->current = ptr + size; + return ptr; } // Allocator for graphics memory. @@ -1145,494 +1218,499 @@ static void *gdraw_arena_alloc(GDrawArena *arena, U32 size, U32 align) #define GFXALLOC_ASSERT(x) #endif -typedef struct gfx_block_info -{ - U8 *ptr; - gfx_block_info *prev, *next; // for free blocks this is the free list, for allocated blocks it's a (single-linked!) list of elements in the corresponding hash bucket - gfx_block_info *prev_phys, *next_phys; - U32 is_free : 1; - U32 is_unused : 1; - U32 size : 30; +typedef struct gfx_block_info { + U8* ptr; + gfx_block_info *prev, + *next; // for free blocks this is the free list, for allocated blocks + // it's a (single-linked!) list of elements in the corresponding + // hash bucket + gfx_block_info *prev_phys, *next_phys; + U32 is_free : 1; + U32 is_unused : 1; + U32 size : 30; } gfx_block_info; // 24 bytes/block on 32bit, 48 bytes/block on 64bit. #define GFXALLOC_HASH_SIZE 256 -typedef struct gfx_allocator -{ - U8 *mem_base; - U8 *mem_end; - U32 max_allocs; - U32 block_align; - U32 block_shift; - S32 actual_bytes_free; +typedef struct gfx_allocator { + U8* mem_base; + U8* mem_end; + U32 max_allocs; + U32 block_align; + U32 block_shift; + S32 actual_bytes_free; #if defined(GFXALLOC_CHECK) - int num_blocks; - int num_unused; - int num_alloc; - int num_free; + int num_blocks; + int num_unused; + int num_alloc; + int num_free; #endif - GDrawHandleCache *cache; + GDrawHandleCache* cache; - gfx_block_info *unused_list; // next unused block_info (single-linked list) - gfx_block_info *hash[GFXALLOC_HASH_SIZE]; // allocated blocks - gfx_block_info blocks[1]; // first block is head of free list AND head of physical block list (sentinel) + gfx_block_info* unused_list; // next unused block_info (single-linked list) + gfx_block_info* hash[GFXALLOC_HASH_SIZE]; // allocated blocks + gfx_block_info blocks[1]; // first block is head of free list AND head of + // physical block list (sentinel) } gfx_allocator; -// about 1k (32bit), 2k (64bit) with 256 hash buckets (the default). dominated by hash table. +// about 1k (32bit), 2k (64bit) with 256 hash buckets (the default). dominated +// by hash table. #if defined(GFXALLOC_CHECK) -#define GFXALLOC_IF_CHECK(x) x +#define GFXALLOC_IF_CHECK(x) x #else #define GFXALLOC_IF_CHECK(x) #endif -static U32 gfxalloc_get_hash_code(gfx_allocator *alloc, void *ptr) -{ - U32 a = (U32) (((U8 *) ptr - alloc->mem_base) >> alloc->block_shift); +static U32 gfxalloc_get_hash_code(gfx_allocator* alloc, void* ptr) { + U32 a = (U32)(((U8*)ptr - alloc->mem_base) >> alloc->block_shift); - // integer hash function by Bob Jenkins (http://burtleburtle.net/bob/hash/integer.html) - // I use this function because integer mults are slow on PPC and large literal constants - // take multiple instrs to set up on all RISC CPUs. - a -= (a<<6); - a ^= (a>>17); - a -= (a<<9); - a ^= (a<<4); - a -= (a<<3); - a ^= (a<<10); - a ^= (a>>15); + // integer hash function by Bob Jenkins + // (http://burtleburtle.net/bob/hash/integer.html) I use this function + // because integer mults are slow on PPC and large literal constants take + // multiple instrs to set up on all RISC CPUs. + a -= (a << 6); + a ^= (a >> 17); + a -= (a << 9); + a ^= (a << 4); + a -= (a << 3); + a ^= (a << 10); + a ^= (a >> 15); - return a & (GFXALLOC_HASH_SIZE - 1); + return a & (GFXALLOC_HASH_SIZE - 1); } #if defined(SUPERDEBUG) || defined(COMPLETE_DEBUG) #include -#define MAX_REGIONS 8192 -typedef struct -{ - U32 begin,end; +#define MAX_REGIONS 8192 +typedef struct { + U32 begin, end; } gfx_region; static gfx_region region[MAX_REGIONS]; -static int region_sort(const void *p, const void *q) -{ - U32 a = *(U32*)p; - U32 b = *(U32*)q; - if (a < b) return -1; - if (a > b) return 1; - return 0; +static int region_sort(const void* p, const void* q) { + U32 a = *(U32*)p; + U32 b = *(U32*)q; + if (a < b) return -1; + if (a > b) return 1; + return 0; } -static void gfxalloc_check1(gfx_allocator *alloc) -{ - assert(alloc->max_allocs*2+1 < MAX_REGIONS); - int i,n=0; - for (i=0; i < GFXALLOC_HASH_SIZE; ++i) { - gfx_block_info *b = alloc->hash[i]; - while (b) { - region[n].begin = (UINTa) b->ptr; - region[n].end = region[n].begin + b->size; - ++n; - b = b->next; - } - } - gfx_block_info *b = alloc->blocks[0].next; - while (b != &alloc->blocks[0]) { - region[n].begin = (UINTa) b->ptr; - region[n].end = region[n].begin + b->size; - ++n; - b = b->next; - } - qsort(region, n, sizeof(region[0]), region_sort); - for (i=0; i+1 < n; ++i) { - assert(region[i].end == region[i+1].begin); - } +static void gfxalloc_check1(gfx_allocator* alloc) { + assert(alloc->max_allocs * 2 + 1 < MAX_REGIONS); + int i, n = 0; + for (i = 0; i < GFXALLOC_HASH_SIZE; ++i) { + gfx_block_info* b = alloc->hash[i]; + while (b) { + region[n].begin = (UINTa)b->ptr; + region[n].end = region[n].begin + b->size; + ++n; + b = b->next; + } + } + gfx_block_info* b = alloc->blocks[0].next; + while (b != &alloc->blocks[0]) { + region[n].begin = (UINTa)b->ptr; + region[n].end = region[n].begin + b->size; + ++n; + b = b->next; + } + qsort(region, n, sizeof(region[0]), region_sort); + for (i = 0; i + 1 < n; ++i) { + assert(region[i].end == region[i + 1].begin); + } } #else #define gfxalloc_check1(a) #endif #if defined(COMPLETE_DEBUG) -static void verify_against_blocks(int num_regions, void *vptr, S32 len) -{ - U32 *ptr = (U32 *) vptr; - // binary search for ptr amongst regions - S32 s=0,e=num_regions-1; - assert(len != 0); - while (s < e) { - S32 i = (s+e+1)>>1; - // invariant: b[s] <= ptr <= b[e] - if (region[i].begin <= (UINTa) ptr) - s = i; - else - e = i-1; +static void verify_against_blocks(int num_regions, void* vptr, S32 len) { + U32* ptr = (U32*)vptr; + // binary search for ptr amongst regions + S32 s = 0, e = num_regions - 1; + assert(len != 0); + while (s < e) { + S32 i = (s + e + 1) >> 1; + // invariant: b[s] <= ptr <= b[e] + if (region[i].begin <= (UINTa)ptr) + s = i; + else + e = i - 1; - // consider cases: - // s=0,e=1: i = 0, how do we get i to be 1? - } - // at this point, s >= e - assert(s < num_regions && region[s].begin == (UINTa) ptr && (UINTa) ptr+len <= region[s].end); + // consider cases: + // s=0,e=1: i = 0, how do we get i to be 1? + } + // at this point, s >= e + assert(s < num_regions && region[s].begin == (UINTa)ptr && + (UINTa)ptr + len <= region[s].end); } -static void debug_complete_check(gfx_allocator *alloc, void *ptr, S32 len, void *skip) -{ - GDrawHandleCache *c = alloc->cache; - assert(alloc->max_allocs*2+1 < MAX_REGIONS); - int i,n=0; - for (i=0; i < GFXALLOC_HASH_SIZE; ++i) { - gfx_block_info *b = alloc->hash[i]; - while (b) { - region[n].begin = (UINTa) b->ptr; - region[n].end = region[n].begin + b->size; - ++n; - b = b->next; - } - } - gfx_block_info *b = alloc->blocks[0].next; - while (b != &alloc->blocks[0]) { - region[n].begin = (UINTa) b->ptr; - region[n].end = region[n].begin + b->size; - ++n; - b = b->next; - } - for (i=0; i < n; ++i) - assert(region[i].end > region[i].begin); - qsort(region, n, sizeof(region[0]), region_sort); - for (i=0; i+1 < n; ++i) { - assert(region[i].end == region[i+1].begin); - } +static void debug_complete_check(gfx_allocator* alloc, void* ptr, S32 len, + void* skip) { + GDrawHandleCache* c = alloc->cache; + assert(alloc->max_allocs * 2 + 1 < MAX_REGIONS); + int i, n = 0; + for (i = 0; i < GFXALLOC_HASH_SIZE; ++i) { + gfx_block_info* b = alloc->hash[i]; + while (b) { + region[n].begin = (UINTa)b->ptr; + region[n].end = region[n].begin + b->size; + ++n; + b = b->next; + } + } + gfx_block_info* b = alloc->blocks[0].next; + while (b != &alloc->blocks[0]) { + region[n].begin = (UINTa)b->ptr; + region[n].end = region[n].begin + b->size; + ++n; + b = b->next; + } + for (i = 0; i < n; ++i) assert(region[i].end > region[i].begin); + qsort(region, n, sizeof(region[0]), region_sort); + for (i = 0; i + 1 < n; ++i) { + assert(region[i].end == region[i + 1].begin); + } - if (ptr) - verify_against_blocks(n, ptr, len); + if (ptr) verify_against_blocks(n, ptr, len); - if (c) { - GDrawHandle *t = c->head; - while (t) { - if (t->raw_ptr && t->raw_ptr != skip) - verify_against_blocks(n, t->raw_ptr, t->bytes); - t = t->next; - } - t = c->active; - while (t) { - if (t->raw_ptr && t->raw_ptr != skip) - verify_against_blocks(n, t->raw_ptr, t->bytes); - t = t->next; - } - } + if (c) { + GDrawHandle* t = c->head; + while (t) { + if (t->raw_ptr && t->raw_ptr != skip) + verify_against_blocks(n, t->raw_ptr, t->bytes); + t = t->next; + } + t = c->active; + while (t) { + if (t->raw_ptr && t->raw_ptr != skip) + verify_against_blocks(n, t->raw_ptr, t->bytes); + t = t->next; + } + } } #else -#define debug_complete_check(a,p,len,s) +#define debug_complete_check(a, p, len, s) #endif #if defined(GFXALLOC_CHECK) -static void gfxalloc_check2(gfx_allocator *alloc) -{ - int n=0; - gfx_block_info *b = alloc->unused_list; - while (b) { - ++n; - b = b->next; - } - GFXALLOC_ASSERT(n == alloc->num_unused); - b = alloc->blocks->next; - n = 0; - while (b != alloc->blocks) { - ++n; - b = b->next; - } - GFXALLOC_ASSERT(n == alloc->num_free); - GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_unused + alloc->num_free + alloc->num_alloc); +static void gfxalloc_check2(gfx_allocator* alloc) { + int n = 0; + gfx_block_info* b = alloc->unused_list; + while (b) { + ++n; + b = b->next; + } + GFXALLOC_ASSERT(n == alloc->num_unused); + b = alloc->blocks->next; + n = 0; + while (b != alloc->blocks) { + ++n; + b = b->next; + } + GFXALLOC_ASSERT(n == alloc->num_free); + GFXALLOC_ASSERT(alloc->num_blocks == + alloc->num_unused + alloc->num_free + alloc->num_alloc); } -#define gfxalloc_check(a) do { gfxalloc_check1(a); gfxalloc_check2(a); } while(0) +#define gfxalloc_check(a) \ + do { \ + gfxalloc_check1(a); \ + gfxalloc_check2(a); \ + } while (0) #else #define gfxalloc_check2(a) #define gfxalloc_check(a) #endif +static gfx_block_info* gfxalloc_pop_unused(gfx_allocator* alloc) { + GFXALLOC_ASSERT(alloc->unused_list != NULL); + GFXALLOC_ASSERT(alloc->unused_list->is_unused); + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_unused);) - -static gfx_block_info *gfxalloc_pop_unused(gfx_allocator *alloc) -{ - GFXALLOC_ASSERT(alloc->unused_list != NULL); - GFXALLOC_ASSERT(alloc->unused_list->is_unused); - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_unused);) - - gfx_block_info *b = alloc->unused_list; - alloc->unused_list = b->next; - GFXALLOC_ASSERT(alloc->unused_list); - b->is_unused = 0; - GFXALLOC_IF_CHECK(--alloc->num_unused;) - return b; + gfx_block_info* b = alloc->unused_list; + alloc->unused_list = b->next; + GFXALLOC_ASSERT(alloc->unused_list); + b->is_unused = 0; + GFXALLOC_IF_CHECK(--alloc->num_unused;) + return b; } -static void gfxalloc_push_unused(gfx_allocator *alloc, gfx_block_info *b) -{ - GFXALLOC_ASSERT(!b->is_unused); - b->is_unused = 1; - b->next = alloc->unused_list; - alloc->unused_list = b; - GFXALLOC_IF_CHECK(++alloc->num_unused); +static void gfxalloc_push_unused(gfx_allocator* alloc, gfx_block_info* b) { + GFXALLOC_ASSERT(!b->is_unused); + b->is_unused = 1; + b->next = alloc->unused_list; + alloc->unused_list = b; + GFXALLOC_IF_CHECK(++alloc->num_unused); } -static void gfxalloc_add_free(gfx_allocator *alloc, gfx_block_info *b) -{ - gfx_block_info *head = alloc->blocks; +static void gfxalloc_add_free(gfx_allocator* alloc, gfx_block_info* b) { + gfx_block_info* head = alloc->blocks; - b->is_free = 1; - b->next = head->next; - b->prev = head; - head->next->prev = b; - head->next = b; - GFXALLOC_IF_CHECK(++alloc->num_free;) + b->is_free = 1; + b->next = head->next; + b->prev = head; + head->next->prev = b; + head->next = b; + GFXALLOC_IF_CHECK(++alloc->num_free;) } -static void gfxalloc_rem_free(gfx_allocator *alloc, gfx_block_info *b) -{ - RR_UNUSED_VARIABLE(alloc); - b->is_free = 0; - b->prev->next = b->next; - b->next->prev = b->prev; - GFXALLOC_IF_CHECK(--alloc->num_free;) +static void gfxalloc_rem_free(gfx_allocator* alloc, gfx_block_info* b) { + RR_UNUSED_VARIABLE(alloc); + b->is_free = 0; + b->prev->next = b->next; + b->next->prev = b->prev; + GFXALLOC_IF_CHECK(--alloc->num_free;) } -static void gfxalloc_split_free(gfx_allocator *alloc, gfx_block_info *b, U32 pos) -{ - gfx_block_info *n = gfxalloc_pop_unused(alloc); +static void gfxalloc_split_free(gfx_allocator* alloc, gfx_block_info* b, + U32 pos) { + gfx_block_info* n = gfxalloc_pop_unused(alloc); - GFXALLOC_ASSERT(b->is_free); - GFXALLOC_ASSERT(pos > 0 && pos < b->size); + GFXALLOC_ASSERT(b->is_free); + GFXALLOC_ASSERT(pos > 0 && pos < b->size); - // set up new free block - n->ptr = b->ptr + pos; - n->prev_phys = b; - n->next_phys = b->next_phys; - n->next_phys->prev_phys = n; - n->size = b->size - pos; - assert(n->size != 0); - gfxalloc_add_free(alloc, n); + // set up new free block + n->ptr = b->ptr + pos; + n->prev_phys = b; + n->next_phys = b->next_phys; + n->next_phys->prev_phys = n; + n->size = b->size - pos; + assert(n->size != 0); + gfxalloc_add_free(alloc, n); - // fix original block - b->next_phys = n; - b->size = pos; - assert(b->size != 0); + // fix original block + b->next_phys = n; + b->size = pos; + assert(b->size != 0); -debug_complete_check(alloc, n->ptr, n->size,0); -debug_complete_check(alloc, b->ptr, b->size,0); + debug_complete_check(alloc, n->ptr, n->size, 0); + debug_complete_check(alloc, b->ptr, b->size, 0); } -static gfx_allocator *gfxalloc_create(void *mem, U32 mem_size, U32 align, U32 max_allocs) -{ - gfx_allocator *a; - U32 i, max_blocks, size; +static gfx_allocator* gfxalloc_create(void* mem, U32 mem_size, U32 align, + U32 max_allocs) { + gfx_allocator* a; + U32 i, max_blocks, size; - if (!align || (align & (align - 1)) != 0) // align must be >0 and a power of 2 - return NULL; + if (!align || + (align & (align - 1)) != 0) // align must be >0 and a power of 2 + return NULL; - // for <= max_allocs live allocs, there's <= 2*max_allocs+1 blocks. worst case: - // [free][used][free] .... [free][used][free] - max_blocks = max_allocs * 2 + 1; - size = sizeof(gfx_allocator) + max_blocks * sizeof(gfx_block_info); - a = (gfx_allocator *) IggyGDrawMalloc(size); - if (!a) - return NULL; + // for <= max_allocs live allocs, there's <= 2*max_allocs+1 blocks. worst + // case: [free][used][free] .... [free][used][free] + max_blocks = max_allocs * 2 + 1; + size = sizeof(gfx_allocator) + max_blocks * sizeof(gfx_block_info); + a = (gfx_allocator*)IggyGDrawMalloc(size); + if (!a) return NULL; - memset(a, 0, size); + memset(a, 0, size); - GFXALLOC_IF_CHECK(a->num_blocks = max_blocks;) - GFXALLOC_IF_CHECK(a->num_alloc = 0;) - GFXALLOC_IF_CHECK(a->num_free = 1;) - GFXALLOC_IF_CHECK(a->num_unused = max_blocks-1;) + GFXALLOC_IF_CHECK(a->num_blocks = max_blocks;) + GFXALLOC_IF_CHECK(a->num_alloc = 0;) + GFXALLOC_IF_CHECK(a->num_free = 1;) + GFXALLOC_IF_CHECK(a->num_unused = max_blocks - 1;) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(a->num_blocks == a->num_alloc + a->num_free + a->num_unused);) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(a->num_free <= a->num_blocks+1);) + GFXALLOC_IF_CHECK( + GFXALLOC_ASSERT(a->num_blocks == + a->num_alloc + a->num_free + a->num_unused);) + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(a->num_free <= a->num_blocks + 1);) - a->actual_bytes_free = mem_size; - a->mem_base = (U8 *) mem; - a->mem_end = a->mem_base + mem_size; - a->max_allocs = max_allocs; - a->block_align = align; - a->block_shift = 0; - while ((1u << a->block_shift) < a->block_align) - a->block_shift++; + a->actual_bytes_free = mem_size; + a->mem_base = (U8*)mem; + a->mem_end = a->mem_base + mem_size; + a->max_allocs = max_allocs; + a->block_align = align; + a->block_shift = 0; + while ((1u << a->block_shift) < a->block_align) a->block_shift++; - // init sentinel block - a->blocks[0].prev = a->blocks[0].next = &a->blocks[1]; // point to free block - a->blocks[0].prev_phys = a->blocks[0].next_phys = &a->blocks[1]; // same + // init sentinel block + a->blocks[0].prev = a->blocks[0].next = + &a->blocks[1]; // point to free block + a->blocks[0].prev_phys = a->blocks[0].next_phys = &a->blocks[1]; // same - // init first free block - a->blocks[1].ptr = a->mem_base; - a->blocks[1].prev = a->blocks[1].next = &a->blocks[0]; - a->blocks[1].prev_phys = a->blocks[1].next_phys = &a->blocks[0]; - a->blocks[1].is_free = 1; - a->blocks[1].size = mem_size; + // init first free block + a->blocks[1].ptr = a->mem_base; + a->blocks[1].prev = a->blocks[1].next = &a->blocks[0]; + a->blocks[1].prev_phys = a->blocks[1].next_phys = &a->blocks[0]; + a->blocks[1].is_free = 1; + a->blocks[1].size = mem_size; - // init "unused" list - a->unused_list = a->blocks + 2; - for (i=2; i < max_blocks; i++) { - a->blocks[i].is_unused = 1; - a->blocks[i].next = a->blocks + (i + 1); - } - a->blocks[i].is_unused = 1; + // init "unused" list + a->unused_list = a->blocks + 2; + for (i = 2; i < max_blocks; i++) { + a->blocks[i].is_unused = 1; + a->blocks[i].next = a->blocks + (i + 1); + } + a->blocks[i].is_unused = 1; - gfxalloc_check(a); - debug_complete_check(a, NULL, 0,0); - return a; + gfxalloc_check(a); + debug_complete_check(a, NULL, 0, 0); + return a; } -static void *gfxalloc_alloc(gfx_allocator *alloc, U32 size_in_bytes) -{ - gfx_block_info *cur, *best = NULL; - U32 i, best_wasted = ~0u; - U32 size = size_in_bytes; -debug_complete_check(alloc, NULL, 0,0); -gfxalloc_check(alloc); - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_alloc + alloc->num_free + alloc->num_unused);) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks+1);) +static void* gfxalloc_alloc(gfx_allocator* alloc, U32 size_in_bytes) { + gfx_block_info *cur, *best = NULL; + U32 i, best_wasted = ~0u; + U32 size = size_in_bytes; + debug_complete_check(alloc, NULL, 0, 0); + gfxalloc_check(alloc); + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == + alloc->num_alloc + alloc->num_free + + alloc->num_unused);) + GFXALLOC_IF_CHECK( + GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks + 1);) + // round up to multiple of our block alignment + size = (size + alloc->block_align - 1) & ~(alloc->block_align - 1); + assert(size >= size_in_bytes); + assert(size != 0); - // round up to multiple of our block alignment - size = (size + alloc->block_align-1) & ~(alloc->block_align - 1); - assert(size >= size_in_bytes); - assert(size != 0); + // find best fit among all free blocks. this is O(N)! + for (cur = alloc->blocks[0].next; cur != alloc->blocks; cur = cur->next) { + if (cur->size >= size) { + U32 wasted = cur->size - size; + if (wasted < best_wasted) { + best_wasted = wasted; + best = cur; + if (!wasted) break; // can't get better than perfect + } + } + } - // find best fit among all free blocks. this is O(N)! - for (cur = alloc->blocks[0].next; cur != alloc->blocks; cur = cur->next) { - if (cur->size >= size) { - U32 wasted = cur->size - size; - if (wasted < best_wasted) { - best_wasted = wasted; - best = cur; - if (!wasted) break; // can't get better than perfect - } - } - } + // return the best fit, if we found any suitable block + if (best) { + debug_check_overlap(alloc->cache, best->ptr, best->size); + // split off allocated part + if (size != best->size) gfxalloc_split_free(alloc, best, size); + debug_complete_check(alloc, best->ptr, best->size, 0); - // return the best fit, if we found any suitable block - if (best) { -debug_check_overlap(alloc->cache, best->ptr, best->size); - // split off allocated part - if (size != best->size) - gfxalloc_split_free(alloc, best, size); -debug_complete_check(alloc, best->ptr, best->size,0); + // remove from free list and add to allocated hash table + GFXALLOC_ASSERT(best->size == size); + gfxalloc_rem_free(alloc, best); - // remove from free list and add to allocated hash table - GFXALLOC_ASSERT(best->size == size); - gfxalloc_rem_free(alloc, best); + i = gfxalloc_get_hash_code(alloc, best->ptr); + best->next = alloc->hash[i]; + alloc->hash[i] = best; + alloc->actual_bytes_free -= size; + GFXALLOC_ASSERT(alloc->actual_bytes_free >= 0); - i = gfxalloc_get_hash_code(alloc, best->ptr); - best->next = alloc->hash[i]; - alloc->hash[i] = best; - alloc->actual_bytes_free -= size; - GFXALLOC_ASSERT(alloc->actual_bytes_free >= 0); + GFXALLOC_IF_CHECK(++alloc->num_alloc;) + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == + alloc->num_alloc + alloc->num_free + + alloc->num_unused);) + GFXALLOC_IF_CHECK( + GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks + 1);) - GFXALLOC_IF_CHECK(++alloc->num_alloc;) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_alloc + alloc->num_free + alloc->num_unused);) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks+1);) - -debug_complete_check(alloc, best->ptr, best->size,0); -gfxalloc_check(alloc); -debug_check_overlap(alloc->cache, best->ptr, best->size); - return best->ptr; - } else - return NULL; // not enough space! + debug_complete_check(alloc, best->ptr, best->size, 0); + gfxalloc_check(alloc); + debug_check_overlap(alloc->cache, best->ptr, best->size); + return best->ptr; + } else + return NULL; // not enough space! } -static void gfxalloc_free(gfx_allocator *alloc, void *ptr) -{ - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_alloc + alloc->num_free + alloc->num_unused);) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks+1);) +static void gfxalloc_free(gfx_allocator* alloc, void* ptr) { + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == + alloc->num_alloc + alloc->num_free + + alloc->num_unused);) + GFXALLOC_IF_CHECK( + GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks + 1);) - // find the block in the hash table - gfx_block_info *b, *t, **prevnext; - U32 i = gfxalloc_get_hash_code(alloc, ptr); + // find the block in the hash table + gfx_block_info *b, *t, **prevnext; + U32 i = gfxalloc_get_hash_code(alloc, ptr); - prevnext = &alloc->hash[i]; - b = alloc->hash[i]; + prevnext = &alloc->hash[i]; + b = alloc->hash[i]; - while (b) { - if (b->ptr == ptr) break; - prevnext = &b->next; - b = b->next; - } + while (b) { + if (b->ptr == ptr) break; + prevnext = &b->next; + b = b->next; + } - if (!b) { - GFXALLOC_ASSERT(0); // trying to free a non-allocated block - return; - } + if (!b) { + GFXALLOC_ASSERT(0); // trying to free a non-allocated block + return; + } -debug_complete_check(alloc, b->ptr, b->size, 0); - GFXALLOC_IF_CHECK(--alloc->num_alloc;) + debug_complete_check(alloc, b->ptr, b->size, 0); + GFXALLOC_IF_CHECK(--alloc->num_alloc;) - // remove it from the hash table - *prevnext = b->next; + // remove it from the hash table + *prevnext = b->next; - alloc->actual_bytes_free += b->size; + alloc->actual_bytes_free += b->size; - // merge with previous block if it's free, else add it to free list - t = b->prev_phys; - if (t->is_free) { - t->size += b->size; - t->next_phys = b->next_phys; - t->next_phys->prev_phys = t; - gfxalloc_push_unused(alloc, b); - b = t; - } else - gfxalloc_add_free(alloc, b); + // merge with previous block if it's free, else add it to free list + t = b->prev_phys; + if (t->is_free) { + t->size += b->size; + t->next_phys = b->next_phys; + t->next_phys->prev_phys = t; + gfxalloc_push_unused(alloc, b); + b = t; + } else + gfxalloc_add_free(alloc, b); - // try to merge with next block - t = b->next_phys; - if (t->is_free) { - b->size += t->size; - b->next_phys = t->next_phys; - t->next_phys->prev_phys = b; - gfxalloc_rem_free(alloc, t); - gfxalloc_push_unused(alloc, t); - } -debug_complete_check(alloc, 0, 0, ptr); -gfxalloc_check(alloc); - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_alloc + alloc->num_free + alloc->num_unused);) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks+1);) + // try to merge with next block + t = b->next_phys; + if (t->is_free) { + b->size += t->size; + b->next_phys = t->next_phys; + t->next_phys->prev_phys = b; + gfxalloc_rem_free(alloc, t); + gfxalloc_push_unused(alloc, t); + } + debug_complete_check(alloc, 0, 0, ptr); + gfxalloc_check(alloc); + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == + alloc->num_alloc + alloc->num_free + + alloc->num_unused);) + GFXALLOC_IF_CHECK( + GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks + 1);) } #if defined(GDRAW_MANAGE_MEM_TWOPOOL) -static rrbool gfxalloc_is_empty(gfx_allocator *alloc) -{ - gfx_block_info *first_free = alloc->blocks[0].next; +static rrbool gfxalloc_is_empty(gfx_allocator* alloc) { + gfx_block_info* first_free = alloc->blocks[0].next; - // we want to check whether there's exactly one free block that - // covers the entire pool. - if (first_free == alloc->blocks) // 0 free blocks - return false; + // we want to check whether there's exactly one free block that + // covers the entire pool. + if (first_free == alloc->blocks) // 0 free blocks + return false; - if (first_free->next != alloc->blocks) // >1 free block - return false; + if (first_free->next != alloc->blocks) // >1 free block + return false; - return first_free->ptr == alloc->mem_base && first_free->ptr + first_free->size == alloc->mem_end; + return first_free->ptr == alloc->mem_base && + first_free->ptr + first_free->size == alloc->mem_end; } -static rrbool gfxalloc_mem_contains(gfx_allocator *alloc, void *ptr) -{ - return alloc->mem_base <= (U8*)ptr && (U8*)ptr < alloc->mem_end; +static rrbool gfxalloc_mem_contains(gfx_allocator* alloc, void* ptr) { + return alloc->mem_base <= (U8*)ptr && (U8*)ptr < alloc->mem_end; } #endif #if defined(GDRAW_DEBUG) -static void gfxalloc_dump(gfx_allocator *alloc) -{ - static const char *type[] = { - "allocated", - "free", - }; +static void gfxalloc_dump(gfx_allocator* alloc) { + static const char* type[] = { + "allocated", + "free", + }; - for (gfx_block_info *b = alloc->blocks[0].next_phys; b != alloc->blocks; b=b->next_phys) { - U8 *start = b->ptr; - U8 *end = b->ptr + b->size; - printf("%p-%p: %s (%d bytes)\n", start, end, type[b->is_free], b->size); - } + for (gfx_block_info* b = alloc->blocks[0].next_phys; b != alloc->blocks; + b = b->next_phys) { + U8* start = b->ptr; + U8* end = b->ptr + b->size; + printf("%p-%p: %s (%d bytes)\n", start, end, type[b->is_free], b->size); + } } #endif @@ -1641,140 +1719,152 @@ static void gfxalloc_dump(gfx_allocator *alloc) #if defined(GDRAW_DEFRAGMENT) -#define GDRAW_DEFRAGMENT_may_overlap 1 // self-overlap for individual copies is OK +#define GDRAW_DEFRAGMENT_may_overlap \ + 1 // self-overlap for individual copies is OK // Defragmentation code for graphics memory. -// The platform implementation must provide a GPU memcpy function and handle all necessary -// synchronization. It must also adjust its resource descriptors to match the new addresses -// after defragmentation. +// The platform implementation must provide a GPU memcpy function and handle all +// necessary synchronization. It must also adjust its resource descriptors to +// match the new addresses after defragmentation. -static void gdraw_gpu_memcpy(GDrawHandleCache *c, void *dst, void *src, U32 num_bytes); +static void gdraw_gpu_memcpy(GDrawHandleCache* c, void* dst, void* src, + U32 num_bytes); -static void gdraw_Defragment_memmove(GDrawHandleCache *c, U8 *dst, U8 *src, U32 num_bytes, U32 flags, GDrawStats *stats) -{ - if (dst == src) - return; +static void gdraw_Defragment_memmove(GDrawHandleCache* c, U8* dst, U8* src, + U32 num_bytes, U32 flags, + GDrawStats* stats) { + if (dst == src) return; - assert(num_bytes != 0); + assert(num_bytes != 0); - stats->nonzero_flags |= GDRAW_STATS_defrag; - stats->defrag_objects += 1; - stats->defrag_bytes += num_bytes; + stats->nonzero_flags |= GDRAW_STATS_defrag; + stats->defrag_objects += 1; + stats->defrag_bytes += num_bytes; - if ((flags & GDRAW_DEFRAGMENT_may_overlap) || dst + num_bytes <= src || src + num_bytes <= dst) // no problematic overlap - gdraw_gpu_memcpy(c, dst, src, num_bytes); - else { - // need to copy in multiple chunks - U32 chunk_size, pos=0; - if (dst < src) - chunk_size = (U32) (src - dst); - else - chunk_size = (U32) (dst - src); + if ((flags & GDRAW_DEFRAGMENT_may_overlap) || dst + num_bytes <= src || + src + num_bytes <= dst) // no problematic overlap + gdraw_gpu_memcpy(c, dst, src, num_bytes); + else { + // need to copy in multiple chunks + U32 chunk_size, pos = 0; + if (dst < src) + chunk_size = (U32)(src - dst); + else + chunk_size = (U32)(dst - src); - while (pos < num_bytes) { - U32 amount = num_bytes - pos; - if (amount > chunk_size) amount = chunk_size; - gdraw_gpu_memcpy(c, dst + pos, src + pos, amount); - pos += amount; - } - } + while (pos < num_bytes) { + U32 amount = num_bytes - pos; + if (amount > chunk_size) amount = chunk_size; + gdraw_gpu_memcpy(c, dst + pos, src + pos, amount); + pos += amount; + } + } } -static rrbool gdraw_CanDefragment(GDrawHandleCache *c) -{ - // we can defragment (and extract some gain from it) if and only if there's more - // than one free block. since gfxalloc coalesces free blocks immediately and keeps - // them in a circular linked list, this is very easy to detect: just check if the - // "next" pointer of the first free block points to the sentinel. (this is only - // the case if there are 0 or 1 free blocks) - gfx_allocator *alloc = c->alloc; - return alloc->blocks[0].next->next != alloc->blocks; +static rrbool gdraw_CanDefragment(GDrawHandleCache* c) { + // we can defragment (and extract some gain from it) if and only if there's + // more than one free block. since gfxalloc coalesces free blocks + // immediately and keeps them in a circular linked list, this is very easy + // to detect: just check if the "next" pointer of the first free block + // points to the sentinel. (this is only the case if there are 0 or 1 free + // blocks) + gfx_allocator* alloc = c->alloc; + return alloc->blocks[0].next->next != alloc->blocks; } -static void gdraw_DefragmentMain(GDrawHandleCache *c, U32 flags, GDrawStats *stats) -{ - gfx_allocator *alloc = c->alloc; - gfx_block_info *b, *n; - U8 *p; - S32 i; +static void gdraw_DefragmentMain(GDrawHandleCache* c, U32 flags, + GDrawStats* stats) { + gfx_allocator* alloc = c->alloc; + gfx_block_info *b, *n; + U8* p; + S32 i; - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_alloc + alloc->num_free + alloc->num_unused);) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks+1);) + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == + alloc->num_alloc + alloc->num_free + + alloc->num_unused);) + GFXALLOC_IF_CHECK( + GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks + 1);) - // go over all allocated memory blocks and clear the "prev" pointer - // (unused for allocated blocks, we'll use it to store a back-pointer to the corresponding handle) - for (b = alloc->blocks[0].next_phys; b != alloc->blocks; b=b->next_phys) - if (!b->is_free) - b->prev = NULL; + // go over all allocated memory blocks and clear the "prev" pointer + // (unused for allocated blocks, we'll use it to store a back-pointer to the + // corresponding handle) + for (b = alloc->blocks[0].next_phys; b != alloc->blocks; b = b->next_phys) + if (!b->is_free) b->prev = NULL; - // go through all handles and store a pointer to the handle in the corresponding memory block - for (i=0; i < c->max_handles; i++) - if (c->handle[i].raw_ptr) { - assert(c->handle[i].bytes != 0); - for (b=alloc->hash[gfxalloc_get_hash_code(alloc, c->handle[i].raw_ptr)]; b; b=b->next) - if (b->ptr == c->handle[i].raw_ptr) { - void *block = &c->handle[i]; - b->prev = (gfx_block_info *) block; - break; + // go through all handles and store a pointer to the handle in the + // corresponding memory block + for (i = 0; i < c->max_handles; i++) + if (c->handle[i].raw_ptr) { + assert(c->handle[i].bytes != 0); + for (b = alloc->hash[gfxalloc_get_hash_code(alloc, + c->handle[i].raw_ptr)]; + b; b = b->next) + if (b->ptr == c->handle[i].raw_ptr) { + void* block = &c->handle[i]; + b->prev = (gfx_block_info*)block; + break; + } + + GFXALLOC_ASSERT(b != NULL); // didn't find this block anywhere! + } + + // clear alloc hash table (we rebuild it during defrag) + memset(alloc->hash, 0, sizeof(alloc->hash)); + + // defragmentation proper: go over all blocks again, remove all free blocks + // from the physical block list and compact the remaining blocks together. + p = alloc->mem_base; + for (b = alloc->blocks[0].next_phys; b != alloc->blocks; b = n) { + n = b->next_phys; + + if (!b->is_free) { + U32 h; + + // move block if necessary + if (p != b->ptr) { + assert(b->size != 0); + gdraw_Defragment_memmove(c, p, b->ptr, b->size, flags, stats); + b->ptr = p; + assert(b->prev); + if (b->prev) ((GDrawHandle*)b->prev)->raw_ptr = p; } - GFXALLOC_ASSERT(b != NULL); // didn't find this block anywhere! - } + // re-insert into hash table + h = gfxalloc_get_hash_code(alloc, p); + b->next = alloc->hash[h]; + alloc->hash[h] = b; - // clear alloc hash table (we rebuild it during defrag) - memset(alloc->hash, 0, sizeof(alloc->hash)); + p += b->size; + } else { + // free block: remove it from the physical block list + b->prev_phys->next_phys = b->next_phys; + b->next_phys->prev_phys = b->prev_phys; + gfxalloc_rem_free(alloc, b); + gfxalloc_push_unused(alloc, b); + } + } + // the free list should be empty now + assert(alloc->blocks[0].next == &alloc->blocks[0]); - // defragmentation proper: go over all blocks again, remove all free blocks from the physical - // block list and compact the remaining blocks together. - p = alloc->mem_base; - for (b = alloc->blocks[0].next_phys; b != alloc->blocks; b=n) { - n = b->next_phys; + // unless all memory is allocated, we now need to add a new block for the + // free space at the end + if (p != alloc->mem_end) { + b = gfxalloc_pop_unused(alloc); - if (!b->is_free) { - U32 h; + b->ptr = p; + b->prev_phys = alloc->blocks[0].prev_phys; + b->next_phys = &alloc->blocks[0]; + b->prev_phys->next_phys = b; + b->next_phys->prev_phys = b; + b->size = alloc->mem_end - p; + gfxalloc_add_free(alloc, b); + } - // move block if necessary - if (p != b->ptr) { - assert(b->size != 0); - gdraw_Defragment_memmove(c, p, b->ptr, b->size, flags, stats); - b->ptr = p; - assert(b->prev); - if (b->prev) - ((GDrawHandle *) b->prev)->raw_ptr = p; - } - - // re-insert into hash table - h = gfxalloc_get_hash_code(alloc, p); - b->next = alloc->hash[h]; - alloc->hash[h] = b; - - p += b->size; - } else { - // free block: remove it from the physical block list - b->prev_phys->next_phys = b->next_phys; - b->next_phys->prev_phys = b->prev_phys; - gfxalloc_rem_free(alloc, b); - gfxalloc_push_unused(alloc, b); - } - } - // the free list should be empty now - assert(alloc->blocks[0].next == &alloc->blocks[0]); - - // unless all memory is allocated, we now need to add a new block for the free space at the end - if (p != alloc->mem_end) { - b = gfxalloc_pop_unused(alloc); - - b->ptr = p; - b->prev_phys = alloc->blocks[0].prev_phys; - b->next_phys = &alloc->blocks[0]; - b->prev_phys->next_phys = b; - b->next_phys->prev_phys = b; - b->size = alloc->mem_end - p; - gfxalloc_add_free(alloc, b); - } - - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_alloc + alloc->num_free + alloc->num_unused);) - GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks+1);) + GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == + alloc->num_alloc + alloc->num_free + + alloc->num_unused);) + GFXALLOC_IF_CHECK( + GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks + 1);) } #endif @@ -1795,23 +1885,29 @@ static void gdraw_DefragmentMain(GDrawHandleCache *c, U32 flags, GDrawStats *sta // renderers. // // Two-pool works like this: -// - As the name suggests, each handle cache has two memory pools and corresponding backing -// allocators. The currently used allocator, "alloc", and a second allocator, "alloc_other". -// - Any resource used in a command buffer gets locked and *stays locked* until we're done -// preparing that command buffer (i.e. no unlocking after every draw as in the normal -// incremental memory management). -// - All allocations happen from "alloc", always. We mostly do our normal LRU cache freeing +// - As the name suggests, each handle cache has two memory pools and +// corresponding backing +// allocators. The currently used allocator, "alloc", and a second allocator, +// "alloc_other". +// - Any resource used in a command buffer gets locked and *stays locked* until +// we're done +// preparing that command buffer (i.e. no unlocking after every draw as in the +// normal incremental memory management). +// - All allocations happen from "alloc", always. We mostly do our normal LRU +// cache freeing // to make space when required. -// - We can still run out of space (no surprise) and get into a configuration where we have -// to defragment. This is the only tricky part, and where the second pool comes in. To -// defragment, we switch the roles of "alloc" and "alloc_other", and allocate new backing -// storage for all currently "locked" and "pinned" resources (i.e. everything we've used -// in the currently pending frame). -// - In general, we have the invariant that all resources we're using for batches we're -// working on must be in the "alloc" (fresh) pool, not in the "other" (stale) pool. -// Therefore, after a defragment/pool switch, any "live" resource (which means it's -// present in the stale pool) has to be copied to the "fresh" pool as it's getting -// locked to maintain this invariant. +// - We can still run out of space (no surprise) and get into a configuration +// where we have +// to defragment. This is the only tricky part, and where the second pool +// comes in. To defragment, we switch the roles of "alloc" and "alloc_other", +// and allocate new backing storage for all currently "locked" and "pinned" +// resources (i.e. everything we've used in the currently pending frame). +// - In general, we have the invariant that all resources we're using for +// batches we're +// working on must be in the "alloc" (fresh) pool, not in the "other" (stale) +// pool. Therefore, after a defragment/pool switch, any "live" resource (which +// means it's present in the stale pool) has to be copied to the "fresh" pool +// as it's getting locked to maintain this invariant. // // What this does is give us a guarantee that any given frame either only // references resources in one pool (the common case), or does a defragment, in @@ -1819,17 +1915,15 @@ static void gdraw_DefragmentMain(GDrawHandleCache *c, U32 flags, GDrawStats *sta // // +------------------------------+ // | | -// | | pool A is fresh (=alloc), pool B is stale (=alloc_other) -// | | all resources referenced in here are in pool A -// | | -// | | -// | | +// | | pool A is fresh (=alloc), pool B is stale +// (=alloc_other) | | all resources referenced +// in here are in pool A | | | | | | // +------------------------------+ <-- defragment! pools flip roles here // | | // | | -// | | pool B is fresh (=alloc), pool A is stale (=alloc_other) -// | | all resources referenced in here are in pool B -// | | +// | | pool B is fresh (=alloc), pool A is stale +// (=alloc_other) | | all resources referenced +// in here are in pool B | | // +------------------------------+ // // Now, at the end of the frame, we need to decide what to do with the @@ -1860,124 +1954,125 @@ static void gdraw_DefragmentMain(GDrawHandleCache *c, U32 flags, GDrawStats *sta // several consecutive frames, you're thrashing the resource pools badly and // are getting really bad performance anyway. -static void gdraw_gpu_memcpy(GDrawHandleCache *c, void *dst, void *src, U32 num_bytes); +static void gdraw_gpu_memcpy(GDrawHandleCache* c, void* dst, void* src, + U32 num_bytes); static void gdraw_gpu_wait_for_transfer_completion(); -static void gdraw_resource_moved(GDrawHandle *t); +static void gdraw_resource_moved(GDrawHandle* t); -static rrbool gdraw_CanDefragment(GDrawHandleCache *c) -{ - // we can defragment (and extract some gain from it) if and only if there's more - // than one free block. since gfxalloc coalesces free blocks immediately and keeps - // them in a circular linked list, this is very easy to detect: just check if the - // "next" pointer of the first free block points to the sentinel. (this is only - // the case if there are 0 or 1 free blocks) - gfx_allocator *alloc = c->alloc; - if (!c->alloc_other) // if we don't have a second pool, we can't defrag at all. - return false; - return alloc->blocks[0].next->next != alloc->blocks; +static rrbool gdraw_CanDefragment(GDrawHandleCache* c) { + // we can defragment (and extract some gain from it) if and only if there's + // more than one free block. since gfxalloc coalesces free blocks + // immediately and keeps them in a circular linked list, this is very easy + // to detect: just check if the "next" pointer of the first free block + // points to the sentinel. (this is only the case if there are 0 or 1 free + // blocks) + gfx_allocator* alloc = c->alloc; + if (!c->alloc_other) // if we don't have a second pool, we can't defrag at + // all. + return false; + return alloc->blocks[0].next->next != alloc->blocks; } -static rrbool gdraw_MigrateResource(GDrawHandle *t, GDrawStats *stats) -{ - GDrawHandleCache *c = t->cache; - void *ptr = NULL; +static rrbool gdraw_MigrateResource(GDrawHandle* t, GDrawStats* stats) { + GDrawHandleCache* c = t->cache; + void* ptr = NULL; - assert(t->state == GDRAW_HANDLE_STATE_live || t->state == GDRAW_HANDLE_STATE_locked || t->state == GDRAW_HANDLE_STATE_pinned); - // anything we migrate should be in the "other" (old) pool - assert(gfxalloc_mem_contains(c->alloc_other, t->raw_ptr)); + assert(t->state == GDRAW_HANDLE_STATE_live || + t->state == GDRAW_HANDLE_STATE_locked || + t->state == GDRAW_HANDLE_STATE_pinned); + // anything we migrate should be in the "other" (old) pool + assert(gfxalloc_mem_contains(c->alloc_other, t->raw_ptr)); - ptr = gfxalloc_alloc(c->alloc, t->bytes); - if (ptr) { - // update stats - stats->nonzero_flags |= GDRAW_STATS_defrag; - stats->defrag_objects += 1; - stats->defrag_bytes += t->bytes; + ptr = gfxalloc_alloc(c->alloc, t->bytes); + if (ptr) { + // update stats + stats->nonzero_flags |= GDRAW_STATS_defrag; + stats->defrag_objects += 1; + stats->defrag_bytes += t->bytes; - // copy contents to new storage - gdraw_gpu_memcpy(c, ptr, t->raw_ptr, t->bytes); + // copy contents to new storage + gdraw_gpu_memcpy(c, ptr, t->raw_ptr, t->bytes); - // free old storage - gfxalloc_free(c->alloc_other, t->raw_ptr); + // free old storage + gfxalloc_free(c->alloc_other, t->raw_ptr); - // adjust pointers to point to new location - t->raw_ptr = ptr; - gdraw_resource_moved(t); + // adjust pointers to point to new location + t->raw_ptr = ptr; + gdraw_resource_moved(t); - return true; - } else - return false; + return true; + } else + return false; } -static rrbool gdraw_MigrateAllResources(GDrawHandle *sentinel, GDrawStats *stats) -{ - GDrawHandle *h; - for (h = sentinel->next; h != sentinel; h = h->next) { - if (!gdraw_MigrateResource(h, stats)) - return false; - } - return true; +static rrbool gdraw_MigrateAllResources(GDrawHandle* sentinel, + GDrawStats* stats) { + GDrawHandle* h; + for (h = sentinel->next; h != sentinel; h = h->next) { + if (!gdraw_MigrateResource(h, stats)) return false; + } + return true; } -static rrbool gdraw_TwoPoolDefragmentMain(GDrawHandleCache *c, GDrawStats *stats) -{ - gfx_allocator *t; +static rrbool gdraw_TwoPoolDefragmentMain(GDrawHandleCache* c, + GDrawStats* stats) { + gfx_allocator* t; - // swap allocators - t = c->alloc; - c->alloc = c->alloc_other; - c->alloc_other = t; + // swap allocators + t = c->alloc; + c->alloc = c->alloc_other; + c->alloc_other = t; - // immediately migrate all currently pinned and locked resources - rrbool ok = true; - ok = ok && gdraw_MigrateAllResources(&c->state[GDRAW_HANDLE_STATE_pinned], stats); - ok = ok && gdraw_MigrateAllResources(&c->state[GDRAW_HANDLE_STATE_locked], stats); + // immediately migrate all currently pinned and locked resources + rrbool ok = true; + ok = ok && + gdraw_MigrateAllResources(&c->state[GDRAW_HANDLE_STATE_pinned], stats); + ok = ok && + gdraw_MigrateAllResources(&c->state[GDRAW_HANDLE_STATE_locked], stats); - return ok; + return ok; } -static rrbool gdraw_StateListIsEmpty(GDrawHandle *head) -{ - // a list is empty when the head sentinel is the only node - return head->next == head; +static rrbool gdraw_StateListIsEmpty(GDrawHandle* head) { + // a list is empty when the head sentinel is the only node + return head->next == head; } -static void gdraw_CheckAllPointersUpdated(GDrawHandle *head) -{ +static void gdraw_CheckAllPointersUpdated(GDrawHandle* head) { #if defined(GDRAW_DEBUG) - GDrawHandle *h; - for (h = head->next; h != head; h = h->next) { - assert(gfxalloc_mem_contains(h->cache->alloc, h->raw_ptr)); - } + GDrawHandle* h; + for (h = head->next; h != head; h = h->next) { + assert(gfxalloc_mem_contains(h->cache->alloc, h->raw_ptr)); + } #endif } -static void gdraw_PostDefragmentCleanup(GDrawHandleCache *c, GDrawStats *stats) -{ - // if we defragmented during this scene, this is the spot where - // we need to nuke all references to resources that weren't - // carried over into the new pool. - if (c->did_defragment) { - GDrawHandle *h; +static void gdraw_PostDefragmentCleanup(GDrawHandleCache* c, + GDrawStats* stats) { + // if we defragmented during this scene, this is the spot where + // we need to nuke all references to resources that weren't + // carried over into the new pool. + if (c->did_defragment) { + GDrawHandle* h; - // alloc list should be empty at this point - assert(gdraw_StateListIsEmpty(&c->state[GDRAW_HANDLE_STATE_alloc])); + // alloc list should be empty at this point + assert(gdraw_StateListIsEmpty(&c->state[GDRAW_HANDLE_STATE_alloc])); - // free all remaining live resources (these are the resources we didn't - // touch this frame, hence stale) - h = &c->state[GDRAW_HANDLE_STATE_live]; - while (!gdraw_StateListIsEmpty(h)) - gdraw_res_free(h->next, stats); + // free all remaining live resources (these are the resources we didn't + // touch this frame, hence stale) + h = &c->state[GDRAW_HANDLE_STATE_live]; + while (!gdraw_StateListIsEmpty(h)) gdraw_res_free(h->next, stats); - // "live" is now empty, and we already checked that "alloc" was empty - // earlier. "dead" may hold objects on the old heap still (that were freed - // before we swapped allocators). "user owned" is not managed by us. - // that leaves "locked" and "pinned" resources, both of which better be - // only pointing into the new heap now! - gdraw_CheckAllPointersUpdated(&c->state[GDRAW_HANDLE_STATE_locked]); - gdraw_CheckAllPointersUpdated(&c->state[GDRAW_HANDLE_STATE_pinned]); + // "live" is now empty, and we already checked that "alloc" was empty + // earlier. "dead" may hold objects on the old heap still (that were + // freed before we swapped allocators). "user owned" is not managed by + // us. that leaves "locked" and "pinned" resources, both of which better + // be only pointing into the new heap now! + gdraw_CheckAllPointersUpdated(&c->state[GDRAW_HANDLE_STATE_locked]); + gdraw_CheckAllPointersUpdated(&c->state[GDRAW_HANDLE_STATE_pinned]); - gdraw_gpu_wait_for_transfer_completion(); - } + gdraw_gpu_wait_for_transfer_completion(); + } } #endif @@ -1985,71 +2080,72 @@ static void gdraw_PostDefragmentCleanup(GDrawHandleCache *c, GDrawStats *stats) // Image processing code // Compute average of 4 RGBA8888 pixels passed as U32. -// Variables are named assuming the values are stored as big-endian, but all bytes -// are treated equally, so this code will work just fine on little-endian data. -static U32 gdraw_Avg4_rgba8888(U32 p0, U32 p1, U32 p2, U32 p3) -{ - U32 mask = 0x00ff00ff; - U32 bias = 0x00020002; - - U32 gasum = ((p0 >> 0) & mask) + ((p1 >> 0) & mask) + ((p2 >> 0) & mask) + ((p3 >> 0) & mask) + bias; - U32 rbsum = ((p0 >> 8) & mask) + ((p1 >> 8) & mask) + ((p2 >> 8) & mask) + ((p3 >> 8) & mask) + bias; +// Variables are named assuming the values are stored as big-endian, but all +// bytes are treated equally, so this code will work just fine on little-endian +// data. +static U32 gdraw_Avg4_rgba8888(U32 p0, U32 p1, U32 p2, U32 p3) { + U32 mask = 0x00ff00ff; + U32 bias = 0x00020002; - return ((gasum >> 2) & mask) | ((rbsum << 6) & ~mask); + U32 gasum = ((p0 >> 0) & mask) + ((p1 >> 0) & mask) + ((p2 >> 0) & mask) + + ((p3 >> 0) & mask) + bias; + U32 rbsum = ((p0 >> 8) & mask) + ((p1 >> 8) & mask) + ((p2 >> 8) & mask) + + ((p3 >> 8) & mask) + bias; + + return ((gasum >> 2) & mask) | ((rbsum << 6) & ~mask); } // Compute average of 2 RGBA8888 pixels passed as U32 -static U32 gdraw_Avg2_rgba8888(U32 p0, U32 p1) -{ - return (p0 | p1) - (((p0 ^ p1) >> 1) & 0x7f7f7f7f); +static U32 gdraw_Avg2_rgba8888(U32 p0, U32 p1) { + return (p0 | p1) - (((p0 ^ p1) >> 1) & 0x7f7f7f7f); } // 2:1 downsample in both horizontal and vertical direction, for one line. // width is width of destination line. -static void gdraw_Downsample_2x2_line(U8 *dst, U8 *line0, U8 *line1, U32 width, U32 bpp) -{ - U32 x; - if (bpp == 4) { - U32 *in0 = (U32 *) line0; - U32 *in1 = (U32 *) line1; - U32 *out = (U32 *) dst; - for (x=0; x < width; x++, in0 += 2, in1 += 2) - *out++ = gdraw_Avg4_rgba8888(in0[0], in0[1], in1[0], in1[1]); - } else if (bpp == 1) { - for (x=0; x < width; x++, line0 += 2, line1 += 2) - *dst++ = (line0[0] + line0[1] + line1[0] + line1[1] + 2) / 4; - } else - RR_BREAK(); +static void gdraw_Downsample_2x2_line(U8* dst, U8* line0, U8* line1, U32 width, + U32 bpp) { + U32 x; + if (bpp == 4) { + U32* in0 = (U32*)line0; + U32* in1 = (U32*)line1; + U32* out = (U32*)dst; + for (x = 0; x < width; x++, in0 += 2, in1 += 2) + *out++ = gdraw_Avg4_rgba8888(in0[0], in0[1], in1[0], in1[1]); + } else if (bpp == 1) { + for (x = 0; x < width; x++, line0 += 2, line1 += 2) + *dst++ = (line0[0] + line0[1] + line1[0] + line1[1] + 2) / 4; + } else + RR_BREAK(); } // 2:1 downsample in horizontal but not vertical direction. -static void gdraw_Downsample_2x1_line(U8 *dst, U8 *src, U32 width, U32 bpp) -{ - U32 x; - if (bpp == 4) { - U32 *in = (U32 *) src; - U32 *out = (U32 *) dst; - for (x=0; x < width; x++, in += 2) - *out++ = gdraw_Avg2_rgba8888(in[0], in[1]); - } else if (bpp == 1) { - for (x=0; x < width; x++, src += 2) - *dst++ = (src[0] + src[1] + 1) / 2; - } else - RR_BREAK(); +static void gdraw_Downsample_2x1_line(U8* dst, U8* src, U32 width, U32 bpp) { + U32 x; + if (bpp == 4) { + U32* in = (U32*)src; + U32* out = (U32*)dst; + for (x = 0; x < width; x++, in += 2) + *out++ = gdraw_Avg2_rgba8888(in[0], in[1]); + } else if (bpp == 1) { + for (x = 0; x < width; x++, src += 2) + *dst++ = (src[0] + src[1] + 1) / 2; + } else + RR_BREAK(); } // 2:1 downsample in vertical but not horizontal direction. -static void gdraw_Downsample_1x2(U8 *dst, S32 dstpitch, U8 *src, S32 srcpitch, U32 height, U32 bpp) -{ - U32 y; - if (bpp == 4) { - for (y=0; y < height; y++, dst += dstpitch, src += 2*srcpitch) - *((U32 *) dst) = gdraw_Avg2_rgba8888(*((U32 *) src), *((U32 *) (src + srcpitch))); - } else if (bpp == 1) { - for (y=0; y < height; y++, dst += dstpitch, src += 2*srcpitch) - *dst = (src[0] + src[srcpitch] + 1) / 2; - } else - RR_BREAK(); +static void gdraw_Downsample_1x2(U8* dst, S32 dstpitch, U8* src, S32 srcpitch, + U32 height, U32 bpp) { + U32 y; + if (bpp == 4) { + for (y = 0; y < height; y++, dst += dstpitch, src += 2 * srcpitch) + *((U32*)dst) = + gdraw_Avg2_rgba8888(*((U32*)src), *((U32*)(src + srcpitch))); + } else if (bpp == 1) { + for (y = 0; y < height; y++, dst += dstpitch, src += 2 * srcpitch) + *dst = (src[0] + src[srcpitch] + 1) / 2; + } else + RR_BREAK(); } // 2:1 downsample (for mipmaps) @@ -2062,149 +2158,159 @@ static void gdraw_Downsample_1x2(U8 *dst, S32 dstpitch, U8 *src, S32 srcpitch, U // bpp: Bytes per pixel for image data // // can be used for in-place resizing if src==dst and dstpitch <= srcpitch! -static GDRAW_MAYBE_UNUSED void gdraw_Downsample(U8 *dst, S32 dstpitch, U32 width, U32 height, U8 *src, S32 srcpitch, U32 bpp) -{ - U32 y; - assert(bpp == 1 || bpp == 4); +static GDRAW_MAYBE_UNUSED void gdraw_Downsample(U8* dst, S32 dstpitch, + U32 width, U32 height, U8* src, + S32 srcpitch, U32 bpp) { + U32 y; + assert(bpp == 1 || bpp == 4); - // @TODO gamma? - if (!height) // non-square texture, height was reduced to 1 in a previous step - gdraw_Downsample_2x1_line(dst, src, width, bpp); - else if (!width) // non-square texture, width was reduced to 1 in a previous step - gdraw_Downsample_1x2(dst, dstpitch, src, srcpitch, height, bpp); - else { - for (y=0; y < height; y++) { - gdraw_Downsample_2x2_line(dst, src, src + srcpitch, width, bpp); - dst += dstpitch; - src += 2*srcpitch; - } - } + // @TODO gamma? + if (!height) // non-square texture, height was reduced to 1 in a previous + // step + gdraw_Downsample_2x1_line(dst, src, width, bpp); + else if (!width) // non-square texture, width was reduced to 1 in a + // previous step + gdraw_Downsample_1x2(dst, dstpitch, src, srcpitch, height, bpp); + else { + for (y = 0; y < height; y++) { + gdraw_Downsample_2x2_line(dst, src, src + srcpitch, width, bpp); + dst += dstpitch; + src += 2 * srcpitch; + } + } } #if !defined(GDRAW_NO_STREAMING_MIPGEN) -#define GDRAW_MAXMIPS 16 // maximum number of mipmaps supported. +#define GDRAW_MAXMIPS 16 // maximum number of mipmaps supported. typedef struct GDrawMipmapContext { - U32 width; // width of the texture being mipmapped - U32 height; // height of the texture being mipmapped - U32 mipmaps; // number of mipmaps - U32 bpp; // bytes per pixel + U32 width; // width of the texture being mipmapped + U32 height; // height of the texture being mipmapped + U32 mipmaps; // number of mipmaps + U32 bpp; // bytes per pixel - U32 partial_row; // bit N: is mipmap N currently storing a partial row? - U32 bheight; // height of the buffer at miplevel 0 - U8 *pixels[GDRAW_MAXMIPS]; - U32 pitch[GDRAW_MAXMIPS]; + U32 partial_row; // bit N: is mipmap N currently storing a partial row? + U32 bheight; // height of the buffer at miplevel 0 + U8* pixels[GDRAW_MAXMIPS]; + U32 pitch[GDRAW_MAXMIPS]; } GDrawMipmapContext; -static rrbool gdraw_MipmapBegin(GDrawMipmapContext *c, U32 width, U32 height, U32 mipmaps, U32 bpp, U8 *buffer, U32 buffer_size) -{ - U32 i; - U8 *p; +static rrbool gdraw_MipmapBegin(GDrawMipmapContext* c, U32 width, U32 height, + U32 mipmaps, U32 bpp, U8* buffer, + U32 buffer_size) { + U32 i; + U8* p; - if (mipmaps > GDRAW_MAXMIPS) - return false; + if (mipmaps > GDRAW_MAXMIPS) return false; - c->width = width; - c->height = height; - c->mipmaps = mipmaps; - c->bpp = bpp; - c->partial_row = 0; + c->width = width; + c->height = height; + c->mipmaps = mipmaps; + c->bpp = bpp; + c->partial_row = 0; - // determine how many lines to buffer - // we try to use roughly 2/3rds of the buffer for the first miplevel (less than 3/4 since with our - // partial line buffers, we have extra buffer space for lower mip levels). - c->bheight = (2 * buffer_size) / (3 * width * bpp); + // determine how many lines to buffer + // we try to use roughly 2/3rds of the buffer for the first miplevel (less + // than 3/4 since with our partial line buffers, we have extra buffer space + // for lower mip levels). + c->bheight = (2 * buffer_size) / (3 * width * bpp); - // round down to next-smaller power of 2 (in case we need to swizzle; swizzling works on pow2-sized blocks) - while (c->bheight & (c->bheight-1)) // while not a power of 2... - c->bheight &= c->bheight - 1; // clear least significant bit set + // round down to next-smaller power of 2 (in case we need to swizzle; + // swizzling works on pow2-sized blocks) + while (c->bheight & (c->bheight - 1)) // while not a power of 2... + c->bheight &= c->bheight - 1; // clear least significant bit set - // then keep lowering the number of buffered lines until they fit (or we reach zero, i.e. it doesn't fit) - while (c->bheight) { - p = buffer; - for (i=0; i < c->mipmaps; i++) { - U32 mw = c->width >> i; - U32 bh = c->bheight >> i; - if (!mw) mw++; - if (!bh) mw *= 2, bh++; // need space for line of previous miplevel + // then keep lowering the number of buffered lines until they fit (or we + // reach zero, i.e. it doesn't fit) + while (c->bheight) { + p = buffer; + for (i = 0; i < c->mipmaps; i++) { + U32 mw = c->width >> i; + U32 bh = c->bheight >> i; + if (!mw) mw++; + if (!bh) mw *= 2, bh++; // need space for line of previous miplevel - c->pixels[i] = p; - c->pitch[i] = mw * bpp; - p += c->pitch[i] * bh; - } + c->pixels[i] = p; + c->pitch[i] = mw * bpp; + p += c->pitch[i] * bh; + } - // if it fits, we're done - if (p <= buffer + buffer_size) { - if (c->bheight > height) // buffer doesn't need to be larger than the image! - c->bheight = height; - return true; - } + // if it fits, we're done + if (p <= buffer + buffer_size) { + if (c->bheight > + height) // buffer doesn't need to be larger than the image! + c->bheight = height; + return true; + } - // need to try a smaller line buffer... - c->bheight >>= 1; - } + // need to try a smaller line buffer... + c->bheight >>= 1; + } - // can't fit even one line into our buffer. ouch! - return false; + // can't fit even one line into our buffer. ouch! + return false; } // returns true if there was data generated for this miplevel, false otherwise. -static rrbool gdraw_MipmapAddLines(GDrawMipmapContext *c, U32 level) -{ - U32 bw,bh; +static rrbool gdraw_MipmapAddLines(GDrawMipmapContext* c, U32 level) { + U32 bw, bh; - assert(level > 0); // doesn't make sense to call this on level 0 - if (level == 0 || level >= c->mipmaps) - return false; // this level doesn't exist + assert(level > 0); // doesn't make sense to call this on level 0 + if (level == 0 || level >= c->mipmaps) + return false; // this level doesn't exist - bw = c->width >> level; // buffer width at this level - bh = c->bheight >> level; // buffer height at this level + bw = c->width >> level; // buffer width at this level + bh = c->bheight >> level; // buffer height at this level - if (bh) { // we can still do regular downsampling - gdraw_Downsample(c->pixels[level], c->pitch[level], bw, bh, c->pixels[level-1], c->pitch[level-1], c->bpp); - return true; - } else if (c->height >> level) { // need to buffer partial lines, but still doing vertical 2:1 downsampling - if ((c->partial_row ^= (1 << level)) & (1 << level)) { // no buffered partial row for this miplevel yet, make one - memcpy(c->pixels[level], c->pixels[level-1], bw * 2 * c->bpp); - return false; - } else { // have one buffered row, can generate output pixels - gdraw_Downsample_2x2_line(c->pixels[level], c->pixels[level], c->pixels[level-1], bw, c->bpp); - return true; - } - } else { // finish off with a chain of Nx1 miplevels - gdraw_Downsample_2x1_line(c->pixels[level], c->pixels[level-1], bw, c->bpp); - return true; - } + if (bh) { // we can still do regular downsampling + gdraw_Downsample(c->pixels[level], c->pitch[level], bw, bh, + c->pixels[level - 1], c->pitch[level - 1], c->bpp); + return true; + } else if (c->height >> level) { // need to buffer partial lines, but still + // doing vertical 2:1 downsampling + if ((c->partial_row ^= (1 << level)) & + (1 << level)) { // no buffered partial row for this miplevel yet, + // make one + memcpy(c->pixels[level], c->pixels[level - 1], bw * 2 * c->bpp); + return false; + } else { // have one buffered row, can generate output pixels + gdraw_Downsample_2x2_line(c->pixels[level], c->pixels[level], + c->pixels[level - 1], bw, c->bpp); + return true; + } + } else { // finish off with a chain of Nx1 miplevels + gdraw_Downsample_2x1_line(c->pixels[level], c->pixels[level - 1], bw, + c->bpp); + return true; + } } #endif #if defined(GDRAW_CHECK_BLOCK) -static void check_block_alloc(gfx_allocator *alloc, void *ptr, rrbool allocated) -{ - int i,n=0,m=0; - for (i=0; i < GFXALLOC_HASH_SIZE; ++i) { - gfx_block_info *b = alloc->hash[i]; - while (b) { - if (b->ptr == ptr) - ++n; - b = b->next; - } - } - gfx_block_info *b = alloc->blocks[0].next; - while (b != &alloc->blocks[0]) { - if (b->ptr == ptr) - ++m; - b = b->next; - } - if (allocated) - assert(n == 1 && m == 0); - else - assert(n == 0 && m == 1); +static void check_block_alloc(gfx_allocator* alloc, void* ptr, + rrbool allocated) { + int i, n = 0, m = 0; + for (i = 0; i < GFXALLOC_HASH_SIZE; ++i) { + gfx_block_info* b = alloc->hash[i]; + while (b) { + if (b->ptr == ptr) ++n; + b = b->next; + } + } + gfx_block_info* b = alloc->blocks[0].next; + while (b != &alloc->blocks[0]) { + if (b->ptr == ptr) ++m; + b = b->next; + } + if (allocated) + assert(n == 1 && m == 0); + else + assert(n == 0 && m == 1); } #else -#define check_block_alloc(a,p,f) +#define check_block_alloc(a, p, f) #endif #if defined(GDRAW_BUFFER_RING) @@ -2218,93 +2324,91 @@ static void check_block_alloc(gfx_allocator *alloc, void *ptr, rrbool allocated) // the usual append-only, DISCARD/NOOVERWRITE semantics. // // This can be used for dynamic vertex buffers, constant buffers, etc. -#define GDRAW_BUFRING_MAXSEGS 4 // max number of backing segments +#define GDRAW_BUFRING_MAXSEGS 4 // max number of backing segments typedef struct gdraw_bufring_seg { - struct gdraw_bufring_seg *next; // next segment in ring - U8 *data; // pointer to the allocation - GDrawFence fence; // fence for this segment - U32 used; // number of bytes used + struct gdraw_bufring_seg* next; // next segment in ring + U8* data; // pointer to the allocation + GDrawFence fence; // fence for this segment + U32 used; // number of bytes used } gdraw_bufring_seg; typedef struct gdraw_bufring { - gdraw_bufring_seg *cur; // active ring segment - U32 seg_size; // size of one segment - U32 align; // alignment of segment allocations - gdraw_bufring_seg all_segs[GDRAW_BUFRING_MAXSEGS]; + gdraw_bufring_seg* cur; // active ring segment + U32 seg_size; // size of one segment + U32 align; // alignment of segment allocations + gdraw_bufring_seg all_segs[GDRAW_BUFRING_MAXSEGS]; } gdraw_bufring; // forwards static GDrawFence put_fence(); static void wait_on_fence(GDrawFence fence); -static void gdraw_bufring_init(gdraw_bufring * RADRESTRICT ring, void *ptr, U32 size, U32 nsegs, U32 align) -{ - U32 i, seg_size; +static void gdraw_bufring_init(gdraw_bufring* RADRESTRICT ring, void* ptr, + U32 size, U32 nsegs, U32 align) { + U32 i, seg_size; - ring->seg_size = 0; - if (!ptr || nsegs < 1 || size < nsegs * align) // bail if no ring buffer memory or too small - return; + ring->seg_size = 0; + if (!ptr || nsegs < 1 || + size < nsegs * align) // bail if no ring buffer memory or too small + return; - if (nsegs > GDRAW_BUFRING_MAXSEGS) - nsegs = GDRAW_BUFRING_MAXSEGS; + if (nsegs > GDRAW_BUFRING_MAXSEGS) nsegs = GDRAW_BUFRING_MAXSEGS; - // align needs to be a positive power of two - assert(align >= 1 && (align & (align - 1)) == 0); + // align needs to be a positive power of two + assert(align >= 1 && (align & (align - 1)) == 0); - // buffer really needs to be properly aligned - assert(((UINTa)ptr & (align - 1)) == 0); + // buffer really needs to be properly aligned + assert(((UINTa)ptr & (align - 1)) == 0); - seg_size = (size / nsegs) & ~(align - 1); - for (i=0; i < nsegs; ++i) { - ring->all_segs[i].next = &ring->all_segs[(i + 1) % nsegs]; - ring->all_segs[i].data = (U8 *) ptr + i * seg_size; - ring->all_segs[i].fence.value = 0; - ring->all_segs[i].used = 0; - } + seg_size = (size / nsegs) & ~(align - 1); + for (i = 0; i < nsegs; ++i) { + ring->all_segs[i].next = &ring->all_segs[(i + 1) % nsegs]; + ring->all_segs[i].data = (U8*)ptr + i * seg_size; + ring->all_segs[i].fence.value = 0; + ring->all_segs[i].used = 0; + } - ring->cur = ring->all_segs; - ring->seg_size = seg_size; - ring->align = align; + ring->cur = ring->all_segs; + ring->seg_size = seg_size; + ring->align = align; } -static void gdraw_bufring_shutdown(gdraw_bufring * RADRESTRICT ring) -{ - ring->cur = NULL; - ring->seg_size = 0; +static void gdraw_bufring_shutdown(gdraw_bufring* RADRESTRICT ring) { + ring->cur = NULL; + ring->seg_size = 0; } -static void *gdraw_bufring_alloc(gdraw_bufring * RADRESTRICT ring, U32 size, U32 align) -{ - U32 align_up; - gdraw_bufring_seg *seg; +static void* gdraw_bufring_alloc(gdraw_bufring* RADRESTRICT ring, U32 size, + U32 align) { + U32 align_up; + gdraw_bufring_seg* seg; - if (size > ring->seg_size) - return NULL; // nope, won't fit + if (size > ring->seg_size) return NULL; // nope, won't fit - assert(align <= ring->align); + assert(align <= ring->align); - // check if it fits in the active segment first - seg = ring->cur; - align_up = (seg->used + align - 1) & -align; + // check if it fits in the active segment first + seg = ring->cur; + align_up = (seg->used + align - 1) & -align; - if ((align_up + size) <= ring->seg_size) { - void *ptr = seg->data + align_up; - seg->used = align_up + size; - return ptr; - } + if ((align_up + size) <= ring->seg_size) { + void* ptr = seg->data + align_up; + seg->used = align_up + size; + return ptr; + } - // doesn't fit, we have to start a new ring segment. - seg->fence = put_fence(); + // doesn't fit, we have to start a new ring segment. + seg->fence = put_fence(); - // switch to the next segment, wait till GPU is done with it - seg = ring->cur = seg->next; - wait_on_fence(seg->fence); + // switch to the next segment, wait till GPU is done with it + seg = ring->cur = seg->next; + wait_on_fence(seg->fence); - // allocate from the new segment. we assume that segment offsets - // satisfy the highest alignment requirements we ever ask for! - seg->used = size; - return seg->data; + // allocate from the new segment. we assume that segment offsets + // satisfy the highest alignment requirements we ever ask for! + seg->used = size; + return seg->data; } #endif @@ -2320,14 +2424,14 @@ static void *gdraw_bufring_alloc(gdraw_bufring * RADRESTRICT ring, U32 size, U32 #if defined(GDRAW_MANAGE_MEM) // functions the platform must implement -#if !defined(GDRAW_BUFFER_RING // avoid "redundant redeclaration" warning) +#if !defined(GDRAW_BUFFER_RING // avoid "redundant redeclaration" warning) static void wait_on_fence(GDrawFence fence); #endif static rrbool is_fence_pending(GDrawFence fence); -static void gdraw_defragment_cache(GDrawHandleCache *c, GDrawStats *stats); +static void gdraw_defragment_cache(GDrawHandleCache* c, GDrawStats* stats); // functions we implement -static void gdraw_res_reap(GDrawHandleCache *c, GDrawStats *stats); +static void gdraw_res_reap(GDrawHandleCache* c, GDrawStats* stats); #endif // If GDRAW_MANAGE_MEM is not #defined, this needs to perform the @@ -2336,126 +2440,131 @@ static void gdraw_res_reap(GDrawHandleCache *c, GDrawStats *stats); // If GDRAW_MANAGE_MEM is #defined, the shared code handles the // memory management part, but you might still need to update // your state caching. -static void api_free_resource(GDrawHandle *r); +static void api_free_resource(GDrawHandle* r); // Actually frees a resource and releases all allocated resources -static void gdraw_res_free(GDrawHandle *r, GDrawStats *stats) -{ - assert(r->state == GDRAW_HANDLE_STATE_live || r->state == GDRAW_HANDLE_STATE_locked || r->state == GDRAW_HANDLE_STATE_dead || - r->state == GDRAW_HANDLE_STATE_pinned || r->state == GDRAW_HANDLE_STATE_user_owned); +static void gdraw_res_free(GDrawHandle* r, GDrawStats* stats) { + assert(r->state == GDRAW_HANDLE_STATE_live || + r->state == GDRAW_HANDLE_STATE_locked || + r->state == GDRAW_HANDLE_STATE_dead || + r->state == GDRAW_HANDLE_STATE_pinned || + r->state == GDRAW_HANDLE_STATE_user_owned); #if defined(GDRAW_MANAGE_MEM) - GDRAW_FENCE_FLUSH(); + GDRAW_FENCE_FLUSH(); - // make sure resource isn't in use before we actually free the memory - wait_on_fence(r->fence); - if (r->raw_ptr) { + // make sure resource isn't in use before we actually free the memory + wait_on_fence(r->fence); + if (r->raw_ptr) { #if !defined(GDRAW_MANAGE_MEM_TWOPOOL) - gfxalloc_free(r->cache->alloc, r->raw_ptr); + gfxalloc_free(r->cache->alloc, r->raw_ptr); #else - GDrawHandleCache *c = r->cache; - if (gfxalloc_mem_contains(c->alloc, r->raw_ptr)) - gfxalloc_free(c->alloc, r->raw_ptr); - else { - assert(gfxalloc_mem_contains(c->alloc_other, r->raw_ptr)); - gfxalloc_free(c->alloc_other, r->raw_ptr); - } + GDrawHandleCache* c = r->cache; + if (gfxalloc_mem_contains(c->alloc, r->raw_ptr)) + gfxalloc_free(c->alloc, r->raw_ptr); + else { + assert(gfxalloc_mem_contains(c->alloc_other, r->raw_ptr)); + gfxalloc_free(c->alloc_other, r->raw_ptr); + } #endif - } + } #endif - api_free_resource(r); + api_free_resource(r); - stats->nonzero_flags |= GDRAW_STATS_frees; - stats->freed_objects += 1; - stats->freed_bytes += r->bytes; + stats->nonzero_flags |= GDRAW_STATS_frees; + stats->freed_objects += 1; + stats->freed_bytes += r->bytes; - gdraw_HandleCacheFree(r); + gdraw_HandleCacheFree(r); } // Frees the LRU resource in the given cache. -static rrbool gdraw_res_free_lru(GDrawHandleCache *c, GDrawStats *stats) -{ - GDrawHandle *r = gdraw_HandleCacheGetLRU(c); - if (!r) return false; +static rrbool gdraw_res_free_lru(GDrawHandleCache* c, GDrawStats* stats) { + GDrawHandle* r = gdraw_HandleCacheGetLRU(c); + if (!r) return false; - if (c->is_vertex && r->owner) // check for r->owner since it may already be killed (if player destroyed first) - IggyDiscardVertexBufferCallback(r->owner, r); + if (c->is_vertex && r->owner) // check for r->owner since it may already be + // killed (if player destroyed first) + IggyDiscardVertexBufferCallback(r->owner, r); - // was it referenced since end of previous frame (=in this frame)? - // if some, we're thrashing; report it to the user, but only once per frame. - if (c->prev_frame_end.value < r->fence.value && !c->is_thrashing) { - IggyGDrawSendWarning(NULL, c->is_vertex ? "GDraw Thrashing vertex memory" : "GDraw Thrashing texture memory"); - c->is_thrashing = true; - } + // was it referenced since end of previous frame (=in this frame)? + // if some, we're thrashing; report it to the user, but only once per frame. + if (c->prev_frame_end.value < r->fence.value && !c->is_thrashing) { + IggyGDrawSendWarning(NULL, c->is_vertex + ? "GDraw Thrashing vertex memory" + : "GDraw Thrashing texture memory"); + c->is_thrashing = true; + } - gdraw_res_free(r, stats); - return true; + gdraw_res_free(r, stats); + return true; } -static void gdraw_res_flush(GDrawHandleCache *c, GDrawStats *stats) -{ - c->is_thrashing = true; // prevents warnings being generated from free_lru - gdraw_HandleCacheUnlockAll(c); - while (gdraw_res_free_lru(c, stats)) - ; +static void gdraw_res_flush(GDrawHandleCache* c, GDrawStats* stats) { + c->is_thrashing = true; // prevents warnings being generated from free_lru + gdraw_HandleCacheUnlockAll(c); + while (gdraw_res_free_lru(c, stats)); } -static GDrawHandle *gdraw_res_alloc_outofmem(GDrawHandleCache *c, GDrawHandle *t, char const *failed_type) -{ - if (t) - gdraw_HandleCacheAllocateFail(t); - IggyGDrawSendWarning(NULL, c->is_vertex ? "GDraw Out of static vertex buffer %s" : "GDraw Out of texture %s", failed_type); - return NULL; +static GDrawHandle* gdraw_res_alloc_outofmem(GDrawHandleCache* c, + GDrawHandle* t, + char const* failed_type) { + if (t) gdraw_HandleCacheAllocateFail(t); + IggyGDrawSendWarning(NULL, + c->is_vertex ? "GDraw Out of static vertex buffer %s" + : "GDraw Out of texture %s", + failed_type); + return NULL; } #if !defined(GDRAW_MANAGE_MEM) -static GDrawHandle *gdraw_res_alloc_begin(GDrawHandleCache *c, S32 size, GDrawStats *stats) -{ - GDrawHandle *t; - if (size > c->total_bytes) - gdraw_res_alloc_outofmem(c, NULL, "memory (single resource larger than entire pool)"); - else { - // given how much data we're going to allocate, throw out - // data until there's "room" (this basically lets us use - // managed memory and just bound our usage, without actually - // packing it and being exact) - while (c->bytes_free < size) { - if (!gdraw_res_free_lru(c, stats)) { - gdraw_res_alloc_outofmem(c, NULL, "memory"); - break; - } - } - } +static GDrawHandle* gdraw_res_alloc_begin(GDrawHandleCache* c, S32 size, + GDrawStats* stats) { + GDrawHandle* t; + if (size > c->total_bytes) + gdraw_res_alloc_outofmem( + c, NULL, "memory (single resource larger than entire pool)"); + else { + // given how much data we're going to allocate, throw out + // data until there's "room" (this basically lets us use + // managed memory and just bound our usage, without actually + // packing it and being exact) + while (c->bytes_free < size) { + if (!gdraw_res_free_lru(c, stats)) { + gdraw_res_alloc_outofmem(c, NULL, "memory"); + break; + } + } + } - // now try to allocate a handle - t = gdraw_HandleCacheAllocateBegin(c); - if (!t) { - // it's possible we have no free handles, because all handles - // are in use without exceeding the max storage above--in that - // case, just free one texture to give us a free handle (ideally - // we'd trade off cost of regenerating) - if (gdraw_res_free_lru(c, stats)) { - t = gdraw_HandleCacheAllocateBegin(c); - if (t == NULL) { - gdraw_res_alloc_outofmem(c, NULL, "handles"); - } - } - } - return t; + // now try to allocate a handle + t = gdraw_HandleCacheAllocateBegin(c); + if (!t) { + // it's possible we have no free handles, because all handles + // are in use without exceeding the max storage above--in that + // case, just free one texture to give us a free handle (ideally + // we'd trade off cost of regenerating) + if (gdraw_res_free_lru(c, stats)) { + t = gdraw_HandleCacheAllocateBegin(c); + if (t == NULL) { + gdraw_res_alloc_outofmem(c, NULL, "handles"); + } + } + } + return t; } #else // Returns whether this resource holds pointers to one of the GDraw-managed // pools. -static rrbool gdraw_res_is_managed(GDrawHandle *r) -{ - return r->state == GDRAW_HANDLE_STATE_live || - r->state == GDRAW_HANDLE_STATE_locked || - r->state == GDRAW_HANDLE_STATE_dead || - r->state == GDRAW_HANDLE_STATE_pinned; +static rrbool gdraw_res_is_managed(GDrawHandle* r) { + return r->state == GDRAW_HANDLE_STATE_live || + r->state == GDRAW_HANDLE_STATE_locked || + r->state == GDRAW_HANDLE_STATE_dead || + r->state == GDRAW_HANDLE_STATE_pinned; } // "Reaps" dead resources. Even if the user requests that a @@ -2464,107 +2573,121 @@ static rrbool gdraw_res_is_managed(GDrawHandle *r) // immediately; instead, we flag the resource as "dead" and // periodically check whether we can actually free the // pending memory of dead resources ("reap" them). -static void gdraw_res_reap(GDrawHandleCache *c, GDrawStats *stats) -{ - GDrawHandle *sentinel = &c->state[GDRAW_HANDLE_STATE_dead]; - GDrawHandle *t; - GDRAW_FENCE_FLUSH(); +static void gdraw_res_reap(GDrawHandleCache* c, GDrawStats* stats) { + GDrawHandle* sentinel = &c->state[GDRAW_HANDLE_STATE_dead]; + GDrawHandle* t; + GDRAW_FENCE_FLUSH(); - // reap all dead resources that aren't in use anymore - while ((t = sentinel->next) != sentinel && !is_fence_pending(t->fence)) - gdraw_res_free(t, stats); + // reap all dead resources that aren't in use anymore + while ((t = sentinel->next) != sentinel && !is_fence_pending(t->fence)) + gdraw_res_free(t, stats); } // "Kills" a resource. This means GDraw won't use it anymore // (it's dead), but there might still be outstanding references // to it in a pending command buffer, so we can't physically // free the associated memory until that's all processed. -static void gdraw_res_kill(GDrawHandle *r, GDrawStats *stats) -{ - GDRAW_FENCE_FLUSH(); // dead list is sorted by fence index - make sure all fence values are current. +static void gdraw_res_kill(GDrawHandle* r, GDrawStats* stats) { + GDRAW_FENCE_FLUSH(); // dead list is sorted by fence index - make sure all + // fence values are current. - r->owner = NULL; - gdraw_HandleCacheInsertDead(r); - gdraw_res_reap(r->cache, stats); + r->owner = NULL; + gdraw_HandleCacheInsertDead(r); + gdraw_res_reap(r->cache, stats); } -static GDrawHandle *gdraw_res_alloc_begin(GDrawHandleCache *c, S32 size, GDrawStats *stats) -{ - GDrawHandle *t; - void *ptr = NULL; +static GDrawHandle* gdraw_res_alloc_begin(GDrawHandleCache* c, S32 size, + GDrawStats* stats) { + GDrawHandle* t; + void* ptr = NULL; - gdraw_res_reap(c, stats); // NB this also does GDRAW_FENCE_FLUSH(); - if (size > c->total_bytes) - return gdraw_res_alloc_outofmem(c, NULL, "memory (single resource larger than entire pool)"); - - // now try to allocate a handle - t = gdraw_HandleCacheAllocateBegin(c); - if (!t) { - // it's possible we have no free handles, because all handles - // are in use without exceeding the max storage above--in that - // case, just free one texture to give us a free handle (ideally - // we'd trade off cost of regenerating) - gdraw_res_free_lru(c, stats); - t = gdraw_HandleCacheAllocateBegin(c); - if (!t) - return gdraw_res_alloc_outofmem(c, NULL, "handles"); - } + gdraw_res_reap(c, stats); // NB this also does GDRAW_FENCE_FLUSH(); + if (size > c->total_bytes) + return gdraw_res_alloc_outofmem( + c, NULL, "memory (single resource larger than entire pool)"); - // try to allocate first - if (size) { - ptr = gfxalloc_alloc(c->alloc, size); - if (!ptr) { - // doesn't currently fit. try to free some allocations to get space to breathe. - S32 want_free = RR_MAX(size + (size / 2), GDRAW_MIN_FREE_AMOUNT); - if (want_free > c->total_bytes) - want_free = size; // okay, *really* big resource, just try to allocate its real size + // now try to allocate a handle + t = gdraw_HandleCacheAllocateBegin(c); + if (!t) { + // it's possible we have no free handles, because all handles + // are in use without exceeding the max storage above--in that + // case, just free one texture to give us a free handle (ideally + // we'd trade off cost of regenerating) + gdraw_res_free_lru(c, stats); + t = gdraw_HandleCacheAllocateBegin(c); + if (!t) return gdraw_res_alloc_outofmem(c, NULL, "handles"); + } - // always keep freeing textures until want_free bytes are free. - while (c->alloc->actual_bytes_free < want_free) { - if (!gdraw_res_free_lru(c, stats)) - return gdraw_res_alloc_outofmem(c, t, "memory"); - } + // try to allocate first + if (size) { + ptr = gfxalloc_alloc(c->alloc, size); + if (!ptr) { + // doesn't currently fit. try to free some allocations to get space + // to breathe. + S32 want_free = RR_MAX(size + (size / 2), GDRAW_MIN_FREE_AMOUNT); + if (want_free > c->total_bytes) + want_free = size; // okay, *really* big resource, just try to + // allocate its real size - // now, keep trying to allocate and free some more memory when it still doesn't fit - while (!(ptr = gfxalloc_alloc(c->alloc, size))) { - if (c->alloc->actual_bytes_free >= 3 * size || // if we should have enough free bytes to satisfy the request by now - (c->alloc->actual_bytes_free >= size && size * 2 >= c->total_bytes)) // or the resource is very big and the alloc doesn't fit - { - // before we actually consider defragmenting, we want to free all stale resources (not - // referenced in the previous 2 frames). and if that frees up enough memory so we don't have - // to defragment, all the better! - // also, never defragment twice in a frame, just assume we're thrashing when we get in that - // situation and free up as much as possible. - if (!c->did_defragment && - c->prev_frame_start.value <= c->handle->fence.value) { - - // defragment. - defrag: - if (gdraw_CanDefragment(c)) { // only try defrag if it has a chance of helping. - gdraw_defragment_cache(c, stats); - c->did_defragment = true; - } - ptr = gfxalloc_alloc(c->alloc, size); - if (!ptr) - return gdraw_res_alloc_outofmem(c, t, "memory (fragmentation)"); - break; - } + // always keep freeing textures until want_free bytes are free. + while (c->alloc->actual_bytes_free < want_free) { + if (!gdraw_res_free_lru(c, stats)) + return gdraw_res_alloc_outofmem(c, t, "memory"); } - // keep trying to free some more - if (!gdraw_res_free_lru(c, stats)) { - if (c->alloc->actual_bytes_free >= size) // nothing left to free but we should be good - defrag again, even if it's the second time in a frame - goto defrag; + // now, keep trying to allocate and free some more memory when it + // still doesn't fit + while (!(ptr = gfxalloc_alloc(c->alloc, size))) { + if (c->alloc->actual_bytes_free >= + 3 * size || // if we should have enough free bytes to + // satisfy the request by now + (c->alloc->actual_bytes_free >= size && + size * 2 >= + c->total_bytes)) // or the resource is very big and + // the alloc doesn't fit + { + // before we actually consider defragmenting, we want to + // free all stale resources (not referenced in the previous + // 2 frames). and if that frees up enough memory so we don't + // have to defragment, all the better! also, never + // defragment twice in a frame, just assume we're thrashing + // when we get in that situation and free up as much as + // possible. + if (!c->did_defragment && + c->prev_frame_start.value <= c->handle->fence.value) { + // defragment. + defrag: + if (gdraw_CanDefragment( + c)) { // only try defrag if it has a chance of + // helping. + gdraw_defragment_cache(c, stats); + c->did_defragment = true; + } + ptr = gfxalloc_alloc(c->alloc, size); + if (!ptr) + return gdraw_res_alloc_outofmem( + c, t, "memory (fragmentation)"); + break; + } + } - return gdraw_res_alloc_outofmem(c, t, "memory"); + // keep trying to free some more + if (!gdraw_res_free_lru(c, stats)) { + if (c->alloc->actual_bytes_free >= + size) // nothing left to free but we should be good - + // defrag again, even if it's the second time in + // a frame + goto defrag; + + return gdraw_res_alloc_outofmem(c, t, "memory"); + } } - } - } - } + } + } - t->fence.value = 0; // hasn't been used yet - t->raw_ptr = ptr; - return t; + t->fence.value = 0; // hasn't been used yet + t->raw_ptr = ptr; + return t; } #endif diff --git a/targets/Minecraft.Client/src/BufferedImage.cpp b/targets/Minecraft.Client/src/BufferedImage.cpp index 4c2ed6ded..5e42765d5 100644 --- a/targets/Minecraft.Client/src/BufferedImage.cpp +++ b/targets/Minecraft.Client/src/BufferedImage.cpp @@ -1,6 +1,7 @@ #include "Minecraft.Client/include/BufferedImage.h" #include + #include #include #include @@ -12,9 +13,9 @@ #include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" +#include "PlatformTypes.h" #include "console_helpers/PathHelper.h" #include "console_helpers/StringHelpers.h" -#include "PlatformTypes.h" BufferedImage::BufferedImage(int width, int height, int type) { data[0] = new int[width * height]; diff --git a/targets/console_helpers/src/C4JThread.cpp b/targets/console_helpers/src/C4JThread.cpp index 3402010e7..5a9e5977f 100644 --- a/targets/console_helpers/src/C4JThread.cpp +++ b/targets/console_helpers/src/C4JThread.cpp @@ -1,4 +1,5 @@ #include + #include #include #include diff --git a/targets/console_helpers/src/PerformanceTimer.cpp b/targets/console_helpers/src/PerformanceTimer.cpp index 827fe2fcf..615b12f19 100644 --- a/targets/console_helpers/src/PerformanceTimer.cpp +++ b/targets/console_helpers/src/PerformanceTimer.cpp @@ -2,6 +2,7 @@ #include "console_helpers/PerformanceTimer.h" #include + #include #include diff --git a/targets/console_helpers/src/StringHelpers.cpp b/targets/console_helpers/src/StringHelpers.cpp index 03ff17910..a00460d8d 100644 --- a/targets/console_helpers/src/StringHelpers.cpp +++ b/targets/console_helpers/src/StringHelpers.cpp @@ -1,10 +1,11 @@ #include + #include #include -#include -#include #include +#include #include +#include #include "simdutf.h" diff --git a/targets/console_helpers/src/compression.cpp b/targets/console_helpers/src/compression.cpp index 2e49f7300..beebc20f4 100644 --- a/targets/console_helpers/src/compression.cpp +++ b/targets/console_helpers/src/compression.cpp @@ -1,11 +1,13 @@ +#include "console_helpers/compression.h" + #include #include #include + #include #include #include "Minecraft.Client/include/XboxStubs.h" -#include "console_helpers/compression.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #if defined(_WIN64) || defined(__linux__) // zconf.h defines "typedef unsigned char Byte" which conflicts with the diff --git a/targets/java/include/java/InputOutputStream/BufferedOutputStream.h b/targets/java/include/java/InputOutputStream/BufferedOutputStream.h index 8b2c792e8..289b019b2 100644 --- a/targets/java/include/java/InputOutputStream/BufferedOutputStream.h +++ b/targets/java/include/java/InputOutputStream/BufferedOutputStream.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/java/include/java/InputOutputStream/DataOutputStream.h b/targets/java/include/java/InputOutputStream/DataOutputStream.h index c8c16b4a2..45dc5c426 100644 --- a/targets/java/include/java/InputOutputStream/DataOutputStream.h +++ b/targets/java/include/java/InputOutputStream/DataOutputStream.h @@ -3,6 +3,7 @@ // intermediate inheritance class that we don't care about) #include + #include #include "DataOutput.h" diff --git a/targets/java/include/java/InputOutputStream/FileOutputStream.h b/targets/java/include/java/InputOutputStream/FileOutputStream.h index a8ac8ac2f..eca525032 100644 --- a/targets/java/include/java/InputOutputStream/FileOutputStream.h +++ b/targets/java/include/java/InputOutputStream/FileOutputStream.h @@ -2,6 +2,7 @@ // 4J Stu - Represents Java standard lib abstract #include + #include #include "OutputStream.h" diff --git a/targets/java/src/ByteBuffer.cpp b/targets/java/src/ByteBuffer.cpp index d2b5c7a26..e9a61281b 100644 --- a/targets/java/src/ByteBuffer.cpp +++ b/targets/java/src/ByteBuffer.cpp @@ -3,6 +3,7 @@ #include #include + #include #include diff --git a/targets/java/src/File.cpp b/targets/java/src/File.cpp index bf5954988..b2e2665f7 100644 --- a/targets/java/src/File.cpp +++ b/targets/java/src/File.cpp @@ -1,6 +1,7 @@ #include "java/File.h" #include + #include #include #include diff --git a/targets/java/src/InputOutputStream/BufferedReader.cpp b/targets/java/src/InputOutputStream/BufferedReader.cpp index ed5583974..db59be543 100644 --- a/targets/java/src/InputOutputStream/BufferedReader.cpp +++ b/targets/java/src/InputOutputStream/BufferedReader.cpp @@ -1,8 +1,8 @@ #include "java/InputOutputStream/BufferedReader.h" +#include #include #include -#include #include "java/InputOutputStream/Reader.h" diff --git a/targets/java/src/InputOutputStream/DataOutputStream.cpp b/targets/java/src/InputOutputStream/DataOutputStream.cpp index 8232fe662..90a18aa23 100644 --- a/targets/java/src/InputOutputStream/DataOutputStream.cpp +++ b/targets/java/src/InputOutputStream/DataOutputStream.cpp @@ -1,6 +1,7 @@ #include "java/InputOutputStream/DataOutputStream.h" #include + #include #include #include diff --git a/targets/java/src/InputOutputStream/FileOutputStream.cpp b/targets/java/src/InputOutputStream/FileOutputStream.cpp index 79ea8633e..a1e452784 100644 --- a/targets/java/src/InputOutputStream/FileOutputStream.cpp +++ b/targets/java/src/InputOutputStream/FileOutputStream.cpp @@ -2,8 +2,8 @@ #include #include -#include #include +#include #include "console_helpers/StringHelpers.h" // 4jcraft TODO #include "java/File.h" diff --git a/targets/java/src/system.cpp b/targets/java/src/system.cpp index 5df2c4c69..57ccf8ee0 100644 --- a/targets/java/src/system.cpp +++ b/targets/java/src/system.cpp @@ -1,12 +1,13 @@ +#include "java/System.h" + #include #include #include + #include #include -#include #include - -#include "java/System.h" +#include class Biome; class Node; diff --git a/targets/minecraft/client/Camera.cpp b/targets/minecraft/client/Camera.cpp index 3c921934b..a119a1dcb 100644 --- a/targets/minecraft/client/Camera.cpp +++ b/targets/minecraft/client/Camera.cpp @@ -3,9 +3,11 @@ #include #include #include + #include #include "MemoryTracker.h" +#include "Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMath.h" #include "Minecraft.Client/include/stubs.h" #include "java/FloatBuffer.h" #include "minecraft/world/entity/LivingEntity.h" @@ -16,7 +18,6 @@ #include "minecraft/world/level/tile/LiquidTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/Vec3.h" -#include "Minecraft.Client/Linux/Stubs/DirectXMath/DirectXMath.h" float Camera::xPlayerOffs = 0.0f; float Camera::yPlayerOffs = 0.0f; diff --git a/targets/minecraft/client/Minecraft.cpp b/targets/minecraft/client/Minecraft.cpp index cea6e36ef..4cbef5d9e 100644 --- a/targets/minecraft/client/Minecraft.cpp +++ b/targets/minecraft/client/Minecraft.cpp @@ -2,34 +2,14 @@ #include #include -#include -#include -#include + #include +#include #include #include +#include +#include -#include "Options.h" -#include "ProgressRenderer.h" -#include "Timer.h" -#include "User.h" -#include "minecraft/client/gui/DeathScreen.h" -#include "minecraft/client/gui/ErrorScreen.h" -#include "minecraft/client/gui/Screen.h" -#include "minecraft/client/gui/particle/GuiParticles.h" -#include "minecraft/client/model/HumanoidModel.h" -#include "minecraft/client/multiplayer/MultiPlayerLevel.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/particle/ParticleEngine.h" -#include "minecraft/client/renderer/Chunk.h" -#include "minecraft/client/renderer/GameRenderer.h" -#include "minecraft/client/renderer/LevelRenderer.h" -#include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" -#include "minecraft/client/renderer/tileentity/TileEntityRenderDispatcher.h" -#include "minecraft/client/skins/TexturePackRepository.h" -#include "minecraft/client/title/TitleScreen.h" -#include "minecraft/stats/StatsCounter.h" #include "4J.Common/4J_InputActions.h" #include "4J_Profile.h" #include "4J_Render.h" @@ -46,24 +26,44 @@ #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "Minecraft.Client/include/XboxStubs.h" +#include "Options.h" #include "Pos.h" +#include "ProgressRenderer.h" #include "SharedConstants.h" -#include "minecraft/client/player/LocalPlayer.h" -#include "minecraft/client/renderer/ItemInHandRenderer.h" -#include "minecraft/client/renderer/Tesselator.h" -#include "minecraft/client/renderer/TileRenderer.h" -#include "minecraft/client/resources/ResourceLocation.h" -#include "minecraft/client/skins/TexturePack.h" +#include "Timer.h" +#include "User.h" #include "console_helpers/Definitions.h" #include "console_helpers/compression.h" #include "gl3_loader.h" #include "java/Class.h" #include "java/Random.h" +#include "minecraft/client/gui/DeathScreen.h" +#include "minecraft/client/gui/ErrorScreen.h" +#include "minecraft/client/gui/Screen.h" +#include "minecraft/client/gui/particle/GuiParticles.h" +#include "minecraft/client/model/HumanoidModel.h" +#include "minecraft/client/multiplayer/MultiPlayerLevel.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/client/particle/ParticleEngine.h" +#include "minecraft/client/player/LocalPlayer.h" +#include "minecraft/client/renderer/Chunk.h" +#include "minecraft/client/renderer/GameRenderer.h" +#include "minecraft/client/renderer/ItemInHandRenderer.h" +#include "minecraft/client/renderer/LevelRenderer.h" +#include "minecraft/client/renderer/Tesselator.h" +#include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" +#include "minecraft/client/renderer/tileentity/TileEntityRenderDispatcher.h" +#include "minecraft/client/resources/ResourceLocation.h" +#include "minecraft/client/skins/TexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" +#include "minecraft/client/title/TitleScreen.h" #include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/Packet.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/Stats.h" -#include "strings.h" +#include "minecraft/stats/StatsCounter.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/ItemFrame.h" #include "minecraft/world/entity/Mob.h" @@ -97,6 +97,7 @@ #include "minecraft/world/level/tile/TallGrassPlantTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/HitResult.h" +#include "strings.h" #if defined(ENABLE_JAVA_GUIS) #include "minecraft/client/gui/inventory/CreativeInventoryScreen.h" #endif diff --git a/targets/minecraft/client/Minecraft.h b/targets/minecraft/client/Minecraft.h index 0c4f7b08b..20925681a 100644 --- a/targets/minecraft/client/Minecraft.h +++ b/targets/minecraft/client/Minecraft.h @@ -1,7 +1,8 @@ #pragma once #include -#include + #include +#include #include #include diff --git a/targets/minecraft/client/gui/ChatScreen.cpp b/targets/minecraft/client/gui/ChatScreen.cpp index 595307ef7..7d8852b79 100644 --- a/targets/minecraft/client/gui/ChatScreen.cpp +++ b/targets/minecraft/client/gui/ChatScreen.cpp @@ -7,8 +7,8 @@ #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Gui.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" const std::wstring ChatScreen::allowedChars = SharedConstants::acceptableLetters; diff --git a/targets/minecraft/client/gui/ConfirmScreen.cpp b/targets/minecraft/client/gui/ConfirmScreen.cpp index b9c67b929..184efc3e3 100644 --- a/targets/minecraft/client/gui/ConfirmScreen.cpp +++ b/targets/minecraft/client/gui/ConfirmScreen.cpp @@ -3,9 +3,9 @@ #include #include "SmallButton.h" -#include "minecraft/locale/Language.h" #include "minecraft/client/gui/Button.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/locale/Language.h" ConfirmScreen::ConfirmScreen(Screen* parent, const std::wstring& title1, const std::wstring& title2, int id) { diff --git a/targets/minecraft/client/gui/ControlsScreen.cpp b/targets/minecraft/client/gui/ControlsScreen.cpp index ec7c93fb1..19439f026 100644 --- a/targets/minecraft/client/gui/ControlsScreen.cpp +++ b/targets/minecraft/client/gui/ControlsScreen.cpp @@ -5,9 +5,9 @@ #include "SmallButton.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/Options.h" -#include "minecraft/locale/Language.h" #include "minecraft/client/gui/Button.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/locale/Language.h" ControlsScreen::ControlsScreen(Screen* lastScreen, Options* options) { // 4J - added initialisers diff --git a/targets/minecraft/client/gui/CreateWorldScreen.cpp b/targets/minecraft/client/gui/CreateWorldScreen.cpp index 337829ffa..a70d320ef 100644 --- a/targets/minecraft/client/gui/CreateWorldScreen.cpp +++ b/targets/minecraft/client/gui/CreateWorldScreen.cpp @@ -2,6 +2,7 @@ #include #include + #include #include @@ -21,11 +22,11 @@ #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/Options.h" +#include "minecraft/client/gui/Screen.h" #include "minecraft/locale/Language.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/level/chunk/ChunkSource.h" -#include "minecraft/client/gui/Screen.h" CreateWorldScreen::CreateWorldScreen(Screen* lastScreen) { done = false; // 4J added diff --git a/targets/minecraft/client/gui/DeathScreen.cpp b/targets/minecraft/client/gui/DeathScreen.cpp index 77a80ce99..c28bb9a71 100644 --- a/targets/minecraft/client/gui/DeathScreen.cpp +++ b/targets/minecraft/client/gui/DeathScreen.cpp @@ -9,8 +9,8 @@ #include "PauseScreen.h" #include "console_helpers/StringHelpers.h" #include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" void DeathScreen::init() { buttons.clear(); diff --git a/targets/minecraft/client/gui/Font.cpp b/targets/minecraft/client/gui/Font.cpp index 567e20b14..7cf0596b6 100644 --- a/targets/minecraft/client/gui/Font.cpp +++ b/targets/minecraft/client/gui/Font.cpp @@ -1,6 +1,7 @@ #include "Font.h" #include + #include #include diff --git a/targets/minecraft/client/gui/Gui.cpp b/targets/minecraft/client/gui/Gui.cpp index f48323ea2..5c07dc3a3 100644 --- a/targets/minecraft/client/gui/Gui.cpp +++ b/targets/minecraft/client/gui/Gui.cpp @@ -4,28 +4,6 @@ #include "4J.Common/4J_Compat.h" #include "4J_Input.h" -#include "Minecraft.Client/include/stdafx.h" -#include "java/JavaMath.h" -#include "java/System.h" -#include "minecraft/client/ClientConstants.h" -#include "minecraft/client/Lighting.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/Options.h" -#include "minecraft/client/gui/Font.h" -#include "minecraft/client/gui/ScreenSizeCalculator.h" -#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" -#include "minecraft/client/multiplayer/MultiPlayerLevel.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/renderer/entity/EnderDragonRenderer.h" -#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" -#include "minecraft/net.minecraft.h" -#include "minecraft/world/food/net.minecraft.world.food.h" -#include "minecraft/world/item/net.minecraft.world.item.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/dimension/Dimension.h" -#include "minecraft/world/level/tile/net.minecraft.world.level.tile.h" -#include "minecraft/world/net.minecraft.world.h" #include "4J_Render.h" #include "Facing.h" #include "Minecraft.Client/Common/App_enums.h" @@ -33,29 +11,51 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/include/XboxStubs.h" -#include "minecraft/client/GuiMessage.h" -#include "minecraft/client/gui/Screen.h" -#include "minecraft/client/gui/ChatScreen.h" -#include "minecraft/client/renderer/Tesselator.h" -#include "minecraft/client/resources/ResourceLocation.h" +#include "Minecraft.Client/include/stdafx.h" +#include "console_helpers/StringHelpers.h" #include "gl3_loader.h" +#include "java/JavaMath.h" #include "java/Random.h" -#include "strings.h" +#include "java/System.h" +#include "minecraft/client/ClientConstants.h" +#include "minecraft/client/GuiMessage.h" +#include "minecraft/client/Lighting.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/Options.h" +#include "minecraft/client/gui/ChatScreen.h" +#include "minecraft/client/gui/Font.h" +#include "minecraft/client/gui/Screen.h" +#include "minecraft/client/gui/ScreenSizeCalculator.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/Tesselator.h" +#include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/EnderDragonRenderer.h" +#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" +#include "minecraft/client/renderer/texture/TextureAtlas.h" +#include "minecraft/client/resources/ResourceLocation.h" +#include "minecraft/net.minecraft.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/Icon.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/food/net.minecraft.world.food.h" #include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/level/tile/PortalTile.h" -#include "minecraft/client/renderer/texture/TextureAtlas.h" -#include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/item/net.minecraft.world.item.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/chunk/LevelChunk.h" +#include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/storage/LevelData.h" -#include "minecraft/util/Mth.h" -#include "minecraft/client/renderer/GameRenderer.h" -#include "console_helpers/StringHelpers.h" +#include "minecraft/world/level/tile/PortalTile.h" +#include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/net.minecraft.world.level.tile.h" +#include "minecraft/world/net.minecraft.world.h" +#include "strings.h" ResourceLocation Gui::PUMPKIN_BLUR_LOCATION = ResourceLocation(TN__BLUR__MISC_PUMPKINBLUR); diff --git a/targets/minecraft/client/gui/Gui.h b/targets/minecraft/client/gui/Gui.h index 21777afce..02b1b446e 100644 --- a/targets/minecraft/client/gui/Gui.h +++ b/targets/minecraft/client/gui/Gui.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/client/gui/InBedChatScreen.cpp b/targets/minecraft/client/gui/InBedChatScreen.cpp index 451b1173d..0c9b69bee 100644 --- a/targets/minecraft/client/gui/InBedChatScreen.cpp +++ b/targets/minecraft/client/gui/InBedChatScreen.cpp @@ -8,9 +8,9 @@ #include "Minecraft.Client/include/stubs.h" #include "console_helpers/StringHelpers.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/gui/ChatScreen.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/locale/Language.h" -#include "minecraft/client/gui/ChatScreen.h" void InBedChatScreen::init() { Keyboard::enableRepeatEvents(true); diff --git a/targets/minecraft/client/gui/JoinMultiplayerScreen.cpp b/targets/minecraft/client/gui/JoinMultiplayerScreen.cpp index 071c2fba7..abb5c3833 100644 --- a/targets/minecraft/client/gui/JoinMultiplayerScreen.cpp +++ b/targets/minecraft/client/gui/JoinMultiplayerScreen.cpp @@ -8,8 +8,8 @@ #include "console_helpers/StringHelpers.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/Options.h" -#include "minecraft/locale/Language.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/locale/Language.h" JoinMultiplayerScreen::JoinMultiplayerScreen(Screen* lastScreen) { ipEdit = nullptr; diff --git a/targets/minecraft/client/gui/Minimap.cpp b/targets/minecraft/client/gui/Minimap.cpp index 7742af76a..c0c198df2 100644 --- a/targets/minecraft/client/gui/Minimap.cpp +++ b/targets/minecraft/client/gui/Minimap.cpp @@ -2,8 +2,9 @@ #include #include -#include #include +#include + #include #include "4J_Render.h" diff --git a/targets/minecraft/client/gui/OptionsScreen.cpp b/targets/minecraft/client/gui/OptionsScreen.cpp index f14ac6b97..9aa855932 100644 --- a/targets/minecraft/client/gui/OptionsScreen.cpp +++ b/targets/minecraft/client/gui/OptionsScreen.cpp @@ -8,9 +8,9 @@ #include "VideoSettingsScreen.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/Options.h" -#include "minecraft/locale/Language.h" #include "minecraft/client/gui/Button.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/locale/Language.h" OptionsScreen::OptionsScreen(Screen* lastScreen, Options* options) { title = L"Options"; // 4J added diff --git a/targets/minecraft/client/gui/PauseScreen.cpp b/targets/minecraft/client/gui/PauseScreen.cpp index bed9599b6..31ce22b27 100644 --- a/targets/minecraft/client/gui/PauseScreen.cpp +++ b/targets/minecraft/client/gui/PauseScreen.cpp @@ -1,6 +1,7 @@ #include "PauseScreen.h" #include + #include #include #include @@ -14,10 +15,10 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "OptionsScreen.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/gui/Screen.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/locale/I18n.h" #include "minecraft/server/MinecraftServer.h" -#include "minecraft/client/gui/Screen.h" PauseScreen::PauseScreen() { saveStep = 0; diff --git a/targets/minecraft/client/gui/RenameWorldScreen.cpp b/targets/minecraft/client/gui/RenameWorldScreen.cpp index 339d480d2..a7de15bb0 100644 --- a/targets/minecraft/client/gui/RenameWorldScreen.cpp +++ b/targets/minecraft/client/gui/RenameWorldScreen.cpp @@ -7,9 +7,9 @@ #include "Minecraft.Client/include/stubs.h" #include "console_helpers/StringHelpers.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/gui/Screen.h" #include "minecraft/locale/Language.h" #include "minecraft/world/level/storage/LevelStorageSource.h" -#include "minecraft/client/gui/Screen.h" RenameWorldScreen::RenameWorldScreen(Screen* lastScreen, const std::wstring& levelId) { diff --git a/targets/minecraft/client/gui/Screen.cpp b/targets/minecraft/client/gui/Screen.cpp index b9e537682..75e174535 100644 --- a/targets/minecraft/client/gui/Screen.cpp +++ b/targets/minecraft/client/gui/Screen.cpp @@ -1,8 +1,8 @@ #include "Screen.h" #include "4J.Common/4J_InputActions.h" -#include "4J_Profile.h" #include "4J_Input.h" +#include "4J_Profile.h" #include "Button.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Audio/SoundEngine.h" diff --git a/targets/minecraft/client/gui/ScrolledSelectionList.h b/targets/minecraft/client/gui/ScrolledSelectionList.h index 8c9e2d057..eac363691 100644 --- a/targets/minecraft/client/gui/ScrolledSelectionList.h +++ b/targets/minecraft/client/gui/ScrolledSelectionList.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/client/gui/SelectWorldScreen.cpp b/targets/minecraft/client/gui/SelectWorldScreen.cpp index 7ab59b36e..2b4ad0c12 100644 --- a/targets/minecraft/client/gui/SelectWorldScreen.cpp +++ b/targets/minecraft/client/gui/SelectWorldScreen.cpp @@ -2,6 +2,7 @@ #include #include + #include #include "Button.h" @@ -12,11 +13,11 @@ #include "RenameWorldScreen.h" #include "console_helpers/StringHelpers.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/gui/Screen.h" +#include "minecraft/client/gui/ScrolledSelectionList.h" #include "minecraft/locale/Language.h" #include "minecraft/world/level/storage/LevelStorageSource.h" #include "minecraft/world/level/storage/LevelSummary.h" -#include "minecraft/client/gui/Screen.h" -#include "minecraft/client/gui/ScrolledSelectionList.h" SelectWorldScreen::SelectWorldScreen(Screen* lastScreen) { // 4J - added initialisers diff --git a/targets/minecraft/client/gui/TradeSwitchButton.cpp b/targets/minecraft/client/gui/TradeSwitchButton.cpp index 4c373d69b..1da728e0a 100644 --- a/targets/minecraft/client/gui/TradeSwitchButton.cpp +++ b/targets/minecraft/client/gui/TradeSwitchButton.cpp @@ -6,7 +6,6 @@ #include "minecraft/client/gui/Button.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" -#include "minecraft/client/gui/Button.h" // 4jcraft: referenced from MCP 8.11 (JE 1.6.4) #ifdef ENABLE_JAVA_GUIS diff --git a/targets/minecraft/client/gui/VideoSettingsScreen.cpp b/targets/minecraft/client/gui/VideoSettingsScreen.cpp index fdcb99d4d..864c0a742 100644 --- a/targets/minecraft/client/gui/VideoSettingsScreen.cpp +++ b/targets/minecraft/client/gui/VideoSettingsScreen.cpp @@ -6,9 +6,9 @@ #include "SmallButton.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/Options.h" -#include "minecraft/locale/Language.h" #include "minecraft/client/gui/Button.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/locale/Language.h" // 4jcraft #define ITEM_COUNT 10 diff --git a/targets/minecraft/client/gui/achievement/AchievementScreen.cpp b/targets/minecraft/client/gui/achievement/AchievementScreen.cpp index 93fb71473..271e9acfc 100644 --- a/targets/minecraft/client/gui/achievement/AchievementScreen.cpp +++ b/targets/minecraft/client/gui/achievement/AchievementScreen.cpp @@ -1,6 +1,7 @@ #include "AchievementScreen.h" #include + #include #include diff --git a/targets/minecraft/client/gui/inventory/BeaconCancelButton.cpp b/targets/minecraft/client/gui/inventory/BeaconCancelButton.cpp index 6ce073b69..9071fc97e 100644 --- a/targets/minecraft/client/gui/inventory/BeaconCancelButton.cpp +++ b/targets/minecraft/client/gui/inventory/BeaconCancelButton.cpp @@ -3,8 +3,8 @@ #include #include "BeaconScreen.h" -#include "minecraft/locale/Language.h" #include "minecraft/client/gui/inventory/AbstractBeaconButton.h" +#include "minecraft/locale/Language.h" // 4jcraft: referenced from MCP 8.11 (JE 1.6.4) #ifdef ENABLE_JAVA_GUIS diff --git a/targets/minecraft/client/gui/inventory/BeaconConfirmButton.cpp b/targets/minecraft/client/gui/inventory/BeaconConfirmButton.cpp index 523a8ec35..a3cbf95ba 100644 --- a/targets/minecraft/client/gui/inventory/BeaconConfirmButton.cpp +++ b/targets/minecraft/client/gui/inventory/BeaconConfirmButton.cpp @@ -3,8 +3,8 @@ #include #include "BeaconScreen.h" -#include "minecraft/locale/Language.h" #include "minecraft/client/gui/inventory/AbstractBeaconButton.h" +#include "minecraft/locale/Language.h" // 4jcraft: referenced from MCP 8.11 (JE 1.6.4) #ifdef ENABLE_JAVA_GUIS diff --git a/targets/minecraft/client/gui/inventory/BeaconPowerButton.cpp b/targets/minecraft/client/gui/inventory/BeaconPowerButton.cpp index 8b44e45c2..3c830755a 100644 --- a/targets/minecraft/client/gui/inventory/BeaconPowerButton.cpp +++ b/targets/minecraft/client/gui/inventory/BeaconPowerButton.cpp @@ -4,8 +4,8 @@ #include "BeaconScreen.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "minecraft/world/effect/MobEffect.h" #include "minecraft/client/gui/inventory/AbstractBeaconButton.h" +#include "minecraft/world/effect/MobEffect.h" // 4jcraft: referenced from MCP 8.11 (JE 1.6.4) #ifdef ENABLE_JAVA_GUIS diff --git a/targets/minecraft/client/gui/inventory/BeaconScreen.cpp b/targets/minecraft/client/gui/inventory/BeaconScreen.cpp index 0d2b16163..204d07b2b 100644 --- a/targets/minecraft/client/gui/inventory/BeaconScreen.cpp +++ b/targets/minecraft/client/gui/inventory/BeaconScreen.cpp @@ -1,6 +1,7 @@ #include "BeaconScreen.h" #include + #include #include #include @@ -14,6 +15,8 @@ #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Button.h" #include "minecraft/client/gui/Font.h" +#include "minecraft/client/gui/inventory/AbstractBeaconButton.h" +#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/renderer/entity/ItemRenderer.h" @@ -24,8 +27,6 @@ #include "minecraft/world/inventory/BeaconMenu.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/tile/entity/BeaconTileEntity.h" -#include "minecraft/client/gui/inventory/AbstractBeaconButton.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" // 4jcraft: referenced from MCP 8.11 (JE 1.6.4) and the existing // container classes (and iggy too) diff --git a/targets/minecraft/client/gui/inventory/BrewingStandScreen.cpp b/targets/minecraft/client/gui/inventory/BrewingStandScreen.cpp index a241404d3..6167f03f2 100644 --- a/targets/minecraft/client/gui/inventory/BrewingStandScreen.cpp +++ b/targets/minecraft/client/gui/inventory/BrewingStandScreen.cpp @@ -4,10 +4,10 @@ #include #include "minecraft/client/gui/Font.h" +#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/BrewingStandMenu.h" #include "minecraft/world/level/tile/entity/BrewingStandTileEntity.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" // 4jcraft: referenced from MCP 8.11 (JE 1.6.4) and the existing // container classes diff --git a/targets/minecraft/client/gui/inventory/ContainerScreen.cpp b/targets/minecraft/client/gui/inventory/ContainerScreen.cpp index 36222117d..843633fe9 100644 --- a/targets/minecraft/client/gui/inventory/ContainerScreen.cpp +++ b/targets/minecraft/client/gui/inventory/ContainerScreen.cpp @@ -1,8 +1,8 @@ #include "ContainerScreen.h" +#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/world/Container.h" #include "minecraft/world/inventory/ContainerMenu.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" ContainerScreen::ContainerScreen(std::shared_ptr inventory, std::shared_ptr container) diff --git a/targets/minecraft/client/gui/inventory/CraftingScreen.cpp b/targets/minecraft/client/gui/inventory/CraftingScreen.cpp index 3b0feead8..b2c09a7f4 100644 --- a/targets/minecraft/client/gui/inventory/CraftingScreen.cpp +++ b/targets/minecraft/client/gui/inventory/CraftingScreen.cpp @@ -4,12 +4,12 @@ #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Font.h" +#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/locale/Language.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/CraftingMenu.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" class Player; diff --git a/targets/minecraft/client/gui/inventory/CreativeInventoryScreen.cpp b/targets/minecraft/client/gui/inventory/CreativeInventoryScreen.cpp index 625ee5aaf..9ea7f4b5f 100644 --- a/targets/minecraft/client/gui/inventory/CreativeInventoryScreen.cpp +++ b/targets/minecraft/client/gui/inventory/CreativeInventoryScreen.cpp @@ -1,6 +1,7 @@ #include "CreativeInventoryScreen.h" #include + #include #include @@ -10,22 +11,22 @@ #include "AbstractContainerScreen.h" #include "Minecraft.Client/Common/src/UI/All Platforms/IUIScene_CreativeMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/include/stubs.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Screen.h" +#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/renderer/entity/ItemRenderer.h" #include "minecraft/world/SimpleContainer.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/InventoryMenu.h" #include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" -#include "Minecraft.Client/include/stubs.h" // Static member initialization int CreativeInventoryScreen::selectedTabIndex = diff --git a/targets/minecraft/client/gui/inventory/FurnaceScreen.cpp b/targets/minecraft/client/gui/inventory/FurnaceScreen.cpp index 1a34b6dd0..d47a16921 100644 --- a/targets/minecraft/client/gui/inventory/FurnaceScreen.cpp +++ b/targets/minecraft/client/gui/inventory/FurnaceScreen.cpp @@ -3,10 +3,10 @@ #include #include "minecraft/client/gui/Font.h" +#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/FurnaceMenu.h" #include "minecraft/world/level/tile/entity/FurnaceTileEntity.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #ifdef ENABLE_JAVA_GUIS ResourceLocation GUI_FURNACE_LOCATION = ResourceLocation(TN_GUI_FURNACE); diff --git a/targets/minecraft/client/gui/inventory/HorseInventoryScreen.cpp b/targets/minecraft/client/gui/inventory/HorseInventoryScreen.cpp index c67304602..dc09c0821 100644 --- a/targets/minecraft/client/gui/inventory/HorseInventoryScreen.cpp +++ b/targets/minecraft/client/gui/inventory/HorseInventoryScreen.cpp @@ -7,14 +7,12 @@ #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Font.h" #include "minecraft/client/gui/inventory/AbstractContainerScreen.h" +#include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/HorseInventoryMenu.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" - -#include "minecraft/client/renderer/Textures.h" class EntityHorse; diff --git a/targets/minecraft/client/gui/inventory/InventoryScreen.cpp b/targets/minecraft/client/gui/inventory/InventoryScreen.cpp index 1be7d5fc2..2205f8670 100644 --- a/targets/minecraft/client/gui/inventory/InventoryScreen.cpp +++ b/targets/minecraft/client/gui/inventory/InventoryScreen.cpp @@ -8,6 +8,7 @@ #include "minecraft/client/Lighting.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Button.h" +#include "minecraft/client/gui/Font.h" #include "minecraft/client/gui/achievement/AchievementScreen.h" #include "minecraft/client/gui/achievement/StatsScreen.h" #include "minecraft/client/gui/inventory/AbstractContainerScreen.h" @@ -17,8 +18,6 @@ #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Player.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" -#include "minecraft/client/gui/Font.h" InventoryScreen::InventoryScreen(std::shared_ptr player) : AbstractContainerScreen(player->inventoryMenu) { diff --git a/targets/minecraft/client/gui/inventory/RepairScreen.cpp b/targets/minecraft/client/gui/inventory/RepairScreen.cpp index a73be8fbe..b8413b581 100644 --- a/targets/minecraft/client/gui/inventory/RepairScreen.cpp +++ b/targets/minecraft/client/gui/inventory/RepairScreen.cpp @@ -1,6 +1,7 @@ #include "RepairScreen.h" #include + #include #include @@ -16,10 +17,10 @@ #include "minecraft/locale/Language.h" #include "minecraft/network/packet/CustomPayloadPacket.h" #include "minecraft/world/entity/player/Abilities.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/AnvilMenu.h" #include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" class Inventory; class Level; diff --git a/targets/minecraft/client/gui/inventory/TrapScreen.cpp b/targets/minecraft/client/gui/inventory/TrapScreen.cpp index 75336f7d8..1ab57f0c9 100644 --- a/targets/minecraft/client/gui/inventory/TrapScreen.cpp +++ b/targets/minecraft/client/gui/inventory/TrapScreen.cpp @@ -3,10 +3,10 @@ #include #include "minecraft/client/gui/Font.h" +#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/TrapMenu.h" #include "minecraft/world/level/tile/entity/DispenserTileEntity.h" -#include "minecraft/client/gui/inventory/AbstractContainerScreen.h" #ifdef ENABLE_JAVA_GUIS ResourceLocation GUI_TRAP_LOCATION = ResourceLocation(TN_GUI_TRAP); diff --git a/targets/minecraft/client/level/DemoLevel.cpp b/targets/minecraft/client/level/DemoLevel.cpp index 1221eefa9..de9c490f9 100644 --- a/targets/minecraft/client/level/DemoLevel.cpp +++ b/targets/minecraft/client/level/DemoLevel.cpp @@ -1,10 +1,10 @@ #include "DemoLevel.h" +#include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/level/LevelType.h" #include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/storage/LevelData.h" -#include "minecraft/world/level/Level.h" class LevelStorage; diff --git a/targets/minecraft/client/level/DemoLevel.h b/targets/minecraft/client/level/DemoLevel.h index d570e9d58..3c2582086 100644 --- a/targets/minecraft/client/level/DemoLevel.h +++ b/targets/minecraft/client/level/DemoLevel.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/client/model/CowModel.cpp b/targets/minecraft/client/model/CowModel.cpp index 5d3543aa9..b87b9dfae 100644 --- a/targets/minecraft/client/model/CowModel.cpp +++ b/targets/minecraft/client/model/CowModel.cpp @@ -1,7 +1,7 @@ #include "CowModel.h" -#include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/model/QuadrupedModel.h" +#include "minecraft/client/model/geom/ModelPart.h" CowModel::CowModel() : QuadrupedModel(12, 0) { head = new ModelPart(this, 0, 0); diff --git a/targets/minecraft/client/model/EndermanModel.cpp b/targets/minecraft/client/model/EndermanModel.cpp index 28266e6ed..b20f6cd9a 100644 --- a/targets/minecraft/client/model/EndermanModel.cpp +++ b/targets/minecraft/client/model/EndermanModel.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/model/HumanoidModel.h" +#include "minecraft/client/model/geom/ModelPart.h" EndermanModel::EndermanModel() : HumanoidModel(0, -14, 64, 32) { carrying = false; diff --git a/targets/minecraft/client/model/PigModel.cpp b/targets/minecraft/client/model/PigModel.cpp index 8b7fd978e..bb5be67d1 100644 --- a/targets/minecraft/client/model/PigModel.cpp +++ b/targets/minecraft/client/model/PigModel.cpp @@ -1,7 +1,7 @@ #include "PigModel.h" -#include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/model/QuadrupedModel.h" +#include "minecraft/client/model/geom/ModelPart.h" PigModel::PigModel() : QuadrupedModel(6, 0) { head->texOffs(16, 16)->addBox(-2.0f, 0.0f, -9.0f, 4, 3, 1, 0.0f); diff --git a/targets/minecraft/client/model/SheepFurModel.cpp b/targets/minecraft/client/model/SheepFurModel.cpp index 9a483babf..8f52060a9 100644 --- a/targets/minecraft/client/model/SheepFurModel.cpp +++ b/targets/minecraft/client/model/SheepFurModel.cpp @@ -2,10 +2,10 @@ #include +#include "minecraft/client/model/QuadrupedModel.h" #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Sheep.h" -#include "minecraft/client/model/QuadrupedModel.h" SheepFurModel::SheepFurModel() : QuadrupedModel(12, 0) { headXRot = 0.0f; diff --git a/targets/minecraft/client/model/SheepModel.cpp b/targets/minecraft/client/model/SheepModel.cpp index 572cbca0f..1eae65882 100644 --- a/targets/minecraft/client/model/SheepModel.cpp +++ b/targets/minecraft/client/model/SheepModel.cpp @@ -2,10 +2,10 @@ #include +#include "minecraft/client/model/QuadrupedModel.h" #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Sheep.h" -#include "minecraft/client/model/QuadrupedModel.h" SheepModel::SheepModel() : QuadrupedModel(12, 0) { headXRot = 0.0f; diff --git a/targets/minecraft/client/model/SkeletonModel.cpp b/targets/minecraft/client/model/SkeletonModel.cpp index 4410b5b6e..7fdc4d433 100644 --- a/targets/minecraft/client/model/SkeletonModel.cpp +++ b/targets/minecraft/client/model/SkeletonModel.cpp @@ -2,10 +2,10 @@ #include +#include "minecraft/client/model/ZombieModel.h" #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/Skeleton.h" -#include "minecraft/client/model/ZombieModel.h" void SkeletonModel::_init(float g) { arm0 = new ModelPart(this, 24 + 16, 16); diff --git a/targets/minecraft/client/model/VillagerZombieModel.cpp b/targets/minecraft/client/model/VillagerZombieModel.cpp index 528ae75ee..3d5db290a 100644 --- a/targets/minecraft/client/model/VillagerZombieModel.cpp +++ b/targets/minecraft/client/model/VillagerZombieModel.cpp @@ -1,11 +1,12 @@ #include "VillagerZombieModel.h" #include + #include #include -#include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/model/HumanoidModel.h" +#include "minecraft/client/model/geom/ModelPart.h" void VillagerZombieModel::_init(float g, float yOffset, bool isArmor) { delete head; diff --git a/targets/minecraft/client/model/WitherBossModel.cpp b/targets/minecraft/client/model/WitherBossModel.cpp index 33379f5c5..5190e51c9 100644 --- a/targets/minecraft/client/model/WitherBossModel.cpp +++ b/targets/minecraft/client/model/WitherBossModel.cpp @@ -5,8 +5,8 @@ #include #include "minecraft/client/model/geom/ModelPart.h" -#include "minecraft/world/entity/boss/wither/WitherBoss.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/boss/wither/WitherBoss.h" WitherBossModel::WitherBossModel() { texWidth = 64; diff --git a/targets/minecraft/client/model/ZombieModel.cpp b/targets/minecraft/client/model/ZombieModel.cpp index 38a88e0a2..25db4c17c 100644 --- a/targets/minecraft/client/model/ZombieModel.cpp +++ b/targets/minecraft/client/model/ZombieModel.cpp @@ -1,11 +1,12 @@ #include "ZombieModel.h" #include + #include #include -#include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/model/HumanoidModel.h" +#include "minecraft/client/model/geom/ModelPart.h" ZombieModel::ZombieModel() : HumanoidModel(0, 0, 64, 32) {} diff --git a/targets/minecraft/client/model/dragon/DragonModel.cpp b/targets/minecraft/client/model/dragon/DragonModel.cpp index 4bd5d2fcb..7fd1ddca0 100644 --- a/targets/minecraft/client/model/dragon/DragonModel.cpp +++ b/targets/minecraft/client/model/dragon/DragonModel.cpp @@ -1,17 +1,18 @@ #include "DragonModel.h" #include + #include #include #include #include -#include "minecraft/world/entity/boss/enderdragon/EnderDragon.h" #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/geom/Model.h" #include "minecraft/client/model/geom/ModelPart.h" -#include "gl3_loader.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/boss/enderdragon/EnderDragon.h" DragonModel::DragonModel(float g) : Model() { // 4J-PB diff --git a/targets/minecraft/client/model/geom/ModelPart.cpp b/targets/minecraft/client/model/geom/ModelPart.cpp index 1dce6380c..df3db442b 100644 --- a/targets/minecraft/client/model/geom/ModelPart.cpp +++ b/targets/minecraft/client/model/geom/ModelPart.cpp @@ -1,14 +1,15 @@ #include "ModelPart.h" #include + #include #include "4J_Render.h" #include "Cube.h" #include "TexOffs.h" #include "minecraft/client/MemoryTracker.h" -#include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/model/geom/Model.h" +#include "minecraft/client/renderer/Tesselator.h" const float ModelPart::RAD = (180.0f / std::numbers::pi); diff --git a/targets/minecraft/client/multiplayer/ClientConnection.cpp b/targets/minecraft/client/multiplayer/ClientConnection.cpp index c893316e0..f1711e7ef 100644 --- a/targets/minecraft/client/multiplayer/ClientConnection.cpp +++ b/targets/minecraft/client/multiplayer/ClientConnection.cpp @@ -3,63 +3,61 @@ #include #include #include -#include + #include #include #include +#include #include -#include "4J_Input.h" -#include "Minecraft.Client/Common/src/ConsoleGameMode.h" -#include "Minecraft.Client/Common/src/DLC/DLCPack.h" -#include "Minecraft.Client/Common/src/Network/Socket.h" -#include "Minecraft.Client/Common/src/Tutorial/FullTutorialMode.h" -#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" -#include "MultiPlayerLevel.h" -#include "ReceivingLevelScreen.h" -#include "console_helpers/PlatformTime.h" -#include "console_helpers/StringHelpers.h" -#include "minecraft/Pos.h" -#include "minecraft/SharedConstants.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/ProgressRenderer.h" -#include "minecraft/client/User.h" -#include "minecraft/client/gui/Gui.h" -#include "minecraft/client/particle/CritParticle.h" -#include "minecraft/client/particle/TakeAnimationParticle.h" -#include "minecraft/client/player/RemotePlayer.h" -#include "minecraft/client/renderer/LevelRenderer.h" -#include "minecraft/client/skins/DLCTexturePack.h" -#include "minecraft/client/skins/TexturePackRepository.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/sounds/SoundTypes.h" -#include "minecraft/world/phys/AABB.h" #include "4J.Common/4J_Compat.h" +#include "4J_Input.h" #include "4J_Profile.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/App_structs.h" +#include "Minecraft.Client/Common/src/ConsoleGameMode.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" +#include "Minecraft.Client/Common/src/DLC/DLCPack.h" #include "Minecraft.Client/Common/src/DLC/DLCSkinFile.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" +#include "Minecraft.Client/Common/src/Network/Socket.h" +#include "Minecraft.Client/Common/src/Tutorial/FullTutorialMode.h" #include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" +#include "Minecraft.Client/Common/src/Tutorial/TutorialMode.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIEnums.h" #include "Minecraft.Client/Common/src/UI/All Platforms/UIStructs.h" #include "Minecraft.Client/Common/src/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" -#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/particle/ParticleEngine.h" -#include "minecraft/client/player/LocalPlayer.h" -#include "minecraft/core/particles/ParticleTypes.h" +#include "MultiPlayerLevel.h" +#include "ReceivingLevelScreen.h" +#include "console_helpers/PlatformTime.h" +#include "console_helpers/StringHelpers.h" #include "java/Class.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/Random.h" +#include "minecraft/Pos.h" +#include "minecraft/SharedConstants.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/ProgressRenderer.h" +#include "minecraft/client/User.h" +#include "minecraft/client/gui/Gui.h" +#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/client/particle/CritParticle.h" +#include "minecraft/client/particle/ParticleEngine.h" +#include "minecraft/client/particle/TakeAnimationParticle.h" +#include "minecraft/client/player/LocalPlayer.h" +#include "minecraft/client/player/RemotePlayer.h" +#include "minecraft/client/renderer/LevelRenderer.h" +#include "minecraft/client/skins/DLCTexturePack.h" +#include "minecraft/client/skins/TexturePackRepository.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/network/packet/AddEntityPacket.h" #include "minecraft/network/packet/AddExperienceOrbPacket.h" #include "minecraft/network/packet/AddGlobalEntityPacket.h" @@ -127,8 +125,9 @@ #include "minecraft/network/packet/UpdateMobEffectPacket.h" #include "minecraft/network/packet/UpdateProgressPacket.h" #include "minecraft/network/packet/XZPacket.h" +#include "minecraft/server/MinecraftServer.h" +#include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/GenericStats.h" -#include "strings.h" #include "minecraft/world/SimpleContainer.h" #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/EntityIO.h" @@ -200,6 +199,8 @@ #include "minecraft/world/level/tile/entity/SignTileEntity.h" #include "minecraft/world/level/tile/entity/SkullTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "minecraft/world/phys/AABB.h" +#include "strings.h" class Packet; class TexturePack; diff --git a/targets/minecraft/client/multiplayer/ClientConnection.h b/targets/minecraft/client/multiplayer/ClientConnection.h index 62399bf2e..7104ec292 100644 --- a/targets/minecraft/client/multiplayer/ClientConnection.h +++ b/targets/minecraft/client/multiplayer/ClientConnection.h @@ -1,12 +1,13 @@ #pragma once #include + #include #include #include #include "4J_Storage.h" -#include "minecraft/network/net.minecraft.network.h" #include "minecraft/network/Connection.h" +#include "minecraft/network/net.minecraft.network.h" #include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/PacketListener.h" #include "minecraft/world/entity/Entity.h" diff --git a/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp b/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp index 2a7f55dd1..98678f61f 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp +++ b/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp @@ -12,13 +12,13 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelType.h" #include "minecraft/world/level/LightLayer.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/chunk/EmptyLevelChunk.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/chunk/WaterLevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/biome/Biome.h" MultiPlayerChunkCache::MultiPlayerChunkCache(Level* level) { XZSIZE = level->dimension->getXZSize(); // 4J Added diff --git a/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp b/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp index 611655893..2b33f812f 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp +++ b/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp @@ -7,6 +7,7 @@ #include "MultiPlayerLevel.h" #include "java/Class.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/network/packet/ContainerButtonClickPacket.h" #include "minecraft/network/packet/ContainerClickPacket.h" #include "minecraft/network/packet/CraftItemPacket.h" @@ -21,6 +22,7 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/TileItem.h" #include "minecraft/world/item/WeaponItem.h" #include "minecraft/world/level/Level.h" @@ -28,8 +30,6 @@ #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/Vec3.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/world/item/ItemInstance.h" MultiPlayerGameMode::MultiPlayerGameMode(Minecraft* minecraft, ClientConnection* connection) { diff --git a/targets/minecraft/client/multiplayer/MultiPlayerLevel.cpp b/targets/minecraft/client/multiplayer/MultiPlayerLevel.cpp index 817c13ca4..143a4d6d4 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerLevel.cpp +++ b/targets/minecraft/client/multiplayer/MultiPlayerLevel.cpp @@ -1,6 +1,7 @@ #include "MultiPlayerLevel.h" #include + #include #include #include @@ -25,8 +26,10 @@ #include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/network/packet/DisconnectPacket.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/ChunkPos.h" #include "minecraft/world/level/GameRules.h" +#include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" @@ -35,8 +38,6 @@ #include "minecraft/world/level/storage/SavedDataStorage.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/level/Level.h" class LevelSettings; class Scoreboard; diff --git a/targets/minecraft/client/multiplayer/MultiPlayerLevel.h b/targets/minecraft/client/multiplayer/MultiPlayerLevel.h index 7d7ee8aae..b5d9749a7 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerLevel.h +++ b/targets/minecraft/client/multiplayer/MultiPlayerLevel.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp b/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp index a2456db29..2376cefd8 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp +++ b/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp @@ -1,6 +1,7 @@ #include "MultiPlayerLocalPlayer.h" #include + #include #include "ClientConnection.h" @@ -28,11 +29,11 @@ #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/player/Player.h" class User; class ItemEntity; diff --git a/targets/minecraft/client/particle/BreakingItemParticle.cpp b/targets/minecraft/client/particle/BreakingItemParticle.cpp index c5134daf4..d38092799 100644 --- a/targets/minecraft/client/particle/BreakingItemParticle.cpp +++ b/targets/minecraft/client/particle/BreakingItemParticle.cpp @@ -1,12 +1,12 @@ #include "BreakingItemParticle.h" #include "minecraft/SharedConstants.h" +#include "minecraft/client/particle/Particle.h" +#include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/world/Icon.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/particle/Particle.h" -#include "minecraft/client/particle/ParticleEngine.h" class Level; class Textures; diff --git a/targets/minecraft/client/particle/BubbleParticle.cpp b/targets/minecraft/client/particle/BubbleParticle.cpp index b91105bfc..1676309a9 100644 --- a/targets/minecraft/client/particle/BubbleParticle.cpp +++ b/targets/minecraft/client/particle/BubbleParticle.cpp @@ -4,9 +4,9 @@ #include "java/JavaMath.h" #include "java/Random.h" +#include "minecraft/client/particle/Particle.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/client/particle/Particle.h" BubbleParticle::BubbleParticle(Level* level, double x, double y, double z, double xa, double ya, double za) diff --git a/targets/minecraft/client/particle/CritParticle.cpp b/targets/minecraft/client/particle/CritParticle.cpp index e9a406e96..bc36b8f81 100644 --- a/targets/minecraft/client/particle/CritParticle.cpp +++ b/targets/minecraft/client/particle/CritParticle.cpp @@ -1,12 +1,12 @@ #include "CritParticle.h" #include "java/Random.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/level/Level.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/client/particle/Particle.h" #include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/world/entity/Entity.h" +#include "minecraft/world/level/Level.h" +#include "minecraft/world/phys/AABB.h" void CritParticle::_init(Level* level, std::shared_ptr entity, ePARTICLE_TYPE type) { diff --git a/targets/minecraft/client/particle/DripParticle.cpp b/targets/minecraft/client/particle/DripParticle.cpp index eb44a52c7..74593834a 100644 --- a/targets/minecraft/client/particle/DripParticle.cpp +++ b/targets/minecraft/client/particle/DripParticle.cpp @@ -6,11 +6,11 @@ #include "Minecraft.Client/Common/src/Colours/ColourTable.h" #include "java/JavaMath.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/particle/Particle.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/LiquidTile.h" -#include "minecraft/client/particle/Particle.h" DripParticle::DripParticle(Level* level, double x, double y, double z, Material* material) diff --git a/targets/minecraft/client/particle/FireworksParticles.cpp b/targets/minecraft/client/particle/FireworksParticles.cpp index 5bf1b92a3..e0194f81a 100644 --- a/targets/minecraft/client/particle/FireworksParticles.cpp +++ b/targets/minecraft/client/particle/FireworksParticles.cpp @@ -1,6 +1,7 @@ #include "FireworksParticles.h" #include + #include #include #include @@ -8,6 +9,8 @@ #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 "minecraft/sounds/SoundTypes.h" #include "minecraft/world/entity/LivingEntity.h" @@ -16,8 +19,6 @@ #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" #include "nbt/Tag.h" -#include "minecraft/client/particle/Particle.h" -#include "minecraft/client/particle/ParticleEngine.h" FireworksParticles::FireworksStarter::FireworksStarter( Level* level, double x, double y, double z, double xd, double yd, double zd, diff --git a/targets/minecraft/client/particle/FootstepParticle.cpp b/targets/minecraft/client/particle/FootstepParticle.cpp index 37267ec9c..47c5c93a0 100644 --- a/targets/minecraft/client/particle/FootstepParticle.cpp +++ b/targets/minecraft/client/particle/FootstepParticle.cpp @@ -1,15 +1,16 @@ #include "FootstepParticle.h" #include + #include #include "4J_Render.h" +#include "minecraft/client/particle/Particle.h" +#include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/level/Level.h" -#include "minecraft/client/particle/Particle.h" -#include "minecraft/client/particle/ParticleEngine.h" ResourceLocation FootstepParticle::FOOTPRINT_LOCATION = ResourceLocation(TN_MISC_FOOTSTEP); diff --git a/targets/minecraft/client/particle/HugeExplosionParticle.cpp b/targets/minecraft/client/particle/HugeExplosionParticle.cpp index 6f4abc684..8f04fc776 100644 --- a/targets/minecraft/client/particle/HugeExplosionParticle.cpp +++ b/targets/minecraft/client/particle/HugeExplosionParticle.cpp @@ -8,11 +8,11 @@ #include "java/Random.h" #include "minecraft/client/Lighting.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 "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" -#include "minecraft/client/particle/Particle.h" -#include "minecraft/client/particle/ParticleEngine.h" class Level; diff --git a/targets/minecraft/client/particle/HugeExplosionSeedParticle.cpp b/targets/minecraft/client/particle/HugeExplosionSeedParticle.cpp index af2d15716..51a8b62f8 100644 --- a/targets/minecraft/client/particle/HugeExplosionSeedParticle.cpp +++ b/targets/minecraft/client/particle/HugeExplosionSeedParticle.cpp @@ -2,10 +2,10 @@ #include "java/Random.h" #include "minecraft/client/Minecraft.h" -#include "minecraft/core/particles/ParticleTypes.h" -#include "minecraft/world/level/Level.h" #include "minecraft/client/particle/Particle.h" #include "minecraft/client/particle/ParticleEngine.h" +#include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/world/level/Level.h" HugeExplosionSeedParticle::HugeExplosionSeedParticle(Level* level, double x, double y, double z, diff --git a/targets/minecraft/client/particle/LavaParticle.cpp b/targets/minecraft/client/particle/LavaParticle.cpp index 068903493..69a829634 100644 --- a/targets/minecraft/client/particle/LavaParticle.cpp +++ b/targets/minecraft/client/particle/LavaParticle.cpp @@ -2,9 +2,9 @@ #include "java/JavaMath.h" #include "java/Random.h" +#include "minecraft/client/particle/Particle.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/world/level/Level.h" -#include "minecraft/client/particle/Particle.h" LavaParticle::LavaParticle(Level* level, double x, double y, double z) : Particle(level, x, y, z, 0, 0, 0) { diff --git a/targets/minecraft/client/particle/Particle.cpp b/targets/minecraft/client/particle/Particle.cpp index 5461add1f..afa344702 100644 --- a/targets/minecraft/client/particle/Particle.cpp +++ b/targets/minecraft/client/particle/Particle.cpp @@ -1,6 +1,7 @@ #include "Particle.h" #include + #include #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" @@ -8,9 +9,9 @@ #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/world/Icon.h" -#include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/world/entity/Entity.h" class Level; diff --git a/targets/minecraft/client/particle/PlayerCloudParticle.cpp b/targets/minecraft/client/particle/PlayerCloudParticle.cpp index d25c3cc26..073df01a4 100644 --- a/targets/minecraft/client/particle/PlayerCloudParticle.cpp +++ b/targets/minecraft/client/particle/PlayerCloudParticle.cpp @@ -3,10 +3,10 @@ #include #include "java/JavaMath.h" +#include "minecraft/client/particle/Particle.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/client/particle/Particle.h" PlayerCloudParticle::PlayerCloudParticle(Level* level, double x, double y, double z, double xa, double ya, diff --git a/targets/minecraft/client/particle/SuspendedParticle.cpp b/targets/minecraft/client/particle/SuspendedParticle.cpp index 0178f5388..905bc20f0 100644 --- a/targets/minecraft/client/particle/SuspendedParticle.cpp +++ b/targets/minecraft/client/particle/SuspendedParticle.cpp @@ -7,9 +7,9 @@ #include "java/JavaMath.h" #include "java/Random.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/particle/Particle.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/client/particle/Particle.h" SuspendedParticle::SuspendedParticle(Level* level, double x, double y, double z, double xa, double ya, double za) diff --git a/targets/minecraft/client/particle/TakeAnimationParticle.cpp b/targets/minecraft/client/particle/TakeAnimationParticle.cpp index e77a5ccca..3b03b53c1 100644 --- a/targets/minecraft/client/particle/TakeAnimationParticle.cpp +++ b/targets/minecraft/client/particle/TakeAnimationParticle.cpp @@ -1,15 +1,16 @@ #include "TakeAnimationParticle.h" #include + #include #include "4J_Render.h" #include "minecraft/SharedConstants.h" +#include "minecraft/client/particle/Particle.h" +#include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/Level.h" -#include "minecraft/client/particle/Particle.h" -#include "minecraft/client/particle/ParticleEngine.h" TakeAnimationParticle::TakeAnimationParticle(Level* level, std::shared_ptr item, diff --git a/targets/minecraft/client/particle/TerrainParticle.cpp b/targets/minecraft/client/particle/TerrainParticle.cpp index bd2eb9667..922788805 100644 --- a/targets/minecraft/client/particle/TerrainParticle.cpp +++ b/targets/minecraft/client/particle/TerrainParticle.cpp @@ -1,13 +1,13 @@ #include "TerrainParticle.h" #include "minecraft/SharedConstants.h" +#include "minecraft/client/particle/Particle.h" +#include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/world/Icon.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/GrassTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/particle/Particle.h" -#include "minecraft/client/particle/ParticleEngine.h" class Textures; diff --git a/targets/minecraft/client/particle/WaterDropParticle.cpp b/targets/minecraft/client/particle/WaterDropParticle.cpp index d12c9b504..1ec95239c 100644 --- a/targets/minecraft/client/particle/WaterDropParticle.cpp +++ b/targets/minecraft/client/particle/WaterDropParticle.cpp @@ -4,10 +4,10 @@ #include "java/JavaMath.h" #include "java/Random.h" +#include "minecraft/client/particle/Particle.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/LiquidTile.h" -#include "minecraft/client/particle/Particle.h" WaterDropParticle::WaterDropParticle(Level* level, double x, double y, double z) : Particle(level, x, y, z, 0, 0, 0) { diff --git a/targets/minecraft/client/player/LocalPlayer.cpp b/targets/minecraft/client/player/LocalPlayer.cpp index e8d6fc301..bb86e4a36 100644 --- a/targets/minecraft/client/player/LocalPlayer.cpp +++ b/targets/minecraft/client/player/LocalPlayer.cpp @@ -1,10 +1,11 @@ #include "LocalPlayer.h" #include + +#include #include #include #include -#include #include "Input.h" #include "java/Random.h" @@ -24,9 +25,10 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/tile/Tile.h" // 4J Stu - Added for tutorial callbacks -#include "4J_Render.h" +#include "4J.Common/4J_InputActions.h" #include "4J_Input.h" #include "4J_Profile.h" +#include "4J_Render.h" #include "Minecraft.Client/Common/App_structs.h" #include "Minecraft.Client/Common/src/Audio/SoundEngine.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" @@ -36,6 +38,8 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Linux_UIController.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" +#include "PlatformTypes.h" +#include "Pos.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Gui.h" @@ -53,12 +57,14 @@ #include "minecraft/client/gui/inventory/TextEditScreen.h" #include "minecraft/client/gui/inventory/TrapScreen.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" +#include "minecraft/commands/CommandsEnum.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/Achievement.h" #include "minecraft/stats/CommonStats.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/stats/Stat.h" +#include "minecraft/util/SmoothFloat.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" @@ -66,6 +72,7 @@ #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/food/FoodConstants.h" #include "minecraft/world/food/FoodData.h" #include "minecraft/world/item/BowItem.h" @@ -77,12 +84,6 @@ #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" -#include "4J.Common/4J_InputActions.h" -#include "PlatformTypes.h" -#include "Pos.h" -#include "minecraft/commands/CommandsEnum.h" -#include "minecraft/util/SmoothFloat.h" -#include "minecraft/world/entity/player/Player.h" LocalPlayer::LocalPlayer(Minecraft* minecraft, Level* level, User* user, int dimension) diff --git a/targets/minecraft/client/player/RemotePlayer.cpp b/targets/minecraft/client/player/RemotePlayer.cpp index e08bb84bc..7ec548912 100644 --- a/targets/minecraft/client/player/RemotePlayer.cpp +++ b/targets/minecraft/client/player/RemotePlayer.cpp @@ -1,15 +1,15 @@ #include "RemotePlayer.h" +#include #include #include -#include #include "Minecraft.Client/Linux/Linux_App.h" +#include "Pos.h" #include "minecraft/world/entity/player/Inventory.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" -#include "Pos.h" -#include "minecraft/world/entity/player/Player.h" class Level; diff --git a/targets/minecraft/client/renderer/Chunk.cpp b/targets/minecraft/client/renderer/Chunk.cpp index 5c30650b9..6669a2406 100644 --- a/targets/minecraft/client/renderer/Chunk.cpp +++ b/targets/minecraft/client/renderer/Chunk.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -13,6 +14,7 @@ #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "Minecraft.Client/include/FrameProfiler.h" #include "TileRenderer.h" +#include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/culling/Culler.h" #include "minecraft/client/renderer/tileentity/TileEntityRenderDispatcher.h" #include "minecraft/world/entity/Entity.h" @@ -22,7 +24,6 @@ #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "minecraft/client/renderer/Tesselator.h" #include "minecraft/world/phys/AABB.h" int Chunk::updates = 0; diff --git a/targets/minecraft/client/renderer/Chunk.h b/targets/minecraft/client/renderer/Chunk.h index d56a75a2a..d54b21ad2 100644 --- a/targets/minecraft/client/renderer/Chunk.h +++ b/targets/minecraft/client/renderer/Chunk.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/client/renderer/GameRenderer.cpp b/targets/minecraft/client/renderer/GameRenderer.cpp index 67809b99b..0a09ab28d 100644 --- a/targets/minecraft/client/renderer/GameRenderer.cpp +++ b/targets/minecraft/client/renderer/GameRenderer.cpp @@ -1,13 +1,14 @@ #include "GameRenderer.h" #include + #include #include #include #include "4J.Common/4J_Compat.h" -#include "4J_Render.h" #include "4J_Input.h" +#include "4J_Render.h" #include "BossMobGuiInfo.h" #include "Chunk.h" #include "ItemInHandRenderer.h" @@ -22,6 +23,7 @@ #include "Minecraft.Client/include/stubs.h" #include "Tesselator.h" #include "console_helpers/compression.h" +#include "gl3_loader.h" #include "java/Class.h" #include "java/FloatBuffer.h" #include "java/JavaMath.h" @@ -46,6 +48,7 @@ #include "minecraft/client/particle/SmokeParticle.h" #include "minecraft/client/particle/WaterDropParticle.h" #include "minecraft/client/player/LocalPlayer.h" +#include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/culling/Culler.h" #include "minecraft/client/renderer/culling/Frustum.h" #include "minecraft/client/renderer/culling/FrustumCuller.h" @@ -78,8 +81,6 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/client/renderer/Textures.h" -#include "gl3_loader.h" #include "minecraft/world/phys/Vec3.h" bool GameRenderer::anaglyph3d = false; diff --git a/targets/minecraft/client/renderer/GameRenderer.h b/targets/minecraft/client/renderer/GameRenderer.h index 8ebdd5784..4d73dd2ba 100644 --- a/targets/minecraft/client/renderer/GameRenderer.h +++ b/targets/minecraft/client/renderer/GameRenderer.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/client/renderer/ItemInHandRenderer.cpp b/targets/minecraft/client/renderer/ItemInHandRenderer.cpp index 39060e34f..68b81d660 100644 --- a/targets/minecraft/client/renderer/ItemInHandRenderer.cpp +++ b/targets/minecraft/client/renderer/ItemInHandRenderer.cpp @@ -1,6 +1,7 @@ #include "ItemInHandRenderer.h" #include + #include #include #include diff --git a/targets/minecraft/client/renderer/LevelRenderer.cpp b/targets/minecraft/client/renderer/LevelRenderer.cpp index 7d380fe18..20b3eedd9 100644 --- a/targets/minecraft/client/renderer/LevelRenderer.cpp +++ b/targets/minecraft/client/renderer/LevelRenderer.cpp @@ -4,6 +4,7 @@ #include #include #include + #include #include #include @@ -13,8 +14,8 @@ #include #include "4J.Common/4J_Compat.h" -#include "4J_Render.h" #include "4J_Input.h" +#include "4J_Render.h" #include "Chunk.h" #include "GameRenderer.h" #include "Minecraft.Client/Common/App_enums.h" @@ -67,6 +68,8 @@ #include "minecraft/client/particle/SuspendedTownParticle.h" #include "minecraft/client/particle/TerrainParticle.h" #include "minecraft/client/player/LocalPlayer.h" +#include "minecraft/client/renderer/OffsettedRenderList.h" +#include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" #include "minecraft/client/renderer/culling/Culler.h" #include "minecraft/client/renderer/culling/Frustum.h" @@ -91,6 +94,7 @@ #include "minecraft/world/item/PotionItem.h" #include "minecraft/world/item/RecordingItem.h" #include "minecraft/world/level/BlockDestructionProgress.h" +#include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" @@ -100,12 +104,9 @@ #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" -#include "minecraft/client/renderer/OffsettedRenderList.h" -#include "minecraft/client/renderer/Textures.h" -#include "minecraft/world/level/Level.h" -#include "minecraft/world/phys/AABB.h" class Icon; class ItemInstance; diff --git a/targets/minecraft/client/renderer/LevelRenderer.h b/targets/minecraft/client/renderer/LevelRenderer.h index 0c4fbbbdf..9265bed75 100644 --- a/targets/minecraft/client/renderer/LevelRenderer.h +++ b/targets/minecraft/client/renderer/LevelRenderer.h @@ -23,6 +23,7 @@ class ResourceLocation; #endif #include #include + #include #include #include diff --git a/targets/minecraft/client/renderer/Tesselator.cpp b/targets/minecraft/client/renderer/Tesselator.cpp index b5552161b..afb0903dd 100644 --- a/targets/minecraft/client/renderer/Tesselator.cpp +++ b/targets/minecraft/client/renderer/Tesselator.cpp @@ -1,6 +1,7 @@ #include "Tesselator.h" #include + #include #include "4J_Render.h" diff --git a/targets/minecraft/client/renderer/Tesselator.h b/targets/minecraft/client/renderer/Tesselator.h index 465fb1707..e419a1599 100644 --- a/targets/minecraft/client/renderer/Tesselator.h +++ b/targets/minecraft/client/renderer/Tesselator.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/client/renderer/Textures.cpp b/targets/minecraft/client/renderer/Textures.cpp index 963c3b76e..741e22845 100644 --- a/targets/minecraft/client/renderer/Textures.cpp +++ b/targets/minecraft/client/renderer/Textures.cpp @@ -1,11 +1,13 @@ #include "Textures.h" #include + #include #include #include #include +#include "4J_Render.h" #include "HttpTexture.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/include/BufferedImage.h" @@ -13,6 +15,7 @@ #include "Minecraft.Client/include/MemTextureProcessor.h" #include "Minecraft.Client/include/MobSkinMemTextureProcessor.h" #include "console_helpers/StringHelpers.h" +#include "gl3_loader.h" #include "java/Buffer.h" #include "java/ByteBuffer.h" #include "minecraft/client/MemoryTracker.h" @@ -27,8 +30,6 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/item/ItemInstance.h" -#include "4J_Render.h" -#include "gl3_loader.h" // Linux/PC port: disable mipmapping globally so textures are always sampled // from the full-resolution level 0 with GL_NEAREST, giving pixel-crisp diff --git a/targets/minecraft/client/renderer/TileRenderer.cpp b/targets/minecraft/client/renderer/TileRenderer.cpp index 4b6b63aaf..13af5da2c 100644 --- a/targets/minecraft/client/renderer/TileRenderer.cpp +++ b/targets/minecraft/client/renderer/TileRenderer.cpp @@ -4,6 +4,7 @@ #include #include #include + #include #include #include @@ -19,6 +20,7 @@ #include "minecraft/Facing.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" +#include "minecraft/client/renderer/Textures.h" #include "minecraft/world/Icon.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" @@ -63,7 +65,6 @@ #include "minecraft/world/level/tile/piston/PistonBaseTile.h" #include "minecraft/world/level/tile/piston/PistonExtensionTile.h" #include "minecraft/world/phys/Vec3.h" -#include "minecraft/client/renderer/Textures.h" bool TileRenderer::fancy = true; diff --git a/targets/minecraft/client/renderer/culling/FrustumCuller.cpp b/targets/minecraft/client/renderer/culling/FrustumCuller.cpp index 0181de56e..60b8a3d42 100644 --- a/targets/minecraft/client/renderer/culling/FrustumCuller.cpp +++ b/targets/minecraft/client/renderer/culling/FrustumCuller.cpp @@ -1,8 +1,8 @@ #include "FrustumCuller.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/client/renderer/culling/Frustum.h" #include "minecraft/client/renderer/culling/FrustumData.h" +#include "minecraft/world/phys/AABB.h" FrustumCuller::FrustumCuller() { frustum = Frustum::getFrustum(); } diff --git a/targets/minecraft/client/renderer/entity/ArrowRenderer.cpp b/targets/minecraft/client/renderer/entity/ArrowRenderer.cpp index 86afe8d78..c9c77c1ba 100644 --- a/targets/minecraft/client/renderer/entity/ArrowRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/ArrowRenderer.cpp @@ -1,15 +1,16 @@ #include "ArrowRenderer.h" #include + #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/projectile/Arrow.h" -#include "gl3_loader.h" ResourceLocation ArrowRenderer::ARROW_LOCATION = ResourceLocation(TN_ITEM_ARROWS); diff --git a/targets/minecraft/client/renderer/entity/BatRenderer.cpp b/targets/minecraft/client/renderer/entity/BatRenderer.cpp index 42fa33e27..2993148fa 100644 --- a/targets/minecraft/client/renderer/entity/BatRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/BatRenderer.cpp @@ -7,10 +7,10 @@ #include "minecraft/client/model/BatModel.h" #include "minecraft/client/model/geom/Model.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/ambient/Bat.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" ResourceLocation BatRenderer::BAT_LOCATION = ResourceLocation(TN_MOB_BAT); diff --git a/targets/minecraft/client/renderer/entity/BlazeRenderer.cpp b/targets/minecraft/client/renderer/entity/BlazeRenderer.cpp index df0576d6e..7fc9b7af3 100644 --- a/targets/minecraft/client/renderer/entity/BlazeRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/BlazeRenderer.cpp @@ -4,10 +4,10 @@ #include "minecraft/client/model/BlazeModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/monster/Blaze.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" ResourceLocation BlazeRenderer::BLAZE_LOCATION = ResourceLocation(TN_MOB_BLAZE); diff --git a/targets/minecraft/client/renderer/entity/BoatRenderer.cpp b/targets/minecraft/client/renderer/entity/BoatRenderer.cpp index 167890e0b..095db96e1 100644 --- a/targets/minecraft/client/renderer/entity/BoatRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/BoatRenderer.cpp @@ -1,16 +1,17 @@ #include "BoatRenderer.h" #include + #include #include "4J_Render.h" #include "minecraft/client/model/BoatModel.h" #include "minecraft/client/model/geom/Model.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/item/Boat.h" -#include "minecraft/client/renderer/entity/EntityRenderer.h" ResourceLocation BoatRenderer::BOAT_LOCATION = ResourceLocation(TN_ITEM_BOAT); diff --git a/targets/minecraft/client/renderer/entity/CaveSpiderRenderer.cpp b/targets/minecraft/client/renderer/entity/CaveSpiderRenderer.cpp index 53f178199..17f5b6ff3 100644 --- a/targets/minecraft/client/renderer/entity/CaveSpiderRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/CaveSpiderRenderer.cpp @@ -4,8 +4,8 @@ #include "4J_Render.h" #include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/client/renderer/entity/SpiderRenderer.h" +#include "minecraft/client/resources/ResourceLocation.h" ResourceLocation CaveSpiderRenderer::CAVE_SPIDER_LOCATION = ResourceLocation(TN_MOB_CAVE_SPIDER); diff --git a/targets/minecraft/client/renderer/entity/ChickenRenderer.cpp b/targets/minecraft/client/renderer/entity/ChickenRenderer.cpp index f4ead7a71..b22ba411f 100644 --- a/targets/minecraft/client/renderer/entity/ChickenRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/ChickenRenderer.cpp @@ -1,13 +1,14 @@ #include "ChickenRenderer.h" #include + #include #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Chicken.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/CowRenderer.cpp b/targets/minecraft/client/renderer/entity/CowRenderer.cpp index 67ebd855d..b76e9e406 100644 --- a/targets/minecraft/client/renderer/entity/CowRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/CowRenderer.cpp @@ -3,8 +3,8 @@ #include #include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/client/renderer/entity/MobRenderer.h" +#include "minecraft/client/resources/ResourceLocation.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/CreeperRenderer.cpp b/targets/minecraft/client/renderer/entity/CreeperRenderer.cpp index 09b87bebb..e07be7d6a 100644 --- a/targets/minecraft/client/renderer/entity/CreeperRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/CreeperRenderer.cpp @@ -1,16 +1,17 @@ #include "CreeperRenderer.h" #include + #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/CreeperModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/Creeper.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" -#include "gl3_loader.h" ResourceLocation CreeperRenderer::POWER_LOCATION = ResourceLocation(TN_POWERED_CREEPER); diff --git a/targets/minecraft/client/renderer/entity/EnderCrystalRenderer.cpp b/targets/minecraft/client/renderer/entity/EnderCrystalRenderer.cpp index 15f299aee..d5cf080fc 100644 --- a/targets/minecraft/client/renderer/entity/EnderCrystalRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/EnderCrystalRenderer.cpp @@ -3,8 +3,8 @@ #include #include -#include "minecraft/client/model/dragon/EnderCrystalModel.h" #include "4J_Render.h" +#include "minecraft/client/model/dragon/EnderCrystalModel.h" #include "minecraft/client/model/geom/Model.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" diff --git a/targets/minecraft/client/renderer/entity/EnderDragonRenderer.cpp b/targets/minecraft/client/renderer/entity/EnderDragonRenderer.cpp index 8cfc64ea8..0d3593e53 100644 --- a/targets/minecraft/client/renderer/entity/EnderDragonRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/EnderDragonRenderer.cpp @@ -5,18 +5,18 @@ #include #include -#include "minecraft/client/Lighting.h" -#include "minecraft/client/model/dragon/DragonModel.h" -#include "minecraft/client/renderer/BossMobGuiInfo.h" -#include "minecraft/client/renderer/Tesselator.h" #include "4J_Render.h" #include "SharedConstants.h" +#include "gl3_loader.h" +#include "java/Random.h" +#include "minecraft/client/Lighting.h" +#include "minecraft/client/model/dragon/DragonModel.h" #include "minecraft/client/model/geom/Model.h" +#include "minecraft/client/renderer/BossMobGuiInfo.h" +#include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" -#include "gl3_loader.h" -#include "java/Random.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/boss/enderdragon/EnderCrystal.h" diff --git a/targets/minecraft/client/renderer/entity/EndermanRenderer.cpp b/targets/minecraft/client/renderer/entity/EndermanRenderer.cpp index 48ab673c4..165d9bed1 100644 --- a/targets/minecraft/client/renderer/entity/EndermanRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/EndermanRenderer.cpp @@ -3,18 +3,18 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/model/EndermanModel.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/EnderMan.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" -#include "gl3_loader.h" ResourceLocation EndermanRenderer::ENDERMAN_EYES_LOCATION = ResourceLocation(TN_MOB_ENDERMAN_EYES); diff --git a/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.cpp b/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.cpp index 12c1c113f..623586ae6 100644 --- a/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.cpp +++ b/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.cpp @@ -1,9 +1,11 @@ #include "EntityRenderDispatcher.h" #include + #include #include +#include "4J_Render.h" #include "ArrowRenderer.h" #include "BatRenderer.h" #include "BlazeRenderer.h" @@ -32,12 +34,14 @@ #include "LightningBoltRenderer.h" #include "MinecartRenderer.h" #include "MinecartSpawnerRenderer.h" +#include "Minecraft.Client/Linux/Linux_App.h" #include "MobRenderer.h" #include "MushroomCowRenderer.h" #include "OcelotRenderer.h" #include "PaintingRenderer.h" #include "PigRenderer.h" #include "PlayerRenderer.h" +#include "SharedConstants.h" #include "SheepRenderer.h" #include "SilverfishRenderer.h" #include "SkeletonRenderer.h" @@ -54,6 +58,7 @@ #include "WitherSkullRenderer.h" #include "WolfRenderer.h" #include "ZombieRenderer.h" +#include "gl3_loader.h" #include "minecraft/client/model/ChickenModel.h" #include "minecraft/client/model/CowModel.h" #include "minecraft/client/model/HumanoidModel.h" @@ -65,12 +70,8 @@ #include "minecraft/client/model/SlimeModel.h" #include "minecraft/client/model/SquidModel.h" #include "minecraft/client/model/WolfModel.h" -#include "4J_Render.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "SharedConstants.h" #include "minecraft/client/model/ZombieModel.h" #include "minecraft/client/renderer/Tesselator.h" -#include "gl3_loader.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/player/Player.h" diff --git a/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.h b/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.h index a98758fff..7b9db82ba 100644 --- a/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.h +++ b/targets/minecraft/client/renderer/entity/EntityRenderDispatcher.h @@ -3,9 +3,9 @@ #include #include "EntityRenderer.h" +#include "java/Class.h" #include "java/JavaIntHash.h" #include "minecraft/world/entity/Entity.h" -#include "java/Class.h" class font; class Entity; diff --git a/targets/minecraft/client/renderer/entity/EntityRenderer.cpp b/targets/minecraft/client/renderer/entity/EntityRenderer.cpp index b21647dbc..f0d9fd72c 100644 --- a/targets/minecraft/client/renderer/entity/EntityRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/EntityRenderer.cpp @@ -4,6 +4,7 @@ #include "4J_Render.h" #include "EntityRenderDispatcher.h" +#include "gl3_loader.h" #include "java/Class.h" #include "minecraft/client/Options.h" #include "minecraft/client/renderer/Tesselator.h" @@ -19,7 +20,6 @@ #include "minecraft/world/level/tile/FireTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "gl3_loader.h" ResourceLocation EntityRenderer::SHADOW_LOCATION = ResourceLocation(TN__CLAMP__MISC_SHADOW); diff --git a/targets/minecraft/client/renderer/entity/ExperienceOrbRenderer.cpp b/targets/minecraft/client/renderer/entity/ExperienceOrbRenderer.cpp index 8b5d84254..3b1df72c2 100644 --- a/targets/minecraft/client/renderer/entity/ExperienceOrbRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/ExperienceOrbRenderer.cpp @@ -1,18 +1,19 @@ #include "ExperienceOrbRenderer.h" #include + #include #include #include "4J_Render.h" #include "EntityRenderDispatcher.h" +#include "gl3_loader.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/ExperienceOrb.h" -#include "gl3_loader.h" ResourceLocation ExperienceOrbRenderer::XP_ORB_LOCATION = ResourceLocation(TN_ITEM_EXPERIENCE_ORB); diff --git a/targets/minecraft/client/renderer/entity/FallingTileRenderer.cpp b/targets/minecraft/client/renderer/entity/FallingTileRenderer.cpp index 3b2cfd919..5a8c29dfe 100644 --- a/targets/minecraft/client/renderer/entity/FallingTileRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/FallingTileRenderer.cpp @@ -1,19 +1,19 @@ #include "FallingTileRenderer.h" -#include #include +#include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/item/FallingTile.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/AnvilTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/EntityRenderer.h" -#include "gl3_loader.h" FallingTileRenderer::FallingTileRenderer() : EntityRenderer() { tileRenderer = new TileRenderer(); diff --git a/targets/minecraft/client/renderer/entity/FireballRenderer.cpp b/targets/minecraft/client/renderer/entity/FireballRenderer.cpp index 5786b8162..19228c4fb 100644 --- a/targets/minecraft/client/renderer/entity/FireballRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/FireballRenderer.cpp @@ -4,6 +4,7 @@ #include "4J_Render.h" #include "EntityRenderDispatcher.h" +#include "gl3_loader.h" #include "java/Class.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" @@ -14,7 +15,6 @@ #include "minecraft/world/level/tile/FireTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "gl3_loader.h" FireballRenderer::FireballRenderer(float scale) { this->scale = scale; } diff --git a/targets/minecraft/client/renderer/entity/FishingHookRenderer.cpp b/targets/minecraft/client/renderer/entity/FishingHookRenderer.cpp index adba1c66f..bd5c18bff 100644 --- a/targets/minecraft/client/renderer/entity/FishingHookRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/FishingHookRenderer.cpp @@ -6,6 +6,7 @@ #include "4J_Render.h" #include "EntityRenderDispatcher.h" +#include "gl3_loader.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/renderer/Tesselator.h" @@ -15,7 +16,6 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/FishingHook.h" #include "minecraft/world/phys/Vec3.h" -#include "gl3_loader.h" ResourceLocation FishingHookRenderer::PARTICLE_LOCATION = ResourceLocation(TN_PARTICLES); diff --git a/targets/minecraft/client/renderer/entity/GhastRenderer.cpp b/targets/minecraft/client/renderer/entity/GhastRenderer.cpp index 7d0a4c5f6..67ec31533 100644 --- a/targets/minecraft/client/renderer/entity/GhastRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/GhastRenderer.cpp @@ -5,11 +5,11 @@ #include "4J_Render.h" #include "minecraft/client/model/GhastModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/Ghast.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" ResourceLocation GhastRenderer::GHAST_LOCATION = ResourceLocation(TN_MOB_GHAST); ResourceLocation GhastRenderer::GHAST_SHOOTING_LOCATION = diff --git a/targets/minecraft/client/renderer/entity/GiantMobRenderer.cpp b/targets/minecraft/client/renderer/entity/GiantMobRenderer.cpp index 5db21a5c7..5f14fed29 100644 --- a/targets/minecraft/client/renderer/entity/GiantMobRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/GiantMobRenderer.cpp @@ -4,8 +4,8 @@ #include "4J_Render.h" #include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/client/renderer/entity/MobRenderer.h" +#include "minecraft/client/resources/ResourceLocation.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/HorseRenderer.cpp b/targets/minecraft/client/renderer/entity/HorseRenderer.cpp index 59f13866e..b2a4eb9fb 100644 --- a/targets/minecraft/client/renderer/entity/HorseRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/HorseRenderer.cpp @@ -7,11 +7,11 @@ #include "MobRenderer.h" #include "minecraft/client/model/geom/Model.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/EntityHorse.h" -#include "minecraft/client/renderer/entity/EntityRenderer.h" ResourceLocation HorseRenderer::HORSE_LOCATION = ResourceLocation(TN_MOB_HORSE_WHITE); diff --git a/targets/minecraft/client/renderer/entity/HumanoidMobRenderer.cpp b/targets/minecraft/client/renderer/entity/HumanoidMobRenderer.cpp index 50e061b88..b41b53242 100644 --- a/targets/minecraft/client/renderer/entity/HumanoidMobRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/HumanoidMobRenderer.cpp @@ -13,6 +13,7 @@ #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/renderer/ItemInHandRenderer.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/renderer/tileentity/SkullTileRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" @@ -22,7 +23,6 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" const std::wstring HumanoidMobRenderer::MATERIAL_NAMES[5] = { L"cloth", L"chain", L"iron", L"diamond", L"gold"}; diff --git a/targets/minecraft/client/renderer/entity/ItemRenderer.cpp b/targets/minecraft/client/renderer/entity/ItemRenderer.cpp index f6a0ba2f5..b8b604e9b 100644 --- a/targets/minecraft/client/renderer/entity/ItemRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/ItemRenderer.cpp @@ -1,11 +1,13 @@ #include "ItemRenderer.h" #include + #include #include "4J_Render.h" #include "EntityRenderDispatcher.h" #include "console_helpers/StringHelpers.h" +#include "gl3_loader.h" #include "java/JavaMath.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" @@ -17,6 +19,7 @@ #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" #include "minecraft/util/Mth.h" #include "minecraft/world/Icon.h" @@ -25,8 +28,6 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/EntityRenderer.h" -#include "gl3_loader.h" class ResourceLocation; diff --git a/targets/minecraft/client/renderer/entity/ItemSpriteRenderer.cpp b/targets/minecraft/client/renderer/entity/ItemSpriteRenderer.cpp index 2e9116cdc..816b8bca3 100644 --- a/targets/minecraft/client/renderer/entity/ItemSpriteRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/ItemSpriteRenderer.cpp @@ -4,7 +4,9 @@ #include "4J_Render.h" #include "EntityRenderDispatcher.h" +#include "gl3_loader.h" #include "minecraft/client/renderer/Tesselator.h" +#include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" #include "minecraft/world/Icon.h" #include "minecraft/world/entity/Entity.h" @@ -12,8 +14,6 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/item/PotionItem.h" #include "minecraft/world/item/alchemy/PotionBrewing.h" -#include "minecraft/client/renderer/entity/EntityRenderer.h" -#include "gl3_loader.h" ItemSpriteRenderer::ItemSpriteRenderer(Item* sourceItem, int sourceItemAuxValue /*= 0*/) diff --git a/targets/minecraft/client/renderer/entity/LavaSlimeRenderer.cpp b/targets/minecraft/client/renderer/entity/LavaSlimeRenderer.cpp index 7e1b108d3..1ba2909b9 100644 --- a/targets/minecraft/client/renderer/entity/LavaSlimeRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/LavaSlimeRenderer.cpp @@ -5,10 +5,10 @@ #include "4J_Render.h" #include "minecraft/client/model/LavaSlimeModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/LavaSlime.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" ResourceLocation LavaSlimeRenderer::MAGMACUBE_LOCATION = ResourceLocation(TN_MOB_LAVA); diff --git a/targets/minecraft/client/renderer/entity/LeashKnotRenderer.cpp b/targets/minecraft/client/renderer/entity/LeashKnotRenderer.cpp index 4aa6af43a..b3cc74500 100644 --- a/targets/minecraft/client/renderer/entity/LeashKnotRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/LeashKnotRenderer.cpp @@ -3,11 +3,11 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/LeashKnotModel.h" #include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/client/renderer/entity/EntityRenderer.h" -#include "gl3_loader.h" +#include "minecraft/client/resources/ResourceLocation.h" ResourceLocation LeashKnotRenderer::KNOT_LOCATION = ResourceLocation(TN_ITEM_LEASHKNOT); diff --git a/targets/minecraft/client/renderer/entity/LightningBoltRenderer.cpp b/targets/minecraft/client/renderer/entity/LightningBoltRenderer.cpp index 0a62007a2..81ce49fa6 100644 --- a/targets/minecraft/client/renderer/entity/LightningBoltRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/LightningBoltRenderer.cpp @@ -3,11 +3,11 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "java/Random.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/global/LightningBolt.h" -#include "gl3_loader.h" void LightningBoltRenderer::render(std::shared_ptr _bolt, double x, double y, double z, float rot, float a) { diff --git a/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp b/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp index e273fb2df..1f5ce57ad 100644 --- a/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp @@ -8,6 +8,7 @@ #include "EntityRenderDispatcher.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "gl3_loader.h" #include "java/Class.h" #include "java/Random.h" #include "minecraft/client/Lighting.h" @@ -25,7 +26,6 @@ #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/Arrow.h" -#include "gl3_loader.h" ResourceLocation LivingEntityRenderer::ENCHANT_GLINT_LOCATION = ResourceLocation(TN__BLUR__MISC_GLINT); diff --git a/targets/minecraft/client/renderer/entity/MinecartSpawnerRenderer.cpp b/targets/minecraft/client/renderer/entity/MinecartSpawnerRenderer.cpp index 51862bca0..a16c05f23 100644 --- a/targets/minecraft/client/renderer/entity/MinecartSpawnerRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/MinecartSpawnerRenderer.cpp @@ -1,9 +1,9 @@ #include "MinecartSpawnerRenderer.h" +#include "minecraft/client/renderer/entity/MinecartRenderer.h" #include "minecraft/client/renderer/tileentity/MobSpawnerRenderer.h" #include "minecraft/world/entity/item/MinecartSpawner.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/MinecartRenderer.h" void MinecartSpawnerRenderer::renderMinecartContents( std::shared_ptr cart, float a, Tile* tile, int tileData) { diff --git a/targets/minecraft/client/renderer/entity/MobRenderer.cpp b/targets/minecraft/client/renderer/entity/MobRenderer.cpp index b861d022b..9e8fe77a4 100644 --- a/targets/minecraft/client/renderer/entity/MobRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/MobRenderer.cpp @@ -1,6 +1,7 @@ #include "MobRenderer.h" #include + #include #include "4J_Render.h" @@ -8,6 +9,7 @@ #include "LivingEntityRenderer.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" +#include "gl3_loader.h" #include "java/Class.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/renderer/Tesselator.h" @@ -15,7 +17,6 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/Mob.h" -#include "gl3_loader.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/MushroomCowRenderer.cpp b/targets/minecraft/client/renderer/entity/MushroomCowRenderer.cpp index bfc46ece4..c02c1a93c 100644 --- a/targets/minecraft/client/renderer/entity/MushroomCowRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/MushroomCowRenderer.cpp @@ -3,18 +3,18 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/QuadrupedModel.h" #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/MushroomCow.h" #include "minecraft/world/level/tile/PlantTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" -#include "gl3_loader.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/OcelotRenderer.cpp b/targets/minecraft/client/renderer/entity/OcelotRenderer.cpp index c70fbe91a..65ae20ea3 100644 --- a/targets/minecraft/client/renderer/entity/OcelotRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/OcelotRenderer.cpp @@ -4,11 +4,11 @@ #include "4J_Render.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Ocelot.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/PaintingRenderer.cpp b/targets/minecraft/client/renderer/entity/PaintingRenderer.cpp index d73d275d9..6829c4092 100644 --- a/targets/minecraft/client/renderer/entity/PaintingRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/PaintingRenderer.cpp @@ -4,6 +4,7 @@ #include "4J_Render.h" #include "EntityRenderDispatcher.h" +#include "gl3_loader.h" #include "java/Random.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" @@ -11,7 +12,6 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/Painting.h" #include "minecraft/world/level/Level.h" -#include "gl3_loader.h" ResourceLocation PaintingRenderer::PAINTING_LOCATION(TN_ART_KZ); diff --git a/targets/minecraft/client/renderer/entity/PigRenderer.cpp b/targets/minecraft/client/renderer/entity/PigRenderer.cpp index 3b96d70ac..2fb775b4d 100644 --- a/targets/minecraft/client/renderer/entity/PigRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/PigRenderer.cpp @@ -3,10 +3,10 @@ #include #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Pig.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp b/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp index e636c06b8..f20375afc 100644 --- a/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp @@ -20,6 +20,7 @@ #include "minecraft/client/renderer/ItemInHandRenderer.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/client/renderer/tileentity/SkullTileRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" @@ -33,7 +34,6 @@ #include "minecraft/world/item/UseAnim.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" -#include "minecraft/client/renderer/entity/EntityRenderer.h" const unsigned int PlayerRenderer::s_nametagColors[MINECRAFT_NET_MAX_PLAYERS] = { diff --git a/targets/minecraft/client/renderer/entity/PlayerRenderer.h b/targets/minecraft/client/renderer/entity/PlayerRenderer.h index 211120f6e..2b645fc7e 100644 --- a/targets/minecraft/client/renderer/entity/PlayerRenderer.h +++ b/targets/minecraft/client/renderer/entity/PlayerRenderer.h @@ -8,7 +8,6 @@ #include "MobRenderer.h" #include "minecraft/client/renderer/entity/LivingEntityRenderer.h" #include "minecraft/world/entity/player/Player.h" -#include "minecraft/client/renderer/entity/LivingEntityRenderer.h" class HumanoidModel; class LivingEntity; diff --git a/targets/minecraft/client/renderer/entity/SheepRenderer.cpp b/targets/minecraft/client/renderer/entity/SheepRenderer.cpp index 2b13d9592..4027fc445 100644 --- a/targets/minecraft/client/renderer/entity/SheepRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/SheepRenderer.cpp @@ -8,10 +8,10 @@ #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Sheep.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/SilverfishRenderer.cpp b/targets/minecraft/client/renderer/entity/SilverfishRenderer.cpp index 584203e33..202ef602a 100644 --- a/targets/minecraft/client/renderer/entity/SilverfishRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/SilverfishRenderer.cpp @@ -4,8 +4,8 @@ #include "minecraft/client/model/SilverfishModel.h" #include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/client/renderer/entity/MobRenderer.h" +#include "minecraft/client/resources/ResourceLocation.h" ResourceLocation SilverfishRenderer::SILVERFISH_LOCATION(TN_MOB_SILVERFISH); diff --git a/targets/minecraft/client/renderer/entity/SkeletonRenderer.cpp b/targets/minecraft/client/renderer/entity/SkeletonRenderer.cpp index ce521f4a7..25a894f0c 100644 --- a/targets/minecraft/client/renderer/entity/SkeletonRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/SkeletonRenderer.cpp @@ -5,11 +5,11 @@ #include "4J_Render.h" #include "minecraft/client/model/SkeletonModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/HumanoidMobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/Skeleton.h" -#include "minecraft/client/renderer/entity/HumanoidMobRenderer.h" ResourceLocation SkeletonRenderer::SKELETON_LOCATION = ResourceLocation(TN_MOB_SKELETON); diff --git a/targets/minecraft/client/renderer/entity/SlimeRenderer.cpp b/targets/minecraft/client/renderer/entity/SlimeRenderer.cpp index 8eae3abc2..9beb44917 100644 --- a/targets/minecraft/client/renderer/entity/SlimeRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/SlimeRenderer.cpp @@ -3,12 +3,12 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/Slime.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" -#include "gl3_loader.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/SnowManRenderer.cpp b/targets/minecraft/client/renderer/entity/SnowManRenderer.cpp index c66d3bfd2..e9bc0172a 100644 --- a/targets/minecraft/client/renderer/entity/SnowManRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/SnowManRenderer.cpp @@ -9,13 +9,13 @@ #include "minecraft/client/renderer/ItemInHandRenderer.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/SnowMan.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" ResourceLocation SnowManRenderer::SNOWMAN_LOCATION = ResourceLocation(TN_MOB_SNOWMAN); diff --git a/targets/minecraft/client/renderer/entity/SpiderRenderer.cpp b/targets/minecraft/client/renderer/entity/SpiderRenderer.cpp index 4d5679090..1e001f01f 100644 --- a/targets/minecraft/client/renderer/entity/SpiderRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/SpiderRenderer.cpp @@ -3,14 +3,14 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/model/SpiderModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/Spider.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" -#include "gl3_loader.h" ResourceLocation SpiderRenderer::SPIDER_LOCATION = ResourceLocation(TN_MOB_SPIDER); diff --git a/targets/minecraft/client/renderer/entity/SquidRenderer.cpp b/targets/minecraft/client/renderer/entity/SquidRenderer.cpp index eaf9c5a38..353531e7e 100644 --- a/targets/minecraft/client/renderer/entity/SquidRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/SquidRenderer.cpp @@ -4,10 +4,10 @@ #include "4J_Render.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Squid.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/TntMinecartRenderer.cpp b/targets/minecraft/client/renderer/entity/TntMinecartRenderer.cpp index 2cb76331a..f7e6a2583 100644 --- a/targets/minecraft/client/renderer/entity/TntMinecartRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/TntMinecartRenderer.cpp @@ -3,12 +3,12 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/MinecartRenderer.h" #include "minecraft/world/entity/item/Minecart.h" #include "minecraft/world/entity/item/MinecartTNT.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/MinecartRenderer.h" -#include "gl3_loader.h" void TntMinecartRenderer::renderMinecartContents( std::shared_ptr _cart, float a, Tile* tile, int tileData) { diff --git a/targets/minecraft/client/renderer/entity/TntRenderer.cpp b/targets/minecraft/client/renderer/entity/TntRenderer.cpp index bdd11a685..afeb81a93 100644 --- a/targets/minecraft/client/renderer/entity/TntRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/TntRenderer.cpp @@ -3,13 +3,13 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/renderer/TileRenderer.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/item/PrimedTnt.h" #include "minecraft/world/level/tile/Tile.h" -#include "gl3_loader.h" TntRenderer::TntRenderer() { renderer = new TileRenderer(); diff --git a/targets/minecraft/client/renderer/entity/VillagerGolemRenderer.cpp b/targets/minecraft/client/renderer/entity/VillagerGolemRenderer.cpp index d43123388..aeba87b45 100644 --- a/targets/minecraft/client/renderer/entity/VillagerGolemRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/VillagerGolemRenderer.cpp @@ -5,19 +5,19 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/model/VillagerGolemModel.h" #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/renderer/texture/TextureAtlas.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/VillagerGolem.h" #include "minecraft/world/level/tile/PlantTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" -#include "gl3_loader.h" ResourceLocation VillagerGolemRenderer::GOLEM_LOCATION = ResourceLocation(TN_MOB_VILLAGER_GOLEM); diff --git a/targets/minecraft/client/renderer/entity/VillagerRenderer.cpp b/targets/minecraft/client/renderer/entity/VillagerRenderer.cpp index 9c389c9e3..10c1ca827 100644 --- a/targets/minecraft/client/renderer/entity/VillagerRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/VillagerRenderer.cpp @@ -5,11 +5,11 @@ #include "4J_Render.h" #include "minecraft/client/model/VillagerModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/npc/Villager.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" ResourceLocation VillagerRenderer::VILLAGER_LOCATION = ResourceLocation(TN_MOB_VILLAGER_VILLAGER); diff --git a/targets/minecraft/client/renderer/entity/WitchRenderer.cpp b/targets/minecraft/client/renderer/entity/WitchRenderer.cpp index 3689b023d..a27badb60 100644 --- a/targets/minecraft/client/renderer/entity/WitchRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/WitchRenderer.cpp @@ -12,6 +12,7 @@ #include "minecraft/client/renderer/ItemInHandRenderer.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/TileRenderer.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" @@ -20,7 +21,6 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" ResourceLocation WitchRenderer::WITCH_LOCATION = ResourceLocation(TN_MOB_WITCH); diff --git a/targets/minecraft/client/renderer/entity/WitherBossRenderer.cpp b/targets/minecraft/client/renderer/entity/WitherBossRenderer.cpp index 783f2b437..e9681d63b 100644 --- a/targets/minecraft/client/renderer/entity/WitherBossRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/WitherBossRenderer.cpp @@ -3,18 +3,18 @@ #include #include -#include "MobRenderer.h" -#include "minecraft/client/model/WitherBossModel.h" -#include "minecraft/client/renderer/BossMobGuiInfo.h" -#include "minecraft/world/entity/boss/wither/WitherBoss.h" #include "4J_Render.h" +#include "MobRenderer.h" #include "SharedConstants.h" +#include "gl3_loader.h" +#include "minecraft/client/model/WitherBossModel.h" #include "minecraft/client/model/geom/Model.h" +#include "minecraft/client/renderer/BossMobGuiInfo.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" -#include "gl3_loader.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/boss/wither/WitherBoss.h" ResourceLocation WitherBossRenderer::WITHER_ARMOR_LOCATION = ResourceLocation(TN_MOB_WITHER_ARMOR); diff --git a/targets/minecraft/client/renderer/entity/WitherSkullRenderer.cpp b/targets/minecraft/client/renderer/entity/WitherSkullRenderer.cpp index 6beef857c..e04dcfb87 100644 --- a/targets/minecraft/client/renderer/entity/WitherSkullRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/WitherSkullRenderer.cpp @@ -3,12 +3,12 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/SkeletonHeadModel.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/projectile/WitherSkull.h" -#include "gl3_loader.h" ResourceLocation WitherSkullRenderer::WITHER_ARMOR_LOCATION( TN_MOB_WITHER_INVULNERABLE); diff --git a/targets/minecraft/client/renderer/entity/WolfRenderer.cpp b/targets/minecraft/client/renderer/entity/WolfRenderer.cpp index 940dbcac4..060dc1aa9 100644 --- a/targets/minecraft/client/renderer/entity/WolfRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/WolfRenderer.cpp @@ -7,12 +7,12 @@ #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/MobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Sheep.h" #include "minecraft/world/entity/animal/Wolf.h" -#include "minecraft/client/renderer/entity/MobRenderer.h" class Model; diff --git a/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp b/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp index 72560a7f8..b1bb89c51 100644 --- a/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp @@ -1,6 +1,7 @@ #include "ZombieRenderer.h" #include + #include #include "java/Class.h" @@ -8,11 +9,11 @@ #include "minecraft/client/model/VillagerZombieModel.h" #include "minecraft/client/model/ZombieModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/entity/HumanoidMobRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/monster/Zombie.h" -#include "minecraft/client/renderer/entity/HumanoidMobRenderer.h" ResourceLocation ZombieRenderer::ZOMBIE_PIGMAN_LOCATION(TN_MOB_PIGZOMBIE); ResourceLocation ZombieRenderer::ZOMBIE_LOCATION(TN_MOB_ZOMBIE); diff --git a/targets/minecraft/client/renderer/texture/Texture.h b/targets/minecraft/client/renderer/texture/Texture.h index e6bc608d3..d1699f23f 100644 --- a/targets/minecraft/client/renderer/texture/Texture.h +++ b/targets/minecraft/client/renderer/texture/Texture.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/client/renderer/tileentity/BeaconRenderer.cpp b/targets/minecraft/client/renderer/tileentity/BeaconRenderer.cpp index 19a33d596..54e921ad9 100644 --- a/targets/minecraft/client/renderer/tileentity/BeaconRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/BeaconRenderer.cpp @@ -5,13 +5,13 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/entity/BeaconTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "gl3_loader.h" ResourceLocation BeaconRenderer::BEAM_LOCATION = ResourceLocation(TN_MISC_BEACON_BEAM); diff --git a/targets/minecraft/client/renderer/tileentity/ChestRenderer.cpp b/targets/minecraft/client/renderer/tileentity/ChestRenderer.cpp index fb7526801..5f499efbb 100644 --- a/targets/minecraft/client/renderer/tileentity/ChestRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/ChestRenderer.cpp @@ -4,17 +4,17 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/ChestModel.h" #include "minecraft/client/model/LargeChestModel.h" #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/renderer/tileentity/TileEntityRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/level/tile/ChestTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/ChestTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "minecraft/client/renderer/tileentity/TileEntityRenderer.h" -#include "gl3_loader.h" ResourceLocation ChestRenderer::CHEST_LARGE_TRAP_LOCATION = ResourceLocation(TN_TILE_LARGE_TRAP_CHEST); diff --git a/targets/minecraft/client/renderer/tileentity/EnchantTableRenderer.cpp b/targets/minecraft/client/renderer/tileentity/EnchantTableRenderer.cpp index bee6d55b9..21c25a2c4 100644 --- a/targets/minecraft/client/renderer/tileentity/EnchantTableRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/EnchantTableRenderer.cpp @@ -5,13 +5,13 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/BookModel.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/util/Mth.h" #include "minecraft/world/level/tile/entity/EnchantmentTableTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "gl3_loader.h" ResourceLocation EnchantTableRenderer::BOOK_LOCATION = ResourceLocation(TN_ITEM_BOOK); diff --git a/targets/minecraft/client/renderer/tileentity/EnderChestRenderer.cpp b/targets/minecraft/client/renderer/tileentity/EnderChestRenderer.cpp index 129030846..6d5db505a 100644 --- a/targets/minecraft/client/renderer/tileentity/EnderChestRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/EnderChestRenderer.cpp @@ -4,13 +4,13 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/model/ChestModel.h" #include "minecraft/client/model/geom/ModelPart.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/level/tile/entity/EnderChestTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "gl3_loader.h" ResourceLocation EnderChestRenderer::ENDER_CHEST_LOCATION = ResourceLocation(TN_TILE_ENDER_CHEST); diff --git a/targets/minecraft/client/renderer/tileentity/PistonPieceRenderer.cpp b/targets/minecraft/client/renderer/tileentity/PistonPieceRenderer.cpp index 63b99f599..d577d821b 100644 --- a/targets/minecraft/client/renderer/tileentity/PistonPieceRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/PistonPieceRenderer.cpp @@ -3,6 +3,7 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/client/Lighting.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" @@ -15,7 +16,6 @@ #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/level/tile/piston/PistonBaseTile.h" #include "minecraft/world/level/tile/piston/PistonExtensionTile.h" -#include "gl3_loader.h" ResourceLocation PistonPieceRenderer::SIGN_LOCATION = ResourceLocation(TN_ITEM_SIGN); diff --git a/targets/minecraft/client/renderer/tileentity/SignRenderer.cpp b/targets/minecraft/client/renderer/tileentity/SignRenderer.cpp index 50324dcac..458440732 100644 --- a/targets/minecraft/client/renderer/tileentity/SignRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/SignRenderer.cpp @@ -4,22 +4,22 @@ #include #include +#include "4J_Render.h" +#include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/include/XboxStubs.h" +#include "gl3_loader.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Font.h" #include "minecraft/client/model/SignModel.h" #include "minecraft/client/model/geom/ModelPart.h" -#include "4J_Render.h" -#include "Minecraft.Client/Common/App_enums.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/include/XboxStubs.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/resources/ResourceLocation.h" -#include "gl3_loader.h" -#include "strings.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/SignTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "strings.h" ResourceLocation SignRenderer::SIGN_LOCATION = ResourceLocation(TN_ITEM_SIGN); diff --git a/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp b/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp index 47731714e..1af3a9ad6 100644 --- a/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp @@ -3,17 +3,17 @@ #include #include "4J_Render.h" +#include "gl3_loader.h" #include "minecraft/Facing.h" #include "minecraft/client/model/SkeletonHeadModel.h" #include "minecraft/client/model/geom/Model.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/entity/PlayerRenderer.h" +#include "minecraft/client/renderer/tileentity/TileEntityRenderer.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/level/tile/SkullTile.h" #include "minecraft/world/level/tile/entity/SkullTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "minecraft/client/renderer/tileentity/TileEntityRenderer.h" -#include "gl3_loader.h" SkullTileRenderer* SkullTileRenderer::instance = nullptr; diff --git a/targets/minecraft/client/renderer/tileentity/TheEndPortalRenderer.cpp b/targets/minecraft/client/renderer/tileentity/TheEndPortalRenderer.cpp index 957fbae53..70d113d2a 100644 --- a/targets/minecraft/client/renderer/tileentity/TheEndPortalRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/TheEndPortalRenderer.cpp @@ -4,6 +4,7 @@ #include "4J_Render.h" #include "TileEntityRenderDispatcher.h" +#include "gl3_loader.h" #include "java/FloatBuffer.h" #include "java/Random.h" #include "java/System.h" @@ -14,7 +15,6 @@ #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/world/level/tile/entity/TheEndPortalTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "gl3_loader.h" ResourceLocation TheEndPortalRenderer::END_SKY_LOCATION = ResourceLocation(TN_MISC_TUNNEL); diff --git a/targets/minecraft/client/renderer/tileentity/TileEntityRenderDispatcher.cpp b/targets/minecraft/client/renderer/tileentity/TileEntityRenderDispatcher.cpp index 13d2055ab..da12ceaed 100644 --- a/targets/minecraft/client/renderer/tileentity/TileEntityRenderDispatcher.cpp +++ b/targets/minecraft/client/renderer/tileentity/TileEntityRenderDispatcher.cpp @@ -13,11 +13,11 @@ #include "SkullTileRenderer.h" #include "TheEndPortalRenderer.h" #include "TileEntityRenderer.h" +#include "gl3_loader.h" #include "minecraft/SharedConstants.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "gl3_loader.h" class Font; class Textures; diff --git a/targets/minecraft/client/skins/AbstractTexturePack.cpp b/targets/minecraft/client/skins/AbstractTexturePack.cpp index 0680111ce..80dcbb733 100644 --- a/targets/minecraft/client/skins/AbstractTexturePack.cpp +++ b/targets/minecraft/client/skins/AbstractTexturePack.cpp @@ -2,6 +2,7 @@ #include #include + #include #include "Minecraft.Client/Common/src/Colours/ColourTable.h" diff --git a/targets/minecraft/client/skins/DefaultTexturePack.cpp b/targets/minecraft/client/skins/DefaultTexturePack.cpp index 327501bdf..4b86b2b19 100644 --- a/targets/minecraft/client/skins/DefaultTexturePack.cpp +++ b/targets/minecraft/client/skins/DefaultTexturePack.cpp @@ -4,8 +4,8 @@ #include #include -#include "minecraft/client/skins/AbstractTexturePack.h" #include "java/InputOutputStream/InputStream.h" +#include "minecraft/client/skins/AbstractTexturePack.h" DefaultTexturePack::DefaultTexturePack() : AbstractTexturePack(0, nullptr, L"Minecraft", nullptr) { diff --git a/targets/minecraft/client/skins/DefaultTexturePack.h b/targets/minecraft/client/skins/DefaultTexturePack.h index 637ca2a6e..a8d2d9d0f 100644 --- a/targets/minecraft/client/skins/DefaultTexturePack.h +++ b/targets/minecraft/client/skins/DefaultTexturePack.h @@ -2,10 +2,10 @@ #include #include "AbstractTexturePack.h" +#include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/include/stdafx.h" #include "java/InputOutputStream/InputStream.h" #include "strings.h" -#include "Minecraft.Client/Linux/Linux_App.h" class DefaultTexturePack : public AbstractTexturePack { public: diff --git a/targets/minecraft/client/skins/TexturePackRepository.cpp b/targets/minecraft/client/skins/TexturePackRepository.cpp index 77a00133c..d736f6a08 100644 --- a/targets/minecraft/client/skins/TexturePackRepository.cpp +++ b/targets/minecraft/client/skins/TexturePackRepository.cpp @@ -1,20 +1,21 @@ #include "TexturePackRepository.h" #include + #include #include #include "4J_Input.h" #include "DLCTexturePack.h" #include "DefaultTexturePack.h" +#include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/DLC/DLCManager.h" #include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Linux_UIController.h" #include "java/File.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Minimap.h" -#include "Minecraft.Client/Common/App_enums.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Minecraft.Client/Linux/Linux_UIController.h" #include "minecraft/client/skins/TexturePack.h" TexturePack* TexturePackRepository::DEFAULT_TEXTURE_PACK = nullptr; @@ -43,8 +44,7 @@ TexturePackRepository::TexturePackRepository(File workingDirectory, updateList(); } -void TexturePackRepository::addDebugPacks() { -} +void TexturePackRepository::addDebugPacks() {} void TexturePackRepository::createWorkingDirecoryUnlessExists() { // 4J Unused diff --git a/targets/minecraft/client/skins/TexturePackRepository.h b/targets/minecraft/client/skins/TexturePackRepository.h index 6815a5f67..1fe70e507 100644 --- a/targets/minecraft/client/skins/TexturePackRepository.h +++ b/targets/minecraft/client/skins/TexturePackRepository.h @@ -1,9 +1,9 @@ #pragma once -#include #include #include #include +#include #include #include "TexturePack.h" diff --git a/targets/minecraft/commands/Command.h b/targets/minecraft/commands/Command.h index 89b67f7cd..da6f8345d 100644 --- a/targets/minecraft/commands/Command.h +++ b/targets/minecraft/commands/Command.h @@ -3,6 +3,7 @@ // 4J Stu - Based loosely on the Java versions #include + #include #include #include diff --git a/targets/minecraft/commands/CommandDispatcher.h b/targets/minecraft/commands/CommandDispatcher.h index 35f029b3d..f80818ffc 100644 --- a/targets/minecraft/commands/CommandDispatcher.h +++ b/targets/minecraft/commands/CommandDispatcher.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/commands/common/EnchantItemCommand.cpp b/targets/minecraft/commands/common/EnchantItemCommand.cpp index cf1a451f4..ddb089037 100644 --- a/targets/minecraft/commands/common/EnchantItemCommand.cpp +++ b/targets/minecraft/commands/common/EnchantItemCommand.cpp @@ -8,6 +8,7 @@ #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/commands/CommandsEnum.h" #include "minecraft/network/packet/ChatPacket.h" #include "minecraft/network/packet/GameCommandPacket.h" #include "minecraft/server/level/ServerPlayer.h" @@ -16,7 +17,6 @@ #include "minecraft/world/item/enchantment/Enchantment.h" #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" -#include "minecraft/commands/CommandsEnum.h" EGameCommand EnchantItemCommand::getId() { return eGameCommand_EnchantItem; } diff --git a/targets/minecraft/commands/common/GiveItemCommand.cpp b/targets/minecraft/commands/common/GiveItemCommand.cpp index 2f7a9ef60..7a2459312 100644 --- a/targets/minecraft/commands/common/GiveItemCommand.cpp +++ b/targets/minecraft/commands/common/GiveItemCommand.cpp @@ -7,6 +7,7 @@ #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/commands/CommandsEnum.h" #include "minecraft/network/packet/ChatPacket.h" #include "minecraft/network/packet/GameCommandPacket.h" #include "minecraft/server/level/ServerPlayer.h" @@ -14,7 +15,6 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" -#include "minecraft/commands/CommandsEnum.h" EGameCommand GiveItemCommand::getId() { return eGameCommand_Give; } diff --git a/targets/minecraft/commands/common/KillCommand.cpp b/targets/minecraft/commands/common/KillCommand.cpp index 01255cbab..6506d43e8 100644 --- a/targets/minecraft/commands/common/KillCommand.cpp +++ b/targets/minecraft/commands/common/KillCommand.cpp @@ -5,9 +5,9 @@ #include #include "minecraft/commands/CommandSender.h" +#include "minecraft/commands/CommandsEnum.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/player/Player.h" -#include "minecraft/commands/CommandsEnum.h" EGameCommand KillCommand::getId() { return eGameCommand_Kill; } diff --git a/targets/minecraft/commands/common/TimeCommand.cpp b/targets/minecraft/commands/common/TimeCommand.cpp index 461460436..9a24de005 100644 --- a/targets/minecraft/commands/common/TimeCommand.cpp +++ b/targets/minecraft/commands/common/TimeCommand.cpp @@ -7,11 +7,11 @@ #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/commands/CommandsEnum.h" #include "minecraft/network/packet/ChatPacket.h" +#include "minecraft/network/packet/GameCommandPacket.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/level/ServerLevel.h" -#include "minecraft/commands/CommandsEnum.h" -#include "minecraft/network/packet/GameCommandPacket.h" class CommandSender; diff --git a/targets/minecraft/commands/common/ToggleDownfallCommand.cpp b/targets/minecraft/commands/common/ToggleDownfallCommand.cpp index beb704b32..b0adfe597 100644 --- a/targets/minecraft/commands/common/ToggleDownfallCommand.cpp +++ b/targets/minecraft/commands/common/ToggleDownfallCommand.cpp @@ -3,12 +3,12 @@ #include #include +#include "minecraft/commands/CommandsEnum.h" #include "minecraft/network/packet/ChatPacket.h" #include "minecraft/network/packet/GameCommandPacket.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/level/ServerLevel.h" #include "minecraft/world/level/storage/LevelData.h" -#include "minecraft/commands/CommandsEnum.h" EGameCommand ToggleDownfallCommand::getId() { return eGameCommand_ToggleDownfall; diff --git a/targets/minecraft/core/AbstractProjectileDispenseBehavior.cpp b/targets/minecraft/core/AbstractProjectileDispenseBehavior.cpp index 456cd726d..0f1987ea6 100644 --- a/targets/minecraft/core/AbstractProjectileDispenseBehavior.cpp +++ b/targets/minecraft/core/AbstractProjectileDispenseBehavior.cpp @@ -2,6 +2,7 @@ #include "java/Class.h" #include "minecraft/core/BlockSource.h" +#include "minecraft/core/DefaultDispenseItemBehavior.h" #include "minecraft/core/FacingEnum.h" #include "minecraft/core/Position.h" #include "minecraft/world/entity/Entity.h" @@ -10,7 +11,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/DispenserTile.h" #include "minecraft/world/level/tile/LevelEvent.h" -#include "minecraft/core/DefaultDispenseItemBehavior.h" std::shared_ptr AbstractProjectileDispenseBehavior::execute( BlockSource* source, std::shared_ptr dispensed, diff --git a/targets/minecraft/core/DefaultDispenseItemBehavior.cpp b/targets/minecraft/core/DefaultDispenseItemBehavior.cpp index 103c3c3af..1e56e4099 100644 --- a/targets/minecraft/core/DefaultDispenseItemBehavior.cpp +++ b/targets/minecraft/core/DefaultDispenseItemBehavior.cpp @@ -5,10 +5,10 @@ #include "minecraft/core/FacingEnum.h" #include "minecraft/core/Position.h" #include "minecraft/world/entity/item/ItemEntity.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/DispenserTile.h" #include "minecraft/world/level/tile/LevelEvent.h" -#include "minecraft/world/item/ItemInstance.h" std::shared_ptr DefaultDispenseItemBehavior::dispense( BlockSource* source, std::shared_ptr dispensed) { diff --git a/targets/minecraft/core/ItemDispenseBehaviors.cpp b/targets/minecraft/core/ItemDispenseBehaviors.cpp index 4b3a317ae..437026ec9 100644 --- a/targets/minecraft/core/ItemDispenseBehaviors.cpp +++ b/targets/minecraft/core/ItemDispenseBehaviors.cpp @@ -7,7 +7,9 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Class.h" #include "java/Random.h" +#include "minecraft/core/AbstractProjectileDispenseBehavior.h" #include "minecraft/core/BlockSource.h" +#include "minecraft/core/DefaultDispenseItemBehavior.h" #include "minecraft/core/FacingEnum.h" #include "minecraft/core/Position.h" #include "minecraft/world/entity/Entity.h" @@ -33,8 +35,6 @@ #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/DispenserTileEntity.h" -#include "minecraft/core/AbstractProjectileDispenseBehavior.h" -#include "minecraft/core/DefaultDispenseItemBehavior.h" /* Arrow */ diff --git a/targets/minecraft/locale/I18n.h b/targets/minecraft/locale/I18n.h index d61b070e3..47d8f1b08 100644 --- a/targets/minecraft/locale/I18n.h +++ b/targets/minecraft/locale/I18n.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Language.h" diff --git a/targets/minecraft/network/Connection.cpp b/targets/minecraft/network/Connection.cpp index af308d626..9d29d1a4b 100644 --- a/targets/minecraft/network/Connection.cpp +++ b/targets/minecraft/network/Connection.cpp @@ -1,9 +1,10 @@ #include "Connection.h" #include -#include + #include #include +#include #include "Minecraft.Client/Common/ShutdownManager.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" @@ -16,10 +17,10 @@ #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" #include "java/System.h" +#include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/KeepAlivePacket.h" #include "minecraft/network/packet/Packet.h" #include "minecraft/network/packet/PacketListener.h" -#include "minecraft/network/packet/DisconnectPacket.h" class SocketAddress; diff --git a/targets/minecraft/network/Connection.h b/targets/minecraft/network/Connection.h index dec4f8c6e..ccc525bc9 100644 --- a/targets/minecraft/network/Connection.h +++ b/targets/minecraft/network/Connection.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/network/packet/AddEntityPacket.h b/targets/minecraft/network/packet/AddEntityPacket.h index f4dd88335..61d5b9f1f 100644 --- a/targets/minecraft/network/packet/AddEntityPacket.h +++ b/targets/minecraft/network/packet/AddEntityPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Packet.h" diff --git a/targets/minecraft/network/packet/AddMobPacket.h b/targets/minecraft/network/packet/AddMobPacket.h index 1186f87f7..83d87992c 100644 --- a/targets/minecraft/network/packet/AddMobPacket.h +++ b/targets/minecraft/network/packet/AddMobPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/network/packet/AwardStatPacket.h b/targets/minecraft/network/packet/AwardStatPacket.h index 41d2acaa8..7457a8b42 100644 --- a/targets/minecraft/network/packet/AwardStatPacket.h +++ b/targets/minecraft/network/packet/AwardStatPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/network/packet/BlockRegionUpdatePacket.h b/targets/minecraft/network/packet/BlockRegionUpdatePacket.h index fa3f26fc6..d1def51ea 100644 --- a/targets/minecraft/network/packet/BlockRegionUpdatePacket.h +++ b/targets/minecraft/network/packet/BlockRegionUpdatePacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/network/packet/ChunkTilesUpdatePacket.h b/targets/minecraft/network/packet/ChunkTilesUpdatePacket.h index 7334fbda9..9a4ff03be 100644 --- a/targets/minecraft/network/packet/ChunkTilesUpdatePacket.h +++ b/targets/minecraft/network/packet/ChunkTilesUpdatePacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/network/packet/CustomPayloadPacket.h b/targets/minecraft/network/packet/CustomPayloadPacket.h index a0cbc60bb..cfd6a7b6a 100644 --- a/targets/minecraft/network/packet/CustomPayloadPacket.h +++ b/targets/minecraft/network/packet/CustomPayloadPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/network/packet/DisconnectPacket.cpp b/targets/minecraft/network/packet/DisconnectPacket.cpp index 22071b3cd..420b1813c 100644 --- a/targets/minecraft/network/packet/DisconnectPacket.cpp +++ b/targets/minecraft/network/packet/DisconnectPacket.cpp @@ -1,6 +1,7 @@ #include "minecraft/network/packet/DisconnectPacket.h" #include + #include #include "PacketListener.h" diff --git a/targets/minecraft/network/packet/EntityEventPacket.h b/targets/minecraft/network/packet/EntityEventPacket.h index 0b9904cc0..aa2668839 100644 --- a/targets/minecraft/network/packet/EntityEventPacket.h +++ b/targets/minecraft/network/packet/EntityEventPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Packet.h" diff --git a/targets/minecraft/network/packet/ExplodePacket.cpp b/targets/minecraft/network/packet/ExplodePacket.cpp index 3cadcc2ed..e417ab33c 100644 --- a/targets/minecraft/network/packet/ExplodePacket.cpp +++ b/targets/minecraft/network/packet/ExplodePacket.cpp @@ -5,8 +5,8 @@ #include "PacketListener.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "minecraft/world/phys/Vec3.h" #include "minecraft/world/level/TilePos.h" +#include "minecraft/world/phys/Vec3.h" ExplodePacket::ExplodePacket() { x = 0; diff --git a/targets/minecraft/network/packet/GameCommandPacket.h b/targets/minecraft/network/packet/GameCommandPacket.h index df6fcc2dc..cd484e750 100644 --- a/targets/minecraft/network/packet/GameCommandPacket.h +++ b/targets/minecraft/network/packet/GameCommandPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/network/packet/Packet.cpp b/targets/minecraft/network/packet/Packet.cpp index ae0dc2800..26b583c59 100644 --- a/targets/minecraft/network/packet/Packet.cpp +++ b/targets/minecraft/network/packet/Packet.cpp @@ -3,6 +3,7 @@ #include #include #include + #include #include #include diff --git a/targets/minecraft/network/packet/Packet.h b/targets/minecraft/network/packet/Packet.h index 28bf21aca..a5d13a3de 100644 --- a/targets/minecraft/network/packet/Packet.h +++ b/targets/minecraft/network/packet/Packet.h @@ -1,11 +1,12 @@ #pragma once #include -#include + #include #include #include #include +#include #include #include "nbt/CompoundTag.h" diff --git a/targets/minecraft/network/packet/PacketListener.cpp b/targets/minecraft/network/packet/PacketListener.cpp index 4ed4ab5a0..4e5f7c856 100644 --- a/targets/minecraft/network/packet/PacketListener.cpp +++ b/targets/minecraft/network/packet/PacketListener.cpp @@ -27,6 +27,7 @@ #include "minecraft/network/packet/CraftItemPacket.h" #include "minecraft/network/packet/CustomPayloadPacket.h" #include "minecraft/network/packet/DebugOptionsPacket.h" +#include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/EntityActionAtPositionPacket.h" #include "minecraft/network/packet/EntityEventPacket.h" #include "minecraft/network/packet/ExplodePacket.h" @@ -87,7 +88,6 @@ #include "minecraft/network/packet/UpdateProgressPacket.h" #include "minecraft/network/packet/UseItemPacket.h" #include "minecraft/network/packet/XZPacket.h" -#include "minecraft/network/packet/DisconnectPacket.h" void PacketListener::handleBlockRegionUpdate( std::shared_ptr packet) {} diff --git a/targets/minecraft/network/packet/PreLoginPacket.cpp b/targets/minecraft/network/packet/PreLoginPacket.cpp index 6047e4c17..a05dc91da 100644 --- a/targets/minecraft/network/packet/PreLoginPacket.cpp +++ b/targets/minecraft/network/packet/PreLoginPacket.cpp @@ -3,13 +3,13 @@ #include #include +#include "Minecraft.Client/Common/src/BuildVer/BuildVer.h" #include "Minecraft.Client/Common/src/Network/PlatformNetworkManagerInterface.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "PacketListener.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "Minecraft.Client/Common/src/BuildVer/BuildVer.h" PreLoginPacket::PreLoginPacket() { loginKey = L""; diff --git a/targets/minecraft/network/packet/RespawnPacket.h b/targets/minecraft/network/packet/RespawnPacket.h index dfc8bd9f0..3152a8628 100644 --- a/targets/minecraft/network/packet/RespawnPacket.h +++ b/targets/minecraft/network/packet/RespawnPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Packet.h" diff --git a/targets/minecraft/network/packet/SetEntityLinkPacket.cpp b/targets/minecraft/network/packet/SetEntityLinkPacket.cpp index 8b7891a6a..a50c145b3 100644 --- a/targets/minecraft/network/packet/SetEntityLinkPacket.cpp +++ b/targets/minecraft/network/packet/SetEntityLinkPacket.cpp @@ -3,8 +3,8 @@ #include "PacketListener.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "minecraft/world/entity/Entity.h" #include "minecraft/network/packet/Packet.h" +#include "minecraft/world/entity/Entity.h" SetEntityLinkPacket::SetEntityLinkPacket() { sourceId = -1; diff --git a/targets/minecraft/network/packet/SetEntityMotionPacket.cpp b/targets/minecraft/network/packet/SetEntityMotionPacket.cpp index 59697fd4c..6b1554b64 100644 --- a/targets/minecraft/network/packet/SetEntityMotionPacket.cpp +++ b/targets/minecraft/network/packet/SetEntityMotionPacket.cpp @@ -3,8 +3,8 @@ #include "PacketListener.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "minecraft/world/entity/Entity.h" #include "minecraft/network/packet/Packet.h" +#include "minecraft/world/entity/Entity.h" void SetEntityMotionPacket::_init(int id, double xd, double yd, double zd) { this->id = id; diff --git a/targets/minecraft/network/packet/SetTimePacket.h b/targets/minecraft/network/packet/SetTimePacket.h index 27b85e54a..ab790243a 100644 --- a/targets/minecraft/network/packet/SetTimePacket.h +++ b/targets/minecraft/network/packet/SetTimePacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Packet.h" diff --git a/targets/minecraft/network/packet/TeleportEntityPacket.cpp b/targets/minecraft/network/packet/TeleportEntityPacket.cpp index 8c82c85db..3c7cb94c8 100644 --- a/targets/minecraft/network/packet/TeleportEntityPacket.cpp +++ b/targets/minecraft/network/packet/TeleportEntityPacket.cpp @@ -3,9 +3,9 @@ #include "PacketListener.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/network/packet/Packet.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/Entity.h" -#include "minecraft/network/packet/Packet.h" TeleportEntityPacket::TeleportEntityPacket() { id = -1; diff --git a/targets/minecraft/network/packet/TeleportEntityPacket.h b/targets/minecraft/network/packet/TeleportEntityPacket.h index bb55143d7..8290565f8 100644 --- a/targets/minecraft/network/packet/TeleportEntityPacket.h +++ b/targets/minecraft/network/packet/TeleportEntityPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Packet.h" diff --git a/targets/minecraft/network/packet/TileDestructionPacket.cpp b/targets/minecraft/network/packet/TileDestructionPacket.cpp index 39dc9249b..6ba59be7e 100644 --- a/targets/minecraft/network/packet/TileDestructionPacket.cpp +++ b/targets/minecraft/network/packet/TileDestructionPacket.cpp @@ -2,8 +2,8 @@ #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "minecraft/network/packet/PacketListener.h" #include "minecraft/network/packet/Packet.h" +#include "minecraft/network/packet/PacketListener.h" TileDestructionPacket::TileDestructionPacket() { id = 0; diff --git a/targets/minecraft/network/packet/UpdateAttributesPacket.cpp b/targets/minecraft/network/packet/UpdateAttributesPacket.cpp index 9ce3f1113..636faaf1c 100644 --- a/targets/minecraft/network/packet/UpdateAttributesPacket.cpp +++ b/targets/minecraft/network/packet/UpdateAttributesPacket.cpp @@ -5,9 +5,9 @@ #include "PacketListener.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/world/entity/ai/attributes/Attribute.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" -#include "minecraft/world/entity/ai/attributes/Attribute.h" UpdateAttributesPacket::UpdateAttributesPacket() { entityId = 0; } diff --git a/targets/minecraft/network/packet/UpdateGameRuleProgressPacket.h b/targets/minecraft/network/packet/UpdateGameRuleProgressPacket.h index d0bc39628..844e81b67 100644 --- a/targets/minecraft/network/packet/UpdateGameRuleProgressPacket.h +++ b/targets/minecraft/network/packet/UpdateGameRuleProgressPacket.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/network/packet/UpdateMobEffectPacket.cpp b/targets/minecraft/network/packet/UpdateMobEffectPacket.cpp index df1ba6ce2..1f814d6e9 100644 --- a/targets/minecraft/network/packet/UpdateMobEffectPacket.cpp +++ b/targets/minecraft/network/packet/UpdateMobEffectPacket.cpp @@ -5,8 +5,8 @@ #include "PacketListener.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/network/packet/Packet.h" +#include "minecraft/world/effect/MobEffectInstance.h" UpdateMobEffectPacket::UpdateMobEffectPacket() { entityId = 0; diff --git a/targets/minecraft/server/MinecraftServer.cpp b/targets/minecraft/server/MinecraftServer.cpp index 3226f1525..8e5bafcaa 100644 --- a/targets/minecraft/server/MinecraftServer.cpp +++ b/targets/minecraft/server/MinecraftServer.cpp @@ -2,46 +2,46 @@ #include #include + +#include #include +#include #include #include -#include -#include #include -#include "ConsoleInput.h" -#include "DispenserBootstrap.h" -#include "PlayerList.h" -#include "Settings.h" -#include "console_helpers/PlatformTime.h" -#include "java/System.h" -#include "minecraft/Pos.h" -#include "minecraft/client/Options.h" -#include "minecraft/commands/Command.h" -#include "minecraft/server/level/DerivedServerLevel.h" -#include "minecraft/server/level/EntityTracker.h" -#include "minecraft/server/level/ServerChunkCache.h" -#include "minecraft/server/level/ServerLevel.h" -#include "minecraft/server/network/ServerConnection.h" #include "4J.Common/4J_Compat.h" #include "4J_Profile.h" #include "4J_Storage.h" +#include "ConsoleInput.h" +#include "DispenserBootstrap.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "PlayerList.h" +#include "Settings.h" +#include "console_helpers/PlatformTime.h" #include "java/Class.h" #include "java/File.h" #include "java/InputOutputStream/DataOutputStream.h" #include "java/InputOutputStream/FileOutputStream.h" #include "java/Random.h" +#include "java/System.h" +#include "minecraft/Pos.h" +#include "minecraft/client/Options.h" +#include "minecraft/commands/Command.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 "strings.h" +#include "minecraft/server/level/DerivedServerLevel.h" +#include "minecraft/server/level/EntityTracker.h" +#include "minecraft/server/level/ServerChunkCache.h" +#include "minecraft/server/level/ServerLevel.h" +#include "minecraft/server/network/ServerConnection.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/EntityIO.h" #include "minecraft/world/entity/Mob.h" @@ -60,6 +60,7 @@ #include "minecraft/world/level/storage/McRegionLevelStorage.h" #include "minecraft/world/level/storage/McRegionLevelStorageSource.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" #if defined(SPLIT_SAVES) #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.h" #endif diff --git a/targets/minecraft/server/MinecraftServer.h b/targets/minecraft/server/MinecraftServer.h index 9b062d894..099a9b464 100644 --- a/targets/minecraft/server/MinecraftServer.h +++ b/targets/minecraft/server/MinecraftServer.h @@ -1,7 +1,7 @@ #pragma once #include -#include #include +#include #include #include #include diff --git a/targets/minecraft/server/PlayerList.cpp b/targets/minecraft/server/PlayerList.cpp index 3561bc95a..1b92212f7 100644 --- a/targets/minecraft/server/PlayerList.cpp +++ b/targets/minecraft/server/PlayerList.cpp @@ -2,44 +2,33 @@ #include #include -#include -#include -#include -#include -#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" -#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" -#include "MinecraftServer.h" -#include "Settings.h" -#include "java/JavaMath.h" -#include "minecraft/Pos.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" -#include "minecraft/server/level/EntityTracker.h" -#include "minecraft/server/level/PlayerChunkMap.h" -#include "minecraft/server/level/ServerChunkCache.h" -#include "minecraft/server/level/ServerLevel.h" -#include "minecraft/server/level/ServerPlayer.h" -#include "minecraft/server/level/ServerPlayerGameMode.h" -#include "minecraft/server/network/PendingConnection.h" -#include "minecraft/server/network/PlayerConnection.h" -#include "minecraft/server/network/ServerConnection.h" -#include "minecraft/util/ProgressListener.h" -#include "minecraft/world/entity/EntityIO.h" +#include +#include +#include +#include + #include "4J_Profile.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.h" +#include "Minecraft.Client/Common/src/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRulesInstance.h" #include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" #include "Minecraft.Client/Common/src/Network/Socket.h" +#include "Minecraft.Client/Common/src/Tutorial/Tutorial.h" #include "Minecraft.Client/Common/src/Tutorial/TutorialEnum.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "Minecraft.Client/include/NetTypes.h" +#include "MinecraftServer.h" +#include "Settings.h" #include "console_helpers/Definitions.h" #include "java/Class.h" -#include "nbt/CompoundTag.h" +#include "java/JavaMath.h" +#include "minecraft/Pos.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/network/Connection.h" #include "minecraft/network/packet/ChatPacket.h" #include "minecraft/network/packet/DisconnectPacket.h" @@ -56,8 +45,18 @@ #include "minecraft/network/packet/TexturePacket.h" #include "minecraft/network/packet/UpdateMobEffectPacket.h" #include "minecraft/network/packet/XZPacket.h" -#include "strings.h" +#include "minecraft/server/level/EntityTracker.h" +#include "minecraft/server/level/PlayerChunkMap.h" +#include "minecraft/server/level/ServerChunkCache.h" +#include "minecraft/server/level/ServerLevel.h" +#include "minecraft/server/level/ServerPlayer.h" +#include "minecraft/server/level/ServerPlayerGameMode.h" +#include "minecraft/server/network/PendingConnection.h" +#include "minecraft/server/network/PlayerConnection.h" +#include "minecraft/server/network/ServerConnection.h" +#include "minecraft/util/ProgressListener.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/EntityIO.h" #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/player/Inventory.h" @@ -74,6 +73,8 @@ #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/storage/LevelStorage.h" #include "minecraft/world/level/storage/PlayerIO.h" +#include "nbt/CompoundTag.h" +#include "strings.h" class MobEffectInstance; diff --git a/targets/minecraft/server/PlayerList.h b/targets/minecraft/server/PlayerList.h index bc7bd46e2..1aea67862 100644 --- a/targets/minecraft/server/PlayerList.h +++ b/targets/minecraft/server/PlayerList.h @@ -1,12 +1,12 @@ #pragma once #include #include +#include #include #include +#include #include #include -#include -#include #include "4J.Common/4J_Compat.h" #include "nbt/CompoundTag.h" diff --git a/targets/minecraft/server/commands/ServerCommandDispatcher.cpp b/targets/minecraft/server/commands/ServerCommandDispatcher.cpp index 614b3c31b..13131a0ee 100644 --- a/targets/minecraft/server/commands/ServerCommandDispatcher.cpp +++ b/targets/minecraft/server/commands/ServerCommandDispatcher.cpp @@ -14,10 +14,10 @@ #include "minecraft/commands/common/KillCommand.h" #include "minecraft/commands/common/TimeCommand.h" #include "minecraft/commands/common/ToggleDownfallCommand.h" +#include "minecraft/network/packet/ChatPacket.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerPlayer.h" -#include "minecraft/network/packet/ChatPacket.h" ServerCommandDispatcher::ServerCommandDispatcher() { addCommand(new TimeCommand()); diff --git a/targets/minecraft/server/commands/TeleportCommand.cpp b/targets/minecraft/server/commands/TeleportCommand.cpp index 1c9b12b8e..87e7d17e4 100644 --- a/targets/minecraft/server/commands/TeleportCommand.cpp +++ b/targets/minecraft/server/commands/TeleportCommand.cpp @@ -7,15 +7,15 @@ #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/commands/CommandsEnum.h" #include "minecraft/network/packet/ChatPacket.h" +#include "minecraft/network/packet/GameCommandPacket.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerPlayer.h" #include "minecraft/server/network/PlayerConnection.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" -#include "minecraft/commands/CommandsEnum.h" -#include "minecraft/network/packet/GameCommandPacket.h" EGameCommand TeleportCommand::getId() { return eGameCommand_Teleport; } diff --git a/targets/minecraft/server/level/DerivedServerLevel.cpp b/targets/minecraft/server/level/DerivedServerLevel.cpp index c41db9759..5ad1de97f 100644 --- a/targets/minecraft/server/level/DerivedServerLevel.cpp +++ b/targets/minecraft/server/level/DerivedServerLevel.cpp @@ -1,8 +1,8 @@ #include "DerivedServerLevel.h" +#include "minecraft/server/level/ServerLevel.h" #include "minecraft/world/level/storage/DerivedLevelData.h" #include "minecraft/world/level/storage/SavedDataStorage.h" -#include "minecraft/server/level/ServerLevel.h" class LevelSettings; class LevelStorage; diff --git a/targets/minecraft/server/level/EntityTracker.cpp b/targets/minecraft/server/level/EntityTracker.cpp index 9c8d2dc16..661cf2fa7 100644 --- a/targets/minecraft/server/level/EntityTracker.cpp +++ b/targets/minecraft/server/level/EntityTracker.cpp @@ -2,19 +2,20 @@ #include #include + #include #include #include +#include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" +#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "ServerLevel.h" #include "ServerPlayer.h" #include "TrackedEntity.h" +#include "java/Class.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/network/PlayerConnection.h" -#include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" -#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" -#include "java/Class.h" #include "minecraft/world/entity/Creature.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/chunk/LevelChunk.h" diff --git a/targets/minecraft/server/level/PlayerChunkMap.cpp b/targets/minecraft/server/level/PlayerChunkMap.cpp index af6666238..e146d8347 100644 --- a/targets/minecraft/server/level/PlayerChunkMap.cpp +++ b/targets/minecraft/server/level/PlayerChunkMap.cpp @@ -1,6 +1,7 @@ #include "PlayerChunkMap.h" #include + #include #include #include @@ -23,10 +24,10 @@ #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/network/PlayerConnection.h" +#include "minecraft/world/level/ChunkPos.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "minecraft/world/level/ChunkPos.h" PlayerChunkMap::PlayerChunk::PlayerChunk(int x, int z, PlayerChunkMap* pcm) : pos(x, z) { diff --git a/targets/minecraft/server/level/PlayerChunkMap.h b/targets/minecraft/server/level/PlayerChunkMap.h index fbf135e76..c74b12912 100644 --- a/targets/minecraft/server/level/PlayerChunkMap.h +++ b/targets/minecraft/server/level/PlayerChunkMap.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/server/level/ServerChunkCache.cpp b/targets/minecraft/server/level/ServerChunkCache.cpp index 1a178da04..343bf05c2 100644 --- a/targets/minecraft/server/level/ServerChunkCache.cpp +++ b/targets/minecraft/server/level/ServerChunkCache.cpp @@ -3,6 +3,7 @@ #include #include #include + #include #include "Minecraft.Client/Linux/Linux_App.h" @@ -12,14 +13,14 @@ #include "minecraft/server/MinecraftServer.h" #include "minecraft/util/ProgressListener.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/EmptyLevelChunk.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/chunk/storage/ChunkStorage.h" #include "minecraft/world/level/chunk/storage/OldChunkStorage.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/chunk/ChunkSource.h" ServerChunkCache::ServerChunkCache(ServerLevel* level, ChunkStorage* storage, ChunkSource* source) { diff --git a/targets/minecraft/server/level/ServerLevel.cpp b/targets/minecraft/server/level/ServerLevel.cpp index 7e8fb3105..26bd3e409 100644 --- a/targets/minecraft/server/level/ServerLevel.cpp +++ b/targets/minecraft/server/level/ServerLevel.cpp @@ -1,42 +1,42 @@ #include "ServerLevel.h" #include -#include + #include +#include #include "4J_Input.h" +#include "4J_Storage.h" #include "EntityTracker.h" #include "Minecraft.Client/Common/ShutdownManager.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" +#include "Minecraft.Client/Common/src/DLC/DLCManager.h" #include "Minecraft.Client/Common/src/DLC/DLCPack.h" +#include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" +#include "Minecraft.Client/Linux/Linux_App.h" #include "PlayerChunkMap.h" +#include "Pos.h" #include "ServerChunkCache.h" #include "ServerLevelListener.h" #include "ServerPlayer.h" +#include "java/Class.h" +#include "java/Random.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/skins/DLCTexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/server/PlayerList.h" -#include "minecraft/server/ServerScoreboard.h" -#include "minecraft/server/network/PlayerConnection.h" -#include "minecraft/util/ProgressListener.h" -#include "minecraft/util/WeighedTreasure.h" -#include "4J_Storage.h" -#include "Minecraft.Client/Common/src/DLC/DLCManager.h" -#include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "Pos.h" -#include "java/Class.h" -#include "java/Random.h" #include "minecraft/network/packet/AddGlobalEntityPacket.h" #include "minecraft/network/packet/EntityEventPacket.h" #include "minecraft/network/packet/ExplodePacket.h" #include "minecraft/network/packet/GameEventPacket.h" #include "minecraft/network/packet/LevelParticlesPacket.h" #include "minecraft/network/packet/TileEventPacket.h" -#include "strings.h" +#include "minecraft/server/MinecraftServer.h" +#include "minecraft/server/PlayerList.h" +#include "minecraft/server/ServerScoreboard.h" +#include "minecraft/server/network/PlayerConnection.h" +#include "minecraft/util/ProgressListener.h" #include "minecraft/util/WeighedRandom.h" +#include "minecraft/util/WeighedTreasure.h" #include "minecraft/world/entity/ai/village/VillageSiege.h" #include "minecraft/world/entity/ai/village/Villages.h" #include "minecraft/world/entity/global/LightningBolt.h" @@ -64,6 +64,7 @@ #include "minecraft/world/level/tile/entity/ChestTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/Vec3.h" +#include "strings.h" class ChunkStorage; class MobCategory; diff --git a/targets/minecraft/server/level/ServerLevel.h b/targets/minecraft/server/level/ServerLevel.h index f802fd06a..dacc0aa15 100644 --- a/targets/minecraft/server/level/ServerLevel.h +++ b/targets/minecraft/server/level/ServerLevel.h @@ -1,24 +1,25 @@ #pragma once #include + #include +#include #include #include -#include #include #include #include #include -#include "java/JavaIntHash.h" -#include "minecraft/world/level/net.minecraft.world.level.h" #include "SharedConstants.h" #include "console_helpers/C4JThread.h" +#include "java/JavaIntHash.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/TickNextTickData.h" #include "minecraft/world/level/TileEventData.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/net.minecraft.world.level.h" class ServerChunkCache; class MinecraftServer; diff --git a/targets/minecraft/server/level/ServerLevelListener.cpp b/targets/minecraft/server/level/ServerLevelListener.cpp index 335ba854b..817dbe0e4 100644 --- a/targets/minecraft/server/level/ServerLevelListener.cpp +++ b/targets/minecraft/server/level/ServerLevelListener.cpp @@ -8,6 +8,7 @@ #include "PlayerChunkMap.h" #include "ServerLevel.h" #include "ServerPlayer.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/network/packet/LevelEventPacket.h" #include "minecraft/network/packet/LevelSoundPacket.h" #include "minecraft/network/packet/TileDestructionPacket.h" @@ -16,7 +17,6 @@ #include "minecraft/server/network/PlayerConnection.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/dimension/Dimension.h" -#include "minecraft/core/particles/ParticleTypes.h" ServerLevelListener::ServerLevelListener(MinecraftServer* server, ServerLevel* level) { diff --git a/targets/minecraft/server/level/ServerPlayer.cpp b/targets/minecraft/server/level/ServerPlayer.cpp index 70c7fc12d..acd33a77f 100644 --- a/targets/minecraft/server/level/ServerPlayer.cpp +++ b/targets/minecraft/server/level/ServerPlayer.cpp @@ -2,35 +2,31 @@ #include #include + +#include #include #include -#include #include #include "4J_Input.h" #include "EntityTracker.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" -#include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" -#include "ServerLevel.h" -#include "ServerPlayerGameMode.h" -#include "java/Random.h" -#include "minecraft/Pos.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/multiplayer/MultiPlayerLevel.h" -#include "minecraft/client/renderer/LevelRenderer.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/server/PlayerList.h" -#include "minecraft/server/network/PlayerConnection.h" -#include "minecraft/world/level/chunk/LevelChunk.h" #include "Minecraft.Client/Common/src/GameRules/LevelRules/Rules/GameRulesInstance.h" +#include "Minecraft.Client/Common/src/Network/GameNetworkManager.h" #include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "ServerLevel.h" +#include "ServerPlayerGameMode.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "java/Random.h" #include "java/System.h" -#include "nbt/CompoundTag.h" +#include "minecraft/Pos.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/multiplayer/MultiPlayerLevel.h" +#include "minecraft/client/renderer/LevelRenderer.h" #include "minecraft/network/packet/AnimatePacket.h" #include "minecraft/network/packet/AwardStatPacket.h" #include "minecraft/network/packet/BlockRegionUpdatePacket.h" @@ -52,9 +48,11 @@ #include "minecraft/network/packet/SetHealthPacket.h" #include "minecraft/network/packet/TileEditorOpenPacket.h" #include "minecraft/network/packet/UpdateMobEffectPacket.h" +#include "minecraft/server/MinecraftServer.h" +#include "minecraft/server/PlayerList.h" +#include "minecraft/server/network/PlayerConnection.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/stats/Stat.h" -#include "strings.h" #include "minecraft/world/Container.h" #include "minecraft/world/damageSource/CombatTracker.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -78,6 +76,7 @@ #include "minecraft/world/inventory/FurnaceMenu.h" #include "minecraft/world/inventory/HopperMenu.h" #include "minecraft/world/inventory/HorseInventoryMenu.h" +#include "minecraft/world/inventory/MerchantContainer.h" #include "minecraft/world/inventory/MerchantMenu.h" #include "minecraft/world/inventory/ResultSlot.h" #include "minecraft/world/inventory/Slot.h" @@ -93,6 +92,7 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/Tile.h" @@ -106,7 +106,8 @@ #include "minecraft/world/scores/Score.h" #include "minecraft/world/scores/Scoreboard.h" #include "minecraft/world/scores/criteria/ObjectiveCriteria.h" -#include "minecraft/world/inventory/MerchantContainer.h" +#include "nbt/CompoundTag.h" +#include "strings.h" class Objective; diff --git a/targets/minecraft/server/level/ServerPlayer.h b/targets/minecraft/server/level/ServerPlayer.h index c3f5faa21..6c8fcc716 100644 --- a/targets/minecraft/server/level/ServerPlayer.h +++ b/targets/minecraft/server/level/ServerPlayer.h @@ -1,19 +1,20 @@ #pragma once #include + #include #include #include #include #include +#include "java/Class.h" +#include "minecraft/commands/CommandsEnum.h" +#include "minecraft/network/packet/ChatPacket.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/player/net.minecraft.world.entity.player.h" #include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" #include "minecraft/world/level/ChunkPos.h" -#include "minecraft/commands/CommandsEnum.h" -#include "java/Class.h" -#include "minecraft/network/packet/ChatPacket.h" -#include "minecraft/world/entity/player/Player.h" class PlayerConnection; class MinecraftServer; diff --git a/targets/minecraft/server/level/TrackedEntity.cpp b/targets/minecraft/server/level/TrackedEntity.cpp index 95d143104..14a5bc755 100644 --- a/targets/minecraft/server/level/TrackedEntity.cpp +++ b/targets/minecraft/server/level/TrackedEntity.cpp @@ -3,9 +3,10 @@ #include #include #include + +#include #include #include -#include #include "4J.Common/4J_Compat.h" #include "EntityTracker.h" @@ -46,6 +47,7 @@ #include "minecraft/world/entity/ai/attributes/ServersideAttributeMap.h" #include "minecraft/world/entity/item/FallingTile.h" #include "minecraft/world/entity/item/Minecart.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/Arrow.h" #include "minecraft/world/entity/projectile/Fireball.h" #include "minecraft/world/entity/projectile/FishingHook.h" @@ -54,7 +56,6 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/MapItem.h" #include "minecraft/world/level/saveddata/MapItemSavedData.h" -#include "minecraft/world/entity/player/Player.h" class AttributeInstance; class MobEffectInstance; diff --git a/targets/minecraft/server/network/PendingConnection.cpp b/targets/minecraft/server/network/PendingConnection.cpp index d83c5b259..3a6963faf 100644 --- a/targets/minecraft/server/network/PendingConnection.cpp +++ b/targets/minecraft/server/network/PendingConnection.cpp @@ -1,29 +1,30 @@ #include "PendingConnection.h" #include + #include #include #include "4J.Common/4J_Compat.h" #include "4J_Storage.h" #include "Minecraft.Client/Common/App_enums.h" +#include "Minecraft.Client/Common/src/BuildVer/BuildVer.h" #include "Minecraft.Client/Common/src/Network/NetworkPlayerInterface.h" #include "Minecraft.Client/Common/src/Network/PlatformNetworkManagerInterface.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" #include "Minecraft.Client/include/NetTypes.h" #include "PlayerConnection.h" #include "ServerConnection.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/network/Connection.h" +#include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/LoginPacket.h" #include "minecraft/network/packet/PreLoginPacket.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerPlayer.h" -#include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" -#include "minecraft/network/packet/DisconnectPacket.h" -#include "Minecraft.Client/Common/src/BuildVer/BuildVer.h" class Packet; // #if 0 diff --git a/targets/minecraft/server/network/PlayerConnection.cpp b/targets/minecraft/server/network/PlayerConnection.cpp index f8c65f97c..3685d9884 100644 --- a/targets/minecraft/server/network/PlayerConnection.cpp +++ b/targets/minecraft/server/network/PlayerConnection.cpp @@ -1,6 +1,7 @@ #include "PlayerConnection.h" #include + #include #include #include @@ -38,6 +39,7 @@ #include "minecraft/network/packet/CraftItemPacket.h" #include "minecraft/network/packet/CustomPayloadPacket.h" #include "minecraft/network/packet/DebugOptionsPacket.h" +#include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/GameCommandPacket.h" #include "minecraft/network/packet/GameEventPacket.h" #include "minecraft/network/packet/InteractPacket.h" @@ -99,7 +101,6 @@ #include "minecraft/world/level/tile/entity/SignTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/network/packet/DisconnectPacket.h" class SavedData; diff --git a/targets/minecraft/stats/Achievement.cpp b/targets/minecraft/stats/Achievement.cpp index 89962f9d2..6643d2e1f 100644 --- a/targets/minecraft/stats/Achievement.cpp +++ b/targets/minecraft/stats/Achievement.cpp @@ -5,8 +5,8 @@ #include "Achievements.h" #include "DescFormatter.h" #include "minecraft/locale/I18n.h" -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/stats/Stat.h" +#include "minecraft/world/item/ItemInstance.h" class Item; class Tile; diff --git a/targets/minecraft/stats/CommonStats.cpp b/targets/minecraft/stats/CommonStats.cpp index d26ad7425..b2e791216 100644 --- a/targets/minecraft/stats/CommonStats.cpp +++ b/targets/minecraft/stats/CommonStats.cpp @@ -3,10 +3,10 @@ #include #include "Achievements.h" -#include "minecraft/world/item/Item.h" -#include "minecraft/world/level/tile/Tile.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/stats/Stats.h" +#include "minecraft/world/item/Item.h" +#include "minecraft/world/level/tile/Tile.h" Stat* CommonStats::get_stat(int i) { return Stats::get(i); } diff --git a/targets/minecraft/stats/CommonStats.h b/targets/minecraft/stats/CommonStats.h index 41adbb343..8bb2d0e88 100644 --- a/targets/minecraft/stats/CommonStats.h +++ b/targets/minecraft/stats/CommonStats.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/stats/GenericStats.h b/targets/minecraft/stats/GenericStats.h index f8e31f3dd..19041b3d6 100644 --- a/targets/minecraft/stats/GenericStats.h +++ b/targets/minecraft/stats/GenericStats.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/stats/Stat.h b/targets/minecraft/stats/Stat.h index acaf5b855..4643496ec 100644 --- a/targets/minecraft/stats/Stat.h +++ b/targets/minecraft/stats/Stat.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/stats/Stats.cpp b/targets/minecraft/stats/Stats.cpp index f23d749a3..a93ab6ae4 100644 --- a/targets/minecraft/stats/Stats.cpp +++ b/targets/minecraft/stats/Stats.cpp @@ -7,13 +7,13 @@ #include "GeneralStat.h" #include "ItemStat.h" #include "console_helpers/StringHelpers.h" +#include "minecraft/stats/Stat.h" #include "minecraft/stats/StatsCounter.h" #include "minecraft/world/item/FishingRodItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/MapItem.h" #include "minecraft/world/level/tile/GrassTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/stats/Stat.h" class StatFormatter; diff --git a/targets/minecraft/stats/StatsCounter.cpp b/targets/minecraft/stats/StatsCounter.cpp index c7c56bfec..8b3983fa2 100644 --- a/targets/minecraft/stats/StatsCounter.cpp +++ b/targets/minecraft/stats/StatsCounter.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/util/Mth.cpp b/targets/minecraft/util/Mth.cpp index 8251ed64d..f48a580d1 100644 --- a/targets/minecraft/util/Mth.cpp +++ b/targets/minecraft/util/Mth.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/util/Mth.h b/targets/minecraft/util/Mth.h index 5747465e9..ac494b605 100644 --- a/targets/minecraft/util/Mth.h +++ b/targets/minecraft/util/Mth.h @@ -1,10 +1,11 @@ #pragma once #include + #include #include -#include #include +#include class Random; diff --git a/targets/minecraft/util/WeighedTreasure.cpp b/targets/minecraft/util/WeighedTreasure.cpp index 5ceb16abd..366af303f 100644 --- a/targets/minecraft/util/WeighedTreasure.cpp +++ b/targets/minecraft/util/WeighedTreasure.cpp @@ -1,10 +1,10 @@ #include "WeighedTreasure.h" #include "java/Random.h" +#include "minecraft/util/WeighedRandom.h" #include "minecraft/world/Container.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/entity/DispenserTileEntity.h" -#include "minecraft/util/WeighedRandom.h" WeighedTreasure::WeighedTreasure(int itemId, int auxValue, int minCount, int maxCount, int weight) diff --git a/targets/minecraft/world/SimpleContainer.cpp b/targets/minecraft/world/SimpleContainer.cpp index cd3643c19..c6097afb5 100644 --- a/targets/minecraft/world/SimpleContainer.cpp +++ b/targets/minecraft/world/SimpleContainer.cpp @@ -3,9 +3,9 @@ #include #include "Minecraft.Client/Linux/Linux_App.h" +#include "minecraft/world/Container.h" #include "minecraft/world/item/ItemInstance.h" #include "net.minecraft.world.ContainerListener.h" -#include "minecraft/world/Container.h" SimpleContainer::SimpleContainer(int name, std::wstring stringName, bool customName, int size) { diff --git a/targets/minecraft/world/damageSource/CombatEntry.cpp b/targets/minecraft/world/damageSource/CombatEntry.cpp index d2e942d6e..68d7581ce 100644 --- a/targets/minecraft/world/damageSource/CombatEntry.cpp +++ b/targets/minecraft/world/damageSource/CombatEntry.cpp @@ -4,9 +4,9 @@ #include #include "java/Class.h" +#include "minecraft/world/damageSource/CombatTracker.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" -#include "minecraft/world/damageSource/CombatTracker.h" CombatEntry::CombatEntry(DamageSource* source, int time, float health, float damage, CombatTracker::eLOCATION location, diff --git a/targets/minecraft/world/effect/AbsoptionMobEffect.cpp b/targets/minecraft/world/effect/AbsoptionMobEffect.cpp index 752c9a00f..c301110e0 100644 --- a/targets/minecraft/world/effect/AbsoptionMobEffect.cpp +++ b/targets/minecraft/world/effect/AbsoptionMobEffect.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/effect/MobEffect.h" +#include "minecraft/world/entity/LivingEntity.h" AbsoptionMobEffect::AbsoptionMobEffect(int id, bool isHarmful, eMinecraftColour color) diff --git a/targets/minecraft/world/effect/HealthBoostMobEffect.cpp b/targets/minecraft/world/effect/HealthBoostMobEffect.cpp index 12836b48b..baf606b80 100644 --- a/targets/minecraft/world/effect/HealthBoostMobEffect.cpp +++ b/targets/minecraft/world/effect/HealthBoostMobEffect.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/effect/MobEffect.h" +#include "minecraft/world/entity/LivingEntity.h" HealthBoostMobEffect::HealthBoostMobEffect(int id, bool isHarmful, eMinecraftColour color) diff --git a/targets/minecraft/world/effect/MobEffect.cpp b/targets/minecraft/world/effect/MobEffect.cpp index 21f95b080..e01d5ca9e 100644 --- a/targets/minecraft/world/effect/MobEffect.cpp +++ b/targets/minecraft/world/effect/MobEffect.cpp @@ -1,21 +1,22 @@ +#include "minecraft/world/effect/MobEffect.h" + #include #include + #include #include #include #include #include -#include "minecraft/SharedConstants.h" #include "Minecraft.Client/Common/App_enums.h" #include "java/Class.h" -#include "strings.h" +#include "minecraft/SharedConstants.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/effect/AbsoptionMobEffect.h" #include "minecraft/world/effect/AttackDamageMobEffect.h" #include "minecraft/world/effect/HealthBoostMobEffect.h" #include "minecraft/world/effect/InstantaneousMobEffect.h" -#include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" @@ -26,6 +27,7 @@ #include "minecraft/world/food/FoodConstants.h" #include "minecraft/world/food/FoodData.h" #include "minecraft/world/level/Level.h" +#include "strings.h" class Attribute; diff --git a/targets/minecraft/world/effect/MobEffect.h b/targets/minecraft/world/effect/MobEffect.h index bd8fd2350..9fbee2164 100644 --- a/targets/minecraft/world/effect/MobEffect.h +++ b/targets/minecraft/world/effect/MobEffect.h @@ -1,8 +1,8 @@ #pragma once #include -#include #include +#include #include "Minecraft.Client/Common/App_enums.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" diff --git a/targets/minecraft/world/entity/AgeableMob.cpp b/targets/minecraft/world/entity/AgeableMob.cpp index 7ae1b1326..81736ece5 100644 --- a/targets/minecraft/world/entity/AgeableMob.cpp +++ b/targets/minecraft/world/entity/AgeableMob.cpp @@ -6,6 +6,7 @@ #include "java/Class.h" #include "minecraft/SharedConstants.h" #include "minecraft/world/entity/EntityIO.h" +#include "minecraft/world/entity/PathfinderMob.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" @@ -14,7 +15,6 @@ #include "minecraft/world/item/SpawnEggItem.h" #include "minecraft/world/level/Level.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/PathfinderMob.h" class Entity; diff --git a/targets/minecraft/world/entity/DelayedRelease.cpp b/targets/minecraft/world/entity/DelayedRelease.cpp index 50c23daf8..f41d27ff3 100644 --- a/targets/minecraft/world/entity/DelayedRelease.cpp +++ b/targets/minecraft/world/entity/DelayedRelease.cpp @@ -1,7 +1,7 @@ #include "DelayedRelease.h" -#include "minecraft/world/level/Level.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/level/Level.h" DelayedRelease::DelayedRelease(Level* level, std::shared_ptr toRelease, int delay) diff --git a/targets/minecraft/world/entity/Entity.cpp b/targets/minecraft/world/entity/Entity.cpp index da7f2a470..1d7e82679 100644 --- a/targets/minecraft/world/entity/Entity.cpp +++ b/targets/minecraft/world/entity/Entity.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/world/entity/Entity.h b/targets/minecraft/world/entity/Entity.h index cc53d59cc..cc0216bc5 100644 --- a/targets/minecraft/world/entity/Entity.h +++ b/targets/minecraft/world/entity/Entity.h @@ -1,8 +1,8 @@ #pragma once #include -#include #include +#include #include #include @@ -31,7 +31,8 @@ class Tile; class ItemInstance; class DoubleTag; class FloatTag; -template class ListTag; +template +class ListTag; // 4J Stu Added this mainly to allow is to record telemetry for player deaths enum EEntityDamageType { diff --git a/targets/minecraft/world/entity/EntityIO.cpp b/targets/minecraft/world/entity/EntityIO.cpp index 54f5b2625..d5e8c7bfd 100644 --- a/targets/minecraft/world/entity/EntityIO.cpp +++ b/targets/minecraft/world/entity/EntityIO.cpp @@ -3,13 +3,10 @@ #include #include "Entity.h" +#include "Minecraft.Client/Linux/Linux_App.h" #include "Painting.h" #include "java/Class.h" -#include "minecraft/world/entity/boss/wither/WitherBoss.h" -#include "Minecraft.Client/Linux/Linux_App.h" #include "java/JavaIntHash.h" -#include "nbt/CompoundTag.h" -#include "strings.h" #include "minecraft/world/entity/ExperienceOrb.h" #include "minecraft/world/entity/ItemFrame.h" #include "minecraft/world/entity/LeashFenceKnotEntity.h" @@ -28,6 +25,7 @@ #include "minecraft/world/entity/animal/Wolf.h" #include "minecraft/world/entity/boss/enderdragon/EnderCrystal.h" #include "minecraft/world/entity/boss/enderdragon/EnderDragon.h" +#include "minecraft/world/entity/boss/wither/WitherBoss.h" #include "minecraft/world/entity/item/Boat.h" #include "minecraft/world/entity/item/FallingTile.h" #include "minecraft/world/entity/item/ItemEntity.h" @@ -66,6 +64,8 @@ #include "minecraft/world/entity/projectile/ThrownExpBottle.h" #include "minecraft/world/entity/projectile/ThrownPotion.h" #include "minecraft/world/entity/projectile/WitherSkull.h" +#include "nbt/CompoundTag.h" +#include "strings.h" std::unordered_map* EntityIO::idCreateMap = new std::unordered_map; diff --git a/targets/minecraft/world/entity/EntityIO.h b/targets/minecraft/world/entity/EntityIO.h index 9ad00800e..983fee3da 100644 --- a/targets/minecraft/world/entity/EntityIO.h +++ b/targets/minecraft/world/entity/EntityIO.h @@ -5,10 +5,10 @@ #include #include "Entity.h" -#include "Minecraft.Client/Common/src/Colours/ColourTable.h" -#include "java/JavaIntHash.h" #include "Minecraft.Client/Common/App_enums.h" +#include "Minecraft.Client/Common/src/Colours/ColourTable.h" #include "java/Class.h" +#include "java/JavaIntHash.h" class Level; class CompoundTag; diff --git a/targets/minecraft/world/entity/ExperienceOrb.cpp b/targets/minecraft/world/entity/ExperienceOrb.cpp index ec247fe27..ae2931421 100644 --- a/targets/minecraft/world/entity/ExperienceOrb.cpp +++ b/targets/minecraft/world/entity/ExperienceOrb.cpp @@ -2,6 +2,7 @@ #include #include + #include #include "java/JavaMath.h" @@ -10,6 +11,7 @@ #include "minecraft/sounds/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" @@ -17,7 +19,6 @@ #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" const int ExperienceOrb::LIFETIME = 5 * 60 * SharedConstants::TICKS_PER_SECOND; // Five minutes! diff --git a/targets/minecraft/world/entity/FlyingMob.cpp b/targets/minecraft/world/entity/FlyingMob.cpp index a1f1b2184..b229578e5 100644 --- a/targets/minecraft/world/entity/FlyingMob.cpp +++ b/targets/minecraft/world/entity/FlyingMob.cpp @@ -3,10 +3,10 @@ #include #include "minecraft/util/Mth.h" +#include "minecraft/world/entity/Mob.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/Mob.h" FlyingMob::FlyingMob(Level* level) : Mob(level) {} diff --git a/targets/minecraft/world/entity/HangingEntity.cpp b/targets/minecraft/world/entity/HangingEntity.cpp index 868153949..de45a3e56 100644 --- a/targets/minecraft/world/entity/HangingEntity.cpp +++ b/targets/minecraft/world/entity/HangingEntity.cpp @@ -1,6 +1,7 @@ #include "HangingEntity.h" #include + #include #include #include @@ -9,13 +10,13 @@ #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/damageSource/EntityDamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" void HangingEntity::_init(Level* level) { checkInterval = 0; diff --git a/targets/minecraft/world/entity/ItemFrame.cpp b/targets/minecraft/world/entity/ItemFrame.cpp index 14dee61dd..f57dd9a61 100644 --- a/targets/minecraft/world/entity/ItemFrame.cpp +++ b/targets/minecraft/world/entity/ItemFrame.cpp @@ -1,21 +1,22 @@ #include "ItemFrame.h" #include + #include #include "java/Random.h" +#include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/HangingEntity.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/MapItem.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/saveddata/MapItemSavedData.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/entity/HangingEntity.h" -#include "minecraft/world/item/ItemInstance.h" // 4J - added for common ctor code void ItemFrame::_init() { diff --git a/targets/minecraft/world/entity/LeashFenceKnotEntity.cpp b/targets/minecraft/world/entity/LeashFenceKnotEntity.cpp index fc3c1ed33..6e06df6a5 100644 --- a/targets/minecraft/world/entity/LeashFenceKnotEntity.cpp +++ b/targets/minecraft/world/entity/LeashFenceKnotEntity.cpp @@ -2,6 +2,7 @@ #include +#include "minecraft/world/entity/HangingEntity.h" #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" @@ -10,7 +11,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/HangingEntity.h" class CompoundTag; class Entity; diff --git a/targets/minecraft/world/entity/LivingEntity.cpp b/targets/minecraft/world/entity/LivingEntity.cpp index c032031ab..31ad577e8 100644 --- a/targets/minecraft/world/entity/LivingEntity.cpp +++ b/targets/minecraft/world/entity/LivingEntity.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -31,9 +32,11 @@ #include "minecraft/world/damageSource/EntityDamageSource.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/EntityEvent.h" #include "minecraft/world/entity/ExperienceOrb.h" #include "minecraft/world/entity/Mob.h" +#include "minecraft/world/entity/MobType.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" @@ -62,8 +65,6 @@ #include "nbt/ListTag.h" #include "nbt/ShortTag.h" #include "nbt/Tag.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/entity/MobType.h" class Icon; diff --git a/targets/minecraft/world/entity/LivingEntity.h b/targets/minecraft/world/entity/LivingEntity.h index 977dcdeda..aa870bbb6 100644 --- a/targets/minecraft/world/entity/LivingEntity.h +++ b/targets/minecraft/world/entity/LivingEntity.h @@ -1,16 +1,17 @@ #pragma once #include + +#include #include #include -#include #include #include "Entity.h" #include "MobType.h" +#include "java/Class.h" #include "minecraft/SharedConstants.h" #include "minecraft/world/entity/ai/goal/GoalSelector.h" -#include "java/Class.h" #include "minecraft/world/item/ItemInstance.h" class CombatTracker; diff --git a/targets/minecraft/world/entity/Mob.cpp b/targets/minecraft/world/entity/Mob.cpp index 6103aa113..bee087835 100644 --- a/targets/minecraft/world/entity/Mob.cpp +++ b/targets/minecraft/world/entity/Mob.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/world/entity/Mob.h b/targets/minecraft/world/entity/Mob.h index cb0927929..5e86805c8 100644 --- a/targets/minecraft/world/entity/Mob.h +++ b/targets/minecraft/world/entity/Mob.h @@ -6,9 +6,9 @@ #include "LivingEntity.h" #include "MobType.h" -#include "minecraft/world/entity/ai/goal/GoalSelector.h" #include "java/Class.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/ai/goal/GoalSelector.h" class HitResult; class Level; diff --git a/targets/minecraft/world/entity/Painting.cpp b/targets/minecraft/world/entity/Painting.cpp index 3016b9a9e..fdf21cf77 100644 --- a/targets/minecraft/world/entity/Painting.cpp +++ b/targets/minecraft/world/entity/Painting.cpp @@ -5,13 +5,13 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" +#include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/HangingEntity.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/entity/HangingEntity.h" typedef Painting::Motive _Motive; const _Motive* Painting::Motive::values[] = { diff --git a/targets/minecraft/world/entity/PathfinderMob.cpp b/targets/minecraft/world/entity/PathfinderMob.cpp index 0e13ebc25..bb907cab2 100644 --- a/targets/minecraft/world/entity/PathfinderMob.cpp +++ b/targets/minecraft/world/entity/PathfinderMob.cpp @@ -7,6 +7,7 @@ #include "minecraft/Pos.h" #include "minecraft/SharedConstants.h" #include "minecraft/util/Mth.h" +#include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/TamableAnimal.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" @@ -19,7 +20,6 @@ #include "minecraft/world/level/pathfinder/Path.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" -#include "minecraft/world/entity/Mob.h" AttributeModifier* PathfinderMob::SPEED_MODIFIER_FLEEING = (new AttributeModifier(eModifierId_MOB_FLEEING, 2.0f, diff --git a/targets/minecraft/world/entity/PathfinderMob.h b/targets/minecraft/world/entity/PathfinderMob.h index 661195b93..774e9b620 100644 --- a/targets/minecraft/world/entity/PathfinderMob.h +++ b/targets/minecraft/world/entity/PathfinderMob.h @@ -5,7 +5,6 @@ #include "Mob.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/Mob.h" -#include "minecraft/world/entity/Entity.h" class Level; class Path; diff --git a/targets/minecraft/world/entity/SyncedEntityData.cpp b/targets/minecraft/world/entity/SyncedEntityData.cpp index 51c154d0d..cca799246 100644 --- a/targets/minecraft/world/entity/SyncedEntityData.cpp +++ b/targets/minecraft/world/entity/SyncedEntityData.cpp @@ -1,6 +1,7 @@ #include "SyncedEntityData.h" #include + #include #include "Minecraft.Client/Linux/Linux_App.h" diff --git a/targets/minecraft/world/entity/SyncedEntityData.h b/targets/minecraft/world/entity/SyncedEntityData.h index e0340e4e2..3a06aea25 100644 --- a/targets/minecraft/world/entity/SyncedEntityData.h +++ b/targets/minecraft/world/entity/SyncedEntityData.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/entity/ai/attributes/BaseAttributeMap.cpp b/targets/minecraft/world/entity/ai/attributes/BaseAttributeMap.cpp index 1081599ae..20c077c52 100644 --- a/targets/minecraft/world/entity/ai/attributes/BaseAttributeMap.cpp +++ b/targets/minecraft/world/entity/ai/attributes/BaseAttributeMap.cpp @@ -3,10 +3,10 @@ #include #include +#include "minecraft/world/entity/ai/attributes/Attribute.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" #include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/entity/ai/attributes/Attribute.h" BaseAttributeMap::~BaseAttributeMap() { for (auto it = attributesById.begin(); it != attributesById.end(); ++it) { diff --git a/targets/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h b/targets/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h index 6c00e2abc..98312b276 100644 --- a/targets/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h +++ b/targets/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h @@ -5,7 +5,6 @@ #include "AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" -#include "minecraft/world/entity/ai/attributes/AttributeModifier.h" class Attribute; class BaseAttributeMap; diff --git a/targets/minecraft/world/entity/ai/attributes/RangedAttribute.h b/targets/minecraft/world/entity/ai/attributes/RangedAttribute.h index d5be1828c..b6bd3f2d8 100644 --- a/targets/minecraft/world/entity/ai/attributes/RangedAttribute.h +++ b/targets/minecraft/world/entity/ai/attributes/RangedAttribute.h @@ -2,7 +2,6 @@ #include "BaseAttribute.h" #include "minecraft/world/entity/ai/attributes/Attribute.h" -#include "minecraft/world/entity/ai/attributes/Attribute.h" class RangedAttribute : public BaseAttribute { private: diff --git a/targets/minecraft/world/entity/ai/goal/BreakDoorGoal.cpp b/targets/minecraft/world/entity/ai/goal/BreakDoorGoal.cpp index edd4ed59d..3e7649924 100644 --- a/targets/minecraft/world/entity/ai/goal/BreakDoorGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/BreakDoorGoal.cpp @@ -3,11 +3,11 @@ #include "java/Random.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/entity/Mob.h" +#include "minecraft/world/entity/ai/goal/DoorInteractGoal.h" #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/DoorTile.h" #include "minecraft/world/level/tile/LevelEvent.h" -#include "minecraft/world/entity/ai/goal/DoorInteractGoal.h" BreakDoorGoal::BreakDoorGoal(Mob* mob) : DoorInteractGoal(mob) { breakTime = 0; diff --git a/targets/minecraft/world/entity/ai/goal/LookAtTradingPlayerGoal.cpp b/targets/minecraft/world/entity/ai/goal/LookAtTradingPlayerGoal.cpp index 5a4a1b572..147c6efa2 100644 --- a/targets/minecraft/world/entity/ai/goal/LookAtTradingPlayerGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/LookAtTradingPlayerGoal.cpp @@ -2,9 +2,9 @@ #include +#include "minecraft/world/entity/ai/goal/LookAtPlayerGoal.h" #include "minecraft/world/entity/npc/Villager.h" #include "minecraft/world/entity/player/Player.h" -#include "minecraft/world/entity/ai/goal/LookAtPlayerGoal.h" class Entity; class Mob; diff --git a/targets/minecraft/world/entity/ai/goal/OpenDoorGoal.cpp b/targets/minecraft/world/entity/ai/goal/OpenDoorGoal.cpp index ae9821b36..2e0f0dab4 100644 --- a/targets/minecraft/world/entity/ai/goal/OpenDoorGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/OpenDoorGoal.cpp @@ -1,8 +1,8 @@ #include "OpenDoorGoal.h" #include "minecraft/world/entity/Mob.h" -#include "minecraft/world/level/tile/DoorTile.h" #include "minecraft/world/entity/ai/goal/DoorInteractGoal.h" +#include "minecraft/world/level/tile/DoorTile.h" OpenDoorGoal::OpenDoorGoal(Mob* mob, bool closeDoorAfter) : DoorInteractGoal(mob) { diff --git a/targets/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.cpp b/targets/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.cpp index 03a2b3cf4..20922981c 100644 --- a/targets/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.cpp @@ -3,9 +3,9 @@ #include "java/Random.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/PathfinderMob.h" +#include "minecraft/world/entity/ai/goal/target/TargetGoal.h" #include "minecraft/world/entity/ai/village/Village.h" #include "minecraft/world/entity/animal/VillagerGolem.h" -#include "minecraft/world/entity/ai/goal/target/TargetGoal.h" DefendVillageTargetGoal::DefendVillageTargetGoal(VillagerGolem* golem) : TargetGoal(golem, false, true) { diff --git a/targets/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.cpp b/targets/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.cpp index 4f3ea9185..4b5235d17 100644 --- a/targets/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.cpp @@ -4,9 +4,9 @@ #include #include "minecraft/world/entity/PathfinderMob.h" +#include "minecraft/world/entity/ai/goal/target/TargetGoal.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/ai/goal/target/TargetGoal.h" class Entity; diff --git a/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp b/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp index 5e1583965..a608824b8 100644 --- a/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp @@ -9,9 +9,9 @@ #include "minecraft/world/entity/EntitySelector.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/PathfinderMob.h" +#include "minecraft/world/entity/ai/goal/target/TargetGoal.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/ai/goal/target/TargetGoal.h" SubselectEntitySelector::SubselectEntitySelector( NearestAttackableTargetGoal* parent, EntitySelector* subselector) { diff --git a/targets/minecraft/world/entity/ai/navigation/PathNavigation.cpp b/targets/minecraft/world/entity/ai/navigation/PathNavigation.cpp index 91f528cc6..96bd3e56b 100644 --- a/targets/minecraft/world/entity/ai/navigation/PathNavigation.cpp +++ b/targets/minecraft/world/entity/ai/navigation/PathNavigation.cpp @@ -1,6 +1,7 @@ #include "PathNavigation.h" #include + #include #include "minecraft/util/Mth.h" diff --git a/targets/minecraft/world/entity/ai/village/Village.cpp b/targets/minecraft/world/entity/ai/village/Village.cpp index 1eb47fa00..aec9d4355 100644 --- a/targets/minecraft/world/entity/ai/village/Village.cpp +++ b/targets/minecraft/world/entity/ai/village/Village.cpp @@ -1,6 +1,7 @@ #include "Village.h" #include + #include #include #include @@ -11,18 +12,18 @@ #include "minecraft/Pos.h" #include "minecraft/SharedConstants.h" #include "minecraft/util/Mth.h" +#include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/ai/village/DoorInfo.h" #include "minecraft/world/entity/ai/village/Villages.h" #include "minecraft/world/entity/animal/VillagerGolem.h" #include "minecraft/world/entity/npc/Villager.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" +#include "minecraft/world/phys/Vec3.h" #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/entity/LivingEntity.h" -#include "minecraft/world/entity/ai/village/DoorInfo.h" -#include "minecraft/world/entity/player/Player.h" -#include "minecraft/world/phys/Vec3.h" class Entity; diff --git a/targets/minecraft/world/entity/ai/village/VillageSiege.cpp b/targets/minecraft/world/entity/ai/village/VillageSiege.cpp index faf2e45e3..6520fa6e6 100644 --- a/targets/minecraft/world/entity/ai/village/VillageSiege.cpp +++ b/targets/minecraft/world/entity/ai/village/VillageSiege.cpp @@ -1,6 +1,7 @@ #include "VillageSiege.h" #include + #include #include #include diff --git a/targets/minecraft/world/entity/ai/village/Villages.cpp b/targets/minecraft/world/entity/ai/village/Villages.cpp index 37df4cb19..aef878477 100644 --- a/targets/minecraft/world/entity/ai/village/Villages.cpp +++ b/targets/minecraft/world/entity/ai/village/Villages.cpp @@ -1,17 +1,18 @@ #include "Villages.h" #include + #include #include "minecraft/Pos.h" +#include "minecraft/world/entity/ai/village/DoorInfo.h" +#include "minecraft/world/entity/ai/village/Village.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/saveddata/SavedData.h" #include "minecraft/world/level/tile/DoorTile.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/entity/ai/village/DoorInfo.h" -#include "minecraft/world/entity/ai/village/Village.h" -#include "minecraft/world/level/saveddata/SavedData.h" const std::wstring Villages::VILLAGE_FILE_ID = L"villages"; diff --git a/targets/minecraft/world/entity/ambient/Bat.cpp b/targets/minecraft/world/entity/ambient/Bat.cpp index edbf4cd8b..17c9492f5 100644 --- a/targets/minecraft/world/entity/ambient/Bat.cpp +++ b/targets/minecraft/world/entity/ambient/Bat.cpp @@ -1,6 +1,7 @@ #include "Bat.h" #include + #include #include #include @@ -11,13 +12,13 @@ #include "minecraft/util/Mth.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "minecraft/world/entity/ambient/AmbientCreature.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/level/Calendar.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/ambient/AmbientCreature.h" Bat::Bat(Level* level) : AmbientCreature(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/animal/Animal.cpp b/targets/minecraft/world/entity/animal/Animal.cpp index 49941b830..de1f2ee2b 100644 --- a/targets/minecraft/world/entity/animal/Animal.cpp +++ b/targets/minecraft/world/entity/animal/Animal.cpp @@ -6,12 +6,10 @@ #include #include -#include "java/Random.h" -#include "minecraft/util/Mth.h" -#include "minecraft/core/particles/ParticleTypes.h" #include "java/Class.h" -#include "nbt/CompoundTag.h" -#include "strings.h" +#include "java/Random.h" +#include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/damageSource/EntityDamageSource.h" #include "minecraft/world/entity/AgeableMob.h" @@ -30,6 +28,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" +#include "nbt/CompoundTag.h" +#include "strings.h" Animal::Animal(Level* level) : AgableMob(level) { // inLove = 0; diff --git a/targets/minecraft/world/entity/animal/Animal.h b/targets/minecraft/world/entity/animal/Animal.h index 61c3b38aa..e321c9e80 100644 --- a/targets/minecraft/world/entity/animal/Animal.h +++ b/targets/minecraft/world/entity/animal/Animal.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include "minecraft/world/entity/AgeableMob.h" diff --git a/targets/minecraft/world/entity/animal/Chicken.cpp b/targets/minecraft/world/entity/animal/Chicken.cpp index 51b7b33d1..fe69ff10e 100644 --- a/targets/minecraft/world/entity/animal/Chicken.cpp +++ b/targets/minecraft/world/entity/animal/Chicken.cpp @@ -14,12 +14,12 @@ #include "minecraft/world/entity/ai/goal/RandomLookAroundGoal.h" #include "minecraft/world/entity/ai/goal/RandomStrollGoal.h" #include "minecraft/world/entity/ai/goal/TemptGoal.h" +#include "minecraft/world/entity/animal/Animal.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/entity/animal/Animal.h" void Chicken::_init() { sheared = false; diff --git a/targets/minecraft/world/entity/animal/Cow.cpp b/targets/minecraft/world/entity/animal/Cow.cpp index 6833f50d6..a12908a9a 100644 --- a/targets/minecraft/world/entity/animal/Cow.cpp +++ b/targets/minecraft/world/entity/animal/Cow.cpp @@ -16,6 +16,7 @@ #include "minecraft/world/entity/ai/goal/RandomStrollGoal.h" #include "minecraft/world/entity/ai/goal/TemptGoal.h" #include "minecraft/world/entity/ai/navigation/PathNavigation.h" +#include "minecraft/world/entity/animal/Animal.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" @@ -23,7 +24,6 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/entity/animal/Animal.h" Cow::Cow(Level* level) : Animal(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/animal/EntityHorse.cpp b/targets/minecraft/world/entity/animal/EntityHorse.cpp index ea9cfe2ce..132cbd479 100644 --- a/targets/minecraft/world/entity/animal/EntityHorse.cpp +++ b/targets/minecraft/world/entity/animal/EntityHorse.cpp @@ -1,6 +1,7 @@ #include "EntityHorse.h" #include + #include #include #include @@ -36,9 +37,11 @@ #include "minecraft/world/entity/ai/goal/RandomStrollGoal.h" #include "minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.h" #include "minecraft/world/entity/ai/navigation/PathNavigation.h" +#include "minecraft/world/entity/animal/Animal.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/inventory/AnimalChest.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" @@ -48,8 +51,6 @@ #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/entity/animal/Animal.h" -#include "minecraft/world/entity/player/Player.h" class EntitySelector; class Path; diff --git a/targets/minecraft/world/entity/animal/EntityHorse.h b/targets/minecraft/world/entity/animal/EntityHorse.h index db6573851..ff7793525 100644 --- a/targets/minecraft/world/entity/animal/EntityHorse.h +++ b/targets/minecraft/world/entity/animal/EntityHorse.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/entity/animal/MushroomCow.cpp b/targets/minecraft/world/entity/animal/MushroomCow.cpp index 324fc9d49..fb93db10c 100644 --- a/targets/minecraft/world/entity/animal/MushroomCow.cpp +++ b/targets/minecraft/world/entity/animal/MushroomCow.cpp @@ -5,6 +5,7 @@ #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/PathfinderMob.h" +#include "minecraft/world/entity/animal/Cow.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" @@ -15,7 +16,6 @@ #include "minecraft/world/level/tile/PlantTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/animal/Cow.h" MushroomCow::MushroomCow(Level* level) : Cow(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/animal/Ocelot.cpp b/targets/minecraft/world/entity/animal/Ocelot.cpp index 3636eecd2..b4ef7159d 100644 --- a/targets/minecraft/world/entity/animal/Ocelot.cpp +++ b/targets/minecraft/world/entity/animal/Ocelot.cpp @@ -1,9 +1,11 @@ #include "Ocelot.h" #include + #include #include +#include "IPlatformInput.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" #include "java/Random.h" @@ -48,7 +50,6 @@ #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" #include "platform/PlatformServices.h" -#include "IPlatformInput.h" const double Ocelot::SNEAK_SPEED_MOD = 0.6; const double Ocelot::WALK_SPEED_MOD = 0.8; diff --git a/targets/minecraft/world/entity/animal/Pig.cpp b/targets/minecraft/world/entity/animal/Pig.cpp index b777fb728..b9c451e00 100644 --- a/targets/minecraft/world/entity/animal/Pig.cpp +++ b/targets/minecraft/world/entity/animal/Pig.cpp @@ -1,6 +1,7 @@ #include "Pig.h" #include + #include #include @@ -21,6 +22,7 @@ #include "minecraft/world/entity/ai/goal/RandomStrollGoal.h" #include "minecraft/world/entity/ai/goal/TemptGoal.h" #include "minecraft/world/entity/ai/navigation/PathNavigation.h" +#include "minecraft/world/entity/animal/Animal.h" #include "minecraft/world/entity/monster/PigZombie.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" @@ -28,7 +30,6 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/animal/Animal.h" Pig::Pig(Level* level) : Animal(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/animal/Sheep.cpp b/targets/minecraft/world/entity/animal/Sheep.cpp index 0e561e66e..1e5b5aeaf 100644 --- a/targets/minecraft/world/entity/animal/Sheep.cpp +++ b/targets/minecraft/world/entity/animal/Sheep.cpp @@ -1,6 +1,7 @@ #include "Sheep.h" #include + #include #include #include @@ -23,6 +24,7 @@ #include "minecraft/world/entity/ai/goal/RandomStrollGoal.h" #include "minecraft/world/entity/ai/goal/TemptGoal.h" #include "minecraft/world/entity/ai/navigation/PathNavigation.h" +#include "minecraft/world/entity/animal/Animal.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Inventory.h" @@ -36,7 +38,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/animal/Animal.h" const float Sheep::COLOR[Sheep::COLOR_LENGTH][3] = { {1.0f, 1.0f, 1.0f}, // white diff --git a/targets/minecraft/world/entity/animal/SnowMan.cpp b/targets/minecraft/world/entity/animal/SnowMan.cpp index c1f8c96c9..6753eebb6 100644 --- a/targets/minecraft/world/entity/animal/SnowMan.cpp +++ b/targets/minecraft/world/entity/animal/SnowMan.cpp @@ -17,6 +17,7 @@ #include "minecraft/world/entity/ai/goal/RangedAttackGoal.h" #include "minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.h" #include "minecraft/world/entity/ai/navigation/PathNavigation.h" +#include "minecraft/world/entity/animal/Golem.h" #include "minecraft/world/entity/monster/Enemy.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" @@ -25,7 +26,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/entity/animal/Golem.h" SnowMan::SnowMan(Level* level) : Golem(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/animal/Squid.cpp b/targets/minecraft/world/entity/animal/Squid.cpp index 22c94f216..1186ca0f6 100644 --- a/targets/minecraft/world/entity/animal/Squid.cpp +++ b/targets/minecraft/world/entity/animal/Squid.cpp @@ -1,6 +1,7 @@ #include "Squid.h" #include + #include #include @@ -8,6 +9,7 @@ #include "minecraft/SharedConstants.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "minecraft/world/entity/animal/WaterAnimal.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/item/DyePowderItem.h" #include "minecraft/world/item/Item.h" @@ -15,7 +17,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/animal/WaterAnimal.h" void Squid::_init() { xBodyRot = xBodyRotO = 0.0f; diff --git a/targets/minecraft/world/entity/animal/VillagerGolem.cpp b/targets/minecraft/world/entity/animal/VillagerGolem.cpp index d7a55a212..55ae94a50 100644 --- a/targets/minecraft/world/entity/animal/VillagerGolem.cpp +++ b/targets/minecraft/world/entity/animal/VillagerGolem.cpp @@ -30,6 +30,7 @@ #include "minecraft/world/entity/ai/navigation/PathNavigation.h" #include "minecraft/world/entity/ai/village/Village.h" #include "minecraft/world/entity/ai/village/Villages.h" +#include "minecraft/world/entity/animal/Golem.h" #include "minecraft/world/entity/monster/Enemy.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" @@ -38,7 +39,6 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/animal/Golem.h" VillagerGolem::VillagerGolem(Level* level) : Golem(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/animal/Wolf.h b/targets/minecraft/world/entity/animal/Wolf.h index 1815ab1da..80241f4ae 100644 --- a/targets/minecraft/world/entity/animal/Wolf.h +++ b/targets/minecraft/world/entity/animal/Wolf.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp b/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp index 43e33a777..5fb271662 100644 --- a/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp +++ b/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp @@ -3,9 +3,9 @@ #include #include +#include "java/Random.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" -#include "java/Random.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/boss/enderdragon/EnderDragon.h" diff --git a/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.h b/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.h index 4b905e2ae..e72a4b678 100644 --- a/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.h +++ b/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.h @@ -1,7 +1,7 @@ #pragma once -#include "minecraft/world/entity/Entity.h" #include "java/Class.h" +#include "minecraft/world/entity/Entity.h" class Level; diff --git a/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp b/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp index d83f40644..fca96218c 100644 --- a/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp +++ b/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp @@ -1,16 +1,15 @@ #include "EnderDragon.h" +#include #include #include -#include #include -#include "minecraft/SharedConstants.h" -#include "minecraft/util/Mth.h" -#include "minecraft/core/particles/ParticleTypes.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" +#include "minecraft/SharedConstants.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/sounds/SoundTypes.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/ExperienceOrb.h" @@ -30,6 +29,7 @@ #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TheEndPortalTile.h" +#include "nbt/CompoundTag.h" #define PRINT_DRAGON_STATE_CHANGE_MESSAGES 1 diff --git a/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.h b/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.h index c844f6823..23f37a5e5 100644 --- a/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.h +++ b/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.h @@ -5,17 +5,17 @@ #include #include +#include "Minecraft.Client/Linux/Linux_App.h" +#include "java/Class.h" #include "minecraft/stdafx.h" +#include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/boss/BossMob.h" #include "minecraft/world/entity/boss/MultiEntityMob.h" #include "minecraft/world/entity/monster/Enemy.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "java/Class.h" -#include "strings.h" -#include "minecraft/world/entity/LivingEntity.h" -#include "minecraft/world/entity/Mob.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" +#include "strings.h" class MultiEntityMobPart; class EnderCrystal; diff --git a/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp b/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp index a9c5c4001..2a4dc4b5a 100644 --- a/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp +++ b/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp @@ -2,16 +2,16 @@ #include #include + #include #include #include +#include "SharedConstants.h" +#include "java/Random.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/util/Mth.h" -#include "SharedConstants.h" -#include "minecraft/core/particles/ParticleTypes.h" -#include "java/Random.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" @@ -40,6 +40,7 @@ #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" +#include "nbt/CompoundTag.h" bool LivingEntitySelector::matches(std::shared_ptr entity) const { if (entity->instanceof(eTYPE_LIVINGENTITY)) { diff --git a/targets/minecraft/world/entity/boss/wither/WitherBoss.h b/targets/minecraft/world/entity/boss/wither/WitherBoss.h index cc99e87e6..c74245b20 100644 --- a/targets/minecraft/world/entity/boss/wither/WitherBoss.h +++ b/targets/minecraft/world/entity/boss/wither/WitherBoss.h @@ -3,15 +3,15 @@ #include #include +#include "Minecraft.Client/Linux/Linux_App.h" +#include "java/Class.h" #include "minecraft/stdafx.h" +#include "minecraft/world/entity/EntitySelector.h" +#include "minecraft/world/entity/MobType.h" #include "minecraft/world/entity/boss/BossMob.h" #include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/RangedAttackMob.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "java/Class.h" #include "strings.h" -#include "minecraft/world/entity/EntitySelector.h" -#include "minecraft/world/entity/MobType.h" class Entity; class Level; diff --git a/targets/minecraft/world/entity/global/LightningBolt.cpp b/targets/minecraft/world/entity/global/LightningBolt.cpp index b387a13f9..c8df38246 100644 --- a/targets/minecraft/world/entity/global/LightningBolt.cpp +++ b/targets/minecraft/world/entity/global/LightningBolt.cpp @@ -1,6 +1,7 @@ #include "LightningBolt.h" #include + #include #include @@ -10,13 +11,13 @@ #include "minecraft/sounds/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/global/GlobalEntity.h" #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/tile/FireTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/global/GlobalEntity.h" LightningBolt::LightningBolt(Level* level, double x, double y, double z) : life(0), seed(0), flashes(0), GlobalEntity(level) { diff --git a/targets/minecraft/world/entity/item/Boat.cpp b/targets/minecraft/world/entity/item/Boat.cpp index 99cee875c..4e725fcc6 100644 --- a/targets/minecraft/world/entity/item/Boat.cpp +++ b/targets/minecraft/world/entity/item/Boat.cpp @@ -1,6 +1,7 @@ #include "Boat.h" #include + #include #include #include @@ -10,6 +11,7 @@ #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/damageSource/EntityDamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/player/Abilities.h" @@ -19,7 +21,6 @@ #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/Entity.h" const double Boat::MAX_SPEED = 0.35; const double Boat::MAX_COLLISION_SPEED = MAX_SPEED * 0.75; diff --git a/targets/minecraft/world/entity/item/FallingTile.cpp b/targets/minecraft/world/entity/item/FallingTile.cpp index 9d2264f0d..bed84e568 100644 --- a/targets/minecraft/world/entity/item/FallingTile.cpp +++ b/targets/minecraft/world/entity/item/FallingTile.cpp @@ -1,6 +1,7 @@ #include "FallingTile.h" #include + #include #include #include @@ -9,6 +10,7 @@ #include "java/Random.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/HeavyTile.h" @@ -16,7 +18,6 @@ #include "minecraft/world/level/tile/entity/TileEntity.h" #include "nbt/CompoundTag.h" #include "nbt/Tag.h" -#include "minecraft/world/entity/Entity.h" // 4J - added for common ctor code void FallingTile::_init() { diff --git a/targets/minecraft/world/entity/item/ItemEntity.cpp b/targets/minecraft/world/entity/item/ItemEntity.cpp index 2cd3aab12..0f58840dc 100644 --- a/targets/minecraft/world/entity/item/ItemEntity.cpp +++ b/targets/minecraft/world/entity/item/ItemEntity.cpp @@ -1,29 +1,30 @@ #include "ItemEntity.h" #include + #include #include #include #include "Minecraft.Client/Linux/Linux_App.h" +#include "SharedConstants.h" #include "java/JavaMath.h" #include "java/Random.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" -#include "SharedConstants.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/item/ItemInstance.h" void ItemEntity::_init() { age = 0; diff --git a/targets/minecraft/world/entity/item/Minecart.cpp b/targets/minecraft/world/entity/item/Minecart.cpp index 0e8c8d9f5..f686006ee 100644 --- a/targets/minecraft/world/entity/item/Minecart.cpp +++ b/targets/minecraft/world/entity/item/Minecart.cpp @@ -3,6 +3,7 @@ #include #include #include + #include #include #include diff --git a/targets/minecraft/world/entity/item/Minecart.h b/targets/minecraft/world/entity/item/Minecart.h index 75dc03256..5b71c4b50 100644 --- a/targets/minecraft/world/entity/item/Minecart.h +++ b/targets/minecraft/world/entity/item/Minecart.h @@ -1,10 +1,10 @@ #pragma once -#include #include +#include #include -#include "minecraft/world/entity/Entity.h" #include "java/Class.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/phys/Vec3.h" class DamageSource; diff --git a/targets/minecraft/world/entity/item/MinecartChest.cpp b/targets/minecraft/world/entity/item/MinecartChest.cpp index 8bf18675a..8c736c064 100644 --- a/targets/minecraft/world/entity/item/MinecartChest.cpp +++ b/targets/minecraft/world/entity/item/MinecartChest.cpp @@ -1,9 +1,9 @@ #include "MinecartChest.h" #include "minecraft/network/packet/ContainerOpenPacket.h" +#include "minecraft/world/entity/item/MinecartContainer.h" #include "minecraft/world/level/tile/ChestTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/entity/item/MinecartContainer.h" class Level; diff --git a/targets/minecraft/world/entity/item/MinecartContainer.cpp b/targets/minecraft/world/entity/item/MinecartContainer.cpp index 4ca2b6642..dfed95bba 100644 --- a/targets/minecraft/world/entity/item/MinecartContainer.cpp +++ b/targets/minecraft/world/entity/item/MinecartContainer.cpp @@ -4,9 +4,6 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/entity/item/Minecart.h" @@ -15,6 +12,9 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/redstone/Redstone.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" void MinecartContainer::_init() { items = std::vector>(9 * 4); diff --git a/targets/minecraft/world/entity/item/MinecartFurnace.cpp b/targets/minecraft/world/entity/item/MinecartFurnace.cpp index a8123d041..6b84e8494 100644 --- a/targets/minecraft/world/entity/item/MinecartFurnace.cpp +++ b/targets/minecraft/world/entity/item/MinecartFurnace.cpp @@ -1,6 +1,7 @@ #include "MinecartFurnace.h" #include + #include #include @@ -11,6 +12,7 @@ #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/SyncedEntityData.h" +#include "minecraft/world/entity/item/Minecart.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" @@ -19,7 +21,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/item/Minecart.h" MinecartFurnace::MinecartFurnace(Level* level) : Minecart(level) { defineSynchedData(); diff --git a/targets/minecraft/world/entity/item/MinecartHopper.h b/targets/minecraft/world/entity/item/MinecartHopper.h index 842d8d347..05281dbc4 100644 --- a/targets/minecraft/world/entity/item/MinecartHopper.h +++ b/targets/minecraft/world/entity/item/MinecartHopper.h @@ -4,8 +4,8 @@ #include #include "MinecartContainer.h" -#include "minecraft/world/level/tile/entity/Hopper.h" #include "java/Class.h" +#include "minecraft/world/level/tile/entity/Hopper.h" class Entity; class Level; diff --git a/targets/minecraft/world/entity/item/MinecartRideable.cpp b/targets/minecraft/world/entity/item/MinecartRideable.cpp index 30c5aca5b..e094947a2 100644 --- a/targets/minecraft/world/entity/item/MinecartRideable.cpp +++ b/targets/minecraft/world/entity/item/MinecartRideable.cpp @@ -3,9 +3,9 @@ #include #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/item/Minecart.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/entity/item/Minecart.h" MinecartRideable::MinecartRideable(Level* level) : Minecart(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/item/MinecartSpawner.cpp b/targets/minecraft/world/entity/item/MinecartSpawner.cpp index 9f58667d3..dc277eea2 100644 --- a/targets/minecraft/world/entity/item/MinecartSpawner.cpp +++ b/targets/minecraft/world/entity/item/MinecartSpawner.cpp @@ -1,10 +1,10 @@ #include "MinecartSpawner.h" #include "minecraft/util/Mth.h" +#include "minecraft/world/entity/item/Minecart.h" #include "minecraft/world/level/BaseMobSpawner.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/entity/item/Minecart.h" MinecartSpawner::MinecartMobSpawner::MinecartMobSpawner( MinecartSpawner* parent) { diff --git a/targets/minecraft/world/entity/item/MinecartTNT.cpp b/targets/minecraft/world/entity/item/MinecartTNT.cpp index 5967ac235..693a0cb81 100644 --- a/targets/minecraft/world/entity/item/MinecartTNT.cpp +++ b/targets/minecraft/world/entity/item/MinecartTNT.cpp @@ -1,6 +1,7 @@ #include "MinecartTNT.h" #include + #include #include @@ -8,12 +9,12 @@ #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/item/Minecart.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/BaseRailTile.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/item/Minecart.h" void MinecartTNT::_init() { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/item/PrimedTnt.cpp b/targets/minecraft/world/entity/item/PrimedTnt.cpp index a7d832102..481dd4e0d 100644 --- a/targets/minecraft/world/entity/item/PrimedTnt.cpp +++ b/targets/minecraft/world/entity/item/PrimedTnt.cpp @@ -1,15 +1,16 @@ #include "PrimedTnt.h" #include + #include #include #include #include "java/JavaMath.h" #include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/Level.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" class LivingEntity; diff --git a/targets/minecraft/world/entity/monster/Blaze.cpp b/targets/minecraft/world/entity/monster/Blaze.cpp index b6282ba90..29a11762d 100644 --- a/targets/minecraft/world/entity/monster/Blaze.cpp +++ b/targets/minecraft/world/entity/monster/Blaze.cpp @@ -1,6 +1,7 @@ #include "Blaze.h" #include + #include #include #include @@ -14,13 +15,13 @@ #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/projectile/SmallFireball.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/monster/Monster.h" Blaze::Blaze(Level* level) : Monster(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/monster/CaveSpider.cpp b/targets/minecraft/world/entity/monster/CaveSpider.cpp index 8a4c554f0..7ac2661e6 100644 --- a/targets/minecraft/world/entity/monster/CaveSpider.cpp +++ b/targets/minecraft/world/entity/monster/CaveSpider.cpp @@ -10,8 +10,8 @@ #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" -#include "minecraft/world/level/Level.h" #include "minecraft/world/entity/monster/Spider.h" +#include "minecraft/world/level/Level.h" CaveSpider::CaveSpider(Level* level) : Spider(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/monster/Creeper.cpp b/targets/minecraft/world/entity/monster/Creeper.cpp index 9817299f4..b37050c35 100644 --- a/targets/minecraft/world/entity/monster/Creeper.cpp +++ b/targets/minecraft/world/entity/monster/Creeper.cpp @@ -1,6 +1,7 @@ #include "Creeper.h" #include + #include #include @@ -22,13 +23,13 @@ #include "minecraft/world/entity/ai/goal/target/HurtByTargetGoal.h" #include "minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.h" #include "minecraft/world/entity/animal/Ocelot.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/Level.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/monster/Monster.h" void Creeper::_init() { swell = 0; diff --git a/targets/minecraft/world/entity/monster/EnderMan.cpp b/targets/minecraft/world/entity/monster/EnderMan.cpp index b695b9065..30bc76b3c 100644 --- a/targets/minecraft/world/entity/monster/EnderMan.cpp +++ b/targets/minecraft/world/entity/monster/EnderMan.cpp @@ -3,6 +3,7 @@ #include #include #include + #include #include @@ -18,6 +19,7 @@ #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" @@ -30,7 +32,6 @@ #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/monster/Monster.h" AttributeModifier* EnderMan::SPEED_MODIFIER_ATTACKING = (new AttributeModifier(eModifierId_MOB_ENDERMAN_ATTACKSPEED, 6.2f, diff --git a/targets/minecraft/world/entity/monster/Ghast.cpp b/targets/minecraft/world/entity/monster/Ghast.cpp index 874d88dde..4550f5b87 100644 --- a/targets/minecraft/world/entity/monster/Ghast.cpp +++ b/targets/minecraft/world/entity/monster/Ghast.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -17,6 +18,7 @@ #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "minecraft/world/entity/monster/Enemy.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/LargeFireball.h" @@ -26,7 +28,6 @@ #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/monster/Enemy.h" void Ghast::_init() { explosionPower = 1; diff --git a/targets/minecraft/world/entity/monster/Giant.cpp b/targets/minecraft/world/entity/monster/Giant.cpp index 747997f6a..6fb4236be 100644 --- a/targets/minecraft/world/entity/monster/Giant.cpp +++ b/targets/minecraft/world/entity/monster/Giant.cpp @@ -1,9 +1,9 @@ #include "Giant.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/entity/monster/Monster.h" Giant::Giant(Level* level) : Monster(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/monster/LavaSlime.cpp b/targets/minecraft/world/entity/monster/LavaSlime.cpp index a51fd62e9..5ec06fe10 100644 --- a/targets/minecraft/world/entity/monster/LavaSlime.cpp +++ b/targets/minecraft/world/entity/monster/LavaSlime.cpp @@ -4,14 +4,14 @@ #include #include "java/Random.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" +#include "minecraft/world/entity/monster/Slime.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" -#include "minecraft/core/particles/ParticleTypes.h" -#include "minecraft/world/entity/monster/Slime.h" LavaSlime::LavaSlime(Level* level) : Slime(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/monster/Monster.cpp b/targets/minecraft/world/entity/monster/Monster.cpp index b9103bbdd..9b824540c 100644 --- a/targets/minecraft/world/entity/monster/Monster.cpp +++ b/targets/minecraft/world/entity/monster/Monster.cpp @@ -1,6 +1,7 @@ #include "Monster.h" #include + #include #include @@ -15,6 +16,7 @@ #include "minecraft/world/entity/PathfinderMob.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/BaseAttributeMap.h" +#include "minecraft/world/entity/monster/Enemy.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/enchantment/EnchantmentHelper.h" @@ -22,7 +24,6 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LightLayer.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/monster/Enemy.h" Monster::Monster(Level* level) : PathfinderMob(level) { xpReward = Enemy::XP_REWARD_MEDIUM; diff --git a/targets/minecraft/world/entity/monster/PigZombie.cpp b/targets/minecraft/world/entity/monster/PigZombie.cpp index baeed9d00..a4eecf257 100644 --- a/targets/minecraft/world/entity/monster/PigZombie.cpp +++ b/targets/minecraft/world/entity/monster/PigZombie.cpp @@ -12,13 +12,13 @@ #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" +#include "minecraft/world/entity/monster/Zombie.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/monster/Zombie.h" AttributeModifier* PigZombie::SPEED_MODIFIER_ATTACKING = (new AttributeModifier(eModifierId_MOB_PIG_ATTACKSPEED, 0.45, diff --git a/targets/minecraft/world/entity/monster/Silverfish.cpp b/targets/minecraft/world/entity/monster/Silverfish.cpp index 0eb7ebfe9..7177e132d 100644 --- a/targets/minecraft/world/entity/monster/Silverfish.cpp +++ b/targets/minecraft/world/entity/monster/Silverfish.cpp @@ -10,7 +10,9 @@ #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/damageSource/EntityDamageSource.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/MobType.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/GameRules.h" @@ -18,8 +20,6 @@ #include "minecraft/world/level/tile/StoneMonsterTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/MobType.h" -#include "minecraft/world/entity/monster/Monster.h" Silverfish::Silverfish(Level* level) : Monster(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/monster/Skeleton.cpp b/targets/minecraft/world/entity/monster/Skeleton.cpp index 425e407be..4906b8655 100644 --- a/targets/minecraft/world/entity/monster/Skeleton.cpp +++ b/targets/minecraft/world/entity/monster/Skeleton.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -16,6 +17,7 @@ #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/MobType.h" #include "minecraft/world/entity/PathfinderMob.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" @@ -30,9 +32,11 @@ #include "minecraft/world/entity/ai/goal/RestrictSunGoal.h" #include "minecraft/world/entity/ai/goal/target/HurtByTargetGoal.h" #include "minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/Arrow.h" +#include "minecraft/world/item/BowItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/enchantment/Enchantment.h" @@ -44,9 +48,6 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/SkullTileEntity.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/MobType.h" -#include "minecraft/world/entity/monster/Monster.h" -#include "minecraft/world/item/BowItem.h" Skeleton::Skeleton(Level* level) : Monster(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/monster/Slime.cpp b/targets/minecraft/world/entity/monster/Slime.cpp index cd1a4bb34..284175d16 100644 --- a/targets/minecraft/world/entity/monster/Slime.cpp +++ b/targets/minecraft/world/entity/monster/Slime.cpp @@ -2,6 +2,7 @@ #include #include + #include #include @@ -11,6 +12,7 @@ #include "minecraft/util/Mth.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" @@ -23,7 +25,6 @@ #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Mob.h" void Slime::_init() { jumpDelay = 0; diff --git a/targets/minecraft/world/entity/monster/Spider.cpp b/targets/minecraft/world/entity/monster/Spider.cpp index 88dd54358..c8b24a8e7 100644 --- a/targets/minecraft/world/entity/monster/Spider.cpp +++ b/targets/minecraft/world/entity/monster/Spider.cpp @@ -2,6 +2,7 @@ #include #include + #include #include @@ -13,15 +14,15 @@ #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/MobGroupData.h" +#include "minecraft/world/entity/MobType.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/monster/Skeleton.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/entity/MobType.h" -#include "minecraft/world/entity/monster/Monster.h" Spider::Spider(Level* level) : Monster(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/monster/Witch.cpp b/targets/minecraft/world/entity/monster/Witch.cpp index 1cd1aaed8..fa3366d77 100644 --- a/targets/minecraft/world/entity/monster/Witch.cpp +++ b/targets/minecraft/world/entity/monster/Witch.cpp @@ -24,6 +24,7 @@ #include "minecraft/world/entity/ai/goal/RangedAttackGoal.h" #include "minecraft/world/entity/ai/goal/target/HurtByTargetGoal.h" #include "minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/ThrownPotion.h" @@ -33,7 +34,6 @@ #include "minecraft/world/item/alchemy/PotionBrewing.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/monster/Monster.h" AttributeModifier* Witch::SPEED_MODIFIER_DRINKING = (new AttributeModifier(eModifierId_MOB_WITCH_DRINKSPEED, -0.25f, diff --git a/targets/minecraft/world/entity/monster/Zombie.cpp b/targets/minecraft/world/entity/monster/Zombie.cpp index ecffae228..a7ad70cc3 100644 --- a/targets/minecraft/world/entity/monster/Zombie.cpp +++ b/targets/minecraft/world/entity/monster/Zombie.cpp @@ -1,11 +1,13 @@ #include "Zombie.h" #include + #include #include #include #include +#include "SharedConstants.h" #include "java/Random.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/GenericStats.h" @@ -18,6 +20,7 @@ #include "minecraft/world/entity/EntityEvent.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/MobGroupData.h" +#include "minecraft/world/entity/MobType.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/Attribute.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" @@ -36,6 +39,7 @@ #include "minecraft/world/entity/ai/goal/target/HurtByTargetGoal.h" #include "minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.h" #include "minecraft/world/entity/ai/navigation/PathNavigation.h" +#include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/npc/Villager.h" #include "minecraft/world/entity/player/Abilities.h" @@ -48,9 +52,6 @@ #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" -#include "SharedConstants.h" -#include "minecraft/world/entity/MobType.h" -#include "minecraft/world/entity/monster/Monster.h" Attribute* Zombie::SPAWN_REINFORCEMENTS_CHANCE = (new RangedAttribute(eAttributeId_ZOMBIE_SPAWNREINFORCEMENTS, 0, 0, 1)); diff --git a/targets/minecraft/world/entity/npc/Villager.cpp b/targets/minecraft/world/entity/npc/Villager.cpp index f9decf992..1192ea746 100644 --- a/targets/minecraft/world/entity/npc/Villager.cpp +++ b/targets/minecraft/world/entity/npc/Villager.cpp @@ -4,15 +4,13 @@ #include #include -#include "minecraft/util/Mth.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "Pos.h" #include "SharedConstants.h" -#include "minecraft/core/particles/ParticleTypes.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/sounds/SoundTypes.h" -#include "strings.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" @@ -55,6 +53,8 @@ #include "minecraft/world/item/trading/MerchantRecipeList.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" +#include "nbt/CompoundTag.h" +#include "strings.h" namespace { struct VillagerShuffleRandom { diff --git a/targets/minecraft/world/entity/npc/Villager.h b/targets/minecraft/world/entity/npc/Villager.h index 050ce17e5..6610fc805 100644 --- a/targets/minecraft/world/entity/npc/Villager.h +++ b/targets/minecraft/world/entity/npc/Villager.h @@ -1,17 +1,18 @@ #pragma once #include + #include #include #include #include #include "Npc.h" +#include "java/Class.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/world/entity/AgeableMob.h" -#include "minecraft/world/item/trading/Merchant.h" -#include "java/Class.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/trading/Merchant.h" class Level; class Village; diff --git a/targets/minecraft/world/entity/player/Inventory.cpp b/targets/minecraft/world/entity/player/Inventory.cpp index cca07fc84..6b0c7624c 100644 --- a/targets/minecraft/world/entity/player/Inventory.cpp +++ b/targets/minecraft/world/entity/player/Inventory.cpp @@ -1,21 +1,22 @@ #include "Inventory.h" #include + #include -#include "minecraft/world/level/material/Material.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" #include "minecraft/stats/GenericStats.h" -#include "strings.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/ArmorItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" const int Inventory::POP_TIME_DURATION = 5; const int Inventory::MAX_INVENTORY_STACK_SIZE = 64; diff --git a/targets/minecraft/world/entity/player/Inventory.h b/targets/minecraft/world/entity/player/Inventory.h index c1416dce9..fbfca0df1 100644 --- a/targets/minecraft/world/entity/player/Inventory.h +++ b/targets/minecraft/world/entity/player/Inventory.h @@ -11,7 +11,8 @@ class Player; class CompoundTag; class Item; class Tile; -template class ListTag; +template +class ListTag; class Inventory : public Container { public: diff --git a/targets/minecraft/world/entity/player/Player.cpp b/targets/minecraft/world/entity/player/Player.cpp index b82c08fdc..3447a27ea 100644 --- a/targets/minecraft/world/entity/player/Player.cpp +++ b/targets/minecraft/world/entity/player/Player.cpp @@ -11,6 +11,7 @@ #include #include + #include #include #include @@ -41,7 +42,9 @@ #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/EntityEvent.h" +#include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/attributes/BaseAttributeMap.h" @@ -52,6 +55,7 @@ #include "minecraft/world/entity/item/Minecart.h" #include "minecraft/world/entity/monster/Monster.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" +#include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/projectile/Arrow.h" #include "minecraft/world/food/FoodConstants.h" #include "minecraft/world/food/FoodData.h" @@ -61,6 +65,7 @@ #include "minecraft/world/item/BowItem.h" #include "minecraft/world/item/FishingRodItem.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/UseAnim.h" #include "minecraft/world/item/enchantment/EnchantmentHelper.h" #include "minecraft/world/item/enchantment/ThornsEnchantment.h" @@ -80,10 +85,6 @@ #include "minecraft/world/scores/criteria/ObjectiveCriteria.h" #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/entity/LivingEntity.h" -#include "minecraft/world/entity/player/Abilities.h" -#include "minecraft/world/item/ItemInstance.h" class ModelPart; class Objective; diff --git a/targets/minecraft/world/entity/projectile/Arrow.cpp b/targets/minecraft/world/entity/projectile/Arrow.cpp index 91f6ddb8d..5202aac85 100644 --- a/targets/minecraft/world/entity/projectile/Arrow.cpp +++ b/targets/minecraft/world/entity/projectile/Arrow.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -17,6 +18,7 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/player/Abilities.h" @@ -31,7 +33,6 @@ #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" // base damage, multiplied with velocity const double Arrow::ARROW_BASE_DAMAGE = 2.0f; diff --git a/targets/minecraft/world/entity/projectile/DragonFireball.cpp b/targets/minecraft/world/entity/projectile/DragonFireball.cpp index 6dac15745..9e22cbd04 100644 --- a/targets/minecraft/world/entity/projectile/DragonFireball.cpp +++ b/targets/minecraft/world/entity/projectile/DragonFireball.cpp @@ -1,17 +1,18 @@ #include "DragonFireball.h" #include + #include #include "java/JavaMath.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/projectile/Fireball.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/core/particles/ParticleTypes.h" -#include "minecraft/world/entity/projectile/Fireball.h" class Entity; diff --git a/targets/minecraft/world/entity/projectile/EyeOfEnderSignal.cpp b/targets/minecraft/world/entity/projectile/EyeOfEnderSignal.cpp index 57f1b4648..fb09dfca7 100644 --- a/targets/minecraft/world/entity/projectile/EyeOfEnderSignal.cpp +++ b/targets/minecraft/world/entity/projectile/EyeOfEnderSignal.cpp @@ -8,13 +8,13 @@ #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/Entity.h" void EyeOfEnderSignal::_init() { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/projectile/Fireball.cpp b/targets/minecraft/world/entity/projectile/Fireball.cpp index 44094e82a..e6937d415 100644 --- a/targets/minecraft/world/entity/projectile/Fireball.cpp +++ b/targets/minecraft/world/entity/projectile/Fireball.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -13,6 +14,7 @@ #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" @@ -22,7 +24,6 @@ #include "nbt/CompoundTag.h" #include "nbt/DoubleTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/entity/Entity.h" // 4J - added common ctor code. void Fireball::_init() { diff --git a/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp b/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp index 78c09d121..7ca0bccfc 100644 --- a/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp +++ b/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp @@ -1,6 +1,7 @@ #include "FireworksRocketEntity.h" #include + #include #include @@ -9,13 +10,13 @@ #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/util/Mth.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/EntityEvent.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/item/FireworksItem.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" FireworksRocketEntity::FireworksRocketEntity(Level* level) : Entity(level) { defineSynchedData(); diff --git a/targets/minecraft/world/entity/projectile/FishingHook.cpp b/targets/minecraft/world/entity/projectile/FishingHook.cpp index 9a0fff7dd..4d111bdeb 100644 --- a/targets/minecraft/world/entity/projectile/FishingHook.cpp +++ b/targets/minecraft/world/entity/projectile/FishingHook.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -11,6 +12,7 @@ #include "minecraft/sounds/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/ExperienceOrb.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/entity/player/Player.h" @@ -23,7 +25,6 @@ #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" // 4J - added common ctor code. void FishingHook::_init() { diff --git a/targets/minecraft/world/entity/projectile/LargeFireball.cpp b/targets/minecraft/world/entity/projectile/LargeFireball.cpp index 08803c34d..02de91210 100644 --- a/targets/minecraft/world/entity/projectile/LargeFireball.cpp +++ b/targets/minecraft/world/entity/projectile/LargeFireball.cpp @@ -5,11 +5,11 @@ #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/projectile/Fireball.h" #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/HitResult.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/projectile/Fireball.h" LargeFireball::LargeFireball(Level* level) : Fireball(level) { explosionPower = 1; diff --git a/targets/minecraft/world/entity/projectile/SmallFireball.cpp b/targets/minecraft/world/entity/projectile/SmallFireball.cpp index 65a28e9f5..e17e844dc 100644 --- a/targets/minecraft/world/entity/projectile/SmallFireball.cpp +++ b/targets/minecraft/world/entity/projectile/SmallFireball.cpp @@ -4,10 +4,10 @@ #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/projectile/Fireball.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/entity/projectile/Fireball.h" SmallFireball::SmallFireball(Level* level) : Fireball(level) { setSize(5 / 16.0f, 5 / 16.0f); diff --git a/targets/minecraft/world/entity/projectile/Snowball.cpp b/targets/minecraft/world/entity/projectile/Snowball.cpp index 201309736..787846ef3 100644 --- a/targets/minecraft/world/entity/projectile/Snowball.cpp +++ b/targets/minecraft/world/entity/projectile/Snowball.cpp @@ -3,9 +3,9 @@ #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/projectile/Throwable.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/entity/projectile/Throwable.h" class LivingEntity; diff --git a/targets/minecraft/world/entity/projectile/Throwable.cpp b/targets/minecraft/world/entity/projectile/Throwable.cpp index 52b49211a..30bd4d4cf 100644 --- a/targets/minecraft/world/entity/projectile/Throwable.cpp +++ b/targets/minecraft/world/entity/projectile/Throwable.cpp @@ -2,21 +2,22 @@ #include #include + #include #include #include "java/Class.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/Entity.h" -#include "minecraft/world/entity/LivingEntity.h" -#include "minecraft/world/entity/player/Player.h" void Throwable::_throwableInit() { xTile = -1; diff --git a/targets/minecraft/world/entity/projectile/ThrownEgg.cpp b/targets/minecraft/world/entity/projectile/ThrownEgg.cpp index 3127bf114..c81731e8d 100644 --- a/targets/minecraft/world/entity/projectile/ThrownEgg.cpp +++ b/targets/minecraft/world/entity/projectile/ThrownEgg.cpp @@ -6,9 +6,9 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Chicken.h" +#include "minecraft/world/entity/projectile/Throwable.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/entity/projectile/Throwable.h" void ThrownEgg::_init() { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp b/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp index 712825e50..0ada74647 100644 --- a/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp +++ b/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp @@ -7,9 +7,9 @@ #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/projectile/Throwable.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/entity/projectile/Throwable.h" ThrownEnderpearl::ThrownEnderpearl(Level* level) : Throwable(level) { // 4J Stu - This function call had to be moved here from the Entity ctor to diff --git a/targets/minecraft/world/entity/projectile/ThrownExpBottle.cpp b/targets/minecraft/world/entity/projectile/ThrownExpBottle.cpp index 6b18e78e8..4c367794b 100644 --- a/targets/minecraft/world/entity/projectile/ThrownExpBottle.cpp +++ b/targets/minecraft/world/entity/projectile/ThrownExpBottle.cpp @@ -3,9 +3,9 @@ #include "java/JavaMath.h" #include "java/Random.h" #include "minecraft/world/entity/ExperienceOrb.h" +#include "minecraft/world/entity/projectile/Throwable.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/LevelEvent.h" -#include "minecraft/world/entity/projectile/Throwable.h" class LivingEntity; diff --git a/targets/minecraft/world/entity/projectile/ThrownPotion.cpp b/targets/minecraft/world/entity/projectile/ThrownPotion.cpp index b19917b56..c4543a671 100644 --- a/targets/minecraft/world/entity/projectile/ThrownPotion.cpp +++ b/targets/minecraft/world/entity/projectile/ThrownPotion.cpp @@ -1,6 +1,7 @@ #include "ThrownPotion.h" #include + #include #include @@ -9,6 +10,7 @@ #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/projectile/Throwable.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/PotionItem.h" @@ -17,7 +19,6 @@ #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/entity/projectile/Throwable.h" class Entity; diff --git a/targets/minecraft/world/entity/projectile/WitherSkull.cpp b/targets/minecraft/world/entity/projectile/WitherSkull.cpp index 7846d6a7b..e1646e35e 100644 --- a/targets/minecraft/world/entity/projectile/WitherSkull.cpp +++ b/targets/minecraft/world/entity/projectile/WitherSkull.cpp @@ -1,6 +1,7 @@ #include "WitherSkull.h" #include + #include #include "minecraft/SharedConstants.h" @@ -11,11 +12,11 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/SyncedEntityData.h" +#include "minecraft/world/entity/projectile/Fireball.h" #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/entity/projectile/Fireball.h" WitherSkull::WitherSkull(Level* level) : Fireball(level) { defineSynchedData(); diff --git a/targets/minecraft/world/inventory/AbstractContainerMenu.cpp b/targets/minecraft/world/inventory/AbstractContainerMenu.cpp index bea5c3b46..0542a61b6 100644 --- a/targets/minecraft/world/inventory/AbstractContainerMenu.cpp +++ b/targets/minecraft/world/inventory/AbstractContainerMenu.cpp @@ -8,9 +8,9 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" // 4J Stu - The java does not have ctor here (being an abstract) but we need one // to initialise the member variables diff --git a/targets/minecraft/world/inventory/AnimalChest.cpp b/targets/minecraft/world/inventory/AnimalChest.cpp index 584c9f103..454a1fa7c 100644 --- a/targets/minecraft/world/inventory/AnimalChest.cpp +++ b/targets/minecraft/world/inventory/AnimalChest.cpp @@ -1,7 +1,7 @@ #include "AnimalChest.h" -#include "strings.h" #include "minecraft/world/SimpleContainer.h" +#include "strings.h" AnimalChest::AnimalChest(const std::wstring& name, int size) : SimpleContainer(IDS_CONTAINER_ANIMAL, name, false, size) {} diff --git a/targets/minecraft/world/inventory/AnvilMenu.cpp b/targets/minecraft/world/inventory/AnvilMenu.cpp index f099c08f7..e4ac92681 100644 --- a/targets/minecraft/world/inventory/AnvilMenu.cpp +++ b/targets/minecraft/world/inventory/AnvilMenu.cpp @@ -5,10 +5,8 @@ #include #include -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "nbt/ListTag.h" -#include "strings.h" +#include "console_helpers/StringHelpers.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" @@ -26,6 +24,8 @@ #include "minecraft/world/item/enchantment/EnchantmentHelper.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" +#include "nbt/ListTag.h" +#include "strings.h" AnvilMenu::AnvilMenu(std::shared_ptr inventory, Level* level, int xt, int yt, int zt, std::shared_ptr player) { diff --git a/targets/minecraft/world/inventory/ArmorSlot.cpp b/targets/minecraft/world/inventory/ArmorSlot.cpp index 391d3e58f..e150faaf3 100644 --- a/targets/minecraft/world/inventory/ArmorSlot.cpp +++ b/targets/minecraft/world/inventory/ArmorSlot.cpp @@ -1,10 +1,10 @@ #include "ArmorSlot.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ArmorItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/inventory/Slot.h" ArmorSlot::ArmorSlot(int slotNum, std::shared_ptr container, int id, int x, int y) diff --git a/targets/minecraft/world/inventory/BeaconMenu.cpp b/targets/minecraft/world/inventory/BeaconMenu.cpp index 46d3a6539..ea9d87753 100644 --- a/targets/minecraft/world/inventory/BeaconMenu.cpp +++ b/targets/minecraft/world/inventory/BeaconMenu.cpp @@ -2,12 +2,12 @@ #include -#include "minecraft/world/item/Item.h" -#include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/level/tile/entity/BeaconTileEntity.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/Slot.h" #include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" +#include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/level/tile/entity/BeaconTileEntity.h" class Container; diff --git a/targets/minecraft/world/inventory/BrewingStandMenu.cpp b/targets/minecraft/world/inventory/BrewingStandMenu.cpp index 867ce7648..a63b595dd 100644 --- a/targets/minecraft/world/inventory/BrewingStandMenu.cpp +++ b/targets/minecraft/world/inventory/BrewingStandMenu.cpp @@ -5,13 +5,13 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" +#include "minecraft/world/inventory/Slot.h" +#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/alchemy/PotionBrewing.h" #include "minecraft/world/level/tile/entity/BrewingStandTileEntity.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" -#include "minecraft/world/inventory/Slot.h" -#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" BrewingStandMenu::BrewingStandMenu( std::shared_ptr inventory, diff --git a/targets/minecraft/world/inventory/ContainerMenu.cpp b/targets/minecraft/world/inventory/ContainerMenu.cpp index 61e06f340..a7d8eb854 100644 --- a/targets/minecraft/world/inventory/ContainerMenu.cpp +++ b/targets/minecraft/world/inventory/ContainerMenu.cpp @@ -9,9 +9,9 @@ #include "minecraft/stats/StatsCounter.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" ContainerMenu::ContainerMenu(std::shared_ptr inventory, std::shared_ptr container) diff --git a/targets/minecraft/world/inventory/CraftingMenu.cpp b/targets/minecraft/world/inventory/CraftingMenu.cpp index 5f6829f61..a8a9c4a20 100644 --- a/targets/minecraft/world/inventory/CraftingMenu.cpp +++ b/targets/minecraft/world/inventory/CraftingMenu.cpp @@ -8,12 +8,12 @@ #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/Recipes.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" -#include "minecraft/world/inventory/Slot.h" const int CraftingMenu::RESULT_SLOT = 0; const int CraftingMenu::CRAFT_SLOT_START = 1; diff --git a/targets/minecraft/world/inventory/EnchantmentContainer.cpp b/targets/minecraft/world/inventory/EnchantmentContainer.cpp index 151f342d7..00e378213 100644 --- a/targets/minecraft/world/inventory/EnchantmentContainer.cpp +++ b/targets/minecraft/world/inventory/EnchantmentContainer.cpp @@ -3,9 +3,9 @@ #include #include -#include "strings.h" #include "minecraft/world/SimpleContainer.h" #include "minecraft/world/inventory/EnchantmentMenu.h" +#include "strings.h" EnchantmentContainer::EnchantmentContainer(EnchantmentMenu* menu) : SimpleContainer(IDS_ENCHANT, L"", false, 1), m_menu(menu) {} diff --git a/targets/minecraft/world/inventory/EnchantmentMenu.cpp b/targets/minecraft/world/inventory/EnchantmentMenu.cpp index 129aa70b6..e676c2a7d 100644 --- a/targets/minecraft/world/inventory/EnchantmentMenu.cpp +++ b/targets/minecraft/world/inventory/EnchantmentMenu.cpp @@ -6,9 +6,11 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/EnchantmentContainer.h" #include "minecraft/world/inventory/EnchantmentSlot.h" #include "minecraft/world/inventory/Slot.h" +#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" #include "minecraft/world/item/EnchantedBookItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" @@ -16,8 +18,6 @@ #include "minecraft/world/item/enchantment/EnchantmentInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" -#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" EnchantmentMenu::EnchantmentMenu(std::shared_ptr inventory, Level* level, int xt, int yt, int zt) { diff --git a/targets/minecraft/world/inventory/FireworksMenu.cpp b/targets/minecraft/world/inventory/FireworksMenu.cpp index 617f86b81..a20a436e0 100644 --- a/targets/minecraft/world/inventory/FireworksMenu.cpp +++ b/targets/minecraft/world/inventory/FireworksMenu.cpp @@ -8,12 +8,12 @@ #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/FireworksRecipe.h" #include "minecraft/world/item/crafting/Recipes.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" -#include "minecraft/world/inventory/Slot.h" FireworksMenu::FireworksMenu(std::shared_ptr inventory, Level* level, int xt, int yt, int zt) diff --git a/targets/minecraft/world/inventory/FurnaceMenu.cpp b/targets/minecraft/world/inventory/FurnaceMenu.cpp index aab46c441..6ecbd2078 100644 --- a/targets/minecraft/world/inventory/FurnaceMenu.cpp +++ b/targets/minecraft/world/inventory/FurnaceMenu.cpp @@ -7,13 +7,13 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" +#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" #include "minecraft/world/item/CoalItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/FurnaceRecipes.h" #include "minecraft/world/level/tile/entity/FurnaceTileEntity.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" -#include "minecraft/world/inventory/net.minecraft.world.inventory.ContainerListener.h" FurnaceMenu::FurnaceMenu(std::shared_ptr inventory, std::shared_ptr furnace) diff --git a/targets/minecraft/world/inventory/FurnaceResultSlot.cpp b/targets/minecraft/world/inventory/FurnaceResultSlot.cpp index d79391f98..0639ab242 100644 --- a/targets/minecraft/world/inventory/FurnaceResultSlot.cpp +++ b/targets/minecraft/world/inventory/FurnaceResultSlot.cpp @@ -7,11 +7,11 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/ExperienceOrb.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/FurnaceRecipes.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/inventory/Slot.h" class Container; diff --git a/targets/minecraft/world/inventory/HopperMenu.cpp b/targets/minecraft/world/inventory/HopperMenu.cpp index 76fa31822..8d62839ae 100644 --- a/targets/minecraft/world/inventory/HopperMenu.cpp +++ b/targets/minecraft/world/inventory/HopperMenu.cpp @@ -2,10 +2,10 @@ #include -#include "minecraft/world/inventory/Slot.h" -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/Container.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" +#include "minecraft/world/inventory/Slot.h" +#include "minecraft/world/item/ItemInstance.h" HopperMenu::HopperMenu(std::shared_ptr inventory, std::shared_ptr hopper) { diff --git a/targets/minecraft/world/inventory/HorseInventoryMenu.cpp b/targets/minecraft/world/inventory/HorseInventoryMenu.cpp index 8d7a83cc6..2aba13036 100644 --- a/targets/minecraft/world/inventory/HorseInventoryMenu.cpp +++ b/targets/minecraft/world/inventory/HorseInventoryMenu.cpp @@ -2,13 +2,13 @@ #include +#include "minecraft/world/Container.h" #include "minecraft/world/entity/animal/EntityHorse.h" #include "minecraft/world/entity/player/Player.h" -#include "minecraft/world/item/Item.h" -#include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/Container.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/Slot.h" +#include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" HorseSaddleSlot::HorseSaddleSlot(std::shared_ptr horseInventory) : Slot(horseInventory, EntityHorse::INV_SLOT_SADDLE, 8, 18) {} diff --git a/targets/minecraft/world/inventory/InventoryMenu.cpp b/targets/minecraft/world/inventory/InventoryMenu.cpp index 862ee38ed..d65f36a7b 100644 --- a/targets/minecraft/world/inventory/InventoryMenu.cpp +++ b/targets/minecraft/world/inventory/InventoryMenu.cpp @@ -10,12 +10,12 @@ #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/ArmorRecipes.h" #include "minecraft/world/item/crafting/Recipes.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" -#include "minecraft/world/inventory/Slot.h" const int InventoryMenu::RESULT_SLOT = 0; const int InventoryMenu::CRAFT_SLOT_START = 1; diff --git a/targets/minecraft/world/inventory/MerchantContainer.cpp b/targets/minecraft/world/inventory/MerchantContainer.cpp index a8b97f765..ffa25eda5 100644 --- a/targets/minecraft/world/inventory/MerchantContainer.cpp +++ b/targets/minecraft/world/inventory/MerchantContainer.cpp @@ -1,11 +1,11 @@ #include "MerchantContainer.h" #include "MerchantMenu.h" +#include "minecraft/world/Container.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/trading/Merchant.h" #include "minecraft/world/item/trading/MerchantRecipe.h" #include "minecraft/world/item/trading/MerchantRecipeList.h" -#include "minecraft/world/Container.h" MerchantContainer::~MerchantContainer() {} diff --git a/targets/minecraft/world/inventory/MerchantMenu.cpp b/targets/minecraft/world/inventory/MerchantMenu.cpp index 5369d174c..4bb36943e 100644 --- a/targets/minecraft/world/inventory/MerchantMenu.cpp +++ b/targets/minecraft/world/inventory/MerchantMenu.cpp @@ -4,13 +4,13 @@ #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/MerchantContainer.h" #include "minecraft/world/inventory/MerchantResultSlot.h" #include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/level/Level.h" -#include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/item/trading/Merchant.h" +#include "minecraft/world/level/Level.h" MerchantMenu::MerchantMenu(std::shared_ptr inventory, std::shared_ptr merchant, Level* level) { diff --git a/targets/minecraft/world/inventory/MerchantResultSlot.cpp b/targets/minecraft/world/inventory/MerchantResultSlot.cpp index a7abb097b..86c930cbc 100644 --- a/targets/minecraft/world/inventory/MerchantResultSlot.cpp +++ b/targets/minecraft/world/inventory/MerchantResultSlot.cpp @@ -5,10 +5,10 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/inventory/MerchantContainer.h" #include "minecraft/world/inventory/MerchantMenu.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/trading/Merchant.h" #include "minecraft/world/item/trading/MerchantRecipe.h" -#include "minecraft/world/inventory/Slot.h" MerchantResultSlot::MerchantResultSlot(Player* player, std::shared_ptr merchant, diff --git a/targets/minecraft/world/inventory/PlayerEnderChestContainer.cpp b/targets/minecraft/world/inventory/PlayerEnderChestContainer.cpp index b155adc88..b9e02583b 100644 --- a/targets/minecraft/world/inventory/PlayerEnderChestContainer.cpp +++ b/targets/minecraft/world/inventory/PlayerEnderChestContainer.cpp @@ -1,15 +1,16 @@ #include "PlayerEnderChestContainer.h" #include + #include #include "minecraft/network/packet/ContainerOpenPacket.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" #include "minecraft/world/SimpleContainer.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/entity/EnderChestTileEntity.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" PlayerEnderChestContainer::PlayerEnderChestContainer() : SimpleContainer(IDS_TILE_ENDERCHEST, L"", false, 9 * 3) { diff --git a/targets/minecraft/world/inventory/PlayerEnderChestContainer.h b/targets/minecraft/world/inventory/PlayerEnderChestContainer.h index 9f0b57b9b..9337bb1e0 100644 --- a/targets/minecraft/world/inventory/PlayerEnderChestContainer.h +++ b/targets/minecraft/world/inventory/PlayerEnderChestContainer.h @@ -8,7 +8,8 @@ class ItemInstance; class EnderChestTileEntity; class CompoundTag; -template class ListTag; +template +class ListTag; class PlayerEnderChestContainer : public SimpleContainer { private: diff --git a/targets/minecraft/world/inventory/RepairResultSlot.cpp b/targets/minecraft/world/inventory/RepairResultSlot.cpp index b3bd8e427..2c4942202 100644 --- a/targets/minecraft/world/inventory/RepairResultSlot.cpp +++ b/targets/minecraft/world/inventory/RepairResultSlot.cpp @@ -5,11 +5,11 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/inventory/AnvilMenu.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/inventory/Slot.h" RepairResultSlot::RepairResultSlot(AnvilMenu* menu, int xt, int yt, int zt, std::shared_ptr container, diff --git a/targets/minecraft/world/inventory/ResultSlot.cpp b/targets/minecraft/world/inventory/ResultSlot.cpp index 5a32c6b40..1169e564d 100644 --- a/targets/minecraft/world/inventory/ResultSlot.cpp +++ b/targets/minecraft/world/inventory/ResultSlot.cpp @@ -6,10 +6,10 @@ #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/inventory/Slot.h" ResultSlot::ResultSlot(Player* player, std::shared_ptr craftSlots, std::shared_ptr container, int id, int x, diff --git a/targets/minecraft/world/inventory/Slot.cpp b/targets/minecraft/world/inventory/Slot.cpp index c6f57dc56..2c40331e6 100644 --- a/targets/minecraft/world/inventory/Slot.cpp +++ b/targets/minecraft/world/inventory/Slot.cpp @@ -6,9 +6,9 @@ #include "minecraft/world/inventory/CraftingContainer.h" #include "minecraft/world/item/ArmorItem.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/ArmorDyeRecipe.h" #include "minecraft/world/item/crafting/Recipes.h" -#include "minecraft/world/item/ItemInstance.h" class Icon; class Player; diff --git a/targets/minecraft/world/item/AnvilTileItem.cpp b/targets/minecraft/world/item/AnvilTileItem.cpp index 41babae5c..cbd09cc10 100644 --- a/targets/minecraft/world/item/AnvilTileItem.cpp +++ b/targets/minecraft/world/item/AnvilTileItem.cpp @@ -1,8 +1,8 @@ #include "AnvilTileItem.h" +#include "minecraft/world/item/MultiTextureTileItem.h" #include "minecraft/world/level/tile/AnvilTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/MultiTextureTileItem.h" AnvilTileItem::AnvilTileItem(Tile* tile) : MultiTextureTileItem(tile->id - 256, tile, (int*)AnvilTile::ANVIL_NAMES, diff --git a/targets/minecraft/world/item/ArmorItem.cpp b/targets/minecraft/world/item/ArmorItem.cpp index 1448fed7d..2c834369a 100644 --- a/targets/minecraft/world/item/ArmorItem.cpp +++ b/targets/minecraft/world/item/ArmorItem.cpp @@ -1,6 +1,7 @@ #include "ArmorItem.h" #include + #include #include @@ -16,12 +17,12 @@ #include "minecraft/world/entity/EntitySelector.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/Mob.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/DispenserTile.h" #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/item/Item.h" class Entity; class Icon; diff --git a/targets/minecraft/world/item/AuxDataTileItem.cpp b/targets/minecraft/world/item/AuxDataTileItem.cpp index bc351e2b0..210bfb83d 100644 --- a/targets/minecraft/world/item/AuxDataTileItem.cpp +++ b/targets/minecraft/world/item/AuxDataTileItem.cpp @@ -1,7 +1,7 @@ #include "AuxDataTileItem.h" -#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/item/TileItem.h" +#include "minecraft/world/level/tile/Tile.h" AuxDataTileItem::AuxDataTileItem(int id, Tile* parentTile) : TileItem(id) { this->parentTile = parentTile; diff --git a/targets/minecraft/world/item/BedItem.cpp b/targets/minecraft/world/item/BedItem.cpp index 1587ccc5e..e1701cff5 100644 --- a/targets/minecraft/world/item/BedItem.cpp +++ b/targets/minecraft/world/item/BedItem.cpp @@ -7,11 +7,11 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/BedTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" BedItem::BedItem(int id) : Item(id) {} diff --git a/targets/minecraft/world/item/BoatItem.cpp b/targets/minecraft/world/item/BoatItem.cpp index 0d96097f3..51f11692a 100644 --- a/targets/minecraft/world/item/BoatItem.cpp +++ b/targets/minecraft/world/item/BoatItem.cpp @@ -1,16 +1,15 @@ #include "BoatItem.h" #include + #include #include #include #include #include "ItemInstance.h" -#include "minecraft/util/Mth.h" -#include "minecraft/world/phys/Vec3.h" #include "java/Class.h" -#include "strings.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/item/Boat.h" #include "minecraft/world/entity/player/Abilities.h" @@ -20,6 +19,8 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" +#include "minecraft/world/phys/Vec3.h" +#include "strings.h" BoatItem::BoatItem(int id) : Item(id) { maxStackSize = 1; } diff --git a/targets/minecraft/world/item/BookItem.cpp b/targets/minecraft/world/item/BookItem.cpp index 1508eeabf..ad760aa64 100644 --- a/targets/minecraft/world/item/BookItem.cpp +++ b/targets/minecraft/world/item/BookItem.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" BookItem::BookItem(int id) : Item(id) {} diff --git a/targets/minecraft/world/item/BottleItem.cpp b/targets/minecraft/world/item/BottleItem.cpp index 12d585dd5..8ab3efa1b 100644 --- a/targets/minecraft/world/item/BottleItem.cpp +++ b/targets/minecraft/world/item/BottleItem.cpp @@ -4,12 +4,12 @@ #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/PotionItem.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/item/Item.h" BottleItem::BottleItem(int id) : Item(id) {} diff --git a/targets/minecraft/world/item/BowItem.cpp b/targets/minecraft/world/item/BowItem.cpp index 0f24d6826..4cee3a56a 100644 --- a/targets/minecraft/world/item/BowItem.cpp +++ b/targets/minecraft/world/item/BowItem.cpp @@ -9,11 +9,11 @@ #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/Arrow.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentHelper.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" class Icon; diff --git a/targets/minecraft/world/item/BowItem.h b/targets/minecraft/world/item/BowItem.h index 4d2bb2ed1..7612f73f8 100644 --- a/targets/minecraft/world/item/BowItem.h +++ b/targets/minecraft/world/item/BowItem.h @@ -4,7 +4,6 @@ #include "Item.h" #include "minecraft/world/item/UseAnim.h" -#include "minecraft/world/item/UseAnim.h" class Player; class Level; diff --git a/targets/minecraft/world/item/BowlFoodItem.cpp b/targets/minecraft/world/item/BowlFoodItem.cpp index d8f59680f..5489c65c6 100644 --- a/targets/minecraft/world/item/BowlFoodItem.cpp +++ b/targets/minecraft/world/item/BowlFoodItem.cpp @@ -2,9 +2,9 @@ #include -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/FoodItem.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" BowlFoodItem::BowlFoodItem(int id, int nutrition) : FoodItem(id, nutrition, false) { diff --git a/targets/minecraft/world/item/BucketItem.cpp b/targets/minecraft/world/item/BucketItem.cpp index b375b9da8..9bee7d363 100644 --- a/targets/minecraft/world/item/BucketItem.cpp +++ b/targets/minecraft/world/item/BucketItem.cpp @@ -17,13 +17,13 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/item/Item.h" BucketItem::BucketItem(int id, int content) : Item(id) { maxStackSize = 1; diff --git a/targets/minecraft/world/item/CarrotOnAStickItem.cpp b/targets/minecraft/world/item/CarrotOnAStickItem.cpp index b6b26ea65..5de3564e4 100644 --- a/targets/minecraft/world/item/CarrotOnAStickItem.cpp +++ b/targets/minecraft/world/item/CarrotOnAStickItem.cpp @@ -7,8 +7,8 @@ #include "minecraft/world/entity/animal/Pig.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/FishingRodItem.h" -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" CarrotOnAStickItem::CarrotOnAStickItem(int id) : Item(id) { setMaxStackSize(1); diff --git a/targets/minecraft/world/item/CoalItem.cpp b/targets/minecraft/world/item/CoalItem.cpp index a512ff229..d9c493105 100644 --- a/targets/minecraft/world/item/CoalItem.cpp +++ b/targets/minecraft/world/item/CoalItem.cpp @@ -3,10 +3,10 @@ #include #include -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" +#include "strings.h" CoalItem::CoalItem(int id) : Item(id) { setStackedByData(true); diff --git a/targets/minecraft/world/item/ColoredTileItem.cpp b/targets/minecraft/world/item/ColoredTileItem.cpp index e8f65e78e..d28fa974d 100644 --- a/targets/minecraft/world/item/ColoredTileItem.cpp +++ b/targets/minecraft/world/item/ColoredTileItem.cpp @@ -3,8 +3,8 @@ #include #include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/item/TileItem.h" +#include "minecraft/world/level/tile/Tile.h" ColoredTileItem::ColoredTileItem(int id, bool stackedByData) : TileItem(id) { this->colorTile = Tile::tiles[getTileId()]; diff --git a/targets/minecraft/world/item/DiggerItem.cpp b/targets/minecraft/world/item/DiggerItem.cpp index db02e7b6c..faed4adf7 100644 --- a/targets/minecraft/world/item/DiggerItem.cpp +++ b/targets/minecraft/world/item/DiggerItem.cpp @@ -3,12 +3,12 @@ #include #include +#include "minecraft/world/entity/ai/attributes/Attribute.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/entity/ai/attributes/Attribute.h" -#include "minecraft/world/item/Item.h" DiggerItem::DiggerItem(int id, float attackDamage, const Tier* tier, std::vector* tiles) diff --git a/targets/minecraft/world/item/DoorItem.cpp b/targets/minecraft/world/item/DoorItem.cpp index 3da99117c..e461ae5f2 100644 --- a/targets/minecraft/world/item/DoorItem.cpp +++ b/targets/minecraft/world/item/DoorItem.cpp @@ -7,11 +7,11 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" DoorItem::DoorItem(int id, Material* material) : Item(id) { this->material = material; diff --git a/targets/minecraft/world/item/DyePowderItem.cpp b/targets/minecraft/world/item/DyePowderItem.cpp index e03f7fbe3..5e11f00db 100644 --- a/targets/minecraft/world/item/DyePowderItem.cpp +++ b/targets/minecraft/world/item/DyePowderItem.cpp @@ -1,10 +1,9 @@ #include "DyePowderItem.h" -#include "minecraft/util/Mth.h" -#include "minecraft/core/particles/ParticleTypes.h" #include "java/Random.h" -#include "strings.h" +#include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Sheep.h" @@ -25,6 +24,7 @@ #include "minecraft/world/level/tile/TallGrassPlantTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TreeTile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/item/EggItem.cpp b/targets/minecraft/world/item/EggItem.cpp index 6d2ed728d..01e664d77 100644 --- a/targets/minecraft/world/item/EggItem.cpp +++ b/targets/minecraft/world/item/EggItem.cpp @@ -8,9 +8,9 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/ThrownEgg.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" EggItem::EggItem(int id) : Item(id) { maxStackSize = 16; } diff --git a/targets/minecraft/world/item/EmptyMapItem.cpp b/targets/minecraft/world/item/EmptyMapItem.cpp index 45ff3509d..73e6ceae5 100644 --- a/targets/minecraft/world/item/EmptyMapItem.cpp +++ b/targets/minecraft/world/item/EmptyMapItem.cpp @@ -4,10 +4,10 @@ #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" -#include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/item/MapItem.h" #include "minecraft/world/item/ComplexItem.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/MapItem.h" EmptyMapItem::EmptyMapItem(int id) : ComplexItem(id) {} diff --git a/targets/minecraft/world/item/EnchantedBookItem.cpp b/targets/minecraft/world/item/EnchantedBookItem.cpp index e8cd91179..9772c5239 100644 --- a/targets/minecraft/world/item/EnchantedBookItem.cpp +++ b/targets/minecraft/world/item/EnchantedBookItem.cpp @@ -5,13 +5,13 @@ #include "java/Random.h" #include "minecraft/util/HtmlString.h" #include "minecraft/util/WeighedTreasure.h" +#include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/Rarity.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentInstance.h" #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/item/Item.h" -#include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/item/Rarity.h" const std::wstring EnchantedBookItem::TAG_STORED_ENCHANTMENTS = L"StoredEnchantments"; diff --git a/targets/minecraft/world/item/EnderEyeItem.cpp b/targets/minecraft/world/item/EnderEyeItem.cpp index 713b1667a..ab8f37204 100644 --- a/targets/minecraft/world/item/EnderEyeItem.cpp +++ b/targets/minecraft/world/item/EnderEyeItem.cpp @@ -10,6 +10,7 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/EyeOfEnderSignal.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" @@ -18,7 +19,6 @@ #include "minecraft/world/level/tile/TheEndPortalFrameTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/item/Item.h" EnderEyeItem::EnderEyeItem(int id) : Item(id) {} diff --git a/targets/minecraft/world/item/EnderpearlItem.cpp b/targets/minecraft/world/item/EnderpearlItem.cpp index d2fd09035..851b958c7 100644 --- a/targets/minecraft/world/item/EnderpearlItem.cpp +++ b/targets/minecraft/world/item/EnderpearlItem.cpp @@ -7,9 +7,9 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/ThrownEnderpearl.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" EnderpearlItem::EnderpearlItem(int id) : Item(id) { maxStackSize = 16; } diff --git a/targets/minecraft/world/item/ExperienceItem.cpp b/targets/minecraft/world/item/ExperienceItem.cpp index c4843292d..207faa5fb 100644 --- a/targets/minecraft/world/item/ExperienceItem.cpp +++ b/targets/minecraft/world/item/ExperienceItem.cpp @@ -7,9 +7,9 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/ThrownExpBottle.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" ExperienceItem::ExperienceItem(int id) : Item(id) {} diff --git a/targets/minecraft/world/item/FireChargeItem.cpp b/targets/minecraft/world/item/FireChargeItem.cpp index 9252a31cf..a0721cb40 100644 --- a/targets/minecraft/world/item/FireChargeItem.cpp +++ b/targets/minecraft/world/item/FireChargeItem.cpp @@ -8,10 +8,10 @@ #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" FireChargeItem::FireChargeItem(int id) : Item(id) { m_dragonFireballIcon = nullptr; diff --git a/targets/minecraft/world/item/FireworksChargeItem.cpp b/targets/minecraft/world/item/FireworksChargeItem.cpp index 17ed15fa2..8d8e20f32 100644 --- a/targets/minecraft/world/item/FireworksChargeItem.cpp +++ b/targets/minecraft/world/item/FireworksChargeItem.cpp @@ -3,15 +3,15 @@ #include #include "Minecraft.Client/Linux/Linux_App.h" -#include "nbt/CompoundTag.h" -#include "nbt/IntArrayTag.h" -#include "strings.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/item/DyePowderItem.h" #include "minecraft/world/item/FireworksItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" +#include "nbt/CompoundTag.h" +#include "nbt/IntArrayTag.h" +#include "strings.h" class Tag; diff --git a/targets/minecraft/world/item/FireworksChargeItem.h b/targets/minecraft/world/item/FireworksChargeItem.h index 01f21bf50..6ae030def 100644 --- a/targets/minecraft/world/item/FireworksChargeItem.h +++ b/targets/minecraft/world/item/FireworksChargeItem.h @@ -1,8 +1,8 @@ #pragma once #include -#include #include +#include #include "Item.h" #include "nbt/CompoundTag.h" diff --git a/targets/minecraft/world/item/FireworksItem.cpp b/targets/minecraft/world/item/FireworksItem.cpp index eedb00b08..1703eee65 100644 --- a/targets/minecraft/world/item/FireworksItem.cpp +++ b/targets/minecraft/world/item/FireworksItem.cpp @@ -3,11 +3,8 @@ #include #include -#include "console_helpers/StringHelpers.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" +#include "console_helpers/StringHelpers.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" @@ -16,6 +13,9 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" const std::wstring FireworksItem::TAG_FIREWORKS = L"Fireworks"; const std::wstring FireworksItem::TAG_EXPLOSION = L"Explosion"; diff --git a/targets/minecraft/world/item/FireworksItem.h b/targets/minecraft/world/item/FireworksItem.h index dc1360566..bbaa3b792 100644 --- a/targets/minecraft/world/item/FireworksItem.h +++ b/targets/minecraft/world/item/FireworksItem.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Item.h" diff --git a/targets/minecraft/world/item/FishingRodItem.cpp b/targets/minecraft/world/item/FishingRodItem.cpp index 667b22748..fc1a1af73 100644 --- a/targets/minecraft/world/item/FishingRodItem.cpp +++ b/targets/minecraft/world/item/FishingRodItem.cpp @@ -8,9 +8,9 @@ #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/FishingHook.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" class Icon; diff --git a/targets/minecraft/world/item/FlintAndSteelItem.cpp b/targets/minecraft/world/item/FlintAndSteelItem.cpp index 823e4b094..16d49a8ec 100644 --- a/targets/minecraft/world/item/FlintAndSteelItem.cpp +++ b/targets/minecraft/world/item/FlintAndSteelItem.cpp @@ -6,11 +6,11 @@ #include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/PortalTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" FlintAndSteelItem::FlintAndSteelItem(int id) : Item(id) { maxStackSize = 1; diff --git a/targets/minecraft/world/item/FoodItem.cpp b/targets/minecraft/world/item/FoodItem.cpp index ca1248442..b1a0f0e77 100644 --- a/targets/minecraft/world/item/FoodItem.cpp +++ b/targets/minecraft/world/item/FoodItem.cpp @@ -7,9 +7,9 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/food/FoodConstants.h" #include "minecraft/world/food/FoodData.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" void FoodItem::_init() { // 4J Initialisers diff --git a/targets/minecraft/world/item/FoodItem.h b/targets/minecraft/world/item/FoodItem.h index c3d71bda2..1fe2f174c 100644 --- a/targets/minecraft/world/item/FoodItem.h +++ b/targets/minecraft/world/item/FoodItem.h @@ -4,7 +4,6 @@ #include "Item.h" #include "minecraft/world/item/UseAnim.h" -#include "minecraft/world/item/UseAnim.h" class Player; class Level; diff --git a/targets/minecraft/world/item/GoldenAppleItem.cpp b/targets/minecraft/world/item/GoldenAppleItem.cpp index 17e42e4ed..cadc68962 100644 --- a/targets/minecraft/world/item/GoldenAppleItem.cpp +++ b/targets/minecraft/world/item/GoldenAppleItem.cpp @@ -3,7 +3,6 @@ #include #include "minecraft/SharedConstants.h" -#include "strings.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/player/Player.h" @@ -11,6 +10,7 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/Rarity.h" #include "minecraft/world/level/Level.h" +#include "strings.h" GoldenAppleItem::GoldenAppleItem(int id, int nutrition, float saturationMod, bool isMeat) diff --git a/targets/minecraft/world/item/HangingEntityItem.cpp b/targets/minecraft/world/item/HangingEntityItem.cpp index 34ca838c7..ed74dd366 100644 --- a/targets/minecraft/world/item/HangingEntityItem.cpp +++ b/targets/minecraft/world/item/HangingEntityItem.cpp @@ -2,23 +2,24 @@ #include #include + #include #include -#include "minecraft/stats/GenericStats.h" -#include "minecraft/world/entity/HangingEntity.h" -#include "minecraft/world/entity/ItemFrame.h" -#include "minecraft/world/entity/Painting.h" #include "Direction.h" #include "Facing.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "strings.h" +#include "minecraft/stats/GenericStats.h" #include "minecraft/util/HtmlString.h" +#include "minecraft/world/entity/HangingEntity.h" +#include "minecraft/world/entity/ItemFrame.h" +#include "minecraft/world/entity/Painting.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" +#include "strings.h" HangingEntityItem::HangingEntityItem(int id, eINSTANCEOF eClassType) : Item(id) { diff --git a/targets/minecraft/world/item/HatchetItem.cpp b/targets/minecraft/world/item/HatchetItem.cpp index 654386075..0208e4b4c 100644 --- a/targets/minecraft/world/item/HatchetItem.cpp +++ b/targets/minecraft/world/item/HatchetItem.cpp @@ -3,11 +3,11 @@ #include #include +#include "minecraft/world/item/DiggerItem.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/ChestTile.h" #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/DiggerItem.h" std::vector* HatchetItem::diggables = nullptr; diff --git a/targets/minecraft/world/item/HoeItem.cpp b/targets/minecraft/world/item/HoeItem.cpp index f919aaa28..e44f59927 100644 --- a/targets/minecraft/world/item/HoeItem.cpp +++ b/targets/minecraft/world/item/HoeItem.cpp @@ -3,10 +3,10 @@ #include #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" HoeItem::HoeItem(int id, const Tier* tier) : Item(id) { this->tier = tier; diff --git a/targets/minecraft/world/item/Item.cpp b/targets/minecraft/world/item/Item.cpp index f963a95d4..40c1d9144 100644 --- a/targets/minecraft/world/item/Item.cpp +++ b/targets/minecraft/world/item/Item.cpp @@ -2,17 +2,16 @@ #include "Item.h" #include + #include #include "HangingEntityItem.h" #include "MapItem.h" -#include "minecraft/util/Mth.h" -#include "minecraft/world/phys/Vec3.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Class.h" #include "java/Random.h" #include "minecraft/stats/Stats.h" -#include "strings.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/Icon.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/effect/MobEffect.h" @@ -78,6 +77,8 @@ #include "minecraft/world/level/tile/ComparatorTile.h" #include "minecraft/world/level/tile/RepeaterTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/Vec3.h" +#include "strings.h" typedef Item::Tier _Tier; diff --git a/targets/minecraft/world/item/ItemInstance.cpp b/targets/minecraft/world/item/ItemInstance.cpp index 63e407ef4..bd567d3da 100644 --- a/targets/minecraft/world/item/ItemInstance.cpp +++ b/targets/minecraft/world/item/ItemInstance.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/world/item/ItemInstance.h b/targets/minecraft/world/item/ItemInstance.h index 9342c4bc2..feb32d34a 100644 --- a/targets/minecraft/world/item/ItemInstance.h +++ b/targets/minecraft/world/item/ItemInstance.h @@ -26,7 +26,8 @@ class HtmlString; class Tile; class Item; class Tag; -template class ListTag; +template +class ListTag; // 4J Stu - While this is not really an abstract class, we don't want to make // new instances of it, mainly because there are too many ctors and that doesn't diff --git a/targets/minecraft/world/item/LeafTileItem.cpp b/targets/minecraft/world/item/LeafTileItem.cpp index 36bde9f30..82fcf446e 100644 --- a/targets/minecraft/world/item/LeafTileItem.cpp +++ b/targets/minecraft/world/item/LeafTileItem.cpp @@ -3,10 +3,10 @@ #include #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/TileItem.h" #include "minecraft/world/level/FoliageColor.h" #include "minecraft/world/level/tile/LeafTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/TileItem.h" LeafTileItem::LeafTileItem(int id) : TileItem(id) { setMaxDamage(0); diff --git a/targets/minecraft/world/item/LeashItem.cpp b/targets/minecraft/world/item/LeashItem.cpp index 79471af9c..ea4fe330b 100644 --- a/targets/minecraft/world/item/LeashItem.cpp +++ b/targets/minecraft/world/item/LeashItem.cpp @@ -6,10 +6,10 @@ #include "minecraft/world/entity/LeashFenceKnotEntity.h" #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/item/Item.h" class Entity; diff --git a/targets/minecraft/world/item/MapItem.cpp b/targets/minecraft/world/item/MapItem.cpp index 776eacf85..9e2f66d3c 100644 --- a/targets/minecraft/world/item/MapItem.cpp +++ b/targets/minecraft/world/item/MapItem.cpp @@ -3,6 +3,7 @@ #include #include #include + #include #include @@ -14,6 +15,8 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" +#include "minecraft/world/item/ComplexItem.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/LevelChunk.h" @@ -23,8 +26,6 @@ #include "minecraft/world/level/saveddata/MapItemSavedData.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/ComplexItem.h" -#include "minecraft/world/item/Item.h" class SavedData; diff --git a/targets/minecraft/world/item/MilkBucketItem.cpp b/targets/minecraft/world/item/MilkBucketItem.cpp index 1a4baceca..46ee9a417 100644 --- a/targets/minecraft/world/item/MilkBucketItem.cpp +++ b/targets/minecraft/world/item/MilkBucketItem.cpp @@ -4,9 +4,9 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" MilkBucketItem::MilkBucketItem(int id) : Item(id) { setMaxStackSize(1); } diff --git a/targets/minecraft/world/item/MilkBucketItem.h b/targets/minecraft/world/item/MilkBucketItem.h index 482d588ac..0a6445386 100644 --- a/targets/minecraft/world/item/MilkBucketItem.h +++ b/targets/minecraft/world/item/MilkBucketItem.h @@ -2,7 +2,6 @@ #include "Item.h" #include "minecraft/world/item/UseAnim.h" -#include "minecraft/world/item/UseAnim.h" class MilkBucketItem : public Item { private: diff --git a/targets/minecraft/world/item/MinecartItem.cpp b/targets/minecraft/world/item/MinecartItem.cpp index 0249646e7..bd58be3d0 100644 --- a/targets/minecraft/world/item/MinecartItem.cpp +++ b/targets/minecraft/world/item/MinecartItem.cpp @@ -9,12 +9,12 @@ #include "minecraft/core/DefaultDispenseItemBehavior.h" #include "minecraft/core/FacingEnum.h" #include "minecraft/world/entity/item/Minecart.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/BaseRailTile.h" #include "minecraft/world/level/tile/DispenserTile.h" #include "minecraft/world/level/tile/LevelEvent.h" -#include "minecraft/world/item/Item.h" std::shared_ptr MinecartItem::MinecartDispenseBehavior::execute( BlockSource* source, std::shared_ptr dispensed, diff --git a/targets/minecraft/world/item/MultiTextureTileItem.cpp b/targets/minecraft/world/item/MultiTextureTileItem.cpp index 3378446d8..8f4dd3be5 100644 --- a/targets/minecraft/world/item/MultiTextureTileItem.cpp +++ b/targets/minecraft/world/item/MultiTextureTileItem.cpp @@ -3,9 +3,9 @@ #include #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/TileItem.h" #include "minecraft/world/item/crafting/Recipes.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/TileItem.h" MultiTextureTileItem::MultiTextureTileItem(int id, Tile* parentTile, int* nameExtensions, int iLength, diff --git a/targets/minecraft/world/item/NameTagItem.cpp b/targets/minecraft/world/item/NameTagItem.cpp index 303271ff3..07912462c 100644 --- a/targets/minecraft/world/item/NameTagItem.cpp +++ b/targets/minecraft/world/item/NameTagItem.cpp @@ -6,8 +6,8 @@ #include "java/Class.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/Mob.h" -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" NameTagItem::NameTagItem(int id) : Item(id) {} diff --git a/targets/minecraft/world/item/PickaxeItem.cpp b/targets/minecraft/world/item/PickaxeItem.cpp index ad8ff99f1..ac9cc5834 100644 --- a/targets/minecraft/world/item/PickaxeItem.cpp +++ b/targets/minecraft/world/item/PickaxeItem.cpp @@ -3,10 +3,10 @@ #include #include +#include "minecraft/world/item/DiggerItem.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/DiggerItem.h" std::vector PickaxeItem::diggables; diff --git a/targets/minecraft/world/item/PistonTileItem.cpp b/targets/minecraft/world/item/PistonTileItem.cpp index 4dbae78a6..9f5126ae1 100644 --- a/targets/minecraft/world/item/PistonTileItem.cpp +++ b/targets/minecraft/world/item/PistonTileItem.cpp @@ -1,7 +1,7 @@ #include "PistonTileItem.h" -#include "minecraft/world/level/tile/piston/PistonBaseTile.h" #include "minecraft/world/item/TileItem.h" +#include "minecraft/world/level/tile/piston/PistonBaseTile.h" PistonTileItem::PistonTileItem(int id) : TileItem(id) {} diff --git a/targets/minecraft/world/item/PlanterTileItem.cpp b/targets/minecraft/world/item/PlanterTileItem.cpp index 2f2beda07..3e1f4771b 100644 --- a/targets/minecraft/world/item/PlanterTileItem.cpp +++ b/targets/minecraft/world/item/PlanterTileItem.cpp @@ -7,11 +7,11 @@ #include "minecraft/Facing.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TopSnowTile.h" -#include "minecraft/world/item/Item.h" TilePlanterItem::TilePlanterItem(int id, Tile* tile) : Item(id) { this->tileId = tile->id; diff --git a/targets/minecraft/world/item/PotionItem.cpp b/targets/minecraft/world/item/PotionItem.cpp index 286bb12ab..32c100d8f 100644 --- a/targets/minecraft/world/item/PotionItem.cpp +++ b/targets/minecraft/world/item/PotionItem.cpp @@ -2,20 +2,16 @@ #include -#include "console_helpers/StringHelpers.h" -#include "minecraft/SharedConstants.h" -#include "minecraft/sounds/SoundTypes.h" -#include "minecraft/world/effect/MobEffectInstance.h" -#include "minecraft/world/item/alchemy/PotionMacros.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "console_helpers/StringHelpers.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" +#include "minecraft/SharedConstants.h" +#include "minecraft/sounds/SoundTypes.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/effect/MobEffect.h" +#include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/ai/attributes/Attribute.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" #include "minecraft/world/entity/player/Abilities.h" @@ -25,7 +21,11 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/alchemy/PotionBrewing.h" +#include "minecraft/world/item/alchemy/PotionMacros.h" #include "minecraft/world/level/Level.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/item/RecordingItem.cpp b/targets/minecraft/world/item/RecordingItem.cpp index 043ee8a07..ee6ecd9e9 100644 --- a/targets/minecraft/world/item/RecordingItem.cpp +++ b/targets/minecraft/world/item/RecordingItem.cpp @@ -1,6 +1,7 @@ #include "RecordingItem.h" #include + #include #include #include @@ -10,13 +11,13 @@ #include "minecraft/util/HtmlString.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/Rarity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/JukeboxTile.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" -#include "minecraft/world/item/Rarity.h" std::unordered_map RecordingItem::BY_NAME; diff --git a/targets/minecraft/world/item/RedStoneItem.cpp b/targets/minecraft/world/item/RedStoneItem.cpp index 4660239fa..f81b1f8b1 100644 --- a/targets/minecraft/world/item/RedStoneItem.cpp +++ b/targets/minecraft/world/item/RedStoneItem.cpp @@ -4,11 +4,11 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/RedStoneDustTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" RedStoneItem::RedStoneItem(int id) : Item(id) {} diff --git a/targets/minecraft/world/item/SaddleItem.cpp b/targets/minecraft/world/item/SaddleItem.cpp index d41143752..3e91f56e2 100644 --- a/targets/minecraft/world/item/SaddleItem.cpp +++ b/targets/minecraft/world/item/SaddleItem.cpp @@ -5,8 +5,8 @@ #include "java/Class.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/animal/Pig.h" -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" SaddleItem::SaddleItem(int id) : Item(id) { maxStackSize = 1; } diff --git a/targets/minecraft/world/item/SeedFoodItem.cpp b/targets/minecraft/world/item/SeedFoodItem.cpp index 23e5cae64..39f6cdb10 100644 --- a/targets/minecraft/world/item/SeedFoodItem.cpp +++ b/targets/minecraft/world/item/SeedFoodItem.cpp @@ -4,9 +4,9 @@ #include "minecraft/Facing.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/FoodItem.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/FoodItem.h" SeedFoodItem::SeedFoodItem(int id, int nutrition, float saturationMod, int resultId, int targetLand) diff --git a/targets/minecraft/world/item/ShearsItem.cpp b/targets/minecraft/world/item/ShearsItem.cpp index e2cdd545a..e9f6d4290 100644 --- a/targets/minecraft/world/item/ShearsItem.cpp +++ b/targets/minecraft/world/item/ShearsItem.cpp @@ -2,9 +2,9 @@ #include +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/Item.h" ShearsItem::ShearsItem(int itemId) : Item(itemId) { setMaxStackSize(1); diff --git a/targets/minecraft/world/item/ShovelItem.cpp b/targets/minecraft/world/item/ShovelItem.cpp index 04295d426..316f05899 100644 --- a/targets/minecraft/world/item/ShovelItem.cpp +++ b/targets/minecraft/world/item/ShovelItem.cpp @@ -2,10 +2,10 @@ #include +#include "minecraft/world/item/DiggerItem.h" #include "minecraft/world/level/tile/GrassTile.h" #include "minecraft/world/level/tile/MycelTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/DiggerItem.h" std::vector* ShovelItem::diggables = nullptr; diff --git a/targets/minecraft/world/item/SignItem.cpp b/targets/minecraft/world/item/SignItem.cpp index faa2a8175..a862f622f 100644 --- a/targets/minecraft/world/item/SignItem.cpp +++ b/targets/minecraft/world/item/SignItem.cpp @@ -5,12 +5,12 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/SignTileEntity.h" -#include "minecraft/world/item/Item.h" SignItem::SignItem(int id) : Item(id) { // 4J-PB - Changed for TU9 diff --git a/targets/minecraft/world/item/SkullItem.cpp b/targets/minecraft/world/item/SkullItem.cpp index e4c9d8438..6e9b8dba0 100644 --- a/targets/minecraft/world/item/SkullItem.cpp +++ b/targets/minecraft/world/item/SkullItem.cpp @@ -1,9 +1,7 @@ #include "SkullItem.h" -#include "minecraft/util/Mth.h" #include "Facing.h" -#include "nbt/CompoundTag.h" -#include "strings.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" @@ -14,6 +12,8 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/SkullTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" +#include "strings.h" const unsigned int SkullItem::NAMES[SKULL_COUNT] = { IDS_ITEM_SKULL_SKELETON, IDS_ITEM_SKULL_WITHER, IDS_ITEM_SKULL_ZOMBIE, diff --git a/targets/minecraft/world/item/SnowItem.cpp b/targets/minecraft/world/item/SnowItem.cpp index 00d04332d..856bc68fe 100644 --- a/targets/minecraft/world/item/SnowItem.cpp +++ b/targets/minecraft/world/item/SnowItem.cpp @@ -4,11 +4,11 @@ #include #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/AuxDataTileItem.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TopSnowTile.h" -#include "minecraft/world/item/AuxDataTileItem.h" SnowItem::SnowItem(int id, Tile* parentTile) : AuxDataTileItem(id, parentTile) {} diff --git a/targets/minecraft/world/item/SnowballItem.cpp b/targets/minecraft/world/item/SnowballItem.cpp index aecf50aad..91498a9b2 100644 --- a/targets/minecraft/world/item/SnowballItem.cpp +++ b/targets/minecraft/world/item/SnowballItem.cpp @@ -7,9 +7,9 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/Snowball.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/item/Item.h" class Entity; diff --git a/targets/minecraft/world/item/SpawnEggItem.cpp b/targets/minecraft/world/item/SpawnEggItem.cpp index f9f04d2d1..d111e5f5e 100644 --- a/targets/minecraft/world/item/SpawnEggItem.cpp +++ b/targets/minecraft/world/item/SpawnEggItem.cpp @@ -3,17 +3,15 @@ #include #include +#include "Facing.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" +#include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/StringHelpers.h" +#include "java/Class.h" +#include "java/Random.h" #include "minecraft/client/Minecraft.h" #include "minecraft/util/Mth.h" #include "minecraft/world/Difficulty.h" -#include "minecraft/world/phys/HitResult.h" -#include "Facing.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "java/Class.h" -#include "java/Random.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/EntityIO.h" #include "minecraft/world/entity/Mob.h" @@ -25,6 +23,8 @@ #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/MobSpawnerTileEntity.h" +#include "minecraft/world/phys/HitResult.h" +#include "strings.h" SpawnEggItem::SpawnEggItem(int id) : Item(id) { setMaxStackSize(16); // 4J-PB brought forward. It is 64 on PC, but we'll diff --git a/targets/minecraft/world/item/StoneSlabTileItem.cpp b/targets/minecraft/world/item/StoneSlabTileItem.cpp index 24fed7a43..edb7afe11 100644 --- a/targets/minecraft/world/item/StoneSlabTileItem.cpp +++ b/targets/minecraft/world/item/StoneSlabTileItem.cpp @@ -5,10 +5,10 @@ #include "minecraft/Facing.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/item/TileItem.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/item/TileItem.h" StoneSlabTileItem::StoneSlabTileItem(int id, HalfSlabTile* halfTile, HalfSlabTile* fullTile, bool full) diff --git a/targets/minecraft/world/item/TileItem.cpp b/targets/minecraft/world/item/TileItem.cpp index e95c659dc..8bd70f847 100644 --- a/targets/minecraft/world/item/TileItem.cpp +++ b/targets/minecraft/world/item/TileItem.cpp @@ -12,12 +12,12 @@ #include "minecraft/world/Icon.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TopSnowTile.h" -#include "minecraft/world/item/Item.h" TileItem::TileItem(int id) : Item(id) { this->tileId = id + 256; diff --git a/targets/minecraft/world/item/WaterLilyTileItem.cpp b/targets/minecraft/world/item/WaterLilyTileItem.cpp index 6ca71237f..e9ae70465 100644 --- a/targets/minecraft/world/item/WaterLilyTileItem.cpp +++ b/targets/minecraft/world/item/WaterLilyTileItem.cpp @@ -4,12 +4,12 @@ #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/ColoredTileItem.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/HitResult.h" -#include "minecraft/world/item/ColoredTileItem.h" WaterLilyTileItem::WaterLilyTileItem(int id) : ColoredTileItem(id, false) {} diff --git a/targets/minecraft/world/item/WeaponItem.cpp b/targets/minecraft/world/item/WeaponItem.cpp index 73270bfaf..3e910bcb2 100644 --- a/targets/minecraft/world/item/WeaponItem.cpp +++ b/targets/minecraft/world/item/WeaponItem.cpp @@ -2,14 +2,14 @@ #include +#include "minecraft/world/entity/ai/attributes/Attribute.h" #include "minecraft/world/entity/ai/attributes/AttributeModifier.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/entity/ai/attributes/Attribute.h" -#include "minecraft/world/item/Item.h" WeaponItem::WeaponItem(int id, const Tier* tier) : Item(id), tier(tier) { maxStackSize = 1; diff --git a/targets/minecraft/world/item/WeaponItem.h b/targets/minecraft/world/item/WeaponItem.h index 65d4a3b52..bdebb9cd6 100644 --- a/targets/minecraft/world/item/WeaponItem.h +++ b/targets/minecraft/world/item/WeaponItem.h @@ -3,7 +3,6 @@ #include "Item.h" #include "minecraft/world/entity/ai/attributes/Attribute.h" #include "minecraft/world/item/UseAnim.h" -#include "minecraft/world/item/UseAnim.h" class WeaponItem : public Item { private: diff --git a/targets/minecraft/world/item/WoolTileItem.cpp b/targets/minecraft/world/item/WoolTileItem.cpp index fedf17b97..d70383acd 100644 --- a/targets/minecraft/world/item/WoolTileItem.cpp +++ b/targets/minecraft/world/item/WoolTileItem.cpp @@ -3,10 +3,10 @@ #include #include "ItemInstance.h" -#include "strings.h" #include "minecraft/world/item/TileItem.h" #include "minecraft/world/level/tile/ColoredTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" const unsigned int WoolTileItem::COLOR_DESCS[] = { IDS_TILE_CLOTH_BLACK, IDS_TILE_CLOTH_RED, IDS_TILE_CLOTH_GREEN, diff --git a/targets/minecraft/world/item/alchemy/PotionBrewing.cpp b/targets/minecraft/world/item/alchemy/PotionBrewing.cpp index 0ffe99285..2d64fa924 100644 --- a/targets/minecraft/world/item/alchemy/PotionBrewing.cpp +++ b/targets/minecraft/world/item/alchemy/PotionBrewing.cpp @@ -2,14 +2,14 @@ #include +#include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" #include "java/JavaMath.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" -#include "Minecraft.Client/Common/App_enums.h" -#include "strings.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" +#include "strings.h" const int PotionBrewing::DEFAULT_APPEARANCES[] = { IDS_POTION_PREFIX_MUNDANE, IDS_POTION_PREFIX_UNINTERESTING, diff --git a/targets/minecraft/world/item/crafting/ArmorDyeRecipe.cpp b/targets/minecraft/world/item/crafting/ArmorDyeRecipe.cpp index 6da7868bb..6df5abff5 100644 --- a/targets/minecraft/world/item/crafting/ArmorDyeRecipe.cpp +++ b/targets/minecraft/world/item/crafting/ArmorDyeRecipe.cpp @@ -1,6 +1,7 @@ #include "ArmorDyeRecipe.h" #include + #include #include @@ -9,11 +10,11 @@ #include "minecraft/world/inventory/CraftingContainer.h" #include "minecraft/world/item/ArmorItem.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/Recipes.h" +#include "minecraft/world/item/crafting/Recipy.h" #include "minecraft/world/item/crafting/ShapedRecipy.h" #include "minecraft/world/level/tile/ColoredTile.h" -#include "minecraft/world/item/ItemInstance.h" -#include "minecraft/world/item/crafting/Recipy.h" bool ArmorDyeRecipe::matches(std::shared_ptr craftSlots, Level* level) { diff --git a/targets/minecraft/world/item/crafting/Recipes.cpp b/targets/minecraft/world/item/crafting/Recipes.cpp index f6da5b95d..c731da61a 100644 --- a/targets/minecraft/world/item/crafting/Recipes.cpp +++ b/targets/minecraft/world/item/crafting/Recipes.cpp @@ -1,6 +1,7 @@ #include "minecraft/world/item/crafting/Recipes.h" #include + #include #include #include diff --git a/targets/minecraft/world/item/crafting/ShapedRecipy.cpp b/targets/minecraft/world/item/crafting/ShapedRecipy.cpp index 234d743b5..2cf1273bc 100644 --- a/targets/minecraft/world/item/crafting/ShapedRecipy.cpp +++ b/targets/minecraft/world/item/crafting/ShapedRecipy.cpp @@ -12,8 +12,8 @@ #include "Recipes.h" #include "minecraft/world/inventory/CraftingContainer.h" #include "minecraft/world/item/ItemInstance.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/item/crafting/Recipy.h" +#include "nbt/CompoundTag.h" // 4J-PB - for new crafting - Adding group to define type of item that the // recipe produces diff --git a/targets/minecraft/world/item/crafting/ShapelessRecipy.cpp b/targets/minecraft/world/item/crafting/ShapelessRecipy.cpp index 57689e263..1b1a43cd6 100644 --- a/targets/minecraft/world/item/crafting/ShapelessRecipy.cpp +++ b/targets/minecraft/world/item/crafting/ShapelessRecipy.cpp @@ -7,6 +7,7 @@ #include "ShapelessRecipy.h" #include + #include #include #include diff --git a/targets/minecraft/world/item/enchantment/ArrowDamageEnchantment.cpp b/targets/minecraft/world/item/enchantment/ArrowDamageEnchantment.cpp index e85ad23e6..5bbfbd99e 100644 --- a/targets/minecraft/world/item/enchantment/ArrowDamageEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/ArrowDamageEnchantment.cpp @@ -1,8 +1,8 @@ #include "ArrowDamageEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" ArrowDamageEnchantment::ArrowDamageEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::bow) { diff --git a/targets/minecraft/world/item/enchantment/ArrowFireEnchantment.cpp b/targets/minecraft/world/item/enchantment/ArrowFireEnchantment.cpp index 5448e6b79..3ae6e2fba 100644 --- a/targets/minecraft/world/item/enchantment/ArrowFireEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/ArrowFireEnchantment.cpp @@ -1,8 +1,8 @@ #include "ArrowFireEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" ArrowFireEnchantment::ArrowFireEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::bow) { diff --git a/targets/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.cpp b/targets/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.cpp index a64456543..252aa3203 100644 --- a/targets/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.cpp @@ -1,8 +1,8 @@ #include "ArrowInfiniteEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" ArrowInfiniteEnchantment::ArrowInfiniteEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::bow) { diff --git a/targets/minecraft/world/item/enchantment/ArrowKnockbackEnchantment.cpp b/targets/minecraft/world/item/enchantment/ArrowKnockbackEnchantment.cpp index cff7d5802..97b1c74b6 100644 --- a/targets/minecraft/world/item/enchantment/ArrowKnockbackEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/ArrowKnockbackEnchantment.cpp @@ -1,8 +1,8 @@ #include "ArrowKnockbackEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" ArrowKnockbackEnchantment::ArrowKnockbackEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::bow) { diff --git a/targets/minecraft/world/item/enchantment/DamageEnchantment.cpp b/targets/minecraft/world/item/enchantment/DamageEnchantment.cpp index 51fd612c0..4939f3914 100644 --- a/targets/minecraft/world/item/enchantment/DamageEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/DamageEnchantment.cpp @@ -2,7 +2,6 @@ #include -#include "strings.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/MobType.h" #include "minecraft/world/item/HatchetItem.h" @@ -10,6 +9,7 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" const int DamageEnchantment::names[] = {IDS_ENCHANTMENT_DAMAGE_ALL, IDS_ENCHANTMENT_DAMAGE_UNDEAD, diff --git a/targets/minecraft/world/item/enchantment/DigDurabilityEnchantment.cpp b/targets/minecraft/world/item/enchantment/DigDurabilityEnchantment.cpp index 563d34047..9a215a65e 100644 --- a/targets/minecraft/world/item/enchantment/DigDurabilityEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/DigDurabilityEnchantment.cpp @@ -1,12 +1,12 @@ #include "DigDurabilityEnchantment.h" #include "java/Random.h" -#include "strings.h" #include "minecraft/world/item/ArmorItem.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" DigDurabilityEnchantment::DigDurabilityEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::digger) { diff --git a/targets/minecraft/world/item/enchantment/DiggingEnchantment.cpp b/targets/minecraft/world/item/enchantment/DiggingEnchantment.cpp index 0c7e5cd3f..0ea2918a4 100644 --- a/targets/minecraft/world/item/enchantment/DiggingEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/DiggingEnchantment.cpp @@ -2,11 +2,11 @@ #include -#include "strings.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" DiggingEnchantment::DiggingEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::digger) { diff --git a/targets/minecraft/world/item/enchantment/Enchantment.cpp b/targets/minecraft/world/item/enchantment/Enchantment.cpp index 11abcdcde..899eb4990 100644 --- a/targets/minecraft/world/item/enchantment/Enchantment.cpp +++ b/targets/minecraft/world/item/enchantment/Enchantment.cpp @@ -3,7 +3,6 @@ #include #include -#include "strings.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "minecraft/util/HtmlString.h" @@ -24,6 +23,7 @@ #include "minecraft/world/item/enchantment/ThornsEnchantment.h" #include "minecraft/world/item/enchantment/UntouchingEnchantment.h" #include "minecraft/world/item/enchantment/WaterWorkerEnchantment.h" +#include "strings.h" // Enchantment *Enchantment::enchantments[256]; std::vector Enchantment::enchantments = diff --git a/targets/minecraft/world/item/enchantment/EnchantmentInstance.cpp b/targets/minecraft/world/item/enchantment/EnchantmentInstance.cpp index c581f4ac9..3b6dcf35c 100644 --- a/targets/minecraft/world/item/enchantment/EnchantmentInstance.cpp +++ b/targets/minecraft/world/item/enchantment/EnchantmentInstance.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/util/WeighedRandom.h" +#include "minecraft/world/item/enchantment/Enchantment.h" EnchantmentInstance::EnchantmentInstance(Enchantment* enchantment, int level) : WeighedRandomItem(enchantment->getFrequency()), diff --git a/targets/minecraft/world/item/enchantment/FireAspectEnchantment.cpp b/targets/minecraft/world/item/enchantment/FireAspectEnchantment.cpp index f3af50fe2..443b30918 100644 --- a/targets/minecraft/world/item/enchantment/FireAspectEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/FireAspectEnchantment.cpp @@ -1,8 +1,8 @@ #include "FireAspectEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" FireAspectEnchantment::FireAspectEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::weapon) { diff --git a/targets/minecraft/world/item/enchantment/KnockbackEnchantment.cpp b/targets/minecraft/world/item/enchantment/KnockbackEnchantment.cpp index bf32c5783..fd9dae621 100644 --- a/targets/minecraft/world/item/enchantment/KnockbackEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/KnockbackEnchantment.cpp @@ -1,8 +1,8 @@ #include "KnockbackEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" KnockbackEnchantment::KnockbackEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::weapon) { diff --git a/targets/minecraft/world/item/enchantment/LootBonusEnchantment.cpp b/targets/minecraft/world/item/enchantment/LootBonusEnchantment.cpp index 644d47b54..8d5738f99 100644 --- a/targets/minecraft/world/item/enchantment/LootBonusEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/LootBonusEnchantment.cpp @@ -1,8 +1,8 @@ #include "LootBonusEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" LootBonusEnchantment::LootBonusEnchantment(int id, int frequency, const EnchantmentCategory* cat) diff --git a/targets/minecraft/world/item/enchantment/OxygenEnchantment.cpp b/targets/minecraft/world/item/enchantment/OxygenEnchantment.cpp index 52eb7925e..1935ba129 100644 --- a/targets/minecraft/world/item/enchantment/OxygenEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/OxygenEnchantment.cpp @@ -1,8 +1,8 @@ #include "OxygenEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" OxygenEnchantment::OxygenEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::armor_head) { diff --git a/targets/minecraft/world/item/enchantment/ProtectionEnchantment.cpp b/targets/minecraft/world/item/enchantment/ProtectionEnchantment.cpp index 20a463047..f56520c4d 100644 --- a/targets/minecraft/world/item/enchantment/ProtectionEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/ProtectionEnchantment.cpp @@ -1,12 +1,12 @@ #include "ProtectionEnchantment.h" #include "minecraft/util/Mth.h" -#include "strings.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" #include "minecraft/world/item/enchantment/EnchantmentHelper.h" +#include "strings.h" const int ProtectionEnchantment::names[] = { IDS_ENCHANTMENT_PROTECT_ALL, IDS_ENCHANTMENT_PROTECT_FIRE, diff --git a/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp b/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp index 0bd85c385..5122ec57b 100644 --- a/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp @@ -1,6 +1,5 @@ #include "ThornsEnchantment.h" -#include "strings.h" #include "java/Random.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -12,6 +11,7 @@ #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" #include "minecraft/world/item/enchantment/EnchantmentHelper.h" +#include "strings.h" const float ThornsEnchantment::CHANCE_PER_LEVEl = 0.15f; diff --git a/targets/minecraft/world/item/enchantment/UntouchingEnchantment.cpp b/targets/minecraft/world/item/enchantment/UntouchingEnchantment.cpp index 99f72828d..d49988308 100644 --- a/targets/minecraft/world/item/enchantment/UntouchingEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/UntouchingEnchantment.cpp @@ -2,11 +2,11 @@ #include -#include "strings.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" UntouchingEnchantment::UntouchingEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::digger) { diff --git a/targets/minecraft/world/item/enchantment/WaterWorkerEnchantment.cpp b/targets/minecraft/world/item/enchantment/WaterWorkerEnchantment.cpp index 32696ab2e..a6639e66f 100644 --- a/targets/minecraft/world/item/enchantment/WaterWorkerEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/WaterWorkerEnchantment.cpp @@ -1,8 +1,8 @@ #include "WaterWorkerEnchantment.h" -#include "strings.h" #include "minecraft/world/item/enchantment/Enchantment.h" #include "minecraft/world/item/enchantment/EnchantmentCategory.h" +#include "strings.h" WaterWorkerEnchantment::WaterWorkerEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::armor_head) { diff --git a/targets/minecraft/world/item/trading/MerchantRecipe.cpp b/targets/minecraft/world/item/trading/MerchantRecipe.cpp index 500d6f776..bd34e4802 100644 --- a/targets/minecraft/world/item/trading/MerchantRecipe.cpp +++ b/targets/minecraft/world/item/trading/MerchantRecipe.cpp @@ -2,8 +2,8 @@ #include -#include "nbt/CompoundTag.h" #include "minecraft/world/item/ItemInstance.h" +#include "nbt/CompoundTag.h" class Item; class Tile; diff --git a/targets/minecraft/world/level/BaseMobSpawner.cpp b/targets/minecraft/world/level/BaseMobSpawner.cpp index 871997721..7177bf881 100644 --- a/targets/minecraft/world/level/BaseMobSpawner.cpp +++ b/targets/minecraft/world/level/BaseMobSpawner.cpp @@ -6,6 +6,8 @@ #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/util/WeighedRandom.h" +#include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/EntityIO.h" #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/item/Minecart.h" @@ -15,8 +17,6 @@ #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" #include "nbt/Tag.h" -#include "minecraft/util/WeighedRandom.h" -#include "minecraft/world/entity/Entity.h" BaseMobSpawner::BaseMobSpawner() { spawnPotentials = nullptr; diff --git a/targets/minecraft/world/level/Explosion.cpp b/targets/minecraft/world/level/Explosion.cpp index c4dc64a4d..ae72188e2 100644 --- a/targets/minecraft/world/level/Explosion.cpp +++ b/targets/minecraft/world/level/Explosion.cpp @@ -2,6 +2,7 @@ #include #include + #include #include @@ -13,14 +14,14 @@ #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" +#include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/item/PrimedTnt.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/enchantment/ProtectionEnchantment.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/TilePos.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/entity/LivingEntity.h" -#include "minecraft/world/level/TilePos.h" #include "minecraft/world/phys/Vec3.h" Explosion::Explosion(Level* level, std::shared_ptr source, double x, diff --git a/targets/minecraft/world/level/Level.cpp b/targets/minecraft/world/level/Level.cpp index 57e4a32b4..ea3e07ab6 100644 --- a/targets/minecraft/world/level/Level.cpp +++ b/targets/minecraft/world/level/Level.cpp @@ -1,8 +1,9 @@ #include "Level.h" #include -#include #include +#include + #include #include #include @@ -12,6 +13,7 @@ #include #include "Explosion.h" +#include "IPlatformInput.h" #include "LevelListener.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" @@ -38,7 +40,9 @@ #include "minecraft/world/entity/ai/village/Villages.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/level/ChunkPos.h" #include "minecraft/world/level/LevelType.h" +#include "minecraft/world/level/LightLayer.h" #include "minecraft/world/level/Region.h" #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/biome/BiomeSource.h" @@ -63,14 +67,11 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TopSnowTile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" #include "minecraft/world/scores/Scoreboard.h" #include "platform/PlatformServices.h" -#include "IPlatformInput.h" -#include "minecraft/world/level/ChunkPos.h" -#include "minecraft/world/level/LightLayer.h" -#include "minecraft/world/phys/AABB.h" class CompoundTag; class ItemInstance; diff --git a/targets/minecraft/world/level/Level.h b/targets/minecraft/world/level/Level.h index db14dbd27..0ee6135bd 100644 --- a/targets/minecraft/world/level/Level.h +++ b/targets/minecraft/world/level/Level.h @@ -4,11 +4,11 @@ // #include #include #include +#include #include #include #include #include -#include #include "4J.Common/4J_Compat.h" #include "ChunkPos.h" diff --git a/targets/minecraft/world/level/MobSpawner.cpp b/targets/minecraft/world/level/MobSpawner.cpp index 1d9c61e94..7791b582e 100644 --- a/targets/minecraft/world/level/MobSpawner.cpp +++ b/targets/minecraft/world/level/MobSpawner.cpp @@ -15,12 +15,12 @@ #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/MobCategory.h" #include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/level/ChunkPos.h" +#include "minecraft/world/level/TilePos.h" #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/ChunkPos.h" -#include "minecraft/world/level/TilePos.h" class MobGroupData; diff --git a/targets/minecraft/world/level/PortalForcer.cpp b/targets/minecraft/world/level/PortalForcer.cpp index 379269113..658ed9e3c 100644 --- a/targets/minecraft/world/level/PortalForcer.cpp +++ b/targets/minecraft/world/level/PortalForcer.cpp @@ -3,6 +3,7 @@ #include #include "Minecraft.Client/Linux/Linux_App.h" +#include "Pos.h" #include "java/Random.h" #include "minecraft/Direction.h" #include "minecraft/SharedConstants.h" @@ -13,7 +14,6 @@ #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" -#include "Pos.h" PortalForcer::PortalPosition::PortalPosition(int x, int y, int z, int64_t time) : Pos(x, y, z) { diff --git a/targets/minecraft/world/level/Region.h b/targets/minecraft/world/level/Region.h index 9a6be7f96..daefa41fe 100644 --- a/targets/minecraft/world/level/Region.h +++ b/targets/minecraft/world/level/Region.h @@ -6,7 +6,6 @@ #include "LevelSource.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/LightLayer.h" -#include "minecraft/world/level/LightLayer.h" class Material; class TileEntity; diff --git a/targets/minecraft/world/level/biome/BeachBiome.cpp b/targets/minecraft/world/level/biome/BeachBiome.cpp index a895c65ed..40de7ba4b 100644 --- a/targets/minecraft/world/level/biome/BeachBiome.cpp +++ b/targets/minecraft/world/level/biome/BeachBiome.cpp @@ -1,11 +1,12 @@ #include "BeachBiome.h" #include + #include #include "BiomeDecorator.h" -#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/tile/Tile.h" BeachBiome::BeachBiome(int id) : Biome(id) { // remove default mob spawn settings diff --git a/targets/minecraft/world/level/biome/Biome.cpp b/targets/minecraft/world/level/biome/Biome.cpp index 95d85f3ed..6e873a69e 100644 --- a/targets/minecraft/world/level/biome/Biome.cpp +++ b/targets/minecraft/world/level/biome/Biome.cpp @@ -1,6 +1,7 @@ #include "minecraft/world/level/biome/Biome.h" #include + #include #include #include diff --git a/targets/minecraft/world/level/biome/Biome.h b/targets/minecraft/world/level/biome/Biome.h index 46d484947..f592721e5 100644 --- a/targets/minecraft/world/level/biome/Biome.h +++ b/targets/minecraft/world/level/biome/Biome.h @@ -1,15 +1,16 @@ #pragma once #include + #include #include #include #include "Minecraft.Client/Common/App_enums.h" +#include "java/Class.h" #include "minecraft/util/WeighedRandom.h" #include "minecraft/world/entity/Mob.h" #include "minecraft/world/level/LevelSource.h" -#include "java/Class.h" class Feature; class MobCategory; diff --git a/targets/minecraft/world/level/biome/BiomeCache.h b/targets/minecraft/world/level/biome/BiomeCache.h index 06c1be427..23feb50be 100644 --- a/targets/minecraft/world/level/biome/BiomeCache.h +++ b/targets/minecraft/world/level/biome/BiomeCache.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/biome/BiomeSource.cpp b/targets/minecraft/world/level/biome/BiomeSource.cpp index da03ea842..3f3af7cf5 100644 --- a/targets/minecraft/world/level/biome/BiomeSource.cpp +++ b/targets/minecraft/world/level/biome/BiomeSource.cpp @@ -1,17 +1,16 @@ #include "BiomeSource.h" #include + #include +#include "IPlatformInput.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" +#include "Minecraft.Client/Linux/Linux_App.h" +#include "java/Random.h" #include "java/System.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/ProgressRenderer.h" -#include "platform/PlatformServices.h" -#include "IPlatformInput.h" -#include "Minecraft.Client/Linux/Linux_App.h" -#include "java/Random.h" -#include "strings.h" #include "minecraft/world/level/ChunkPos.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/TilePos.h" @@ -19,6 +18,8 @@ #include "minecraft/world/level/biome/BiomeCache.h" #include "minecraft/world/level/newbiome/layer/Layer.h" #include "minecraft/world/level/storage/LevelData.h" +#include "platform/PlatformServices.h" +#include "strings.h" // 4J - removal of separate temperature & downfall layers brought forward // from 1.2.3 diff --git a/targets/minecraft/world/level/biome/BiomeSource.h b/targets/minecraft/world/level/biome/BiomeSource.h index 4e2ea561b..b49af35dc 100644 --- a/targets/minecraft/world/level/biome/BiomeSource.h +++ b/targets/minecraft/world/level/biome/BiomeSource.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include @@ -7,8 +8,8 @@ #include "Biome.h" #include "BiomeCache.h" #include "BiomeSource.h" -#include "minecraft/world/level/levelgen/synth/net.minecraft.world.level.levelgen.synth.h" #include "minecraft/world/level/biome/BiomeSource.h" +#include "minecraft/world/level/levelgen/synth/net.minecraft.world.level.levelgen.synth.h" class ChunkPos; class Level; diff --git a/targets/minecraft/world/level/biome/ExtremeHillsBiome.cpp b/targets/minecraft/world/level/biome/ExtremeHillsBiome.cpp index c647ac5ce..8b5c876e4 100644 --- a/targets/minecraft/world/level/biome/ExtremeHillsBiome.cpp +++ b/targets/minecraft/world/level/biome/ExtremeHillsBiome.cpp @@ -4,10 +4,10 @@ #include "java/Random.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/levelgen/feature/Feature.h" #include "minecraft/world/level/levelgen/feature/OreFeature.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/biome/Biome.h" ExtremeHillsBiome::ExtremeHillsBiome(int id) : Biome(id) { silverfishFeature = new OreFeature(Tile::monsterStoneEgg_Id, 8); diff --git a/targets/minecraft/world/level/biome/FixedBiomeSource.h b/targets/minecraft/world/level/biome/FixedBiomeSource.h index 933906801..e0ceb321f 100644 --- a/targets/minecraft/world/level/biome/FixedBiomeSource.h +++ b/targets/minecraft/world/level/biome/FixedBiomeSource.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/biome/ForestBiome.cpp b/targets/minecraft/world/level/biome/ForestBiome.cpp index 109cb7aee..14889640e 100644 --- a/targets/minecraft/world/level/biome/ForestBiome.cpp +++ b/targets/minecraft/world/level/biome/ForestBiome.cpp @@ -4,11 +4,11 @@ #include "java/Class.h" #include "java/Random.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/biome/BiomeDecorator.h" #include "minecraft/world/level/levelgen/feature/BasicTreeFeature.h" #include "minecraft/world/level/levelgen/feature/BirchFeature.h" #include "minecraft/world/level/levelgen/feature/TreeFeature.h" -#include "minecraft/world/level/biome/Biome.h" ForestBiome::ForestBiome(int id) : Biome(id) { friendlies_wolf.push_back(new MobSpawnerData( diff --git a/targets/minecraft/world/level/biome/JungleBiome.cpp b/targets/minecraft/world/level/biome/JungleBiome.cpp index c9770b67e..3543d8592 100644 --- a/targets/minecraft/world/level/biome/JungleBiome.cpp +++ b/targets/minecraft/world/level/biome/JungleBiome.cpp @@ -5,6 +5,7 @@ #include "java/Class.h" #include "java/Random.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/biome/BiomeDecorator.h" #include "minecraft/world/level/levelgen/feature/BasicTreeFeature.h" #include "minecraft/world/level/levelgen/feature/GroundBushFeature.h" @@ -16,7 +17,6 @@ #include "minecraft/world/level/tile/TallGrassPlantTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TreeTile.h" -#include "minecraft/world/level/biome/Biome.h" JungleBiome::JungleBiome(int id) : Biome(id) { decorator->treeCount = 50; diff --git a/targets/minecraft/world/level/biome/MushroomIslandBiome.cpp b/targets/minecraft/world/level/biome/MushroomIslandBiome.cpp index 6ef60838a..0a17b0815 100644 --- a/targets/minecraft/world/level/biome/MushroomIslandBiome.cpp +++ b/targets/minecraft/world/level/biome/MushroomIslandBiome.cpp @@ -1,12 +1,13 @@ #include "MushroomIslandBiome.h" #include + #include #include "BiomeDecorator.h" #include "java/Class.h" -#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/tile/Tile.h" MushroomIslandBiome::MushroomIslandBiome(int id) : Biome(id) { decorator->treeCount = -100; diff --git a/targets/minecraft/world/level/biome/RainforestBiome.cpp b/targets/minecraft/world/level/biome/RainforestBiome.cpp index 787ef3431..4c31af34d 100644 --- a/targets/minecraft/world/level/biome/RainforestBiome.cpp +++ b/targets/minecraft/world/level/biome/RainforestBiome.cpp @@ -1,9 +1,9 @@ #include "RainforestBiome.h" #include "java/Random.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/levelgen/feature/BasicTreeFeature.h" #include "minecraft/world/level/levelgen/feature/TreeFeature.h" -#include "minecraft/world/level/biome/Biome.h" RainforestBiome::RainforestBiome(int id) : Biome(id) {} diff --git a/targets/minecraft/world/level/biome/TaigaBiome.cpp b/targets/minecraft/world/level/biome/TaigaBiome.cpp index fe3530e2e..a92cd4872 100644 --- a/targets/minecraft/world/level/biome/TaigaBiome.cpp +++ b/targets/minecraft/world/level/biome/TaigaBiome.cpp @@ -4,10 +4,10 @@ #include "java/Class.h" #include "java/Random.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/biome/BiomeDecorator.h" #include "minecraft/world/level/levelgen/feature/PineFeature.h" #include "minecraft/world/level/levelgen/feature/SpruceFeature.h" -#include "minecraft/world/level/biome/Biome.h" TaigaBiome::TaigaBiome(int id) : Biome(id) { friendlies_wolf.push_back(new MobSpawnerData( diff --git a/targets/minecraft/world/level/biome/TheEndBiome.cpp b/targets/minecraft/world/level/biome/TheEndBiome.cpp index 74cdd947c..9d58608ea 100644 --- a/targets/minecraft/world/level/biome/TheEndBiome.cpp +++ b/targets/minecraft/world/level/biome/TheEndBiome.cpp @@ -1,12 +1,13 @@ #include "TheEndBiome.h" #include + #include #include "TheEndBiomeDecorator.h" #include "java/Class.h" -#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/tile/Tile.h" TheEndBiome::TheEndBiome(int id) : Biome(id) { enemies.clear(); diff --git a/targets/minecraft/world/level/chunk/BlockReplacements.h b/targets/minecraft/world/level/chunk/BlockReplacements.h index b585242ca..1b8452b30 100644 --- a/targets/minecraft/world/level/chunk/BlockReplacements.h +++ b/targets/minecraft/world/level/chunk/BlockReplacements.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/chunk/CompressedTileStorage.cpp b/targets/minecraft/world/level/chunk/CompressedTileStorage.cpp index 814a7302e..4a7d8ba48 100644 --- a/targets/minecraft/world/level/chunk/CompressedTileStorage.cpp +++ b/targets/minecraft/world/level/chunk/CompressedTileStorage.cpp @@ -2,8 +2,9 @@ #include #include -#include #include +#include + #include #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" diff --git a/targets/minecraft/world/level/chunk/DataLayer.h b/targets/minecraft/world/level/chunk/DataLayer.h index 1ae6659e0..255346513 100644 --- a/targets/minecraft/world/level/chunk/DataLayer.h +++ b/targets/minecraft/world/level/chunk/DataLayer.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/chunk/EmptyLevelChunk.cpp b/targets/minecraft/world/level/chunk/EmptyLevelChunk.cpp index 7d1c59843..f602decc3 100644 --- a/targets/minecraft/world/level/chunk/EmptyLevelChunk.cpp +++ b/targets/minecraft/world/level/chunk/EmptyLevelChunk.cpp @@ -3,9 +3,9 @@ #include "java/Arrays.h" #include "java/Random.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/LightLayer.h" #include "minecraft/world/level/chunk/LevelChunk.h" +#include "minecraft/world/phys/AABB.h" class Entity; class EntitySelector; diff --git a/targets/minecraft/world/level/chunk/EmptyLevelChunk.h b/targets/minecraft/world/level/chunk/EmptyLevelChunk.h index aa22f8493..a447f80d3 100644 --- a/targets/minecraft/world/level/chunk/EmptyLevelChunk.h +++ b/targets/minecraft/world/level/chunk/EmptyLevelChunk.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/chunk/LevelChunk.cpp b/targets/minecraft/world/level/chunk/LevelChunk.cpp index 400ea0e51..faa9f4578 100644 --- a/targets/minecraft/world/level/chunk/LevelChunk.cpp +++ b/targets/minecraft/world/level/chunk/LevelChunk.cpp @@ -1,6 +1,7 @@ #include "LevelChunk.h" #include + #include #include #include @@ -30,9 +31,13 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/ChunkPos.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/LightLayer.h" +#include "minecraft/world/level/TilePos.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/CompressedTileStorage.h" +#include "minecraft/world/level/chunk/SparseDataStorage.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/ChestTile.h" @@ -42,10 +47,6 @@ #include "minecraft/world/phys/AABB.h" #include "nbt/CompoundTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/level/LightLayer.h" -#include "minecraft/world/level/TilePos.h" -#include "minecraft/world/level/chunk/CompressedTileStorage.h" -#include "minecraft/world/level/chunk/SparseDataStorage.h" class DataInputStream; class DataOutputStream; diff --git a/targets/minecraft/world/level/chunk/LevelChunk.h b/targets/minecraft/world/level/chunk/LevelChunk.h index 09b65208a..bbf7bf0b9 100644 --- a/targets/minecraft/world/level/chunk/LevelChunk.h +++ b/targets/minecraft/world/level/chunk/LevelChunk.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.cpp b/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.cpp index 5e0d1e058..204c62952 100644 --- a/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.cpp +++ b/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.cpp @@ -1,10 +1,10 @@ #include "ReadOnlyChunkCache.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/level/chunk/storage/ChunkStorage.h" #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/chunk/EmptyLevelChunk.h" #include "minecraft/world/level/chunk/LevelChunk.h" +#include "minecraft/world/level/chunk/storage/ChunkStorage.h" ReadOnlyChunkCache::ReadOnlyChunkCache(Level* level, ChunkStorage* storage) { chunks = std::vector(LEN * LEN); diff --git a/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.h b/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.h index d67357d78..6ef1ba569 100644 --- a/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.h +++ b/targets/minecraft/world/level/chunk/ReadOnlyChunkCache.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/chunk/SparseDataStorage.cpp b/targets/minecraft/world/level/chunk/SparseDataStorage.cpp index a2208dd6a..8269728d7 100644 --- a/targets/minecraft/world/level/chunk/SparseDataStorage.cpp +++ b/targets/minecraft/world/level/chunk/SparseDataStorage.cpp @@ -3,6 +3,7 @@ #include #include #include + #include #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" diff --git a/targets/minecraft/world/level/chunk/SparseLightStorage.cpp b/targets/minecraft/world/level/chunk/SparseLightStorage.cpp index cdbfcb8ba..9a5ba294b 100644 --- a/targets/minecraft/world/level/chunk/SparseLightStorage.cpp +++ b/targets/minecraft/world/level/chunk/SparseLightStorage.cpp @@ -3,6 +3,7 @@ #include #include #include + #include #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" diff --git a/targets/minecraft/world/level/chunk/WaterLevelChunk.cpp b/targets/minecraft/world/level/chunk/WaterLevelChunk.cpp index 8f42fe94a..e23845e5e 100644 --- a/targets/minecraft/world/level/chunk/WaterLevelChunk.cpp +++ b/targets/minecraft/world/level/chunk/WaterLevelChunk.cpp @@ -2,9 +2,9 @@ #include "java/Random.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/LightLayer.h" #include "minecraft/world/level/chunk/LevelChunk.h" +#include "minecraft/world/phys/AABB.h" class Entity; diff --git a/targets/minecraft/world/level/chunk/WaterLevelChunk.h b/targets/minecraft/world/level/chunk/WaterLevelChunk.h index be7f659ee..8f82e8f71 100644 --- a/targets/minecraft/world/level/chunk/WaterLevelChunk.h +++ b/targets/minecraft/world/level/chunk/WaterLevelChunk.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp b/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp index 93d4c0a9c..832692ceb 100644 --- a/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp +++ b/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp @@ -2,11 +2,13 @@ #include #include + #include #include #include #include +#include "IPlatformInput.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/C4JThread.h" @@ -19,6 +21,8 @@ #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/LevelChunk.h" +#include "minecraft/world/level/chunk/storage/OldChunkStorage.h" +#include "minecraft/world/level/chunk/storage/RegionFileCache.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileInputStream.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOutputStream.h" @@ -28,9 +32,6 @@ #include "nbt/CompoundTag.h" #include "nbt/NbtIo.h" #include "platform/PlatformServices.h" -#include "IPlatformInput.h" -#include "minecraft/world/level/chunk/storage/OldChunkStorage.h" -#include "minecraft/world/level/chunk/storage/RegionFileCache.h" class DataInput; diff --git a/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.h b/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.h index e85be5113..403ddb8bf 100644 --- a/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.h +++ b/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp b/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp index 761aa3609..a5e60a91b 100644 --- a/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp +++ b/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -9,6 +10,7 @@ #include #include +#include "IPlatformInput.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "console_helpers/Definitions.h" @@ -30,7 +32,6 @@ #include "nbt/ListTag.h" #include "nbt/NbtIo.h" #include "platform/PlatformServices.h" -#include "IPlatformInput.h" thread_local OldChunkStorage::ThreadStorage* OldChunkStorage::m_tlsStorage = nullptr; diff --git a/targets/minecraft/world/level/chunk/storage/RegionFile.cpp b/targets/minecraft/world/level/chunk/storage/RegionFile.cpp index a270fca01..4ac2fc1b4 100644 --- a/targets/minecraft/world/level/chunk/storage/RegionFile.cpp +++ b/targets/minecraft/world/level/chunk/storage/RegionFile.cpp @@ -1,6 +1,7 @@ #include "RegionFile.h" #include + #include #include #include diff --git a/targets/minecraft/world/level/chunk/storage/RegionFile.h b/targets/minecraft/world/level/chunk/storage/RegionFile.h index ae1030fed..049431186 100644 --- a/targets/minecraft/world/level/chunk/storage/RegionFile.h +++ b/targets/minecraft/world/level/chunk/storage/RegionFile.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/chunk/storage/RegionFileCache.cpp b/targets/minecraft/world/level/chunk/storage/RegionFileCache.cpp index b0a2a7b38..4f69a86b1 100644 --- a/targets/minecraft/world/level/chunk/storage/RegionFileCache.cpp +++ b/targets/minecraft/world/level/chunk/storage/RegionFileCache.cpp @@ -4,8 +4,8 @@ #include "console_helpers/StringHelpers.h" #include "java/File.h" -#include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h" #include "minecraft/world/level/chunk/storage/RegionFile.h" +#include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" class DataInputStream; diff --git a/targets/minecraft/world/level/dimension/Dimension.cpp b/targets/minecraft/world/level/dimension/Dimension.cpp index 3149a98ea..932a4e125 100644 --- a/targets/minecraft/world/level/dimension/Dimension.cpp +++ b/targets/minecraft/world/level/dimension/Dimension.cpp @@ -1,9 +1,11 @@ #include "Dimension.h" #include + #include #include "HellDimension.h" +#include "IPlatformInput.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" @@ -23,9 +25,8 @@ #include "minecraft/world/level/levelgen/flat/FlatGeneratorInfo.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/Tile.h" -#include "platform/PlatformServices.h" -#include "IPlatformInput.h" #include "minecraft/world/phys/Vec3.h" +#include "platform/PlatformServices.h" class Pos; diff --git a/targets/minecraft/world/level/dimension/Dimension.h b/targets/minecraft/world/level/dimension/Dimension.h index 466ab95e0..f64863169 100644 --- a/targets/minecraft/world/level/dimension/Dimension.h +++ b/targets/minecraft/world/level/dimension/Dimension.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include "java/File.h" diff --git a/targets/minecraft/world/level/dimension/HellDimension.cpp b/targets/minecraft/world/level/dimension/HellDimension.cpp index 94e72a895..0a18ecf0b 100644 --- a/targets/minecraft/world/level/dimension/HellDimension.cpp +++ b/targets/minecraft/world/level/dimension/HellDimension.cpp @@ -2,6 +2,7 @@ #include +#include "IPlatformInput.h" #include "Minecraft.Client/Common/App_enums.h" #include "Minecraft.Client/Common/src/Colours/ColourTable.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" @@ -16,7 +17,6 @@ #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/phys/Vec3.h" #include "platform/PlatformServices.h" -#include "IPlatformInput.h" void HellDimension::init() { biomeSource = new FixedBiomeSource(Biome::hell, 1, 0); diff --git a/targets/minecraft/world/level/levelgen/CanyonFeature.h b/targets/minecraft/world/level/levelgen/CanyonFeature.h index 406890ad2..62f04bb27 100644 --- a/targets/minecraft/world/level/levelgen/CanyonFeature.h +++ b/targets/minecraft/world/level/levelgen/CanyonFeature.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp b/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp index 0a9ab9e1a..167c8cbaf 100644 --- a/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp +++ b/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp @@ -1,8 +1,9 @@ #include "CustomLevelSource.h" #include -#include #include +#include + #include #include diff --git a/targets/minecraft/world/level/levelgen/CustomLevelSource.h b/targets/minecraft/world/level/levelgen/CustomLevelSource.h index 9bcaf00c9..019ae32d3 100644 --- a/targets/minecraft/world/level/levelgen/CustomLevelSource.h +++ b/targets/minecraft/world/level/levelgen/CustomLevelSource.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/DungeonFeature.h b/targets/minecraft/world/level/levelgen/DungeonFeature.h index c094b3dc5..ea39bdf38 100644 --- a/targets/minecraft/world/level/levelgen/DungeonFeature.h +++ b/targets/minecraft/world/level/levelgen/DungeonFeature.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/levelgen/FlatLevelSource.cpp b/targets/minecraft/world/level/levelgen/FlatLevelSource.cpp index ff9641be6..513a2af80 100644 --- a/targets/minecraft/world/level/levelgen/FlatLevelSource.cpp +++ b/targets/minecraft/world/level/levelgen/FlatLevelSource.cpp @@ -2,17 +2,18 @@ #include #include + #include #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/levelgen/structure/VillageFeature.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/chunk/ChunkSource.h" // FlatLevelSource::villageFeature = new VillageFeature(1); diff --git a/targets/minecraft/world/level/levelgen/FlatLevelSource.h b/targets/minecraft/world/level/levelgen/FlatLevelSource.h index e7dedc253..3fcf40da5 100644 --- a/targets/minecraft/world/level/levelgen/FlatLevelSource.h +++ b/targets/minecraft/world/level/levelgen/FlatLevelSource.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/HellFlatLevelSource.cpp b/targets/minecraft/world/level/levelgen/HellFlatLevelSource.cpp index 597c929ff..8cdbb5a2c 100644 --- a/targets/minecraft/world/level/levelgen/HellFlatLevelSource.cpp +++ b/targets/minecraft/world/level/levelgen/HellFlatLevelSource.cpp @@ -2,20 +2,21 @@ #include #include + #include #include #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/levelgen/feature/HellFireFeature.h" #include "minecraft/world/level/levelgen/feature/LightGemFeature.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/HeavyTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/chunk/ChunkSource.h" HellFlatLevelSource::HellFlatLevelSource(Level* level, int64_t seed) { int xzSize = level->getLevelData()->getXZSize(); diff --git a/targets/minecraft/world/level/levelgen/HellFlatLevelSource.h b/targets/minecraft/world/level/levelgen/HellFlatLevelSource.h index 419fa5be2..a6070ac8c 100644 --- a/targets/minecraft/world/level/levelgen/HellFlatLevelSource.h +++ b/targets/minecraft/world/level/levelgen/HellFlatLevelSource.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/HellRandomLevelSource.cpp b/targets/minecraft/world/level/levelgen/HellRandomLevelSource.cpp index 4dc4acc04..188646587 100644 --- a/targets/minecraft/world/level/levelgen/HellRandomLevelSource.cpp +++ b/targets/minecraft/world/level/levelgen/HellRandomLevelSource.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -10,7 +11,11 @@ #include "java/Random.h" #include "minecraft/world/entity/MobCategory.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/LevelChunk.h" +#include "minecraft/world/level/levelgen/LargeFeature.h" +#include "minecraft/world/level/levelgen/LargeHellCaveFeature.h" #include "minecraft/world/level/levelgen/feature/FlowerFeature.h" #include "minecraft/world/level/levelgen/feature/HellFireFeature.h" #include "minecraft/world/level/levelgen/feature/HellPortalFeature.h" @@ -22,10 +27,6 @@ #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/HeavyTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/chunk/ChunkSource.h" -#include "minecraft/world/level/levelgen/LargeFeature.h" -#include "minecraft/world/level/levelgen/LargeHellCaveFeature.h" HellRandomLevelSource::HellRandomLevelSource(Level* level, int64_t seed) { int xzSize = level->getLevelData()->getXZSize(); diff --git a/targets/minecraft/world/level/levelgen/HellRandomLevelSource.h b/targets/minecraft/world/level/levelgen/HellRandomLevelSource.h index fd61f5bf0..067205ba5 100644 --- a/targets/minecraft/world/level/levelgen/HellRandomLevelSource.h +++ b/targets/minecraft/world/level/levelgen/HellRandomLevelSource.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/LargeCaveFeature.h b/targets/minecraft/world/level/levelgen/LargeCaveFeature.h index c01d47ef3..386be16bb 100644 --- a/targets/minecraft/world/level/levelgen/LargeCaveFeature.h +++ b/targets/minecraft/world/level/levelgen/LargeCaveFeature.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/levelgen/LargeFeature.cpp b/targets/minecraft/world/level/levelgen/LargeFeature.cpp index 0b2743979..499cc828c 100644 --- a/targets/minecraft/world/level/levelgen/LargeFeature.cpp +++ b/targets/minecraft/world/level/levelgen/LargeFeature.cpp @@ -2,6 +2,7 @@ #include "LargeFeature.h" #include + #include #include diff --git a/targets/minecraft/world/level/levelgen/LargeFeature.h b/targets/minecraft/world/level/levelgen/LargeFeature.h index 2f76ecb5e..024ddcfb9 100644 --- a/targets/minecraft/world/level/levelgen/LargeFeature.h +++ b/targets/minecraft/world/level/levelgen/LargeFeature.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/levelgen/LargeHellCaveFeature.h b/targets/minecraft/world/level/levelgen/LargeHellCaveFeature.h index 5e093bb78..d5f225d21 100644 --- a/targets/minecraft/world/level/levelgen/LargeHellCaveFeature.h +++ b/targets/minecraft/world/level/levelgen/LargeHellCaveFeature.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/levelgen/RandomLevelSource.cpp b/targets/minecraft/world/level/levelgen/RandomLevelSource.cpp index 749ce902c..a96199aec 100644 --- a/targets/minecraft/world/level/levelgen/RandomLevelSource.cpp +++ b/targets/minecraft/world/level/levelgen/RandomLevelSource.cpp @@ -2,6 +2,7 @@ #include #include + #include #include "Minecraft.Client/Common/src/GameRules/LevelGeneration/LevelGenerationOptions.h" @@ -12,7 +13,9 @@ #include "minecraft/world/entity/MobCategory.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,8 +31,6 @@ #include "minecraft/world/level/tile/HeavyTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/Vec3.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/chunk/ChunkSource.h" const double RandomLevelSource::SNOW_SCALE = 0.3; const double RandomLevelSource::SNOW_CUTOFF = 0.5; diff --git a/targets/minecraft/world/level/levelgen/RandomLevelSource.h b/targets/minecraft/world/level/levelgen/RandomLevelSource.h index 993736b40..023c361d6 100644 --- a/targets/minecraft/world/level/levelgen/RandomLevelSource.h +++ b/targets/minecraft/world/level/levelgen/RandomLevelSource.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.cpp b/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.cpp index 3b0717f13..b25df3468 100644 --- a/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.cpp +++ b/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.cpp @@ -2,18 +2,19 @@ #include #include + #include #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" #include "minecraft/world/level/Level.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/synth/PerlinNoise.h" #include "minecraft/world/level/tile/HeavyTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/chunk/ChunkSource.h" TheEndLevelRandomLevelSource::TheEndLevelRandomLevelSource(Level* level, int64_t seed) { diff --git a/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.h b/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.h index 216db28a0..1657216c1 100644 --- a/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.h +++ b/targets/minecraft/world/level/levelgen/TheEndLevelRandomLevelSource.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/feature/BasicTreeFeature.cpp b/targets/minecraft/world/level/levelgen/feature/BasicTreeFeature.cpp index 76d9ad97c..4def7bf36 100644 --- a/targets/minecraft/world/level/levelgen/feature/BasicTreeFeature.cpp +++ b/targets/minecraft/world/level/levelgen/feature/BasicTreeFeature.cpp @@ -1,6 +1,7 @@ #include "BasicTreeFeature.h" #include + #include #include @@ -9,9 +10,9 @@ #include "java/Random.h" #include "minecraft/util/Mth.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/feature/Feature.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TreeTile.h" -#include "minecraft/world/level/levelgen/feature/Feature.h" uint8_t BasicTree::axisConversionArray[] = {2, 0, 0, 1, 2, 1}; diff --git a/targets/minecraft/world/level/levelgen/feature/BirchFeature.cpp b/targets/minecraft/world/level/levelgen/feature/BirchFeature.cpp index 5444e495f..eb092b3d4 100644 --- a/targets/minecraft/world/level/levelgen/feature/BirchFeature.cpp +++ b/targets/minecraft/world/level/levelgen/feature/BirchFeature.cpp @@ -6,10 +6,10 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/feature/Feature.h" #include "minecraft/world/level/tile/LeafTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TreeTile.h" -#include "minecraft/world/level/levelgen/feature/Feature.h" BirchFeature::BirchFeature(bool doUpdate) : Feature(doUpdate) {} diff --git a/targets/minecraft/world/level/levelgen/feature/HugeMushroomFeature.cpp b/targets/minecraft/world/level/levelgen/feature/HugeMushroomFeature.cpp index 9db018f09..0873c4d48 100644 --- a/targets/minecraft/world/level/levelgen/feature/HugeMushroomFeature.cpp +++ b/targets/minecraft/world/level/levelgen/feature/HugeMushroomFeature.cpp @@ -2,8 +2,8 @@ #include "java/Random.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/levelgen/feature/Feature.h" +#include "minecraft/world/level/tile/Tile.h" HugeMushroomFeature::HugeMushroomFeature(int forcedType) : Feature(true) { this->forcedType = forcedType; diff --git a/targets/minecraft/world/level/levelgen/feature/MegaTreeFeature.cpp b/targets/minecraft/world/level/levelgen/feature/MegaTreeFeature.cpp index b2edfc069..df0848ccb 100644 --- a/targets/minecraft/world/level/levelgen/feature/MegaTreeFeature.cpp +++ b/targets/minecraft/world/level/levelgen/feature/MegaTreeFeature.cpp @@ -7,9 +7,9 @@ #include "java/Random.h" #include "minecraft/util/Mth.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/feature/Feature.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/VineTile.h" -#include "minecraft/world/level/levelgen/feature/Feature.h" MegaTreeFeature::MegaTreeFeature(bool doUpdate, int baseHeight, int trunkType, int leafType) diff --git a/targets/minecraft/world/level/levelgen/feature/SpruceFeature.cpp b/targets/minecraft/world/level/levelgen/feature/SpruceFeature.cpp index 474c60286..060182393 100644 --- a/targets/minecraft/world/level/levelgen/feature/SpruceFeature.cpp +++ b/targets/minecraft/world/level/levelgen/feature/SpruceFeature.cpp @@ -6,10 +6,10 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/feature/Feature.h" #include "minecraft/world/level/tile/LeafTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TreeTile.h" -#include "minecraft/world/level/levelgen/feature/Feature.h" SpruceFeature::SpruceFeature(bool doUpdate) : Feature(doUpdate) {} diff --git a/targets/minecraft/world/level/levelgen/feature/TreeFeature.cpp b/targets/minecraft/world/level/levelgen/feature/TreeFeature.cpp index 7fc373c21..900a81941 100644 --- a/targets/minecraft/world/level/levelgen/feature/TreeFeature.cpp +++ b/targets/minecraft/world/level/levelgen/feature/TreeFeature.cpp @@ -7,9 +7,9 @@ #include "java/Random.h" #include "minecraft/Direction.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/feature/Feature.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/VineTile.h" -#include "minecraft/world/level/levelgen/feature/Feature.h" TreeFeature::TreeFeature(bool doUpdate) : Feature(doUpdate), diff --git a/targets/minecraft/world/level/levelgen/structure/BoundingBox.cpp b/targets/minecraft/world/level/levelgen/structure/BoundingBox.cpp index 04c0252c3..732cf1a31 100644 --- a/targets/minecraft/world/level/levelgen/structure/BoundingBox.cpp +++ b/targets/minecraft/world/level/levelgen/structure/BoundingBox.cpp @@ -1,6 +1,7 @@ #include "BoundingBox.h" #include + #include #include diff --git a/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.cpp b/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.cpp index b591ae60f..bdf088ced 100644 --- a/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.cpp +++ b/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.cpp @@ -1,6 +1,7 @@ #include "MineShaftPieces.h" #include + #include #include #include @@ -16,6 +17,8 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/BaseMobSpawner.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/structure/BoundingBox.h" +#include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/tile/BaseRailTile.h" #include "minecraft/world/level/tile/RailTile.h" #include "minecraft/world/level/tile/Tile.h" @@ -23,8 +26,6 @@ #include "nbt/CompoundTag.h" #include "nbt/IntArrayTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/level/levelgen/structure/BoundingBox.h" -#include "minecraft/world/level/levelgen/structure/StructurePiece.h" std::vector MineShaftPieces::smallTreasureItems; ; diff --git a/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.h b/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.h index 4d3e55ce8..78668d7ec 100644 --- a/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.h +++ b/targets/minecraft/world/level/levelgen/structure/MineShaftPieces.h @@ -8,7 +8,6 @@ #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class BoundingBox; class Random; diff --git a/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.cpp b/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.cpp index 316d0e81f..fecdb0f0f 100644 --- a/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.cpp +++ b/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.cpp @@ -10,8 +10,8 @@ #include "java/Random.h" #include "minecraft/world/level/ChunkPos.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/levelgen/structure/StructureFeature.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/levelgen/structure/StructureStart.h" diff --git a/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.h b/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.h index a5ee5c91a..73bfa458e 100644 --- a/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.h +++ b/targets/minecraft/world/level/levelgen/structure/NetherBridgeFeature.h @@ -8,7 +8,6 @@ #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/levelgen/structure/StructureFeature.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class Random; class ChunkPos; diff --git a/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.cpp b/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.cpp index 43c6d00cc..84c1bb667 100644 --- a/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.cpp +++ b/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.cpp @@ -1,6 +1,7 @@ #include "NetherBridgePieces.h" #include + #include #include #include @@ -11,12 +12,12 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/BaseMobSpawner.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/structure/BoundingBox.h" +#include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/MobSpawnerTileEntity.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/levelgen/structure/BoundingBox.h" -#include "minecraft/world/level/levelgen/structure/StructurePiece.h" void NetherBridgePieces::loadStatic() { StructureFeatureIO::setPieceId(eStructurePiece_BridgeCrossing, diff --git a/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.h b/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.h index 1aec2602e..e9e96fd80 100644 --- a/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.h +++ b/targets/minecraft/world/level/levelgen/structure/NetherBridgePieces.h @@ -5,7 +5,6 @@ #include "StructurePiece.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class BoundingBox; class Level; diff --git a/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.cpp b/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.cpp index 200fb9ea3..4c0666db9 100644 --- a/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.cpp +++ b/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.cpp @@ -10,8 +10,8 @@ #include "java/Random.h" #include "minecraft/util/Mth.h" #include "minecraft/world/level/Level.h" -#include "minecraft/world/level/biome/BiomeSource.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/biome/BiomeSource.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/levelgen/structure/StructureStart.h" diff --git a/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.h b/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.h index e6104afd3..27c87ac06 100644 --- a/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.h +++ b/targets/minecraft/world/level/levelgen/structure/RandomScatteredLargeFeature.h @@ -10,7 +10,6 @@ #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/levelgen/structure/StructureFeature.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class Level; class Random; diff --git a/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.cpp b/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.cpp index 21e41fb1f..b252b3d08 100644 --- a/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.cpp +++ b/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.cpp @@ -17,7 +17,9 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" +#include "minecraft/world/level/levelgen/structure/BoundingBox.h" #include "minecraft/world/level/levelgen/structure/StructureFeature.h" +#include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/tile/FlowerPotTile.h" #include "minecraft/world/level/tile/LeverTile.h" #include "minecraft/world/level/tile/SandStoneTile.h" @@ -29,8 +31,6 @@ #include "minecraft/world/level/tile/TripWireSourceTile.h" #include "minecraft/world/level/tile/TripWireTile.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/levelgen/structure/BoundingBox.h" -#include "minecraft/world/level/levelgen/structure/StructurePiece.h" void ScatteredFeaturePieces::loadStatic() { StructureFeatureIO::setPieceId(eStructurePiece_DesertPyramidPiece, diff --git a/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.h b/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.h index 326184a38..3ee20f12b 100644 --- a/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.h +++ b/targets/minecraft/world/level/levelgen/structure/ScatteredFeaturePieces.h @@ -3,7 +3,6 @@ #include "StructurePiece.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class BoundingBox; class Level; diff --git a/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.cpp b/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.cpp index ef2d4645e..187a505a4 100644 --- a/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.cpp +++ b/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.h b/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.h index e8aaf12b4..522ec2bb7 100644 --- a/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.h +++ b/targets/minecraft/world/level/levelgen/structure/StrongholdFeature.h @@ -10,7 +10,6 @@ #include "minecraft/world/level/ChunkPos.h" #include "minecraft/world/level/levelgen/structure/StructureFeature.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class Biome; class ChunkPos; diff --git a/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.cpp b/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.cpp index b484b3c9f..9c69dac21 100644 --- a/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.cpp +++ b/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.cpp @@ -2,6 +2,7 @@ #include #include + #include #include @@ -17,6 +18,8 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/BaseMobSpawner.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/levelgen/structure/BoundingBox.h" +#include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/DoorTile.h" @@ -27,8 +30,6 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/MobSpawnerTileEntity.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/levelgen/structure/BoundingBox.h" -#include "minecraft/world/level/levelgen/structure/StructurePiece.h" int StrongholdPieces::totalWeight = 0; std::list StrongholdPieces::currentPieces; diff --git a/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.h b/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.h index ad5bdbf62..c656ee464 100644 --- a/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.h +++ b/targets/minecraft/world/level/levelgen/structure/StrongholdPieces.h @@ -5,7 +5,6 @@ #include "StructurePiece.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class BoundingBox; class Level; diff --git a/targets/minecraft/world/level/levelgen/structure/StructureFeature.cpp b/targets/minecraft/world/level/levelgen/structure/StructureFeature.cpp index 736dd39f5..ee70f58d3 100644 --- a/targets/minecraft/world/level/levelgen/structure/StructureFeature.cpp +++ b/targets/minecraft/world/level/levelgen/structure/StructureFeature.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/structure/StructureFeature.h b/targets/minecraft/world/level/levelgen/structure/StructureFeature.h index 8a05ff84e..77e88a615 100644 --- a/targets/minecraft/world/level/levelgen/structure/StructureFeature.h +++ b/targets/minecraft/world/level/levelgen/structure/StructureFeature.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/levelgen/structure/StructureFeatureIO.h b/targets/minecraft/world/level/levelgen/structure/StructureFeatureIO.h index c9e3e9c7e..ede7705c3 100644 --- a/targets/minecraft/world/level/levelgen/structure/StructureFeatureIO.h +++ b/targets/minecraft/world/level/levelgen/structure/StructureFeatureIO.h @@ -1,7 +1,7 @@ #pragma once -#include #include +#include #include "nbt/CompoundTag.h" diff --git a/targets/minecraft/world/level/levelgen/structure/StructureStart.cpp b/targets/minecraft/world/level/levelgen/structure/StructureStart.cpp index 750b76060..3777bc18a 100644 --- a/targets/minecraft/world/level/levelgen/structure/StructureStart.cpp +++ b/targets/minecraft/world/level/levelgen/structure/StructureStart.cpp @@ -5,11 +5,11 @@ #include "java/Random.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/levelgen/structure/BoundingBox.h" +#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "nbt/CompoundTag.h" #include "nbt/IntArrayTag.h" #include "nbt/ListTag.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" StructureStart::StructureStart() { chunkX = chunkZ = 0; diff --git a/targets/minecraft/world/level/levelgen/structure/VillageFeature.cpp b/targets/minecraft/world/level/levelgen/structure/VillageFeature.cpp index 6e17328e5..05a34a095 100644 --- a/targets/minecraft/world/level/levelgen/structure/VillageFeature.cpp +++ b/targets/minecraft/world/level/levelgen/structure/VillageFeature.cpp @@ -14,10 +14,10 @@ #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/biome/BiomeSource.h" #include "minecraft/world/level/dimension/Dimension.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/level/levelgen/structure/BoundingBox.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/levelgen/structure/StructureStart.h" +#include "nbt/CompoundTag.h" const std::wstring VillageFeature::OPTION_SIZE_MODIFIER = L"size"; const std::wstring VillageFeature::OPTION_SPACING = L"distance"; diff --git a/targets/minecraft/world/level/levelgen/structure/VillageFeature.h b/targets/minecraft/world/level/levelgen/structure/VillageFeature.h index ebcf0ba90..c61b61d7b 100644 --- a/targets/minecraft/world/level/levelgen/structure/VillageFeature.h +++ b/targets/minecraft/world/level/levelgen/structure/VillageFeature.h @@ -8,7 +8,6 @@ #include "StructureStart.h" #include "minecraft/world/level/levelgen/structure/StructureFeature.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class Biome; class Level; diff --git a/targets/minecraft/world/level/levelgen/structure/VillagePieces.cpp b/targets/minecraft/world/level/levelgen/structure/VillagePieces.cpp index 8c1190463..af8f34297 100644 --- a/targets/minecraft/world/level/levelgen/structure/VillagePieces.cpp +++ b/targets/minecraft/world/level/levelgen/structure/VillagePieces.cpp @@ -1,6 +1,7 @@ #include "VillagePieces.h" #include + #include #include @@ -16,12 +17,12 @@ #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/biome/BiomeSource.h" #include "minecraft/world/level/dimension/Dimension.h" +#include "minecraft/world/level/levelgen/structure/BoundingBox.h" +#include "minecraft/world/level/levelgen/structure/StructurePiece.h" #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/SandStoneTile.h" #include "minecraft/world/level/tile/Tile.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/levelgen/structure/BoundingBox.h" -#include "minecraft/world/level/levelgen/structure/StructurePiece.h" std::vector VillagePieces::Smithy::treasureItems; diff --git a/targets/minecraft/world/level/levelgen/structure/VillagePieces.h b/targets/minecraft/world/level/levelgen/structure/VillagePieces.h index ed42a376a..9db125a56 100644 --- a/targets/minecraft/world/level/levelgen/structure/VillagePieces.h +++ b/targets/minecraft/world/level/levelgen/structure/VillagePieces.h @@ -6,7 +6,6 @@ #include "StructurePiece.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" #include "minecraft/world/level/levelgen/structure/StructurePiece.h" -#include "minecraft/world/level/levelgen/structure/StructureFeatureIO.h" class BiomeSource; class BoundingBox; diff --git a/targets/minecraft/world/level/levelgen/synth/FastNoise.h b/targets/minecraft/world/level/levelgen/synth/FastNoise.h index 06d436494..71c61b5f3 100644 --- a/targets/minecraft/world/level/levelgen/synth/FastNoise.h +++ b/targets/minecraft/world/level/levelgen/synth/FastNoise.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp b/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp index df56f0656..33cc1f998 100644 --- a/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp +++ b/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp @@ -1,6 +1,7 @@ #include "BiomeOverrideLayer.h" #include + #include #include diff --git a/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.h b/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.h index e7133f034..a976f833b 100644 --- a/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.h +++ b/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include "Layer.h" diff --git a/targets/minecraft/world/level/newbiome/layer/Layer.cpp b/targets/minecraft/world/level/newbiome/layer/Layer.cpp index 8bb96e8d9..1cd870d37 100644 --- a/targets/minecraft/world/level/newbiome/layer/Layer.cpp +++ b/targets/minecraft/world/level/newbiome/layer/Layer.cpp @@ -1,10 +1,12 @@ #include "minecraft/world/level/newbiome/layer/Layer.h" #include + #include #include #include "BiomeOverrideLayer.h" +#include "IPlatformInput.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "minecraft/world/level/LevelType.h" @@ -25,7 +27,6 @@ #include "minecraft/world/level/newbiome/layer/VoronoiZoom.h" #include "minecraft/world/level/newbiome/layer/ZoomLayer.h" #include "platform/PlatformServices.h" -#include "IPlatformInput.h" std::vector> Layer::getDefaultLayers( int64_t seed, LevelType* levelType) { diff --git a/targets/minecraft/world/level/newbiome/layer/Layer.h b/targets/minecraft/world/level/newbiome/layer/Layer.h index 62b836c6f..7d1549d01 100644 --- a/targets/minecraft/world/level/newbiome/layer/Layer.h +++ b/targets/minecraft/world/level/newbiome/layer/Layer.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/pathfinder/PathFinder.cpp b/targets/minecraft/world/level/pathfinder/PathFinder.cpp index 89633970d..2c32f814a 100644 --- a/targets/minecraft/world/level/pathfinder/PathFinder.cpp +++ b/targets/minecraft/world/level/pathfinder/PathFinder.cpp @@ -10,10 +10,10 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/pathfinder/BinaryHeap.h" #include "minecraft/world/level/pathfinder/Node.h" +#include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" PathFinder::PathFinder(LevelSource* level, bool canPassDoors, bool canOpenDoors, bool avoidWater, bool canFloat) { diff --git a/targets/minecraft/world/level/saveddata/MapItemSavedData.cpp b/targets/minecraft/world/level/saveddata/MapItemSavedData.cpp index bfc209af0..957498ced 100644 --- a/targets/minecraft/world/level/saveddata/MapItemSavedData.cpp +++ b/targets/minecraft/world/level/saveddata/MapItemSavedData.cpp @@ -1,6 +1,7 @@ #include "MapItemSavedData.h" #include + #include #include @@ -12,9 +13,9 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/MapItem.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/saveddata/SavedData.h" #include "minecraft/world/level/storage/LevelData.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/saveddata/SavedData.h" const int MapItemSavedData::END_PORTAL_DECORATION_KEY = -1; diff --git a/targets/minecraft/world/level/saveddata/MapItemSavedData.h b/targets/minecraft/world/level/saveddata/MapItemSavedData.h index 218703af8..9868c694a 100644 --- a/targets/minecraft/world/level/saveddata/MapItemSavedData.h +++ b/targets/minecraft/world/level/saveddata/MapItemSavedData.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileConverter.cpp b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileConverter.cpp index e588b3cea..820f3e703 100644 --- a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileConverter.cpp +++ b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileConverter.cpp @@ -2,19 +2,17 @@ #include #include + #include #include #include #include #include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" -#include "minecraft/util/ProgressListener.h" #include "java/InputOutputStream/BufferedOutputStream.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" -#include "nbt/CompoundTag.h" -#include "nbt/NbtIo.h" -#include "strings.h" +#include "minecraft/util/ProgressListener.h" #include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/storage/RegionFile.h" #include "minecraft/world/level/chunk/storage/RegionFileCache.h" @@ -24,6 +22,9 @@ #include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #include "minecraft/world/level/storage/DirectoryLevelStorage.h" #include "minecraft/world/level/storage/LevelData.h" +#include "nbt/CompoundTag.h" +#include "nbt/NbtIo.h" +#include "strings.h" void ConsoleSaveFileConverter::ProcessSimpleFile(ConsoleSaveFile* sourceSave, FileEntry* sourceFileEntry, diff --git a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOriginal.cpp b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOriginal.cpp index fd3ed64ae..66ff9925a 100644 --- a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOriginal.cpp +++ b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOriginal.cpp @@ -2,6 +2,7 @@ #include #include + #include #include #include @@ -29,10 +30,10 @@ #include "minecraft/world/level/chunk/storage/RegionFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSavePath.h" +#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #include "minecraft/world/level/storage/LevelData.h" #include "platform/IPlatformStorage.h" #include "platform/PlatformServices.h" -#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #define RESERVE_ALLOCATION MEM_RESERVE #define COMMIT_ALLOCATION MEM_COMMIT diff --git a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.cpp b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.cpp index 272522084..0fb8b7e84 100644 --- a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.cpp +++ b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.cpp @@ -4,6 +4,7 @@ #include #include #include + #include #include #include @@ -33,10 +34,10 @@ #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileConverter.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSavePath.h" +#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #include "minecraft/world/level/storage/LevelData.h" #include "platform/IPlatformStorage.h" #include "platform/PlatformServices.h" -#include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" class ProgressListener; diff --git a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.cpp b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.cpp index 8816b9675..1adebebe1 100644 --- a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.cpp +++ b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.cpp @@ -5,6 +5,7 @@ #include #include + #include #include #include diff --git a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h index 74479035a..2315974ec 100644 --- a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h +++ b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h @@ -1,10 +1,10 @@ #pragma once #include +#include #include #include #include -#include #include "console_helpers/Definitions.h" diff --git a/targets/minecraft/world/level/storage/DerivedLevelData.h b/targets/minecraft/world/level/storage/DerivedLevelData.h index 80ded27d8..7f265e781 100644 --- a/targets/minecraft/world/level/storage/DerivedLevelData.h +++ b/targets/minecraft/world/level/storage/DerivedLevelData.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/storage/DirectoryLevelStorage.cpp b/targets/minecraft/world/level/storage/DirectoryLevelStorage.cpp index 0a586a853..c8ab6aaa6 100644 --- a/targets/minecraft/world/level/storage/DirectoryLevelStorage.cpp +++ b/targets/minecraft/world/level/storage/DirectoryLevelStorage.cpp @@ -4,11 +4,13 @@ #include #include #include + #include #include #include #include +#include "IPlatformInput.h" #include "LevelData.h" #include "Minecraft.Client/Common/src/Console_Debug_enum.h" #include "Minecraft.Client/Common/src/GameRules/GameRuleManager.h" @@ -32,15 +34,14 @@ #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOutputStream.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSavePath.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" +#include "minecraft/world/level/storage/LevelStorage.h" +#include "minecraft/world/level/storage/PlayerIO.h" #include "nbt/CompoundTag.h" #include "nbt/DoubleTag.h" #include "nbt/ListTag.h" #include "nbt/NbtIo.h" #include "platform/IPlatformStorage.h" #include "platform/PlatformServices.h" -#include "IPlatformInput.h" -#include "minecraft/world/level/storage/LevelStorage.h" -#include "minecraft/world/level/storage/PlayerIO.h" const std::wstring DirectoryLevelStorage::sc_szPlayerDir(L"players/"); diff --git a/targets/minecraft/world/level/storage/DirectoryLevelStorage.h b/targets/minecraft/world/level/storage/DirectoryLevelStorage.h index 2c3ca2e67..efb8a40e6 100644 --- a/targets/minecraft/world/level/storage/DirectoryLevelStorage.h +++ b/targets/minecraft/world/level/storage/DirectoryLevelStorage.h @@ -26,6 +26,7 @@ #define END_DIMENSION_MAP_MAPPINGS_SAVE_VERSION 5 #include + #include #include #include diff --git a/targets/minecraft/world/level/storage/LevelData.h b/targets/minecraft/world/level/storage/LevelData.h index 235df4d1f..abdff145c 100644 --- a/targets/minecraft/world/level/storage/LevelData.h +++ b/targets/minecraft/world/level/storage/LevelData.h @@ -1,6 +1,7 @@ #pragma once #include + #include #include #include diff --git a/targets/minecraft/world/level/storage/McRegionLevelStorage.cpp b/targets/minecraft/world/level/storage/McRegionLevelStorage.cpp index 306164c53..c6aaa7234 100644 --- a/targets/minecraft/world/level/storage/McRegionLevelStorage.cpp +++ b/targets/minecraft/world/level/storage/McRegionLevelStorage.cpp @@ -1,6 +1,7 @@ #include "McRegionLevelStorage.h" #include + #include #include diff --git a/targets/minecraft/world/level/storage/McRegionLevelStorageSource.cpp b/targets/minecraft/world/level/storage/McRegionLevelStorageSource.cpp index 0664970d0..7bacb0eb2 100644 --- a/targets/minecraft/world/level/storage/McRegionLevelStorageSource.cpp +++ b/targets/minecraft/world/level/storage/McRegionLevelStorageSource.cpp @@ -1,6 +1,7 @@ #include "McRegionLevelStorageSource.h" #include + #include #include "LevelData.h" diff --git a/targets/minecraft/world/level/storage/SavedDataStorage.cpp b/targets/minecraft/world/level/storage/SavedDataStorage.cpp index 2844eaf8e..348afa2d1 100644 --- a/targets/minecraft/world/level/storage/SavedDataStorage.cpp +++ b/targets/minecraft/world/level/storage/SavedDataStorage.cpp @@ -1,6 +1,7 @@ #include "SavedDataStorage.h" #include + #include #include @@ -10,6 +11,7 @@ #include "minecraft/world/entity/ai/village/Villages.h" #include "minecraft/world/level/levelgen/structure/StructureFeatureSavedData.h" #include "minecraft/world/level/saveddata/MapItemSavedData.h" +#include "minecraft/world/level/saveddata/SavedData.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileInputStream.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOutputStream.h" @@ -20,7 +22,6 @@ #include "nbt/NbtIo.h" #include "nbt/ShortTag.h" #include "nbt/Tag.h" -#include "minecraft/world/level/saveddata/SavedData.h" SavedDataStorage::SavedDataStorage(LevelStorage* levelStorage) { /* diff --git a/targets/minecraft/world/level/tile/AnvilTile.cpp b/targets/minecraft/world/level/tile/AnvilTile.cpp index 095f2385e..c66205906 100644 --- a/targets/minecraft/world/level/tile/AnvilTile.cpp +++ b/targets/minecraft/world/level/tile/AnvilTile.cpp @@ -1,9 +1,8 @@ #include "AnvilTile.h" -#include "minecraft/util/Mth.h" -#include "strings.h" #include "Direction.h" #include "Facing.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/entity/item/FallingTile.h" @@ -14,6 +13,7 @@ #include "minecraft/world/level/tile/HeavyTile.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/level/tile/BaseEntityTile.cpp b/targets/minecraft/world/level/tile/BaseEntityTile.cpp index 5543ccb57..ede66e436 100644 --- a/targets/minecraft/world/level/tile/BaseEntityTile.cpp +++ b/targets/minecraft/world/level/tile/BaseEntityTile.cpp @@ -3,8 +3,8 @@ #include #include "minecraft/world/level/Level.h" -#include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/TileEntity.h" class Material; diff --git a/targets/minecraft/world/level/tile/BaseRailTile.cpp b/targets/minecraft/world/level/tile/BaseRailTile.cpp index 7bcb2689a..0260fa7f0 100644 --- a/targets/minecraft/world/level/tile/BaseRailTile.cpp +++ b/targets/minecraft/world/level/tile/BaseRailTile.cpp @@ -7,8 +7,8 @@ #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/TilePos.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" BaseRailTile::Rail::Rail(Level* level, int x, int y, int z) { this->level = level; diff --git a/targets/minecraft/world/level/tile/BeaconTile.cpp b/targets/minecraft/world/level/tile/BeaconTile.cpp index 3d5585fad..cc00dc57f 100644 --- a/targets/minecraft/world/level/tile/BeaconTile.cpp +++ b/targets/minecraft/world/level/tile/BeaconTile.cpp @@ -7,8 +7,8 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/entity/BeaconTileEntity.h" #include "minecraft/world/level/tile/BaseEntityTile.h" +#include "minecraft/world/level/tile/entity/BeaconTileEntity.h" BeaconTile::BeaconTile(int id) : BaseEntityTile(id, Material::glass, false) { setDestroyTime(3.0f); diff --git a/targets/minecraft/world/level/tile/BedTile.cpp b/targets/minecraft/world/level/tile/BedTile.cpp index 718d23eb3..337bafbb4 100644 --- a/targets/minecraft/world/level/tile/BedTile.cpp +++ b/targets/minecraft/world/level/tile/BedTile.cpp @@ -3,19 +3,19 @@ #include #include -#include "minecraft/world/level/dimension/Dimension.h" #include "Direction.h" #include "Facing.h" #include "Pos.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/biome/Biome.h" +#include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/DirectionalTile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/level/tile/BrewingStandTile.cpp b/targets/minecraft/world/level/tile/BrewingStandTile.cpp index 0298f75dc..048296eff 100644 --- a/targets/minecraft/world/level/tile/BrewingStandTile.cpp +++ b/targets/minecraft/world/level/tile/BrewingStandTile.cpp @@ -14,10 +14,10 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" +#include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/entity/BrewingStandTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/tile/BaseEntityTile.h" class Icon; diff --git a/targets/minecraft/world/level/tile/ButtonTile.cpp b/targets/minecraft/world/level/tile/ButtonTile.cpp index 4642439ca..c1b3204b0 100644 --- a/targets/minecraft/world/level/tile/ButtonTile.cpp +++ b/targets/minecraft/world/level/tile/ButtonTile.cpp @@ -11,8 +11,8 @@ #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" class Entity; diff --git a/targets/minecraft/world/level/tile/CactusTile.cpp b/targets/minecraft/world/level/tile/CactusTile.cpp index 999e12bca..324730887 100644 --- a/targets/minecraft/world/level/tile/CactusTile.cpp +++ b/targets/minecraft/world/level/tile/CactusTile.cpp @@ -10,8 +10,8 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" CactusTile::CactusTile(int id) : Tile(id, Material::cactus, false) { setTicking(true); diff --git a/targets/minecraft/world/level/tile/CakeTile.cpp b/targets/minecraft/world/level/tile/CakeTile.cpp index 6d91245e2..bc2849c90 100644 --- a/targets/minecraft/world/level/tile/CakeTile.cpp +++ b/targets/minecraft/world/level/tile/CakeTile.cpp @@ -12,8 +12,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" CakeTile::CakeTile(int id) : Tile(id, Material::cake, false) { setTicking(true); diff --git a/targets/minecraft/world/level/tile/ChestTile.cpp b/targets/minecraft/world/level/tile/ChestTile.cpp index 513d3c031..0c6cdb2d4 100644 --- a/targets/minecraft/world/level/tile/ChestTile.cpp +++ b/targets/minecraft/world/level/tile/ChestTile.cpp @@ -4,11 +4,9 @@ #include #include +#include "java/Random.h" #include "minecraft/Facing.h" #include "minecraft/util/Mth.h" -#include "java/Random.h" -#include "nbt/CompoundTag.h" -#include "strings.h" #include "minecraft/world/CompoundContainer.h" #include "minecraft/world/Container.h" #include "minecraft/world/IconRegister.h" @@ -26,6 +24,8 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/ChestTileEntity.h" #include "minecraft/world/phys/AABB.h" +#include "nbt/CompoundTag.h" +#include "strings.h" class Entity; diff --git a/targets/minecraft/world/level/tile/CocoaTile.cpp b/targets/minecraft/world/level/tile/CocoaTile.cpp index e42fbd2b2..e776eb490 100644 --- a/targets/minecraft/world/level/tile/CocoaTile.cpp +++ b/targets/minecraft/world/level/tile/CocoaTile.cpp @@ -14,9 +14,9 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" +#include "minecraft/world/level/tile/DirectionalTile.h" #include "minecraft/world/level/tile/TreeTile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/level/tile/DirectionalTile.h" class Icon; diff --git a/targets/minecraft/world/level/tile/CocoaTile.h b/targets/minecraft/world/level/tile/CocoaTile.h index 099fb4549..856ff79f6 100644 --- a/targets/minecraft/world/level/tile/CocoaTile.h +++ b/targets/minecraft/world/level/tile/CocoaTile.h @@ -5,7 +5,6 @@ #include "DirectionalTile.h" #include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/tile/Tile.h" class Icon; diff --git a/targets/minecraft/world/level/tile/CommandBlock.cpp b/targets/minecraft/world/level/tile/CommandBlock.cpp index 84453b33c..3cd36a94a 100644 --- a/targets/minecraft/world/level/tile/CommandBlock.cpp +++ b/targets/minecraft/world/level/tile/CommandBlock.cpp @@ -8,10 +8,10 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/level/tile/entity/CommandBlockEntity.h" -#include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/CommandBlockEntity.h" +#include "minecraft/world/level/tile/entity/TileEntity.h" CommandBlock::CommandBlock(int id) : BaseEntityTile(id, Material::metal, false) {} diff --git a/targets/minecraft/world/level/tile/ComparatorTile.cpp b/targets/minecraft/world/level/tile/ComparatorTile.cpp index 46e244e1c..8a520eabe 100644 --- a/targets/minecraft/world/level/tile/ComparatorTile.cpp +++ b/targets/minecraft/world/level/tile/ComparatorTile.cpp @@ -9,11 +9,11 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/redstone/Redstone.h" +#include "minecraft/world/level/tile/DiodeTile.h" #include "minecraft/world/level/tile/HalfSlabTile.h" +#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/ComparatorTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" -#include "minecraft/world/level/tile/DiodeTile.h" -#include "minecraft/world/level/tile/Tile.h" class Random; diff --git a/targets/minecraft/world/level/tile/DaylightDetectorTile.cpp b/targets/minecraft/world/level/tile/DaylightDetectorTile.cpp index ca5fcb0d8..52e2d2b33 100644 --- a/targets/minecraft/world/level/tile/DaylightDetectorTile.cpp +++ b/targets/minecraft/world/level/tile/DaylightDetectorTile.cpp @@ -1,6 +1,7 @@ #include "DaylightDetectorTile.h" #include + #include #include @@ -13,8 +14,8 @@ #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/level/tile/entity/DaylightDetectorTileEntity.h" #include "minecraft/world/level/tile/BaseEntityTile.h" +#include "minecraft/world/level/tile/entity/DaylightDetectorTileEntity.h" DaylightDetectorTile::DaylightDetectorTile(int id) : BaseEntityTile(id, Material::wood, false) { diff --git a/targets/minecraft/world/level/tile/DetectorRailTile.cpp b/targets/minecraft/world/level/tile/DetectorRailTile.cpp index 66380fe80..867a8efc5 100644 --- a/targets/minecraft/world/level/tile/DetectorRailTile.cpp +++ b/targets/minecraft/world/level/tile/DetectorRailTile.cpp @@ -15,9 +15,9 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/BaseRailTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" class Icon; diff --git a/targets/minecraft/world/level/tile/DiodeTile.cpp b/targets/minecraft/world/level/tile/DiodeTile.cpp index b09b9ed06..a54173367 100644 --- a/targets/minecraft/world/level/tile/DiodeTile.cpp +++ b/targets/minecraft/world/level/tile/DiodeTile.cpp @@ -12,9 +12,9 @@ #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" #include "minecraft/world/level/tile/ComparatorTile.h" +#include "minecraft/world/level/tile/DirectionalTile.h" #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/RepeaterTile.h" -#include "minecraft/world/level/tile/DirectionalTile.h" #include "minecraft/world/level/tile/Tile.h" DiodeTile::DiodeTile(int id, bool on) diff --git a/targets/minecraft/world/level/tile/DispenserTile.cpp b/targets/minecraft/world/level/tile/DispenserTile.cpp index d95b1b73b..5fdf064b3 100644 --- a/targets/minecraft/world/level/tile/DispenserTile.cpp +++ b/targets/minecraft/world/level/tile/DispenserTile.cpp @@ -19,12 +19,12 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" +#include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/LevelEvent.h" +#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/DispenserTileEntity.h" #include "minecraft/world/level/tile/piston/PistonBaseTile.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/tile/BaseEntityTile.h" -#include "minecraft/world/level/tile/Tile.h" class Position; diff --git a/targets/minecraft/world/level/tile/DoorTile.cpp b/targets/minecraft/world/level/tile/DoorTile.cpp index 353c766e6..a06bd5647 100644 --- a/targets/minecraft/world/level/tile/DoorTile.cpp +++ b/targets/minecraft/world/level/tile/DoorTile.cpp @@ -12,8 +12,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" const std::wstring DoorTile::TEXTURES[] = { L"doorWood_lower", L"doorWood_upper", L"doorIron_lower", L"doorIron_upper"}; diff --git a/targets/minecraft/world/level/tile/DropperTile.cpp b/targets/minecraft/world/level/tile/DropperTile.cpp index a6df6dc4d..2a11a1fb8 100644 --- a/targets/minecraft/world/level/tile/DropperTile.cpp +++ b/targets/minecraft/world/level/tile/DropperTile.cpp @@ -10,11 +10,11 @@ #include "minecraft/world/IconRegister.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/tile/DispenserTile.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/entity/DispenserTileEntity.h" #include "minecraft/world/level/tile/entity/DropperTileEntity.h" #include "minecraft/world/level/tile/entity/HopperTileEntity.h" -#include "minecraft/world/level/tile/DispenserTile.h" class Container; diff --git a/targets/minecraft/world/level/tile/EnchantmentTableTile.cpp b/targets/minecraft/world/level/tile/EnchantmentTableTile.cpp index 491a2e603..9586676a3 100644 --- a/targets/minecraft/world/level/tile/EnchantmentTableTile.cpp +++ b/targets/minecraft/world/level/tile/EnchantmentTableTile.cpp @@ -10,9 +10,9 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/entity/EnchantmentTableTileEntity.h" #include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/EnchantmentTableTileEntity.h" const std::wstring EnchantmentTableTile::TEXTURE_SIDE = L"enchantment_side"; const std::wstring EnchantmentTableTile::TEXTURE_TOP = L"enchantment_top"; diff --git a/targets/minecraft/world/level/tile/EnderChestTile.cpp b/targets/minecraft/world/level/tile/EnderChestTile.cpp index 32e901141..4796748a5 100644 --- a/targets/minecraft/world/level/tile/EnderChestTile.cpp +++ b/targets/minecraft/world/level/tile/EnderChestTile.cpp @@ -13,9 +13,9 @@ #include "minecraft/world/inventory/PlayerEnderChestContainer.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/entity/EnderChestTileEntity.h" #include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/EnderChestTileEntity.h" EnderChestTile::EnderChestTile(int id) : BaseEntityTile(id, Material::stone, false) { diff --git a/targets/minecraft/world/level/tile/FarmTile.cpp b/targets/minecraft/world/level/tile/FarmTile.cpp index 82cfcf607..f7329cd0b 100644 --- a/targets/minecraft/world/level/tile/FarmTile.cpp +++ b/targets/minecraft/world/level/tile/FarmTile.cpp @@ -13,8 +13,8 @@ #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" FarmTile::FarmTile(int id) : Tile(id, Material::dirt, false) { iconWet = nullptr; diff --git a/targets/minecraft/world/level/tile/FenceGateTile.cpp b/targets/minecraft/world/level/tile/FenceGateTile.cpp index de1657c7f..0d5fc072c 100644 --- a/targets/minecraft/world/level/tile/FenceGateTile.cpp +++ b/targets/minecraft/world/level/tile/FenceGateTile.cpp @@ -10,9 +10,9 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/DirectionalTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" FenceGateTile::FenceGateTile(int id) : DirectionalTile(id, Material::wood, false) {} diff --git a/targets/minecraft/world/level/tile/FireTile.cpp b/targets/minecraft/world/level/tile/FireTile.cpp index 4d55080f9..ef7458db6 100644 --- a/targets/minecraft/world/level/tile/FireTile.cpp +++ b/targets/minecraft/world/level/tile/FireTile.cpp @@ -1,6 +1,7 @@ #include "FireTile.h" #include + #include #include "Minecraft.Client/Common/App_enums.h" @@ -17,9 +18,9 @@ #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/PortalTile.h" +#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TntTile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/level/tile/Tile.h" class Icon; diff --git a/targets/minecraft/world/level/tile/FlowerPotTile.cpp b/targets/minecraft/world/level/tile/FlowerPotTile.cpp index 634c06429..c32294f10 100644 --- a/targets/minecraft/world/level/tile/FlowerPotTile.cpp +++ b/targets/minecraft/world/level/tile/FlowerPotTile.cpp @@ -4,13 +4,13 @@ #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/DeadBushTile.h" #include "minecraft/world/level/tile/PlantTile.h" #include "minecraft/world/level/tile/SaplingPlantTile.h" #include "minecraft/world/level/tile/TallGrassPlantTile.h" -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" FlowerPotTile::FlowerPotTile(int id) : Tile(id, Material::decoration, false) { diff --git a/targets/minecraft/world/level/tile/FurnaceTile.cpp b/targets/minecraft/world/level/tile/FurnaceTile.cpp index ab0fa6a99..28bb31e61 100644 --- a/targets/minecraft/world/level/tile/FurnaceTile.cpp +++ b/targets/minecraft/world/level/tile/FurnaceTile.cpp @@ -1,6 +1,7 @@ #include "FurnaceTile.h" #include + #include #include @@ -17,11 +18,11 @@ #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" +#include "minecraft/world/level/tile/BaseEntityTile.h" +#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/FurnaceTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "nbt/CompoundTag.h" -#include "minecraft/world/level/tile/BaseEntityTile.h" -#include "minecraft/world/level/tile/Tile.h" bool FurnaceTile::noDrop = false; diff --git a/targets/minecraft/world/level/tile/HopperTile.cpp b/targets/minecraft/world/level/tile/HopperTile.cpp index 45c97efe3..136a22e23 100644 --- a/targets/minecraft/world/level/tile/HopperTile.cpp +++ b/targets/minecraft/world/level/tile/HopperTile.cpp @@ -10,10 +10,10 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/entity/HopperTileEntity.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/HopperTileEntity.h" +#include "nbt/CompoundTag.h" class Icon; diff --git a/targets/minecraft/world/level/tile/JukeboxTile.cpp b/targets/minecraft/world/level/tile/JukeboxTile.cpp index 7431a8733..724302003 100644 --- a/targets/minecraft/world/level/tile/JukeboxTile.cpp +++ b/targets/minecraft/world/level/tile/JukeboxTile.cpp @@ -8,14 +8,14 @@ #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/level/tile/entity/TileEntity.h" -#include "nbt/CompoundTag.h" -#include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" JukeboxTile::Entity::Entity() : TileEntity() { record = nullptr; } diff --git a/targets/minecraft/world/level/tile/LadderTile.cpp b/targets/minecraft/world/level/tile/LadderTile.cpp index 05bc0638f..0e06770ff 100644 --- a/targets/minecraft/world/level/tile/LadderTile.cpp +++ b/targets/minecraft/world/level/tile/LadderTile.cpp @@ -5,8 +5,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" LadderTile::LadderTile(int id) : Tile(id, Material::decoration, false) {} diff --git a/targets/minecraft/world/level/tile/LeafTile.cpp b/targets/minecraft/world/level/tile/LeafTile.cpp index 1bc39ab6c..bfdd35664 100644 --- a/targets/minecraft/world/level/tile/LeafTile.cpp +++ b/targets/minecraft/world/level/tile/LeafTile.cpp @@ -2,12 +2,11 @@ #include -#include "Minecraft.Client/Common/src/Colours/ColourTable.h" -#include "minecraft/client/Minecraft.h" -#include "strings.h" #include "Minecraft.Client/Common/App_enums.h" -#include "minecraft/core/particles/ParticleTypes.h" +#include "Minecraft.Client/Common/src/Colours/ColourTable.h" #include "java/Random.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Player.h" @@ -21,6 +20,7 @@ #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TransparentTile.h" +#include "strings.h" const unsigned int LeafTile::LEAF_NAMES[LEAF_NAMES_LENGTH] = { IDS_TILE_LEAVES_OAK, diff --git a/targets/minecraft/world/level/tile/LeverTile.cpp b/targets/minecraft/world/level/tile/LeverTile.cpp index cfde5acd3..bd79e322b 100644 --- a/targets/minecraft/world/level/tile/LeverTile.cpp +++ b/targets/minecraft/world/level/tile/LeverTile.cpp @@ -10,8 +10,8 @@ #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" LeverTile::LeverTile(int id) : Tile(id, Material::decoration, false) {} diff --git a/targets/minecraft/world/level/tile/LiquidTile.cpp b/targets/minecraft/world/level/tile/LiquidTile.cpp index bd5e22b34..3023d52d1 100644 --- a/targets/minecraft/world/level/tile/LiquidTile.cpp +++ b/targets/minecraft/world/level/tile/LiquidTile.cpp @@ -1,6 +1,7 @@ #include "LiquidTile.h" #include + #include #include #include @@ -16,8 +17,8 @@ #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" class Icon; diff --git a/targets/minecraft/world/level/tile/MobSpawnerTile.cpp b/targets/minecraft/world/level/tile/MobSpawnerTile.cpp index 841f3d492..5db7e5482 100644 --- a/targets/minecraft/world/level/tile/MobSpawnerTile.cpp +++ b/targets/minecraft/world/level/tile/MobSpawnerTile.cpp @@ -5,9 +5,9 @@ #include "java/Random.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/entity/MobSpawnerTileEntity.h" #include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/MobSpawnerTileEntity.h" MobSpawnerTile::MobSpawnerTile(int id) : BaseEntityTile(id, Material::stone, false) {} diff --git a/targets/minecraft/world/level/tile/NotGateTile.h b/targets/minecraft/world/level/tile/NotGateTile.h index 05bc54d0f..0d7da17e3 100644 --- a/targets/minecraft/world/level/tile/NotGateTile.h +++ b/targets/minecraft/world/level/tile/NotGateTile.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/minecraft/world/level/tile/NoteBlockTile.cpp b/targets/minecraft/world/level/tile/NoteBlockTile.cpp index 24b520e60..28080a059 100644 --- a/targets/minecraft/world/level/tile/NoteBlockTile.cpp +++ b/targets/minecraft/world/level/tile/NoteBlockTile.cpp @@ -8,8 +8,8 @@ #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/entity/MusicTileEntity.h" #include "minecraft/world/level/tile/BaseEntityTile.h" +#include "minecraft/world/level/tile/entity/MusicTileEntity.h" NoteBlockTile::NoteBlockTile(int id) : BaseEntityTile(id, Material::wood) {} diff --git a/targets/minecraft/world/level/tile/PlantTile.cpp b/targets/minecraft/world/level/tile/PlantTile.cpp index 0c92b03b1..dbe43684e 100644 --- a/targets/minecraft/world/level/tile/PlantTile.cpp +++ b/targets/minecraft/world/level/tile/PlantTile.cpp @@ -4,8 +4,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" void Bush::_init() { setTicking(true); diff --git a/targets/minecraft/world/level/tile/PortalTile.cpp b/targets/minecraft/world/level/tile/PortalTile.cpp index 8983dcd1f..444eeca43 100644 --- a/targets/minecraft/world/level/tile/PortalTile.cpp +++ b/targets/minecraft/world/level/tile/PortalTile.cpp @@ -13,9 +13,9 @@ #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/HalfTransparentTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" PortalTile::PortalTile(int id) : HalfTransparentTile(id, L"portal", Material::portal, false) { diff --git a/targets/minecraft/world/level/tile/PressurePlateTile.cpp b/targets/minecraft/world/level/tile/PressurePlateTile.cpp index 6a2a6de2e..aed019d14 100644 --- a/targets/minecraft/world/level/tile/PressurePlateTile.cpp +++ b/targets/minecraft/world/level/tile/PressurePlateTile.cpp @@ -10,8 +10,8 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/BasePressurePlateTile.h" +#include "minecraft/world/phys/AABB.h" class Material; diff --git a/targets/minecraft/world/level/tile/QuartzBlockTile.cpp b/targets/minecraft/world/level/tile/QuartzBlockTile.cpp index 9033657a5..2690dd32d 100644 --- a/targets/minecraft/world/level/tile/QuartzBlockTile.cpp +++ b/targets/minecraft/world/level/tile/QuartzBlockTile.cpp @@ -3,11 +3,11 @@ #include #include "Facing.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" int QuartzBlockTile::BLOCK_NAMES[QUARTZ_BLOCK_NAMES] = { IDS_TILE_QUARTZ_BLOCK, IDS_TILE_QUARTZ_BLOCK_CHISELED, diff --git a/targets/minecraft/world/level/tile/RedStoneDustTile.cpp b/targets/minecraft/world/level/tile/RedStoneDustTile.cpp index 5d8ee801e..2afe67f79 100644 --- a/targets/minecraft/world/level/tile/RedStoneDustTile.cpp +++ b/targets/minecraft/world/level/tile/RedStoneDustTile.cpp @@ -1,6 +1,7 @@ #include "RedStoneDustTile.h" #include + #include #include @@ -16,12 +17,12 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" +#include "minecraft/world/level/TilePos.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" #include "minecraft/world/level/tile/RepeaterTile.h" -#include "minecraft/world/phys/AABB.h" -#include "minecraft/world/level/TilePos.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" class Icon; diff --git a/targets/minecraft/world/level/tile/ReedTile.cpp b/targets/minecraft/world/level/tile/ReedTile.cpp index 0ee607441..4cc317f3f 100644 --- a/targets/minecraft/world/level/tile/ReedTile.cpp +++ b/targets/minecraft/world/level/tile/ReedTile.cpp @@ -5,8 +5,8 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" ReedTile::ReedTile(int id) : Tile(id, Material::plant, false) { this->updateDefaultShape(); diff --git a/targets/minecraft/world/level/tile/SandStoneTile.cpp b/targets/minecraft/world/level/tile/SandStoneTile.cpp index d6802460a..791e3ede7 100644 --- a/targets/minecraft/world/level/tile/SandStoneTile.cpp +++ b/targets/minecraft/world/level/tile/SandStoneTile.cpp @@ -1,10 +1,10 @@ #include "SandStoneTile.h" -#include "strings.h" #include "Facing.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/level/tile/SaplingPlantTile.cpp b/targets/minecraft/world/level/tile/SaplingPlantTile.cpp index 859dc8c07..dea97d3b5 100644 --- a/targets/minecraft/world/level/tile/SaplingPlantTile.cpp +++ b/targets/minecraft/world/level/tile/SaplingPlantTile.cpp @@ -1,6 +1,5 @@ #include "SaplingPlantTile.h" -#include "strings.h" #include "java/Random.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/level/Level.h" @@ -14,6 +13,7 @@ #include "minecraft/world/level/tile/PlantTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TreeTile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/level/tile/SignTile.cpp b/targets/minecraft/world/level/tile/SignTile.cpp index 115ab77fd..90c81a4a4 100644 --- a/targets/minecraft/world/level/tile/SignTile.cpp +++ b/targets/minecraft/world/level/tile/SignTile.cpp @@ -6,10 +6,10 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/level/tile/entity/SignTileEntity.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/BaseEntityTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/SignTileEntity.h" +#include "minecraft/world/phys/AABB.h" SignTile::SignTile(int id, eINSTANCEOF clas, bool onGround) : BaseEntityTile(id, Material::wood, false) { diff --git a/targets/minecraft/world/level/tile/SkullTile.cpp b/targets/minecraft/world/level/tile/SkullTile.cpp index 73e6b6bdf..e4da4b59b 100644 --- a/targets/minecraft/world/level/tile/SkullTile.cpp +++ b/targets/minecraft/world/level/tile/SkullTile.cpp @@ -2,15 +2,14 @@ #include -#include "minecraft/util/Mth.h" -#include "minecraft/world/entity/boss/wither/WitherBoss.h" #include "Facing.h" -#include "minecraft/core/particles/ParticleTypes.h" #include "java/Class.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" +#include "minecraft/core/particles/ParticleTypes.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/entity/LivingEntity.h" +#include "minecraft/world/entity/boss/wither/WitherBoss.h" #include "minecraft/world/entity/item/ItemEntity.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" @@ -25,6 +24,7 @@ #include "minecraft/world/level/tile/entity/SkullTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/AABB.h" +#include "nbt/CompoundTag.h" SkullTile::SkullTile(int id) : BaseEntityTile(id, Material::decoration, false) { setShape(4.0f / 16.0f, 0, 4.0f / 16.0f, 12.0f / 16.0f, .5f, 12.0f / 16.0f); diff --git a/targets/minecraft/world/level/tile/SmoothStoneBrickTile.cpp b/targets/minecraft/world/level/tile/SmoothStoneBrickTile.cpp index ece316eb9..d5f24ac70 100644 --- a/targets/minecraft/world/level/tile/SmoothStoneBrickTile.cpp +++ b/targets/minecraft/world/level/tile/SmoothStoneBrickTile.cpp @@ -1,9 +1,9 @@ #include "SmoothStoneBrickTile.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/level/tile/SoulSandTile.cpp b/targets/minecraft/world/level/tile/SoulSandTile.cpp index f8e1abc7c..46bebd72c 100644 --- a/targets/minecraft/world/level/tile/SoulSandTile.cpp +++ b/targets/minecraft/world/level/tile/SoulSandTile.cpp @@ -5,8 +5,8 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" SoulSandTile::SoulSandTile(int id) : Tile(id, Material::sand) {} diff --git a/targets/minecraft/world/level/tile/StairTile.cpp b/targets/minecraft/world/level/tile/StairTile.cpp index 08bf5b381..ab1426a0d 100644 --- a/targets/minecraft/world/level/tile/StairTile.cpp +++ b/targets/minecraft/world/level/tile/StairTile.cpp @@ -5,10 +5,10 @@ #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" +#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" -#include "minecraft/world/level/tile/Tile.h" int StairTile::DEAD_SPACES[8][2] = {{2, 6}, {3, 7}, {2, 3}, {6, 7}, {0, 4}, {1, 5}, {0, 1}, {4, 5}}; diff --git a/targets/minecraft/world/level/tile/StoneMonsterTile.cpp b/targets/minecraft/world/level/tile/StoneMonsterTile.cpp index a9312ea92..5a54a25d7 100644 --- a/targets/minecraft/world/level/tile/StoneMonsterTile.cpp +++ b/targets/minecraft/world/level/tile/StoneMonsterTile.cpp @@ -4,13 +4,13 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Class.h" -#include "strings.h" #include "minecraft/world/entity/monster/Silverfish.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/FireTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" const unsigned int StoneMonsterTile::STONE_MONSTER_NAMES[STONE_MONSTER_NAMES_LENGTH] = { diff --git a/targets/minecraft/world/level/tile/StoneSlabTile.cpp b/targets/minecraft/world/level/tile/StoneSlabTile.cpp index 00a4bf142..af40877e6 100644 --- a/targets/minecraft/world/level/tile/StoneSlabTile.cpp +++ b/targets/minecraft/world/level/tile/StoneSlabTile.cpp @@ -3,7 +3,6 @@ #include #include -#include "strings.h" #include "Facing.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/item/ItemInstance.h" @@ -11,6 +10,7 @@ #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/SmoothStoneBrickTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" const unsigned int StoneSlabTile::SLAB_NAMES[SLAB_NAMES_LENGTH] = { IDS_TILE_STONESLAB_STONE, IDS_TILE_STONESLAB_SAND, diff --git a/targets/minecraft/world/level/tile/TallGrassPlantTile.cpp b/targets/minecraft/world/level/tile/TallGrassPlantTile.cpp index 202de42ae..c6e715f83 100644 --- a/targets/minecraft/world/level/tile/TallGrassPlantTile.cpp +++ b/targets/minecraft/world/level/tile/TallGrassPlantTile.cpp @@ -2,12 +2,11 @@ #include -#include "Minecraft.Client/Common/src/Colours/ColourTable.h" -#include "minecraft/client/Minecraft.h" #include "Minecraft.Client/Common/App_enums.h" +#include "Minecraft.Client/Common/src/Colours/ColourTable.h" #include "java/Random.h" +#include "minecraft/client/Minecraft.h" #include "minecraft/stats/GenericStats.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" @@ -20,6 +19,7 @@ #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/PlantTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/level/tile/Tile.cpp b/targets/minecraft/world/level/tile/Tile.cpp index 6399c9cad..fab24a19c 100644 --- a/targets/minecraft/world/level/tile/Tile.cpp +++ b/targets/minecraft/world/level/tile/Tile.cpp @@ -1,18 +1,17 @@ #include "Tile.h" #include + #include -#include "console_helpers/StringHelpers.h" -#include "minecraft/world/phys/Vec3.h" #include "Facing.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "console_helpers/StringHelpers.h" #include "java/Class.h" #include "java/Random.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/stats/Stats.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/ExperienceOrb.h" #include "minecraft/world/entity/item/ItemEntity.h" @@ -151,6 +150,8 @@ #include "minecraft/world/level/tile/piston/PistonBaseTile.h" #include "minecraft/world/level/tile/piston/PistonExtensionTile.h" #include "minecraft/world/phys/HitResult.h" +#include "minecraft/world/phys/Vec3.h" +#include "strings.h" std::wstring Tile::TILE_DESCRIPTION_PREFIX = L"Tile."; diff --git a/targets/minecraft/world/level/tile/Tile.h b/targets/minecraft/world/level/tile/Tile.h index a4fd6bc90..ea199dab5 100644 --- a/targets/minecraft/world/level/tile/Tile.h +++ b/targets/minecraft/world/level/tile/Tile.h @@ -2,14 +2,14 @@ #include #include #include -#include #include +#include #include "console_helpers/Definitions.h" #include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/Vec3.h" #include "minecraft/world/phys/AABB.h" +#include "minecraft/world/phys/Vec3.h" class GrassTile; class LeafTile; diff --git a/targets/minecraft/world/level/tile/TopSnowTile.cpp b/targets/minecraft/world/level/tile/TopSnowTile.cpp index d23b4e6f1..2a78dbb92 100644 --- a/targets/minecraft/world/level/tile/TopSnowTile.cpp +++ b/targets/minecraft/world/level/tile/TopSnowTile.cpp @@ -11,8 +11,8 @@ #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/LightLayer.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" const int TopSnowTile::MAX_HEIGHT = 6; const int TopSnowTile::HEIGHT_MASK = 7; // max 8 steps diff --git a/targets/minecraft/world/level/tile/TorchTile.cpp b/targets/minecraft/world/level/tile/TorchTile.cpp index c996246e1..c42dee107 100644 --- a/targets/minecraft/world/level/tile/TorchTile.cpp +++ b/targets/minecraft/world/level/tile/TorchTile.cpp @@ -6,8 +6,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" TorchTile::TorchTile(int id) : Tile(id, Material::decoration, false) { this->setTicking(true); diff --git a/targets/minecraft/world/level/tile/TrapDoorTile.cpp b/targets/minecraft/world/level/tile/TrapDoorTile.cpp index 230a9e043..214137e61 100644 --- a/targets/minecraft/world/level/tile/TrapDoorTile.cpp +++ b/targets/minecraft/world/level/tile/TrapDoorTile.cpp @@ -9,8 +9,8 @@ #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/LevelEvent.h" #include "minecraft/world/level/tile/StairTile.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" TrapDoorTile::TrapDoorTile(int id, Material* material) : Tile(id, material, false) { diff --git a/targets/minecraft/world/level/tile/TreeTile.cpp b/targets/minecraft/world/level/tile/TreeTile.cpp index aab14bc72..3235adc3c 100644 --- a/targets/minecraft/world/level/tile/TreeTile.cpp +++ b/targets/minecraft/world/level/tile/TreeTile.cpp @@ -3,13 +3,13 @@ #include #include "LeafTile.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/RotatedPillarTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" const unsigned int TreeTile::TREE_NAMES[TreeTile::TREE_NAMES_LENGTH] = { IDS_TILE_LOG_OAK, IDS_TILE_LOG_SPRUCE, IDS_TILE_LOG_BIRCH, diff --git a/targets/minecraft/world/level/tile/TripWireSourceTile.cpp b/targets/minecraft/world/level/tile/TripWireSourceTile.cpp index b4a3cfa94..fc910c128 100644 --- a/targets/minecraft/world/level/tile/TripWireSourceTile.cpp +++ b/targets/minecraft/world/level/tile/TripWireSourceTile.cpp @@ -8,10 +8,10 @@ #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/redstone/Redstone.h" +#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TripWireTile.h" #include "minecraft/world/phys/AABB.h" #include "optional" -#include "minecraft/world/level/tile/Tile.h" TripWireSourceTile::TripWireSourceTile(int id) : Tile(id, Material::decoration, false) { diff --git a/targets/minecraft/world/level/tile/TripWireTile.cpp b/targets/minecraft/world/level/tile/TripWireTile.cpp index a51398829..3183c9607 100644 --- a/targets/minecraft/world/level/tile/TripWireTile.cpp +++ b/targets/minecraft/world/level/tile/TripWireTile.cpp @@ -12,9 +12,9 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" +#include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/TripWireSourceTile.h" #include "minecraft/world/phys/AABB.h" -#include "minecraft/world/level/tile/Tile.h" TripWireTile::TripWireTile(int id) : Tile(id, Material::decoration, false) { setShape(0, 0, 0, 1, 2.5f / 16.0f, 1); diff --git a/targets/minecraft/world/level/tile/VineTile.cpp b/targets/minecraft/world/level/tile/VineTile.cpp index 657347c52..ea6c49df7 100644 --- a/targets/minecraft/world/level/tile/VineTile.cpp +++ b/targets/minecraft/world/level/tile/VineTile.cpp @@ -16,8 +16,8 @@ #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" VineTile::VineTile(int id) : Tile(id, Material::replaceable_plant, false) { setTicking(true); diff --git a/targets/minecraft/world/level/tile/WallTile.cpp b/targets/minecraft/world/level/tile/WallTile.cpp index cfb0c0549..df4a85e0c 100644 --- a/targets/minecraft/world/level/tile/WallTile.cpp +++ b/targets/minecraft/world/level/tile/WallTile.cpp @@ -2,13 +2,13 @@ #include -#include "strings.h" #include "Facing.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" +#include "strings.h" const float WallTile::WALL_WIDTH = 3.0f / 16.0f; const float WallTile::WALL_HEIGHT = 13.0f / 16.0f; diff --git a/targets/minecraft/world/level/tile/WaterLilyTile.cpp b/targets/minecraft/world/level/tile/WaterLilyTile.cpp index 3750fcdb1..c39d8a64a 100644 --- a/targets/minecraft/world/level/tile/WaterLilyTile.cpp +++ b/targets/minecraft/world/level/tile/WaterLilyTile.cpp @@ -10,9 +10,9 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/PlantTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" class Random; diff --git a/targets/minecraft/world/level/tile/WebTile.cpp b/targets/minecraft/world/level/tile/WebTile.cpp index df129e0a5..98692d4d0 100644 --- a/targets/minecraft/world/level/tile/WebTile.cpp +++ b/targets/minecraft/world/level/tile/WebTile.cpp @@ -6,8 +6,8 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" WebTile::WebTile(int id) : Tile(id, Material::web) {} diff --git a/targets/minecraft/world/level/tile/WeightedPressurePlateTile.cpp b/targets/minecraft/world/level/tile/WeightedPressurePlateTile.cpp index 537c2b0d8..76f90bb1b 100644 --- a/targets/minecraft/world/level/tile/WeightedPressurePlateTile.cpp +++ b/targets/minecraft/world/level/tile/WeightedPressurePlateTile.cpp @@ -8,8 +8,8 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/redstone/Redstone.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/BasePressurePlateTile.h" +#include "minecraft/world/phys/AABB.h" class Material; diff --git a/targets/minecraft/world/level/tile/WoodSlabTile.cpp b/targets/minecraft/world/level/tile/WoodSlabTile.cpp index e061198fe..e9b5711ee 100644 --- a/targets/minecraft/world/level/tile/WoodSlabTile.cpp +++ b/targets/minecraft/world/level/tile/WoodSlabTile.cpp @@ -2,11 +2,11 @@ #include -#include "strings.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" const unsigned int WoodSlabTile::SLAB_NAMES[SLAB_NAMES_LENGTH] = { IDS_TILE_STONESLAB_OAK, diff --git a/targets/minecraft/world/level/tile/WoodTile.cpp b/targets/minecraft/world/level/tile/WoodTile.cpp index 2ce3765d2..b1c548958 100644 --- a/targets/minecraft/world/level/tile/WoodTile.cpp +++ b/targets/minecraft/world/level/tile/WoodTile.cpp @@ -1,9 +1,9 @@ #include "WoodTile.h" -#include "strings.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" +#include "strings.h" class Icon; diff --git a/targets/minecraft/world/level/tile/WoolCarpetTile.cpp b/targets/minecraft/world/level/tile/WoolCarpetTile.cpp index c28bef50d..5cda7be4e 100644 --- a/targets/minecraft/world/level/tile/WoolCarpetTile.cpp +++ b/targets/minecraft/world/level/tile/WoolCarpetTile.cpp @@ -6,8 +6,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" -#include "minecraft/world/phys/AABB.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/phys/AABB.h" WoolCarpetTile::WoolCarpetTile(int id) : Tile(id, Material::clothDecoration, false) { diff --git a/targets/minecraft/world/level/tile/entity/BeaconTileEntity.cpp b/targets/minecraft/world/level/tile/entity/BeaconTileEntity.cpp index a60b688f8..7c3d82f0f 100644 --- a/targets/minecraft/world/level/tile/entity/BeaconTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/BeaconTileEntity.cpp @@ -5,9 +5,7 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "SharedConstants.h" -#include "nbt/CompoundTag.h" #include "minecraft/network/packet/TileEntityDataPacket.h" -#include "strings.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/player/Player.h" @@ -17,6 +15,8 @@ #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/AABB.h" +#include "nbt/CompoundTag.h" +#include "strings.h" class Entity; diff --git a/targets/minecraft/world/level/tile/entity/BeaconTileEntity.h b/targets/minecraft/world/level/tile/entity/BeaconTileEntity.h index c90579505..4fad971bc 100644 --- a/targets/minecraft/world/level/tile/entity/BeaconTileEntity.h +++ b/targets/minecraft/world/level/tile/entity/BeaconTileEntity.h @@ -1,13 +1,14 @@ #pragma once #include + #include #include #include "TileEntity.h" +#include "java/Class.h" #include "minecraft/SharedConstants.h" #include "minecraft/world/Container.h" -#include "java/Class.h" class MobEffect; class ItemInstance; diff --git a/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.cpp b/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.cpp index 2ca806145..c294fea14 100644 --- a/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.cpp @@ -1,24 +1,25 @@ #include "BrewingStandTileEntity.h" #include + #include #include -#include "minecraft/SharedConstants.h" -#include "minecraft/world/item/alchemy/PotionMacros.h" #include "Facing.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" +#include "minecraft/SharedConstants.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/PotionItem.h" #include "minecraft/world/item/alchemy/PotionBrewing.h" +#include "minecraft/world/item/alchemy/PotionMacros.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" class MobEffectInstance; diff --git a/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.h b/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.h index 3b7e0cfc2..e04904400 100644 --- a/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.h +++ b/targets/minecraft/world/level/tile/entity/BrewingStandTileEntity.h @@ -4,8 +4,8 @@ #include #include "TileEntity.h" -#include "minecraft/world/WorldlyContainer.h" #include "java/Class.h" +#include "minecraft/world/WorldlyContainer.h" class ItemInstance; diff --git a/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp b/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp index 0c075d451..868a61601 100644 --- a/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp @@ -1,18 +1,16 @@ #include "ChestTileEntity.h" #include + #include -#include "TileEntity.h" -#include "minecraft/network/packet/ContainerOpenPacket.h" -#include "minecraft/sounds/SoundTypes.h" #include "Direction.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "SharedConstants.h" +#include "TileEntity.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" +#include "minecraft/network/packet/ContainerOpenPacket.h" +#include "minecraft/sounds/SoundTypes.h" #include "minecraft/world/CompoundContainer.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Player.h" @@ -23,6 +21,9 @@ #include "minecraft/world/level/tile/ChestTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/AABB.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" class Entity; diff --git a/targets/minecraft/world/level/tile/entity/ChestTileEntity.h b/targets/minecraft/world/level/tile/entity/ChestTileEntity.h index 0c900ad65..6273db675 100644 --- a/targets/minecraft/world/level/tile/entity/ChestTileEntity.h +++ b/targets/minecraft/world/level/tile/entity/ChestTileEntity.h @@ -5,9 +5,9 @@ #include #include "TileEntity.h" +#include "java/Class.h" #include "minecraft/world/Container.h" #include "nbt/ListTag.h" -#include "java/Class.h" class Player; class CompoundTag; diff --git a/targets/minecraft/world/level/tile/entity/CommandBlockEntity.cpp b/targets/minecraft/world/level/tile/entity/CommandBlockEntity.cpp index 4ea87191a..60327f8b4 100644 --- a/targets/minecraft/world/level/tile/entity/CommandBlockEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/CommandBlockEntity.cpp @@ -1,14 +1,15 @@ #include "CommandBlockEntity.h" #include + #include #include "minecraft/Pos.h" -#include "minecraft/network/packet/TileEntityDataPacket.h" -#include "nbt/CompoundTag.h" #include "minecraft/commands/CommandsEnum.h" #include "minecraft/network/packet/ChatPacket.h" +#include "minecraft/network/packet/TileEntityDataPacket.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" class Level; diff --git a/targets/minecraft/world/level/tile/entity/ComparatorTileEntity.cpp b/targets/minecraft/world/level/tile/entity/ComparatorTileEntity.cpp index da0467ca9..c04f3fe70 100644 --- a/targets/minecraft/world/level/tile/entity/ComparatorTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/ComparatorTileEntity.cpp @@ -3,8 +3,8 @@ #include #include -#include "nbt/CompoundTag.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" void ComparatorTileEntity::save(CompoundTag* tag) { TileEntity::save(tag); diff --git a/targets/minecraft/world/level/tile/entity/DispenserTileEntity.cpp b/targets/minecraft/world/level/tile/entity/DispenserTileEntity.cpp index ed087fd02..17361cfd1 100644 --- a/targets/minecraft/world/level/tile/entity/DispenserTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/DispenserTileEntity.cpp @@ -2,16 +2,16 @@ #include -#include "TileEntity.h" #include "Minecraft.Client/Linux/Linux_App.h" +#include "TileEntity.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/Level.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" DispenserTileEntity::DispenserTileEntity() : TileEntity() { items = std::vector>(9); diff --git a/targets/minecraft/world/level/tile/entity/DispenserTileEntity.h b/targets/minecraft/world/level/tile/entity/DispenserTileEntity.h index 988cd64ff..f704123d3 100644 --- a/targets/minecraft/world/level/tile/entity/DispenserTileEntity.h +++ b/targets/minecraft/world/level/tile/entity/DispenserTileEntity.h @@ -5,9 +5,9 @@ #include #include "TileEntity.h" +#include "java/Class.h" #include "minecraft/world/Container.h" #include "nbt/com.mojang.nbt.h" -#include "java/Class.h" class Player; class Random; diff --git a/targets/minecraft/world/level/tile/entity/DropperTileEntity.cpp b/targets/minecraft/world/level/tile/entity/DropperTileEntity.cpp index 6303a799e..952f3c7d0 100644 --- a/targets/minecraft/world/level/tile/entity/DropperTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/DropperTileEntity.cpp @@ -4,8 +4,8 @@ #include #include "Minecraft.Client/Linux/Linux_App.h" -#include "strings.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "strings.h" std::wstring DropperTileEntity::getName() { return hasCustomName() ? name : app.GetString(IDS_CONTAINER_DROPPER); diff --git a/targets/minecraft/world/level/tile/entity/EnchantmentTableTileEntity.cpp b/targets/minecraft/world/level/tile/entity/EnchantmentTableTileEntity.cpp index 60d297cb2..0cdedeea9 100644 --- a/targets/minecraft/world/level/tile/entity/EnchantmentTableTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/EnchantmentTableTileEntity.cpp @@ -6,11 +6,11 @@ #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" -#include "strings.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" +#include "strings.h" EnchantmentTableEntity::EnchantmentTableEntity() { random = new Random(); diff --git a/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.cpp b/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.cpp index 714bca784..4fe7ec081 100644 --- a/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.cpp @@ -2,12 +2,8 @@ #include -#include "minecraft/world/level/material/Material.h" #include "Facing.h" #include "Minecraft.Client/Linux/Linux_App.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/CoalItem.h" @@ -18,10 +14,14 @@ #include "minecraft/world/item/WeaponItem.h" #include "minecraft/world/item/crafting/FurnaceRecipes.h" #include "minecraft/world/level/Level.h" +#include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/FurnaceTile.h" #include "minecraft/world/level/tile/HalfSlabTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" int furnaceSlotsForUp[] = {FurnaceTileEntity::SLOT_INPUT}; int furnaceSlotsForDown[] = {FurnaceTileEntity::SLOT_RESULT, diff --git a/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.h b/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.h index 20bcc865f..719199d1b 100644 --- a/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.h +++ b/targets/minecraft/world/level/tile/entity/FurnaceTileEntity.h @@ -5,9 +5,9 @@ #include #include "TileEntity.h" +#include "java/Class.h" #include "minecraft/world/WorldlyContainer.h" #include "minecraft/world/level/tile/FurnaceTile.h" -#include "java/Class.h" class Player; class Level; diff --git a/targets/minecraft/world/level/tile/entity/HopperTileEntity.cpp b/targets/minecraft/world/level/tile/entity/HopperTileEntity.cpp index 74b08b421..441051d13 100644 --- a/targets/minecraft/world/level/tile/entity/HopperTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/HopperTileEntity.cpp @@ -1,16 +1,14 @@ #include "HopperTileEntity.h" #include + #include #include -#include "minecraft/util/Mth.h" #include "Facing.h" #include "Minecraft.Client/Linux/Linux_App.h" #include "java/Random.h" -#include "nbt/CompoundTag.h" -#include "nbt/ListTag.h" -#include "strings.h" +#include "minecraft/util/Mth.h" #include "minecraft/world/WorldlyContainer.h" #include "minecraft/world/entity/EntitySelector.h" #include "minecraft/world/entity/item/ItemEntity.h" @@ -23,6 +21,9 @@ #include "minecraft/world/level/tile/entity/Hopper.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/AABB.h" +#include "nbt/CompoundTag.h" +#include "nbt/ListTag.h" +#include "strings.h" class Entity; diff --git a/targets/minecraft/world/level/tile/entity/MobSpawnerTileEntity.cpp b/targets/minecraft/world/level/tile/entity/MobSpawnerTileEntity.cpp index 3d9820a41..543d67472 100644 --- a/targets/minecraft/world/level/tile/entity/MobSpawnerTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/MobSpawnerTileEntity.cpp @@ -6,8 +6,8 @@ #include "minecraft/world/level/BaseMobSpawner.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" MobSpawnerTileEntity::TileEntityMobSpawner::TileEntityMobSpawner( MobSpawnerTileEntity* parent) { diff --git a/targets/minecraft/world/level/tile/entity/MusicTileEntity.cpp b/targets/minecraft/world/level/tile/entity/MusicTileEntity.cpp index d57dd5b0f..7c8ca9f41 100644 --- a/targets/minecraft/world/level/tile/entity/MusicTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/MusicTileEntity.cpp @@ -6,8 +6,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" #include "minecraft/world/level/tile/Tile.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" MusicTileEntity::MusicTileEntity() : TileEntity() { note = 0; diff --git a/targets/minecraft/world/level/tile/entity/PistonPieceTileEntity.cpp b/targets/minecraft/world/level/tile/entity/PistonPieceTileEntity.cpp index 87c767743..2dcb67ab1 100644 --- a/targets/minecraft/world/level/tile/entity/PistonPieceTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/PistonPieceTileEntity.cpp @@ -10,8 +10,8 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/Tile.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" PistonPieceEntity::PistonPieceEntity() { // for the tile entity loader diff --git a/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp b/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp index aadcbb0df..40e064a47 100644 --- a/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/SignTileEntity.cpp @@ -3,13 +3,13 @@ #include #include "Minecraft.Client/Linux/Stubs/winapi_stubs.h" +#include "PlatformTypes.h" #include "minecraft/client/Minecraft.h" #include "minecraft/network/packet/SignUpdatePacket.h" #include "minecraft/server/level/ServerLevel.h" #include "minecraft/world/level/Level.h" -#include "nbt/CompoundTag.h" -#include "PlatformTypes.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" class Player; diff --git a/targets/minecraft/world/level/tile/entity/SkullTileEntity.cpp b/targets/minecraft/world/level/tile/entity/SkullTileEntity.cpp index 7a64569a7..7aff9dd72 100644 --- a/targets/minecraft/world/level/tile/entity/SkullTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/SkullTileEntity.cpp @@ -4,8 +4,8 @@ #include #include "minecraft/network/packet/TileEntityDataPacket.h" -#include "nbt/CompoundTag.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "nbt/CompoundTag.h" SkullTileEntity::SkullTileEntity() { skullType = 0; diff --git a/targets/nbt/include/nbt/NbtIo.h b/targets/nbt/include/nbt/NbtIo.h index 6abe29190..f964e3f75 100644 --- a/targets/nbt/include/nbt/NbtIo.h +++ b/targets/nbt/include/nbt/NbtIo.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include "CompoundTag.h" diff --git a/targets/nbt/include/nbt/Tag.h b/targets/nbt/include/nbt/Tag.h index 6158b50b6..200118f89 100644 --- a/targets/nbt/include/nbt/Tag.h +++ b/targets/nbt/include/nbt/Tag.h @@ -1,5 +1,6 @@ #pragma once #include + #include #include diff --git a/targets/nbt/src/Tag.cpp b/targets/nbt/src/Tag.cpp index fae48907e..06d7707e6 100644 --- a/targets/nbt/src/Tag.cpp +++ b/targets/nbt/src/Tag.cpp @@ -2,20 +2,20 @@ #include +#include "java/InputOutputStream/DataInput.h" +#include "java/InputOutputStream/DataOutput.h" #include "nbt/ByteArrayTag.h" #include "nbt/ByteTag.h" #include "nbt/CompoundTag.h" #include "nbt/DoubleTag.h" #include "nbt/EndTag.h" #include "nbt/FloatTag.h" +#include "nbt/IntArrayTag.h" #include "nbt/IntTag.h" #include "nbt/ListTag.h" #include "nbt/LongTag.h" #include "nbt/ShortTag.h" #include "nbt/StringTag.h" -#include "java/InputOutputStream/DataInput.h" -#include "java/InputOutputStream/DataOutput.h" -#include "nbt/IntArrayTag.h" Tag::Tag(const std::wstring& name) { if (name.empty()) {