252 lines
6.9 KiB
C++
252 lines
6.9 KiB
C++
// DiaView.hpp : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DiaView dialog
|
|
#ifndef __DiaView_hpp
|
|
#define __DiaView_hpp
|
|
|
|
/******************************************/
|
|
#if _MSC_VER >= 1000
|
|
#pragma once
|
|
#endif
|
|
/******************************************/
|
|
|
|
class tdoEditorTexture;
|
|
|
|
class DiaView : public CFormView
|
|
{
|
|
protected:
|
|
DiaView(); // protected constructor used by dynamic creation
|
|
DECLARE_DYNCREATE(DiaView)
|
|
|
|
// Form Data
|
|
public:
|
|
//{{AFX_DATA(DiaView)
|
|
enum { IDD = IDD_VIEW_DIALOG };
|
|
//}}AFX_DATA
|
|
|
|
// Operations
|
|
public:
|
|
virtual ~DiaView();
|
|
void m_vNotifyChangeToScripts();
|
|
//void fn_vInitDialog ( void );
|
|
void m_fn_vShowMaterial(GMT_tdxHandleToGameMaterial _hMat, int _iTextureIndex = -1);
|
|
BOOL Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName,
|
|
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
|
|
CCreateContext* pContext );
|
|
|
|
void m_fn_vUpdateAlphaButton (GMT_tdxHandleToGameMaterial _hMat, BOOL bActivate);
|
|
void m_fn_vUpdateChromeButton (GMT_tdxHandleToGameMaterial _hMat, BOOL bActivate);
|
|
void m_fn_vUpdateGouraudButton (GMT_tdxHandleToGameMaterial _hMat, BOOL bActivate);
|
|
void m_fn_vUpdateTextureButton (GMT_tdxHandleToGameMaterial _hMat, BOOL bActivate);
|
|
void m_fn_vUpdateBackfaceButton (GMT_tdxHandleToGameMaterial _hMat, BOOL bActivate);
|
|
void m_fn_vUpdateTransparentButton (GMT_tdxHandleToGameMaterial _hMat, BOOL bActivate);
|
|
|
|
void m_fn_vUpdateAutoScroll (GMT_tdxHandleToGameMaterial _hMat, long lSwitch, float fUSpeed, float fVSpeed);
|
|
|
|
private:
|
|
ACP_tdxHandleOfMaterial m_hEditedVisualMaterial;
|
|
BOOL m_bControlsFilledFromMaterial;
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(DiaView)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
virtual int OnToolHitTest( CPoint point, TOOLINFO* pTI ) const;
|
|
#ifdef _DEBUG
|
|
virtual void AssertValid() const;
|
|
virtual void Dump(CDumpContext& dc) const;
|
|
#endif
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(DiaView)
|
|
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
|
afx_msg void OnCheckTexture();
|
|
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
|
afx_msg void OnButtonDiffuse();
|
|
afx_msg void OnButtonSpecular();
|
|
afx_msg void OnButtonAmbient();
|
|
afx_msg void OnCheckGouraud();
|
|
afx_msg void OnChangeEditSpecExp();
|
|
afx_msg void OnCheckChrome();
|
|
afx_msg void OnCheckTrans();
|
|
afx_msg void OnCheckAlphaSensitive();
|
|
afx_msg void OnButtonAddAnimatedTexture();
|
|
afx_msg void OnSelchangeComboAnimatedTextures();
|
|
afx_msg void OnButtonRemoveAnimatedTexture();
|
|
afx_msg void OnButtonMoveUpTexture();
|
|
afx_msg void OnButtonMoveDownTexture();
|
|
afx_msg void OnCheckAutoScroll();
|
|
afx_msg void OnKillFocusEditHorizontalScroll();
|
|
afx_msg void OnKillFocusEditVerticalScroll();
|
|
afx_msg void OnCheckBackface();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
class tdoInsertAnimatedTextureModif;
|
|
|
|
class tdoRemoveAnimatedTextureModif : public CPA_Modif
|
|
{
|
|
public:
|
|
tdoRemoveAnimatedTextureModif(GMT_tdxHandleToGameMaterial _MyMatHandle, long _lRemovePoint);
|
|
~tdoRemoveAnimatedTextureModif();
|
|
BOOL Do();
|
|
BOOL Undo();
|
|
|
|
protected:
|
|
private:
|
|
tdoInsertAnimatedTextureModif *m_p_oInsertAnimatedTextureModif;
|
|
GMT_tdxHandleToGameMaterial m_hEditedGameMaterial;
|
|
tdoEditorGameMaterial *m_p_oEditedGameMaterial;
|
|
//information remembered about the removed texture
|
|
long m_lRemovePoint;
|
|
GLI_tdstTexture *m_hTexture;
|
|
tdoEditorTexture *m_p_oEditorTexture;
|
|
float m_fDuration;
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
class tdoInsertAnimatedTextureModif : public CPA_Modif
|
|
{
|
|
public:
|
|
tdoInsertAnimatedTextureModif(GMT_tdxHandleToGameMaterial _MyMatHandle, long _lInsertPoint, GLI_tdstTexture *_hTexture, float _fDuration);
|
|
~tdoInsertAnimatedTextureModif();
|
|
BOOL Do();
|
|
BOOL Undo();
|
|
|
|
protected:
|
|
private:
|
|
tdoRemoveAnimatedTextureModif *m_p_oRemoveAnimatedTextureModif;
|
|
GMT_tdxHandleToGameMaterial m_hEditedGameMaterial;
|
|
tdoEditorGameMaterial *m_p_oEditedGameMaterial;
|
|
//information about the inserted texture
|
|
GLI_tdstTexture *m_hTexture;
|
|
tdoEditorTexture *m_p_oEditorTexture;
|
|
float m_fDuration;
|
|
long m_lInsertPoint;
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
class tdoMoveAnimatedTextureModif : public CPA_Modif
|
|
{
|
|
public:
|
|
tdoMoveAnimatedTextureModif(GMT_tdxHandleToGameMaterial _MyMatHandle, long _lMoved, long _lDirection);
|
|
~tdoMoveAnimatedTextureModif();
|
|
BOOL Do();
|
|
BOOL Undo();
|
|
|
|
protected:
|
|
private:
|
|
GMT_tdxHandleToGameMaterial m_hEditedGameMaterial;
|
|
tdoEditorGameMaterial *m_p_oEditedGameMaterial;
|
|
long m_lMovedPoint, m_lDirection;
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
class tdoChangeMaterialColorModif : public CPA_Modif
|
|
{
|
|
public:
|
|
typedef enum eColorType_
|
|
{
|
|
E_ct_Ambient,
|
|
E_ct_Diffuse,
|
|
E_ct_Specular
|
|
} tdeColorType;
|
|
tdoChangeMaterialColorModif(GMT_tdxHandleToGameMaterial _MyMatHandle, tdeColorType _eType);
|
|
~tdoChangeMaterialColorModif();
|
|
BOOL Do();
|
|
BOOL Undo();
|
|
BOOL m_bDoIt(GLI_tdstColor _xNewColor);
|
|
|
|
protected:
|
|
private:
|
|
GMT_tdxHandleToGameMaterial m_hEditedGameMaterial;
|
|
tdoEditorGameMaterial *m_p_oEditedGameMaterial;
|
|
tdeColorType m_eType;
|
|
GLI_tdstColor m_xColorBeforeDo, m_xColorAfterDo;
|
|
long m_lSpecExp;
|
|
BOOL m_bGoForIt;
|
|
};
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
class tdoChangeMaterialStateModif : public CPA_Modif
|
|
{
|
|
public:
|
|
typedef enum eStateType_
|
|
{
|
|
E_st_Alpha,
|
|
E_st_Transparent,
|
|
E_st_Textured,
|
|
E_st_Gouraud,
|
|
E_st_Chrome,
|
|
E_st_Backface,
|
|
E_st_None
|
|
}
|
|
tdeStateType;
|
|
|
|
tdoChangeMaterialStateModif(GMT_tdxHandleToGameMaterial _MyMatHandle, tdeStateType _eType);
|
|
~tdoChangeMaterialStateModif();
|
|
|
|
BOOL Do();
|
|
BOOL Undo();
|
|
|
|
BOOL fn_bChangeState (BOOL bActivate);
|
|
|
|
protected:
|
|
private:
|
|
GMT_tdxHandleToGameMaterial m_hEditedGameMaterial;
|
|
tdoEditorGameMaterial *m_p_oEditedGameMaterial;
|
|
|
|
tdeStateType m_eType;
|
|
unsigned long m_xMaterialType;
|
|
BOOL m_bActivated;
|
|
BOOL m_bTransparent;
|
|
|
|
BOOL m_bFirstTime;
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
class tdoChangeAutoScrollModif : public CPA_Modif
|
|
{
|
|
public:
|
|
typedef enum eAutoScroll_
|
|
{
|
|
E_as_Switch,
|
|
E_as_USpeed,
|
|
E_as_VSpeed
|
|
}
|
|
|
|
tdeAutoScroll;
|
|
|
|
tdoChangeAutoScrollModif(GMT_tdxHandleToGameMaterial _MyMatHandle, tdeAutoScroll eType, long lSwitch, float fUSpeed, float fVSpeed);
|
|
~tdoChangeAutoScrollModif();
|
|
|
|
BOOL Do();
|
|
BOOL Undo();
|
|
|
|
BOOL fn_bChangeState (BOOL bActivate);
|
|
|
|
protected:
|
|
private:
|
|
GMT_tdxHandleToGameMaterial m_hEditedGameMaterial;
|
|
tdoEditorGameMaterial *m_p_oEditedGameMaterial;
|
|
tdeAutoScroll m_eType;
|
|
|
|
float m_fOldUSpeed, m_fNewUSpeed;
|
|
float m_fOldVSpeed, m_fNewVSpeed;
|
|
long m_lOldSwitch, m_lNewSwitch;
|
|
|
|
BOOL m_bFirstTime;
|
|
};
|
|
|
|
#endif
|