TransitionEditDialog.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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_TRANSITIONEDITDIALOG_H__68FE6085_8F85_11D3_8DE2_00104B6FD9E3__INCLUDED_)
  19. #define AFX_TRANSITIONEDITDIALOG_H__68FE6085_8F85_11D3_8DE2_00104B6FD9E3__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "resource.h"
  24. #include "dialogtoolbar.h"
  25. #include "dx8wrapper.h"
  26. /////////////////////////////////////////////////////////////////////////////
  27. // Forward declarations
  28. /////////////////////////////////////////////////////////////////////////////
  29. class SimpleSceneClass;
  30. class CameraClass;
  31. class TransitionDataClass;
  32. class RenderObjClass;
  33. class Box3DClass;
  34. class HAnimClass;
  35. /////////////////////////////////////////////////////////////////////////////
  36. //
  37. // TransitionEditDialogClass
  38. //
  39. /////////////////////////////////////////////////////////////////////////////
  40. class TransitionEditDialogClass : public CDialog
  41. {
  42. // Construction
  43. public:
  44. TransitionEditDialogClass(CWnd* pParent = NULL); // standard constructor
  45. // Dialog Data
  46. //{{AFX_DATA(TransitionEditDialogClass)
  47. enum { IDD = IDD_TRANSITION_EDIT };
  48. CButton m_MoveZoneCheck;
  49. CButton m_MoveCharCheck;
  50. CButton m_SizeZoneCheck;
  51. CButton m_RotateCharCheck;
  52. CComboBox m_AnimationList;
  53. CComboBox m_TriggerList;
  54. //}}AFX_DATA
  55. // Overrides
  56. // ClassWizard generated virtual function overrides
  57. //{{AFX_VIRTUAL(TransitionEditDialogClass)
  58. public:
  59. virtual BOOL PreTranslateMessage(MSG* pMsg);
  60. protected:
  61. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  62. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  63. //}}AFX_VIRTUAL
  64. // Implementation
  65. protected:
  66. // Generated message map functions
  67. //{{AFX_MSG(TransitionEditDialogClass)
  68. virtual BOOL OnInitDialog();
  69. virtual void OnOK();
  70. afx_msg void OnDestroy();
  71. afx_msg void OnTop();
  72. afx_msg void OnFront();
  73. afx_msg void OnLeft();
  74. afx_msg void OnRight();
  75. afx_msg void OnEditChar();
  76. afx_msg void OnEditZone();
  77. afx_msg void OnSelChangeAnimationList();
  78. afx_msg void OnAniBackFrame();
  79. afx_msg void OnAniFirstFrame();
  80. afx_msg void OnAniFwdFrame();
  81. afx_msg void OnAniLastFrame();
  82. afx_msg void OnAniPause();
  83. afx_msg void OnAniPlay();
  84. afx_msg void OnAniStop();
  85. afx_msg void OnSizeZone();
  86. afx_msg void OnRotateChar();
  87. //}}AFX_MSG
  88. DECLARE_MESSAGE_MAP()
  89. public:
  90. /////////////////////////////////////////////////////////////////////////
  91. // Public methods
  92. /////////////////////////////////////////////////////////////////////////
  93. void Set_Render_Obj (RenderObjClass *render_obj);
  94. void Set_Transition (TransitionDataClass *transition);
  95. void Set_Start_Height (float height) { m_Height = height; }
  96. protected:
  97. /////////////////////////////////////////////////////////////////////////
  98. // Protected methods
  99. /////////////////////////////////////////////////////////////////////////
  100. void Handle_Keypress (void);
  101. void Load_Object (void);
  102. void Render_View (void);
  103. void Insert_Zone (void);
  104. static void CALLBACK fnUpdateTimer (UINT, UINT, DWORD, DWORD, DWORD);
  105. void Fill_Trigger_List (void);
  106. void Fill_Animation_List (void);
  107. void Load_Animation (void);
  108. void Load_Animation (LPCTSTR filename);
  109. void Load_Character (void);
  110. void Update_Animation (void);
  111. void Update_Status (void);
  112. static LRESULT CALLBACK fn3DWindow (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
  113. void Handle_LBUTTON_DOWN (WPARAM wparam, LPARAM lparam);
  114. void Handle_LBUTTON_UP (WPARAM wparam, LPARAM lparam);
  115. void Handle_MOUSEMOVE (WPARAM wparam, LPARAM lparam);
  116. private:
  117. /////////////////////////////////////////////////////////////////////////
  118. // Private member data
  119. /////////////////////////////////////////////////////////////////////////
  120. UINT m_TimerID;
  121. SimpleSceneClass * m_Scene;
  122. CameraClass * m_Camera;
  123. IDirect3DSwapChain8 *m_SwapChain;
  124. RenderObjClass * m_RenderObj;
  125. RenderObjClass * m_CharacterObj;
  126. HAnimClass * m_Animation;
  127. TransitionDataClass *m_Transition;
  128. Box3DClass * m_Zone;
  129. float m_Height;
  130. float m_LookAtDist;
  131. bool m_IsEditingZone;
  132. bool m_IsEditingChar;
  133. bool m_IsRotatingChar;
  134. bool m_IsAnimating;
  135. bool m_IsSizingZone;
  136. float m_CurrFrame;
  137. DWORD m_LastAnimUpdate;
  138. CPoint m_LastPoint;
  139. DialogToolbarClass m_Toolbar;
  140. };
  141. //{{AFX_INSERT_LOCATION}}
  142. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  143. #endif // !defined(AFX_TRANSITIONEDITDIALOG_H__68FE6085_8F85_11D3_8DE2_00104B6FD9E3__INCLUDED_)