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.

85 lines
1.7 KiB

  1. #include "shaderlib/cshader.h"
  2. class water_vs20_Static_Index
  3. {
  4. private:
  5. int m_nBASETEXTURE;
  6. #ifdef _DEBUG
  7. bool m_bBASETEXTURE;
  8. #endif
  9. public:
  10. void SetBASETEXTURE( int i )
  11. {
  12. Assert( i >= 0 && i <= 1 );
  13. m_nBASETEXTURE = i;
  14. #ifdef _DEBUG
  15. m_bBASETEXTURE = true;
  16. #endif
  17. }
  18. void SetBASETEXTURE( bool i )
  19. {
  20. m_nBASETEXTURE = i ? 1 : 0;
  21. #ifdef _DEBUG
  22. m_bBASETEXTURE = true;
  23. #endif
  24. }
  25. private:
  26. int m_nMULTITEXTURE;
  27. #ifdef _DEBUG
  28. bool m_bMULTITEXTURE;
  29. #endif
  30. public:
  31. void SetMULTITEXTURE( int i )
  32. {
  33. Assert( i >= 0 && i <= 1 );
  34. m_nMULTITEXTURE = i;
  35. #ifdef _DEBUG
  36. m_bMULTITEXTURE = true;
  37. #endif
  38. }
  39. void SetMULTITEXTURE( bool i )
  40. {
  41. m_nMULTITEXTURE = i ? 1 : 0;
  42. #ifdef _DEBUG
  43. m_bMULTITEXTURE = true;
  44. #endif
  45. }
  46. public:
  47. water_vs20_Static_Index( )
  48. {
  49. #ifdef _DEBUG
  50. m_bBASETEXTURE = false;
  51. #endif // _DEBUG
  52. m_nBASETEXTURE = 0;
  53. #ifdef _DEBUG
  54. m_bMULTITEXTURE = false;
  55. #endif // _DEBUG
  56. m_nMULTITEXTURE = 0;
  57. }
  58. int GetIndex()
  59. {
  60. // Asserts to make sure that we aren't using any skipped combinations.
  61. // Asserts to make sure that we are setting all of the combination vars.
  62. #ifdef _DEBUG
  63. bool bAllStaticVarsDefined = m_bBASETEXTURE && m_bMULTITEXTURE;
  64. Assert( bAllStaticVarsDefined );
  65. #endif // _DEBUG
  66. return ( 1 * m_nBASETEXTURE ) + ( 2 * m_nMULTITEXTURE ) + 0;
  67. }
  68. };
  69. #define shaderStaticTest_water_vs20 vsh_forgot_to_set_static_BASETEXTURE + vsh_forgot_to_set_static_MULTITEXTURE + 0
  70. class water_vs20_Dynamic_Index
  71. {
  72. public:
  73. water_vs20_Dynamic_Index()
  74. {
  75. }
  76. int GetIndex()
  77. {
  78. // Asserts to make sure that we aren't using any skipped combinations.
  79. // Asserts to make sure that we are setting all of the combination vars.
  80. #ifdef _DEBUG
  81. #endif // _DEBUG
  82. return 0;
  83. }
  84. };
  85. #define shaderDynamicTest_water_vs20 0