EmitterGeneralPropPage.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. #if !defined(AFX_EMITTERGENERALPROPPAGE_H__83A8B83C_BA3B_11D2_9FFA_00104B791122__INCLUDED_)
  19. #define AFX_EMITTERGENERALPROPPAGE_H__83A8B83C_BA3B_11D2_9FFA_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // EmitterGeneralPropPage.h : header file
  24. //
  25. #include "Resource.H"
  26. #include "Shader.H"
  27. // Forward delcarations
  28. class EmitterInstanceListClass;
  29. class EmitterPropertySheetClass;
  30. /////////////////////////////////////////////////////////////////////////////
  31. //
  32. // EmitterGeneralPropPageClass dialog
  33. //
  34. class EmitterGeneralPropPageClass : public CPropertyPage
  35. {
  36. DECLARE_DYNCREATE(EmitterGeneralPropPageClass)
  37. // Construction
  38. public:
  39. EmitterGeneralPropPageClass (EmitterInstanceListClass *pemitter_list = NULL);
  40. ~EmitterGeneralPropPageClass ();
  41. // Dialog Data
  42. //{{AFX_DATA(EmitterGeneralPropPageClass)
  43. enum { IDD = IDD_PROP_PAGE_EMITTER_GEN };
  44. CComboBox m_RenderModeCombo;
  45. CSpinButtonCtrl m_LifetimeSpin;
  46. //}}AFX_DATA
  47. // Overrides
  48. // ClassWizard generate virtual function overrides
  49. //{{AFX_VIRTUAL(EmitterGeneralPropPageClass)
  50. public:
  51. virtual BOOL OnApply();
  52. protected:
  53. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  54. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  55. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  56. //}}AFX_VIRTUAL
  57. // Implementation
  58. protected:
  59. // Generated message map functions
  60. //{{AFX_MSG(EmitterGeneralPropPageClass)
  61. virtual BOOL OnInitDialog();
  62. afx_msg void OnBrowseButton();
  63. afx_msg void OnChangeFilenameEdit();
  64. afx_msg void OnChangeNameEdit();
  65. afx_msg void OnChangeParticleLifetimeEdit();
  66. afx_msg void OnSelchangeShaderCombo();
  67. afx_msg void OnParticleLifetimeCheck();
  68. //}}AFX_MSG
  69. DECLARE_MESSAGE_MAP()
  70. public:
  71. /////////////////////////////////////////////////////////
  72. //
  73. // Public methods
  74. //
  75. //
  76. // Inline accessors
  77. //
  78. EmitterInstanceListClass * Get_Emitter (void) const { return m_pEmitterList; }
  79. void Set_Emitter (EmitterInstanceListClass *pemitter_list) { m_pEmitterList = pemitter_list; Initialize (); }
  80. EmitterPropertySheetClass *Get_Parent (void) const { return m_Parent; }
  81. void Set_Parent (EmitterPropertySheetClass * parent) { m_Parent = parent; }
  82. bool Is_Data_Valid (void) const { return m_bValid; }
  83. const CString & Get_Name (void) const { return m_EmitterName; }
  84. const CString & Get_Texture_Filename (void) const { return m_TextureFilename; }
  85. float Get_Lifetime (void) const { return m_Lifetime; }
  86. const ShaderClass & Get_Shader (void) const { return m_Shader; }
  87. //void Get_Shader (ShaderClass &shader);
  88. protected:
  89. /////////////////////////////////////////////////////////
  90. //
  91. // Protected methods
  92. //
  93. void Initialize (void);
  94. void Add_Shader_To_Combo (ShaderClass &shader, LPCTSTR name);
  95. private:
  96. /////////////////////////////////////////////////////////
  97. //
  98. // Private member data
  99. //
  100. EmitterInstanceListClass * m_pEmitterList;
  101. EmitterPropertySheetClass *m_Parent;
  102. CString m_EmitterName;
  103. CString m_TextureFilename;
  104. ShaderClass m_Shader;
  105. //int m_ShaderType;
  106. float m_Lifetime;
  107. bool m_bValid;
  108. };
  109. //{{AFX_INSERT_LOCATION}}
  110. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  111. #endif // !defined(AFX_EMITTERGENERALPROPPAGE_H__83A8B83C_BA3B_11D2_9FFA_00104B791122__INCLUDED_)