// // diacol.hpp : header file // ///////////////////////////////////////////////////////////////////////////// // DiaCol dialog #ifndef __diacol_hpp #define __diacol_hpp /******************************************/ #if _MSC_VER >= 1000 #pragma once #endif /******************************************/ #include "matres.h" #include "itf.h" #include "GMatObj.hpp" #include "CMatObj.hpp" #ifndef __AFXEXT_H__ #include #endif #define C_uc_NumberOfNames 16 class tdoCopyBuffer; class tdoColNameObject : public CPA_BaseObject { friend class DiaCol; public: tdoColNameObject(); ~tdoColNameObject(); //overloads from base class virtual void *GetData() { return (void*)&m_uc_bit; } virtual long GetDataType(void) { return 0; }; private: unsigned char m_uc_bit; // bit correspondant au nom }; class DiaCol : public CFormView { protected: DiaCol(); // protected constructor used by dynamic creation DECLARE_DYNCREATE(DiaCol) // Form Data public: //{{AFX_DATA(DiaCol) enum { IDD = IDD_COLLISION_DIALOG }; //ROMTEAM WorldEditor (Cristi Petrescu 22/12/97) CButton m_btnRadioTypeOfZone; //ENDROMTEAM WorldEditor (Cristi Petrescu) CButton m_CheckLockNames; CButton m_check9; CButton m_check8; CButton m_check7; CButton m_check6; CButton m_check5; CButton m_check4; CButton m_check3; CButton m_check16; CButton m_check2; CButton m_check15; CButton m_check14; CButton m_check13; CButton m_check12; CButton m_check11; CButton m_check10; CButton m_check1; CButton m_CheckDisableCollisions; CString m_name1; CString m_name11; CString m_name10; CString m_name12; CString m_name13; CString m_name14; CString m_name15; CString m_name16; CString m_name2; CString m_name3; CString m_name4; CString m_name5; CString m_name6; CString m_name7; CString m_name8; CString m_name9; int m_RadioTypeOfZone; //}}AFX_DATA // Attributes private: //ROMTEAM WorldEditor (Cristi Petrescu 22/12/97) BOOL m_bReportCollisionIncoherence (WORD wTypeOfZones, WORD wTypeOfCollision); BOOL m_bReportCollisionIncoherence2 (WORD wNewTypeOfZones, WORD OldTypeOfZones, WORD wTypeOfCollision); //ENDROMTEAM WorldEditor (Cristi Petrescu) int m_currentNameRead; BOOL m_bAutoDispatch; BOOL m_bEditNamesLocked; /* names cannot be edited */ virtual int OnToolHitTest( CPoint point, TOOLINFO* pTI ) const; BOOL m_bEditColor(GLI_tdstColor *p_stColor); //ANNECY Shaitan DisableFunctions (16/04/98) { BOOL m_bCommonFile; //ENDANNECY Shaitan DisableFunctions } public: tdoCopyBuffer *m_p_oCopyBuffer; unsigned short m_uwTypeOfZone; unsigned short m_uwIdentifier; CComboBox *m_p_oMaterialCombo; CString m_a_csNameZdm[C_uc_NumberOfNames]; CString m_a_csNameZdr[C_uc_NumberOfNames]; CString m_a_csNameZde[C_uc_NumberOfNames]; CString m_oldname1; CString m_oldname11; CString m_oldname10; CString m_oldname12; CString m_oldname13; CString m_oldname14; CString m_oldname15; CString m_oldname16; CString m_oldname2; CString m_oldname3; CString m_oldname4; CString m_oldname5; CString m_oldname6; CString m_oldname7; CString m_oldname8; CString m_oldname9; tdoColNameObject m_p_oMyNameObject[C_uc_NumberOfNames * 3+1]; /* reachable objets dont les noms sont les Cstrings m_a_csNameZd(r,e,m)*/ /*GMT_tdxHandleToGameMaterial m_CurrentHandleToGameMaterial;*/ //GMT_tdxHandleToGameMaterial m_hHandleToGameMaterial; GMT_tdxHandleToCollideMaterial m_hHandleToCollideMaterial; // Operations public: void m_vNotifyChangeToScripts(); void fn_vInitDialog ( void ); void m_fn_vShowMaterial(GMT_tdxHandleToGameMaterial _hMat); void m_fn_vSetMaterial(void); void m_fn_vSetToMotor(void); void m_fn_vEnableWindowFields(BOOL bEnable); void m_fn_vLockEditNames(BOOL bEnable); void m_fn_vEnableEditNames(BOOL bEnable); void m_fn_vSetCheckBoxesValues(); void m_fn_vGetCheckBoxesValues(unsigned short *p_wTypeOfZone,unsigned short *p_wIdentifier); void m_fn_vUpdateNames(); void m_fn_vShowNames(); void m_fn_vLoadNames(); void m_fn_vInitLoad(); static SCR_tde_Anl_ReturnValue fn_v_LoadZDMNames( SCR_tdst_File_Description *_p_stFile, char *_p_szName, char *_ap_szPars[], SCR_tde_Anl_Action _eAction); static SCR_tde_Anl_ReturnValue fn_v_LoadZDRNames( SCR_tdst_File_Description *_p_stFile, char *_p_szName, char *_ap_szPars[], SCR_tde_Anl_Action _eAction); static SCR_tde_Anl_ReturnValue fn_v_LoadZDENames( SCR_tdst_File_Description *_p_stFile, char *_p_szName, char *_ap_szPars[], SCR_tde_Anl_Action _eAction); BOOL m_fn_bChangeName(int i,CString *_csName,CString *_csOldName,BOOL _bmessage); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(DiaCol) public: virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: virtual ~DiaCol(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif // Generated message map functions //{{AFX_MSG(DiaCol) afx_msg void OnCheckDisableCollisions(); afx_msg void OnCheckButtons(); afx_msg void OnRadioZoneTypes(); afx_msg void OnKillfocusEditName1(); afx_msg void OnKillfocusEditName10(); afx_msg void OnKillfocusEditName11(); afx_msg void OnKillfocusEditName12(); afx_msg void OnKillfocusEditName13(); afx_msg void OnKillfocusEditName14(); afx_msg void OnKillfocusEditName15(); afx_msg void OnKillfocusEditName16(); afx_msg void OnKillfocusEditName2(); afx_msg void OnKillfocusEditName3(); afx_msg void OnKillfocusEditName4(); afx_msg void OnKillfocusEditName5(); afx_msg void OnKillfocusEditName6(); afx_msg void OnKillfocusEditName7(); afx_msg void OnKillfocusEditName8(); afx_msg void OnKillfocusEditName9(); afx_msg void OnCheckLockNames(); afx_msg void OnButtonSaveNames(); afx_msg void OnButtonCopyCollideMaterial(); afx_msg void OnButtonRenameCollideMaterial(); afx_msg void OnButtonPasteCollideMaterial(); afx_msg void OnSetfocusEditName1(); afx_msg void OnSetfocusEditName10(); afx_msg void OnSetfocusEditName11(); afx_msg void OnSetfocusEditName12(); afx_msg void OnSetfocusEditName13(); afx_msg void OnSetfocusEditName14(); afx_msg void OnSetfocusEditName15(); afx_msg void OnSetfocusEditName16(); afx_msg void OnSetfocusEditName2(); afx_msg void OnSetfocusEditName3(); afx_msg void OnSetfocusEditName4(); afx_msg void OnSetfocusEditName5(); afx_msg void OnSetfocusEditName6(); afx_msg void OnSetfocusEditName7(); afx_msg void OnSetfocusEditName8(); afx_msg void OnSetfocusEditName9(); afx_msg void OnComboEditChange(); afx_msg void OnComboSelChange(); afx_msg void OnButtonHighlightColor(); afx_msg void OnCheckHighlight(); afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// class tdoDeleteEngineCollideModif : public CPA_Modif { public: tdoDeleteEngineCollideModif( GMT_tdxHandleToGameMaterial _MyMatHandle, GMT_tdxHandleToCollideMaterial _hCollideMaterial ); ~tdoDeleteEngineCollideModif(); BOOL Do(); BOOL Undo(); protected: private: GMT_tdxHandleToGameMaterial m_hEditedGameMaterial; GMT_tdxHandleToCollideMaterial m_hEditedCollideMaterial; tdoEditorGameMaterial *m_p_oEditedGameMaterial; tdoEditorCollideMaterial *m_p_oEditedCollideMaterial; }; class tdoCreateEngineCollideModif : public CPA_Modif { public: tdoCreateEngineCollideModif(GMT_tdxHandleToGameMaterial _MyMatHandle); ~tdoCreateEngineCollideModif(); BOOL Do(); BOOL Undo(); protected: private: GMT_tdxHandleToGameMaterial m_hEditedGameMaterial; GMT_tdxHandleToCollideMaterial m_hCollideAfterDo; tdoDeleteEngineCollideModif *m_p_oDestroyModif; }; #endif