|
@@ -1,11 +1,12 @@
|
|
|
#include "CGFXSpec.h"
|
|
|
-#include "CFTTDevice.h"
|
|
|
+
|
|
|
#include "AndroidApp.h"
|
|
|
+#include "CFE.h"
|
|
|
#include "CFTTAndroidDevice.h"
|
|
|
-#include "CXmlUtil.h"
|
|
|
+#include "CFTTDevice.h"
|
|
|
#include "CFTTGraphicsDevice.h"
|
|
|
+#include "CXmlUtil.h"
|
|
|
#include "STORY.h"
|
|
|
-#include "CFE.h"
|
|
|
|
|
|
char CGFXSpec::s_cDeviceReport[0x1000];
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
@@ -17,208 +18,763 @@ const char *list_ResLimit_323204[4] = {
|
|
|
};
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
GFXSPEC_Specification GFXSPEC_tSpecification_AndroidLow{
|
|
|
- 0x1e, //field_0
|
|
|
- 1.399999976158142, //fLODMultGame_4
|
|
|
- 1.200000047683716, //fLODMultNIS_8
|
|
|
- 0.75, //fRTTScaleFactorX_C
|
|
|
- 0.75, //fRTTScaleFactorY_10
|
|
|
- 256, //iAtlasWidth_14
|
|
|
- 256, //iAtlasHeight_18
|
|
|
- 2, //iKitTexFormat_1C
|
|
|
- 512, //iKitDims_20
|
|
|
- false, //bSoftShadows_24
|
|
|
- true, //bEnvObjectShadows_25
|
|
|
- false, //bGameplayStadium_26
|
|
|
- true, //bCrowdAnimated_27
|
|
|
- false, //bDropTexMips_28
|
|
|
- false, //field_29 unuse
|
|
|
- false, //field_2A unuse
|
|
|
- false, //field_2B unuse
|
|
|
- 0, //eEnableDOF_2C
|
|
|
- false, //bEnableDepthFog_30
|
|
|
- false, //bEnableReflection_31
|
|
|
- false, //bEnableGodRays_32
|
|
|
- false, //bHighQualityNet_33
|
|
|
+ 0x1e, // field_0
|
|
|
+ 1.399999976158142, // fLODMultGame_4
|
|
|
+ 1.200000047683716, // fLODMultNIS_8
|
|
|
+ 0.75, // fRTTScaleFactorX_C
|
|
|
+ 0.75, // fRTTScaleFactorY_10
|
|
|
+ 256, // iAtlasWidth_14
|
|
|
+ 256, // iAtlasHeight_18
|
|
|
+ 2, // iKitTexFormat_1C
|
|
|
+ 512, // iKitDims_20
|
|
|
+ false, // bSoftShadows_24
|
|
|
+ true, // bEnvObjectShadows_25
|
|
|
+ false, // bGameplayStadium_26
|
|
|
+ true, // bCrowdAnimated_27
|
|
|
+ false, // bDropTexMips_28
|
|
|
+ false, // field_29 unuse
|
|
|
+ false, // field_2A unuse
|
|
|
+ false, // field_2B unuse
|
|
|
+ 0, // eEnableDOF_2C
|
|
|
+ false, // bEnableDepthFog_30
|
|
|
+ false, // bEnableReflection_31
|
|
|
+ false, // bEnableGodRays_32
|
|
|
+ false, // bHighQualityNet_33
|
|
|
0u,
|
|
|
0u,
|
|
|
1u,
|
|
|
0u,
|
|
|
- nullptr, //pVHSShader_38
|
|
|
- false, //bHighQualityGroundShadows_3C
|
|
|
- false, //b3DGrass_3D
|
|
|
- false, //bFloatEnvMap_3E
|
|
|
- false, //bDynNormMap_3F
|
|
|
- 0, //eAntiAliasing_40
|
|
|
- EPlayerShader_Quality_0, //ePlayerLightingQuality_44
|
|
|
- EPitchShader_Quality_0, //eHighQualityGrass_48
|
|
|
- 0, //eCrowdQuality_4C
|
|
|
- -1, //iMinMaxResolution_50
|
|
|
- false, //bForce16Bit_54
|
|
|
+ nullptr, // pVHSShader_38
|
|
|
+ false, // bHighQualityGroundShadows_3C
|
|
|
+ false, // b3DGrass_3D
|
|
|
+ false, // bFloatEnvMap_3E
|
|
|
+ false, // bDynNormMap_3F
|
|
|
+ 0, // eAntiAliasing_40
|
|
|
+ EPlayerShader_Quality_0, // ePlayerLightingQuality_44
|
|
|
+ EPitchShader_Quality_0, // eHighQualityGrass_48
|
|
|
+ 0, // eCrowdQuality_4C
|
|
|
+ -1, // iMinMaxResolution_50
|
|
|
+ false, // bForce16Bit_54
|
|
|
};
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
GFXSPEC_Specification GFXSPEC_tSpecification_AndroidMed{
|
|
|
- 0x1e, //field_0
|
|
|
- 1.200000047683716, //fLODMultGame_4
|
|
|
- 1.100000023841858, //fLODMultNIS_8
|
|
|
- 0.75, //fRTTScaleFactorX_C
|
|
|
- 0.75, //fRTTScaleFactorY_10
|
|
|
- 256, //iAtlasWidth_14
|
|
|
- 256, //iAtlasHeight_18
|
|
|
- 3, //iKitTexFormat_1C
|
|
|
- 256, //iKitDims_20
|
|
|
- false, //bSoftShadows_24
|
|
|
- true, //bEnvObjectShadows_25
|
|
|
- true, //bGameplayStadium_26
|
|
|
- true, //bCrowdAnimated_27
|
|
|
- false, //bDropTexMips_28
|
|
|
- false, //field_29 unuse
|
|
|
- false, //field_2A unuse
|
|
|
- false, //field_2B unuse
|
|
|
- 1, //eEnableDOF_2C
|
|
|
- true, //bEnableDepthFog_30
|
|
|
- true, //bEnableReflection_31
|
|
|
- true, //bEnableGodRays_32
|
|
|
- true, //bHighQualityNet_33
|
|
|
+ 0x1e, // field_0
|
|
|
+ 1.200000047683716, // fLODMultGame_4
|
|
|
+ 1.100000023841858, // fLODMultNIS_8
|
|
|
+ 0.75, // fRTTScaleFactorX_C
|
|
|
+ 0.75, // fRTTScaleFactorY_10
|
|
|
+ 256, // iAtlasWidth_14
|
|
|
+ 256, // iAtlasHeight_18
|
|
|
+ 3, // iKitTexFormat_1C
|
|
|
+ 256, // iKitDims_20
|
|
|
+ false, // bSoftShadows_24
|
|
|
+ true, // bEnvObjectShadows_25
|
|
|
+ true, // bGameplayStadium_26
|
|
|
+ true, // bCrowdAnimated_27
|
|
|
+ false, // bDropTexMips_28
|
|
|
+ false, // field_29 unuse
|
|
|
+ false, // field_2A unuse
|
|
|
+ false, // field_2B unuse
|
|
|
+ 1, // eEnableDOF_2C
|
|
|
+ true, // bEnableDepthFog_30
|
|
|
+ true, // bEnableReflection_31
|
|
|
+ true, // bEnableGodRays_32
|
|
|
+ true, // bHighQualityNet_33
|
|
|
1u,
|
|
|
1u,
|
|
|
3u,
|
|
|
0u,
|
|
|
- "2d_vhsbasic", //pVHSShader_38
|
|
|
- false, //bHighQualityGroundShadows_3C
|
|
|
- false, //b3DGrass_3D
|
|
|
- false, //bFloatEnvMap_3E
|
|
|
- false, //bDynNormMap_3F
|
|
|
- 0, //eAntiAliasing_40
|
|
|
- EPlayerShader_Quality_1, //ePlayerLightingQuality_44
|
|
|
- EPitchShader_Quality_1, //eHighQualityGrass_48
|
|
|
- 0, //eCrowdQuality_4C
|
|
|
- -1, //iMinMaxResolution_50
|
|
|
- false, //bForce16Bit_54
|
|
|
+ "2d_vhsbasic", // pVHSShader_38
|
|
|
+ false, // bHighQualityGroundShadows_3C
|
|
|
+ false, // b3DGrass_3D
|
|
|
+ false, // bFloatEnvMap_3E
|
|
|
+ false, // bDynNormMap_3F
|
|
|
+ 0, // eAntiAliasing_40
|
|
|
+ EPlayerShader_Quality_1, // ePlayerLightingQuality_44
|
|
|
+ EPitchShader_Quality_1, // eHighQualityGrass_48
|
|
|
+ 0, // eCrowdQuality_4C
|
|
|
+ -1, // iMinMaxResolution_50
|
|
|
+ false, // bForce16Bit_54
|
|
|
};
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
GFXSPEC_Specification GFXSPEC_tSpecification_AndroidHigh{
|
|
|
- 0x3c, //field_0
|
|
|
- 0.875, //fLODMultGame_4
|
|
|
- 0.75, //fLODMultNIS_8
|
|
|
- 1.0, //fRTTScaleFactorX_C
|
|
|
- 1.0, //fRTTScaleFactorY_10
|
|
|
- 256, //iAtlasWidth_14
|
|
|
- 256, //iAtlasHeight_18
|
|
|
- 3, //iKitTexFormat_1C
|
|
|
- 512, //iKitDims_20
|
|
|
- true, //bSoftShadows_24
|
|
|
- true, //bEnvObjectShadows_25
|
|
|
- true, //bGameplayStadium_26
|
|
|
- true, //bCrowdAnimated_27
|
|
|
- false, //bDropTexMips_28
|
|
|
- false, //field_29 unuse
|
|
|
- false, //field_2A unuse
|
|
|
- false, //field_2B unuse
|
|
|
- 2, //eEnableDOF_2C
|
|
|
- true, //bEnableDepthFog_30
|
|
|
- true, //bEnableReflection_31
|
|
|
- true, //bEnableGodRays_32
|
|
|
- true, //bHighQualityNet_33
|
|
|
+ 0x3c, // field_0
|
|
|
+ 0.875, // fLODMultGame_4
|
|
|
+ 0.75, // fLODMultNIS_8
|
|
|
+ 1.0, // fRTTScaleFactorX_C
|
|
|
+ 1.0, // fRTTScaleFactorY_10
|
|
|
+ 256, // iAtlasWidth_14
|
|
|
+ 256, // iAtlasHeight_18
|
|
|
+ 3, // iKitTexFormat_1C
|
|
|
+ 512, // iKitDims_20
|
|
|
+ true, // bSoftShadows_24
|
|
|
+ true, // bEnvObjectShadows_25
|
|
|
+ true, // bGameplayStadium_26
|
|
|
+ true, // bCrowdAnimated_27
|
|
|
+ false, // bDropTexMips_28
|
|
|
+ false, // field_29 unuse
|
|
|
+ false, // field_2A unuse
|
|
|
+ false, // field_2B unuse
|
|
|
+ 2, // eEnableDOF_2C
|
|
|
+ true, // bEnableDepthFog_30
|
|
|
+ true, // bEnableReflection_31
|
|
|
+ true, // bEnableGodRays_32
|
|
|
+ true, // bHighQualityNet_33
|
|
|
1u,
|
|
|
1u,
|
|
|
4u,
|
|
|
0u,
|
|
|
- "2d_vhsfancy", //pVHSShader_38
|
|
|
- true, //bHighQualityGroundShadows_3C
|
|
|
- true, //b3DGrass_3D
|
|
|
- true, //bFloatEnvMap_3E
|
|
|
- true, //bDynNormMap_3F
|
|
|
- 0, //eAntiAliasing_40
|
|
|
- EPlayerShader_Quality_1, //ePlayerLightingQuality_44
|
|
|
- EPitchShader_Quality_2, //eHighQualityGrass_48
|
|
|
- 2, //eCrowdQuality_4C
|
|
|
- -1, //iMinMaxResolution_50
|
|
|
- false, //bForce16Bit_54
|
|
|
+ "2d_vhsfancy", // pVHSShader_38
|
|
|
+ true, // bHighQualityGroundShadows_3C
|
|
|
+ true, // b3DGrass_3D
|
|
|
+ true, // bFloatEnvMap_3E
|
|
|
+ true, // bDynNormMap_3F
|
|
|
+ 0, // eAntiAliasing_40
|
|
|
+ EPlayerShader_Quality_1, // ePlayerLightingQuality_44
|
|
|
+ EPitchShader_Quality_2, // eHighQualityGrass_48
|
|
|
+ 2, // eCrowdQuality_4C
|
|
|
+ -1, // iMinMaxResolution_50
|
|
|
+ false, // bForce16Bit_54
|
|
|
};
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
GFXSPEC_Specification GFXSPEC_tSpecification_AndroidHighest{
|
|
|
- 0x3c, //field_0
|
|
|
- 0.75, //fLODMultGame_4
|
|
|
- 0.5, //fLODMultNIS_8
|
|
|
- 1.0, //fRTTScaleFactorX_C
|
|
|
- 1.0, //fRTTScaleFactorY_10
|
|
|
- 256, //iAtlasWidth_14
|
|
|
- 256, //iAtlasHeight_18
|
|
|
- 3, //iKitTexFormat_1C
|
|
|
- 512, //iKitDims_20
|
|
|
- true, //bSoftShadows_24
|
|
|
- true, //bEnvObjectShadows_25
|
|
|
- true, //bGameplayStadium_26
|
|
|
- true, //bCrowdAnimated_27
|
|
|
- false, //bDropTexMips_28
|
|
|
- false, //field_29 unuse
|
|
|
- false, //field_2A unuse
|
|
|
- false, //field_2B unuse
|
|
|
- 3, //eEnableDOF_2C
|
|
|
- true, //bEnableDepthFog_30
|
|
|
- true, //bEnableReflection_31
|
|
|
- true, //bEnableGodRays_32
|
|
|
- true, //bHighQualityNet_33
|
|
|
+ 0x3c, // field_0
|
|
|
+ 0.75, // fLODMultGame_4
|
|
|
+ 0.5, // fLODMultNIS_8
|
|
|
+ 1.0, // fRTTScaleFactorX_C
|
|
|
+ 1.0, // fRTTScaleFactorY_10
|
|
|
+ 256, // iAtlasWidth_14
|
|
|
+ 256, // iAtlasHeight_18
|
|
|
+ 3, // iKitTexFormat_1C
|
|
|
+ 512, // iKitDims_20
|
|
|
+ true, // bSoftShadows_24
|
|
|
+ true, // bEnvObjectShadows_25
|
|
|
+ true, // bGameplayStadium_26
|
|
|
+ true, // bCrowdAnimated_27
|
|
|
+ false, // bDropTexMips_28
|
|
|
+ false, // field_29 unuse
|
|
|
+ false, // field_2A unuse
|
|
|
+ false, // field_2B unuse
|
|
|
+ 3, // eEnableDOF_2C
|
|
|
+ true, // bEnableDepthFog_30
|
|
|
+ true, // bEnableReflection_31
|
|
|
+ true, // bEnableGodRays_32
|
|
|
+ true, // bHighQualityNet_33
|
|
|
1u,
|
|
|
1u,
|
|
|
4u,
|
|
|
0u,
|
|
|
- "2d_vhsfancy", //pVHSShader_38
|
|
|
- true, //bHighQualityGroundShadows_3C
|
|
|
- true, //b3DGrass_3D
|
|
|
- true, //bFloatEnvMap_3E
|
|
|
- true, //bDynNormMap_3F
|
|
|
- 3, //eAntiAliasing_40
|
|
|
- EPlayerShader_Quality_2, //ePlayerLightingQuality_44
|
|
|
- EPitchShader_Quality_3, //eHighQualityGrass_48
|
|
|
- 3, //eCrowdQuality_4C
|
|
|
- -1, //iMinMaxResolution_50
|
|
|
- false, //bForce16Bit_54
|
|
|
+ "2d_vhsfancy", // pVHSShader_38
|
|
|
+ true, // bHighQualityGroundShadows_3C
|
|
|
+ true, // b3DGrass_3D
|
|
|
+ true, // bFloatEnvMap_3E
|
|
|
+ true, // bDynNormMap_3F
|
|
|
+ 3, // eAntiAliasing_40
|
|
|
+ EPlayerShader_Quality_2, // ePlayerLightingQuality_44
|
|
|
+ EPitchShader_Quality_3, // eHighQualityGrass_48
|
|
|
+ 3, // eCrowdQuality_4C
|
|
|
+ -1, // iMinMaxResolution_50
|
|
|
+ false, // bForce16Bit_54
|
|
|
};
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
|
|
|
GFXSPEC_Specification *list_Specification_323214[]{
|
|
|
- &GFXSPEC_tSpecification_AndroidLow,
|
|
|
- &GFXSPEC_tSpecification_AndroidLow,
|
|
|
- &GFXSPEC_tSpecification_AndroidMed,
|
|
|
- &GFXSPEC_tSpecification_AndroidHigh,
|
|
|
+ &GFXSPEC_tSpecification_AndroidLow, &GFXSPEC_tSpecification_AndroidLow,
|
|
|
+ &GFXSPEC_tSpecification_AndroidMed, &GFXSPEC_tSpecification_AndroidHigh,
|
|
|
&GFXSPEC_tSpecification_AndroidHighest,
|
|
|
};
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
GFXSPEC_Specification *GFXSPEC_pSpecification;
|
|
|
char CGFXSpec::s_cDeviceAnalyticsString[512];
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
-//0018F3F0
|
|
|
+// 0018F3F0
|
|
|
+extern "C" {
|
|
|
+// 0018F3F0
|
|
|
extern "C" {
|
|
|
bool sub_18F3F0(CFTTXmlReaderNode *pXmlNode0, const char *pName, int *pOut) {
|
|
|
+ CFTTXmlReaderNode xmlnode_C = pXmlNode0->GetFirstChild(pName);
|
|
|
+ if (!xmlnode_C.IsValid()) return false;
|
|
|
+
|
|
|
+ char *r0_text = CXmlUtil::GetText(xmlnode_C);
|
|
|
+ if (r0_text == nullptr) return false;
|
|
|
+
|
|
|
+ *pOut = atoi(r0_text);
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
-//0018E728 经过单元测试,功能正常
|
|
|
+// 0018E728 经过单元测试,功能正常
|
|
|
void CGFXSpec::Initialise() {
|
|
|
// 只保留android相关的代码,ios的忽略
|
|
|
- //SYS_GetHardwareType();
|
|
|
+ // SYS_GetHardwareType();
|
|
|
|
|
|
- //locret_18E80A return
|
|
|
+ // locret_18E80A return
|
|
|
LOGI("CGFXSpec::Initialise End");
|
|
|
}
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
-//0018E878 经过单元测试,功能正常
|
|
|
-void CGFXSpec::Platform_InspectDevice() {
|
|
|
- LOGI("CGFXSpec::Platform_InspectDevice: Entry");
|
|
|
+// 0018EEF4 //^_- 经过单元测试,功能正常
|
|
|
+void CGFXSpec::UpdateGraphicsFromConfig(CFTTXmlReaderNode *pXmlNode) {
|
|
|
+ char pbuf_134[256];
|
|
|
+ CFTTAndroidDevice::GetDeviceType(pbuf_134, 256, false);
|
|
|
+
|
|
|
+ char pbuf_234[256];
|
|
|
+ CFTTAndroidDevice::GetDeviceType(pbuf_234, 256, true); // 0018EF26
|
|
|
+
|
|
|
+ float fs16 = 0.01;
|
|
|
+ int dInt_240, dr1;
|
|
|
+
|
|
|
+ for (CFTTXmlReaderNode xmlnode_238 = pXmlNode->GetFirstChild("Spec");
|
|
|
+ xmlnode_238.IsValid();
|
|
|
+ xmlnode_238 = xmlnode_238.GetNextSibling("Spec")) {
|
|
|
+ // loc_18EF82
|
|
|
+ CFTTXmlReaderNode xmlnode_23C = xmlnode_238.GetFirstChild("Model");
|
|
|
+ bool r5_isvalid = xmlnode_23C.IsValid();
|
|
|
+ if (!xmlnode_23C.IsValid()) //注意此处的逻辑与原始的汇编略有区别 loc_18F000
|
|
|
+ continue;
|
|
|
+
|
|
|
+ while (xmlnode_23C.IsValid()) {
|
|
|
+ // 0018EFA8
|
|
|
+ char *r8_text = CXmlUtil::GetText(xmlnode_23C);
|
|
|
+ if (r8_text != nullptr &&
|
|
|
+ (strcmp(r8_text, pbuf_134) == 0 || strcmp(r8_text, pbuf_234) == 0)) {
|
|
|
+ // loc_18F006
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ xmlnode_23C = xmlnode_23C.GetNextSibling("Model");
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18F000 此处的判断被我移到上去面了
|
|
|
+ // loc_18F006
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "fLODMultGame", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->fLODMultGame_4 = (float)dInt_240 * (float)0.01;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "fLODMultNIS", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->fLODMultNIS_8 = (float)dInt_240 * (float)0.01;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "fRTTScaleFactorX", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->fRTTScaleFactorX_C =
|
|
|
+ (float)dInt_240 * (float)0.01;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "fRTTScaleFactorY", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->fRTTScaleFactorY_10 =
|
|
|
+ (float)dInt_240 * (float)0.01;
|
|
|
+
|
|
|
+ // loc_18F086
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "iAtlasWidth", &dInt_240)) {
|
|
|
+ dr1 = 256;
|
|
|
+ if (!dInt_240) dr1 = 128;
|
|
|
+ GFXSPEC_pSpecification->iAtlasWidth_14 = dr1;
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18F0A4
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "iAtlasHeight", &dInt_240)) {
|
|
|
+ dr1 = 256;
|
|
|
+ if (!dInt_240) dr1 = 128;
|
|
|
+ GFXSPEC_pSpecification->iAtlasHeight_18 = dr1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "iKitTexFormat", &dInt_240)) {
|
|
|
+ dr1 = 3;
|
|
|
+ if (!dInt_240) dr1 = 2;
|
|
|
+ GFXSPEC_pSpecification->iKitTexFormat_1C = dr1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "iKitDims", &dInt_240)) {
|
|
|
+ dr1 = 512;
|
|
|
+ if (!dInt_240) dr1 = 256;
|
|
|
+ GFXSPEC_pSpecification->iKitDims_20 = dr1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bSoftShadows", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bSoftShadows_24 = br1;
|
|
|
+ }
|
|
|
|
|
|
- //loc_18EE76
|
|
|
- LOGI("CGFXSpec::Platform_InspectDevice");
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bEnvObjectShadows", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bEnvObjectShadows_25 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bGameplayStadium", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bGameplayStadium_26 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bCrowdAnimated", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bCrowdAnimated_27 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bDropTexMips", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bDropTexMips_28 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "eEnableDOF", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->eEnableDOF_2C = dInt_240;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bEnableDepthFog", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bEnableDepthFog_30 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bEnableReflection", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bEnableReflection_31 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bEnableGodRays", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = 1;
|
|
|
+ GFXSPEC_pSpecification->bEnableGodRays_32 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bHighQualityNet", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bHighQualityNet_33 = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "pVHSShader", &dInt_240)) {
|
|
|
+ const char *r0_2d_vh = "2d_vhsbasic";
|
|
|
+
|
|
|
+ if (dInt_240 != 1) r0_2d_vh = nullptr;
|
|
|
+
|
|
|
+ if (dInt_240 == 2) r0_2d_vh = "2d_vhsfancy";
|
|
|
+ GFXSPEC_pSpecification->pVHSShader_38 = r0_2d_vh;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bHighQualityGroundShadows", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bHighQualityGroundShadows_3C = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bFloatEnvMap", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bFloatEnvMap_3E = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bDynNormMap", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bDynNormMap_3F = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "b3DGrass", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->b3DGrass_3D = br1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "eHighQualityGrass", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->eHighQualityGrass_48 =
|
|
|
+ (EPitchShader_Quality)dInt_240;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "eAntiAliasing", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->eAntiAliasing_40 = dInt_240;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "eCrowdQuality", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->eCrowdQuality_4C = dInt_240;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "ePlayerLightingQuality", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->ePlayerLightingQuality_44 =
|
|
|
+ (EPlayerShader_Quality)dInt_240;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "iMinMaxResolution", &dInt_240))
|
|
|
+ GFXSPEC_pSpecification->iMinMaxResolution_50 = dInt_240;
|
|
|
+
|
|
|
+ if (sub_18F3F0(&xmlnode_238, "bForce16Bit", &dInt_240)) {
|
|
|
+ bool br1 = false;
|
|
|
+ if (dInt_240) br1 = true;
|
|
|
+ GFXSPEC_pSpecification->bForce16Bit_54 = br1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ CGFXSpec::ApplyResolutionClamp(pXmlNode);
|
|
|
}
|
|
|
-//-------------------------------------------------------------------------------------------------
|
|
|
-//0018EEF4 //^_- 经过单元测试,功能正常
|
|
|
-void CGFXSpec::UpdateGraphicsFromConfig(CFTTXmlReaderNode *pXmlNode) {
|
|
|
- LOGI("CGFXSpec::UpdateGraphicsFromConfig entry");
|
|
|
+
|
|
|
+// 0018E878 经过单元测试,功能正常
|
|
|
+void CGFXSpec::Platform_InspectDevice() {
|
|
|
+ bool bGL_OES_depth_texture_B58, bHighFloat_B60, bIsGLES3_B50;
|
|
|
+
|
|
|
+ int r7_dCpuCoreCount = CFTTDevice::GetCPUCoreCount();
|
|
|
+ int r0_dRendererType =
|
|
|
+ g_pGraphicsDevice->GetRendererType(); // OGLES=0; OGLES3=4; Vulkan=3
|
|
|
+
|
|
|
+ // 0018E8A2
|
|
|
+ if (r0_dRendererType == 4) { // OGLES3
|
|
|
+ // loc_18E8D0
|
|
|
+ if (g_pGraphicsDevice->bGL_OES_depth_texture_D)
|
|
|
+ bGL_OES_depth_texture_B58 = true;
|
|
|
+ else
|
|
|
+ bGL_OES_depth_texture_B58 = false;
|
|
|
+
|
|
|
+ if (g_pGraphicsDevice->bHighFloat_C)
|
|
|
+ bHighFloat_B60 = true;
|
|
|
+ else
|
|
|
+ bHighFloat_B60 = false;
|
|
|
+
|
|
|
+ // loc_18E8F0
|
|
|
+ bIsGLES3_B50 = true;
|
|
|
+ } else if (r0_dRendererType == 3) { // 0018E8A8 Vulkan
|
|
|
+ // loc_18E8E8
|
|
|
+ bGL_OES_depth_texture_B58 = true;
|
|
|
+ bHighFloat_B60 = true;
|
|
|
+ bIsGLES3_B50 = true;
|
|
|
+ } else if (r0_dRendererType != 0) {
|
|
|
+ // loc_18E8F4
|
|
|
+ bGL_OES_depth_texture_B58 = false;
|
|
|
+ bHighFloat_B60 = false;
|
|
|
+ bIsGLES3_B50 = false;
|
|
|
+ } else {
|
|
|
+ // 0018E8AE
|
|
|
+ if (g_pGraphicsDevice->bGL_OES_depth_texture_D)
|
|
|
+ bGL_OES_depth_texture_B58 = true;
|
|
|
+ else
|
|
|
+ bGL_OES_depth_texture_B58 = false;
|
|
|
+
|
|
|
+ if (g_pGraphicsDevice->bHighFloat_C)
|
|
|
+ bHighFloat_B60 = true;
|
|
|
+ else
|
|
|
+ bHighFloat_B60 = false;
|
|
|
+
|
|
|
+ if (g_pGraphicsDevice->bIsGLES3_B)
|
|
|
+ bIsGLES3_B50 = true;
|
|
|
+ else
|
|
|
+ bIsGLES3_B50 = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18E900
|
|
|
+ int r5_dWidth = g_pGraphicsDevice->width(); // 0018E908
|
|
|
+ int r8_dHeight = g_pGraphicsDevice->height(); // 0018E916
|
|
|
+ int iRAMKb_B6C = AndroidApp_GetTotalRAMInKB(); // 0018E92A
|
|
|
+
|
|
|
+ char buf_428[1024];
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "Core Count: %d\n", r7_dCpuCoreCount); // 0018E93A
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018E954
|
|
|
+
|
|
|
+ const char *pr3 = "NO";
|
|
|
+ if (bIsGLES3_B50) {
|
|
|
+ pr3 = "YES";
|
|
|
+ }
|
|
|
+
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "GLES3: %s\n", pr3); // 0018E974
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018E97E
|
|
|
+
|
|
|
+ pr3 = "NO";
|
|
|
+ if (bHighFloat_B60) {
|
|
|
+ pr3 = "YES";
|
|
|
+ }
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "Highp in FS: %s\n", pr3); // 0018E994
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018E99E
|
|
|
+
|
|
|
+ // 0018E9A0
|
|
|
+ if (r5_dWidth > r8_dHeight) r5_dWidth = r8_dHeight;
|
|
|
+
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "Smaller Res: %d\n", r5_dWidth); // 0018E9B4
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018E9BE
|
|
|
+
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "RAM: %dKB\n", iRAMKb_B6C); // 0018E9D0
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018E9DA
|
|
|
+
|
|
|
+ pr3 = "NO";
|
|
|
+ if (bGL_OES_depth_texture_B58) {
|
|
|
+ pr3 = "YES";
|
|
|
+ }
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "Depth Texture Supported: %s\n", pr3); // 0018E9F0
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018E9FA
|
|
|
+
|
|
|
+ int dr0 = bGL_OES_depth_texture_B58 ^ 1; // 0018E9FE
|
|
|
+ if (r7_dCpuCoreCount == 1) {
|
|
|
+ dr0++;
|
|
|
+ }
|
|
|
+
|
|
|
+ int r4_dNegatives = dr0 + (bHighFloat_B60 ^ 1);
|
|
|
+ if (iRAMKb_B6C < (600 * 1024)) // 0018EA0A
|
|
|
+ r4_dNegatives++;
|
|
|
+
|
|
|
+ if (iRAMKb_B6C < (900 * 1024)) // 0018EA1A
|
|
|
+ r4_dNegatives++;
|
|
|
+
|
|
|
+ if (r5_dWidth < 640) r4_dNegatives++;
|
|
|
+
|
|
|
+ if (CFTTAndroidDevice::GetSDKVersion() < 20) // 0018EA30
|
|
|
+ r4_dNegatives++;
|
|
|
+
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "Negatives: %d\n", r4_dNegatives); // 0018EA42
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018EA4C
|
|
|
+
|
|
|
+ dr0 = 0;
|
|
|
+ if (r7_dCpuCoreCount > 3) dr0 = 1; // 0018EA54
|
|
|
+
|
|
|
+ // 0018EA56
|
|
|
+ if (iRAMKb_B6C > (1536 * 1024)) dr0++;
|
|
|
+
|
|
|
+ int r5_dPositives = dr0;
|
|
|
+ if (dr0 < 2) r5_dPositives = 2;
|
|
|
+
|
|
|
+ if (!bIsGLES3_B50) r5_dPositives = dr0;
|
|
|
+
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "Positives: %d\n", r5_dPositives); // 0018EA7A
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000); // 0018EA84
|
|
|
+
|
|
|
+ EAndroidGraphicsSettingsQuality r10_eQuality;
|
|
|
+ if (r4_dNegatives >= 2) {
|
|
|
+ // 0018EA8A
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "AGS_QUALITY_SETTING_FAST auto-chosen\n");
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ r10_eQuality = EAndroidGraphicsSettingsQuality_FAST; // 0018EAA8
|
|
|
+ } else {
|
|
|
+ // loc_18EAAE
|
|
|
+ if (r5_dPositives >= 2 && r4_dNegatives != 1) {
|
|
|
+ // 0018EAB6
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "AGS_QUALITY_SETTING_HIGH auto-chosen");
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ r10_eQuality = EAndroidGraphicsSettingsQuality_HIGH;
|
|
|
+ } else {
|
|
|
+ // loc_18EADA
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 1024, "AGS_QUALITY_SETTING_BALANCED auto-chosen");
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ r10_eQuality = EAndroidGraphicsSettingsQuality_BALANCED;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18EAFC
|
|
|
+ char buf_model_628[512];
|
|
|
+ memset(buf_model_628, 0, 512);
|
|
|
+ CFTTDevice::GetModel(buf_model_628, 512); // 0018EB06
|
|
|
+
|
|
|
+ int var_92C = -1;
|
|
|
+ char buf_728[256];
|
|
|
+ memset(buf_728, 0, 256);
|
|
|
+ CFTTAndroidDevice::GetDeviceType(buf_728, 256, false); // 0018EB1C
|
|
|
+
|
|
|
+ char buf_828[256];
|
|
|
+ memset(buf_828, 0, 256);
|
|
|
+ CFTTAndroidDevice::GetDeviceType(buf_828, 256, true); // 0018EB2A
|
|
|
+
|
|
|
+ wchar_t wgpuname_B2C[256];
|
|
|
+ memset(wgpuname_B2C, 0, sizeof(wchar_t) * 256);
|
|
|
+ g_pGraphicsDevice->GetGPUName(wgpuname_B2C, 256); // 0018EB3C
|
|
|
+
|
|
|
+ char gpuname_928[256];
|
|
|
+ memset(gpuname_928, 0, 256);
|
|
|
+ UnicodeToAscii(gpuname_928, wgpuname_B2C, 256, '_'); // 0018EB4A
|
|
|
+
|
|
|
+ CGPUDatabaseMode tGPUDatabase_B44;
|
|
|
+ tGPUDatabase_B44.dEnabled_0 = 0;
|
|
|
+ tGPUDatabase_B44.dMinSamples_4 = 5;
|
|
|
+ tGPUDatabase_B44.dMetric_8 = 0;
|
|
|
+ tGPUDatabase_B44.dMed_C = 1500;
|
|
|
+ tGPUDatabase_B44.dHigh_10 = 3500;
|
|
|
+ tGPUDatabase_B44.dVHigh_14 = 8000;
|
|
|
+
|
|
|
+ EAndroidGraphicsSettingsQuality dr7;
|
|
|
+ EAndroidGraphicsSettingsQuality var_B60;
|
|
|
+ EAndroidGraphicsSettingsQuality r8_eQuality = STORY_GetGfxQualityOverride(
|
|
|
+ buf_728, buf_828, gpuname_928, tGPUDatabase_B44);
|
|
|
+
|
|
|
+ // 0018EB76
|
|
|
+ if (r8_eQuality == EAndroidGraphicsSettingsQuality_FAST ||
|
|
|
+ r8_eQuality == EAndroidGraphicsSettingsQuality_BALANCED ||
|
|
|
+ r8_eQuality == EAndroidGraphicsSettingsQuality_HIGH) {
|
|
|
+ // 0018EB84
|
|
|
+ snprintf(
|
|
|
+ buf_428, 1024,
|
|
|
+ "Graphics quality auto choice overridden by config. Was %d, now %d.\n",
|
|
|
+ r10_eQuality, r8_eQuality);
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ dr7 = r8_eQuality;
|
|
|
+ var_B60 = EAndroidGraphicsSettingsQuality_ERR;
|
|
|
+ } else {
|
|
|
+ // loc_18EBB2
|
|
|
+ var_B60 = (EAndroidGraphicsSettingsQuality)
|
|
|
+ CFTTAndroidGraphicsSettings::ApplyGPUDatabaseOverride(
|
|
|
+ "PKG:data/x_android/gpu_db.dat", buf_model_628, tGPUDatabase_B44,
|
|
|
+ r10_eQuality,
|
|
|
+ var_92C); // 0018EBC2
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ // 0018EBCA
|
|
|
+ if (var_92C != -1) {
|
|
|
+ // 0018EBCE
|
|
|
+ if (var_B60 == r10_eQuality) {
|
|
|
+ // 0018EBD4
|
|
|
+ snprintf(buf_428, 1024,
|
|
|
+ "Graphics quality unchanged by GPU Database. Score %d, "
|
|
|
+ "Quality %d.\n",
|
|
|
+ var_92C, r10_eQuality);
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ r8_eQuality = EAndroidGraphicsSettingsQuality_ERR;
|
|
|
+ var_B60 = r10_eQuality;
|
|
|
+ // MOV R7, R10
|
|
|
+ dr7 = r10_eQuality;
|
|
|
+ } else {
|
|
|
+ // loc_18EC74
|
|
|
+ snprintf(buf_428, 1024,
|
|
|
+ "Graphics quality auto choice overridden by GPU Database. Was "
|
|
|
+ "%d, now %d. Score=%d.\n",
|
|
|
+ r10_eQuality, var_B60, var_92C);
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ r8_eQuality = EAndroidGraphicsSettingsQuality_ERR;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // loc_18EC00 未知设备
|
|
|
+ snprintf(buf_428, 1024,
|
|
|
+ "Device %s not present in Android database or insufficient "
|
|
|
+ "samples.\n",
|
|
|
+ buf_model_628);
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ r8_eQuality = EAndroidGraphicsSettingsQuality_ERR;
|
|
|
+ var_B60 = EAndroidGraphicsSettingsQuality_ERR;
|
|
|
+ dr7 = r10_eQuality;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18EC9E
|
|
|
+ EAndroidGraphicsSettingsFPS r6_eFPS = EAndroidGraphicsSettingsFPS_2;
|
|
|
+ GFXSPEC_pSpecification = list_Specification_323214[dr7];
|
|
|
+ if (GFXSPEC_pSpecification->dFPS_0 == 30) {
|
|
|
+ r6_eFPS = EAndroidGraphicsSettingsFPS_1;
|
|
|
+ }
|
|
|
+
|
|
|
+ CFTTAndroidGraphicsSettings::SetFPSAutoChoice(r6_eFPS); // 0018ECBE
|
|
|
+
|
|
|
+ bool var_B49[5];
|
|
|
+ var_B49[0] = var_B49[1] = var_B49[2] = true;
|
|
|
+ var_B49[3] = dr7 > EAndroidGraphicsSettingsQuality_FAST;
|
|
|
+ var_B49[4] = dr7 > EAndroidGraphicsSettingsQuality_BALANCED;
|
|
|
+ CFTTAndroidGraphicsSettings::SetQualityChoice(dr7, &var_B49[0]);
|
|
|
+
|
|
|
+ bool r10_bFPS = GFXSPEC_pSpecification->dFPS_0 == 30; // 0018ECFC
|
|
|
+
|
|
|
+ EAndroidGraphicsSettingsQuality dUS_dr11 = (EAndroidGraphicsSettingsQuality)
|
|
|
+ CFTTAndroidGraphicsSettings::GetUserSetting(
|
|
|
+ EAndroidGraphicsSettingsOption_1);
|
|
|
+ EAndroidGraphicsSettingsQuality dUS_dr4 = (EAndroidGraphicsSettingsQuality)
|
|
|
+ CFTTAndroidGraphicsSettings::GetUserSetting(
|
|
|
+ EAndroidGraphicsSettingsOption_0);
|
|
|
+ EAndroidGraphicsSettingsQuality dUS_dr5 = (EAndroidGraphicsSettingsQuality)
|
|
|
+ CFTTAndroidGraphicsSettings::GetUserSetting(
|
|
|
+ EAndroidGraphicsSettingsOption_2);
|
|
|
+
|
|
|
+ // 0018ED1C
|
|
|
+ if (dUS_dr11 && dUS_dr11 != dr7) {
|
|
|
+ // 0018ED28
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 0x400, "User overridden quality choice. Was %d, now %d",
|
|
|
+ dr7, dUS_dr11);
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ GFXSPEC_pSpecification = list_Specification_323214[dUS_dr11];
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18ED5A //??? eFPS 及dUS_dr4
|
|
|
+ // 类型都应该没有错,但是在这儿却做了比较,暂时只能这么写了
|
|
|
+ if (dUS_dr4 && dUS_dr4 != (EAndroidGraphicsSettingsQuality)r6_eFPS) {
|
|
|
+ // 0018ED60
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 0x400, "User overridden fps choice. Was %d, now %d",
|
|
|
+ r6_eFPS, dUS_dr4);
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+ r10_bFPS = dUS_dr4 == EAndroidGraphicsSettingsQuality_FAST;
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18ED8C
|
|
|
+ int dr3 = 60;
|
|
|
+ if (r10_bFPS) dr3 = 30;
|
|
|
+
|
|
|
+ GFXSPEC_pSpecification->dFPS_0 = dr3;
|
|
|
+ snprintf(s_cDeviceAnalyticsString, 512, "%s,%d,%d,%d,%d,%d,%d,%d",
|
|
|
+ buf_model_628, r10_eQuality, r8_eQuality, var_B60, var_92C, dUS_dr11,
|
|
|
+ dUS_dr4,
|
|
|
+ dUS_dr5); // 0018EDC4
|
|
|
+
|
|
|
+ // 0018EDD8
|
|
|
+ memset(buf_428, 0, 1024);
|
|
|
+ snprintf(buf_428, 0x400u, "Analytics String:%s\n", s_cDeviceAnalyticsString);
|
|
|
+ strlcat(s_cDeviceReport, buf_428, 0x1000);
|
|
|
+
|
|
|
+ // 0018EDE8
|
|
|
+ if (!bGL_OES_depth_texture_B58) {
|
|
|
+ GFXSPEC_pSpecification->bEnableDepthFog_30 = false;
|
|
|
+ GFXSPEC_pSpecification->eEnableDOF_2C = 1;
|
|
|
+ GFXSPEC_pSpecification->bEnableGodRays_32 = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18EDFE
|
|
|
+ if (g_pGraphicsDevice->GetRendererType() == 0 ||
|
|
|
+ g_pGraphicsDevice->GetRendererType() == 4) {
|
|
|
+ // loc_18EE1A
|
|
|
+ if (!g_pGraphicsDevice->field_24) {
|
|
|
+ GFXSPEC_pSpecification->eEnableDOF_2C = true;
|
|
|
+ GFXSPEC_pSpecification->bSoftShadows_24 = false;
|
|
|
+ GFXSPEC_pSpecification->bEnableDepthFog_30 = false;
|
|
|
+ GFXSPEC_pSpecification->bEnableReflection_31 = false;
|
|
|
+ GFXSPEC_pSpecification->bEnableGodRays_32 = false;
|
|
|
+ GFXSPEC_pSpecification->pVHSShader_38 = "2d_vhsbasic";
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18EE3C &&
|
|
|
+ if (g_pGraphicsDevice->bMapbuffer_9) {
|
|
|
+ // 0018EE42
|
|
|
+ if (g_pGraphicsDevice->field_20) {
|
|
|
+ if (g_pGraphicsDevice->field_20 == 1) {
|
|
|
+ GFXSPEC_pSpecification->fLODMultGame_4 = 1.8f;
|
|
|
+ GFXSPEC_pSpecification->fLODMultNIS_8 = 1.2f;
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // loc_18EE60
|
|
|
+ GFXSPEC_pSpecification->fLODMultGame_4 = 3.0f;
|
|
|
+ GFXSPEC_pSpecification->fLODMultNIS_8 = 1.5f;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // loc_18EE50
|
|
|
+ if (g_pGraphicsDevice->field_20) {
|
|
|
+ // 0018EE52
|
|
|
+ if (g_pGraphicsDevice->field_20 == 1) {
|
|
|
+ // 0018EE48
|
|
|
+ GFXSPEC_pSpecification->fLODMultGame_4 = 2.3f;
|
|
|
+ GFXSPEC_pSpecification->fLODMultNIS_8 = 2.0f;
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // loc_18EE6A
|
|
|
+ GFXSPEC_pSpecification->fLODMultGame_4 = 4.3f;
|
|
|
+ GFXSPEC_pSpecification->fLODMultNIS_8 = 3.0f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // loc_18EE70
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_18EE76
|
|
|
}
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
-//0018F41C //^_^
|
|
|
+// 0018F41C //^_^
|
|
|
void CGFXSpec::ApplyResolutionClamp(CFTTXmlReaderNode *pXmlNode) {
|
|
|
- //locret_18F4C6
|
|
|
+ // locret_18F4C6
|
|
|
+ LOGE(" CGFXSpec::ApplyResolutionClamp%p",pXmlNode);
|
|
|
}
|
|
|
//-------------------------------------------------------------------------------------------------
|