160 lines
4.5 KiB
C++
160 lines
4.5 KiB
C++
/*=========================================================================
|
|
*
|
|
* SECTsurf.hpp : Definition of Editor Surface Lists
|
|
*
|
|
*
|
|
* Version 1.0
|
|
* Creation date
|
|
* Revision date
|
|
*
|
|
* Shaitan
|
|
*=======================================================================*/
|
|
/*
|
|
#ifndef __SECT_SURF_HPP__
|
|
#define __SECT_SURF_HPP__
|
|
|
|
|
|
#include "incGLI.h"
|
|
#include "incSPO.h"
|
|
|
|
#include "incSRF.h"
|
|
|
|
#define ENV_FRIEND
|
|
#include "incENV.h"
|
|
#undef ENV_FRIEND
|
|
|
|
#define SCTFriend
|
|
#include "incSCT.h"
|
|
#undef SCTFriend
|
|
|
|
#include "incITF.h"
|
|
#include "incGAM.h"
|
|
|
|
#include "SECTelem.hpp"
|
|
|
|
#include "x:\cpa\Main\inc\_editid.h"
|
|
|
|
//**************************************
|
|
#ifndef CPA_EXPORT
|
|
#if defined(CPA_WANTS_IMPORT)
|
|
#define CPA_EXPORT __declspec(dllimport)
|
|
#elif defined(CPA_WANTS_EXPORT)
|
|
#define CPA_EXPORT __declspec(dllexport)
|
|
#else
|
|
#define CPA_EXPORT
|
|
#endif
|
|
#endif
|
|
//**************************************
|
|
|
|
class Sector_Object;
|
|
class Sector_Interface;
|
|
|
|
#define C_szSurfaceActionName "SurfaceDescription"
|
|
|
|
//#################################################################################
|
|
// Surface
|
|
//#################################################################################
|
|
class SECT_Surface : public CPA_SaveObject,
|
|
public CPA_EdMot<SRF_tdxHandleToSurface>
|
|
{
|
|
protected:
|
|
CPA_SuperObject *m_pSuperObject;
|
|
CPA_SuperObject *m_pVisualSuperObject;
|
|
CPA_BaseObject *m_pVisualSurface;
|
|
|
|
CPA_SectionObject *m_pMatrixSection;
|
|
|
|
public:
|
|
SECT_Surface (Sector_Interface *p_oDLL,
|
|
SRF_tdxHandleToSurface hSurface, BOOL bAvailable,
|
|
CString csName, CString csFileName);
|
|
|
|
~SECT_Surface (void);
|
|
|
|
// return Data
|
|
long GetDataType (void) { return -1; }
|
|
void * GetData (void) { return GetStruct(); }
|
|
|
|
// matrix
|
|
CPA_SectionObject * GetMatrixSection (void) { return m_pMatrixSection; }
|
|
CString GetMatrixSectionName (void);
|
|
|
|
// notify
|
|
void fn_vNotifySave (void);
|
|
void fn_vNotifyUnSave (void);
|
|
void fn_vNotifyRestore (void);
|
|
void fn_vNotifyRename (void);
|
|
|
|
void fn_vUpdateSectionName (void);
|
|
|
|
void * GetEngineStruct (void) { return GetStruct(); }
|
|
|
|
Sector_Interface * GetSectorInterface (void) { return (Sector_Interface *)GetEditor(); }
|
|
|
|
// height
|
|
MTH_tdxReal GetHeight (void);
|
|
void SetHeight (MTH_tdxReal xNewHeight);
|
|
|
|
// super-object
|
|
CPA_SuperObject * GetSuperObject (void) { return m_pSuperObject; }
|
|
|
|
// visual surface
|
|
CPA_SuperObject * GetVisualSuperObject (void) { return m_pVisualSuperObject; }
|
|
CPA_BaseObject * GetVisualSurface (void) { return m_pVisualSurface; }
|
|
void SetVisualSurface (CPA_BaseObject *pVisual) { m_pVisualSurface = pVisual; }
|
|
|
|
// save
|
|
static void CallBackSaveSurfaceMatrix (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
|
|
};
|
|
|
|
|
|
//#################################################################################
|
|
// Surface (list element)
|
|
//#################################################################################
|
|
class SECT_SurfElem : public SECT_EnvElementBase,
|
|
public CPA_EdElement<SECT_SurfElem, SCT_tdxHandleOfElementLstSurface, LST2_M_StaticAnchorTo(SCT_tdxHandleOfElementLstSurface)*>
|
|
{
|
|
protected:
|
|
SECT_Surface *m_pSurface;
|
|
|
|
public:
|
|
SECT_SurfElem (SCT_tdxHandleOfElementLstSurface hSurfElem, Sector_Object *pOwnerSector);
|
|
SECT_SurfElem (SECT_Surface *pSurface, Sector_Object *pOwnerSector);
|
|
~SECT_SurfElem (void);
|
|
|
|
void *GetEngineStruct() { return GetStruct(); }
|
|
|
|
// environment
|
|
SECT_Surface * GetSurface (void) { return m_pSurface; }
|
|
void SetSurface (SECT_Surface *pSurface);
|
|
};
|
|
|
|
|
|
//#################################################################################
|
|
// Environment List
|
|
//#################################################################################
|
|
|
|
class SECT_SurfaceList : public CPA_EdList<SECT_SurfElem, SCT_tdxHandleOfElementLstSurface, LST2_M_StaticAnchorTo(SCT_tdxHandleOfElementLstSurface)*>
|
|
{
|
|
protected:
|
|
Sector_Object *m_pOwnerSector;
|
|
|
|
public:
|
|
SECT_SurfaceList (void) { };
|
|
~SECT_SurfaceList (void) { };
|
|
|
|
void SetOwnerSector (Sector_Object *pOwnerSector) { m_pOwnerSector = pOwnerSector; }
|
|
|
|
BOOL fn_bAddAnElement (SECT_SurfElem *pNewElem, SECT_SurfElem *pPreviousElem, BOOL bUpdateEngine = TRUE);
|
|
void fn_vRemoveAnElement (SECT_SurfElem *pOldElem, BOOL bUpdateEngine = TRUE);
|
|
void fn_vRemoveAllElements (BOOL bUpdateEngine = TRUE);
|
|
|
|
SECT_SurfElem * GetElementWithSurface (SECT_Surface *pSurface);
|
|
|
|
long GetInsertPosition (SECT_SurfElem *pSurfElem);
|
|
long GetCurrentPosition (SECT_SurfElem *pSurfElem);
|
|
};
|
|
|
|
|
|
#endif //__SECT_SURF_HPP__
|
|
*/ |