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.

137 lines
2.9 KiB

  1. #include "shaderlib/cshader.h"
  2. class spritecard_vs11_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 <= 0 );
  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 <= 0 );
  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 <= 0 );
  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. public:
  68. spritecard_vs11_Static_Index( )
  69. {
  70. #ifdef _DEBUG
  71. m_bZOOM_ANIMATE_SEQ2 = false;
  72. #endif // _DEBUG
  73. m_nZOOM_ANIMATE_SEQ2 = 0;
  74. #ifdef _DEBUG
  75. m_bDUALSEQUENCE = false;
  76. #endif // _DEBUG
  77. m_nDUALSEQUENCE = 0;
  78. #ifdef _DEBUG
  79. m_bEXTRACTGREENALPHA = false;
  80. #endif // _DEBUG
  81. m_nEXTRACTGREENALPHA = 0;
  82. }
  83. int GetIndex()
  84. {
  85. // Asserts to make sure that we aren't using any skipped combinations.
  86. // Asserts to make sure that we are setting all of the combination vars.
  87. #ifdef _DEBUG
  88. bool bAllStaticVarsDefined = m_bZOOM_ANIMATE_SEQ2 && m_bDUALSEQUENCE && m_bEXTRACTGREENALPHA;
  89. Assert( bAllStaticVarsDefined );
  90. #endif // _DEBUG
  91. return ( 3 * m_nZOOM_ANIMATE_SEQ2 ) + ( 3 * m_nDUALSEQUENCE ) + ( 3 * m_nEXTRACTGREENALPHA ) + 0;
  92. }
  93. };
  94. #define shaderStaticTest_spritecard_vs11 vsh_forgot_to_set_static_ZOOM_ANIMATE_SEQ2 + vsh_forgot_to_set_static_DUALSEQUENCE + vsh_forgot_to_set_static_EXTRACTGREENALPHA + 0
  95. class spritecard_vs11_Dynamic_Index
  96. {
  97. private:
  98. int m_nORIENTATION;
  99. #ifdef _DEBUG
  100. bool m_bORIENTATION;
  101. #endif
  102. public:
  103. void SetORIENTATION( int i )
  104. {
  105. Assert( i >= 0 && i <= 2 );
  106. m_nORIENTATION = i;
  107. #ifdef _DEBUG
  108. m_bORIENTATION = true;
  109. #endif
  110. }
  111. void SetORIENTATION( bool i )
  112. {
  113. m_nORIENTATION = i ? 1 : 0;
  114. #ifdef _DEBUG
  115. m_bORIENTATION = true;
  116. #endif
  117. }
  118. public:
  119. spritecard_vs11_Dynamic_Index()
  120. {
  121. #ifdef _DEBUG
  122. m_bORIENTATION = false;
  123. #endif // _DEBUG
  124. m_nORIENTATION = 0;
  125. }
  126. int GetIndex()
  127. {
  128. // Asserts to make sure that we aren't using any skipped combinations.
  129. // Asserts to make sure that we are setting all of the combination vars.
  130. #ifdef _DEBUG
  131. bool bAllDynamicVarsDefined = m_bORIENTATION;
  132. Assert( bAllDynamicVarsDefined );
  133. #endif // _DEBUG
  134. return ( 1 * m_nORIENTATION ) + 0;
  135. }
  136. };
  137. #define shaderDynamicTest_spritecard_vs11 vsh_forgot_to_set_dynamic_ORIENTATION + 0