Team Fortress 2 Source Code as on 22/4/2020
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.

260 lines
5.4 KiB

  1. #include "shaderlib/cshader.h"
  2. class spritecard_ps20_Static_Index
  3. {
  4. private:
  5. int m_nDUALSEQUENCE;
  6. #ifdef _DEBUG
  7. bool m_bDUALSEQUENCE;
  8. #endif
  9. public:
  10. void SetDUALSEQUENCE( int i )
  11. {
  12. Assert( i >= 0 && i <= 1 );
  13. m_nDUALSEQUENCE = i;
  14. #ifdef _DEBUG
  15. m_bDUALSEQUENCE = true;
  16. #endif
  17. }
  18. void SetDUALSEQUENCE( bool i )
  19. {
  20. m_nDUALSEQUENCE = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bDUALSEQUENCE = true;
  23. #endif
  24. }
  25. private:
  26. int m_nSEQUENCE_BLEND_MODE;
  27. #ifdef _DEBUG
  28. bool m_bSEQUENCE_BLEND_MODE;
  29. #endif
  30. public:
  31. void SetSEQUENCE_BLEND_MODE( int i )
  32. {
  33. Assert( i >= 0 && i <= 2 );
  34. m_nSEQUENCE_BLEND_MODE = i;
  35. #ifdef _DEBUG
  36. m_bSEQUENCE_BLEND_MODE = true;
  37. #endif
  38. }
  39. void SetSEQUENCE_BLEND_MODE( bool i )
  40. {
  41. m_nSEQUENCE_BLEND_MODE = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bSEQUENCE_BLEND_MODE = true;
  44. #endif
  45. }
  46. private:
  47. int m_nADDBASETEXTURE2;
  48. #ifdef _DEBUG
  49. bool m_bADDBASETEXTURE2;
  50. #endif
  51. public:
  52. void SetADDBASETEXTURE2( int i )
  53. {
  54. Assert( i >= 0 && i <= 1 );
  55. m_nADDBASETEXTURE2 = i;
  56. #ifdef _DEBUG
  57. m_bADDBASETEXTURE2 = true;
  58. #endif
  59. }
  60. void SetADDBASETEXTURE2( bool i )
  61. {
  62. m_nADDBASETEXTURE2 = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bADDBASETEXTURE2 = true;
  65. #endif
  66. }
  67. private:
  68. int m_nMAXLUMFRAMEBLEND1;
  69. #ifdef _DEBUG
  70. bool m_bMAXLUMFRAMEBLEND1;
  71. #endif
  72. public:
  73. void SetMAXLUMFRAMEBLEND1( int i )
  74. {
  75. Assert( i >= 0 && i <= 1 );
  76. m_nMAXLUMFRAMEBLEND1 = i;
  77. #ifdef _DEBUG
  78. m_bMAXLUMFRAMEBLEND1 = true;
  79. #endif
  80. }
  81. void SetMAXLUMFRAMEBLEND1( bool i )
  82. {
  83. m_nMAXLUMFRAMEBLEND1 = i ? 1 : 0;
  84. #ifdef _DEBUG
  85. m_bMAXLUMFRAMEBLEND1 = true;
  86. #endif
  87. }
  88. private:
  89. int m_nMAXLUMFRAMEBLEND2;
  90. #ifdef _DEBUG
  91. bool m_bMAXLUMFRAMEBLEND2;
  92. #endif
  93. public:
  94. void SetMAXLUMFRAMEBLEND2( int i )
  95. {
  96. Assert( i >= 0 && i <= 1 );
  97. m_nMAXLUMFRAMEBLEND2 = i;
  98. #ifdef _DEBUG
  99. m_bMAXLUMFRAMEBLEND2 = true;
  100. #endif
  101. }
  102. void SetMAXLUMFRAMEBLEND2( bool i )
  103. {
  104. m_nMAXLUMFRAMEBLEND2 = i ? 1 : 0;
  105. #ifdef _DEBUG
  106. m_bMAXLUMFRAMEBLEND2 = true;
  107. #endif
  108. }
  109. private:
  110. int m_nEXTRACTGREENALPHA;
  111. #ifdef _DEBUG
  112. bool m_bEXTRACTGREENALPHA;
  113. #endif
  114. public:
  115. void SetEXTRACTGREENALPHA( int i )
  116. {
  117. Assert( i >= 0 && i <= 1 );
  118. m_nEXTRACTGREENALPHA = i;
  119. #ifdef _DEBUG
  120. m_bEXTRACTGREENALPHA = true;
  121. #endif
  122. }
  123. void SetEXTRACTGREENALPHA( bool i )
  124. {
  125. m_nEXTRACTGREENALPHA = i ? 1 : 0;
  126. #ifdef _DEBUG
  127. m_bEXTRACTGREENALPHA = true;
  128. #endif
  129. }
  130. private:
  131. int m_nCOLORRAMP;
  132. #ifdef _DEBUG
  133. bool m_bCOLORRAMP;
  134. #endif
  135. public:
  136. void SetCOLORRAMP( int i )
  137. {
  138. Assert( i >= 0 && i <= 1 );
  139. m_nCOLORRAMP = i;
  140. #ifdef _DEBUG
  141. m_bCOLORRAMP = true;
  142. #endif
  143. }
  144. void SetCOLORRAMP( bool i )
  145. {
  146. m_nCOLORRAMP = i ? 1 : 0;
  147. #ifdef _DEBUG
  148. m_bCOLORRAMP = true;
  149. #endif
  150. }
  151. private:
  152. int m_nANIMBLEND;
  153. #ifdef _DEBUG
  154. bool m_bANIMBLEND;
  155. #endif
  156. public:
  157. void SetANIMBLEND( int i )
  158. {
  159. Assert( i >= 0 && i <= 1 );
  160. m_nANIMBLEND = i;
  161. #ifdef _DEBUG
  162. m_bANIMBLEND = true;
  163. #endif
  164. }
  165. void SetANIMBLEND( bool i )
  166. {
  167. m_nANIMBLEND = i ? 1 : 0;
  168. #ifdef _DEBUG
  169. m_bANIMBLEND = true;
  170. #endif
  171. }
  172. private:
  173. int m_nADDSELF;
  174. #ifdef _DEBUG
  175. bool m_bADDSELF;
  176. #endif
  177. public:
  178. void SetADDSELF( int i )
  179. {
  180. Assert( i >= 0 && i <= 1 );
  181. m_nADDSELF = i;
  182. #ifdef _DEBUG
  183. m_bADDSELF = true;
  184. #endif
  185. }
  186. void SetADDSELF( bool i )
  187. {
  188. m_nADDSELF = i ? 1 : 0;
  189. #ifdef _DEBUG
  190. m_bADDSELF = true;
  191. #endif
  192. }
  193. public:
  194. spritecard_ps20_Static_Index( )
  195. {
  196. #ifdef _DEBUG
  197. m_bDUALSEQUENCE = false;
  198. #endif // _DEBUG
  199. m_nDUALSEQUENCE = 0;
  200. #ifdef _DEBUG
  201. m_bSEQUENCE_BLEND_MODE = false;
  202. #endif // _DEBUG
  203. m_nSEQUENCE_BLEND_MODE = 0;
  204. #ifdef _DEBUG
  205. m_bADDBASETEXTURE2 = false;
  206. #endif // _DEBUG
  207. m_nADDBASETEXTURE2 = 0;
  208. #ifdef _DEBUG
  209. m_bMAXLUMFRAMEBLEND1 = false;
  210. #endif // _DEBUG
  211. m_nMAXLUMFRAMEBLEND1 = 0;
  212. #ifdef _DEBUG
  213. m_bMAXLUMFRAMEBLEND2 = false;
  214. #endif // _DEBUG
  215. m_nMAXLUMFRAMEBLEND2 = 0;
  216. #ifdef _DEBUG
  217. m_bEXTRACTGREENALPHA = false;
  218. #endif // _DEBUG
  219. m_nEXTRACTGREENALPHA = 0;
  220. #ifdef _DEBUG
  221. m_bCOLORRAMP = false;
  222. #endif // _DEBUG
  223. m_nCOLORRAMP = 0;
  224. #ifdef _DEBUG
  225. m_bANIMBLEND = false;
  226. #endif // _DEBUG
  227. m_nANIMBLEND = 0;
  228. #ifdef _DEBUG
  229. m_bADDSELF = false;
  230. #endif // _DEBUG
  231. m_nADDSELF = 0;
  232. }
  233. int GetIndex()
  234. {
  235. // Asserts to make sure that we aren't using any skipped combinations.
  236. // Asserts to make sure that we are setting all of the combination vars.
  237. #ifdef _DEBUG
  238. bool bAllStaticVarsDefined = m_bDUALSEQUENCE && m_bSEQUENCE_BLEND_MODE && m_bADDBASETEXTURE2 && m_bMAXLUMFRAMEBLEND1 && m_bMAXLUMFRAMEBLEND2 && m_bEXTRACTGREENALPHA && m_bCOLORRAMP && m_bANIMBLEND && m_bADDSELF;
  239. Assert( bAllStaticVarsDefined );
  240. #endif // _DEBUG
  241. return ( 1 * m_nDUALSEQUENCE ) + ( 2 * m_nSEQUENCE_BLEND_MODE ) + ( 6 * m_nADDBASETEXTURE2 ) + ( 12 * m_nMAXLUMFRAMEBLEND1 ) + ( 24 * m_nMAXLUMFRAMEBLEND2 ) + ( 48 * m_nEXTRACTGREENALPHA ) + ( 96 * m_nCOLORRAMP ) + ( 192 * m_nANIMBLEND ) + ( 384 * m_nADDSELF ) + 0;
  242. }
  243. };
  244. #define shaderStaticTest_spritecard_ps20 psh_forgot_to_set_static_DUALSEQUENCE + psh_forgot_to_set_static_SEQUENCE_BLEND_MODE + psh_forgot_to_set_static_ADDBASETEXTURE2 + psh_forgot_to_set_static_MAXLUMFRAMEBLEND1 + psh_forgot_to_set_static_MAXLUMFRAMEBLEND2 + psh_forgot_to_set_static_EXTRACTGREENALPHA + psh_forgot_to_set_static_COLORRAMP + psh_forgot_to_set_static_ANIMBLEND + psh_forgot_to_set_static_ADDSELF + 0
  245. class spritecard_ps20_Dynamic_Index
  246. {
  247. public:
  248. spritecard_ps20_Dynamic_Index()
  249. {
  250. }
  251. int GetIndex()
  252. {
  253. // Asserts to make sure that we aren't using any skipped combinations.
  254. // Asserts to make sure that we are setting all of the combination vars.
  255. #ifdef _DEBUG
  256. #endif // _DEBUG
  257. return 0;
  258. }
  259. };
  260. #define shaderDynamicTest_spritecard_ps20 0