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,111 @@
/* (c) Ubi Studios 1997 */
/* See Vincent Greco or Frederic Philippe for any comment or question */
/* To avoid unnecessary includes : */
#ifndef __HIEBDVOL_H
#define __HIEBDVOL_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLLs who are using this module : */
#undef 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
#undef __HIE_EXTERN
/* For Global declaration in C files : */
#ifdef HIE_GLOBALS
#define __HIE_EXTERN extern
#else /* !MODULETAG_GLOBALS */
#define __HIE_EXTERN
#endif /* !MODULETAG_GLOBALS */
/*
-----------------------------------------------------------------------------
INCLUDES FILES :
Include here any other header files of your module you need !
Ex :
Note : Do Not include header files from other Modules (do this in C files
only)
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION:
Ex :
#define MODULETAG_C_LMAX 100
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
TYPES DEFINITION :
Declare here any type you need, and constant you need to do this :
Ex : typedef struct MODULETAG_tdstToto_
{
long aLMAX_lBuffer[MODULETAG_C_LMAX];
...
} MODULETAG_tdst_Toto ;
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION :
Ex :
__MODULETAG_EXTERN <type> <variable name>
#ifdef MODULETAG_GLOBALS
= <initial values>
#endif
;
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
PUBLIC FUNCTIONS DECLARATION:
Ex :
extern CPA_EXPORT void MODULETAG_fn_vMyPublicFunction(void);
Note : Public functions declaration must be done in PUBLIC HEADER files (.h)
in your Inc directory
-----------------------------------------------------------------------------
*/
/*for a branch */
extern CPA_EXPORT void HIE_fn_vComputeBoundingVolumeOfSuperObjectBranch(HIE_tdxHandleToSuperObject _hSprObj);
/*for a node*/
extern CPA_EXPORT void HIE_fn_vComputeAllBoundingVolumes(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vComputePoAndIpoBoundingVolumes(HIE_tdxHandleToSuperObject _hSprObj);
/*
-----------------------------------------------------------------------------
PRIVATE FUNCTIONS DECLARATION:
Ex :
extern void MODULETAG_fn_vMyPrivateFunction(void);
Note : Private functions MUST appear ONLY in PRIVATE HEADER files (.h) in
your Src directory with source files (.c)
-----------------------------------------------------------------------------
*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __HEADERNAME_H */

View File

@@ -0,0 +1,107 @@
/* (c) Ubi Studios 1996-97*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIECONST_H__
#define __HIECONST_H__
#ifdef __cplusplus
extern "C" {
#endif
/*ANNECY VL SPOFLAG 04/12/97{*/
/*
=======================================================================================
Constants
=======================================================================================
*/
#define HIE_C_MaxNumberOfSPOInTheFix 32
/*
* flag mask
*/
#define HIE_C_Flag_ulNotPickable 0x00000001
#define HIE_C_Flag_ulHidden 0x00000002
#define HIE_C_Flag_ulNoTransformationMatrix 0x00000004 /* The transformation matrix is always the identity*/
#define HIE_C_Flag_ulZoomInsteadOfScale 0x00000008 /* The scale factor is the same for the three axis*/
#define HIE_C_Flag_ulTypeOfBoundingVolume 0x00000010
#define HIE_C_Flag_ulSuperimposed 0x00000020
#define HIE_C_Flag_ulNotHitByRayTrace 0x00000040
#define HIE_C_Flag_ulNoShadowOnMe 0x00000080
#define HIE_C_Flag_ulSemiLookAt 0x00000100
#define HIE_C_Flag_ulCheckChildren 0x00000200
/*XB980824*/
#ifndef D_THROW_MGT
#define HIE_C_Flag_MagnetModification 0x00008000
#endif /* D_THROW_MGT */
/*End XB*/
#define HIE_C_Flag_ModuleTransparency 0x00010000 /* module transparency is setting */
#define HIE_C_Flag_ExcluLight 0x00020000
/* fbolefeysot - 01/10/98*/
/* change SPO enum to flags{*/
#define HIE_C_ulSuperObject 0x00000001 /* SO with no linked object*/
#define HIE_C_ulActor 0x00000002 /* actor*/
#define HIE_C_ulSector 0x00000004 /* sector*/
#define HIE_C_ulPO 0x00000008 /* Physical Object*/
#define HIE_C_ulPO_Mirror 0x00000010 /* Physical Object Mirror (?)*/
#define HIE_C_ulIPO 0x00000020 /* Instanciated Physical Object*/
#define HIE_C_ulIPO_Mirror 0x00000040 /* Instanciated Physical Object Mirror (?)*/
#define HIE_C_ulSpecialEffect 0x00000080 /* Special Effect (?)*/
#define HIE_C_ulNoAction 0x00000100 /* empty SO (?)*/
#define HIE_C_ulMirror 0x00000200 /* Mirror (?)*/
#define HIE_C_ulEDT_Geometric 0x00000400 /* geometric object (Editor)*/
#define HIE_C_ulEDT_Light 0x00000800 /* light object (Editor)*/
#define HIE_C_ulEDT_Waypoint 0x00001000 /* Waypoint object (Editor) */
#define HIE_C_ulEDT_ZdD 0x00002000 /* ZdD object (Editor) */
#define HIE_C_ulEDT_ZdE 0x00004000 /* ZdE object (Editor) */
#define HIE_C_ulEDT_ZdM 0x00008000 /* ZdM object (Editor) */
#define HIE_C_ulEDT_ZdR 0x00010000 /* ZdR object (Editor) */
#define HIE_C_ulEDT_BdV 0x00020000 /* Bounding Volume object (Editor) */
#define HIE_C_ulEDT_TestPoint 0x00040000 /* TestPoint object (Editor) */
/*END fbolefeysot}*/
/* fbolefeysot - 01/10/98*/
/* change SPO enum to flags{*/
/*
typedef enum HIE_tdeTypeOfObject_
{
C_ucSuperObject=0,
C_ucPhysical,
C_ucLight,
C_ucCamera,
C_ucCharacter,
C_ucAnimation,
C_ucStaticWorld,
C_ucStandardPlatForm,
C_ucSector,
C_ucWaypoint,
C_ucGeometric,
C_ucPhysicalObject,
C_ucSpecialEffect,
C_ucInstanciatedPhysicalObject,
C_ucA3dPickableObject,
C_ucA3dUnpickableObject,
C_ucA3dInvisibleObject,
C_ucMirror,
C_ucPoMirror,
C_ucIpoMirror,
C_ucWorld=64,
C_ucStaticSubWorld,
C_ucEngineSubWorld,
C_ucInactiveEngineSubWorld,
C_ucNoAction= 128
} HIE_tdeTypeOfObject;
//C_uc... so lType should not be a long ...
*/
/*END fbolefeysot}*/
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIECONST_H__ */

View File

@@ -0,0 +1,47 @@
/* (c) Ubi Studios 1996-97*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIEDEF_H__
#define __HIEDEF_H__
#ifdef __cplusplus
extern "C" {
#endif
/* For DLL using these function :*/
/*#include "cpa_expt.h"*/
/*----------------------------------------------------------*/
#define HIE_C_lCounterNotValid -1
#define HIE_C_InvalidSuperObject LST2_C_DynamicInvalid
#ifndef HIE_M_ForEachChildOf
#define HIE_M_ForEachChildOf(_hSprObj,_hChild,_i) LST2_M_DynamicForEachElementOf(_hSprObj,_hChild,_i)
#endif /* for specific declaration of the macro*/
#define HIE_M_vIsolate(_hSprObj) LST2_M_DynamicIsolate(_hSprObj)
#define HIE_M_vAddTail(_hNewFather, _hSprObj) LST2_M_DynamicAddTail(_hNewFather, _hSprObj)
#define HIE_M_vAddHead(_hNewFather, _hSprObj) LST2_M_DynamicAddHead(_hNewFather, _hSprObj)
#define HIE_M_vInsertBetween(_hSprObj, _hNewPrevBrother, _hNewNextBrother) LST2_M_DynamicInsertBetween(_hSprObj, _hNewPrevBrother, _hNewNextBrother)
#define HIE_M_hNextChild(_hBrother) LST2_M_DynamicGetNextElement(_hBrother)
#define HIE_M_hFirstChild(_hParent) LST2_M_DynamicGetFirstElement(_hParent)
#define HIE_M_hPrevChild(_hBrother) LST2_M_DynamicGetPrevElement(_hBrother)
#define HIE_M_hLastChild(_hParent) LST2_M_DynamicGetLastElement(_hParent)
#define HIE_M_hGetSuperObjectFather(_hSprObj) LST2_M_DynamicGetFather(_hSprObj)
#define HIE_M_lGetNumberOfChildren(_hSprObj) LST2_M_DynamicGetNumberOfElements(_hSprObj)
#define HIE_M_p_stGetSuperObject(_hSprObj) (_hSprObj)
#define HIE_M_xGetSuperObjectMember(_hSprObj,_member) ((_hSprObj)->_member)
#define HIE_M_vSetSuperObjectMember(_hSprObj,_member,_value) {(_hSprObj)->_member=(_value);}
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIEDEF_H__ */

View File

@@ -0,0 +1,83 @@
/* (c) Ubi Studios 1996*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIEDRAW_H__
#define __HIEDRAW_H__
#ifdef __cplusplus
extern "C" {
#endif
/* For DLL using these function :*/
#include "cpa_expt.h"
/*
//no more exported
extern CPA_EXPORT
void GLI_fn_vSendSuperObjectToViewport ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
HIE_tdxHandleToSuperObject _hSprObj ,
GLI_tdxHandleToLight _hLight,
long _DrawMask);
*/
#if defined(ACTIVE_EDITOR) /* {*/
extern CPA_EXPORT
void HIE_fn_vSendSuperObjectToViewport (GLD_tdxHandleToViewportAttributes _hVpt ,
HIE_tdxHandleToSuperObject _hSprObj ,
long _DrawMask);
#endif /* ACTIVE_EDITOR }*/
extern CPA_EXPORT
void HIE_fn_vSelectSuperObject(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT
void HIE_fn_vUnselectSuperObject(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vSendStaticWorldToViewport(
GLD_tdxHandleToViewportAttributes _hVpt,
HIE_tdxHandleToSuperObject _hSprObj,
long _DrawMask,
long _lCullingResult
);
extern CPA_EXPORT void HIE_fn_vSendCharacterToViewport(
GLD_tdxHandleToViewportAttributes _hVpt,
HIE_tdxHandleToSuperObject _hSprObj,
long _DrawMask,
long _lCullingResult
);
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hFindFirstMirrorInHierarchy(GLD_tdxHandleToViewportAttributes _hVpt ,
HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT int HIE_fn_bFindMirrorInHierarchy(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_hFindAllMirrorsInHierarchy(
GLD_tdxHandleToViewportAttributes _hVpt ,
HIE_tdxHandleToSuperObject _hSprObj,
HIE_tdxHandleToSuperObject *p_hHandleOfMirror,
ACP_tdxHandleOfObject *p_hHandleOfGeometricMirror,
short *p_shNbOfMirrors,
short shNbMaxOfMirrors
);
extern CPA_EXPORT
void HIE_fn_vRecursiveRotationUpdate(HIE_tdxHandleToSuperObject _hSprObj, unsigned long _ulTime);
/*ANNECY JMD 24/02/98 {*/
extern CPA_EXPORT ACP_tdxBool HIE_fn_bSendSPOToFixViewport ( struct GLD_tdstViewportAttributes_ *p_stFixViewportAttr, long _lDrawMask ) ;
extern CPA_EXPORT void HIE_vSetCharactereRLI ( unsigned char ucNbRLI, unsigned char ucIndex1, unsigned char ucIndex2, MTH_tdxReal xPercent) ;
/*ENDANNECY JMD }*/
extern CPA_EXPORT GEO_tdstGeometricObject *HIE_fn_p_stGetGeometricObjectFromSuperObject( HIE_tdxHandleToSuperObject h_SuperObject );
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIEDRAW_H__*/

View File

@@ -0,0 +1,132 @@
/* (c) Ubi Studios 1996*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIEEXT_H__
#define __HIEEXT_H__
#ifdef __cplusplus
extern "C" {
#endif
/* For DLL using these function :*/
#include "cpa_expt.h"
/*these 4 functions should not be changed into macros (we can need their address in the editors)*/
/*returns a handle to a not already used SuperObject*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hCreateSuperObject(void);
/*indicates that the SuperObject referenced by this handle will not be used any more, so this handle can be returned later and reference a new SuperObject.*/
extern CPA_EXPORT void HIE_fn_vDestroySuperObject(HIE_tdxHandleToSuperObject hOldSuperObject);
/*copy the second SuperObject into the first (same linked object an type, same handle to local matrix, different handle to global matrix, but the matrix is copied, the children and the father are not copied).*/
extern CPA_EXPORT void HIE_fn_vCopySuperObject(HIE_tdxHandleToSuperObject _hDst,HIE_tdxHandleToSuperObject _hSrc);
/*that<61>s a creation followed by a copy !*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hDuplicateSuperObject(HIE_tdxHandleToSuperObject _hSuperObject);
/*if you need other functions ask me !*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hForceGetSuperObjectNextBrother(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hForceGetSuperObjectPrevBrother(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vSwapGlobalMatrix(HIE_tdxHandleToSuperObject _hSprObj);
/*be carefull this matrix will be never changed*/
extern CPA_EXPORT void HIE_fn_vSetSuperObjectStaticMatrix(HIE_tdxHandleToSuperObject _hSprObj,GEO_tdxHandleToMatrix _hMatrix);
extern CPA_EXPORT void HIE_fn_vInvalidateAllGlobalMatrices(void);
/*For having the good absolute matrix :*/
/*void ExamineTree(HIE_tdxHandleToSuperObject _hFather)*/
/*{*/
/* HIE_tdxHandleToSuperObject hChild;*/
/* int i;*/
/* HIE_fn_vPushMatrix(_hFather);//now the absolute matrix is valid*/
/* //do what you want on this node before looking at its children*/
/* HIE_M_ForEachChildOf(_hFather,hChild,i)*/
/* ExamineTree(hChild)*/
/* //do what you want on this node after having looked at its children*/
/* HIE_fn_vPopMatrix();//do not use the absolute matrix any longer*/
/*}*/
extern CPA_EXPORT void HIE_fn_vPushMatrix (HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vPopMatrix (void);
extern CPA_EXPORT void HIE_fn_vPushOnCameraMatrixStack(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vStoreOnCameraMatrixStack(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vPopOnCameraMatrixStack();
/* compute the relative matrix of the SO, without changing the absolute one */
extern CPA_EXPORT void HIE_fn_vComputeNewRelativeMatrix(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vComputeNewRelativeScaleMatrix(HIE_tdxHandleToSuperObject _hSprObj);
/* the SO will be the last child of its new father */
extern CPA_EXPORT void HIE_fn_vChangeFather(HIE_tdxHandleToSuperObject _hSprObj, HIE_tdxHandleToSuperObject _hNewFather, ACP_tdxBool _bAtHead);
/* the SO will be the next brother of its new brother */
extern CPA_EXPORT void HIE_fn_vChangeBrother(HIE_tdxHandleToSuperObject _hSprObj, HIE_tdxHandleToSuperObject _hNewPrevBrother);
/*for Francois only : DO NOT USE THESE 5 FUNCTIONS*/
extern CPA_EXPORT void HIE_fn_vIsolate(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vPseudoIsolate(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vInitParent(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT HIE_tdxHandleToSuperObjectTab HIE_fn_p_stCreateSuperObjectTab(long lSize);
/*extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hGetElementFromSuperObjectTab(HIE_tdxHandleToSuperObjectTab _hTab, long lIndex);*/
/*extern CPA_EXPORT long HIE_fn_hGetIndexFromSuperObjectTabAndElement(HIE_tdxHandleToSuperObjectTab _hTab, HIE_tdxHandleToSuperObject _hElement);*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hGetChildNumber(HIE_tdxHandleToSuperObject _hParent, long _lNumber);
extern CPA_EXPORT long HIE_fn_lGetNumberOfChild(HIE_tdxHandleToSuperObject _hParent, HIE_tdxHandleToSuperObject _hChild);
extern CPA_EXPORT void HIE_fn_vInvalidateOneGlobalMatrix(HIE_tdxHandleToSuperObject _hSprObj);
extern CPA_EXPORT void HIE_fn_vInitGlobalMatrixFrameCounter(long lValue);
/*extern CPA_EXPORT float HIE_fn_fGetSuperObjectTransparenceLevel(HIE_tdxHandleToSuperObject _hSuperObj);*/
/*extern CPA_EXPORT void HIE_fn_vSetSuperObjectTransparenceLevel(HIE_tdxHandleToSuperObject _hSuperObj,float _fTransparenceLevel);*/
/* Use to indicate if the transparency level of the moduleis not the same as the actor*/
extern CPA_EXPORT ACP_tdxBool HIE_fn_bGetSuperObjectTransparencyModule(HIE_tdxHandleToSuperObject _hSuperObj);
extern CPA_EXPORT void HIE_fn_vSetSuperObjectTransparencyModule(HIE_tdxHandleToSuperObject _hSuperObj, ACP_tdxBool _bTransparencyModule);
/* If a global matrix is invalid, it is recomputed from the local matrix*/
/* you can use HIE_fn_vInvalidateAllGlobalMatrices() before this function*/
/* to force all the global matrices to be recomputed*/
extern CPA_EXPORT void HIE_fn_vRefreshHierarchy(HIE_tdxHandleToSuperObject _hSprObj);
/* recursively change all frame counters of the superobjects so that the matrixes are recomputed if required*/
extern CPA_EXPORT void HIE_fn_vInvalidateHierarchy(HIE_tdxHandleToSuperObject _hSprObj);
/*extern CPA_EXPORT long HIE_fn_lGetSuperObjectLastComputeFrame(HIE_tdxHandleToSuperObject _hSuperObj);*/
/*extern CPA_EXPORT void HIE_fn_vSetSuperObjectLastComputeFrame(HIE_tdxHandleToSuperObject _hSuperObj,long _lLastComputeFrame);*/
/*macro for looking at each child of a father*/
#define HIE_M_ForEachMovingChildOf(_hSprObj,_hChild,_hNextChild,_i) \
for \
( \
(_i)=0,(_hChild)=HIE_fn_hGetSuperObjectFirstChild(_hSprObj),(_hNextChild)=HIE_fn_hForceGetSuperObjectNextBrother(_hChild); \
HIE_fn_bIsSuperObjectValid(_hChild); \
(_i)++,(_hChild)=(_hNextChild),(_hNextChild)=HIE_fn_hForceGetSuperObjectNextBrother(_hChild) \
)
/*macro for looking at a node and all its children*/
#define HIE_M_ForMeAndMyChildren(_hSprObj,_hChild,_i) \
for \
( \
(_i)=-1,(_hChild)=(_hSprObj); \
HIE_fn_bIsSuperObjectValid(_hChild); \
(_i)++,(_hChild)=((_hChild)==(_hSprObj))?HIE_fn_hGetSuperObjectFirstChild(_hSprObj):HIE_fn_hGetSuperObjectNextBrother(_hChild) \
)
#define HIE_M_InvForEachMovingChildOf(_hSprObj,_hChild,_hPrevChild,_i) \
for \
( \
(_i)=HIE_fn_lGetNumberOfChildren(_hSprObj),(_hChild)=HIE_fn_hGetSuperObjectLastChild(_hSprObj),(_hPrevChild)=HIE_fn_hForceGetSuperObjectPrevBrother(_hChild); \
HIE_fn_bIsSuperObjectValid(_hChild); \
(_i)--,(_hChild)=(_hPrevChild),(_hPrevChild)=HIE_fn_hForceGetSuperObjectPrevBrother(_hChild) \
)
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIEEXT_H__*/

View File

@@ -0,0 +1,30 @@
/* (c) Ubi Studios 1996-97*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIEHAND_H__
#if !defined(HieFriend)||defined(__HIESPOBJ_H__)
#define __HIEHAND_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef struct HIE_tdstSuperObject_* HIE_tdxHandleToSuperObject;
/*ONLY for Francois*/
typedef struct HIE_tdstSuperObject_ * HIE_tdxHandleToSuperObjectTab;
/*ANNECY TQ 13/02/98{*/
typedef struct HIE_tdstParallelBox_ * HIE_tdxHandleToParallelBox;
/*ENDANNECY TQ}*/
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /*HieFriend || !__HIESPOBJ_H__*/
#endif /* __HIEHAND_H__*/

View File

@@ -0,0 +1,105 @@
/* (c) Ubi Studios 1996-97*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIEMACRO_H__
#define __HIEMACRO_H__
#ifdef __cplusplus
extern "C" {
#endif
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "SPO/hiespobj.h"
/*JMD*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hGetElementFormFixViewport ( ACP_tdxIndex xIndex ) ;
/*extern CPA_EXPORT ACP_tdxIndex HIE_fn_xGetNumberOfElementInFixViewport () ;*/
#define HIE_fn_bIsSuperObjectValid(hSuperObject) ((hSuperObject)!=HIE_C_InvalidSuperObject)
/*the cast to HIE_tdeTypeOfObject is to avoid a very strange editor bug*/
#define HIE_fn_vSetSuperObjectObjectAndType(_hSprObj, _hObj, _lType) \
{\
HIE_M_vSetSuperObjectMember(_hSprObj, ulTypeOfLinkedObject, _hObj ? _lType : HIE_C_ulSuperObject);\
HIE_M_vSetSuperObjectMember(_hSprObj, hLinkedObject.p_Void, _hObj);\
}
/*#define HIE_fn_vInvalidateSuperObject(hSuperObject) {(*hSuperObject)=HIE_C_InvalidSuperObject;}*/
/*function accessors definition*/
/*#define HIE_fn_hGetSuperObjectFather(_hSprObj) HIE_M_hGetSuperObjectFather(_hSprObj)*/
/*#define HIE_fn_hGetSuperObjectNextBrother(_hSprObj) HIE_M_hNextChild(_hSprObj)*/
/*#define HIE_fn_hGetSuperObjectFirstChild(_hSprObj) HIE_M_hFirstChild(_hSprObj)*/
#define HIE_fn_hGetSuperObjectPrevBrother(_hSprObj) HIE_M_hPrevChild(_hSprObj)
#define HIE_fn_hGetSuperObjectLastChild(_hSprObj) HIE_M_hLastChild(_hSprObj)
/*#define HIE_fn_vSuperObjectAddTail(_hNewFather, _hSprObj) HIE_M_vAddTail(_hNewFather, _hSprObj)*/
/*#define HIE_fn_vSuperObjectAddHead(_hNewFather, _hSprObj) HIE_M_vAddHead(_hNewFather, _hSprObj)*/
/*#define HIE_fn_lGetNumberOfChildren(_hSprObj) HIE_M_lGetNumberOfChildren(_hSprObj)*/
/*#define HIE_fn_lGetSuperObjectType(_hSprObj) HIE_M_xGetSuperObjectMember(_hSprObj,lTypeOfLinkedObject)*/
/*#define HIE_fn_hGetSuperObjectObject(_hSprObj) HIE_M_xGetSuperObjectMember(_hSprObj,hLinkedObject.p_Void)*/
/*#define HIE_fn_hGetSuperObjectGlobalMatrix(_hSprObj) HIE_M_xGetSuperObjectMember(_hSprObj,hGlobalMatrix)*/
/*#define HIE_fn_hGetSuperObjectMatrix(_hSprObj) HIE_M_xGetSuperObjectMember(_hSprObj,hLocalMatrix)*/
/*#define HIE_fn_vSetSuperObjectMatrix(_hSprObj, _hMatrix) HIE_M_vSetSuperObjectMember(_hSprObj,hLocalMatrix,_hMatrix)*/
/*#define HIE_fn_lGetSuperObjectDrawMask(_hSprObj) HIE_M_xGetSuperObjectMember(_hSprObj, lDrawModeMask)*/
/*#define HIE_fn_vSetSuperObjectDrawMask(_hSprObj, _lDrawMask) HIE_M_vSetSuperObjectMember(_hSprObj,lDrawModeMask, _lDrawMask)*/
/*ANNECY VL SPOFLAG 05/12/97{*/
/*#define HIE_fn_SO_ulGetFlags( _hSO ) HIE_M_xGetSuperObjectMember( _hSO, ulFlags )*/
/*#define HIE_fn_SO_vSetFlags( _hSO, _ulFlags ) HIE_M_vSetSuperObjectMember( _hSO, ulFlags, _ulFlags )*/
/*#define HIE_fn_SO_bIsNotPickable( _hSO ) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulNotPickable)*/
/*#define HIE_fn_SO_bIsHidden( _hSO ) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulHidden)*/
/*ANNECY TQ 17/02/98{*/
/* Macro for the friends modules ...*/
/*#define HIE_fn_SO_bHasABoxBoundingVolume(_hSO) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulTypeOfBoundingVolume)*/
/*#define HIE_fn_SO_bCheckChildren(_hSO) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulCheckChildren)*/
/*ENDANNECY TQ}*/
/*ANNECY TQ 02/03/98{*/
/*#define HIE_fn_SO_bIsSuperimposed(_hSO) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulSuperimposed)*/
/*#define HIE_fn_SO_bIsNotHangable(_hSO) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulNotHangable)*/
/*this one is required to remain declared as a function, even when HieFriend is defined by including modules!!!*/
extern CPA_EXPORT void HIE_fn_SO_vSetSuperimposedFlag (HIE_tdxHandleToSuperObject _hSO) ;
extern CPA_EXPORT void HIE_fn_SO_vClearSuperimposedFlag(HIE_tdxHandleToSuperObject _hSO) ;
extern CPA_EXPORT void HIE_fn_SO_SwitchSuperImposedTab (long lParam) ;
/*extern CPA_EXPORT void HIE_fn_SO_vSetSemiLookAtFlag (HIE_tdxHandleToSuperObject _hSO) ;*/
/*extern CPA_EXPORT void HIE_fn_SO_vSetLookAtFlag (HIE_tdxHandleToSuperObject _hSO) ;*/
/*extern CPA_EXPORT ACP_tdxBool HIE_fn_SO_bIsSemiLookAt (HIE_tdxHandleToSuperObject _hSO) ;*/
/*extern CPA_EXPORT ACP_tdxBool HIE_fn_SO_bIsLookAt (HIE_tdxHandleToSuperObject _hSO) ;*/
extern CPA_EXPORT void HIE_fn_v_TurnSemiLookAt ( GLD_tdxHandleToViewportAttributes hVpt, HIE_tdxHandleToSuperObject hSprObj ) ;
extern CPA_EXPORT void HIE_fn_v_TurnLookAt ( GLD_tdxHandleToViewportAttributes hVpt, HIE_tdxHandleToSuperObject hSprObj ) ;
/*XB980824*/
#ifndef D_THROW_MGT
extern CPA_EXPORT void HIE_fn_vSetMagnetModification(HIE_tdxHandleToSuperObject _hSprObj, ACP_tdxBool xModified);
extern CPA_EXPORT ACP_tdxBool HIE_fn_bGetMagnetModification(HIE_tdxHandleToSuperObject _hSprObj);
#endif /* D_THROW_MGT */
/*End XB*/
/*ENDANNECY TQ}*/
/* ANNECY AV {*/
/*#define HIE_fn_SO_bHasNoTransformationMatrix( _hSO ) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulNoTransformationMatrix)*/
#define HIE_fn_SO_bHasZoomInsteadOfScale( _hSO ) (HIE_M_xGetSuperObjectMember( _hSO, ulFlags ) & HIE_C_Flag_ulZoomInsteadOfScale)
/* END ANNECY AV }*/
/*ENDANNECY VL SPOFLAG}*/
/*ANNECY CT 13/01/98 { */
/*#define HIE_fn_bGetSuperObjectExcluLight(_hSprObj) (_hSprObj->ulFlags & HIE_C_Flag_ExcluLight ? TRUE : FALSE)*/
#define HIE_fn_vSetSuperObjectExcluLight(_hSprObj, _bExcluLight) { if (_bExcluLight) {(_hSprObj)->ulFlags |= HIE_C_Flag_ExcluLight;} else {(_hSprObj)->ulFlags &= ~HIE_C_Flag_ExcluLight;}}
/*ENDANNECY CT}*/
/*#define HIE_fn_hGetSuperObjectBoundingVolume(_hSprObj) HIE_M_xGetSuperObjectMember(_hSprObj, hBoundingVolume)*/
/*#define HIE_fn_vSetSuperObjectBoundingVolume(_hSprObj, _hVolume) HIE_M_vSetSuperObjectMember(_hSprObj, hBoundingVolume, _hVolume)*/
/*#define HIE_fn_bIsGlobalMatrixValid(_hSprObj) ((HIE_M_xGetSuperObjectMember(_hSprObj,lLastComputeFrame)==HIE_gs_lCurrentFrame)||(HIE_M_xGetSuperObjectMember(_hSprObj,lLastComputeFrame)==HIE_C_lCounterNotValid))*/
/*#define HIE_fn_vValidateGlobalMatrix( _hSprObj) HIE_M_vSetSuperObjectMember(_hSprObj, lLastComputeFrame, HIE_gs_lCurrentFrame)*/
/*#define HIE_fn_lGetGlobalMatrixFrameCounter() (HIE_gs_lCurrentFrame)*/
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIEMACRO_H__ */

View File

@@ -0,0 +1,101 @@
/* (c) Ubi Studios 1996*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIEMTSTK_H__
#define __HIEMTSTK_H__
#ifdef __cplusplus
extern "C" {
#endif
/* extern"C" because HieMtStk.cpp include it directely (all the other files inlude it throught HieExt.h ...).*/
/* For DLL using these function :*/
#include "cpa_expt.h"
/*typedef struct POS_stCompletePosition * GEO_tdxHandleToMatrix;*/
/* Oliv'*/
#if defined(U64)
#define HIE_C_lMaxMatrixInStack 20
#else
#define HIE_C_lMaxMatrixInStack 50
#endif
/* EndOfOliv'*/
#define HIE_C_lStackFull 200
#define HIE_C_lStackEmpty 201
#define OK 1
#define NOK 0
/*#define C_hInvalid ((void *)0)*/
/*not for export ?*/
extern GEO_tdxHandleToMatrix HIE_g_a_hMatrixStack[HIE_C_lMaxMatrixInStack];
extern GEO_tdxHandleToMatrix HIE_g_hCurrentMatrix ;
extern long HIE_g_lNbMatrixInStack ;
extern CPA_EXPORT
void HIE_fn_vCreateMatrixStack(void);
extern CPA_EXPORT
void HIE_fn_vDestroyMatrixStack(void);
extern CPA_EXPORT void
HIE_fn_vInitMatrixStack(void) ; /*marc*/
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bLoadIdentity(void); /*new*/
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bPopMatrix(void);
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bLoadMatrix(GEO_tdxHandleToMatrix _hMatrix);
extern CPA_EXPORT void
HIE_fn_vResetMatrixStack(void);
extern CPA_EXPORT GEO_tdxHandleToMatrix
GEO_fn_hCreateMatrix(void);
extern CPA_EXPORT void
GEO_fn_vDestroyMatrix(GEO_tdxHandleToMatrix _hMatrix);
#define GEO_M_vCopyMatrix(a,b) {POS_fn_vCopyMatrix((a),(b));}
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bStoreMatrix( GEO_tdxHandleToMatrix _hMatrix );
/*//////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*//////////////////////////////////////////////////////////////////////////////////////////////////////*/
/* New stack used to push the camera matrix first*/
/*//////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*//////////////////////////////////////////////////////////////////////////////////////////////////////*/
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bInitCameraMatrixStack(GLD_tdxHandleToViewportAttributes _hVpt);
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bPushOnCameraMatrixStack(GEO_tdxHandleToMatrix _hMatrix);
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bStoreOnCameraMatrixStack(GEO_tdxHandleToMatrix _hMatrix);
extern CPA_EXPORT ACP_tdxBool
HIE_fn_bPopOnCameraMatrixStack();
extern CPA_EXPORT void HIE_fn_vSetCurrentInCamCoordsMatrix (POS_tdstCompletePosition *p_stMatrix);
extern CPA_EXPORT POS_tdstCompletePosition * HIE_fn_pGetCurrentInCamCoordsMatrix (void);
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIEMTSTK_H__*/

View File

@@ -0,0 +1,105 @@
/* (c) Ubi Studios 1996*/
/* See Vincent Greco or Marc Villemain for any comment or question*/
#ifndef __HIEPICK_H__
#define __HIEPICK_H__
#ifdef __cplusplus
extern "C" {
#endif
/* For DLL using these function :*/
#include "cpa_expt.h"
#define HIE_C_DepthPickingObjects 3
typedef struct HIE_tdstPickInfo_
{
HIE_tdxHandleToSuperObject hSprObject; /* handle du super objet*/
ACP_tdxHandleOfObject hGeoObject;
GLI_tdstPickedObject stPickedObject;
} HIE_tdstPickInfo;
typedef HIE_tdstPickInfo HIE_aDEF_stTabOfPickInfo[HIE_C_DepthPickingObjects];
/*Chris 11/06/97*/
/*#define HIE_C_MaxTriangles 8
typedef struct HIE_tdstShadowInfo_
{
HIE_tdxHandleToSuperObject hSprObject; // handle du super objet
ACP_tdxHandleOfObject hGeoObject;
COL_tdstShadowElement a_stShadowObject[HIE_C_MaxTriangles];
ACP_tdxIndex xNbElement;
} HIE_tdstShadowInfo;
typedef HIE_tdstShadowInfo HIE_aDEF_stTabOfShadowInfo[HIE_C_DepthPickingObjects];
*/
/*Intersection with the Visual Set*/
extern CPA_EXPORT ACP_tdxIndex HIE_xIsSuperObjectPick(GLI_tdeModePicking xModePicking,
GLD_tdhDevice hDev,
GLD_tdhViewport hVp,
GLI_tdst2DVertex *p_stSouris2D,
HIE_tdxHandleToSuperObject hSprObj,
HIE_tdstPickInfo *p_stPickInfo );
/*Intersection with the ZDR of the Collide Set*/
extern CPA_EXPORT ACP_tdxIndex HIE_bIntersectSemiAxeWithSuperObject(GLI_tdeModePicking xModePicking,
MTH3D_tdstVector *p_stVertexA,
MTH3D_tdstVector *p_stVertexB,
MTH3D_tdstVector *p_stVectAB,
HIE_tdxHandleToSuperObject hSprObj,
HIE_tdstPickInfo *p_stPickInfo );
/*Intersection with the ZDR of the Collide Set (condensed result)*/
extern CPA_EXPORT ACP_tdxBool HIE_bIntersectSemiAxeWithFirstSuperObject ( MTH3D_tdstVector *_p_stVertexA,
MTH3D_tdstVector *_p_stVectAB,
HIE_tdxHandleToSuperObject hSprObj,
MTH3D_tdstVector *_p_stHit,
MTH3D_tdstVector *_p_stNormal,
HIE_tdxHandleToSuperObject *_p_hSprObjHit);
extern CPA_EXPORT ACP_tdxIndex HIE_bIntersectSegmentWithSuperObject(MTH3D_tdstVector *p_stVertexA,
MTH3D_tdstVector *p_stVectAB,
HIE_tdxHandleToSuperObject hSprObj,
HIE_tdstPickInfo *p_stPickInfo );
/* FPU pour la camera */
extern CPA_EXPORT ACP_tdxBool HIE_bDetectIntersectSegmentWithSuperObject ( MTH3D_tdstVector *p_stVertexA,
MTH3D_tdstVector *p_stVectAB,
HIE_tdxHandleToSuperObject hSprObj );
extern CPA_EXPORT ACP_tdxBool fn_bDetectIntersectSegmentWithBoundingSphere(GEO_tdxHandleToMatrix _p_stCurrentMatrix, MTH3D_tdstVector *_p_stVertexA,
MTH3D_tdstVector *_p_stVectAB, GEO_tdxHandleToBoundingSphere _hBoundingSphere);
extern CPA_EXPORT ACP_tdxBool HIE_bIntersectSegmentWithFirstSuperObject ( MTH3D_tdstVector *_p_stVertexA,
MTH3D_tdstVector *_p_stVectAB,
HIE_tdxHandleToSuperObject hSprObj,
MTH3D_tdstVector *_p_stHit,
MTH3D_tdstVector *_p_stNormal,
HIE_tdxHandleToSuperObject *_p_hSprObjHit);
/*Chris 11/06/97*/
/*extern CPA_EXPORT
ACP_tdxIndex HIE_bIntersectShadowSuperObject(MTH3D_tdstVector *p_stVertexA,
MTH3D_tdstVector *p_stVertexB,
MTH3D_tdstVector *p_stVectAB,
MTH_tdxReal _xNearDistance,
HIE_tdxHandleToSuperObject _hSprObj,
HIE_aDEF_stTabOfShadowInfo _a_stTabShadowInfo);
*/
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIEPICK_H__ */

View File

@@ -0,0 +1,422 @@
/* (c) Ubi Studios 1996*/
/* See Vincent Greco for any comment or question*/
#ifndef __HIESPOBJ_H__
#define __HIESPOBJ_H__
#ifdef __cplusplus
extern "C" {
#endif
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "SPO/hiedef.h"
extern ACP_tdxIndex g_xFixIndex;
typedef union HIE_tduLinkedObject_
{
struct HIE_tdstSuperObject_ * p_stSuperObject;
struct GEO_tdstGeometricObject_ * p_stGeometricObject;
struct PO_tdstPhysicalObject_ * p_stPhysicalObject;
struct IPO_tdstInstanciatedPhysicalObject_ * p_stInstanciatedPhysicalObject;
struct SECT_tdstSector_ * p_stSector;
struct tdstEngineObject_ * p_stCharacter;
struct GLI_tdstLight_ * p_stLight;
void* p_Void;
} HIE_tduLinkedObject;
typedef struct HIE_tdstSuperObject_
{
/* fbolefeysot - 01/10/98*/
/* change SPO enum to flags{*/
unsigned long ulTypeOfLinkedObject; /* sie hieconst.h for flags*/
/*END fbolefeysot}*/
HIE_tduLinkedObject hLinkedObject;
LST2_M_DynamicParentDeclaration(struct HIE_tdstSuperObject_*)
LST2_M_DynamicChildDeclaration(struct HIE_tdstSuperObject_*, struct HIE_tdstSuperObject_*)
GEO_tdxHandleToMatrix hLocalMatrix;
GEO_tdxHandleToMatrix hGlobalMatrix;
long lLastComputeFrame;
long lDrawModeMask;
unsigned long ulFlags;
void * hBoundingVolume;
float fTransparenceLevel;
#ifndef U64
MTH3D_tdstVector stSemiLookAtVector ;
#endif
#ifdef ACTIVE_EDITOR
long llastComputeFrameForModule;
#endif
} HIE_tdstSuperObject;
#undef __HIE_EXTERN
#ifdef __HIE_GLOBALS
#define __HIE_EXTERN
#else
#define __HIE_EXTERN extern
#endif
__HIE_EXTERN long HIE_gs_lCurrentFrame ;/*extern only for optimisation*/
/* inline functions*/
#ifndef CODEWARRIOR
static
#endif
__inline struct HIE_tdstSuperObject_ *HIE_fn_hGetElementFromSuperObjectTab(struct HIE_tdstSuperObject_ *_hTab, long _lIndex)
{
return _hTab+_lIndex;
}
#ifndef CODEWARRIOR
static
#endif
__inline long HIE_fn_hGetIndexFromSuperObjectTabAndElement(struct HIE_tdstSuperObject_ *_hTab, struct HIE_tdstSuperObject_ *_hElement)
{
return _hElement-_hTab;
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxIndex HIE_fn_xGetNumberOfElementInFixViewport ()
{
return (g_xFixIndex) ;
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vInvalidateSuperObject(struct HIE_tdstSuperObject_ **hSuperObject)
{
(*hSuperObject) = HIE_C_InvalidSuperObject;
}
#ifndef CODEWARRIOR
static
#endif
__inline struct HIE_tdstSuperObject_ *HIE_fn_hGetSuperObjectFather(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_hGetSuperObjectFather(_hSprObj);
}
#ifndef CODEWARRIOR
static
#endif
__inline struct HIE_tdstSuperObject_ *HIE_fn_hGetSuperObjectNextBrother(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_hNextChild(_hSprObj);
}
#ifndef CODEWARRIOR
static
#endif
__inline struct HIE_tdstSuperObject_ *HIE_fn_hGetSuperObjectFirstChild(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_hFirstChild(_hSprObj);
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSuperObjectAddTail(struct HIE_tdstSuperObject_ *_hNewFather, struct HIE_tdstSuperObject_ *_hSprObj)
{
HIE_M_vAddTail(_hNewFather, _hSprObj);
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSuperObjectAddHead(struct HIE_tdstSuperObject_ *_hNewFather, struct HIE_tdstSuperObject_ *_hSprObj)
{
HIE_M_vAddHead(_hNewFather, _hSprObj);
}
#ifndef CODEWARRIOR
static
#endif
__inline long HIE_fn_lGetNumberOfChildren(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_lGetNumberOfChildren(_hSprObj);
}
#ifndef CODEWARRIOR
static
#endif
__inline unsigned long HIE_fn_ulGetSuperObjectType(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_xGetSuperObjectMember(_hSprObj,ulTypeOfLinkedObject);
}
#ifndef CODEWARRIOR
static
#endif
__inline HIE_tdxHandleToVoid HIE_fn_hGetSuperObjectObject(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_xGetSuperObjectMember(_hSprObj,hLinkedObject.p_Void);
}
#ifndef CODEWARRIOR
static
#endif
__inline GEO_tdxHandleToMatrix HIE_fn_hGetSuperObjectGlobalMatrix(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_xGetSuperObjectMember(_hSprObj,hGlobalMatrix);
}
#ifndef CODEWARRIOR
static
#endif
__inline GEO_tdxHandleToMatrix HIE_fn_hGetSuperObjectMatrix(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_xGetSuperObjectMember(_hSprObj,hLocalMatrix);
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSetSuperObjectMatrix(struct HIE_tdstSuperObject_ *_hSprObj, GEO_tdxHandleToMatrix _hMatrix)
{
HIE_M_vSetSuperObjectMember(_hSprObj,hLocalMatrix,_hMatrix);
}
#ifndef CODEWARRIOR
static
#endif
__inline long HIE_fn_lGetSuperObjectDrawMask(struct HIE_tdstSuperObject_ *_hSprObj)
{
return HIE_M_xGetSuperObjectMember(_hSprObj, lDrawModeMask);
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSetSuperObjectDrawMask(struct HIE_tdstSuperObject_ *_hSprObj, long _lDrawMask)
{
HIE_M_vSetSuperObjectMember(_hSprObj,lDrawModeMask, _lDrawMask);
}
/*
* Accessors for the Super Object Flags
*/
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_SO_vSetFlags( struct HIE_tdstSuperObject_ *_hSO, unsigned long _ulFlags )
{
_hSO->ulFlags = _ulFlags;
}
#ifndef CODEWARRIOR
static
#endif
__inline unsigned long HIE_fn_SO_ulGetFlags( struct HIE_tdstSuperObject_ *_hSO )
{
return _hSO->ulFlags;
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bIsNotPickable( struct HIE_tdstSuperObject_ *_hSO )
{
return (ACP_tdxBool)(_hSO->ulFlags & HIE_C_Flag_ulNotPickable);
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bIsHidden( struct HIE_tdstSuperObject_ *_hSO )
{
return (ACP_tdxBool)(_hSO->ulFlags & HIE_C_Flag_ulHidden );
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bIsSuperimposed (struct HIE_tdstSuperObject_ *_hSO)
{
return (ACP_tdxBool)(_hSO->ulFlags & HIE_C_Flag_ulSuperimposed);
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_SO_vSetSemiLookAtFlag (struct HIE_tdstSuperObject_ *_hSO)
{
_hSO->ulFlags |= HIE_C_Flag_ulSemiLookAt ;
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_SO_vSetNotHitByraytraceFlag (struct HIE_tdstSuperObject_ *_hSO)
{
_hSO->ulFlags |= HIE_C_Flag_ulNotHitByRayTrace ;
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bIsSemiLookAt (struct HIE_tdstSuperObject_ *_hSO)
{
return (ACP_tdxBool)((_hSO->ulFlags & HIE_C_Flag_ulSemiLookAt) >> 8);
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bCanDrawShadowOnMe (struct HIE_tdstSuperObject_ *_hSO)
{
return (ACP_tdxBool)(!(_hSO->ulFlags & HIE_C_Flag_ulNoShadowOnMe ));
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bIsHitByRaytrace (struct HIE_tdstSuperObject_ *_hSO)
{
return (ACP_tdxBool)(!(_hSO->ulFlags & HIE_C_Flag_ulNotHitByRayTrace));
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bCheckChildren (struct HIE_tdstSuperObject_ *_hSO)
{
return (ACP_tdxBool)((_hSO->ulFlags & HIE_C_Flag_ulCheckChildren) >> 8);
}
/* The Bounding Volume of a SuperObject can be either a Box or a Sphere ...*/
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bHasABoxBoundingVolume( struct HIE_tdstSuperObject_ *_hSO )
{
return (ACP_tdxBool)(_hSO->ulFlags & HIE_C_Flag_ulTypeOfBoundingVolume);
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_SO_bHasNoTransformationMatrix( struct HIE_tdstSuperObject_ *_hSO )
{
return (ACP_tdxBool) (_hSO->ulFlags & HIE_C_Flag_ulNoTransformationMatrix);
}
#ifndef CODEWARRIOR
static
#endif
__inline void * HIE_fn_hGetSuperObjectBoundingVolume(struct HIE_tdstSuperObject_ *_hSprObj)
{
return (HIE_M_xGetSuperObjectMember(_hSprObj, hBoundingVolume));
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSetSuperObjectBoundingVolume(struct HIE_tdstSuperObject_ *_hSprObj, void * _hVolume)
{
HIE_M_vSetSuperObjectMember(_hSprObj, hBoundingVolume, _hVolume);
}
#ifndef CODEWARRIOR
static
#endif
__inline unsigned char HIE_fn_bGetSuperObjectExcluLight(struct HIE_tdstSuperObject_ *_hSprObj)
{
return (unsigned char)((_hSprObj->ulFlags & HIE_C_Flag_ExcluLight) >> 16);
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxBool HIE_fn_bIsGlobalMatrixValid(struct HIE_tdstSuperObject_ *_hSprObj)
{
long lFrame;
lFrame = HIE_M_xGetSuperObjectMember(_hSprObj,lLastComputeFrame);
return (ACP_tdxBool) (lFrame == HIE_gs_lCurrentFrame || lFrame == HIE_C_lCounterNotValid);
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vValidateGlobalMatrix(struct HIE_tdstSuperObject_ *_hSprObj)
{
HIE_M_vSetSuperObjectMember(_hSprObj, lLastComputeFrame, HIE_gs_lCurrentFrame);
}
#ifndef CODEWARRIOR
static
#endif
__inline long HIE_fn_lGetGlobalMatrixFrameCounter(void)
{
return HIE_gs_lCurrentFrame;
}
#ifndef CODEWARRIOR
static
#endif
__inline ACP_tdxHandleOfObject HIE_fn_hGetSuperObjectBoxBoundingVolume(struct HIE_tdstSuperObject_ *_hSprObj)
{
return (ACP_tdxHandleOfObject) HIE_M_xGetSuperObjectMember(_hSprObj, hBoundingVolume);
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSetSuperObjectFirstChild(struct HIE_tdstSuperObject_ *_hSprObj,struct HIE_tdstSuperObject_ *_hChild)
{
HIE_M_hFirstChild(_hSprObj)=_hChild;
}
#ifndef CODEWARRIOR
static
#endif
__inline float HIE_fn_fGetSuperObjectTransparenceLevel(struct HIE_tdstSuperObject_ *_hSuperObj)
{
return( HIE_M_xGetSuperObjectMember( _hSuperObj,fTransparenceLevel ) );
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSetSuperObjectTransparenceLevel(struct HIE_tdstSuperObject_ *_hSuperObj,float _fTransparenceLevel)
{
HIE_M_vSetSuperObjectMember( _hSuperObj,fTransparenceLevel,_fTransparenceLevel );
}
#ifndef CODEWARRIOR
static
#endif
__inline long HIE_fn_lGetSuperObjectLastComputeFrame(struct HIE_tdstSuperObject_ *_hSuperObj)
{
return( HIE_M_xGetSuperObjectMember( _hSuperObj,lLastComputeFrame ) );
}
#ifndef CODEWARRIOR
static
#endif
__inline void HIE_fn_vSetSuperObjectLastComputeFrame(struct HIE_tdstSuperObject_ *_hSuperObj,long _lLastComputeFrame)
{
HIE_M_vSetSuperObjectMember( _hSuperObj,lLastComputeFrame,_lLastComputeFrame );
}
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIESPOBJ_H__*/

View File

@@ -0,0 +1,102 @@
/* (c) Ubi Studios 1996*/
/* See Vincent Greco or Marc Villemain for any comment or question*/
#ifndef __HIELOAD_H__
#define __HIELOAD_H__
#ifdef __cplusplus
extern "C" {
#endif
/* For DLL using these functions :*/
#include "cpa_expt.h"
/*=======================================================*/
/* Functions used for loading one SuperObject */
/*=======================================================*/
#if !defined(U64)
extern CPA_EXPORT SCR_tdst_Link_Table * HIE_fn_p_stGetSuperObjectLinkTable();
extern CPA_EXPORT SCR_tdst_Link_Table * HIE_fn_p_stGetLinkedObjectLinkTable();
#endif /* U64 */
/*extern CPA_EXPORT void HIE_fn_vPrepareSaveSuperObjectsBinaryBloc();*/
extern CPA_EXPORT BOOL HIE_fn_bInitSPOLoading();
extern CPA_EXPORT BOOL HIE_fn_bStopSPOLoading();
#if !defined(U64)
extern CPA_EXPORT SCR_tde_Anl_ReturnValue HIE_fn_xLoadOneMatrix(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue HIE_fn_xLoadSuperObject(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
#endif /* U64 */
/*============================================================*/
/* Function used for loading a whole file */
/*============================================================*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hLoadSPOFile(char *szLoadPath, char *szFileName);
/* ANNECY MT - 08/09/98 {*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hLoadSUBFile(char *szLoadPath, char *szFileName, long _lSubMap, long _lEntry);
/* END ANNECY MT }*/
extern CPA_EXPORT HIE_tdxHandleToSuperObject HIE_fn_hLoadOneSuperObject(char *p_cScriptFile);
extern CPA_EXPORT BOOL HIE_fn_bInitSPOLoading2();
extern CPA_EXPORT BOOL HIE_fn_bStopSPOLoading2();
#if !defined(U64)
extern CPA_EXPORT SCR_tde_Anl_ReturnValue HIE_fn_xLoadSuperObject2(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
/* ANNECY MT - 08/09/98 {*/
extern CPA_EXPORT SCR_tde_Anl_ReturnValue HIE_fn_xLoadSubMap(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
/* END ANNECY MT }*/
#endif /* U64 */
extern CPA_EXPORT void HIE_fn_vLoadLinkedObject(HIE_tdxHandleToSuperObject _hSuperObject);
/*-----------------------------------------------------------------*/
/*extern CPA_EXPORT void HIE_fn_vPrepareSaveSuperObjectsBinaryBloc();*/
/*-----------------------------------------------------------------------------
* Description : function to write a binary SPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*extern CPA_EXPORT unsigned long SPO_fn_ulWriteBinaryBloc(unsigned long _ulStructAddress, char* _p_cDestBuffer);*/
/*extern CPA_EXPORT unsigned long SPO_fn_ulWriteBinaryBloc2(unsigned long _ulStructAddress, char* _p_cDestBuffer);*/
/*-----------------------------------------------------------------------------
* Description : function to write all the binary SPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*extern CPA_EXPORT void SPO_fn_vWriteAllSPOBinaryBlocs(char* _szBinaryFileName);*/
/*extern CPA_EXPORT void SPO_fn_vWriteAllSPOBinaryBlocs2(char* _szBinaryFileName);*/
/*-----------------------------------------------------------------------------
* Description : function to read a binary SPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
extern CPA_EXPORT unsigned long SPO_fn_ulReadBinaryBloc(char* _p_cLoadedBuffer,unsigned long _ulLoadedBufferSize);
extern CPA_EXPORT void SPO_fn_vChangeIdsIntoAddresses(unsigned long ulAddress);
extern CPA_EXPORT void SPO_fn_vChangeAllIdsIntoAddresses(char* _szBinaryFileName);
extern CPA_EXPORT void SPO_fn_vResolveBinaryBloc(unsigned long _ulAddress);
extern CPA_EXPORT void SPO_fn_vResolveBinaryBloc2(unsigned long _ulAddress);
*/
/*-----------------------------------------------------------------------------
* Description : function to read all the binary blocs for SPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/* extern CPA_EXPORT void SPO_fn_vReadAllSPOBinaryBlocs(char* _szBinaryFileName);*/
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif /* __HIELOAD_H__ */