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.

134 lines
2.4 KiB

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