LightSolveOptionsDialog.cpp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. // LightSolveOptionsDialog.cpp : implementation file
  19. //
  20. #include "stdafx.h"
  21. #include "leveledit.h"
  22. #include "sceneeditor.h"
  23. #include "utils.h"
  24. #include "lightsolveoptionsdialog.h"
  25. #include "lightsolveprogressdialog.h"
  26. #include "phys.h"
  27. #include "rendobj.h"
  28. #include "lightsolvecontext.h"
  29. #include "pscene.h"
  30. #ifdef _DEBUG
  31. #define new DEBUG_NEW
  32. #undef THIS_FILE
  33. static char THIS_FILE[] = __FILE__;
  34. #endif
  35. /////////////////////////////////////////////////////////////////////////////
  36. // LightSolveOptionsDialogClass dialog
  37. LightSolveOptionsDialogClass::LightSolveOptionsDialogClass(CWnd* pParent /*=NULL*/)
  38. : CDialog(LightSolveOptionsDialogClass::IDD, pParent)
  39. {
  40. //{{AFX_DATA_INIT(LightSolveOptionsDialogClass)
  41. // NOTE: the ClassWizard will add member initialization here
  42. //}}AFX_DATA_INIT
  43. }
  44. void LightSolveOptionsDialogClass::DoDataExchange(CDataExchange* pDX)
  45. {
  46. CDialog::DoDataExchange(pDX);
  47. //{{AFX_DATA_MAP(LightSolveOptionsDialogClass)
  48. // NOTE: the ClassWizard will add DDX and DDV calls here
  49. //}}AFX_DATA_MAP
  50. }
  51. BEGIN_MESSAGE_MAP(LightSolveOptionsDialogClass, CDialog)
  52. //{{AFX_MSG_MAP(LightSolveOptionsDialogClass)
  53. //}}AFX_MSG_MAP
  54. END_MESSAGE_MAP()
  55. /////////////////////////////////////////////////////////////////////////////
  56. // LightSolveOptionsDialogClass message handlers
  57. BOOL LightSolveOptionsDialogClass::OnInitDialog()
  58. {
  59. CDialog::OnInitDialog();
  60. return TRUE;
  61. }
  62. void LightSolveOptionsDialogClass::OnOK()
  63. {
  64. LightSolveContextClass context;
  65. SceneEditorClass *scene = ::Get_Scene_Editor ();
  66. //
  67. // Setup the solve options
  68. //
  69. context.Enable_Occlusion(SendDlgItemMessage(IDC_LIGHT_SOLVE_OCCLUSION,BM_GETCHECK));
  70. context.Enable_Filtering(SendDlgItemMessage(IDC_LIGHT_SOLVE_FILTERING,BM_GETCHECK));
  71. //
  72. // Run the solve
  73. //
  74. LightSolveProgressDialog::Solve(context,this);
  75. CDialog::OnOK ();
  76. return ;
  77. }