Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
4.4 KiB

  1. @echo off
  2. setlocal
  3. if "%1"=="-clean" goto clean
  4. Rem
  5. Rem if ogptkwikvar is set, then we were called by the batch file itself
  6. Rem and we should the polygon tests with the specified polygon size
  7. Rem
  8. if not "%ogptkwikvar%"=="" goto tmeshtest
  9. set echoon=@echo on
  10. set echooff=@echo off
  11. set end=end
  12. set program=%0
  13. set ogptname=ogpt
  14. set alltests=yes
  15. set linetest=no
  16. set tmeshtest=no
  17. set cleartest=no
  18. set xformtest=no
  19. Rem
  20. Rem If more polygon size are required, just add them to the list
  21. Rem
  22. Rem
  23. Rem See if the environment variable is defined, if so, use it
  24. Rem
  25. set defpolysizes=10 50 100
  26. if "%POLYGONSIZES%"=="" set POLYGONSIZES=%defpolysizes%
  27. Rem
  28. Rem Get rid of the prompt
  29. Rem
  30. set prompt=$
  31. set prompt=$d $t $
  32. Rem
  33. Rem parse arguments
  34. Rem
  35. :nextarg
  36. shift
  37. if "%0"=="" goto nomoreargs
  38. if "%0"=="-?" goto help
  39. if "%0"=="-h" goto help
  40. if "%0"=="-H" goto help
  41. if "%0"=="-help" goto help
  42. if "%0"=="-Help" goto help
  43. if "%0"=="-HELP" goto help
  44. if "%0"=="+db" set ogptdb=+db&& goto nextarg
  45. if "%0"=="-xform" set xformtest=yes&& set alltests=no&& goto nextarg
  46. if "%0"=="-line" set linetest=yes&& set alltests=no&& goto nextarg
  47. if "%0"=="-tmesh" set tmeshtest=yes&& set alltests=no&& goto nextarg
  48. if "%0"=="-clear" set cleartest=yes&& set alltests=no&& goto nextarg
  49. echo %program% : unknown option '%0' && goto usage
  50. :nomoreargs
  51. if "%alltests%"=="yes" goto xformtest
  52. if "%xformtest%"=="yes" goto xformtest
  53. goto prelinetest
  54. :xformtest
  55. %echoon%
  56. %ogptname% xform %ogptdb% +2d +brief +avg
  57. %ogptname% xform %ogptdb% +brief +avg
  58. %ogptname% xform %ogptdb% +aa +brief +avg
  59. %echooff%
  60. :prelinetest
  61. if "%alltests%"=="yes" goto linetest
  62. if "%linetest%"=="yes" goto linetest
  63. goto pretmeshtest
  64. :linetest
  65. %echoon%
  66. %ogptname% line %ogptdb% +2d +brief +avg
  67. %ogptname% line %ogptdb% +2d +dashed +brief +avg
  68. %ogptname% line %ogptdb% +2d +width 3 +brief +avg
  69. %ogptname% line %ogptdb% +2d +dashed +width 3 +brief +avg
  70. %ogptname% line %ogptdb% +brief +avg
  71. %ogptname% line %ogptdb% +dashed +brief +avg
  72. %ogptname% line %ogptdb% +width 3 +brief +avg
  73. %ogptname% line %ogptdb% +dashed +width 3 +brief +avg
  74. %ogptname% line %ogptdb% +aa +brief +avg
  75. %ogptname% line %ogptdb% +depth +brief +avg
  76. %ogptname% line %ogptdb% +z +brief +avg
  77. %ogptname% line %ogptdb% +z +depth +brief +avg
  78. %echooff%
  79. :pretmeshtest
  80. if "%alltests%"=="yes" goto fortmeshtest
  81. if "%tmeshtest%"=="yes" goto fortmeshtest
  82. goto precleartest
  83. Rem
  84. Rem Now that the first tests have been run, let's set
  85. Rem a known variable and call ourselves again with each value
  86. Rem
  87. :fortmeshtest
  88. for %%s in (%POLYGONSIZES%) do set ogptkwikvar=+size %%s && call %program%
  89. goto precleartest
  90. :tmeshtest
  91. %echoon%
  92. %ogptname% tmesh %ogptdb% %ogptkwikvar% +brief +avg
  93. %ogptname% tmesh %ogptdb% %ogptkwikvar% +shade +brief +avg
  94. %ogptname% tmesh %ogptdb% %ogptkwikvar% +z +brief +avg
  95. %ogptname% tmesh %ogptdb% %ogptkwikvar% +z +shade +brief +avg
  96. %ogptname% tmesh %ogptdb% %ogptkwikvar% +z +shade +1llight +1ilight +brief +avg
  97. %echooff%
  98. if not "%ogptkwikvar%"=="" goto end
  99. :precleartest
  100. if "%alltests%"=="yes" goto cleartest
  101. if "%cleartest%"=="yes" goto cleartest
  102. goto end
  103. :cleartest
  104. %echoon%
  105. %ogptname% clear %ogptdb% +brief +avg
  106. %ogptname% clear %ogptdb% +z +brief +avg
  107. %echooff%
  108. goto end
  109. :clean
  110. endlocal
  111. set prompt=$p$g
  112. set echoon=
  113. set echooff=
  114. set end=
  115. set program=
  116. set ogptkwikvar=
  117. set ogptdb=
  118. set ogptname=
  119. set defpolysizes=
  120. set alltests=
  121. set linetest=
  122. set tmeshtest=
  123. set cleartest=
  124. set xformtest=
  125. goto lastline
  126. :usage
  127. echo usage: %program% [-h?] [+db] [-clean] [-xform] [-line] [-tmesh] [-clear]
  128. goto %end%
  129. :help
  130. if "%end%"=="end" set end=help && goto usage
  131. echo+
  132. echo +db Enable double buffering
  133. echo -clean Clean up the environment (when something went wrong)
  134. echo+
  135. echo Test selection (default is all tests):
  136. echo+
  137. echo -xform transformation tests
  138. echo -line line tests
  139. echo -tmesh tmesh tests
  140. echo -clear clear tests
  141. echo+
  142. echo Environment variable: POLYGONSIZES=size1 size2 size3 ...
  143. echo if POLYGONSIZES is set, then tests will be conducted on polygons
  144. echo of sizes size1, size2, size3, etc.
  145. echo default is: %defpolysizes%
  146. goto end
  147. :end
  148. endlocal
  149. :lastline