GameMtlForm.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Max2W3d *
  23. * *
  24. * $Archive:: /Commando/Code/Tools/max2w3d/GameMtlForm.h $*
  25. * *
  26. * Author:: Greg Hjelstrom *
  27. * *
  28. * $Modtime:: 1/17/02 3:14p $*
  29. * *
  30. * $Revision:: 4 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef GAMEMTLFORM_H
  36. #define GAMEMTLFORM_H
  37. #include "FormClass.h"
  38. class GameMtl;
  39. #if defined W3D_GMAXDEV
  40. class FakeIMtlParams : public IMtlParams{
  41. public:
  42. TimeValue GetTime(){ return GetCOREInterface()->GetTime();}
  43. virtual void MtlChanged(){};
  44. virtual HWND AddRollupPage( HINSTANCE hInst, DLGTEMPLATE *dlgTemplate,
  45. DLGPROC dlgProc, TCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD ){return NULL;}
  46. virtual HWND AddRollupPage( HINSTANCE hInst, TCHAR *dlgTemplate,
  47. DLGPROC dlgProc, TCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD ){return NULL;};
  48. virtual HWND ReplaceRollupPage( HWND hOldRollup, HINSTANCE hInst, TCHAR *dlgTemplate,
  49. DLGPROC dlgProc, TCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD ){return NULL;}
  50. virtual HWND ReplaceRollupPage( HWND hOldRollup, HINSTANCE hInst, DLGTEMPLATE *dlgTemplate,
  51. DLGPROC dlgProc, TCHAR *title, LPARAM param=0,DWORD flags=0, int category = ROLLUP_CAT_STANDARD ){return NULL;};
  52. virtual void DeleteRollupPage( HWND hRollup ){};
  53. virtual void RollupMouseMessage( HWND hDlg, UINT message,WPARAM wParam, LPARAM lParam ){};
  54. virtual void RegisterTimeChangeCallback(TimeChangeCallback *tc){}
  55. virtual void UnRegisterTimeChangeCallback(TimeChangeCallback *tc){}
  56. virtual void RegisterDlgWnd( HWND hDlg ){};
  57. virtual int UnRegisterDlgWnd( HWND hDlg ){return 0;};
  58. // get the current time.
  59. // Pick an object from the scene
  60. virtual void SetPickMode(PickObjectProc *proc){};
  61. virtual void EndPickMode(){};
  62. // JBW 10/19/98: get interface to mtl editor rollup
  63. virtual IRollupWindow *GetMtlEditorRollup(){return NULL;}
  64. virtual int IsRollupPanelOpen(HWND hwnd){return 0;}
  65. virtual int GetRollupScrollPos(){return 0;}
  66. virtual void SetRollupScrollPos(int spos){}
  67. Mtl* Multi_mtl_list;
  68. };
  69. #endif
  70. class GameMtlFormClass : public FormClass
  71. {
  72. public:
  73. GameMtlFormClass(IMtlParams * imtl_params,GameMtl * mtl,int pass);
  74. void SetThing(ReferenceTarget *m);
  75. ReferenceTarget* GetThing(void);
  76. void DeleteThis(void);
  77. Class_ID ClassID(void);
  78. void SetTime(TimeValue t);
  79. protected:
  80. #if !defined W3D_GMAXDEV
  81. IMtlParams * IParams; // interface to the material editor
  82. #else
  83. FakeIMtlParams * IParams; // interface to the material editor
  84. #endif
  85. GameMtl * TheMtl; // current mtl being edited.
  86. int PassIndex; // material pass that this form edits
  87. };
  88. #endif