MainFrm.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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. // MainFrm.h : interface of the CMainFrame class
  19. //
  20. /////////////////////////////////////////////////////////////////////////////
  21. #if !defined(AFX_MAINFRM_H__2BB39E2F_5D3A_11D2_9FC6_00104B791122__INCLUDED_)
  22. #define AFX_MAINFRM_H__2BB39E2F_5D3A_11D2_9FC6_00104B791122__INCLUDED_
  23. #if _MSC_VER >= 1000
  24. #pragma once
  25. #endif // _MSC_VER >= 1000
  26. #include "DataTreeView.H"
  27. #include "Toolbar.H"
  28. class CMainFrame : public CFrameWnd
  29. {
  30. protected: // create from serialization only
  31. CMainFrame();
  32. DECLARE_DYNCREATE(CMainFrame)
  33. // Attributes
  34. protected:
  35. CSplitterWnd m_wndSplitter;
  36. public:
  37. // Operations
  38. public:
  39. // Overrides
  40. // ClassWizard generated virtual function overrides
  41. //{{AFX_VIRTUAL(CMainFrame)
  42. public:
  43. virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  44. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  45. virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  46. protected:
  47. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  48. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  49. //}}AFX_VIRTUAL
  50. // Implementation
  51. public:
  52. virtual ~CMainFrame();
  53. #ifdef _DEBUG
  54. virtual void AssertValid() const;
  55. virtual void Dump(CDumpContext& dc) const;
  56. #endif
  57. protected: // control bar embedded members
  58. CStatusBar m_wndStatusBar;
  59. CToolBar m_wndToolBar;
  60. // Generated message map functions
  61. protected:
  62. //{{AFX_MSG(CMainFrame)
  63. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  64. afx_msg void OnObjectProperties();
  65. afx_msg void OnUpdateObjectProperties(CCmdUI* pCmdUI);
  66. afx_msg void OnLodGenerate();
  67. afx_msg void OnActivateApp(BOOL bActive, HTASK hTask);
  68. afx_msg void OnFileOpen();
  69. afx_msg void OnAniSpeed();
  70. afx_msg void OnAniStop();
  71. afx_msg void OnAniStart();
  72. afx_msg void OnAniPause();
  73. afx_msg void OnCameraBack();
  74. afx_msg void OnCameraBottom();
  75. afx_msg void OnCameraFront();
  76. afx_msg void OnCameraLeft();
  77. afx_msg void OnCameraReset();
  78. afx_msg void OnCameraRight();
  79. afx_msg void OnCameraTop();
  80. afx_msg void OnObjectRotateZ();
  81. afx_msg void OnObjectRotateY();
  82. afx_msg void OnObjectRotateX();
  83. afx_msg void OnLightAmbient();
  84. afx_msg void OnLightScene();
  85. afx_msg void OnBackgroundColor();
  86. afx_msg void OnBackgroundBMP();
  87. afx_msg void OnSaveSettings();
  88. afx_msg void OnLoadSettings();
  89. afx_msg void OnLODSetSwitch();
  90. afx_msg void OnLODSave();
  91. afx_msg void OnLODSaveAll();
  92. afx_msg void OnBackgroundObject();
  93. afx_msg void OnUpdateViewAnimationBar(CCmdUI* pCmdUI);
  94. afx_msg void OnUpdateViewObjectBar(CCmdUI* pCmdUI);
  95. afx_msg void OnViewAnimationBar();
  96. afx_msg void OnViewObjectBar();
  97. afx_msg void OnAniStepFwd();
  98. afx_msg void OnAniStepBkwd();
  99. afx_msg void OnObjectReset();
  100. afx_msg void OnCameraAllowRotateX();
  101. afx_msg void OnCameraAllowRotateY();
  102. afx_msg void OnCameraAllowRotateZ();
  103. afx_msg void OnUpdateCameraAllowRotateX(CCmdUI* pCmdUI);
  104. afx_msg void OnUpdateCameraAllowRotateY(CCmdUI* pCmdUI);
  105. afx_msg void OnUpdateCameraAllowRotateZ(CCmdUI* pCmdUI);
  106. afx_msg void OnUpdateObjectRotateX(CCmdUI* pCmdUI);
  107. afx_msg void OnUpdateObjectRotateY(CCmdUI* pCmdUI);
  108. afx_msg void OnUpdateObjectRotateZ(CCmdUI* pCmdUI);
  109. afx_msg void OnDeviceChange();
  110. afx_msg void OnViewFullscreen();
  111. afx_msg void OnUpdateViewFullscreen(CCmdUI* pCmdUI);
  112. afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
  113. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  114. afx_msg void OnCreateEmitter();
  115. afx_msg void OnEditEmitter();
  116. afx_msg void OnUpdateEditEmitter(CCmdUI* pCmdUI);
  117. afx_msg void OnSaveEmitter();
  118. afx_msg void OnUpdateSaveEmitter(CCmdUI* pCmdUI);
  119. afx_msg void OnBoneAutoAssign();
  120. afx_msg void OnBoneManagement();
  121. afx_msg void OnSaveAggregate();
  122. afx_msg void OnCameraAnimate();
  123. afx_msg void OnUpdateCameraAnimate(CCmdUI* pCmdUI);
  124. afx_msg void OnUpdateLodSave(CCmdUI* pCmdUI);
  125. afx_msg void OnUpdateSaveAggregate(CCmdUI* pCmdUI);
  126. afx_msg void OnCameraResetOnLoad();
  127. afx_msg void OnUpdateCameraResetOnLoad(CCmdUI* pCmdUI);
  128. afx_msg void OnObjectRotateYBack();
  129. afx_msg void OnObjectRotateZBack();
  130. afx_msg void OnLightRotateY();
  131. afx_msg void OnLightRotateYBack();
  132. afx_msg void OnLightRotateZ();
  133. afx_msg void OnLightRotateZBack();
  134. afx_msg void OnDestroy();
  135. afx_msg void OnDecLight();
  136. afx_msg void OnIncLight();
  137. afx_msg void OnDecAmbientLight();
  138. afx_msg void OnIncAmbientLight();
  139. afx_msg void OnMakeAggregate();
  140. afx_msg void OnRenameAggregate();
  141. afx_msg void OnCrashApp();
  142. afx_msg void OnLODRecordScreenArea();
  143. afx_msg void OnLODIncludeNull();
  144. afx_msg void OnUpdateLODIncludeNull(CCmdUI* pCmdUI);
  145. afx_msg void OnLodPrevLevel();
  146. afx_msg void OnUpdateLodPrevLevel(CCmdUI* pCmdUI);
  147. afx_msg void OnLodNextLevel();
  148. afx_msg void OnUpdateLodNextLevel(CCmdUI* pCmdUI);
  149. afx_msg void OnLodAutoswitch();
  150. afx_msg void OnUpdateLodAutoswitch(CCmdUI* pCmdUI);
  151. afx_msg void OnUpdateMakeMovie(CCmdUI* pCmdUI);
  152. afx_msg void OnMakeMovie();
  153. afx_msg void OnSaveScreenshot();
  154. afx_msg void OnSlideshowDown();
  155. afx_msg void OnSlideshowUp();
  156. afx_msg void OnAdvancedAnim();
  157. afx_msg void OnUpdateAdvancedAnim(CCmdUI* pCmdUI);
  158. afx_msg void OnCameraSettings();
  159. afx_msg void OnCopyScreenSize();
  160. afx_msg void OnListMissingTextures();
  161. afx_msg void OnCopyAssets();
  162. afx_msg void OnUpdateCopyAssets(CCmdUI* pCmdUI);
  163. afx_msg void OnLightingExpose();
  164. afx_msg void OnUpdateLightingExpose(CCmdUI* pCmdUI);
  165. afx_msg void OnTexturePath();
  166. afx_msg void OnChangeResolution();
  167. afx_msg void OnCreateSphere();
  168. afx_msg void OnCreateRing();
  169. afx_msg void OnUpdateEditPrimitive(CCmdUI* pCmdUI);
  170. afx_msg void OnEditPrimitive();
  171. afx_msg void OnExportPrimitive();
  172. afx_msg void OnUpdateExportPrimitive(CCmdUI* pCmdUI);
  173. afx_msg void OnKillSceneLight();
  174. afx_msg void OnPrelitMultipass();
  175. afx_msg void OnUpdatePrelitMultipass(CCmdUI* pCmdUI);
  176. afx_msg void OnPrelitMultitex();
  177. afx_msg void OnUpdatePrelitMultitex(CCmdUI* pCmdUI);
  178. afx_msg void OnPrelitVertex();
  179. afx_msg void OnUpdatePrelitVertex(CCmdUI* pCmdUI);
  180. afx_msg void OnAddToLineup();
  181. afx_msg void OnUpdateAddToLineup(CCmdUI* pCmdUI);
  182. afx_msg void OnImportFacialAnims();
  183. afx_msg void OnUpdateImportFacialAnims(CCmdUI* pCmdUI);
  184. afx_msg void OnRestrictAnims();
  185. afx_msg void OnUpdateRestrictAnims(CCmdUI* pCmdUI);
  186. afx_msg void OnBindSubobjectLod();
  187. afx_msg void OnUpdateBindSubobjectLod(CCmdUI* pCmdUI);
  188. afx_msg void OnSetCameraDistance();
  189. afx_msg void OnObjectAlternateMaterials();
  190. afx_msg void OnCreateSoundObject();
  191. afx_msg void OnEditSoundObject();
  192. afx_msg void OnUpdateEditSoundObject(CCmdUI* pCmdUI);
  193. afx_msg void OnExportSoundObj();
  194. afx_msg void OnUpdateExportSoundObj(CCmdUI* pCmdUI);
  195. afx_msg void OnWireframeMode();
  196. afx_msg void OnUpdateWireframeMode(CCmdUI* pCmdUI);
  197. afx_msg void OnUpdateBackgroundFog(CCmdUI* pCmdUI);
  198. afx_msg void OnBackgroundFog();
  199. afx_msg void OnUpdateScaleEmitter(CCmdUI* pCmdUI);
  200. afx_msg void OnScaleEmitter();
  201. afx_msg void OnUpdateToggleSorting(CCmdUI* pCmdUI);
  202. afx_msg void OnToggleSorting();
  203. afx_msg void OnCameraBonePosX();
  204. afx_msg void OnUpdateCameraBonePosX(CCmdUI* pCmdUI);
  205. afx_msg void OnViewPatchGapFill();
  206. afx_msg void OnUpdateViewPatchGapFill(CCmdUI* pCmdUI);
  207. afx_msg void OnViewSubdivision1();
  208. afx_msg void OnUpdateViewSubdivision1(CCmdUI* pCmdUI);
  209. afx_msg void OnViewSubdivision2();
  210. afx_msg void OnUpdateViewSubdivision2(CCmdUI* pCmdUI);
  211. afx_msg void OnViewSubdivision3();
  212. afx_msg void OnUpdateViewSubdivision3(CCmdUI* pCmdUI);
  213. afx_msg void OnViewSubdivision4();
  214. afx_msg void OnUpdateViewSubdivision4(CCmdUI* pCmdUI);
  215. afx_msg void OnViewSubdivision5();
  216. afx_msg void OnUpdateViewSubdivision5(CCmdUI* pCmdUI);
  217. afx_msg void OnViewSubdivision6();
  218. afx_msg void OnUpdateViewSubdivision6(CCmdUI* pCmdUI);
  219. afx_msg void OnViewSubdivision7();
  220. afx_msg void OnUpdateViewSubdivision7(CCmdUI* pCmdUI);
  221. afx_msg void OnViewSubdivision8();
  222. afx_msg void OnUpdateViewSubdivision8(CCmdUI* pCmdUI);
  223. afx_msg void OnMungeSortOnLoad();
  224. afx_msg void OnUpdateMungeSortOnLoad(CCmdUI* pCmdUI);
  225. afx_msg void OnEnableGammaCorrection();
  226. afx_msg void OnUpdateEnableGammaCorrection(CCmdUI* pCmdUI);
  227. afx_msg void OnSetGamma();
  228. afx_msg void OnEditAnimatedSoundsOptions();
  229. //}}AFX_MSG
  230. DECLARE_MESSAGE_MAP()
  231. public:
  232. //////////////////////////////////////////////////////////////////////
  233. // Public methods
  234. //////////////////////////////////////////////////////////////////////
  235. CView *GetPane (int iRow, int iCol) const
  236. { return (CView *)m_wndSplitter.GetPane (iRow, iCol); }
  237. void ShowObjectProperties (void);
  238. void OnSelectionChanged (ASSET_TYPE newAssetType);
  239. void Update_Frame_Time (DWORD milliseconds);
  240. void UpdatePolygonCount (int iPolygons);
  241. void Update_Particle_Count (int particles);
  242. void UpdateCameraDistance (float cameraDistance);
  243. void UpdateFrameCount (int iCurrentFrame, int iTotalFrames, float frame_rate);
  244. void RestoreOriginalSize (void);
  245. void Select_Device (bool show_dlg = true);
  246. HMENU Get_Emitters_List_Menu (void) const { return m_hEmittersSubMenu; }
  247. void Update_Emitters_List (void);
  248. protected:
  249. //////////////////////////////////////////////////////////////////////
  250. // Protected methods
  251. //////////////////////////////////////////////////////////////////////
  252. void Restore_Window_State (void);
  253. private:
  254. //////////////////////////////////////////////////////////////////////
  255. // Private member data
  256. //////////////////////////////////////////////////////////////////////
  257. ASSET_TYPE m_currentAssetType;
  258. CFancyToolbar m_objectToolbar;
  259. CFancyToolbar m_animationToolbar;
  260. BOOL m_bShowAnimationBar;
  261. RECT m_OrigRect;
  262. HMENU m_hEmittersSubMenu;
  263. BOOL m_bInitialized;
  264. };
  265. /////////////////////////////////////////////////////////////////////////////
  266. //{{AFX_INSERT_LOCATION}}
  267. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  268. #endif // !defined(AFX_MAINFRM_H__2BB39E2F_5D3A_11D2_9FC6_00104B791122__INCLUDED_)