SceneLightDialog.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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_SCENELIGHTDIALOG_H__AF3CDE89_61EC_11D2_9FC7_00104B791122__INCLUDED_)
  19. #define AFX_SCENELIGHTDIALOG_H__AF3CDE89_61EC_11D2_9FC7_00104B791122__INCLUDED_
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif // _MSC_VER >= 1000
  23. // SceneLightDialog.h : header file
  24. //
  25. // Forward declarations
  26. class Vector3;
  27. /////////////////////////////////////////////////////////////////////////////
  28. //
  29. // CSceneLightDialog dialog
  30. //
  31. class CSceneLightDialog : public CDialog
  32. {
  33. // Construction
  34. public:
  35. CSceneLightDialog(CWnd* pParent = NULL); // standard constructor
  36. // Dialog Data
  37. //{{AFX_DATA(CSceneLightDialog)
  38. enum { IDD = IDD_LIGHT_SCENE_DIALOG };
  39. CSpinButtonCtrl m_StartAttenSpin;
  40. CSpinButtonCtrl m_EndAttenSpin;
  41. CSpinButtonCtrl m_DistanceSpin;
  42. CSliderCtrl m_IntensitySlider;
  43. CSliderCtrl m_blueSlider;
  44. CSliderCtrl m_greenSlider;
  45. CSliderCtrl m_redSlider;
  46. //}}AFX_DATA
  47. // Overrides
  48. // ClassWizard generated virtual function overrides
  49. //{{AFX_VIRTUAL(CSceneLightDialog)
  50. protected:
  51. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  52. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  53. //}}AFX_VIRTUAL
  54. // Implementation
  55. protected:
  56. // Generated message map functions
  57. //{{AFX_MSG(CSceneLightDialog)
  58. virtual BOOL OnInitDialog();
  59. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  60. virtual void OnCancel();
  61. afx_msg void OnGrayscaleCheck();
  62. afx_msg void OnChannelBothRadio();
  63. afx_msg void OnChannelDiffuseRadio();
  64. afx_msg void OnChannelSpecularRadio();
  65. afx_msg void OnAttenuationCheck();
  66. //}}AFX_MSG
  67. DECLARE_MESSAGE_MAP()
  68. protected:
  69. ////////////////////////////////////////////////////////////////////
  70. //
  71. // Protected methods
  72. //
  73. void Set_Color_Control_State (const Vector3 &color);
  74. void Update_Light (const Vector3 &color);
  75. void Update_Distance (float distance);
  76. void Update_Attenuation (void);
  77. void Update_Attenuation_Controls (void);
  78. private:
  79. ////////////////////////////////////////////////////////////////////
  80. //
  81. // Private data types
  82. //
  83. typedef enum
  84. {
  85. DIFFUSE = 2,
  86. SPECULAR = 4,
  87. BOTH = DIFFUSE | SPECULAR
  88. } CHANNEL;
  89. ////////////////////////////////////////////////////////////////////
  90. //
  91. // Private member data
  92. //
  93. int m_InitialRedDiffuse;
  94. int m_InitialGreenDiffuse;
  95. int m_InitialBlueDiffuse;
  96. int m_InitialRedSpecular;
  97. int m_InitialGreenSpecular;
  98. int m_InitialBlueSpecular;
  99. CHANNEL m_CurrentChannel;
  100. float m_InitialStartAtten;
  101. float m_InitialEndAtten;
  102. float m_InitialDistance;
  103. float m_InitialIntensity;
  104. BOOL m_InitialAttenOn;
  105. };
  106. //{{AFX_INSERT_LOCATION}}
  107. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  108. #endif // !defined(AFX_SCENELIGHTDIALOG_H__AF3CDE89_61EC_11D2_9FC7_00104B791122__INCLUDED_)