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.

159 lines
2.8 KiB

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