Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
/*=========================================================================
*
* SECTelem.hpp : Definition of Editor Elements
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_ELEMB_HPP__
#define __SECT_ELEMB_HPP__
#include "incITF.h"
#include "incGAM.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_szSectorsLinkSubSection "SectorsLink"
//Shaitan Clean Env
//#define C_szEnvAndSurfSubSection "ENVAndSRF"
//#################################################################################
// SECTORS LINK
//#################################################################################
/*===========================================================================
Element
===========================================================================*/
class SECT_ElementBase : public CPA_SectionObject
{
protected:
CPA_SuperObject *m_pSector;
Sector_Object *m_pOwnerSector;
public:
SECT_ElementBase (Sector_Object *pOwnerSector);
~SECT_ElementBase() {}
CPA_SuperObject * GetSector (void) { return m_pSector; }
Sector_Object * GetOwnerSector (void) { return m_pOwnerSector; }
// save
static void CallBackSaveSectorsLink (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
};
/*===========================================================================
List
===========================================================================*/
class SECT_ListBase
{
protected:
Sector_Object *m_pOwnerSector;
long m_lNbElements;
public:
SECT_ListBase (void);
~SECT_ListBase (void) { };
virtual BOOL fn_bAddAnElement (SECT_ElementBase *pNewElem, BOOL bUpdateEngine = TRUE);
virtual void fn_vRemoveAnElement (SECT_ElementBase *pOldElem, BOOL bUpdateEngine = TRUE);
virtual void fn_vRemoveAllElements (BOOL bUpdateEngine);
virtual SECT_ElementBase * GetHeadElementBase (POSITION& rPosition) { return NULL; }
virtual SECT_ElementBase * GetNextElementBase (POSITION& rPosition) { return NULL; }
void SetOwnerSector (Sector_Object *pOwnerSector) { m_pOwnerSector = pOwnerSector; }
long GetNbElements (void) { return m_lNbElements; }
SECT_ElementBase * GetElementWithSector (CPA_SuperObject *pSector);
};
//#################################################################################
// ENVIRONMENT AND SURFACE
//#################################################################################
/*===========================================================================
Element
===========================================================================*/
/*
class SECT_EnvElementBase : public CPA_SectionObject
{
protected:
Sector_Object *m_pOwnerSector;
public:
SECT_EnvElementBase (Sector_Object *pOwnerSector);
~SECT_EnvElementBase() {}
Sector_Object * GetOwnerSector (void) { return m_pOwnerSector; }
// save
static void CallBackSaveEnvAndSurf (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
};
*/
#endif //__SECT_ELEMB_HPP__

View File

@@ -0,0 +1,292 @@
/*=========================================================================
*
* SECTenv.hpp : Definition of Environments
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_ENV_HPP__
#define __SECT_ENV_HPP__
#include "incGLI.h"
#include "incSPO.h"
#include "incMEC.h"
#define ENV_FRIEND
#include "incENV.h"
#undef ENV_FRIEND
#define SCTFriend
#include "incSCT.h"
#undef SCTFriend
#include "incITF.h"
#include "incGAM.h"
#include "HDL.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;
typedef enum
{
E_te_Environment,
E_te_Surface,
E_te_MecEnvironment,
E_te_VisEnvironment,
E_te_SndEnvironment,
E_te_NoType
}
tdeTypeElem;
typedef CPA_SaveObject SECT_SndEnvironment;
//#################################################################################
// MecEnvironment
//#################################################################################
class SECT_MecEnvironment : public CPA_SaveObject,
public CPA_EdMot<DNM_tdxHandleToMecEnvironment>
{
protected:
DNM_stMecEnvironment * GetMecStruct (void);
public:
SECT_MecEnvironment (Sector_Interface *p_oDLL,
DNM_tdxHandleToMecEnvironment hMecEnv, BOOL bAvailable,
CString csName, CString csFileName, BOOL bSectionExists);
SECT_MecEnvironment (Sector_Interface *p_oDLL, CString csName);
~SECT_MecEnvironment (void);
// return Data
long GetDataType (void) { return -1; }
void * GetData (void) { return GetStruct(); };
void * GetEngineStruct (void) { return GetStruct(); }
Sector_Interface * GetSectorInterface (void) { return (Sector_Interface *)GetEditor(); }
// default values
void fn_vSetDefaultValues (void);
// gravity parameters
DNM_tdxReal GetGravity (void);
DNM_tdstVector * GetVertical (void);
void SetGravity (MTH_tdxReal tdxNewGravity, BOOL bNotify = TRUE);
void SetVertical (DNM_tdstVector *tdstNewVertical, BOOL bNotify = TRUE);
// fluid
DNM_tdxReal GetFluidDensity (void);
DNM_tdxReal GetFluidViscosity (void);
DNM_tdxReal GetFluidLevel (void);
DNM_tdstVector * GetFluidStream (void);
void SetFluidDensity (MTH_tdxReal tdxNewFluidDensity, BOOL bNotify = TRUE);
void SetFluidViscosity (MTH_tdxReal tdxNewFluidViscosity, BOOL bNotify = TRUE);
void SetFluidLevel (MTH_tdxReal tdxNewFluidLevel, BOOL bNotify = TRUE);
void SetFluidStream (DNM_tdstVector *tdstNewFluidStream, BOOL bNotify = TRUE);
// volumic environment
CString GetVolumicEnvironment (void);
void SetVolumicEnvironment (CString, BOOL bNotify = TRUE);
// save
static void CallBackSaveMecEnvironment (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
};
//#################################################################################
// VisEnvironment
//#################################################################################
class SECT_VisEnvironment : public CPA_SaveObject,
public CPA_EdMot<ACP_tdxHandleToVisualEnvironment>
{
public:
SECT_VisEnvironment (Sector_Interface *p_oDLL,
ACP_tdxHandleToVisualEnvironment hVisEnv, BOOL bAvailable,
CString csName, CString csFileName, BOOL bSectionExists);
SECT_VisEnvironment (Sector_Interface *p_oDLL, CString csName);
~SECT_VisEnvironment (void);
// return Data
long GetDataType (void) { return -1; }
void * GetData (void) { return GetStruct(); };
void * GetEngineStruct (void) { return GetStruct(); }
Sector_Interface * GetSectorInterface (void) { return (Sector_Interface *)GetEditor(); }
// default values
void fn_vInitFog (void);
// global parameters
BOOL fn_bHasFog (void);
// Fog
MTH_tdxReal GetFogNear (void);
MTH_tdxReal GetFogFar (void);
MTH_tdxReal GetFogBlendNear (void);
MTH_tdxReal GetFogBlendFar (void);
MTH_tdxReal GetFogInfinite (void);
GLI_tdstColor * GetFogColor (void);
void SetFogNear (MTH_tdxReal xNewNear, BOOL bNotify = TRUE);
void SetFogFar (MTH_tdxReal xNewFar, BOOL bNotify = TRUE);
void SetFogBlendNear (MTH_tdxReal xNewBlendNear, BOOL bNotify = TRUE);
void SetFogBlendFar (MTH_tdxReal xNewBlendFar, BOOL bNotify = TRUE);
void SetFogInfinite (MTH_tdxReal xNewInfinite, BOOL bNotify = TRUE);
void SetFogColor (GLI_tdstColor *pNewColor, BOOL bNotify = TRUE);
// save
static void CallBackSaveVisEnvironment (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
};
//#################################################################################
// Environment
//#################################################################################
class SECT_Environment : public CPA_SaveObject,
public CPA_EdMot<ENV_tdxHandleToEnvironment>
{
protected:
SECT_MecEnvironment *m_pMecEnvironment;
SECT_VisEnvironment *m_pVisEnvironment;
SECT_SndEnvironment *m_pSndEnvironment;
public:
SECT_Environment (Sector_Interface *p_oDLL,
ENV_tdxHandleToEnvironment hEnvironment, BOOL bAvailable,
CString csName, CString csFileName);
SECT_Environment (Sector_Interface *p_oDLL,
SECT_MecEnvironment *pMecEnvironment,
SECT_VisEnvironment *pVisEnvironment,
SECT_SndEnvironment *pSndEnvironment,
CString csName);
~SECT_Environment (void);
// return Data
long GetDataType (void) { return -1; }
void * GetData (void) { return GetStruct(); };
void * GetEngineStruct (void) { return GetStruct(); }
Sector_Interface * GetSectorInterface (void) { return (Sector_Interface *)GetEditor(); }
// get functions
SECT_MecEnvironment * GetMecEnvironment (void) { return m_pMecEnvironment; }
SECT_VisEnvironment * GetVisEnvironment (void) { return m_pVisEnvironment; }
SECT_SndEnvironment * GetSndEnvironment (void) { return m_pSndEnvironment; }
// set functions
void SetMecEnvironment (SECT_MecEnvironment * pMecEnv, BOOL bNotifySave = TRUE);
void SetVisEnvironment (SECT_VisEnvironment * pVisEnv, BOOL bNotifySave = TRUE);
void SetSndEnvironment (SECT_SndEnvironment * pSndEnv, BOOL bNotifySave = TRUE);
void fn_vInitSndEnvironment (void);
CString GetSndEnvironmentReference (void);
// save
static void CallBackSaveEnvironment (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
};
//#################################################################################
// Environment (list element)
//#################################################################################
class SECT_EnvElem : public SECT_EnvElementBase,
public CPA_EdElement<SECT_EnvElem, SECT_tdxHandleOfElementLstEnvironment, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstEnvironment)*>
{
protected:
SECT_Environment *m_pEnvironment;
public:
SECT_EnvElem (SECT_tdxHandleOfElementLstEnvironment hEnvElem, Sector_Object *pOwnerSector);
SECT_EnvElem (SECT_Environment *pEnvironment, Sector_Object *pOwnerSector);
~SECT_EnvElem (void);
void *GetEngineStruct() { return GetStruct(); }
// environment
SECT_Environment * GetEnvironment (void) { return m_pEnvironment; }
void SetEnvironment (SECT_Environment *pEnvironment);
};
//#################################################################################
// Environment List
//#################################################################################
class SECT_EnvironmentList : public CPA_EdList<SECT_EnvElem, SECT_tdxHandleOfElementLstEnvironment, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstEnvironment)*>
{
protected:
Sector_Object *m_pOwnerSector;
public:
SECT_EnvironmentList (void) { };
~SECT_EnvironmentList (void) { };
void SetOwnerSector (Sector_Object *pOwnerSector) { m_pOwnerSector = pOwnerSector; }
BOOL fn_bAddAnElement (SECT_EnvElem *pNewElem, SECT_EnvElem *pPreviousElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAnElement (SECT_EnvElem *pOldElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAllElements (BOOL bUpdateEngine = TRUE);
SECT_EnvElem * GetElementWithEnvironment (SECT_Environment *pEnvironment);
};
//#################################################################################
// Environment ListBox
//#################################################################################
class SECT_EnvListBox : public CPA_SortedListBox
{
protected:
Sector_Interface *m_pSectorInterface;
tdeTypeElem m_eType;
CFormView *m_pDialog;
public:
SECT_EnvListBox (void);
~SECT_EnvListBox (void);
void fn_vInitParameters (CFormView *pDialog, Sector_Interface *pSectorInterface, tdeTypeElem eType);
void DrawItem (LPDRAWITEMSTRUCT lpDIS);
virtual BOOL fn_bIsCurrentElement (CPA_BaseObject *pElem);
virtual BOOL fn_bIsSelectedElement (CPA_BaseObject *pElem);
virtual BOOL fn_bIsAlreadyUsed (CPA_BaseObject *pElem);
};
#endif //__SECT_ENV_HPP__
*/

View File

@@ -0,0 +1,497 @@
/*=========================================================================
*
* SECTint.hpp : Sector DLL Interface - definition
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_INT_HPP__
#define __SECT_INT_HPP__
#include "incSND.h"
#include "incITF.h"
#include "SECTobj.hpp"
// if you want only one instance of your DLL
// activate the next line
#define DLL_ONLY_ONE_INSTANCE
// mode
typedef enum
{
E_em_EditSector,
E_em_EditList
//Shaitan Clean Env
// E_em_EditEnv
}
tdeEditMode;
// colors
#define C_ColorEdited E_lc_Red
#define C_ColorSelected E_lc_Blue
#define C_ColorShow E_lc_Green
#define C_ColorSurf E_lc_LightBlue
#define C_NoColor E_lc_NoColor
// dialogs
class SECT_DialogList;
class SECT_DialogMode;
class SECT_DialogEdit;
class SECT_DialogSel;
class SECT_DialogBase;
class SECT_DialogActiv;
class SECT_DialogColls;
class SECT_DialogGraph;
class SECT_DialogSound;
class SECT_DialogSoundEvent;
class SECT_DialogDistance;
//Shaitan Clean Env
/*
class SECT_DialogEnvList;
class SECT_DialogEnvs;
class SECT_DialogSrf;
class SECT_DialogEnv;
class SECT_DialogMec;
class SECT_DialogVis;
*/
extern BOOL g_bCanSave;
/*===========================================================================
* Description: class Sector_Interface
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class Sector_Interface : public CPA_ObjectDLLBase
{
private:
// edited sector
CPA_SuperObject *m_pEditedSector;
CPA_SuperObject *m_pSelectedSector;
// KeyBoard
CPA_KeyActionConfiguration * m_pKeyboard;
// ImageList
CImageList m_oStateIconList;
// Frames
CSplitFrame * m_pSectorLeftFrame;
CSplitFrame * m_pSectorBottomFrame;
//Shaitan Clean Env
/*
CSplitFrame * m_pEnvLeftFrame;
CSplitFrame * m_pEnvBottomFrame;
*/
CSplitFrame * m_pCurrentLeftFrame;
CSplitFrame * m_pCurrentBottomFrame;
// Dialogs (Sector)
CPA_DialogList * m_pSectorDialogList;
SECT_DialogEdit * m_pSectorDialogEdit;
SECT_DialogMode * m_pSectorDialogMode;
SECT_DialogSel * m_pDialogSel;
SECT_DialogActiv * m_pDialogActiv;
SECT_DialogColls * m_pDialogColls;
SECT_DialogGraph * m_pDialogGraph;
SECT_DialogSound * m_pDialogSound;
SECT_DialogSoundEvent * m_pDialogSoundEvent;
SECT_DialogDistance * m_pDialogDistance;
//Shaitan Clean Env
/*
// Dialogs (Env)
CPA_DialogList * m_pEnvDialogList;
SECT_DialogEdit * m_pEnvDialogEdit;
SECT_DialogMode * m_pEnvDialogMode;
SECT_DialogEnvList * m_pDialogEnvList;
SECT_DialogEnvs * m_pDialogEnvs;
SECT_DialogSrf * m_pDialogSrf;
SECT_DialogEnv * m_pDialogEnv;
SECT_DialogMec * m_pDialogMec;
SECT_DialogVis * m_pDialogVis;
*/
// Dialogs (Current)
CPA_DialogList * m_pCurrentDialogList;
SECT_DialogEdit * m_pCurrentDialogEdit;
SECT_DialogMode * m_pCurrentDialogMode;
// Modes
tdeEditMode m_eEditMode;
int m_aListActivity[C_NumberOfLists];
//Shaitan Clean Env
/*
// Environment
CString m_csEnvFileName;
CString m_csMecEnvFileName;
CString m_csVisEnvFileName;
*/
// Reference Path
CString m_csSECTRefPath;
//Shaitan Clean Env
/*
CString m_csSURFRefPath;
CString m_csENVRefPath;
CString m_csMECRefPath;
CString m_csVISRefPath;
*/
// Select Mode
CString m_csSaveSelectMode;
BOOL m_bPreviousState;
BOOL m_bPreviousLinkMode;
// Sound
CPA_BaseObjectList * m_pSoundEventList;
//Shaitan Clean Env
/*
CPA_BaseObjectList * m_pSoundEnvList;
// Surface
CPA_SuperObject * m_pCurrentVisual;
SECT_Surface * m_pSurfaceToDraw;
*/
// Init
BOOL m_bAllInitialised;
//Shaitan Clean Env
// Environments
// CPA_List<CPA_SuperObject> m_oSelectList;
// Symetric Mode
BOOL m_bSymetricMode;
// Borders
BOOL m_bDisplayBorders;
// Copy / Paste
CPA_List<CPA_SuperObject> m_oCopyOfSectorList;
public:
Sector_Interface(void);
~Sector_Interface(void);
/*===========================================================================
Get functions
=========================================================================*/
// current dialog
CPA_DialogList * GetDialogList (void) { return m_pCurrentDialogList; }
SECT_DialogEdit * GetDialogEdit (void) { return m_pCurrentDialogEdit; }
SECT_DialogMode * GetDialogMode (void) { return m_pCurrentDialogMode; }
// sector dialogs
SECT_DialogSel * GetDialogSel (void) { return m_pDialogSel; }
SECT_DialogBase * GetSingleList (tdeTypeList eType);
//Shaitan Clean Env
/*
// env dialogs
SECT_DialogEnvList * GetDialogEnvList (void) { return m_pDialogEnvList; }
SECT_DialogEnvs * GetDialogEnvs (void) { return m_pDialogEnvs; }
SECT_DialogSrf * GetDialogSrf (void) { return m_pDialogSrf; }
SECT_DialogEnv * GetDialogEnv (void) { return m_pDialogEnv; }
SECT_DialogMec * GetDialogMec (void) { return m_pDialogMec; }
SECT_DialogVis * GetDialogVis (void) { return m_pDialogVis; }
*/
CPA_SuperObject * GetEditedSector (void) { return m_pEditedSector; }
CPA_SuperObject * GetSectorToEdit (CPA_List<CPA_BaseObject> *pParam);
tdeEditMode GetEditMode (void) { return m_eEditMode; }
int GetListActivity (tdeTypeList eList) { return m_aListActivity[eList]; }
CString GetSECTRefPath (void) { return m_csSECTRefPath; }
//Shaitan Clean Env
/*
CString GetSURFRefPath (void) { return m_csSURFRefPath; }
CString GetENVRefPath (void) { return m_csENVRefPath; }
CString GetMECRefPath (void) { return m_csMECRefPath; }
CString GetVISRefPath (void) { return m_csVISRefPath; }
SECT_Surface * GetSurfaceToDraw (void) { return m_pSurfaceToDraw; }
*/
CPA_SuperObject * GetSectorWithName (CString csName);
//Shaitan Clean Env
// CPA_BaseObjectList * GetSoundEnvList (void) { return m_pSoundEnvList; }
CPA_BaseObjectList * GetSoundEventList (void) { return m_pSoundEventList; }
//Shaitan Clean Env
// CPA_List<CPA_SuperObject> * GetSelectList (void) { return &m_oSelectList; }
CPA_List<CPA_SuperObject> * GetCopyOfSectorList (void) { return &m_oCopyOfSectorList; }
BOOL fn_bSymetricMode (void) { return m_bSymetricMode; }
BOOL fn_bDisplayBorders (void) { return m_bDisplayBorders; }
/*===========================================================================
Set functions
=========================================================================*/
void SetEditMode (tdeEditMode eNewMode, BOOL bRedraw = TRUE);
void SetListActivity (tdeTypeList eType, BOOL bActive, BOOL bRedraw = TRUE);
void SetCurrentFrame (tdeEditMode eNewMode);
void SetSymetricMode (BOOL bSymetricMode) { m_bSymetricMode = bSymetricMode; }
void fn_vUpdateEditMode (BOOL bReinit = FALSE);
/*===========================================================================
Dialogs
=========================================================================*/
void fn_vCreateSectorDialogs (CString csFileName);
//Shaitan Clean Env
// void fn_vCreateEnvironmentDialogs (CString csFileName);
void fn_vOnKeyDownInSectorList (SECT_DialogBase *pDialog, UINT nChar);
//Shaitan Clean Env
// void fn_vOnKeyDownInEnvList (CPA_SuperObject *pSector, long lNumEnvElem, UINT nKey);
/*===========================================================================
Others
=========================================================================*/
// inits
void fn_vReinitEditor (CPA_SuperObject *pSectorToEdit);
// permissions & modifs
BOOL fn_bAcceptModifHierarchy (tdeStatus eStatus);
void fn_vOnModifHierarchy (tdeStatus eStatus);
// colors
void fn_vShowEditedSector (BOOL bUpdateDrawing, BOOL bAlone = TRUE);
void fn_vShowAllSectors (BOOL bUpdateDrawing = TRUE);
void fn_vShowSelection (BOOL bUpdateDrawing = TRUE);
void fn_vSetRecursiveColor (CPA_SuperObject *pEdObj, tdeLocalColor eColor);
// selection
void fn_vSelectNewSector (CPA_SuperObject *pSector, BOOL bCenterOnSector = FALSE, BOOL bUpdateDrawing = TRUE);
// lists
void fn_vUpdateActiveLists (CPA_SuperObject *pSector);
// select for environment
void fn_vUpdateSelectList (CPA_SuperObject *pSector);
// preferences
void fn_vSaveDialogsPreferences (void);
// copy / paste
void fn_vCopySectorList (CPA_SuperObject *pSector, tdeTypeList eList);
void fn_vPasteSectorList (CPA_SuperObject *pSector, tdeTypeList eList);
/*===========================================================================
Environments
=========================================================================*/
//Shaitan Clean Env
/*
void fn_vInitEnvironmentFiles (void);
void fn_vLoadEnvironments (void);
void fn_vLoadMecEnvironments (void);
void fn_vLoadVisEnvironments (void);
CString GetEnvFileName (void) { return m_csEnvFileName; }
CString GetMecEnvFileName (void) { return m_csMecEnvFileName; }
CString GetVisEnvFileName (void) { return m_csVisEnvFileName; }
SECT_Environment * GetOrBuildEnvironment (ENV_tdxHandleToEnvironment hEnvironment);
SECT_Environment * GetEnvironmentWithName (CString csName);
SECT_Environment * GetDefaultEnvironment (void);
SECT_MecEnvironment * GetOrBuildMecEnvironment (DNM_tdxHandleToMecEnvironment hMecEnv);
SECT_MecEnvironment * GetDefaultMecEnvironment (void);
SECT_VisEnvironment * GetOrBuildVisEnvironment (ACP_tdxHandleToVisualEnvironment hVisEnv);
SECT_VisEnvironment * GetDefaultVisEnvironment (void);
SECT_SndEnvironment * GetOrNullSndEnvironment (SND_tdxHandleToSoundInfo hSndEnv);
SECT_SndEnvironment * GetDefaultSndEnvironment (void);
*/
/*===========================================================================
Sounds
=========================================================================*/
void fn_vReinitSoundParameters (void);
SECT_SoundEvent * GetOrNullSoundEvent (SND_tdxHandleToSoundEvent hSoundEvent);
SECT_SoundEvent * GetDefaultSoundEvent (void);
/*===========================================================================
Surface
=========================================================================*/
//Shaitan Clean Env
/*
void fn_vLoadSurfaces (void);
void SetSurfaceToDraw (SECT_Surface *pSurface);
SECT_Surface * GetOrBuildSurface (SRF_tdxHandleToSurface hSurface);
SECT_Surface * GetDefaultSurface (Sector_Object *pSector);
long GetSurfaceHeightIndex (SECT_Surface *pSurface, long lPrevIndex);
void fn_vUpdateHeightIndex (SECT_Surface *pSurface);
void fn_vUpdateAllSurfaceList (SECT_Surface *pSurface);
*/
/*===========================================================================
Water Effect
=========================================================================*/
//Shaitan Clean Env
// void fn_vUpdateSurfaceList (BOOL bOnlyCurrentSurfaces = TRUE);
/*===========================================================================
Borders
=========================================================================*/
void fn_vDisplayBorder (Sector_Object *pSector, BOOL bDisplay, BOOL bUpdate);
void fn_vDisplayBorders (BOOL bDisplay);
/*===========================================================================
Virtual
=========================================================================*/
BOOL fn_bCanChangeVirtual (CPA_SuperObject *pSector, BOOL bVirtual);
void fn_vUpdateAllVirtuals (void);
//#################################################################################
// DLL FUNCTIONS OVERLOAD
//#################################################################################
/*===========================================================================
Inits
=========================================================================*/
void fn_vJustAfterRegistered (void);
void fn_vConstruct (void);
void fn_vInitListByType (CPA_World *pWorld);
void fn_vBeforeEngine (void);
void fn_vBeforeEditor (void);
void fn_vLevelChanges (void);
void fn_vLevelHasChanged (void);
/*===========================================================================
Hierarchy
=========================================================================*/
void fn_vBuildNewEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance);
void fn_vUpdateEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance);
BOOL fn_bCanHandleThisType (long lEngineType);
BOOL fn_bLoadBaseObject(CPA_BaseObject *p_oObject);
/*===========================================================================
Dialog Bar - Mircea Dunka 31 Aug. 1998
=========================================================================*/
void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);
/*===========================================================================
Editor
=========================================================================*/
BOOL fn_bDefineSubMenu (EDT_SubMenu *_p_oEDTSubMenu);
void _OnSubMenuCommand (EDT_SubMenu *_p_oEDTSubMenu, UINT uiMsgID);
BOOL fn_bDefinePopupMenu (EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bAsCurrentEditor);
void _OnPopUpMenuCommand (UINT m_IDCmdMsg);
BOOL fn_bCanActivateEditor (CPA_List<CPA_BaseObject> *pParams);
void fn_vOnActivateEditor (CPA_List<CPA_BaseObject> *pParam, BOOL bBackActivated=FALSE);
void fn_vOnCloseEditor (void);
BOOL fn_bHasGainedFocus (void);
void fn_vHasLostFocus (void);
/*===========================================================================
Permissions
=========================================================================*/
tdeTypeAnswer fn_bAcceptSelect (CPA_SuperObject *pEdObj, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking, tdeStatus eStatus);
BOOL fn_bAcceptModifDelete (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
BOOL fn_bAcceptModifParent (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
BOOL fn_bAcceptModifCopy (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
BOOL fn_bAcceptModifTranslate (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
BOOL fn_bAcceptModifRotate (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
BOOL fn_bAcceptModifScale (CPA_SuperObject *pEdObj, tdeStatus eStatus);
BOOL fn_bAcceptModifInsert (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, tdeStatus eStatus);
BOOL fn_bAcceptAsParent (CPA_BaseObject *pChild, CPA_BaseObject *pParent);
BOOL fn_bAcceptAsChild (CPA_BaseObject *pParent, CPA_BaseObject *pChild);
/*===========================================================================
Modifs
=========================================================================*/
void fn_vOnSelect (CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifName (CPA_SuperObject *pEdObj, CString csInitalName, CString csFinalName, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifDelete (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifParent (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifCopy (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnModifInsert (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, tdstPosition *p_stPosition,
tdeTypeModif eType, tdeStatus eStatus);
void fn_vOnChangeRoot (void);
void fn_vOnChangeWorld (void);
void fn_vOnChangeDevice (void);
/*===========================================================================
Messages
=========================================================================*/
BOOL _OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags);
BOOL _OnLButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking);
BOOL _OnRButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking);
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking);
/*===========================================================================
for Dialog List
=========================================================================*/
void GetListsForDialog (CPA_DialogList *pDialog);
void fn_vInitDefaultParameters (CPA_DialogList *pDialog);
BOOL fn_bOnSelChangeListObjects (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
BOOL fn_bOnDblClkListObjects (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject);
int GetStateForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
BOOL GetColorsForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject,
COLORREF *pRectColor, COLORREF *pTextColor);
BOOL fn_bIsInActiveLists (CPA_SuperObject *pSector);
BOOL fn_bIsAvailableForList (CPA_SuperObject *pSector);
tdeTypeList GetFirstActiveList (void);
void fn_vGetSectorsToDraw (CPA_List<CPA_SuperObject> *pSectorList);
void fn_vLinkNearestSectors (void);
};
extern tdstDLLIdentity g_stSectorIdentity;
#endif // __SECT_INT_HPP__

View File

@@ -0,0 +1,255 @@
/*=========================================================================
*
* SECTlist.hpp : Definition of Editor Lists
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_LIST_HPP__
#define __SECT_LIST_HPP__
#include "incGLI.h"
#include "incSPO.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"
class Sector_Interface;
typedef CPA_SaveObject SECT_SoundEvent;
//#################################################################################
// Elements
//#################################################################################
/*===========================================================================
Graphic Element
===========================================================================*/
class SECT_GraphicElement : public SECT_ElementBase,
public CPA_EdElement<SECT_GraphicElement, SECT_tdxHandleOfElementLstGraphicInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstGraphicInteraction)*>
{
public:
SECT_GraphicElement (SECT_tdxHandleOfElementLstGraphicInteraction hGraphicElement, Sector_Object *pOwnerSector);
SECT_GraphicElement (CPA_SuperObject *pSector, Sector_Object *pOwnerSector);
~SECT_GraphicElement (void);
void *GetEngineStruct() { return GetStruct(); }
int GetGraphicLevel (void);
void SetGraphicLevel (int iNewLevel, BOOL bNotify = TRUE);
char GetGraphicMode (void);
void SetGraphicMode (char cNewMode, BOOL bNotify = TRUE);
};
/*===========================================================================
Collision Element
===========================================================================*/
class SECT_CollisionElement : public SECT_ElementBase,
public CPA_EdElement<SECT_CollisionElement, SECT_tdxHandleOfElementLstCollisionInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstCollisionInteraction)*>
{
public:
SECT_CollisionElement (SECT_tdxHandleOfElementLstCollisionInteraction hCollisionElement, Sector_Object *pOwnerSector);
SECT_CollisionElement (CPA_SuperObject *pSector, Sector_Object *pOwnerSector);
~SECT_CollisionElement (void);
void *GetEngineStruct() { return GetStruct(); }
};
/*===========================================================================
Activity Element
===========================================================================*/
class SECT_ActivityElement : public SECT_ElementBase,
public CPA_EdElement<SECT_ActivityElement, SECT_tdxHandleOfElementLstActivityInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstActivityInteraction)*>
{
public:
SECT_ActivityElement (SECT_tdxHandleOfElementLstActivityInteraction hActivityElement, Sector_Object *pOwnerSector);
SECT_ActivityElement (CPA_SuperObject *pSector, Sector_Object *pOwnerSector);
~SECT_ActivityElement (void);
void *GetEngineStruct() { return GetStruct(); }
};
/*===========================================================================
Sound Element
===========================================================================*/
class SECT_SoundElement : public SECT_ElementBase,
public CPA_EdElement<SECT_SoundElement, SECT_tdxHandleOfElementLstSoundInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstSoundInteraction)*>
{
public:
SECT_SoundElement (SECT_tdxHandleOfElementLstSoundInteraction hSoundElement, Sector_Object *pOwnerSector);
SECT_SoundElement (CPA_SuperObject *pSector, Sector_Object *pOwnerSector);
~SECT_SoundElement (void);
void *GetEngineStruct() { return GetStruct(); }
int GetSoundLevel (void);
void SetSoundLevel (int iNewLevel, BOOL bNotify = TRUE);
};
/*===========================================================================
SoundEvent Engine Element
===========================================================================*/
class SECT_SndEvtEngineElem : public CPA_EdElement<SECT_SndEvtEngineElem, SCT_tdxHandleOfLstSoundEvent , LST2_M_StaticAnchorTo(SCT_tdxHandleOfLstSoundEvent)*>
{
protected:
Sector_Object *m_pOwnerSector;
CPA_SuperObject *m_pSector;
SECT_SoundEvent *m_pSoundEvent;
public:
SECT_SndEvtEngineElem (SCT_tdxHandleOfLstSoundEvent hSoundEventElement, Sector_Object *pOwnerSector);
SECT_SndEvtEngineElem (CPA_SuperObject *pSector, SECT_SoundEvent *pSoundEvent, Sector_Object *pOwnerSector);
~SECT_SndEvtEngineElem (void);
void *GetEngineStruct() { return GetStruct(); }
Sector_Object * GetOwnerSector (void) { return m_pOwnerSector; }
CPA_SuperObject * GetSector (void) { return m_pSector; }
SECT_SoundEvent * GetSoundEvent (void) { return m_pSoundEvent; }
CString GetSoundEventReference (void);
void fn_vInitSoundEvent (void);
};
/*===========================================================================
SoundEvent Element
===========================================================================*/
class SECT_SoundEventElement : public SECT_ElementBase
{
protected:
CPA_List<SECT_SndEvtEngineElem> m_oSoundEventList;
public:
SECT_SoundEventElement (CPA_SuperObject *pSector, Sector_Object *pOwnerSector);
~SECT_SoundEventElement (void);
CPA_List<SECT_SndEvtEngineElem> * GetSndEvtList (void) { return &m_oSoundEventList; }
void fn_vAddSoundEvent (SECT_SndEvtEngineElem *pSoundEventElement, BOOL bNotify = TRUE);
void fn_vRemoveSoundEvent (SECT_SndEvtEngineElem *pSoundEventElement, BOOL bNotify = TRUE);
void fn_vRemoveAllSoundEvents (BOOL bNotify = TRUE);
void fn_vCopyMissingSoundEvents (SECT_SoundEventElement *pModel, BOOL bNotify = TRUE);
SECT_SndEvtEngineElem * GetElementWithSoundEvent (SECT_SoundEvent *pSoundEvent);
};
//#################################################################################
// Lists
//#################################################################################
/*===========================================================================
Graphic List
===========================================================================*/
class SECT_GraphicList : public CPA_EdList<SECT_GraphicElement, SECT_tdxHandleOfElementLstGraphicInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstGraphicInteraction)*>,
public SECT_ListBase
{
public:
SECT_GraphicList (void) { };
~SECT_GraphicList (void) { };
BOOL fn_bAddAnElement (SECT_ElementBase *pNewElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAnElement (SECT_ElementBase *pOldElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAllElements (BOOL bUpdateEngine = TRUE);
SECT_ElementBase * GetHeadElementBase (POSITION& rPosition);
SECT_ElementBase * GetNextElementBase (POSITION& rPosition);
};
/*===========================================================================
Collision List
===========================================================================*/
class SECT_CollisionList : public CPA_EdList<SECT_CollisionElement, SECT_tdxHandleOfElementLstCollisionInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstCollisionInteraction)*>,
public SECT_ListBase
{
public:
SECT_CollisionList (void) { };
~SECT_CollisionList (void) { };
BOOL fn_bAddAnElement (SECT_ElementBase *pNewElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAnElement (SECT_ElementBase *pOldElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAllElements (BOOL bUpdateEngine = TRUE);
SECT_ElementBase * GetHeadElementBase (POSITION& rPosition);
SECT_ElementBase * GetNextElementBase (POSITION& rPosition);
};
/*===========================================================================
Activity List
===========================================================================*/
class SECT_ActivityList : public CPA_EdList<SECT_ActivityElement, SECT_tdxHandleOfElementLstActivityInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstActivityInteraction)*>,
public SECT_ListBase
{
public:
SECT_ActivityList (void) { };
~SECT_ActivityList (void) { };
BOOL fn_bAddAnElement (SECT_ElementBase *pNewElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAnElement (SECT_ElementBase *pOldElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAllElements (BOOL bUpdateEngine = TRUE);
SECT_ElementBase * GetHeadElementBase (POSITION& rPosition);
SECT_ElementBase * GetNextElementBase (POSITION& rPosition);
};
/*===========================================================================
Sound List
===========================================================================*/
class SECT_SoundList : public CPA_EdList<SECT_SoundElement, SECT_tdxHandleOfElementLstSoundInteraction, LST2_M_StaticAnchorTo(SECT_tdxHandleOfElementLstSoundInteraction)*>,
public SECT_ListBase
{
public:
SECT_SoundList (void) { };
~SECT_SoundList (void) { };
BOOL fn_bAddAnElement (SECT_ElementBase *pNewElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAnElement (SECT_ElementBase *pOldElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAllElements (BOOL bUpdateEngine = TRUE);
SECT_ElementBase * GetHeadElementBase (POSITION& rPosition);
SECT_ElementBase * GetNextElementBase (POSITION& rPosition);
};
/*===========================================================================
SoundEvent List
===========================================================================*/
class SECT_SoundEventList : public CPA_EdList<SECT_SndEvtEngineElem, SCT_tdxHandleOfLstSoundEvent, LST2_M_StaticAnchorTo(SCT_tdxHandleOfLstSoundEvent)*>,
public SECT_ListBase
{
protected:
CPA_List<SECT_SoundEventElement> m_oElementList;
public:
SECT_SoundEventList (void) { };
~SECT_SoundEventList (void) { };
BOOL fn_bAddAnElement (SECT_SndEvtEngineElem *pEngineElem);
BOOL fn_bAddAnElement (CPA_SuperObject *pSector, SECT_SoundEvent *pSoundEvent);
BOOL fn_bRemoveAnElement (CPA_SuperObject *pSector, SECT_SoundEvent *pSoundEvent);
BOOL fn_bAddAnElement (SECT_ElementBase *pNewElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAnElement (SECT_ElementBase *pOldElem, BOOL bUpdateEngine = TRUE);
void fn_vRemoveAllElements (BOOL bUpdateEngine = TRUE);
SECT_ElementBase * GetHeadElementBase (POSITION& rPosition);
SECT_ElementBase * GetNextElementBase (POSITION& rPosition);
};
#endif //__SECT_LIST_HPP__

View File

@@ -0,0 +1,224 @@
/*=========================================================================
*
* SECTobj.hpp : Sector_Object
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_OBJ_HPP__
#define __SECT_OBJ_HPP__
//Shaitan Clean Env
//#include "SECTenv.hpp"
#include "SECTlist.hpp"
//Shaitan Clean Env
//#include "SECTsurf.hpp"
//**************************************
#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
//**************************************
//#################################################################################
// Defines
//#################################################################################
typedef enum
{
E_NoActiveList = -1,
E_Graphic = 0,
E_Collision = 1,
E_Activity = 2,
E_Sound = 3,
E_SoundEvent = 4
}
tdeTypeList;
#define C_NumberOfLists 5
#define C_szSectorBorderSubSection "Border"
/*===========================================================================
* Description: class Sector_Object
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class Sector_Object : public CPA_SaveObject,
public CPA_EdMot<SECT_tdxHandleOfSectorObject>
{
protected:
// links
SECT_CollisionList m_oCollisionList;
SECT_ActivityList m_oActivityList;
SECT_GraphicList m_oGraphicList;
SECT_SoundList m_oSoundList;
SECT_SoundEventList m_oSoundEventList;
//Shaitan Clean Env
/*
// env & srf
SECT_SurfaceList m_oSurfaceList;
SECT_EnvironmentList m_oEnvironmentList;
long m_lNbEnvironments;
long m_lNbSurfaces;
*/
// sub-sections
BOOL m_bHasSectorsLinkSection;
//Shaitan Clean Env
// BOOL m_bHasEnvAndSurfSection;
// super-object
CPA_SuperObject *m_pSuperObject;
BOOL m_bWasRenamed;
CPA_SuperObject *m_pBorder;
CPA_SectionObject *m_pBorderSection;
SECT_ElementBase *m_pVirtualSection;
SECT_ElementBase *m_pCameraSection;
SECT_ElementBase *m_pPrioritySection;
void fn_vInitEngineAnchors (void);
public:
Sector_Object (CPA_ObjectDLLBase *p_oDLL,
SECT_tdxHandleOfSectorObject hObj,
CString csName = "", CString csFileName = "");
~Sector_Object (void);
// inits
static void StaticInit();
// return Data
virtual long GetDataType (void) { return HIE_C_ulSector; }
virtual void * GetData (void) { return GetStruct(); }
// engine struct
void *GetEngineStruct() { return GetStruct(); }
void SetEngineStruct (SECT_tdxHandleOfSectorObject hObj);
// super-object
CPA_SuperObject * GetSuperObject (void) { return m_pSuperObject; }
void SetSuperObject (CPA_SuperObject *pSupObj) { m_pSuperObject = pSupObj; }
// border
CPA_SuperObject * GetBorder (void) { return m_pBorder; }
CPA_SectionObject * GetBorderSection (void) { return m_pBorderSection; }
MTH_tdxReal GetZmaxOfSector (void);
MTH_tdxReal GetZmaxOfBorder (void);
void SetZmaxOfBorder (MTH_tdxReal xNewZmax);
void GetMinPointInBorder (MTH3D_tdstVector *p_stMinPoint);
void GetMaxPointInBorder (MTH3D_tdstVector *p_stMaxPoint);
void GetCenterInBorder (MTH3D_tdstVector *p_stCenter);
MTH_tdxReal GetMaxDimension (void);
// Zfar
MTH_tdxReal GetZfarInSector (void);
void SetZfarInSector (MTH_tdxReal xNewZfar);
// virtual
SECT_ElementBase * GetVirtualSection (void) { return m_pVirtualSection; }
SECT_ElementBase * GetCameraSection (void) { return m_pCameraSection; }
SECT_ElementBase * GetPrioritySection (void) { return m_pPrioritySection; }
// interface
Sector_Interface * GetSectorInterface (void) { return (Sector_Interface *)GetEditor(); }
// lists
SECT_SoundEventList * GetSoundEventList (void) { return &m_oSoundEventList; }
SECT_CollisionList * GetCollisionList (void) { return &m_oCollisionList; }
SECT_ActivityList * GetActivityList (void) { return &m_oActivityList; }
SECT_GraphicList * GetGraphicList (void) { return &m_oGraphicList; }
SECT_SoundList * GetSoundList (void) { return &m_oSoundList; }
//Shaitan Clean Env
/*
SECT_EnvironmentList * GetEnvironmentList (void) { return &m_oEnvironmentList; }
SECT_SurfaceList * GetSurfaceList (void) { return &m_oSurfaceList; }
long GetNbEnvironments (void) { return m_lNbEnvironments; }
long GetNbSurfaces (void) { return m_lNbSurfaces; }
*/
// inits
void fn_vInitSortedLists (void);
//Shaitan Clean Env
// void fn_vInitEnvironments (void);
// void fn_vInitSurfaces (void);
void fn_vInitBorder (void);
// virtual or gothrough
BOOL fn_bIsVirtual (void);
void fn_vSetVirtual (BOOL bVirtual, CPA_SuperObject *pBorder = NULL);
// sector links
BOOL fn_bAddSectorInList (SECT_ElementBase *pNewElem, tdeTypeList eType);
BOOL fn_bRemoveSectorInList (SECT_ElementBase *pOldElem, tdeTypeList eType);
SECT_ListBase * GetCurrentList (tdeTypeList eType);
SECT_ElementBase * GetNewElement (tdeTypeList eType, CPA_SuperObject *pSector);
BOOL fn_bHasFullLink (tdeTypeList eType);
//Shaitan Clean Env
/*
// environment element
BOOL fn_bAddEnvironmentElement (SECT_EnvElem *pEnvElem, SECT_SurfElem *pSurfElem);
BOOL fn_bDelEnvironmentElement (SECT_EnvElem *pEnvElem, SECT_SurfElem *pSurfElem);
SECT_EnvElem * GetEnvironment (long lNumEnv);
SECT_SurfElem * GetSurface (long lNumSurf);
long fn_lUpdateEnvironmentElement (long lNumEnvElem);
void fn_vApplySameEnvironment (CPA_List<SECT_Environment> *pListEnv, CPA_List<SECT_Surface> *pListSrf);
*/
// save
BOOL fn_bHasSectorsLinkSection (void) { return m_bHasSectorsLinkSection; }
//Shaitan Clean Env
// BOOL fn_bHasEnvAndSurfSection (void) { return m_bHasEnvAndSurfSection; }
void SetExistingSectorsLinkSection (BOOL bExist) { m_bHasSectorsLinkSection = bExist; }
//Shaitan Clean Env
// void SetExistingEnvAndSurfSection (BOOL bExist) { m_bHasEnvAndSurfSection = bExist; }
CString GetSectorsLinkSection (void);
//Shaitan Clean Env
// CString GetEnvAndSurfSection (void);
static void CallBackSaveName (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
// border
CString GetSectorBorderSection (void);
void fn_vNotifyBorderSection (BOOL bWrite);
static void CallBackSaveSectorBorder (SCR_tdst_File_Description *p_stFile, char *szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
char GetCameraType (void);
void SetCameraType (char cType);
char GetPriority (void);
void SetPriority (char cPriority);
};
#endif //__SECT_OBJ_HPP__

View File

@@ -0,0 +1,160 @@
/*=========================================================================
*
* 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__
*/

View File

@@ -0,0 +1,77 @@
/*=========================================================================
*
* SECdDist.hpp : class SECT_DialogDistance
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_D_DIST_HPP__
#define __SECT_D_DIST_HPP__
#include "SECTres.h"
class Sector_Interface;
//#################################################################################
// Sector Links
//#################################################################################
/*===========================================================================
* Description: Class for the Distance Dialog
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_DialogDistance : public CDialog
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
long m_lLinkDistance;
public:
// standard constructor
SECT_DialogDistance (CWnd* pParent = NULL);
void fn_vInitSectorInterface (Sector_Interface *pInterface);
long GetLinkDistance (void) { return m_lLinkDistance; }
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogDistance)
enum { IDD = SEC_IDD_DIALOGDISTANCE};
CEdit m_cEditDistance;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogDistance)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogDistance)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
// env elem
virtual BOOL OnInitDialog();
afx_msg void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_DIST_HPP__

View File

@@ -0,0 +1,96 @@
/*=========================================================================
*
* SECdEdit.hpp : class SECT_DialogEdit
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_D_EDIT_HPP__
#define __SECT_D_EDIT_HPP__
#include "SECTres.h"
class Sector_Interface;
class SECT_DialogEnv;
/*===========================================================================
* Description: Class for the Dialog
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_DialogEdit : public CFormView
{
// Construction
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
char m_szName[256];
BOOL m_bInitialised;
public:
// standard constructor
SECT_DialogEdit (CWnd* pParent = NULL);
// get functions
CPA_SuperObject * GetSelectedSector (void) { return m_pEditedSector; }
Sector_Interface * GetSectorInterface (void) { return m_pSectorInterface; }
// Dialog
void fn_vInitDialog (Sector_Interface *p_oDLL, CWnd *pParent, const CString csTag);
void fn_vReinitDialog (CPA_SuperObject *pSector);
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogEdit)
enum { IDD = SEC_IDD_DIALOGEDIT };
CComboBox m_cComboSector;
CButton m_cVirtual;
CButton m_cZmaxCheck;
CEdit m_cZmaxEdit;
CButton m_cZfarCheck;
CEdit m_cZfarEdit;
CButton m_cDefault;
CEdit m_cCamTypeEdit;
CEdit m_cPriorityEdit;
CSpinButtonCtrl m_cPrioritySpin;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogEdit)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogEdit)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnSelChangeComboSector();
afx_msg void OnVirtual();
afx_msg void OnZmaxCheck();
afx_msg void OnEditZmax();
afx_msg void OnZfarCheck();
afx_msg void OnEditZfar();
afx_msg void OnDefault();
afx_msg void OnEditCamType();
// afx_msg void OnEditPriority();
afx_msg void OnPrioritySpin(NMHDR * pNMHDR, LRESULT * pResult);
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_EDIT_HPP__

View File

@@ -0,0 +1,157 @@
/*=========================================================================
*
* SECTdEnv.hpp : class SECT_DialogEnv
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_D_ENV_HPP__
#define __SECT_D_ENV_HPP__
#include "SECTres.h"
#include "SECTenv.hpp"
class Sector_Interface;
*/
/*===========================================================================
* Description: Class for the ListBox
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_EnvParamListBox : public SECT_EnvListBox
{
public:
SECT_EnvParamListBox (void);
~SECT_EnvParamListBox (void);
BOOL fn_bIsCurrentElement (CPA_BaseObject *pElem);
BOOL fn_bIsSelectedElement (CPA_BaseObject *pElem);
BOOL fn_bIsAlreadyUsed (CPA_BaseObject *pElem);
};
*/
/*===========================================================================
* Description: Class for the Dialog Environment
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_DialogEnv : public CFormView
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
SECT_Environment *m_pEnvironment;
SECT_Environment *m_pDefaultEnv;
BOOL m_bInitialised;
CString m_csName;
SECT_MecEnvironment *m_pMecEnvironment;
SECT_VisEnvironment *m_pVisEnvironment;
SECT_SndEnvironment *m_pSndEnvironment;
public:
// standard constructor
SECT_DialogEnv (CWnd* pParent = NULL);
// Dialog
void fn_vInitDialog (Sector_Interface *p_oDLL, CWnd *pParent);
void fn_vInitEnvironment (SECT_Environment *pEnvironment, BOOL bNewEnv);
void fn_vInitControls (BOOL bEnable);
void fn_vReinitDialog (void);
// list box
void fn_vInitMecListBox (void);
void fn_vInitVisListBox (void);
void fn_vInitSndListBox (void);
// selection
void fn_vSelectMechanic (SECT_MecEnvironment *pMecEnv, BOOL bUpdateEnv = TRUE);
void fn_vSelectVisual (SECT_VisEnvironment *pVisEnv, BOOL bUpdateEnv = TRUE);
void fn_vSelectSound (SECT_SndEnvironment *pSndEnv, BOOL bUpdateEnv = TRUE);
// sound
int GetSoundIndex (DWORD pElem);
// Get Functions
SECT_MecEnvironment * GetSelectedMecEnv (void) { return m_pMecEnvironment; }
SECT_VisEnvironment * GetSelectedVisEnv (void) { return m_pVisEnvironment; }
SECT_SndEnvironment * GetSelectedSndEnv (void) { return m_pSndEnvironment; }
SECT_Environment * GetCurrentEnv (void) { return m_pEnvironment; }
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogEnv)
enum { IDD = SEC_IDD_DIALOGENV };
// name
CEdit m_cName;
CButton m_cDefault;
// modifs
CButton m_cCancel;
CButton m_cSave;
// mechanic environment
SECT_EnvParamListBox m_cMecListBox;
CButton m_cEditMec;
CButton m_cNewMec;
// mechanic environment
SECT_EnvParamListBox m_cVisListBox;
CButton m_cEditVis;
CButton m_cNewVis;
// sound environment
CListBox m_cSndListBox;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogEnv)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogEnv)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
// name
afx_msg void OnChangeName();
afx_msg void OnDefault();
// modifs
afx_msg void OnCancel();
afx_msg void OnSave();
// mechanic environment
afx_msg void OnSelChangeMecListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDblClkMecListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnEditMec();
afx_msg void OnNewMec();
// mechanic environment
afx_msg void OnSelChangeVisListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDblClkVisListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnEditVis();
afx_msg void OnNewVis();
// sound environment
afx_msg void OnSelChangeSndListBox();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_ENV_HPP__
*/

View File

@@ -0,0 +1,123 @@
/*=========================================================================
*
* SECdEnvs.hpp : class SECT_DialogEnvs
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_D_ENVS_HPP__
#define __SECT_D_ENVS_HPP__
#include "SECTres.h"
#include "SECTenv.hpp"
#include "SECdRep.hpp"
class Sector_Interface;
*/
//#################################################################################
// Environments
//#################################################################################
/*===========================================================================
* Description: Class for the Environment List Box
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_EnvElemListBox : public SECT_EnvListBox
{
public:
SECT_EnvElemListBox (void);
~SECT_EnvElemListBox (void);
BOOL fn_bIsCurrentElement (CPA_BaseObject *pElem);
BOOL fn_bIsSelectedElement (CPA_BaseObject *pElem);
BOOL fn_bIsAlreadyUsed (CPA_BaseObject *pElem);
};
*/
/*===========================================================================
* Description: Class for the Environment List
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_DialogEnvs : public CFormView
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
SECT_EnvElem *m_pEnvElem;
SECT_Environment *m_pEnvironment;
BOOL m_bInitialised;
long m_lEnvElem;
SECT_DialogReplace m_oDialogReplace;
public:
// standard constructor
SECT_DialogEnvs (CWnd* pParent = NULL);
// Dialog
void fn_vInitDialog (Sector_Interface *pDLL, CWnd *pParent);
void fn_vReinitDialog (void);
void fn_vInitEnvListBox (void);
void fn_vInitEnvElem (long lEnvElem);
void fn_vSelectEnv (SECT_Environment *pEnvironment, BOOL bUpdateEnvElem = TRUE);
void fn_vInitControls (BOOL bEnable);
// Get Functions
SECT_EnvElem * GetCurrentEnvElem (void) { return m_pEnvElem; }
SECT_Environment * GetSelectedEnvironment (void) { return m_pEnvironment; }
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogEnvs)
enum { IDD = SEC_IDD_DIALOGENVS };
// env elem
SECT_EnvElemListBox m_cEnvListBox;
CButton m_cNewEnv;
CButton m_cReplace;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogEnvElem)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogEnvElem)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
// env elem
afx_msg void OnSelChangeEnvListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDblClkEnvListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnNewEnv();
afx_msg void OnReplace();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_ENVS_HPP__
*/

View File

@@ -0,0 +1,127 @@
/*=========================================================================
*
* SECTdMec.hpp : class SECT_DialogMec
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_D_MEC_HPP__
#define __SECT_D_MEC_HPP__
#include "SECTres.h"
class Sector_Interface;
/===========================================================================
* Description: Class for the Dialog
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================/
class SECT_DialogMec : public CFormView
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
SECT_MecEnvironment *m_pMecEnv;
SECT_MecEnvironment *m_pDefaultMecEnv;
BOOL m_bInitialised;
// mec environment parameters
CString m_csName;
MTH_tdxReal m_xGravity;
DNM_tdstVector *m_pVertical;
MTH_tdxReal m_xViscosity;
MTH_tdxReal m_xDensity;
MTH_tdxReal m_xLevel;
DNM_tdstVector *m_pStream;
CString m_csVolumic;
public:
// standard constructor
SECT_DialogMec (CWnd* pParent = NULL);
// Dialog
void fn_vInitDialog (Sector_Interface *p_oDLL, CWnd *pParent);
void fn_vReinitDialog (void);
void fn_vInitControls (BOOL bEnable);
void fn_vInitMecEnvironment (SECT_MecEnvironment *pMecEnv, BOOL bEnable);
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogMec)
enum { IDD = SEC_IDD_DIALOGMECENV };
CButton m_cSave;
CButton m_cCancel;
CEdit m_cName;
CButton m_cDefault;
CEdit m_cGravity;
CEdit m_cVectorX;
CEdit m_cVectorY;
CEdit m_cVectorZ;
CEdit m_cViscosity;
CEdit m_cDensity;
CEdit m_cLevel;
CEdit m_cStreamX;
CEdit m_cStreamY;
CEdit m_cStreamZ;
CComboBox m_cVolumic;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogMec)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogMec)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
afx_msg void OnSave();
afx_msg void OnCancel();
afx_msg void OnChangeName();
afx_msg void OnDefault();
afx_msg void OnChangeGravity();
afx_msg void OnChangeVectorX();
afx_msg void OnChangeVectorY();
afx_msg void OnChangeVectorZ();
afx_msg void OnChangeViscosity();
afx_msg void OnChangeDensity();
afx_msg void OnChangeLevel();
afx_msg void OnChangeStreamX();
afx_msg void OnChangeStreamY();
afx_msg void OnChangeStreamZ();
afx_msg void OnSelChangeComboVolumic();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_MEC_HPP__
*/

View File

@@ -0,0 +1,88 @@
/*=========================================================================
*
* SECdMode.hpp : class SECT_DialogMode
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_D_MODE_HPP__
#define __SECT_D_MODE_HPP__
#include "SECTres.h"
class Sector_Interface;
/*===========================================================================
* Description: Class for the Dialog
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_DialogMode : public CFormView
{
// Construction
protected:
Sector_Interface *m_pOwnerDLL;
BOOL m_bShowSymetric;
BOOL m_bInitialised;
public:
// standard constructor
SECT_DialogMode (CWnd* pParent = NULL);
// get functions
Sector_Interface * GetOwnerDLL (void) { return m_pOwnerDLL; }
// Dialog
void fn_vInitDialog (Sector_Interface *pDLL, CWnd *pParent, BOOL bShowSymetric, const CString csTag);
void fn_vInitControls (void);
void fn_vUpdateEditMode (void);
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogMode)
enum { IDD = SEC_IDD_DIALOGMODE };
CButton m_cSector;
CButton m_cList;
//Shaitan Clean Env
// CButton m_cEnv;
CStatic m_cSectorText;
CStatic m_cListText;
//Shaitan Clean Env
// CStatic m_cEnvText;
CButton m_cModeSym;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogMode)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogMode)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
afx_msg void OnSectors();
afx_msg void OnList();
//Shaitan Clean Env
// afx_msg void OnEnv();
afx_msg void OnModeSym();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_MODE_HPP__

View File

@@ -0,0 +1,83 @@
/*=========================================================================
*
* SECdRep.hpp : class SECT_DialogReplace
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_D_REP_HPP__
#define __SECT_D_REP_HPP__
#include "SECTres.h"
class Sector_Interface;
*/
//#################################################################################
// Environments
//#################################################################################
/*===========================================================================
* Description: Class for the Environment List
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_DialogReplace : public CDialog
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
public:
// standard constructor
SECT_DialogReplace (CWnd* pParent = NULL);
void fn_vInitSectorInterface (Sector_Interface *pInterface);
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogReplace)
enum { IDD = SEC_IDD_DIALOGREPLACE };
// env elem
CComboBox m_cInitEnv;
CComboBox m_cNewEnv;
CButton m_cEdit;
CButton m_cSelect;
CButton m_cAll;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogEnvElem)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogEnvElem)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
// env elem
virtual BOOL OnInitDialog();
afx_msg void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_REP_HPP__
*/

View File

@@ -0,0 +1,136 @@
/*=========================================================================
*
* SECdSel.hpp : class SECT_DialogSel
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_D_SEL_HPP__
#define __SECT_D_SEL_HPP__
#include "SECTres.h"
class Sector_Interface;
class SECT_DialogSel;
/*===========================================================================
* Description: Class for the SoundEventListBox
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_SndEvListBox : public CPA_SortedListBox
{
protected:
Sector_Interface *m_pSectorInterface;
SECT_DialogSel *m_pDialogSel;
public:
SECT_SndEvListBox();
~SECT_SndEvListBox() { }
void fn_vInitDialogParameters (SECT_DialogSel *pDialogSel);
BOOL fn_bIsInCurrentList (CPA_SaveObject *pSoundEvent);
void DrawItem (LPDRAWITEMSTRUCT lpDIS);
};
/*===========================================================================
* Description: Class for the Dialog
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_DialogSel : public CFormView
{
// Construction
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pSelectedSector;
CPA_SuperObject *m_pEditedSector;
char m_szName[256];
BOOL m_bInitialised;
public:
// standard constructor
SECT_DialogSel (CWnd* pParent = NULL);
// get functions
CPA_SuperObject * GetEditedSector (void) { return m_pEditedSector; }
CPA_SuperObject * GetSelectedSector (void) { return m_pSelectedSector; }
Sector_Interface * GetSectorInterface (void) { return m_pSectorInterface; }
// Dialog
void fn_vInitDialog (Sector_Interface *p_oDLL, CWnd *pParent);
void fn_vReinitDialog (CPA_SuperObject *pSector, CPA_SuperObject *pEditedSector);
void fn_vInitControls (BOOL bEnable);
void fn_vOnCheckList (CButton *pControl, tdeTypeList eType);
void fn_vUpdateCheck (void);
void fn_vInitSoundEventList (void);
void fn_vUpdateSoundEventList (SECT_SoundEventElement *pSoundEvent);
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogSel)
enum { IDD = SEC_IDD_DIALOGSELECT };
CButton m_cSymetric;
CComboBox m_cComboSector;
CButton m_cVirtual;
CButton m_cGraphic;
CSpinButtonCtrl m_cGraphicSpin;
CEdit m_cGraphicLevel;
CButton m_cGraphicMode;
CButton m_cCollision;
CButton m_cActivity;
CButton m_cSound;
CSpinButtonCtrl m_cSoundSpin;
CEdit m_cSoundLevel;
CButton m_cSoundEvent;
SECT_SndEvListBox m_cSoundEventList;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogSel)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogSel)
afx_msg void OnSelChangeComboSector();
afx_msg void OnSymetric();
afx_msg void OnGraphic();
afx_msg void OnGraphicSpin(NMHDR * pNMHDR, LRESULT * pResult);
afx_msg void OnGraphicMode();
afx_msg void OnCollision();
afx_msg void OnActivity();
afx_msg void OnSound();
afx_msg void OnSoundSpin(NMHDR * pNMHDR, LRESULT * pResult);
afx_msg void OnSoundEvent();
afx_msg void OnSelChangeSoundEventList(NMHDR * pNMHDR, LRESULT * pResult);
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
BOOL OnCommand(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_SEL_HPP__

View File

@@ -0,0 +1,128 @@
/*=========================================================================
*
* SEClSrfs.hpp : class SECT_DialogSrf
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_D_SRF_HPP__
#define __SECT_D_SRF_HPP__
#include "SECTres.h"
#include "SECTenv.hpp"
class Sector_Interface;
*/
//#################################################################################
// Surfaces
//#################################################################################
/*===========================================================================
* Description: Class for the Surface List Box
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_SrfElemListBox : public SECT_EnvListBox
{
public:
SECT_SrfElemListBox (void);
~SECT_SrfElemListBox (void);
BOOL fn_bIsCurrentElement (CPA_BaseObject *pElem);
BOOL fn_bIsSelectedElement (CPA_BaseObject *pElem);
BOOL fn_bIsAlreadyUsed (CPA_BaseObject *pElem);
};
*/
/*===========================================================================
* Description: Class for the Environment Element
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_DialogSrf : public CFormView
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
SECT_SurfElem *m_pSurfElem;
SECT_Surface *m_pSurface;
BOOL m_bViewSurface;
BOOL m_bInitialised;
long m_lEnvElem;
public:
// standard constructor
SECT_DialogSrf (CWnd* pParent = NULL);
// Dialog
void fn_vInitDialog (Sector_Interface *pDLL, CWnd *pParent);
void fn_vReinitDialog (void);
void fn_vInitSurfListBox (void);
void fn_vInitEnvElem (long lEnvElem);
void fn_vSelectSurf (SECT_Surface *pSurface, BOOL bUpdateSurfElem = TRUE);
void fn_vInitControls (BOOL bEnable);
// Get Functions
SECT_SurfElem * GetCurrentSurfElem (void) { return m_pSurfElem; }
SECT_Surface * GetSelectedSurface (void) { return m_pSurface; }
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogSrf)
enum { IDD = SEC_IDD_DIALOGSRF };
// surf elem
SECT_SrfElemListBox m_cSurfListBox;
CButton m_cViewSurf;
CEdit m_cSurfHeight;
// default
CButton m_cDefault;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogSrf)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogSrf)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
// surf elem
afx_msg void OnSelChangeSurfListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDblClkSurfListBox(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnChangeHeight();
afx_msg void OnViewSurf();
// default
afx_msg void OnDefault();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_SRF_HPP__
*/

View File

@@ -0,0 +1,124 @@
/*=========================================================================
*
* SECTdVis.hpp : class SECT_DialogVis
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_D_VIS_HPP__
#define __SECT_D_VIS_HPP__
#include "SECTres.h"
#include "SECTenv.hpp"
class Sector_Interface;
/===========================================================================
* Description: Class for the Dialog Visual Environment
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================/
class SECT_DialogVis : public CFormView
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
SECT_VisEnvironment *m_pVisEnv;
SECT_VisEnvironment *m_pDefaultVisEnv;
BOOL m_bInitialised;
// visual environment parameters
CString m_csName;
MTH_tdxReal m_xNear;
MTH_tdxReal m_xFar;
MTH_tdxReal m_xBlendNear;
MTH_tdxReal m_xBlendFar;
MTH_tdxReal m_xInfinite;
COLORREF m_stColor;
public:
// standard constructor
SECT_DialogVis (CWnd* pParent = NULL);
// Dialog
void fn_vInitDialog (Sector_Interface *p_oDLL, CWnd *pParent);
void fn_vReinitDialog (void);
void fn_vInitControls (BOOL bEnable);
void fn_vInitVisEnvironment (SECT_VisEnvironment *pVisEnv, BOOL bEnable);
void fn_vUpdateSliders (void);
void fn_vUpdateColor (void);
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogVis)
enum { IDD = SEC_IDD_DIALOGVIS };
// name
CEdit m_cName;
CButton m_cDefault;
// save
CButton m_cCancel;
CButton m_cSave;
// parameters
CEdit m_cNear;
CEdit m_cFar;
CSliderCtrl m_cBlendNear;
CSliderCtrl m_cBlendFar;
CEdit m_cInfinite;
// color
CSliderCtrl m_cRSlider;
CSliderCtrl m_cGSlider;
CSliderCtrl m_cBSlider;
CButton m_cColor;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogVis)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogVis)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
afx_msg void OnDrawItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
// save
afx_msg void OnSave();
afx_msg void OnCancel();
// name
afx_msg void OnChangeName();
afx_msg void OnDefault();
// parameters
afx_msg void OnChangeNear();
afx_msg void OnChangeFar();
afx_msg void OnChangeInfinite();
// color
afx_msg void OnVScroll (UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnHScroll (UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnEditColor ();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_D_VIS_HPP__
*/

View File

@@ -0,0 +1,275 @@
/*=========================================================================
*
* SECTlDias.hpp : lists & dialogs for sector links
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_L_DIAS_HPP__
#define __SECT_L_DIAS_HPP__
#include "SECTres.h"
class Sector_Interface;
class SECT_CustomListBox;
/*===========================================================================
* Description: Class for the dialogbox
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_DialogBase : public CFormView
{
// Construction
protected:
Sector_Interface *m_pSectorInterface;
SECT_ElementBase *m_pSelectedElem;
SECT_ListBase *m_pSectorList;
tdeTypeList m_eType;
BOOL m_bShowListParams;
BOOL m_bInitialised;
public:
// standard constructor
SECT_DialogBase (CWnd* pParent = NULL);
// get functions
Sector_Interface * GetSectorInterface (void) { return m_pSectorInterface; }
SECT_ElementBase * GetSelectedElement (void) { return m_pSelectedElem; }
SECT_ListBase * GetListBase (void) { return m_pSectorList; }
tdeTypeList GetListType (void) { return m_eType; }
virtual SECT_CustomListBox * GetSectorList (void) { return NULL; }
// Dialog
void fn_vInitDialog (Sector_Interface *p_oDLL, CWnd *pParent, const CString csTag, BOOL bShowListParams = FALSE);
void fn_vReinitDialog (SECT_ListBase *pSectorList);
void fn_vUpdateSelection (CPA_SuperObject *pSector);
void fn_vInitSectorList (SECT_ListBase *pSectorList);
// custom
virtual void fn_vReinitListParams (void) { };
protected:
CPA_SuperObject * GetSectorFromName (char *szName);
// Dialog Data
//{{AFX_DATA(SECT_DialogBase)
enum { IDD = SEC_IDD_DIALOGBASE };
CButton m_cSymetric;
CListBox m_cListParams;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogBase)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogList)
afx_msg void OnSelchangeSectorList();
afx_msg void OnDblClkSectorList();
afx_msg void OnSymetric();
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//#################################################################################
// SortedListBox
//#################################################################################
class SECT_CustomListBox : public CListBox
{
protected:
SECT_DialogBase *m_pDialog;
Sector_Interface *m_pSectorInterface;
public:
SECT_CustomListBox();
~SECT_CustomListBox() { }
void fn_vInitDialogParameters (SECT_DialogBase *pDialogList);
void fn_vInitSectorList (SECT_ListBase *pSectorList);
int GetCorrespondingIndex (DWORD pElem);
virtual void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS) { }
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
BOOL OnCommand(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
//#################################################################################
// ACTIVITY
//#################################################################################
class SECT_ActivityListBox : public SECT_CustomListBox
{
public:
SECT_ActivityListBox() { }
~SECT_ActivityListBox() { }
void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
};
/*===========================================================================
*=========================================================================*/
class SECT_DialogActiv : public SECT_DialogBase
{
protected:
SECT_ActivityListBox m_cSectorList;
public:
SECT_DialogActiv (CWnd* pParent = NULL);
~SECT_DialogActiv() { }
SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; }
protected:
void DoDataExchange (CDataExchange* pDX);
};
//#################################################################################
// COLLISION
//#################################################################################
class SECT_CollisionListBox : public SECT_CustomListBox
{
public:
SECT_CollisionListBox() { }
~SECT_CollisionListBox() { }
void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
};
/*===========================================================================
*=========================================================================*/
class SECT_DialogColls : public SECT_DialogBase
{
protected:
SECT_CollisionListBox m_cSectorList;
public:
SECT_DialogColls (CWnd* pParent = NULL);
~SECT_DialogColls() { }
SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; }
protected:
void DoDataExchange (CDataExchange* pDX);
};
//#################################################################################
// GRAPHIC
//#################################################################################
class SECT_GraphicListBox : public SECT_CustomListBox
{
public:
SECT_GraphicListBox() { }
~SECT_GraphicListBox() { }
void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
};
/*===========================================================================
*=========================================================================*/
class SECT_DialogGraph : public SECT_DialogBase
{
protected:
SECT_GraphicListBox m_cSectorList;
public:
SECT_DialogGraph (CWnd* pParent = NULL);
~SECT_DialogGraph() { }
SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; }
protected:
void DoDataExchange (CDataExchange* pDX);
};
//#################################################################################
// SOUND
//#################################################################################
class SECT_SoundListBox : public SECT_CustomListBox
{
public:
SECT_SoundListBox() { }
~SECT_SoundListBox() { }
void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
};
/*===========================================================================
*=========================================================================*/
class SECT_DialogSound : public SECT_DialogBase
{
protected:
SECT_SoundListBox m_cSectorList;
public:
SECT_DialogSound (CWnd* pParent = NULL);
~SECT_DialogSound() { }
SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; }
protected:
void DoDataExchange (CDataExchange* pDX);
};
//#################################################################################
// SOUND EVENT
//#################################################################################
class SECT_SoundEventListBox : public SECT_CustomListBox
{
public:
SECT_SoundEventListBox() { }
~SECT_SoundEventListBox() { }
void fn_vDrawListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
};
/*===========================================================================
*=========================================================================*/
class SECT_DialogSoundEvent : public SECT_DialogBase
{
protected:
SECT_SoundEventListBox m_cSectorList;
public:
SECT_DialogSoundEvent (CWnd* pParent = NULL);
~SECT_DialogSoundEvent() { }
SECT_CustomListBox * GetSectorList (void) { return &m_cSectorList; }
void fn_vReinitListParams (void);
protected:
void DoDataExchange (CDataExchange* pDX);
};
#endif //__SECT_L_DIAS_HPP__

View File

@@ -0,0 +1,108 @@
/*=========================================================================
*
* SEClEnvs.hpp : class SECT_DialogEnvList
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
/*
#ifndef __SECT_L_ENV_HPP__
#define __SECT_L_ENV_HPP__
#include "SECTres.h"
#include "SECTenv.hpp"
class Sector_Interface;
*/
//#################################################################################
// Environment List
//#################################################################################
/*===========================================================================
* Description: Class for the Environment List
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_DialogEnvList : public CFormView
{
protected:
// dialog parameters
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
long m_lEnvElem;
BOOL m_bInitialised;
public:
// standard constructor
SECT_DialogEnvList (CWnd* pParent = NULL);
// Dialog
void fn_vInitDialog (Sector_Interface *pDLL, CWnd *pParent);
void fn_vInitEnvList (CPA_SuperObject *pEditedSector);
void fn_vInitEnvElem (long lEnvElem);
void fn_vUpdateEnvElem (void);
void fn_vInitControls (BOOL bEnable);
void fn_vDrawEnvListItem (int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
protected:
// Dialog Data
//{{AFX_DATA(SECT_DialogEnvList)
enum { IDD = SEC_IDD_DIALOGENVLIST };
// env list
CListBox m_cEnvList;
CButton m_cAddElem;
CButton m_cDelElem;
// apply
CButton m_cApplyAll;
CButton m_cApplySelect;
CButton m_cCancelSelect;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(SECT_DialogEnvList)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(SECT_DialogEnvList)
afx_msg void OnSize(UINT, int, int);
afx_msg void OnDestroy();
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
// env list
afx_msg void OnSelChangeEnvList();
afx_msg void OnAddElem();
afx_msg void OnDelElem();
// keydown
afx_msg int OnVKeyToItem (UINT, CWnd*, UINT);
// apply
afx_msg void OnApplyAll();
afx_msg void OnApplySelect();
afx_msg void OnCancelSelect();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //__SECT_L_ENV_HPP__
*/

View File

@@ -0,0 +1,815 @@
/*=========================================================================
*
* SECmodif.hpp : Definition of Editor Modifications
*
*
* Version 1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_MODIF_HPP__
#define __SECT_MODIF_HPP__
#include "incITF.h"
#include "incGAM.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
//**************************************
#include "SECTint.hpp"
#define TYPE_SECTORLINKS 1
#define TYPE_SECTORPARAMS 2
//Shaitan Clean Env
/*
#define TYPE_ENVANDSRF 3
#define TYPE_MODIFENV 4
#define TYPE_MODIFSRF 5
#define TYPE_SRFPARAMS 6
#define TYPE_ENVPARAMS 7
#define TYPE_MECENV 8
#define TYPE_APPLY 9
*/
#define TYPE_SYMETRICLINKS 10
#define TYPE_SYMETRICSELECT 11
#define TYPE_VIRTUALSTATUS 12
#define TYPE_FULLLINK 13
//Shaitan Clean Env
//#define TYPE_REPLACE 14
#define TYPE_COPYLIST 15
typedef enum
{
// sector links
E_mt_AddSectorInList,
E_mt_DelSectorInList,
E_mt_AddFullLink,
E_mt_DelFullLink,
// sector params
E_mt_ChangeLevelOfDetail,
E_mt_ChangeGraphicMode,
E_mt_ChangeSoundVolume,
E_mt_AddSoundEvent,
E_mt_DelSoundEvent,
//Shaitan Clean Env
/*
// env and srf
E_mt_AddEnvAndSrf,
E_mt_DelEnvAndSrf,
E_mt_ChangeEnv,
E_mt_ChangeSrf,
// srf params
E_mt_ChangeSrfHeight,
// env params
E_mt_ChangeMecEnv,
E_mt_ChangeVisEnv,
E_mt_ChangeSndEnv,
// mec env
E_tm_ModifMecEnv,
// vis env
E_tm_ModifVisEnv,
// apply to sector
E_tm_ApplyToSectors,
*/
// symetric links
E_tm_SymetricLinks,
E_tm_SymetricSelect,
// virtual status
E_tm_VirtualStatus,
//Shaitan Clean Env
// replace env
// E_tm_Replace,
E_tm_CopyList,
// unknown
E_tm_Unknown
}
tdeSectModifType;
//#################################################################################
// SECTORS LINK
//#################################################################################
/*===========================================================================
* Description: save sector links
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_SaveSectorLinks : public CObject
{
public:
Sector_Object *m_pSector;
SECT_ElementBase *m_pNewElement;
SECT_ElementBase *m_pOldElement;
int m_iNewParam;
int m_iOldParam;
int m_iNewMode;
int m_iOldMode;
SECT_SaveSectorLinks (CPA_SuperObject *pSector, CPA_SuperObject *pModel, tdeTypeList eList);
~SECT_SaveSectorLinks ();
};
/*===========================================================================
* Description: Add or remove sector in sector links
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_ModifSectorLinks : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
SECT_ElementBase * m_aElements[C_NumberOfLists];
SECT_ElementBase * m_aSymElems[C_NumberOfLists];
CPA_SuperObject *m_pEditedSector;
CPA_SuperObject *m_pSectorToAdd;
tdeSectModifType m_eModifType;
tdeEditMode m_eCurrentEditMode;
BOOL m_bSymetric;
BOOL m_aHadSymElem[C_NumberOfLists];
BOOL m_bFirstTime;
BOOL m_bAdded;
BOOL m_bDone;
public:
// constructors
SECT_ModifSectorLinks (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_SuperObject *pEditedSector, CPA_SuperObject *pSectorToAdd,
tdeTypeList eTypeList);
~SECT_ModifSectorLinks (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vInitSymetricLinks (void);
void fn_vUpdateSymetricLinks (BOOL bDo);
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
/*===========================================================================
* Description: save sector links
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_SaveFullLink : public CObject
{
public:
Sector_Object *m_pSector;
SECT_ElementBase *m_pElement;
tdeTypeList m_eListToUpdate;
SECT_SaveFullLink (Sector_Object *pSector, SECT_ElementBase *pElement, tdeTypeList eList);
~SECT_SaveFullLink ();
};
/*===========================================================================
* Description: Add or remove sector in sector links
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_ModifFullLink : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
tdeTypeList m_eListToUpdate;
tdeSectModifType m_eModifType;
BOOL m_bSymetric;
BOOL m_bFirstTime;
BOOL m_bAdded;
BOOL m_bDone;
CPA_List<SECT_ElementBase> m_oListOfSectors;
CPA_List<SECT_SaveFullLink> m_oListOfSymetrics;
public:
// constructors
SECT_ModifFullLink (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_SuperObject *pEditedSector, tdeTypeList eTypeList);
~SECT_ModifFullLink (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vInitSymetricLinks (void);
void fn_vUpdateSymetricLinks (BOOL bDo);
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
/*===========================================================================
* Description: modify parameter in sector links
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_ModifSectorParams : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
SECT_ElementBase *m_pElementToUpdate;
CPA_SuperObject *m_pEditedSector, *m_pSelectedSector;
SECT_SoundEvent *m_pSoundEvent;
tdeSectModifType m_eModifType;
tdeTypeList m_eListToUpdate;
int m_iNewValue, m_iOldValue, m_iOldSymetric;
BOOL m_bSymetricLink;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
// constructors
SECT_ModifSectorParams (Sector_Interface *pInterface, tdeSectModifType eModifType,
tdeTypeList eListToUpdate, SECT_ElementBase *pElem,
int iNewValue, SECT_SoundEvent *pSoundEvent);
~SECT_ModifSectorParams (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
//#################################################################################
// ENV AND SRF
//#################################################################################
/*===========================================================================
* Description: add or remove environment element
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifEnvAndSrf : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
SECT_SurfElem *m_pNewSurfElem, *m_pOldSurfElem;
SECT_EnvElem *m_pNewEnvElem, *m_pOldEnvElem;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
// constructors
SECT_ModifEnvAndSrf (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_SuperObject *pEditedSector, long lNumEnvElem,
SECT_Environment *pNewEnv, SECT_Surface *pNewSurf);
~SECT_ModifEnvAndSrf (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
/*===========================================================================
* Description: change environment element
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
{
protected:
Sector_Interface *m_pSectorInterface;
SECT_Environment *m_pNewEnv, *m_pOldEnv;
CPA_SuperObject *m_pEditedSector;
SECT_EnvElem *m_pEnvElem;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
long m_lNumEnvElem;
public:
// constructors
SECT_ModifEnvElem (Sector_Interface *pInterface, tdeSectModifType eModifType,
SECT_EnvElem *pEnvElem, SECT_Environment *pNewEnv, long lNumEnvElem);
~SECT_ModifEnvElem (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
/*===========================================================================
* Description: change surface element
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifSurfElem : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
SECT_SurfElem *m_pSurfElem;
SECT_Surface *m_pNewSurf, *m_pOldSurf;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
long m_lOldNum, m_lNewNum;
public:
// constructors
SECT_ModifSurfElem (Sector_Interface *pInterface, tdeSectModifType eModifType,
SECT_SurfElem *pSurfElem, SECT_Surface *pNewSurf, long lNumEnvElem);
~SECT_ModifSurfElem (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
//#################################################################################
// SURFACE
//#################################################################################
/*===========================================================================
* Description: modify surface parameters
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifSrfParams : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
tdeSectModifType m_eModifType;
SECT_Surface *m_pSurface;
MTH_tdxReal m_xNewHeight, m_xOldHeight;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
// constructors
SECT_ModifSrfParams (Sector_Interface *pInterface, tdeSectModifType eModifType,
SECT_Surface *pSurface, MTH_tdxReal xNewHeight);
~SECT_ModifSrfParams (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
//#################################################################################
// ENVIRONMENT
//#################################################################################
/*===========================================================================
* Description: modify environment parameters
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifEnvParams : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
SECT_Environment *m_pEnvironment;
SECT_MecEnvironment *m_pNewMecEnv, *m_pOldMecEnv;
SECT_VisEnvironment *m_pNewVisEnv, *m_pOldVisEnv;
SECT_SndEnvironment *m_pNewSndEnv, *m_pOldSndEnv;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
// constructors
SECT_ModifEnvParams (Sector_Interface *pInterface, tdeSectModifType eModifType,
SECT_Environment *pEnvironment, SECT_MecEnvironment *pNewMecEnv,
SECT_VisEnvironment *pNewVisEnv, SECT_SndEnvironment *pNewSndEnv);
~SECT_ModifEnvParams (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
/*===========================================================================
* Description: modify mechanic environment parameters
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifMecEnvParams : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
SECT_MecEnvironment *m_pMecEnv;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
CString m_csNewName, m_csOldName;
MTH_tdxReal m_xNewGravity, m_xOldGravity;
DNM_tdstVector m_stNewVertical, m_stOldVertical;
MTH_tdxReal m_xNewViscosity, m_xOldViscosity;
MTH_tdxReal m_xNewDensity, m_xOldDensity;
MTH_tdxReal m_xNewLevel, m_xOldLevel;
DNM_tdstVector m_stNewStream, m_stOldStream;
CString m_csNewVolumic, m_csOldVolumic;
public:
// constructors
SECT_ModifMecEnvParams (Sector_Interface *pInterface, tdeSectModifType eModifType,
SECT_MecEnvironment *pMecEnv, CString csName,
MTH_tdxReal xGravity, DNM_tdstVector *pVertical,
MTH_tdxReal xViscosity, MTH_tdxReal xDensity,
MTH_tdxReal xLevel, DNM_tdstVector *pStream,
CString csVolumic);
~SECT_ModifMecEnvParams (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
/*===========================================================================
* Description: modify visual environment parameters
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifVisEnvParams : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
SECT_VisEnvironment *m_pVisEnv;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
CString m_csNewName, m_csOldName;
MTH_tdxReal m_xNewNear, m_xOldNear;
MTH_tdxReal m_xNewFar, m_xOldFar;
MTH_tdxReal m_xNewBlendNear, m_xOldBlendNear;
MTH_tdxReal m_xNewBlendFar, m_xOldBlendFar;
MTH_tdxReal m_xNewInfinite, m_xOldInfinite;
GLI_tdstColor m_stNewColor, m_stOldColor;
public:
// constructors
SECT_ModifVisEnvParams (Sector_Interface *pInterface, tdeSectModifType eModifType,
SECT_VisEnvironment *pVisEnv, CString csName,
MTH_tdxReal xNear, MTH_tdxReal xFar,
MTH_tdxReal xBlendNear, MTH_tdxReal xBlendFar,
MTH_tdxReal xInfinite, GLI_tdstColor *pColor);
~SECT_ModifVisEnvParams (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
//#################################################################################
// APPLY
//#################################################################################
/*===========================================================================
* Description: save env lists
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_SaveEnvList : public CObject
{
public:
Sector_Object *m_pSector;
CPA_List<SECT_Surface> m_oListSrf;
CPA_List<SECT_Environment> m_oListEnv;
SECT_SaveEnvList (Sector_Object *pSector);
~SECT_SaveEnvList ();
};
*/
/*===========================================================================
* Description: apply envlist to sectors
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifApplyToSectors : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pModel;
CPA_List<SECT_Surface> m_oListSrf;
CPA_List<SECT_Environment> m_oListEnv;
CPA_List<SECT_SaveEnvList> m_oListSectors;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
// constructors
SECT_ModifApplyToSectors (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_SuperObject *pModel, CPA_List<CPA_SuperObject> *pListSectors);
~SECT_ModifApplyToSectors (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
//#################################################################################
// SYMETRIC
//#################################################################################
/*===========================================================================
* Description: apply symetric links to sectors
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_ModifSymetricLinks : public CPA_Modif
{
protected:
CPA_List<SECT_SaveSectorLinks> m_oListSectors;
Sector_Interface *m_pSectorInterface;
tdeSectModifType m_eModifType;
CPA_SuperObject *m_pModel;
tdeTypeList m_eListToUpdate;
tdeEditMode m_eCurrentEditMode;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
// constructors
SECT_ModifSymetricLinks (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_SuperObject *pModel, tdeTypeList eList);
~SECT_ModifSymetricLinks (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
/*===========================================================================
* Description: apply symetric links to sectors
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_ModifSymetricSelect : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
CPA_SuperObject *m_pSelectedSector;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
SECT_SoundElement *m_pNewSoundElement;
SECT_GraphicElement *m_pNewGraphicElement;
SECT_ActivityElement *m_pNewActivityElement;
SECT_CollisionElement *m_pNewCollisionElement;
SECT_SoundEventElement *m_pNewSndEvtElement;
SECT_SoundEventElement *m_pOldSndEvtElement;
int m_iOldGraphic, m_iNewGraphic;
int m_iOldGMode, m_iNewGMode;
int m_iOldSound, m_iNewSound;
public:
// constructors
SECT_ModifSymetricSelect (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_SuperObject *pEditedSector, CPA_SuperObject *pSelectedSector);
~SECT_ModifSymetricSelect (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
//#################################################################################
// VIRTUAL
//#################################################################################
/*===========================================================================
* Description: update virtual sector
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_ModifVirtualSector : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
CPA_SuperObject *m_pBorder;
tdeSectModifType m_eModifType;
BOOL m_bNewStatus;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
//constructors
SECT_ModifVirtualSector (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_SuperObject *pEditedSector, BOOL bNewState);
~SECT_ModifVirtualSector (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
//#################################################################################
// REPLACE
//#################################################################################
//#define C_lMaxEnvironments 20
/*===========================================================================
* Description: save initial sector
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_SaveInitEnv: public CObject
{
public:
Sector_Object *m_pSector;
long m_aNumEnv[C_lMaxEnvironments];
long m_lNbEnv;
SECT_SaveInitEnv (Sector_Object *pSector, SECT_Environment *pInitEnv);
~SECT_SaveInitEnv ();
};
*/
/*===========================================================================
* Description: apply envlist to sectors
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
/*
class SECT_ModifReplaceEnvironment : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
SECT_Environment *m_pInitEnv;
SECT_Environment *m_pNewEnv;
CPA_List<SECT_SaveInitEnv> m_oListSectors;
tdeSectModifType m_eModifType;
BOOL m_bFirstTime;
BOOL m_bDone;
public:
// constructors
SECT_ModifReplaceEnvironment (Sector_Interface *pInterface, tdeSectModifType eModifType,
SECT_Environment *pInitEnv, SECT_Environment *pNewEnv,
CPA_List<CPA_SuperObject> *pListSectors);
~SECT_ModifReplaceEnvironment (void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
*/
//#################################################################################
// COPY LIST
//#################################################################################
/*===========================================================================
* Description: apply envlist to sectors
* Creation date:
* Author: Shaitan
*---------------------------------------------------------------------------
* Revision date: Author:
*=========================================================================*/
class SECT_ModifCopyList : public CPA_Modif
{
protected:
Sector_Interface *m_pSectorInterface;
CPA_SuperObject *m_pEditedSector;
tdeSectModifType m_eModifType;
tdeEditMode m_eCurrentEditMode;
BOOL m_bSymetric;
BOOL m_bFirstTime;
BOOL m_bDone;
CPA_List<SECT_ElementBase> m_aListOfElements[C_NumberOfLists];
CPA_List<SECT_ElementBase> m_aListOfSymElems[C_NumberOfLists];
public:
// constructors
SECT_ModifCopyList (Sector_Interface *pInterface, tdeSectModifType eModifType,
CPA_List<CPA_SuperObject> *pCopyOfSectorList, tdeTypeList eList);
~SECT_ModifCopyList(void);
// actions
BOOL Do (void);
BOOL Undo (void);
// functions
void fn_vReinitEditorState (void);
void fn_vUpdateEditorState (void);
};
#endif //__SECT_MODIF_HPP__

View File

@@ -0,0 +1,18 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#ifndef __STDAAFX_H__
#define __STDAAFX_H__
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#endif //__STDAAFX_H__