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.

162 lines
3.4 KiB

  1. #include "shaderlib/cshader.h"
  2. class spritecard_vs20_Static_Index
  3. {
  4. private:
  5. int m_nZOOM_ANIMATE_SEQ2;
  6. #ifdef _DEBUG
  7. bool m_bZOOM_ANIMATE_SEQ2;
  8. #endif
  9. public:
  10. void SetZOOM_ANIMATE_SEQ2( int i )
  11. {
  12. Assert( i >= 0 && i <= 1 );
  13. m_nZOOM_ANIMATE_SEQ2 = i;
  14. #ifdef _DEBUG
  15. m_bZOOM_ANIMATE_SEQ2 = true;
  16. #endif
  17. }
  18. void SetZOOM_ANIMATE_SEQ2( bool i )
  19. {
  20. m_nZOOM_ANIMATE_SEQ2 = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bZOOM_ANIMATE_SEQ2 = true;
  23. #endif
  24. }
  25. private:
  26. int m_nDUALSEQUENCE;
  27. #ifdef _DEBUG
  28. bool m_bDUALSEQUENCE;
  29. #endif
  30. public:
  31. void SetDUALSEQUENCE( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nDUALSEQUENCE = i;
  35. #ifdef _DEBUG
  36. m_bDUALSEQUENCE = true;
  37. #endif
  38. }
  39. void SetDUALSEQUENCE( bool i )
  40. {
  41. m_nDUALSEQUENCE = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bDUALSEQUENCE = true;
  44. #endif
  45. }
  46. private:
  47. int m_nEXTRACTGREENALPHA;
  48. #ifdef _DEBUG
  49. bool m_bEXTRACTGREENALPHA;
  50. #endif
  51. public:
  52. void SetEXTRACTGREENALPHA( int i )
  53. {
  54. Assert( i >= 0 && i <= 1 );
  55. m_nEXTRACTGREENALPHA = i;
  56. #ifdef _DEBUG
  57. m_bEXTRACTGREENALPHA = true;
  58. #endif
  59. }
  60. void SetEXTRACTGREENALPHA( bool i )
  61. {
  62. m_nEXTRACTGREENALPHA = i ? 1 : 0;
  63. #ifdef _DEBUG
  64. m_bEXTRACTGREENALPHA = true;
  65. #endif
  66. }
  67. private:
  68. int m_nUSE_INSTANCING;
  69. #ifdef _DEBUG
  70. bool m_bUSE_INSTANCING;
  71. #endif
  72. public:
  73. void SetUSE_INSTANCING( int i )
  74. {
  75. Assert( i >= 0 && i <= 1 );
  76. m_nUSE_INSTANCING = i;
  77. #ifdef _DEBUG
  78. m_bUSE_INSTANCING = true;
  79. #endif
  80. }
  81. void SetUSE_INSTANCING( bool i )
  82. {
  83. m_nUSE_INSTANCING = i ? 1 : 0;
  84. #ifdef _DEBUG
  85. m_bUSE_INSTANCING = true;
  86. #endif
  87. }
  88. public:
  89. spritecard_vs20_Static_Index( )
  90. {
  91. #ifdef _DEBUG
  92. m_bZOOM_ANIMATE_SEQ2 = false;
  93. #endif // _DEBUG
  94. m_nZOOM_ANIMATE_SEQ2 = 0;
  95. #ifdef _DEBUG
  96. m_bDUALSEQUENCE = false;
  97. #endif // _DEBUG
  98. m_nDUALSEQUENCE = 0;
  99. #ifdef _DEBUG
  100. m_bEXTRACTGREENALPHA = false;
  101. #endif // _DEBUG
  102. m_nEXTRACTGREENALPHA = 0;
  103. #ifdef _DEBUG
  104. m_bUSE_INSTANCING = false;
  105. #endif // _DEBUG
  106. m_nUSE_INSTANCING = 0;
  107. }
  108. int GetIndex()
  109. {
  110. // Asserts to make sure that we aren't using any skipped combinations.
  111. // Asserts to make sure that we are setting all of the combination vars.
  112. #ifdef _DEBUG
  113. bool bAllStaticVarsDefined = m_bZOOM_ANIMATE_SEQ2 && m_bDUALSEQUENCE && m_bEXTRACTGREENALPHA && m_bUSE_INSTANCING;
  114. Assert( bAllStaticVarsDefined );
  115. #endif // _DEBUG
  116. return ( 3 * m_nZOOM_ANIMATE_SEQ2 ) + ( 6 * m_nDUALSEQUENCE ) + ( 12 * m_nEXTRACTGREENALPHA ) + ( 24 * m_nUSE_INSTANCING ) + 0;
  117. }
  118. };
  119. #define shaderStaticTest_spritecard_vs20 vsh_forgot_to_set_static_ZOOM_ANIMATE_SEQ2 + vsh_forgot_to_set_static_DUALSEQUENCE + vsh_forgot_to_set_static_EXTRACTGREENALPHA + vsh_forgot_to_set_static_USE_INSTANCING + 0
  120. class spritecard_vs20_Dynamic_Index
  121. {
  122. private:
  123. int m_nORIENTATION;
  124. #ifdef _DEBUG
  125. bool m_bORIENTATION;
  126. #endif
  127. public:
  128. void SetORIENTATION( int i )
  129. {
  130. Assert( i >= 0 && i <= 2 );
  131. m_nORIENTATION = i;
  132. #ifdef _DEBUG
  133. m_bORIENTATION = true;
  134. #endif
  135. }
  136. void SetORIENTATION( bool i )
  137. {
  138. m_nORIENTATION = i ? 1 : 0;
  139. #ifdef _DEBUG
  140. m_bORIENTATION = true;
  141. #endif
  142. }
  143. public:
  144. spritecard_vs20_Dynamic_Index()
  145. {
  146. #ifdef _DEBUG
  147. m_bORIENTATION = false;
  148. #endif // _DEBUG
  149. m_nORIENTATION = 0;
  150. }
  151. int GetIndex()
  152. {
  153. // Asserts to make sure that we aren't using any skipped combinations.
  154. // Asserts to make sure that we are setting all of the combination vars.
  155. #ifdef _DEBUG
  156. bool bAllDynamicVarsDefined = m_bORIENTATION;
  157. Assert( bAllDynamicVarsDefined );
  158. #endif // _DEBUG
  159. return ( 1 * m_nORIENTATION ) + 0;
  160. }
  161. };
  162. #define shaderDynamicTest_spritecard_vs20 vsh_forgot_to_set_dynamic_ORIENTATION + 0