Advertisement
Guest User

Graphic Card

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