MainFrm.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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__616293E8_E4F0_11D2_802E_0040056350C8__INCLUDED_)
  22. #define AFX_MAINFRM_H__616293E8_E4F0_11D2_802E_0040056350C8__INCLUDED_
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. class Vector3;
  27. class CVJoyDialog;
  28. class PhysClass;
  29. class MoveablePhysClass;
  30. class RigidBodyClass;
  31. class MotorVehicleClass;
  32. class WheeledVehicleClass;
  33. class MotorcycleClass;
  34. class CPhysTestDoc;
  35. class ChunkLoadClass;
  36. class ChunkSaveClass;
  37. class CMainFrame : public CFrameWnd
  38. {
  39. protected: // create from serialization only
  40. CMainFrame();
  41. DECLARE_DYNCREATE(CMainFrame)
  42. // Attributes
  43. protected:
  44. CSplitterWnd Splitter;
  45. CVJoyDialog * VirtualJoystick;
  46. MoveablePhysClass * ControlledObject;
  47. public:
  48. // Operations
  49. public:
  50. // Overrides
  51. // ClassWizard generated virtual function overrides
  52. //{{AFX_VIRTUAL(CMainFrame)
  53. public:
  54. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  55. protected:
  56. virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  57. //}}AFX_VIRTUAL
  58. // Implementation
  59. public:
  60. virtual ~CMainFrame();
  61. CView * Get_Pane(int iRow, int iCol) const { return (CView *)Splitter.GetPane(iRow, iCol); }
  62. void Apply_Impulse(const Vector3 & imp);
  63. void Apply_Couple(const Vector3 & p0,const Vector3 & i0,const Vector3 & p1,const Vector3 & i1);
  64. void Set_Status_Bar_Text(const char * text);
  65. void Notify_Selection_Changed(void);
  66. const char * Peek_Selected_Model(void);
  67. PhysClass * Peek_Selected_Object(void);
  68. MoveablePhysClass * Peek_Selected_MoveablePhysClass(void);
  69. RigidBodyClass * Peek_Selected_RigidBodyClass(void);
  70. MotorVehicleClass * Peek_Selected_MotorVehicleClass(void);
  71. WheeledVehicleClass * Peek_Selected_WheeledVehicleClass(void);
  72. MotorcycleClass * Peek_Selected_MotorcycleClass(void);
  73. void Add_Object(PhysClass * new_obj);
  74. CPhysTestDoc * Get_Document(void);
  75. void Save(ChunkSaveClass & csave);
  76. void Load(ChunkLoadClass & cload);
  77. #ifdef _DEBUG
  78. virtual void AssertValid() const;
  79. virtual void Dump(CDumpContext& dc) const;
  80. #endif
  81. protected:
  82. CStatusBar m_wndStatusBar;
  83. CToolBar m_wndToolBar;
  84. CToolBar m_wndImpulseToolBar;
  85. // Generated message map functions
  86. protected:
  87. //{{AFX_MSG(CMainFrame)
  88. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  89. afx_msg void OnActivateApp(BOOL bActive, HTASK hTask);
  90. afx_msg void OnOptionsRunSimulation();
  91. afx_msg void OnUpdateOptionsRunSimulation(CCmdUI* pCmdUI);
  92. afx_msg void OnOptionsDisplayBoxes();
  93. afx_msg void OnUpdateOptionsDisplayBoxes(CCmdUI* pCmdUI);
  94. afx_msg void OnCreateRigidBody();
  95. afx_msg void OnUpdateImpulseButton(CCmdUI* pCmdUI);
  96. afx_msg void OnCoupleNegx();
  97. afx_msg void OnCoupleNegy();
  98. afx_msg void OnCoupleNegz();
  99. afx_msg void OnCouplePosx();
  100. afx_msg void OnCouplePosy();
  101. afx_msg void OnCouplePosz();
  102. afx_msg void OnImpulseNegx();
  103. afx_msg void OnImpulseNegy();
  104. afx_msg void OnImpulseNegz();
  105. afx_msg void OnImpulsePosx();
  106. afx_msg void OnImpulsePosy();
  107. afx_msg void OnImpulsePosz();
  108. afx_msg void OnViewImpulsetoolbar();
  109. afx_msg void OnUpdateViewImpulsetoolbar(CCmdUI* pCmdUI);
  110. afx_msg void OnProperties();
  111. afx_msg void OnInertia();
  112. afx_msg void OnOptionsPhysicsConstants();
  113. afx_msg void OnFreezeObject();
  114. afx_msg void OnDebugObject();
  115. afx_msg void OnUpdateDebugObject(CCmdUI* pCmdUI);
  116. afx_msg void OnViewVirtualjoystick();
  117. afx_msg void OnUpdateViewVirtualjoystick(CCmdUI* pCmdUI);
  118. afx_msg void OnDestroy();
  119. afx_msg void OnOptionsFilled();
  120. afx_msg void OnUpdateOptionsFilled(CCmdUI* pCmdUI);
  121. afx_msg void OnOptionsPoints();
  122. afx_msg void OnUpdateOptionsPoints(CCmdUI* pCmdUI);
  123. afx_msg void OnOptionsWireframe();
  124. afx_msg void OnUpdateOptionsWireframe(CCmdUI* pCmdUI);
  125. afx_msg void OnMotorProperties();
  126. afx_msg void OnWheelProperties();
  127. afx_msg void OnUpdateWheelProperties(CCmdUI* pCmdUI);
  128. afx_msg void OnUpdateMotorProperties(CCmdUI* pCmdUI);
  129. afx_msg void OnCameraFollow();
  130. afx_msg void OnUpdateCameraFollow(CCmdUI* pCmdUI);
  131. afx_msg void OnCameraFly();
  132. afx_msg void OnUpdateCameraFly(CCmdUI* pCmdUI);
  133. afx_msg void OnCameraTether();
  134. afx_msg void OnUpdateCameraTether(CCmdUI* pCmdUI);
  135. afx_msg void OnCameraRigidTether();
  136. afx_msg void OnUpdateCameraRigidTether(CCmdUI* pCmdUI);
  137. afx_msg void OnCreateWheeledVehicle();
  138. afx_msg void OnUpdateCreateRigidBody(CCmdUI* pCmdUI);
  139. afx_msg void OnUpdateCreateWheeledVehicle(CCmdUI* pCmdUI);
  140. afx_msg void OnUpdateProperties(CCmdUI* pCmdUI);
  141. afx_msg void OnCreateMotorcycle();
  142. afx_msg void OnUpdateCreateMotorcycle(CCmdUI* pCmdUI);
  143. afx_msg void OnMotorcycleProperties();
  144. afx_msg void OnUpdateMotorcycleProperties(CCmdUI* pCmdUI);
  145. afx_msg void OnOptionsRenderDevice();
  146. afx_msg void OnUpdateOptionsRenderDevice(CCmdUI* pCmdUI);
  147. afx_msg void OnFileImportModel();
  148. afx_msg void OnFileImportLev();
  149. //}}AFX_MSG
  150. DECLARE_MESSAGE_MAP()
  151. };
  152. /////////////////////////////////////////////////////////////////////////////
  153. //{{AFX_INSERT_LOCATION}}
  154. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  155. #endif // !defined(AFX_MAINFRM_H__616293E8_E4F0_11D2_802E_0040056350C8__INCLUDED_)