#pragma once #include "ICommand.h" #include "EternityEngine.h" #include "IDnCutSceneDataReader.h" enum { CMD_NULL, CMD_UPDATE_VIEW, CMD_REGISTER_RES, CMD_UNREGISTER_RES, CMD_MODIFY_SCENE_INFO, CMD_INSERT_ACTION, CMD_REMOVE_ACTION, CMD_ACTION_PROP_CHANGE, CMD_KEY_PROP_CHANGE, CMD_INSERT_KEY, CMD_REMOVE_KEY, CMD_INSERT_EVENT, CMD_REMOVE_EVENT, CMD_EVENT_PROP_CHANGE, CMD_ACTOR_PROP_CHANGE, CMD_COPY_TO_CLIPBOARD, CMD_PASTE_FROM_CLIPBOARD, CMD_CHANGE_ACTOR_RES, CMD_BATCH_EDIT, }; // ºä¸¦ ¸ðÁ¶¸® »õ·Î ¾÷µ¥ÀÌÆ® class CUpdateViewCmd : public ICommand { public: CUpdateViewCmd( ICmdReceiver* pCmdReceiver ) : ICommand(pCmdReceiver) {}; virtual ~CUpdateViewCmd(void) {}; // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ) { return new CUpdateViewCmd( m_pCmdReceiver ); }; virtual const wxChar* GetDesc( void ) const { return wxT("Update view"); }; virtual int GetTypeID( void ) { return CMD_UPDATE_VIEW; }; virtual void Excute( void ); virtual void Undo( void ) {}; // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return false; }; }; // ¸®¼Ò½º »ç¿ë µî·Ï Ä¿¸Çµå class CRegisterResCmd : public ICommand { private: wxString m_strResName; int m_iResourceKind; EtVector3 m_vPos; float m_fRotation; public: CRegisterResCmd( ICmdReceiver* pCmdReceiver, const wxChar* pResourceName, int iResourceKind, EtVector3& vPos, float fRotation ); virtual ~CRegisterResCmd(void); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_REGISTER_RES; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // »ç¿ëµÇ´Â ¸®¼Ò½º Á¦°Å Ä¿¸Çµå class CRemoveRegResCmd : public ICommand { private: wxString m_strResName; int m_iResourceKind; EtVector3 m_vPos; float m_fRotation; public: // ¾×ÅÍÀÎ °æ¿ì¿¡´Â µþ·ÁÀÖ´Â ¾×¼Ç ¸®½ºÆ®±îÁö ÀüºÎ º¸°üÇØ ³ù´Ù°¡ UNDO °¡ ÀϾ¸é º¹±¸ ½ÃÄÑÁØ´Ù. vector m_vlpActionInfo; vector m_vlpKeyInfo; public: CRemoveRegResCmd( ICmdReceiver* pCmdReceiver, const wxChar* pResourceName, int iResourceKind ); virtual ~CRemoveRegResCmd( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_UNREGISTER_RES; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // Àå¸é ¼Ó¼º º¯°æ Ä¿¸Çµå class CSceneInfoModify : public ICommand { private: SceneInfo* m_pSceneInfo; SceneInfo* m_pPrevSceneInfo; public: CSceneInfoModify( ICmdReceiver* pCmdReceiver, SceneInfo* pSceneInfo ); virtual ~CSceneInfoModify( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_MODIFY_SCENE_INFO; }; virtual void Excute( void ); virtual void Undo( void ); virtual bool Recordable( void ) { return true; }; }; // ¾×¼Ç Ãß°¡ Ä¿¸Çµå class CActionInsertCmd : public ICommand { private: ActionInfo* m_pActionInfo; public: CActionInsertCmd( ICmdReceiver* pCmdReceiver, ActionInfo* pAction ); virtual ~CActionInsertCmd( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_INSERT_ACTION; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // ¾×ÅÍ ¸®¼Ò½º º¯°æ Ä¿¸Çµå class CActorResPropChange : public ICommand { private: wxString m_strNewActorName; EtVector3 m_vPos; float m_fRotation; bool m_bFitYPosToMap; bool m_bInfluenceLightmap; int m_iMonsterTableIDAsBoss; // ÀÌ ¾×ÅÍ ¸®¼Ò½º¸¦ ¾²´Â º¸½º ¸®½ºÆ® Áß¿¡ ¼±ÅÃµÈ À妽º. ¾øÀ¸¸é -1ÀÓ. bool m_bScaleLock; wxString m_strOldActorName; EtVector3 m_vOldPos; float m_fOldRotation; bool m_bOldFitYPosToMap; bool m_bOldInfluenceLightmap; int m_iOldMonsterTableIDAsBoss; bool m_bOldScaleLock; public: CActorResPropChange( ICmdReceiver* pCmdReceiver, const wxChar* pOldActorName, const wxChar* pNewActorName, const EtVector3& vPos, float fRotation, bool bFitYPosToMap, bool bInfluenceLightmap, int iSelectedBossInfo, bool bScaleLock ); virtual ~CActorResPropChange( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_ACTOR_PROP_CHANGE; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // ¾×¼Ç Á¤º¸ º¯°æ Ä¿¸Çµå class CActionPropChange : public ICommand { public: ActionInfo m_NewActionInfo; ActionInfo m_PrevActionInfo; bool m_bUndo; public: CActionPropChange( ICmdReceiver* pCmdReceiver, ActionInfo* pNewActionInfo ); virtual ~CActionPropChange( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_ACTION_PROP_CHANGE; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // ¾×¼Ç »èÁ¦ Ä¿¸Çµå class CActionRemoveCmd : public ICommand { public: int m_iActionIDToRemove; ActionInfo m_RemoveActionInfo; public: CActionRemoveCmd( ICmdReceiver* pCmdReceiver, int iActionID ); virtual ~CActionRemoveCmd( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_REMOVE_ACTION; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // Ű Ãß°¡ Ä¿¸Çµå class CKeyInsertCmd : public ICommand { private: KeyInfo* m_pKeyInfo; public: CKeyInsertCmd( ICmdReceiver* pCmdReceiver, KeyInfo* pKey ); virtual ~CKeyInsertCmd( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_INSERT_KEY; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // Ű »èÁ¦ Ä¿¸Çµå class CKeyRemoveCmd : public ICommand { public: int m_iKeyIDToRemove; KeyInfo m_RemoveKeyInfo; public: CKeyRemoveCmd( ICmdReceiver* pCmdReceiver, int iKeyID ); virtual ~CKeyRemoveCmd( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_REMOVE_KEY; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // Ű Á¤º¸ º¯°æ Ä¿¸Çµå class CKeyPropChange : public ICommand { public: KeyInfo m_NewKeyInfo; KeyInfo m_PrevKeyInfo; bool m_bUndo; public: CKeyPropChange( ICmdReceiver* pCmdReceiver, KeyInfo* pNewKeyInfo ); virtual ~CKeyPropChange( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_KEY_PROP_CHANGE; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // À̺¥Æ® Ãß°¡ Ä¿¸Çµå class CEventInsertCmd : public ICommand { private: EventInfo* m_pEventInfo; public: CEventInsertCmd( ICmdReceiver* pCmdReceiver, EventInfo* pEvent ); virtual ~CEventInsertCmd( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_INSERT_EVENT; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // À̺¥Æ® »èÁ¦ Ä¿¸Çµå class CEventRemoveCmd : public ICommand { public: int m_iEventIDToRemove; EventInfo* m_pRemoveEventInfo; public: CEventRemoveCmd( ICmdReceiver* pCmdReceiver, int iEventID ); virtual ~CEventRemoveCmd( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_REMOVE_EVENT; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // À̺¥Æ® Á¤º¸ º¯°æ Ä¿¸Çµå class CEventPropChange : public ICommand { public: EventInfo* m_pNewEventInfo; EventInfo* m_pPrevEventInfo; bool m_bUndo; public: CEventPropChange( ICmdReceiver* pCmdReceiver, EventInfo* pNewEventInfo ); virtual ~CEventPropChange( void ); // ±íÀº º¹»ç »ý¼º ÇÔ¼ö. virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_EVENT_PROP_CHANGE; }; virtual void Excute( void ); virtual void Undo( void ); // ±â·ÏÀÌ µÇ´Â Ä¿¸ÇµåÀÎÁö ¾Æ´ÑÁö. virtual bool Recordable( void ) { return true; }; }; // ¿©·¯ µ¥ÀÌÅ͸¦ Åë°·Î ¹Ù²Ù´Â Ä¿¸Çµå. ÇöÀç´Â ½ÃÀÛ ½Ã°£¸¸ ÀÖÀ½. class CBatchEdit : public ICommand { public: vector m_vlpActionInfo; vector m_vlpKeyInfo; vector m_vlpEventInfo; float m_fStartTimeDelta; public: CBatchEdit( ICmdReceiver* pCmdReceiver, float fStartTimeDelta, const vector vlpActionInfo, const vector vlpKeyInfo, const vector vlpEventInfo ); virtual ~CBatchEdit( void ); virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_BATCH_EDIT; }; virtual void Excute( void ); virtual void Undo( void ); virtual bool Recordable( void ) { return true; }; }; // ¾×¼Ç/Ű/À̺¥Æ® º¹»çÇØ¼­ ºÙ¿©³Ö±â // Ŭ¸³º¸µå¿¡ ³Ö´Â Ä¿¸ÇµåÀε¥.. ¾Æ.. ÅÛÇø´À¸·Î ÇÒ±î.. -_- class CCopyToClipboard : public ICommand { public: enum { COPY_ACTION, COPY_KEY, COPY_EVENT, }; ActionInfo* m_pCopiedActionInfo; KeyInfo* m_pCopiedKeyInfo; EventInfo* m_pCopiedEventInfo; private: int m_iCopyType; public: CCopyToClipboard( ICmdReceiver* pCmdReceiver, const ActionInfo* pActionInfo ); CCopyToClipboard( ICmdReceiver* pCmdReceiver, const KeyInfo* pKeyInfo ); CCopyToClipboard( ICmdReceiver* pCmdReceiver, const EventInfo* pEventInfo ); virtual ~CCopyToClipboard( void ); virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_COPY_TO_CLIPBOARD; }; virtual void Excute( void ); virtual void Undo( void ); virtual bool Recordable( void ) { return true; }; int GetCopyType( void ) { return m_iCopyType; }; }; class CPasteFromClipboard : public ICommand { public: ActionInfo* m_pCopiedActionInfo; KeyInfo* m_pCopiedKeyInfo; EventInfo* m_pCopiedEventInfo; private: int m_iCopyType; public: CPasteFromClipboard( ICmdReceiver* pCmdReceiver, int iCopyType, const char* pActorToPaste, float fTimeToPaste ); virtual ~CPasteFromClipboard( void ); virtual ICommand* CreateSame( void ); virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_PASTE_FROM_CLIPBOARD; }; virtual void Excute( void ); virtual void Undo( void ); virtual bool Recordable( void ) { return true; }; int GetCopyType( void ) { return m_iCopyType; }; }; class CChangeActorRes : public ICommand { private: wxString m_strNewActorResName; // »õ·Î ¹Ù²Ü ¾×ÅÍÀÇ ¸®¼Ò½º(¾×ÅÍÅ×À̺í) À̸§ wxString m_strNewActorName; // ±âÁ¸ ¾×ÅÍÀÇ _ ÀÌÈÄÀÇ »ç¿ëÀÚ°¡ ÀÔ·ÂÇÑ ¹®ÀÚ¿­À» ÇÕÇÑ »õ·Î ¹Ù²Ü ¾×ÅÍ À̸§(½ÇÁ¦ ÄÆ½Å µ¥ÀÌÅÍ ÀڷᱸÁ¶ÀÇ Å° °ª) wxString m_strOldActorResName; // ±âÁ¸ ¾×ÅÍÀÇ ¸®¼Ò½º À̸§ wxString m_strOldActorName; // ±âÁ¸ ¾×ÅÍÀÇ À̸§ public: CChangeActorRes( ICmdReceiver* pCmdReceiver, const wxChar* pNewActorResName, const wxChar* pOldActorName ); virtual ~CChangeActorRes( void ); virtual ICommand* CreateSame( void ) { return new CChangeActorRes(*this); }; virtual const wxChar* GetDesc( void ) const; virtual int GetTypeID( void ) { return CMD_CHANGE_ACTOR_RES; }; virtual void Excute( void ); virtual void Undo( void ); virtual bool Recordable( void ) { return true; }; const wxChar* GetNewActorResName( void ) { return m_strNewActorResName.c_str(); }; const wxChar* GetNewActorName( void ) { return m_strNewActorName.c_str(); }; const wxChar* GetOldActorResName( void ) { return m_strOldActorResName.c_str(); }; const wxChar* GetOldActorName( void ) { return m_strOldActorName.c_str(); }; };