Advertisement
Guest User

Untitled

a guest
Jan 31st, 2025
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.38 KB | None | 0 0
  1. #############################################################################
  2. #
  3. # Logging settings
  4. #
  5.  
  6. set logGroup "ConfigurationManager"
  7. set logLevelWarning warning
  8. set logLevelInfo info
  9. set logLevelDebug debug
  10.  
  11. log $logGroup $logLevelInfo "Parsing configuration script"
  12.  
  13.  
  14. #############################################################################
  15. #
  16. # Constants
  17. #
  18.  
  19. seti Off 0
  20. seti On 1
  21.  
  22. seti Low 1
  23. seti Medium 2
  24. seti High 3
  25.  
  26. seti MediumButDefaultLow 4
  27.  
  28. seti memoryLevelHigh 512
  29. seti memoryLevelMedium 384
  30. seti memoryLevelLow 256
  31. seti memoryLevelUnknown 0
  32.  
  33. seti cpuLevelHigh 2800
  34. seti cpuLevelMedium 2200
  35. seti cpuLevelLow 1450
  36. seti cpuLevelUnsupported 0
  37.  
  38.  
  39. #############################################################################
  40. #
  41. # Identify gfx device
  42. #
  43.  
  44. # set some config variables based on a card table and vendor specific rules
  45. # sets isCardFound, cardVendor, and cardName
  46. include "Video Cards.sgr"
  47.  
  48. # Fallback on the card name text supplied by the card itself.
  49. # Assumes that at least the cardVendor has been matched, since
  50. # vendor name is not contained in some vendor card names.
  51. # Note that specific vendors are overridden to a default card.
  52. # For ATI -> Radeon 9800 Pro
  53. # For NVIDIA -> NVIDIA 4800 TI SE
  54. if (not $isCardFound)
  55. set cardName $cardNameText
  56. endif
  57.  
  58.  
  59.  
  60. #############################################################################
  61. #
  62. # Configuration override controlled by command line option -cardConfig.
  63. #
  64. if (varExists(cardConfig))
  65. # test unsupported cards using sw rendering
  66. if ($cardConfig = 1)
  67. log $logGroup $logLevelInfo "Testing with all devices unsupported."
  68. set cardVendor TestingAllUnsupported
  69. set cardName TestingAllUnsupported
  70.  
  71. elseif (($cardConfig = 2) and ($deviceNumber = 0))
  72. log $logGroup $logLevelInfo "Testing with the first device unsupported."
  73. set cardVendor TestingFirstUnsupported
  74. set cardName TestingFirstUnsupported
  75.  
  76. elseif (($cardConfig = 3) and ($deviceNumber != 0))
  77. log $logGroup $logLevelInfo "Testing with the all devices except first unsupported."
  78. set cardVendor TestingAllButFirstUnsupported
  79. set cardName TestingAllButFirstUnsupported
  80.  
  81. elseif (($cardConfig = 100) and ($deviceNumber = 0))
  82. log $logGroup $logLevelInfo "Testing first device as swvp only part."
  83. boolProp forceSoftwareVP true
  84. endif
  85. endif
  86.  
  87.  
  88.  
  89. #############################################################################
  90. #
  91. # Determine if gfx device is supported, force software rendering if not
  92. #
  93.  
  94. setb useSoftwareRasterizer false
  95.  
  96. if (match("${cardVendor}", "ATI"))
  97. if (match("${cardName}", "*Mach*") or match("${cardName}", "*Rage*"))
  98. setb useSoftwareRasterizer true
  99. endif
  100.  
  101. elseif (match("${cardVendor}", "NVidia"))
  102. if (match("${cardName}", "NV 1") or match("${cardName}", "NV 2") or match("${cardName}", "*Riva*") or match("${cardName}", "*TNT*"))
  103. setb useSoftwareRasterizer true
  104. endif
  105.  
  106. elseif (match("${cardVendor}", "Intel"))
  107. if (match("${cardName}", "*810*") or match("${cardName}", "*815*") or match("${cardName}", "*740*") or match("${cardName}", "*752*"))
  108. setb useSoftwareRasterizer true
  109. endif
  110.  
  111. elseif (match("${cardVendor}", "S3"))
  112. if (not match("${cardName}", "*Chrome*"))
  113. setb useSoftwareRasterizer true
  114. endif
  115.  
  116. else
  117. # unsupported/unknown vendor
  118. setb useSoftwareRasterizer true
  119.  
  120. endif
  121.  
  122. if ($useSoftwareRasterizer)
  123. log $logGroup $logLevelWarning "Unsupported video card. Forcing software rendering on this device"
  124. else
  125. log $logGroup $logLevelInfo "Supported video card."
  126. endif
  127.  
  128. if (not $useSoftwareRasterizer)
  129. # failed to obtain device texture memory size, force to 32MB
  130. if ($textureMemory = 0)
  131. seti textureMemory 32
  132. setb textureMemorySizeOK false
  133. endif
  134.  
  135. if ($textureMemory < 28)
  136. log $logGroup $logLevelWarning "Insufficient video memory. Forcing software rendering on this device"
  137.  
  138. # require a card with at least 32MB
  139. setb useSoftwareRasterizer true
  140. endif
  141. endif
  142.  
  143. if ($useSoftwareRasterizer)
  144. # ignore texture memory reported by gfx device, this is not hardware texture memory
  145. seti textureMemory 32
  146. endif
  147.  
  148. if (not $useSoftwareRasterizer)
  149. log $logGroup $logLevelInfo "Hardware rendering is enabled"
  150. endif
  151.  
  152.  
  153.  
  154. #############################################################################
  155. #
  156. # Apply gfx device specific workarounds
  157. #
  158. # Available device props:
  159. # forceSoftwareVP
  160. # forceSoftwareDevice
  161. # queriesOK
  162. # windowedModeFormatConversionOK
  163. # enumerateMultisampleLevels
  164. # skipValidateDevice
  165. # enableDriverMemoryManager
  166. # softwareDeviceLocalVideoMemorySize
  167. # deviceLocalVideoMemorySizeDefault
  168. # disableVSyncSupport
  169. # substituteFlipForDiscardSwapEffect
  170. # minTextureDimensionForBalance
  171. #
  172. # Additional props:
  173. # vs2LoopsFunctional
  174.  
  175. setb textureMemorySizeOK true
  176. setb supportsDirtyRect true
  177. setb supportsTurboRect true
  178. setb supportsSpecialEventCamera true
  179. setb forceLowSettings false
  180. setb forceLowResolution false
  181. setb defaultLowResolution false
  182. setb forceMediumMaterialDetail false
  183. setb isIntegratedChipset false
  184. setb forceMediumShadows false
  185. setb forceMediumObjectDetail false
  186.  
  187. boolProp useRenderTextures false
  188. uintProp antialiasingSupport 1
  189.  
  190.  
  191. if (not $useSoftwareRasterizer)
  192.  
  193. # never trust the driver to manage its own memory
  194. boolProp enableDriverMemoryManager false
  195.  
  196. boolProp vs2LoopsFunctional false
  197. boolProp presentWorkaround false
  198. boolProp enumerateMultisampleLevels true
  199.  
  200. # not enough texture memory for antialiasing
  201. if ($textureMemory < 127)
  202. boolProp enumerateMultisampleLevels false
  203. endif
  204.  
  205. if (match("${cardVendor}", "NVIDIA"))
  206. if ($driverBuild <= 7776)
  207. boolProp vs2LoopsFunctional true
  208. endif
  209.  
  210. # on NVidia cards, create a dummy texture on device creation to prevent BSODs
  211. boolProp createNVidiaWorkaroundTexture true
  212.  
  213. if ($appControlledAA)
  214. # nvidia drivers handle offscreen aa
  215. uintProp antialiasingSupport 3
  216. else
  217. # remove this when the texture manager balancing is fixed.
  218. boolProp disableTexMemEstimateAdjustment true
  219.  
  220. # turn off dirty rects
  221. uintProp antialiasingSupport 1
  222. setb supportsDirtyRect false
  223. endif
  224.  
  225. if (match("${cardName}", "*GeForce2*Integrated*") or match("${cardName}", "*GeForce?2*Integrated*") or match("${cardName}", "*GeForce4*Integrated*") or match("${cardName}", "*GeForce?4*Integrated*"))
  226. boolProp causticsEnabled false
  227. boolProp enumerateMultisampleLevels false
  228.  
  229. setb forceLowSettings true
  230. setb forceLowResolution true
  231. endif
  232.  
  233. # the 6200 Turbo Cache peformed very poorly in CATLAB runs for EP2
  234. if (match("${cardName}", "GeForce 6200 TC") or match("${cardName}", "*6100*"))
  235. setb forceLowSettings true
  236. setb defaultLowResolution true
  237. endif
  238.  
  239. # disable shaders by default for NV3x generation, only enable for high end cards
  240. if ($maxVertexProgramVersionHWMajor = 2)
  241. boolProp useShaders false
  242.  
  243. if (match("${cardName}", "GeForceFX*") or match("${cardName}", "*GeForce?FX*"))
  244. if (match("${cardName}", "*57?0*") or match("${cardName}", "*58?0*") or match("${cardName}", "*59?0*"))
  245. boolProp useShaders true
  246.  
  247. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x"
  248. endif
  249. if (match("${cardName}", "*NV35*") or match("${cardName}", "*NV36*") or match("${cardName}", "*NV38*") or match("${cardName}", "*NV39*"))
  250. boolProp useShaders true
  251.  
  252. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x"
  253. endif
  254.  
  255. # 5700 cards sometimes have problems with bump mapping so setting default to medium
  256. if (match("${cardName}", "*5700*"))
  257. log $logGroup $logLevelInfo "Forcing Medium Material detail on 5700"
  258. setb forceMediumMaterialDetail true
  259. endif
  260.  
  261. if (match("${cardName}", "*5700LE*"))
  262. log $logGroup $logLevelInfo "Forcing low settings on 5700LE and 6100"
  263. setb forceLowSettings true
  264. endif
  265.  
  266. if (match("${cardName}", "*5800*"))
  267. log $logGroup $logLevelInfo "Disabling caustics on 5800"
  268. boolProp causticsEnabled false
  269. endif
  270. endif
  271.  
  272. if (match("${cardName}", "QuadroFX*") or match("${cardName}", "*Quadro?FX*"))
  273. if (match("${cardName}", "*3000*") or match("${cardName}", "*1?00*"))
  274. boolProp useShaders true
  275.  
  276. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x Quadro"
  277. endif
  278. endif
  279.  
  280. # caps read vs 3.0, but dx9b is returning vs 2.0, once 9c is used this fix can be removed
  281. if (match("${cardName}", "*GeForce*"))
  282. if (match("${cardName}", "*68?0*"))
  283. boolProp useShaders true
  284.  
  285. log $logGroup $logLevelInfo "Enabling shaders for high-end NV40 Parts on Dx9b"
  286. endif
  287. endif
  288. endif
  289.  
  290. if ($driverBuild <= 5216)
  291. # turn off antialiasing to avoid BSODs on older drivers
  292. boolProp enumerateMultisampleLevels false
  293.  
  294. log $logGroup $logLevelInfo "Driver is too old. Disabling AA on this device."
  295. endif
  296.  
  297. if (($driverBuild < 5212) and ($maxPixelProgramVersionMajor < 2))
  298. # turn off cinematics on older drivers with DX8 cards to avoid failed copies
  299. setb supportsSpecialEventCamera false
  300.  
  301. log $logGroup $logLevelInfo "Driver is too old. Disabling SpecialEventCameras on this device."
  302. endif
  303.  
  304. if ($maxVertexProgramVersionHWMajor = 0)
  305. boolProp skipValidateDevice true
  306.  
  307. log $logGroup $logLevelInfo "Enabling D3DERR_CONFLICTINGRENDERSTATE validation workaround"
  308. endif
  309.  
  310. if ($driverBuild > 5216 and $driverBuild < 6176)
  311. # force SWVP on 2D vertex shader to work around UI and shadow rendering
  312. # bugs; known to occur on GeForce4, Quadro4, and FX5200 on driver versions
  313. # 56.56 and 56.72; known not to occur with FX5800+ or with 52.16 or
  314. # 61.76 drivers.
  315. boolProp draw2DForceSWVP true
  316. endif
  317.  
  318. elseif (match("${cardVendor}", "ATI"))
  319. # loops support broken in 6458. Fixed in catalyst 4.9 (6476) but we require 4.10 to be safe.
  320. if ($driverBuild >= 6476)
  321. boolProp vs2LoopsFunctional true
  322. endif
  323.  
  324. # workaround for forced aa crash as of 6458. Fixed in catalyst 4.9 (6476) but we require 4.10 to be safe.
  325. # TODO: this is not yet enabled, pending testing
  326. #if ($driverBuild < 6476)
  327. boolProp useRenderTextures true
  328. #endif
  329.  
  330.  
  331. # avoid a race condition with color copies and ui
  332. boolProp presentWorkaround true
  333.  
  334. if (match("${cardName}", "*Radeon?VE*") or match("${cardName}", "*7?00*") or match("${cardName}", "*R100*") or match("${cardName}", "*IGP 3?0*") or match("${cardName}", "*9100 IGP*"))
  335. log $logGroup $logLevelInfo "Forcing turbo rects off"
  336. setb supportsTurboRect false
  337.  
  338. boolProp simpleTerrain true
  339. boolProp causticsEnabled false
  340. boolProp enumerateMultisampleLevels false
  341.  
  342. setb forceLowSettings true
  343.  
  344. if (match("${cardName}", "*9100 IGP*"))
  345. log $logGroup $logLevelInfo "Forcing low resolution"
  346. setb defaultLowResolution true
  347. endif
  348.  
  349. if (match("${cardName}", "*Radeon?VE*") or $driverBuild < 6414)
  350. log $logGroup $logLevelInfo "Forcing swvp"
  351. boolProp forceSoftwareVP true
  352. endif
  353. endif
  354.  
  355. if (match("${cardName}", "*X1300*"))
  356. log $logGroup $logLevelInfo "Forcing medium settings or lower"
  357. setb forceLowSettings true
  358. endif
  359.  
  360. if ($maxVertexProgramVersionHWMajor < 2)
  361. # Radeon 8500 and greater have problems switching between FF and VS?
  362. log $logGroup $logLevelInfo "Forcing shaders of for ATI DX8"
  363.  
  364. boolProp useShaders false
  365. endif
  366.  
  367. if (match("${cardName}", "*8500*"))
  368. #avoid z fighting with light snow
  369. boolProp raiseLightSnowFF true
  370. setb defaultLowResolution true
  371. endif
  372.  
  373. if (match("${cardName}", "*9600 SE *"))
  374. setb forceMediumMaterialDetail true
  375. setb forceMediumShadows true
  376. setb forceMediumObjectDetail true
  377. endif
  378.  
  379. if (match("${cardName}", "*Mobility*"))
  380. setb isIntegratedChipset true
  381. endif
  382.  
  383. # X800 based cards exhibit rendering corruption if turbo rect is enabled
  384. if (match("${cardName}", "*X800*") or match("${cardName}", "*R420*"))
  385. setb supportsTurboRect false
  386.  
  387. log $logGroup $logLevelInfo "Forcing turbo rects off"
  388. endif
  389.  
  390. if (match("${cardName}", "*92?0*"))
  391. log $logGroup $logLevelInfo "Forcing shadow detail on 9250 and 9200"
  392. setb forceMediumShadows true
  393. endif
  394.  
  395. elseif (match("${cardVendor}", "S3"))
  396. if (match("${cardName}", "*GammaChrome*"))
  397. boolProp useShaders false
  398. log $logGroup $logLevelInfo "Forcing Gamma Chrome to use fixed function shaders"
  399. endif
  400.  
  401. elseif (match("${cardVendor}", "Intel"))
  402. setb isIntegratedChipset true
  403. boolProp simpleTerrain true
  404. boolProp enumerateMultisampleLevels false
  405. boolProp disableVSyncSupport true # work around flickering UI
  406. boolProp useShaders false # (EP2 change) mostly for performance, but driver issues showed up in v14.14
  407.  
  408. # the Intel minspec driver doesn't misreport available texture memory, so it's not
  409. # necessary to adjust the texture memory estimate it returns. This may also fix
  410. # a Windows "device failure" message that occurs sometimes on this device.
  411. boolProp disableTexMemEstimateAdjustment true
  412.  
  413. # assuming Intel parts are UMA, drop the texture memory to 32 if not much system memory
  414. if ($memory <= $memoryLevelLow)
  415. if ($textureMemory > 32)
  416. seti textureMemory 32
  417. endif
  418. endif
  419.  
  420. if (match("${cardName}", "*845*") or match("${cardName}", "*865*") or match("${cardName}", "*830*") or match("${cardName}", "*855*"))
  421. boolProp causticsEnabled false
  422.  
  423. setb forceLowSettings true
  424. setb forceLowResolution true
  425. endif
  426.  
  427. # the 915 sets the caps bit that indicates it can do texture projection,
  428. # but does it incorrectly in the pixel stage. Here we override the texture
  429. # projection cap we get from the device.
  430. if (match("${cardName}", "*915*"))
  431. boolProp disableTextureProjection true
  432. endif
  433. endif
  434.  
  435. intProp deviceLocalVideoMemorySizeDefault ($textureMemory * 1024 * 1024)
  436.  
  437. else
  438. setb forceLowSettings true
  439. setb forceLowResolution true
  440.  
  441. # force sw, swvp, and no aa
  442. boolProp forceSoftwareDevice true
  443. boolProp forceSoftwareVP true
  444. boolProp enumerateMultisampleLevels false
  445. boolProp simpleTerrain true
  446. boolProp causticsEnabled false
  447.  
  448. intProp softwareDeviceLocalVideoMemorySize ($textureMemory * 1024 * 1024)
  449.  
  450. endif
  451.  
  452. # since we don't do bumpmapping on less ps2.0-capable hardware, eliminate tangents
  453. # from the vertex data
  454. # also, the presence of per-vertex tangents in the vertex data stream causes
  455. # "exploded" polygons on the Radeon 9000, even if the data is ignored by the shader
  456. if ($maxPixelProgramVersionMajor < 2)
  457. boolProp skipTangentsInVertexData true
  458. endif
  459.  
  460.  
  461. #############################################################################
  462. #
  463. # Print system info
  464. #
  465.  
  466. if ($deviceNumber = 0)
  467. logSystemInfo "=== Application info ==="
  468. logSystemInfo "Name: ${appName}"
  469. logSystemInfo "Version: ${version}"
  470. logSystemInfo "Build: ${buildType}"
  471.  
  472. logSystemInfo "=== Machine info ==="
  473. logSystemInfo "OS version: ${osVersion}"
  474. logSystemInfo "CPU: ${cpuSpeed}Mhz, Name:${CPU}, FPU:${FPU}, MMX:${MMX}"
  475. logSystemInfo "Memory: ${memory}MB"
  476. logSystemInfo "Free memory: ${freeMemory}MB"
  477. logSystemInfo "User: ${userName}"
  478. logSystemInfo "Computer: ${computerName}"
  479.  
  480. logSystemInfo "=== Sound device info ==="
  481. logSystemInfo "Name: ${soundCardName}"
  482. logSystemInfo "Driver: ${soundDriverName}"
  483. endif
  484.  
  485. logSystemInfo "=== Graphics device info ==="
  486. logSystemInfo "Number: ${deviceNumber}"
  487. logSystemInfo "Name (driver): ${cardNameText}"
  488. if ($isCardFound)
  489. logSystemInfo "Name (database): ${cardName}"
  490. else
  491. logSystemInfo "Name (database): ${cardName} <<NOT FOUND IN DATABASE!>>"
  492. endif
  493. if ($isIntegratedChipset)
  494. logSystemInfo " (Integrated Chipset)"
  495. endif
  496. logSystemInfo "Vendor: ${cardVendor}"
  497. logSystemInfo "Chipset: ${cardChipset}"
  498. logSystemInfo "Driver: ${driverName}, Version: ${driverVersion}"
  499. logSystemInfo "Driver version: ${driverBuild}"
  500. logSystemInfo "Monitor: ${monitorName}"
  501. logSystemInfo "Monitor aspect: ${monitorAspect}, ${monitorAspectString}"
  502. logSystemInfo "Screen mode: ${screenWidth}x${screenHeight}x${screenBPP}BPP,${screenRefresh}Hz"
  503. if ($textureMemorySizeOK)
  504. logSystemInfo "Texture memory: ${textureMemory}MB"
  505. else
  506. logSystemInfo "Texture memory: ${textureMemory}MB <<OVERRIDE>>"
  507. endif
  508. logSystemInfo "HW T&L: Fixed function:${fixedFunctionHWTnL} Programmable:${maxVertexProgramVersionHWMajor}.${maxVertexProgramVersionHWMinor}"
  509. logSystemInfo "Pixel program: ${maxPixelProgramVersionMajor}.${maxPixelProgramVersionMinor}"
  510. logSystemInfo "Texture stages: ${textureStages}"
  511. logSystemInfo "AppControlledAA: ${appControlledAA}"
  512.  
  513.  
  514. #############################################################################
  515. #
  516. # UI Options
  517.  
  518. log $logGroup $logLevelDebug "Begin parsing option definitions"
  519.  
  520. option MaterialDetail
  521. setting $Low
  522. boolProp bumpMapping false
  523. intProp imageDataSizeReductionOnLoad 2
  524.  
  525. setting $Medium
  526. boolProp bumpMapping false
  527. intProp imageDataSizeReductionOnLoad 1
  528.  
  529. setting $High
  530. boolProp bumpMapping true
  531. intProp imageDataSizeReductionOnLoad 0
  532. end
  533.  
  534.  
  535. option ObjectDetail
  536. setting $Medium
  537. boolProp reduceBoneWeights true
  538. boolProp useLODs true
  539. intProp lodOverride 35
  540.  
  541. setting $High
  542. boolProp reduceBoneWeights false
  543. boolProp useLODs false
  544. intProp lodOverride 0
  545. end
  546.  
  547. option ObjectHiding
  548. setting $Off
  549. intProp renderInsideVisibleObjects 0
  550.  
  551. setting $On
  552. intProp renderInsideVisibleObjects 1
  553. end
  554.  
  555. option Shadows
  556. setting $Low
  557. boolProp simShadows false
  558. boolProp objectShadows false
  559. boolProp guob false
  560. boolProp heightMapShadows false
  561.  
  562. setting $Medium
  563. boolProp simShadows false
  564. boolProp objectShadows false
  565. boolProp guob true
  566. boolProp heightMapShadows true
  567.  
  568. setting $High
  569. boolProp simShadows true
  570. boolProp objectShadows true
  571. boolProp guob true
  572. boolProp heightMapShadows true
  573. end
  574.  
  575.  
  576. option OpaqueUI
  577. setting $Off
  578. boolProp renderOpaqueUI false
  579.  
  580. setting $On
  581. boolProp renderOpaqueUI true
  582. end
  583.  
  584.  
  585. option Reflection
  586. setting $Off
  587. boolProp reflectionWithExtraViewer false
  588. boolProp nhoodWaterReflection false
  589.  
  590. setting $On
  591. boolProp reflectionWithExtraViewer true
  592. boolProp nhoodWaterReflection true
  593. end
  594.  
  595.  
  596. option EffectsQuality
  597. setting $Low
  598. boolProp useEffects true
  599. floatProp particleDensity 1
  600. floatProp particleScale 1
  601. intProp maxParticlesTarget 2000
  602. intProp particleLODOffset 0 # subtracted from the zoom.
  603. intProp effectPriorityLevel 1
  604.  
  605. setting $Medium
  606. boolProp useEffects true
  607. floatProp particleDensity 1
  608. floatProp particleScale 1
  609. intProp maxParticlesTarget 5000
  610. intProp particleLODOffset 0 # subtracted from the zoom.
  611. intProp effectPriorityLevel 2
  612.  
  613. setting $High
  614. boolProp useEffects true
  615. floatProp particleDensity 1
  616. floatProp particleScale 1
  617. intProp maxParticlesTarget 10000
  618. intProp particleLODOffset 0 # subtracted from the zoom.
  619. intProp effectPriorityLevel 3
  620. end
  621.  
  622.  
  623. option LightingQuality
  624. setting $Low
  625. boolProp lightingEnabled true
  626. boolProp portalLighting false
  627. boolProp floorAndWallNormalMapping false
  628. boolProp specHighlights false
  629.  
  630. setting $Medium
  631. boolProp lightingEnabled true
  632. boolProp portalLighting true
  633. boolProp floorAndWallNormalMapping false
  634. boolProp specHighlights true
  635.  
  636. setting $High
  637. boolProp lightingEnabled true
  638. boolProp portalLighting true
  639. boolProp floorAndWallNormalMapping true
  640. boolProp specHighlights true
  641. end
  642.  
  643.  
  644. option SoundQuality
  645. setting $Low
  646. intProp AudioPerformance 0
  647.  
  648. setting $Medium
  649. intProp AudioPerformance 1
  650.  
  651. setting $High
  652. intProp AudioPerformance 2
  653. end
  654.  
  655.  
  656. #
  657. # Options without ui access.
  658. #
  659. option DirtyRect
  660. setting $High
  661. # no dirty rects
  662. intProp dynamicRenderStrategy 0
  663.  
  664. setting $Medium
  665. # 4 buffer mode
  666. intProp dynamicRenderStrategy 2
  667.  
  668. setting $Low
  669. # 2 buffer mode
  670. intProp dynamicRenderStrategy 1
  671. end
  672.  
  673.  
  674. option FullscreenFadeEffect
  675. setting $Off
  676. boolProp enableSnapshot false
  677.  
  678. setting $On
  679. boolProp enableSnapshot true
  680. end
  681.  
  682.  
  683. option Turbo
  684. setting $High
  685. boolProp useTurboRect true
  686.  
  687. setting $Medium
  688. boolProp useTurboRect true
  689.  
  690. setting $Low
  691. boolProp useTurboRect false
  692.  
  693. end
  694.  
  695.  
  696. option SimulatorControls
  697. setting $High
  698. intProp maxNumOfVisitingSims 8
  699.  
  700. setting $Medium
  701. intProp maxNumOfVisitingSims 6
  702.  
  703. setting $Low
  704. intProp maxNumOfVisitingSims 2
  705. end
  706.  
  707.  
  708. option LightingOptimizations
  709. setting $High
  710. boolProp optimizedDiffusion true
  711. boolProp incrementalLighting true
  712. boolProp lerpLights true
  713. boolProp useDirtyTiles true
  714. end
  715.  
  716.  
  717. option AnimationSamplingLevel
  718. setting $Low
  719. # sample nearest animation frame
  720. boolProp animationFrameSampling true
  721.  
  722. setting $Medium
  723. # sample nearest two animation frames and slerp
  724. boolProp animationFrameSampling false
  725. end
  726.  
  727.  
  728. option LivePIP
  729. setting $Off
  730. boolProp livePIP false
  731. boolProp livePIPDefault false
  732.  
  733. setting $On
  734. boolProp livePIPDefault true
  735. # do not override user's choice if the setting is ON
  736. end
  737.  
  738.  
  739. option SpecialEventCamera
  740. setting $Off
  741. boolProp chooseCameraSpecialEventEnabled false
  742. boolProp CameraSpecialEventEnabled false
  743.  
  744. setting $On
  745. boolProp chooseCameraSpecialEventEnabled true
  746. # do not override user's choice if the setting is ON
  747.  
  748.  
  749. end
  750.  
  751.  
  752. option ScreenModeResolution
  753. setting $Low
  754. uintProp maxResWidth 800
  755. uintProp maxResHeight 600
  756. uintProp defaultResWidth 800
  757. uintProp defaultResHeight 600
  758.  
  759. setting $MediumButDefaultLow
  760. uintProp maxResWidth 1280
  761. uintProp maxResHeight 1024
  762. uintProp defaultResWidth 800
  763. uintProp defaultResHeight 600
  764.  
  765. setting $Medium
  766. uintProp maxResWidth 1280
  767. uintProp maxResHeight 1024
  768. uintProp defaultResWidth 1024
  769. uintProp defaultResHeight 768
  770.  
  771. setting $High
  772. uintProp maxResWidth 1600
  773. uintProp maxResHeight 1200
  774. uintProp defaultResWidth 1024
  775. uintProp defaultResHeight 768
  776. end
  777.  
  778. option SubjectTracking
  779. setting $Low
  780. floatProp centerTrackingDeadZoneMagnitude 70
  781.  
  782. setting $Medium
  783. floatProp centerTrackingDeadZoneMagnitude 30
  784.  
  785. setting $High
  786. floatProp centerTrackingDeadZoneMagnitude 30
  787. end
  788.  
  789. option EnableLotImpostersInLot
  790. setting $On
  791. boolProp enableLotImpostersInLot true
  792. setting $Off
  793. boolProp enableLotImpostersInLot false
  794. end
  795.  
  796. option EnableNeighborhoodOccupantsInLot
  797. setting $On
  798. boolProp enableNeighborhoodOccupantsInLot true
  799. setting $Off
  800. boolProp enableNeighborhoodOccupantsInLot false
  801. end
  802.  
  803. option LotSkirtSizeIncrease
  804. setting 0
  805. uintProp lotSkirtSizeIncrease 5
  806. setting 1
  807. uintProp lotSkirtSizeIncrease 9
  808. setting 2
  809. uintProp lotSkirtSizeIncrease 18
  810. setting 3
  811. uintProp lotSkirtSizeIncrease 36
  812. end
  813.  
  814. log $logGroup $logLevelDebug "Finished parsing option definitions"
  815.  
  816.  
  817. #############################################################################
  818. #
  819. # Hardware Rendering
  820. #
  821.  
  822. # This cannot be defined as a local variable, the if clause is still executed when
  823. # sw render path is taken and an exception generated that fails the parsing. Be
  824. # careful with the use of local variables.
  825. setb usingHighDetail false
  826.  
  827. if (not $useSoftwareRasterizer)
  828.  
  829. # set a base level of options based on the card rating
  830. if (($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings and not $isIntegratedChipset)
  831. log $logGroup $logLevelInfo "Selecting High base level"
  832.  
  833. setOption OpaqueUI $Off
  834. setOption LivePIP $On
  835. setOption Reflection $On
  836. setOption EffectsQuality $High
  837. setOption LightingQuality $High
  838. setOption Shadows $High
  839. setOption MaterialDetail $High
  840. setOption ObjectDetail $High
  841. setOption ObjectHiding $Off
  842. setOption SubjectTracking $High
  843. setOption EnableLotImpostersInLot $On
  844. setOption EnableNeighborhoodOccupantsInLot $On
  845. setOption LotSkirtSizeIncrease 1
  846. setb usingHighDetail true #use this to test if current level is set to high
  847.  
  848. elseif (($memory >= $memoryLevelMedium) and ($cpuSpeed >= $cpuLevelMedium) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings)
  849. log $logGroup $logLevelInfo "Selecting Medium base level"
  850.  
  851. setOption OpaqueUI $Off
  852. setOption LivePIP $On
  853. setOption Reflection $Off
  854. setOption EffectsQuality $Medium
  855. setOption LightingQuality $Medium
  856. setOption Shadows $Medium
  857. setOption MaterialDetail $Medium
  858. setOption ObjectDetail $High
  859. setOption ObjectHiding $On
  860. setOption SubjectTracking $Medium
  861. setOption EnableLotImpostersInLot $On
  862. setOption EnableNeighborhoodOccupantsInLot $On
  863. setOption LotSkirtSizeIncrease 0
  864.  
  865. else
  866. log $logGroup $logLevelInfo "Selecting Low base level"
  867. # NOTE: don't set forceLowSettings here, because this will force low simulator settings
  868. # if all you have is a low end video card
  869.  
  870. setOption OpaqueUI $Off
  871. setOption LivePIP $Off
  872. setOption Reflection $Off
  873. setOption EffectsQuality $Low
  874. setOption LightingQuality $Low
  875. setOption Shadows $Low
  876. setOption MaterialDetail $Low
  877. setOption ObjectDetail $Medium
  878. setOption ObjectHiding $On
  879. setOption SubjectTracking $Low
  880. setOption EnableLotImpostersInLot $Off
  881. setOption EnableNeighborhoodOccupantsInLot $Off
  882. setOption LotSkirtSizeIncrease 0
  883. endif
  884.  
  885. setOption LightingOptimizations $High
  886.  
  887. # adjust simulator based on cpu speed
  888. # adjust the sound quality based on cpu speed (this may be overridden below for low-end systems)
  889. # adjust animation sampling based on cpu speed
  890. if ($cpuSpeed >= $cpuLevelHigh and not $forceLowSettings)
  891. setOption SimulatorControls $High
  892. setOption SoundQuality $High
  893. setOption AnimationSamplingLevel $Medium
  894. elseif ($cpuSpeed >= $cpuLevelMedium and not $forceLowSettings)
  895. setOption SimulatorControls $Medium
  896. setOption SoundQuality $Medium
  897. setOption AnimationSamplingLevel $Medium
  898. else
  899. setOption SimulatorControls $Low
  900. setOption SoundQuality $Low
  901. setOption AnimationSamplingLevel $Low
  902. endif
  903.  
  904. # turn off fullscreen fade
  905. setOption FullscreenFadeEffect $Off
  906. if ($textureMemory >= 128 and not $isIntegratedChipset)
  907. setOption FullscreenFadeEffect $On
  908. endif
  909.  
  910. # screen res defaults
  911. if (($maxVertexProgramVersionHWMajor >= 1) and ($textureMemory >= 128) and not $forceLowResolution)
  912. setOption ScreenModeResolution $High
  913. elseif ($textureMemory >= 64 and not $forceLowResolution)
  914. if (($memory <= $memoryLevelLow) and ($cpuSpeed <= $cpuLevelLow))
  915. setOption ScreenModeResolution $MediumButDefaultLow
  916. else
  917. setOption ScreenModeResolution $Medium
  918. endif
  919. else
  920. setOption ScreenModeResolution $Low
  921. endif
  922.  
  923. if ($defaultLowResolution)
  924. setOption ScreenModeResolution $MediumButDefaultLow
  925. endif
  926.  
  927. # special event cameras for cinematics
  928. if (($maxPixelProgramVersionMajor >= 1) and ($supportsSpecialEventCamera))
  929. setOption SpecialEventCamera $On
  930. else
  931. setOption SpecialEventCamera $Off
  932. endif
  933.  
  934. # set dirty rect mode
  935. if ($supportsDirtyRect)
  936. setOption DirtyRect $Medium
  937. else
  938. setOption DirtyRect $High
  939. endif
  940.  
  941. # set turbo mode
  942. if ($supportsTurboRect)
  943. setOption Turbo $Medium
  944. else
  945. setOption Turbo $Low
  946. endif
  947.  
  948. if ($forceMediumMaterialDetail and ($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and not $forceLowSettings)
  949. log $logGroup $logLevelWarning "Setting Material Detail"
  950. setOption MaterialDetail $Medium
  951. endif
  952.  
  953. if ($usingHighDetail and not $forceLowSettings)
  954. if ($forceMediumShadows)
  955. setOption Shadows $Medium
  956. endif
  957.  
  958. if ($forceMediumObjectDetail)
  959. setOption ObjectDetail $Medium
  960. endif
  961. endif
  962.  
  963. endif
  964.  
  965.  
  966. #############################################################################
  967. #
  968. # Software rendering
  969. #
  970.  
  971. # set the options for the software rasterizer
  972. if ($useSoftwareRasterizer)
  973. setOption LightingOptimizations $High
  974.  
  975. setOption DirtyRect $Medium
  976. setOption Turbo $Medium
  977. setOption OpaqueUI $Off
  978. setOption LivePIP $Off
  979. setOption SpecialEventCamera $Off
  980.  
  981. setOption Reflection $Off
  982. setOption EffectsQuality $Low
  983. setOption LightingQuality $Low
  984. setOption Shadows $Low
  985. setOption MaterialDetail $Low
  986. setOption ObjectDetail $Medium
  987. setOption ObjectHiding $On
  988.  
  989. # adjust simulator based on cpu speed
  990. if ($cpuSpeed >= $cpuLevelHigh)
  991. setOption SimulatorControls $Medium # one lower than hw
  992. else
  993. setOption SimulatorControls $Low
  994. endif
  995.  
  996. setOption SoundQuality $Low
  997. setOption FullscreenFadeEffect $Off
  998. setOption AnimationSamplingLevel $Low
  999. setOption ScreenModeResolution $Low
  1000. setOption SubjectTracking $Low
  1001. setOption EnableLotImpostersInLot $Off
  1002. setOption EnableNeighborhoodOccupantsInLot $Off
  1003. setOption LotSkirtSizeIncrease 0
  1004.  
  1005. endif
  1006.  
  1007.  
  1008. #############################################################################
  1009. # save the selected configuration for this device.
  1010.  
  1011. boolProp activeDeviceUseSoftwareRasterizer $useSoftwareRasterizer
  1012.  
  1013. #############################################################################
  1014. # tell the caller that we completely finished parsing the script
  1015. intProp configParserErrorCode 0
  1016.  
  1017. log $logGroup $logLevelInfo "Finished Config File"
  1018.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement