FPMatNav.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /**********************************************************************
  19. *<
  20. FILE: FPMatNav.h
  21. DESCRIPTION: Function published access for material navigator messages
  22. CREATED BY: Michael Russo
  23. HISTORY: 02-08-2002 Created
  24. *> Copyright (c) 2000, All Rights Reserved.
  25. **********************************************************************/
  26. #if !defined __FPMATNAV__
  27. #define __FPMATNAV__
  28. #include "max.h"
  29. #include "iFnPub.h"
  30. #define FPMATNAV_INTERFACE Interface_ID(0x60151ad4, 0x3b325af3)
  31. inline class IFPMatNav* GetFPMatNav() {
  32. return (IFPMatNav*)GetCOREInterface(FPMATNAV_INTERFACE);
  33. }
  34. #define MATNAV_ELEMENT_UNKNOWN -1
  35. #define MATNAV_ELEMENT_AMBIENT 0
  36. #define MATNAV_ELEMENT_DIFFUSE 1
  37. #define MATNAV_ELEMENT_COLOR 2
  38. #define MATNAV_ELEMENT_LEVEL 3
  39. #define MATNAV_ELEMENT_GLOSSINESS 4
  40. #define MATNAV_ELEMENT_SELFILLUM 5
  41. #define MATNAV_ELEMENT_BUMP 6
  42. ///////////////////////////////////////////////////////////////////////////////
  43. //
  44. // IFPMatNav fSetMultiMaterialBySlot
  45. //
  46. ///////////////////////////////////////////////////////////////////////////////
  47. class IFPMatNav
  48. {
  49. public:
  50. virtual void Launch(void) = 0;
  51. virtual void SetMultiMaterialTabBySlot( int iSlot, int iSubMtlTexIndex, int iElement ) = 0;
  52. virtual void SetMaterialTabBySlot( int iSlot, int iElement ) = 0;
  53. virtual void SetMultiMaterialBySlot( int iSlot, int iIndex ) = 0;
  54. virtual void SetMaterialBySlot( int iSlot ) = 0;
  55. // function IDs
  56. enum { idLaunch, idSetMultiMaterialTabBySlot,
  57. idSetMaterialTabBySlot, idSetMultiMaterialBySlot,
  58. idSetMaterialBySlot };
  59. };
  60. class FPMatNav : public IFPMatNav, public FPStaticInterface
  61. {
  62. public:
  63. //
  64. // Setup Callback
  65. //
  66. void SetIFPMatNavCallback( IFPMatNav *pIFPMatNav ) { m_pIFPMatNavCallback = pIFPMatNav; };
  67. //
  68. // IFPMatNav Methods
  69. //
  70. void Launch(void);
  71. void SetMultiMaterialTabBySlot( int iSlot, int iSubMtlTexIndex, int iElement );
  72. void SetMaterialTabBySlot( int iSlot, int iElement );
  73. void SetMultiMaterialBySlot( int iSlot, int iIndex );
  74. void SetMaterialBySlot( int iSlot );
  75. DECLARE_DESCRIPTOR(FPMatNav)
  76. BEGIN_FUNCTION_MAP
  77. VFN_0(IFPMatNav::idLaunch, Launch);
  78. VFN_3(IFPMatNav::idSetMultiMaterialTabBySlot, SetMultiMaterialTabBySlot, TYPE_INT, TYPE_INT, TYPE_INT);
  79. VFN_2(IFPMatNav::idSetMaterialTabBySlot, SetMaterialTabBySlot, TYPE_INT, TYPE_INT);
  80. VFN_2(IFPMatNav::idSetMultiMaterialBySlot, SetMultiMaterialBySlot, TYPE_INT, TYPE_INT);
  81. VFN_1(IFPMatNav::idSetMaterialBySlot, SetMaterialBySlot, TYPE_INT);
  82. END_FUNCTION_MAP
  83. public:
  84. static IFPMatNav *m_pIFPMatNavCallback;
  85. };
  86. extern FPMatNav fpMatNav;
  87. #endif