From 1a4209db38c2c11362488da4e636196c8fe350f0 Mon Sep 17 00:00:00 2001 From: Enrico van Oosten Date: Thu, 10 Jan 2019 16:02:26 +0100 Subject: [PATCH] !I CL 1906107 //dev_game_hunt/xbox_candidate -> //ce/main !F (DEV-7092) (XboxOne) Added different durango.cfg loading based on X or non-X (Approved by fatih) Copied from Perforce Change: 1907065 --- Code/CryEngine/Cry3DEngine/3DEngineRender.cpp | 3 +++ Code/CryEngine/Cry3DEngine/ParticleEffect.cpp | 1 + .../Cry3DEngine/ParticleSystem/Features/FeatureComponent.cpp | 2 +- Code/CryEngine/Cry3DEngine/ParticleSystem/Features/Modifiers.cpp | 3 ++- Code/CryEngine/Cry3DEngine/ParticleSystem/ParticleConvert.cpp | 1 + Code/CryEngine/CryCommon/CryParticleSystem/IParticles.h | 1 + Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams.h | 2 +- Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams_info.h | 1 + Code/CryEngine/CryCommon/CrySystem/ISystem.h | 7 ++++--- Engine/Config/durango.cfg | 2 +- Engine/Config/durango_non_x.cfg | 3 +++ Engine/Config/durango_x.cfg | 3 +++ 12 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 Engine/Config/durango_non_x.cfg create mode 100644 Engine/Config/durango_x.cfg diff --git a/Code/CryEngine/Cry3DEngine/3DEngineRender.cpp b/Code/CryEngine/Cry3DEngine/3DEngineRender.cpp index 99bb0a712..addbc228a 100644 --- a/Code/CryEngine/Cry3DEngine/3DEngineRender.cpp +++ b/Code/CryEngine/Cry3DEngine/3DEngineRender.cpp @@ -2383,6 +2383,9 @@ void C3DEngine::DisplayInfo(float& fTextPosX, float& fTextPosY, float& fTextStep case CONFIG_DURANGO: AppendString(szFlagsEnd, "XboxOneSpec"); break; + case CONFIG_DURANGO_X: + AppendString(szFlagsEnd, "XboxOneXSpec"); + break; case CONFIG_ORBIS: AppendString(szFlagsEnd, "PS4Spec"); break; diff --git a/Code/CryEngine/Cry3DEngine/ParticleEffect.cpp b/Code/CryEngine/Cry3DEngine/ParticleEffect.cpp index e7afaedfc..6efb0146c 100644 --- a/Code/CryEngine/Cry3DEngine/ParticleEffect.cpp +++ b/Code/CryEngine/Cry3DEngine/ParticleEffect.cpp @@ -689,6 +689,7 @@ void ResourceParticleParams::ComputeEnvironmentFlags() mConfigSpecMask |= Platforms.PS4 * BIT(CONFIG_ORBIS) + Platforms.XBoxOne * BIT(CONFIG_DURANGO) + + Platforms.XBoxOneX * BIT(CONFIG_DURANGO_X) ; } diff --git a/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/FeatureComponent.cpp b/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/FeatureComponent.cpp index abfdf3469..b79e9fad3 100644 --- a/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/FeatureComponent.cpp +++ b/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/FeatureComponent.cpp @@ -176,7 +176,7 @@ public: (particleSpec >= uint(m_minimumConfig)) && (particleSpec <= uint(m_maximumConfig)); } - else if (particleSpec == CONFIG_DURANGO && m_XBoxOne) + else if ((particleSpec == CONFIG_DURANGO || particleSpec == CONFIG_DURANGO_X) && m_XBoxOne) return true; else if (particleSpec == CONFIG_ORBIS && m_PS4) return true; diff --git a/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/Modifiers.cpp b/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/Modifiers.cpp index 504793f8a..5dc0dd4bc 100644 --- a/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/Modifiers.cpp +++ b/Code/CryEngine/Cry3DEngine/ParticleSystem/Features/Modifiers.cpp @@ -493,7 +493,8 @@ const SSpecData gConfigSpecs[] = { "Medium", "Medium", CONFIG_MEDIUM_SPEC }, { "High", "High", CONFIG_HIGH_SPEC }, { "VeryHigh", "Very High", CONFIG_VERYHIGH_SPEC }, - { "XBO", "XBox One", CONFIG_DURANGO }, + { "XboxOne", "XBox One", CONFIG_DURANGO }, + { "XboxOneX", "XBox One X", CONFIG_DURANGO_X }, { "PS4", "Playstation 4", CONFIG_ORBIS }, }; diff --git a/Code/CryEngine/Cry3DEngine/ParticleSystem/ParticleConvert.cpp b/Code/CryEngine/Cry3DEngine/ParticleSystem/ParticleConvert.cpp index 3aa62c502..65748ff19 100644 --- a/Code/CryEngine/Cry3DEngine/ParticleSystem/ParticleConvert.cpp +++ b/Code/CryEngine/Cry3DEngine/ParticleSystem/ParticleConvert.cpp @@ -993,6 +993,7 @@ void ConvertConfigSpec(IParticleComponent& component, ParticleParams& params) ConvertValueString(spec, "Maximum", params.eConfigMax, ParticleParams::EConfigSpecBrief::VeryHigh); ConvertValue(spec, "PC", params.Platforms.PCDX); ConvertValue(spec, "XBoxOne", params.Platforms.XBoxOne); + ConvertValue(spec, "XBoxOneX", params.Platforms.XBoxOneX); ConvertValue(spec, "PS4", params.Platforms.PS4); AddFeature(component, spec); } diff --git a/Code/CryEngine/CryCommon/CryParticleSystem/IParticles.h b/Code/CryEngine/CryCommon/CryParticleSystem/IParticles.h index cb3ac9792..65a831c51 100644 --- a/Code/CryEngine/CryCommon/CryParticleSystem/IParticles.h +++ b/Code/CryEngine/CryCommon/CryParticleSystem/IParticles.h @@ -32,6 +32,7 @@ SERIALIZATION_DECLARE_ENUM(EParticleSpec, High = CONFIG_HIGH_SPEC, VeryHigh = CONFIG_VERYHIGH_SPEC, XBoxOne = CONFIG_DURANGO, + XBoxOneX = CONFIG_DURANGO_X, PS4 = CONFIG_ORBIS ); diff --git a/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams.h b/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams.h index 39baa8b42..ac95cb441 100644 --- a/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams.h +++ b/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams.h @@ -979,7 +979,7 @@ struct ParticleParams struct SPlatforms { - TSmallBoolTrue PCDX, PS4, XBoxOne; + TSmallBoolTrue PCDX, PS4, XBoxOne, XBoxOneX; AUTO_STRUCT_INFO; } Platforms; //!< Platforms this effect runs on. diff --git a/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams_info.h b/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams_info.h index 2ce23bfd8..da92a9146 100644 --- a/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams_info.h +++ b/Code/CryEngine/CryCommon/CryParticleSystem/ParticleParams_info.h @@ -288,6 +288,7 @@ STRUCT_INFO_BEGIN(ParticleParams::SPlatforms) VAR_INFO(PCDX) VAR_INFO(PS4) VAR_INFO(XBoxOne) + VAR_INFO(XBoxOneX) STRUCT_INFO_END(ParticleParams::SPlatforms) // *INDENT-ON* - disable uncrustify's indenting, as it doesn't make sense here. diff --git a/Code/CryEngine/CryCommon/CrySystem/ISystem.h b/Code/CryEngine/CryCommon/CrySystem/ISystem.h index 05ed7a32a..542a465b0 100644 --- a/Code/CryEngine/CryCommon/CrySystem/ISystem.h +++ b/Code/CryEngine/CryCommon/CrySystem/ISystem.h @@ -210,11 +210,12 @@ enum ESystemConfigSpec CONFIG_HIGH_SPEC = 3, CONFIG_VERYHIGH_SPEC = 4, - CONFIG_DURANGO = 5, - CONFIG_ORBIS = 6, + CONFIG_DURANGO = 5, //! Xbox One (Potato) + CONFIG_DURANGO_X = 6, //! Xbox One X + CONFIG_ORBIS = 7, //! Specialized detail config setting. - CONFIG_DETAIL_SPEC = 7, + CONFIG_DETAIL_SPEC = 8, END_CONFIG_SPEC_ENUM, //!< Must be the last value, used for error checking. }; diff --git a/Engine/Config/durango.cfg b/Engine/Config/durango.cfg index 7f0cd3d62..df670c1b9 100644 --- a/Engine/Config/durango.cfg +++ b/Engine/Config/durango.cfg @@ -1,8 +1,8 @@ ; All options in this section need to be reset by the sys_spec configs to avoid state leaking +-- Common settings for X and non X -- sys_usePlatformSavingAPI = 0 sys_flash_address_space = 204800 -sys_spec_full = 3 [Platform] ; Platform-specific settings which are ignored on PC when selecting this spec diff --git a/Engine/Config/durango_non_x.cfg b/Engine/Config/durango_non_x.cfg new file mode 100644 index 000000000..7328710b4 --- /dev/null +++ b/Engine/Config/durango_non_x.cfg @@ -0,0 +1,3 @@ +-- Xbox One (non X) specific -- + +sys_spec_full = 3 \ No newline at end of file diff --git a/Engine/Config/durango_x.cfg b/Engine/Config/durango_x.cfg new file mode 100644 index 000000000..8b04470f1 --- /dev/null +++ b/Engine/Config/durango_x.cfg @@ -0,0 +1,3 @@ +-- Xbox One X specific -- + +sys_spec_full = 3 \ No newline at end of file -- 2.11.4.GIT