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.

100 lines
1.8 KiB

  1. class sprite_vs11_Static_Index
  2. {
  3. private:
  4. int m_nVERTEXCOLOR;
  5. #ifdef _DEBUG
  6. bool m_bVERTEXCOLOR;
  7. #endif
  8. public:
  9. void SetVERTEXCOLOR( int i )
  10. {
  11. Assert( i >= 0 && i <= 1 );
  12. m_nVERTEXCOLOR = i;
  13. #ifdef _DEBUG
  14. m_bVERTEXCOLOR = true;
  15. #endif
  16. }
  17. void SetVERTEXCOLOR( bool i )
  18. {
  19. m_nVERTEXCOLOR = i ? 1 : 0;
  20. #ifdef _DEBUG
  21. m_bVERTEXCOLOR = true;
  22. #endif
  23. }
  24. public:
  25. sprite_vs11_Static_Index()
  26. {
  27. #ifdef _DEBUG
  28. m_bVERTEXCOLOR = false;
  29. #endif // _DEBUG
  30. m_nVERTEXCOLOR = 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_bVERTEXCOLOR;
  38. Assert( bAllStaticVarsDefined );
  39. #endif // _DEBUG
  40. return ( 2 * m_nVERTEXCOLOR ) + 0;
  41. }
  42. };
  43. class sprite_vs11_Dynamic_Index
  44. {
  45. private:
  46. int m_nSKINNING;
  47. #ifdef _DEBUG
  48. bool m_bSKINNING;
  49. #endif
  50. public:
  51. void SetSKINNING( int i )
  52. {
  53. }
  54. void SetSKINNING( bool i )
  55. {
  56. }
  57. private:
  58. int m_nDOWATERFOG;
  59. #ifdef _DEBUG
  60. bool m_bDOWATERFOG;
  61. #endif
  62. public:
  63. void SetDOWATERFOG( int i )
  64. {
  65. Assert( i >= 0 && i <= 1 );
  66. m_nDOWATERFOG = i;
  67. #ifdef _DEBUG
  68. m_bDOWATERFOG = true;
  69. #endif
  70. }
  71. void SetDOWATERFOG( bool i )
  72. {
  73. m_nDOWATERFOG = i ? 1 : 0;
  74. #ifdef _DEBUG
  75. m_bDOWATERFOG = true;
  76. #endif
  77. }
  78. public:
  79. sprite_vs11_Dynamic_Index()
  80. {
  81. #ifdef _DEBUG
  82. m_bSKINNING = true;
  83. #endif // _DEBUG
  84. m_nSKINNING = 0;
  85. #ifdef _DEBUG
  86. m_bDOWATERFOG = false;
  87. #endif // _DEBUG
  88. m_nDOWATERFOG = 0;
  89. }
  90. int GetIndex()
  91. {
  92. // Asserts to make sure that we aren't using any skipped combinations.
  93. // Asserts to make sure that we are setting all of the combination vars.
  94. #ifdef _DEBUG
  95. bool bAllDynamicVarsDefined = m_bSKINNING && m_bDOWATERFOG;
  96. Assert( bAllDynamicVarsDefined );
  97. #endif // _DEBUG
  98. return ( 1 * m_nSKINNING ) + ( 1 * m_nDOWATERFOG ) + 0;
  99. }
  100. };