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.

175 lines
3.1 KiB

  1. class lightmappedgeneric_vs11_Static_Index
  2. {
  3. private:
  4. int m_nDETAIL;
  5. #ifdef _DEBUG
  6. bool m_bDETAIL;
  7. #endif
  8. public:
  9. void SetDETAIL( int i )
  10. {
  11. Assert( i >= 0 && i <= 1 );
  12. m_nDETAIL = i;
  13. #ifdef _DEBUG
  14. m_bDETAIL = true;
  15. #endif
  16. }
  17. void SetDETAIL( bool i )
  18. {
  19. m_nDETAIL = i ? 1 : 0;
  20. #ifdef _DEBUG
  21. m_bDETAIL = true;
  22. #endif
  23. }
  24. private:
  25. int m_nENVMAP;
  26. #ifdef _DEBUG
  27. bool m_bENVMAP;
  28. #endif
  29. public:
  30. void SetENVMAP( int i )
  31. {
  32. Assert( i >= 0 && i <= 1 );
  33. m_nENVMAP = i;
  34. #ifdef _DEBUG
  35. m_bENVMAP = true;
  36. #endif
  37. }
  38. void SetENVMAP( bool i )
  39. {
  40. m_nENVMAP = i ? 1 : 0;
  41. #ifdef _DEBUG
  42. m_bENVMAP = true;
  43. #endif
  44. }
  45. private:
  46. int m_nENVMAPCAMERASPACE;
  47. #ifdef _DEBUG
  48. bool m_bENVMAPCAMERASPACE;
  49. #endif
  50. public:
  51. void SetENVMAPCAMERASPACE( int i )
  52. {
  53. }
  54. void SetENVMAPCAMERASPACE( bool i )
  55. {
  56. }
  57. private:
  58. int m_nENVMAPSPHERE;
  59. #ifdef _DEBUG
  60. bool m_bENVMAPSPHERE;
  61. #endif
  62. public:
  63. void SetENVMAPSPHERE( int i )
  64. {
  65. Assert( i >= 0 && i <= 1 );
  66. m_nENVMAPSPHERE = i;
  67. #ifdef _DEBUG
  68. m_bENVMAPSPHERE = true;
  69. #endif
  70. }
  71. void SetENVMAPSPHERE( bool i )
  72. {
  73. m_nENVMAPSPHERE = i ? 1 : 0;
  74. #ifdef _DEBUG
  75. m_bENVMAPSPHERE = true;
  76. #endif
  77. }
  78. private:
  79. int m_nVERTEXCOLOR;
  80. #ifdef _DEBUG
  81. bool m_bVERTEXCOLOR;
  82. #endif
  83. public:
  84. void SetVERTEXCOLOR( int i )
  85. {
  86. Assert( i >= 0 && i <= 1 );
  87. m_nVERTEXCOLOR = i;
  88. #ifdef _DEBUG
  89. m_bVERTEXCOLOR = true;
  90. #endif
  91. }
  92. void SetVERTEXCOLOR( bool i )
  93. {
  94. m_nVERTEXCOLOR = i ? 1 : 0;
  95. #ifdef _DEBUG
  96. m_bVERTEXCOLOR = true;
  97. #endif
  98. }
  99. public:
  100. lightmappedgeneric_vs11_Static_Index()
  101. {
  102. #ifdef _DEBUG
  103. m_bDETAIL = false;
  104. #endif // _DEBUG
  105. m_nDETAIL = 0;
  106. #ifdef _DEBUG
  107. m_bENVMAP = false;
  108. #endif // _DEBUG
  109. m_nENVMAP = 0;
  110. #ifdef _DEBUG
  111. m_bENVMAPCAMERASPACE = true;
  112. #endif // _DEBUG
  113. m_nENVMAPCAMERASPACE = 0;
  114. #ifdef _DEBUG
  115. m_bENVMAPSPHERE = false;
  116. #endif // _DEBUG
  117. m_nENVMAPSPHERE = 0;
  118. #ifdef _DEBUG
  119. m_bVERTEXCOLOR = false;
  120. #endif // _DEBUG
  121. m_nVERTEXCOLOR = 0;
  122. }
  123. int GetIndex()
  124. {
  125. // Asserts to make sure that we aren't using any skipped combinations.
  126. // Asserts to make sure that we are setting all of the combination vars.
  127. #ifdef _DEBUG
  128. bool bAllStaticVarsDefined = m_bDETAIL && m_bENVMAP && m_bENVMAPCAMERASPACE && m_bENVMAPSPHERE && m_bVERTEXCOLOR;
  129. Assert( bAllStaticVarsDefined );
  130. #endif // _DEBUG
  131. return ( 2 * m_nDETAIL ) + ( 4 * m_nENVMAP ) + ( 8 * m_nENVMAPCAMERASPACE ) + ( 8 * m_nENVMAPSPHERE ) + ( 16 * m_nVERTEXCOLOR ) + 0;
  132. }
  133. };
  134. class lightmappedgeneric_vs11_Dynamic_Index
  135. {
  136. private:
  137. int m_nDOWATERFOG;
  138. #ifdef _DEBUG
  139. bool m_bDOWATERFOG;
  140. #endif
  141. public:
  142. void SetDOWATERFOG( int i )
  143. {
  144. Assert( i >= 0 && i <= 1 );
  145. m_nDOWATERFOG = i;
  146. #ifdef _DEBUG
  147. m_bDOWATERFOG = true;
  148. #endif
  149. }
  150. void SetDOWATERFOG( bool i )
  151. {
  152. m_nDOWATERFOG = i ? 1 : 0;
  153. #ifdef _DEBUG
  154. m_bDOWATERFOG = true;
  155. #endif
  156. }
  157. public:
  158. lightmappedgeneric_vs11_Dynamic_Index()
  159. {
  160. #ifdef _DEBUG
  161. m_bDOWATERFOG = false;
  162. #endif // _DEBUG
  163. m_nDOWATERFOG = 0;
  164. }
  165. int GetIndex()
  166. {
  167. // Asserts to make sure that we aren't using any skipped combinations.
  168. // Asserts to make sure that we are setting all of the combination vars.
  169. #ifdef _DEBUG
  170. bool bAllDynamicVarsDefined = m_bDOWATERFOG;
  171. Assert( bAllDynamicVarsDefined );
  172. #endif // _DEBUG
  173. return ( 1 * m_nDOWATERFOG ) + 0;
  174. }
  175. };