/*========================================================================= * Objects.h : Define the engine object structure. * This is a part of the Game project. * * Version 1.0 * Creation date 20/08/96 * Revision date * * That file needs to be compatible for all platforms. * * (c) Ubi Studios 1996 *=======================================================================*/ #if !defined(__OBJECTS_H__) #define __OBJECTS_H__ /******************************************/ #if _MSC_VER >= 1000 #pragma once #endif /* _MSC_VER >= 1000 */ /******************************************/ #include "GAM/Header.h" #include "GAM/Actions/Animfx.h" #include "GAM/actions/allacts.h" #include "GAM/actions/3ddata.h" /* * this structure is for each object in a level (ie all events) * when a structure pointer is added, not forget to add its handle's functions (see below) */ typedef struct tdstEngineObject_ { /* pointer to the 3d datas, animations ... */ MS_tdxHandleTo3dData h_3dData; /* pointer to the standard game structure (hitpoints ...) */ MS_tdxHandleToStandardGame h_StandardGame; /***********************************************************************************/ /**** All next fields are structures pointer and must be in alphabetical order. ****/ /***********************************************************************************/ /*** pointer to the dynamic system ***/ MS_tdxHandleToDynam h_Dynam; /*** pointer to intelligence structure ***/ MS_tdxHandleToBrain h_Brain; /*** pointer to the cineinfo structure ***/ MS_tdxHandleToCineinfo h_Cineinfo; /*** pointer to the Collide Set structure ***/ MS_tdxHandleToCollSet h_CollSet; /*** pointer to the way structure ***/ MS_tdxHandleToMSWay h_MSWay; /*** pointer to the light structure ***/ MS_tdxHandleToMSLight h_MSLight; /*** pointer to the Sector structure ***/ MS_tdxHandleToSectInfo h_SectInfo; /*** pointer to the Micro structure ***/ MS_tdxHandleToMicro h_Micro; #ifndef D_THROW_PRT /*** pointer to the particle source structure JO 10/09/97 ***/ MS_tdxHandleToMSPrtSrc h_MSPrtSrc; #endif /* D_THROW_PRT */ /*** pointer to the sound structure JO 08/12/97 ***/ MS_tdxHandleToMSSound h_MSSound; #ifndef D_THROW_ANIM_EFFECT /*** pointer to the anim effect structure ***/ MS_tdxHandleToAnimEffect h_AnimEffect; #endif /* D_THROW_ANIM_EFFECT */ /*XB980824*/ #ifndef D_THROW_MGT /*** pointer to the magnet structure ***/ MS_tdxHandleToMSMagnet h_MSMagnet; #endif /* D_THROW_MGT */ } tdstEngineObject; /* a basic handler function used to load the objects structures */ #if !defined(U64) typedef SCR_tde_Anl_ReturnValue (tdfn_eScriptCallBackHandleFunction)(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction); #endif /* U64 */ /* a basic handler function used to alloc the objects structures */ /*typedef void (tdfn_vSaveMSFunction)(SCR_tdst_File_Description *p_stFile,struct tdstEngineObject_ *p_stObject);*/ typedef void (tdfn_vCopyCloneMSFunction)(struct tdstEngineObject_ * _p_stObjectDest,struct tdstEngineObject_ * _p_stObjectSrc); /* a basic handler function used to size of the objects mini-structures */ typedef unsigned long (tdfn_ulSizeofHandleFunction)(); /* a basic handler function used to alloc the objects structures */ typedef void (tdfn_vAllocHandleFunction)(struct tdstEngineObject_ *p_stObject); /* a basic handler function used to init the objects structures */ typedef void (tdfn_vInitHandleFunction)(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjectInit); unsigned long fn_ulEmptySizeOf(); void fn_vEmptyAlloc(struct tdstEngineObject_ *p_stObject); void fn_vEmptyFree(struct tdstEngineObject_ *p_stObject); void fn_vEmptyInit(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjectInit); void fn_vEmptyDesinit(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjectInit); void fn_vEmptyCopyClone(struct tdstEngineObject_ * _p_stObjectDest,struct tdstEngineObject_ * _p_stObjectSrc); typedef struct tdstStructureHandleFunction_ { tdfn_vCopyCloneMSFunction *p_fn_vCopyCloneMSFunction; tdfn_ulSizeofHandleFunction *p_fn_ulSizeOfFunction; tdfn_vAllocHandleFunction *p_fn_vAllocFunction; tdfn_vAllocHandleFunction *p_fn_vFreeFunction; tdfn_vInitHandleFunction *p_fn_vInitFunction; tdfn_vInitHandleFunction *p_fn_vDesinitFunction; } tdstStructureHandleFunction; EXTERN tdstStructureHandleFunction g_a_stStructureHandleFunction[] #if defined(D_GameGlobals) = { /*h_3dData*/ {fn_v3dDataCopyClone,fn_ul3dDataSizeOf,fn_v3dDataAlloc,fn_v3dDataFree,fn_v3dDataInit,fn_v3dDataDesinit}, /*h_StandardGame*/ {fn_vStdGameCopyClone,fn_ulStdGameSizeOf,fn_vStdGameAlloc,fn_vStdGameFree,fn_vStdGameInit,fn_vStdGameDesinit}, /*h_Dynamics*/ {fn_vDynamCopyClone,fn_ulDynamSizeOf,fn_vDynamAlloc,fn_vDynamFree,fn_vDynamInit,fn_vDynamDesinit}, /*h_Brain*/ {fn_vBrainCopyClone,fn_ulBrainSizeOf,fn_vBrainAlloc,fn_vBrainFree,fn_vBrainInit,fn_vBrainDesinit}, /*h_Cineinfo*/ {CAM_fn_vCineinfoCopyClone,CAM_fn_ulCineinfoSizeOf,CAM_fn_vCineinfoAlloc,CAM_fn_vCineinfoFree,CAM_fn_vCineinfoInit,CAM_fn_vCineinfoDesinit}, /*h_CollSet*/ {fn_vCollSetCopyClone,fn_ulCollSetSizeOf,fn_vCollSetAlloc,fn_vCollSetFree,fn_vCollSetInit,fn_vCollSetDesinit}, /*h_MSWay*/ {fn_vMSWayCopyClone,fn_ulMSWaySizeOf,fn_vMSWayAlloc,fn_vMSWayFree,fn_vMSWayInit,fn_vMSWayDesinit}, /*h_Light*/ {fn_vLightCopyClone,fn_ulLightSizeOf,fn_vLightAlloc,fn_vLightFree,fn_vLightInit,fn_vLightDesinit}, /*h_SectInfo*/ {fn_vSectInfoCopyClone,fn_ulSectInfoSizeOf,fn_vSectInfoAlloc,fn_vSectInfoFree,fn_vSectInfoInit,fn_vSectInfoDesinit}, /*h_Micro*/ {fn_vMicroCopyClone,fn_ulMicroSizeOf,fn_vMicroAlloc,fn_vMicroFree,fn_vMicroInit,fn_vMicroDesinit}, #ifndef D_THROW_PRT /*h_MSPrtSrc*/ {fn_vMSPrtSrcCopyClone,fn_ulMSPrtSrcSizeOf,fn_vMSPrtSrcAlloc,fn_vMSPrtSrcFree,fn_vMSPrtSrcInit,fn_vMSPrtSrcDesinit}, #endif /* D_THROW_PRT */ /*h_MSSound JO 08/12/97*/ {fn_vMSSoundCopyClone,fn_ulMSSoundSizeOf,fn_vMSSoundAlloc,fn_vMSSoundFree,fn_vMSSoundInit,fn_vMSSoundDesinit}, #ifndef D_THROW_ANIM_EFFECT /*h_AnimEffect*/ {fn_vAnimEffectCopyClone,fn_ulAnimEffectSizeOf,fn_vAnimEffectAlloc,fn_vAnimEffectFree,fn_vAnimEffectInit,fn_vAnimEffectDesinit}, #endif /* D_THROW_ANIM_EFFECT */ /*XB980824*/ #ifndef D_THROW_MGT /*** pointer to the magnet structure ***/ /*h_MSMagnet*/ {fn_vMSMagnetCopyClone,fn_ulMSMagnetSizeOf,fn_vMSMagnetAlloc,fn_vMSMagnetFree,fn_vMSMagnetInit,fn_vMSMagnetDesinit}, #endif /* D_THROW_MGT */ /*End XB*/ /*End structure*/ {(tdfn_vCopyCloneMSFunction*)0x00000001,(tdfn_ulSizeofHandleFunction *)0x00000002,(tdfn_vAllocHandleFunction *)0x00000003,(tdfn_vAllocHandleFunction *)0x00000004,(tdfn_vInitHandleFunction *)0x00000005,(tdfn_vInitHandleFunction *)0x00000006} } #endif /* D_GameGlobals */ ; #endif /* __OBJECTS_H__ */