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,123 @@
#ifndef __CULLING_H__
#define __CULLING_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "GLD.h"
#include "POS.h"
/*
=======================================================================================
define
=======================================================================================
*/
#define GEO_C_lCullingOut 0x00
#define GEO_C_lCullingLeft 0x01
#define GEO_C_lCullingRight 0x02
#define GEO_C_lCullingUp 0x04
#define GEO_C_lCullingDown 0x08
#define GEO_C_lCullingNear 0x10
#define GEO_C_lCullingFar 0x20
#define GEO_C_lCullingIntersect 0x40 /*not in nor out, but the exact intersected planes are not known*/
#define GEO_C_lCullingIn 0x7f /*In means inside all planes*/
/*
=======================================================================================
globals
=======================================================================================
*/
extern MTH_tdxReal GEO_g_xZFar;
extern MTH_tdxReal GEO_g_xZFarTransparencyZone;
extern MTH_tdxReal GEO_g_xOoZFarTransparencyZone;
extern MTH_tdxReal GEO_g_xZFarTransparencyLevel;
/*
=======================================================================================
Functions
=======================================================================================
*/
/*
* ZFar parameters access functions
*/
extern CPA_EXPORT MTH_tdxReal GEO_xGetZFar( void );
extern CPA_EXPORT void GEO_vSetZFar( MTH_tdxReal _xZ );
extern CPA_EXPORT MTH_tdxReal GEO_xGetZFarTransparencyZone( void );
extern CPA_EXPORT void GEO_vSetZFarTransparencyZone( MTH_tdxReal _xZ );
extern CPA_EXPORT MTH_tdxReal GEO_xGetZFarTransparencyLevel( void );
/*
***************************************************************************************
pre compute camera parameters for faster culling
compute clipping plane normal in global system axis to avoid object transformation
from global to camera system axis
***************************************************************************************
*/
extern CPA_EXPORT void GEO_fn_vComputeCameraParametersForCulling( GLD_tdstViewportAttributes *p_stVpt, MTH_tdxReal _xZFar );
/**********************************************************************************************/
/* Name: GEO_lCullingSphere 1.0*/
/* Goal: Return 1 if the sphere is visible.*/
/**********************************************************************************************/
extern CPA_EXPORT long GEO_lCullingSphere
(
GLD_tdstViewportAttributes *p_stVpt ,
MTH3D_tdstVector *p_stSphereCenter ,
MTH_tdxReal xRadius,
POS_tdstCompletePosition *p_stMatrix,
long _lCullingresult
);
/**********************************************************************************************/
/* Name: GEO_lCullingSphere 1.0*/
/* Goal: Return 1 if the sphere is visible.*/
extern CPA_EXPORT long GEO_lCullingGlobalSphere
(
GLD_tdstViewportAttributes *_p_stVpt,
MTH3D_tdstVector *_p_stSphereCenter,
MTH_tdxReal _xRadius,
long _lCullingresult
);
/**********************************************************************************************/
/* Name: GEO_lCullingBox 1.0*/
/* Goal: Return 1 if aligned box is visible.*/
/**********************************************************************************************/
extern CPA_EXPORT long GEO_lCullingBox
(
GLD_tdstViewportAttributes *p_stVpt,
MTH3D_tdstVector *p_stMin,
MTH3D_tdstVector *p_stMax,
long _lCullingresult
);
/**********************************************************************************************/
/* Name: GEO_lCullingSphereNoMMM*/
/* Goal: Return 1 if the sphere is visible.*/
/**********************************************************************************************/
extern CPA_EXPORT long GEO_lCullingSphereNoMMM
(
GLD_tdstViewportAttributes *p_stVpt ,
MTH3D_tdstVector *p_stShereCenter ,
MTH_tdxReal xRadius,
POS_tdstCompletePosition *p_stMatrix,
long _lCullingresult
);
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*__CULLING_H__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,130 @@
/*****************************************
// //
// Management of the Module : GEO //
// //
// File Name : ErrGEO.h //
// Date : 03/02/97 //
// Author : Philippe Vimont //
// //
*****************************************/
#ifndef __GEO_ERRGEO_H__
#define __GEO_ERRGEO_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define C_szGEOVersion "GEO V0.5.1" /* The format is GEO Va.b.c with GEO is the Tag of the module */
#define C_szGEOFullName "Geometry Common"/* the complete and clear name of the module */
#define C_szGEODate __DATE__ /*The format is "Mmm dd yyyy".You can use __DATE__ but be careful that you have the control of the compilation*/
/* 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
#include "ERM.h"
#define __FATAL_ERR_GEO__
#define __WARNING1_ERR_GEO__
/*----------*/
/* Constant */
/*----------*/
/* error of the GEO Module*/
typedef enum e_uwGEOErrNumber_{
E_uwGEOFatalErr,
#ifdef __FATAL_ERR_GEO__
/* -----------------*/
E_uwGEONotEnoughtMemory,
E_uwGEOUnAvailableChannel,
E_uwGEOIncreaseNumberOfSource,
#endif /*__FATAL_ERR_GEO__*/
E_uwGEOStartOfWarning,/* important constant, it allows to recognize if an error is fatal or not.*/
#ifdef __WARNING1_ERR_GEO__
/* -------------------*/
E_uwGEOCanNotFree,
E_uwGEOCanNotloadBitmap,
E_uwGEOTryToKillDynamicChannel,
E_uwGEODebugDynamicAllocation,
#endif /*__WARNING1_ERR_GEO__*/
#ifdef __WARNING2_ERR_GEO__
/* -------------------*/
#endif /*__WARNING2_ERR_GEO__*/
#ifdef __WARNING3_ERR_GEO__
/* -------------------*/
#endif /*__WARNING3_ERR_GEO__*/
E_uwGEOErrNumber
} e_uwGEOErrNumber;
/*------------------*/
/* Global Variables*/
/*------------------*/
#undef __ERRGEO_EXTERN
#ifndef __DeclareGlobalVariableErrGEO_h__
#define __ERRGEO_EXTERN extern /*external declaration*/
#else /*__DeclareGlobalVariableErrGEO_h__*/
#define __ERRGEO_EXTERN /*replace by nothing : we have to declare*/
#endif /*__DeclareGlobalVariableErrGEO_h__*/
__ERRGEO_EXTERN CPA_EXPORT unsigned char g_ucGEOModuleId /*number of identification of the Erm module*/
#if defined(__DeclareGlobalVariableErrGEO_h__) && !defined(CPA_WANTS_IMPORT)
= C_ucModuleNotInitialized
#endif /*__DeclareGlobalVariableErrGEO_h__&& CPA_WANTS_IMPORT*/
;
#ifdef __ERROR_STRINGS__
__ERRGEO_EXTERN CPA_EXPORT char * g_a_szGEOInformationModule []
#if defined(__DeclareGlobalVariableErrGEO_h__) && !defined(CPA_WANTS_IMPORT)
= {C_szGEOVersion, C_szGEOFullName, C_szGEODate}
#endif /*__DeclareGlobalVariableErrGEO_h__ && CPA_WANTS_IMPORT*/
;
__ERRGEO_EXTERN CPA_EXPORT char * g_szGEOModuleName /* Mandatory syntax 'g_sz'+[Abbreviation of ModuleName]+'ModuleName'*/
#if defined(__DeclareGlobalVariableErrGEO_h__) && !defined(CPA_WANTS_IMPORT)
= "Module GEO"
#endif /*__DeclareGlobalVariableErrGEO_h__ && CPA_WANTS_IMPORT*/
;
__ERRGEO_EXTERN CPA_EXPORT struct tdstErrorMsg_ g_a_stGEOTabErr [] /* Mandatory syntax 'g_a_st'+[Abbreviation of ModuleName]+'TabErr'*/
#if defined(__DeclareGlobalVariableErrGEO_h__) && !defined(CPA_WANTS_IMPORT)
={
#ifdef __FATAL_ERR_GEO__
/* -------------*/
E_uwGEONotEnoughtMemory, " Not Enought Memory...",
E_uwGEOUnAvailableChannel, " Unexistant channel ",
E_uwGEOIncreaseNumberOfSource,"GEO_fn_vMemoryLogFile : Increase max number of sources",
#endif /*__FATAL_ERR_GEO__*/
#ifdef __WARNING1_ERR_GEO__
E_uwGEOCanNotFree , "Can not free! ",
E_uwGEOCanNotloadBitmap , " Could Not DownLoad textures 8 or 16 bits in file : " ,
E_uwGEOTryToKillDynamicChannel , "Try to Kill dynamic channel! ",
E_uwGEODebugDynamicAllocation,"Debug verion : dynamic allocation in bloc GEO (don't forget to increase the bloc)",
/* ----------------*/
#endif /*__WARNING1_ERR_GEO__*/
#ifdef __WARNING2_ERR_GEO__
/* ----------------*/
#endif /*__WARNING2_ERR_GEO__*/
#ifdef __WARNING3_ERR_GEO__
/* ----------------*/
#endif /*__WARNING3_ERR_GEO__*/
0xFFFF, "\0"/*fin*/
};
#endif /*__DeclareGlobalVariableErrGEO_h__ && CPA_WANTS_IMPORT*/
;
#endif /*__ERROR_STRINGS__*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /*__ERRGEO_H__*/

View File

@@ -0,0 +1,163 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DESCRIPTION :
~~~~~~~~~~~
THIS IS AN EXAMPLE OF ACP HEADER FILES
For a given file <HeaderName>.h, all occurences of the string HEADERNAME
must be replaced with the string <HeaderName>.
For a given module, all occurences of the string MODULETAG must be replaced
with the CPA tag of the module (GLI, MTH ...) .
You must do :
#define MODULETAG_GLOBALS
in one (and only one) .c file of your Module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* To avoid unnecessary includes : */
#ifndef __GEO_FMD_H
#define __GEO_FMD_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
/* For Global declaration in C files : */
#ifdef GEO_GLOBALS
#define __GEO_EXTERN extern
#else /* !GEO_GLOBALS */
#define __GEO_EXTERN
#endif /* !GEO_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)
-----------------------------------------------------------------------------
*/
#include "ErrGEO.h"
#include "MmgGEO.h"
/*
-----------------------------------------------------------------------------
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 ;
-----------------------------------------------------------------------------
*/
typedef float GLI_tdxUVValue ;
typedef struct ACP_tdst2DUVValues_
{
GLI_tdxUVValue xU;
GLI_tdxUVValue xV;
}
ACP_tdst2DUVValues ;
typedef struct GEO_tdstFaceMapDescriptor_
{
ACP_tdst2DUVValues stUVValues[3];
GMT_tdxHandleToGameMaterial hMaterial;
} GEO_tdstFaceMapDescriptor ;
/*
-----------------------------------------------------------------------------
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
-----------------------------------------------------------------------------
*/
extern CPA_EXPORT void
GEO_xCreateFaceMapDescriptor ( ACP_tdxHandleOfFMD *hFmd ) ;
extern CPA_EXPORT void
GEO_xSetFaceMapDescriptorUV ( ACP_tdxHandleOfFMD hFmd ,
ACP_tdst2DUVValues *p_stUVA,
ACP_tdst2DUVValues *p_stUVB,
ACP_tdst2DUVValues *p_stUVC) ;
extern CPA_EXPORT void
GEO_xGetFaceMapDescriptorUV ( ACP_tdxHandleOfFMD hFmd ,
ACP_tdst2DUVValues *p_stUVA,
ACP_tdst2DUVValues *p_stUVB,
ACP_tdst2DUVValues *p_stUVC) ;
extern CPA_EXPORT void
GEO_xSetFaceMapDescriptorGameMaterial ( ACP_tdxHandleOfFMD hFmd ,
GMT_tdxHandleToGameMaterial hMaterial);
extern CPA_EXPORT void
GEO_xGetFaceMapDescriptorGameMaterial ( ACP_tdxHandleOfFMD hFmd ,
GMT_tdxHandleToGameMaterial *p_hMaterial);
extern CPA_EXPORT void
GEO_xSetFaceMapDescriptorMaterial ( ACP_tdxHandleOfFMD hFmd ,
ACP_tdxHandleOfMaterial hMaterial);
extern CPA_EXPORT void
GEO_xGetFaceMapDescriptorMaterial ( ACP_tdxHandleOfFMD hFmd ,
ACP_tdxHandleOfMaterial *p_hMaterial);
/*
-----------------------------------------------------------------------------
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 /* __GEO_FMD_H */

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,283 @@
/* (c) Ubi Studios 1997 */
/* See Vincent Greco for any comment or question */
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DESCRIPTION :
~~~~~~~~~~~
THIS IS AN EXAMPLE OF ACP HEADER FILES
For a given file <HeaderName>.h, all occurences of the string HEADERNAME
must be replaced with the string <HeaderName>.
For a given module, all occurences of the string MODULETAG must be replaced
with the CPA tag of the module (GLI, MTH ...) .
You must do :
#define MODULETAG_GLOBALS
in one (and only one) .c file of your Module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* To avoid unnecessary includes : */
#ifndef __GEO_GEOBDVOL_H
#define __GEO_GEOBDVOL_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
/* For Global declaration in C files : */
#ifdef GEO_GLOBALS
#define __GEO_EXTERN extern
#else /* !MODULETAG_GLOBALS */
#define __GEO_EXTERN
#endif /* !MODULETAG_GLOBALS */
#include "geoobj.h"
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT ACP_tdxHandleOfObject GEO_fn_hCreateGeometricSphere
(
void
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vGetInfoFromGeometricSphere
(
MTH3D_tdstVector *_p_stSphereCenter,
MTH_tdxReal *_p_xSphereRadius,
ACP_tdxHandleOfObject _hBoundingVolume
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_fn_vSetGeometricSphere
(
MTH3D_tdstVector *_p_stSphereCenter,
MTH_tdxReal _xSphereRadius,
ACP_tdxHandleOfObject _hBoundingSphere
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_fn_vUpdateBoundingSphere
(
ACP_tdxHandleOfObject _hGeometricSphere,
GEO_tdxHandleToBoundingSphere _hBoundingSphere
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_fn_vUpdateGeometricSphere
(
ACP_tdxHandleOfObject _hGeometricSphere,
GEO_tdxHandleToBoundingSphere _hBoundingSphere
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT ACP_tdxHandleOfObject GEO_fn_hCreateSphereGeometricObject
(
void
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_fn_vCreateParallelBox
(
GEO_tdxHandleToParallelBox * _p_hNewBox
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_vDeleteParallelBox
(
GEO_tdxHandleToParallelBox _hParallelBox
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vCreateAndInitBoxBoundingVolume
(
GEO_tdxHandleToParallelBox * _p_hNewBox,
MTH3D_tdstVector* _p_stMaxBoxPoint,
MTH3D_tdstVector* _p_stMinBoxPoint
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vGetSphereFromParallelBox
(
MTH3D_tdstVector * _p_stCenter,
MTH_tdxReal * _p_xRadius,
MTH3D_tdstVector * _p_stMaxBoxPoint,
MTH3D_tdstVector * _p_stMinBoxPoint
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vComputeParallelBoxOfSphere
(
MTH3D_tdstVector * _p_stMaxBoxPoint,
MTH3D_tdstVector * _p_stMinBoxPoint,
MTH3D_tdstVector * _p_stCenter,
MTH_tdxReal _p_xSphereRadius
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_fn_vComputeParallelBoxOfTwoBoxes
(
MTH3D_tdstVector * _p_stMaxReturnedBoxPoint,
MTH3D_tdstVector * _p_stMinReturnedBoxPoint,
MTH3D_tdstVector * _p_stMaxFirstBoxPoint,
MTH3D_tdstVector * _p_stMinFirstBoxPoint,
MTH3D_tdstVector * _p_stMaxSecondBoxPoint,
MTH3D_tdstVector * _p_stMinSecondBoxPoint
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_fn_vAddObjectToBox
(
ACP_tdxHandleOfObject _hGeometricObject,
POS_tdstCompletePosition* _p_stGlobalMatrix,
MTH3D_tdstVector* _p_stMax,
MTH3D_tdstVector* _p_stMin
);
/*--------------------------------------------------------------------------------------*/
#ifdef USE_ALTIMAPS
extern CPA_EXPORT void GEO_fn_vAddAltimapToSphere
(
ACP_tdxHandleOfObject _hGeometricObject,
MTH3D_tdstVector *_p_stSphereCenter,
MTH_tdxReal *_p_xSphereRadius
);
#endif /*USE_ALTIMAPS*/
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vAddObjectToSphere
(
ACP_tdxHandleOfObject _hGeometricObject,
MTH3D_tdstVector *_p_stSphereCenter,
MTH_tdxReal *_p_xSphereRadius
);
/*--------------------------------------------------------------------------------------*/
extern CPA_EXPORT void GEO_fn_vComputeBoundingSphereOfTwoSpheres
(
MTH3D_tdstVector *_p_stReturnedSphereCenter,
MTH_tdxReal *_p_xReturnedSphereRadius,
MTH3D_tdstVector *_p_stFirstSphereCenter,
MTH_tdxReal _xFirstSphereRadius,
MTH3D_tdstVector *_p_stSecondSphereCenter,
MTH_tdxReal _xSecondSphereRadius
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vCreateBoundingSphere
(
GEO_tdxHandleToBoundingSphere *_p_hNewSphere
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vSetBoundingSphere
(
GEO_tdxHandleToBoundingSphere _hBoundingSphere,
MTH3D_tdstVector* _p_stCenterPoint,
MTH_tdxReal _xRadius
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vCreateAndInitBoundingSphere
(
GEO_tdxHandleToBoundingSphere *_p_hNewSphere,
MTH3D_tdstVector *_p_stCenter,
MTH_tdxReal _xRadius
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vInitBoundingVolumeMaterial
(
void
);
/*-------------------------------------------------------------------------------------- */
extern CPA_EXPORT void GEO_fn_vAddObjectToBox2
(
ACP_tdxHandleOfObject _hGeometricObject,
POS_tdstCompletePosition *_p_stGlobalMatrix,
MTH3D_tdstVector *_p_stMax,
MTH3D_tdstVector *_p_stMin
);
/* inline functions*/
/*--------------------------------------------------------------------------------------*/
/**/
/* Set Max (Min) point of the parallel box structure*/
/**/
/*--------------------------------------------------------------------------------------*/
INLINE
void GEO_fn_vSetMaxPointOfParallelBox( GEO_tdxHandleToParallelBox _hParallelBox, MTH3D_tdstVector* _p_stPoint)
{
#ifndef CODEWARRIOR
assert(_hParallelBox);
#endif
MTH3D_M_vCopyVector( &(_hParallelBox->stMaxPoint), _p_stPoint);
}
/*--------------------------------------------------------------------------------------*/
INLINE
void GEO_fn_vSetMinPointOfParallelBox(GEO_tdxHandleToParallelBox _hParallelBox,MTH3D_tdstVector* _p_stPoint)
{
#ifndef CODEWARRIOR
assert(_hParallelBox);
#endif
MTH3D_M_vCopyVector( & (_hParallelBox -> stMinPoint ), _p_stPoint );
}
/*--------------------------------------------------------------------------------------*/
/**/
/* Get Max (Min) point of the parallel box structure*/
/**/
/*--------------------------------------------------------------------------------------*/
INLINE
MTH3D_tdstVector * GEO_fn_pGetMaxPointOfParallelBox( GEO_tdxHandleToParallelBox _hParallelBox)
{
#ifndef CODEWARRIOR
assert(_hParallelBox);
#endif
return &(_hParallelBox->stMaxPoint);
}
/*--------------------------------------------------------------------------------------*/
INLINE
MTH3D_tdstVector * GEO_fn_pGetMinPointOfParallelBox( GEO_tdxHandleToParallelBox _hParallelBox)
{
#ifndef CODEWARRIOR
assert(_hParallelBox);
#endif
return &(_hParallelBox->stMinPoint);
}
/*--------------------------------------------------------------------------------------*/
/**/
/* Get the center of a bounding sphere*/
/**/
/*--------------------------------------------------------------------------------------*/
INLINE
MTH3D_tdstVector *GEO_fn_pGetCenterPointOfBoundingSphere( GEO_tdxHandleToBoundingSphere _hBoundingSphere)
{
#ifndef CODEWARRIOR
assert(_hBoundingSphere);
#endif
return &(_hBoundingSphere->stCenterPoint);
}
/*--------------------------------------------------------------------------------------*/
/**/
/* Get the radius of a bounding sphere*/
/**/
/*--------------------------------------------------------------------------------------*/
INLINE
MTH_tdxReal GEO_fn_xGetRadiusOfBoundingSphere(GEO_tdxHandleToBoundingSphere _hBoundingSphere)
{
#ifndef CODEWARRIOR
assert(_hBoundingSphere);
#endif
return(_hBoundingSphere->xRadius);
}
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __GEO_GEOBDVOL_H */

View File

@@ -0,0 +1,521 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Definition of geometric object structure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __GEO_GEOOBJ_H
#define __GEO_GEOOBJ_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
/*
* For Global declaration in C files :
*/
#ifdef GEO_GLOBALS
#define __GEO_EXTERN extern
#else /* !GEO_GLOBALS */
#define __GEO_EXTERN
#endif /* !GEO_GLOBALS */
/* struct POS_stCompletePosition;*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "ErrGEO.h"
#include "MmgGEO.h"
#include "color.h"
#include "fmd.h"
#include "element.h"
#include "GeoSprit.h"
#include "POS\PosPubSt.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Constants
=======================================================================================
*/
#define C_IndexedTrianglesObject 0xC0DE0001
#define C_lDuplicable 1
#define C_lMobile 2
#define C_lMorphable 4
#ifdef U64 /* Julien Merceron */
#define C_lMaxVertexPerObject 1000
#else
#ifdef PACKAGE10
#define C_lMaxVertexPerObject 1000
#else /* package 1.1 et sup<75>rieur */
#define C_lMaxVertexPerObject 2500
#endif
#endif
#define GEO_C_lDuplicateVertices 1
#define GEO_C_lDuplicateVerticesNormals 2
#define GEO_C_lDuplicateVerticesColors 4
#define GEO_C_lDuplicateColideInformation 8
#define GEO_C_lDuplicateAll 0xff
/*
* constant for no element parrallel boxes
*/
#define GEO_C_xNoParallelBox ((ACP_tdxIndex)-1)
/*
* Sprite types
*/
#define GEO_C_NotALookAt 0
#define GEO_C_LookAt 1
#define GEO_C_SemiLookAt 2
/*
=======================================================================================
Structures
=======================================================================================
*/
/*
* bounding volume : parrallel box and sphere
*/
typedef struct GEO_tdstParallelBox_
{
MTH3D_tdstVector stMinPoint;
MTH3D_tdstVector stMaxPoint;
} GEO_tdstParallelBox;
typedef GEO_tdstParallelBox *GEO_tdxHandleToParallelBox;
typedef struct GEO_tdstBoundingSphere_
{
MTH3D_tdstVector stCenterPoint;
MTH_tdxReal xRadius;
} GEO_tdstBoundingSphere;
typedef GEO_tdstBoundingSphere *GEO_tdxHandleToBoundingSphere;
/*
* Geometric object
*/
typedef struct GEO_tdstGeometricObject_
{
/*
* for vertices
*/
MTH3D_tdstVector *d_stListOfPoints;
MTH3D_tdstVector *d_stListOfPointsNormals;
GMT_tdxHandleToGameMaterial *d_hListOfPointsMaterial;
/*XB980825 (unused in N64)*/
#ifndef U64
GEO_tdstColor *d_stListOfPointsReceivedLightIntensity;
#endif /* U64 */
/*End XB*/
/*
* Elements
*/
ACP_tdxIndex *d_xListOfElementsTypes;
void **d_stListOfElements;
/*
* Octree
*/
struct COL_tdstOctree_ *p_stOctree;
/*
* EDGES
*/
#if !defined(PRESS_DEMO) /* swap members to make the engine unusable with the binarized data of another engine */
GEO_tdstDoubledIndex *d_stListOfEdges;
GMT_tdxHandleToGameMaterial *d_hListOfEdgesMaterial;
#else
GMT_tdxHandleToGameMaterial *d_hListOfEdgesMaterial;
GEO_tdstDoubledIndex *d_stListOfEdges;
#endif /* PRESS_DEMO */
/*
* Bounding volume (for element)
*/
GEO_tdstParallelBox *d_stListOfParallelBoxes;
/*
* type
*/
unsigned long ulType ;
#if defined(U64)
float fScale;
float fRadius;
unsigned short uwSymType;
unsigned short uwRliFlag;
#endif /* U64 */
ACP_tdxIndex xNbPoints;
ACP_tdxIndex xNbElements;
ACP_tdxIndex xNbEdges;
ACP_tdxIndex xNbParallelBoxes;
/*VLNEWGLI*/
/*
* object bounding sphere
*/
#if !defined(U64)
float xBoudingSphereRadius;
MTH3D_tdstVector xBoudingSphereCenter;
#endif
/*EVL*/
} GEO_tdstGeometricObject ;
/*
=======================================================================================
Functions
=======================================================================================
*/
extern CPA_EXPORT GEO_tdstGeometricObject *
GEO_xDuplicateVisualObject ( GEO_tdstGeometricObject *p_stObj );
extern CPA_EXPORT void
GEO_xDeleteObject ( GEO_tdstGeometricObject *p_stObj );
extern CPA_EXPORT void
GEO_xComputeNormalWeightedBySurf
( MTH3D_tdstVector *p_stPResult,
MTH3D_tdstVector *p_stPA,
MTH3D_tdstVector *p_stPB,
MTH3D_tdstVector *p_stPC ) ;
extern CPA_EXPORT void
GEO_xCreateObjectPointNormals ( GEO_tdstGeometricObject *p_stObj );
extern CPA_EXPORT void
GEO_xComputeObjectNormals ( GEO_tdstGeometricObject *p_stObj );
extern CPA_EXPORT void
GEO_xComputeObjectNormals2 ( GEO_tdstGeometricObject *p_stObj );
extern CPA_EXPORT void
GEO_xComputeObjectSphereBox ( GEO_tdstGeometricObject *p_stObj );
/* ********************************************************************************************/
/* NEW FUNCTIONS STARTS HERE*/
/* ********************************************************************************************/
extern CPA_EXPORT void
GEO_vCreateTMPGeometricObject ( ACP_tdxHandleOfObject *p_hObject ,
ACP_tdxIndex xNbPoints ,
ACP_tdxIndex xNbElements );
extern CPA_EXPORT void
GEO_vCreateGeometricObject ( ACP_tdxHandleOfObject *p_hObject ,
ACP_tdxIndex xNbPoints ,
ACP_tdxIndex xNbElements );
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetGeometricObjectNumberOfPoints ( ACP_tdxHandleOfObject hObject );
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetGeometricObjectNumberOfEdges ( ACP_tdxHandleOfObject hObject );
extern CPA_EXPORT void
GEO_vSetPointOfObject ( ACP_tdxHandleOfObject hObject ,
MTH3D_tdstVector *p_stPoint ,
ACP_tdxIndex xIndexOfPoint);
extern CPA_EXPORT void
GEO_vSetListOfPointsOfObject ( ACP_tdxHandleOfObject hObject ,
MTH3D_tdstVector *p_stPoint ,
ACP_tdxIndex xNbPoints ,
ACP_tdxIndex xIndexOfFirstPoint);
extern CPA_EXPORT void
GEO_vGetPointOfObject ( ACP_tdxHandleOfObject hObject ,
MTH3D_tdstVector *p_stPoint ,
ACP_tdxIndex xIndexOfPoint);
extern CPA_EXPORT void
GEO_vGetListOfPointsOfObject ( ACP_tdxHandleOfObject hObject ,
MTH3D_tdstVector *p_stPoint ,
ACP_tdxIndex xNbPoints ,
ACP_tdxIndex xIndexOfFirstPoint);
extern CPA_EXPORT void
GEO_vSetPointReceivedLightIntensityOfObject (
ACP_tdxHandleOfObject hObject ,
GEO_tdstColor *p_stColor ,
ACP_tdxIndex xIndexOfPoint);
extern CPA_EXPORT void
GEO_vGetPointReceivedLightIntensityOfObject (
ACP_tdxHandleOfObject hObject ,
GEO_tdstColor *p_xColor ,
ACP_tdxIndex xIndexOfPoint);
extern CPA_EXPORT void
GEO_vSetNormalOfPointOfObject (
ACP_tdxHandleOfObject hObject ,
MTH3D_tdstVector *p_stNormal ,
ACP_tdxIndex xIndexOfPoint);
extern CPA_EXPORT void
GEO_vGetNormalOfPointOfObject (
ACP_tdxHandleOfObject hObject ,
MTH3D_tdstVector *p_stNormal ,
ACP_tdxIndex xIndexOfPoint);
extern CPA_EXPORT void
GEO_xCreateObjectListOfEdges ( GEO_tdstGeometricObject *p_stObj );
extern CPA_EXPORT void
GEO_xComputeObjectListOfEdges ( GEO_tdstGeometricObject *p_stObj );
extern CPA_EXPORT long
GEO_lGetGeometricObjectNumberOfElements ( ACP_tdxHandleOfObject hObject );
extern CPA_EXPORT void
GEO_vResetGeometricObjectElements ( ACP_tdxHandleOfObject hObject ,
ACP_tdxHandleOfElement hElement );
extern CPA_EXPORT ACP_tdxHandleOfObject
GEO_xDuplicateGeometricObject( ACP_tdxHandleOfObject hObject ,
ACP_tdxIndex xNewNumberOfElement);
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetElementType
(
ACP_tdxHandleOfObject hObject ,
ACP_tdxIndex xElement
);
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetGeometricObjectNumberOfElements
(
ACP_tdxHandleOfObject hObject
);
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetGeometricObjectNumberOfElementsMax
(
ACP_tdxHandleOfObject hObject
);
extern CPA_EXPORT void
GEO_xDuplicateGeometricObjectCommonData ( ACP_tdxHandleOfObject hObject1 ,
ACP_tdxHandleOfObject hObject2 ,
long lWhatIsDuplicate );
extern CPA_EXPORT long
GEO_bDuplicateGeometricObjectElement ( ACP_tdxHandleOfObject hObject1 ,
ACP_tdxHandleOfObject hObject2 ,
ACP_tdxHandleOfElement hElement ,
ACP_tdxHandleOfElement *p_xElementCounter);
extern CPA_EXPORT long
GEO_bCopyingGeometricObjectElement
(
ACP_tdxHandleOfObject hObject1 ,
ACP_tdxHandleOfObject hObject2 ,
ACP_tdxIndex xElementNumberInFirstObject ,
ACP_tdxIndex *p_xNewElementNumberInSecondObject
);
extern CPA_EXPORT void
GEO_vCreateObjectListOfPointsMaterial
(
ACP_tdxHandleOfObject hObject
);
extern CPA_EXPORT void
GEO_vComputeObjectListOfPointsMaterial
(
ACP_tdxHandleOfObject hObject
);
extern CPA_EXPORT void
GEO_vEndModifyObject(ACP_tdxHandleOfObject hObject);
extern CPA_EXPORT void
GEO_vEndCreateObject(ACP_tdxHandleOfObject hObject);
extern CPA_EXPORT void
GEO_vEndModifyObject2(ACP_tdxHandleOfObject hObject);
extern CPA_EXPORT void
GEO_vEndModifyGoThroughObject(ACP_tdxHandleOfObject hObject);
extern CPA_EXPORT void
GEO_vEndModifyObjectWithoutComputingNormal (ACP_tdxHandleOfObject hObject);
extern CPA_EXPORT void
GEO_vGetNormalOfGeometricObjectElement
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xElementIndex,
ACP_tdxIndex xDataElementIndex,
MTH3D_tdstVector *p_stNormal
);
extern CPA_EXPORT ACP_tdxHandleOfMaterial
GEO_hGetMaterialOfGeometricObjectElement ( ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xElementIndex,
ACP_tdxIndex xDataElementIndex );
extern CPA_EXPORT GMT_tdxHandleToGameMaterial
GEO_fn_hGetGameMaterialOfGeometricObjectElement ( ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xElementIndex,
ACP_tdxIndex xDataElementIndex );
extern CPA_EXPORT ACP_tdxBool GEO_bEdgePartOfEdge ( ACP_tdxIndex xEdge1,
ACP_tdxIndex xEdge2,
ACP_tdxIndex xPoint1,
ACP_tdxIndex xPoint2 );
extern CPA_EXPORT void
GEO_vSetEdgeMaterial
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xPoint1,
ACP_tdxIndex xPoint2,
GMT_tdxHandleToGameMaterial hMaterial
);
extern CPA_EXPORT void
GEO_vComputeElementMaterial
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xElementIndex,
ACP_tdxIndex xDataElementIndex
);
extern CPA_EXPORT void
GEO_vDeleteGeometricObject ( ACP_tdxHandleOfObject *p_hObj );
/* fbolefeysot - 01/10/98*/
/* remove init values in GMT{*/
/*extern CPA_EXPORT void
GEO_vRecursiveReinitGamesMaterials ( ACP_tdxHandleOfObject *p_hObj );
*/
/*END fbolefeysot}*/
extern CPA_EXPORT ACP_tdxHandleOfObject GEO_fn_hTransformTableOfObjectInOneObjectForGAM(
ACP_tdxHandleOfObject _hGeoObj,
ACP_tdxHandleOfObject * a_hTableOfGeoObj,
ACP_tdxIndex xNbOfgEOoBJ);
extern CPA_EXPORT void GEO_fn_vClearObjectForGAM(ACP_tdxHandleOfObject _hGeoObj);
extern CPA_EXPORT void GEO_fn_vMoveFaceToFaceDescriptors( ACP_tdxHandleOfObject p_stObj, ACP_tdxIndex xElementIT, ACP_tdxIndex xFaceIT, ACP_tdxIndex *p_xElementFMD, ACP_tdxIndex *p_xFaceFMD);
extern CPA_EXPORT void GEO_fn_vMoveFaceDescriptorsToFace( ACP_tdxHandleOfObject p_stObj, ACP_tdxIndex xElementFMD, ACP_tdxIndex xFaceFMD, ACP_tdxIndex xElementIT, ACP_tdxIndex xFaceIT);
/*ANNECY CT 02/02/98{*/
extern CPA_EXPORT void GEO_vGetFaceSurfaceSpeed(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xElement,
ACP_tdxIndex xFace,
MTH3D_tdstVector * p_vSpeed);
/*ENDANNECY CT}*/
extern CPA_EXPORT void
GEO_vCreateObjectListOfParallelBox
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xNumberOfParallelBoxes
);
extern CPA_EXPORT void
GEO_vComputeObjectListOfParallelBox
(
ACP_tdxHandleOfObject hObject
);
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetGeometricObjectNumberOfParallelBox
(
ACP_tdxHandleOfObject hObject
);
extern CPA_EXPORT GEO_tdxHandleToParallelBox
GEO_hGetParallelBox
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xParallelBox
);
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxIndexOfElement
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xIndexOfElement
);
extern CPA_EXPORT void
GEO_vSetParallelBoxIndexOfElement
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xIndexOfElement,
ACP_tdxIndex xIndexOfParallelBox
);
/*JMD*/
extern CPA_EXPORT void GEO_vTurnLookAt ( GEO_tdstGeometricObject *p_stObj,
GLD_tdxHandleToViewportAttributes hVpt,
struct POS_stCompletePosition * p_stCurrentMatrix) ;
extern CPA_EXPORT ACP_tdxBool GEO_bIsLookAt (GEO_tdstGeometricObject *p_stObj) ;
/*JMD*/
/*
-----------------------------------------------------------------------------
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)
-----------------------------------------------------------------------------
*/
/* ANNECY MT 20/02/98 {*/
void
GEO_vComputeObjectParallelBox
(
ACP_tdxHandleOfObject hObject,
ACP_tdxIndex xParallelBox
);
/*ENDANNECY MT }*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __GEO_GEOOBJ_H */

View File

@@ -0,0 +1,272 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DESCRIPTION :
~~~~~~~~~~~
THIS IS AN EXAMPLE OF ACP HEADER FILES
For a given file <HeaderName>.h, all occurences of the string HEADERNAME
must be replaced with the string <HeaderName>.
For a given module, all occurences of the string MODULETAG must be replaced
with the CPA tag of the module (GLI, MTH ...) .
You must do :
#define MODULETAG_GLOBALS
in one (and only one) .c file of your Module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* To avoid unnecessary includes : */
#ifndef __GEO_GEOSPRIT_H
#define __GEO_GEOSPRIT_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
/* For Global declaration in C files : */
#ifdef GEO_GLOBALS
#define __GEO_EXTERN extern
#else /* !MODULETAG_GLOBALS */
#define __GEO_EXTERN
#endif /* !MODULETAG_GLOBALS */
struct GEO_tdstIndexedSprite_;
/*
-----------------------------------------------------------------------------
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)
-----------------------------------------------------------------------------
*/
#include "ErrGEO.h"
#include "MmgGEO.h"
#include "element.h"
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION:
Ex :
#define MODULETAG_C_LMAX 100
-----------------------------------------------------------------------------
*/
#define GEO_C_lSpriteDrawMode2DScaled 1
#define GEO_C_lSpriteDrawMode2DRotativ 2
#define GEO_C_lSpriteDrawDisable 4
/*ANNECY JMD {*/
#define GEO_C_lSpriteDrawModeSemiLookAt 8
#define GEO_C_lSpriteDrawModeLensFlare 16
/*END ANNECY JMD }*/
#ifndef D_THROW_COMPLEX_SPRITE
/*
-----------------------------------------------------------------------------
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 ;
-----------------------------------------------------------------------------
*/
typedef struct GEO_tdstSprite_
{
ACP_tdxIndex xNbSprites;
short *d_xSpriteDrawMode;
MTH_tdxReal *d_xThresholds;
MTH2D_tdstVector *d_xSizeOfSprite;
MTH2D_tdstVector *d_xDisplacementOfSprite;
GMT_tdxHandleToGameMaterial *d_hMaterial;
} GEO_tdstSprite ;
/*
-----------------------------------------------------------------------------
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
-----------------------------------------------------------------------------
*/
/**********************************************************************************************/
/* Name: GEO_xCreateSprite */
/* Goal: create a sprite =:-)*/
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vCreateRotativSprite ( ACP_tdxHandleOfSprite *p_hSprite , ACP_tdxIndex xNbAngles);
/**********************************************************************************************/
/* Name: GEO_lGetSpriteNbAngles */
/* Goal: create a sprite =:-)*/
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT long
GEO_lGetSpriteNbAngles ( ACP_tdxHandleOfSprite hSprite );
/**********************************************************************************************/
/* Name: GEO_xSetMaterialOfSprite */
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vSetMaterialOfSprite ( ACP_tdxHandleOfSprite hSprite ,
ACP_tdxHandleOfMaterial hMaterial ,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xGetMaterialOfSprite */
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vGetMaterialOfSprite ( ACP_tdxHandleOfSprite hSprite ,
ACP_tdxHandleOfMaterial *p_hMaterial ,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xSetGameMaterialOfSprite */
/* Goal: */
/* Code: Alain Robin / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vSetGameMaterialOfSprite ( ACP_tdxHandleOfSprite hSprite ,
GMT_tdxHandleToGameMaterial hMaterial ,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xGetGameMaterialOfSprite */
/* Goal: */
/* Code: Alain Robin / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vGetGameMaterialOfSprite ( ACP_tdxHandleOfSprite hSprite ,
GMT_tdxHandleToGameMaterial *p_hMaterial ,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xSetThresholdOfSprite */
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vSetThresholdOfSprite ( ACP_tdxHandleOfSprite hSprite ,
MTH_tdxReal xThresholds,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xGetThresholdOfSprite*/
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vGetThresholdOfSprite ( ACP_tdxHandleOfSprite hSprite ,
MTH_tdxReal *p_xThresholds,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xDrawIndexedSprite*/
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vDrawIndexedSprite ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
struct GEO_tdstGeometricObject_ *p_stObj ,
struct GEO_tdstIndexedSprite_ *p_stISpr );
/**********************************************************************************************/
/* Name: GEO_xGetModeOfSprite */
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vGetModeOfSprite ( ACP_tdxHandleOfSprite hSprite ,
short *p_sMode,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xSetModeOfSprite */
/* Goal: See "ACP_sprites.doc"*/
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vSetModeOfSprite ( ACP_tdxHandleOfSprite hSprite ,
short sMode,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xGetModeOfSprite */
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vGetSizeOfSprite ( ACP_tdxHandleOfSprite hSprite ,
MTH2D_tdstVector *p_stSize,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xSetModeOfSprite */
/* Goal: See "ACP_sprites.doc"*/
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vSetSizeOfSprite ( ACP_tdxHandleOfSprite hSprite ,
MTH2D_tdstVector *p_stSize,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xGetDisplacementOfSprite */
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vGetDisplacementOfSprite ( ACP_tdxHandleOfSprite hSprite ,
MTH2D_tdstVector *p_stDis,
ACP_tdxIndex xSpriteNumber);
/**********************************************************************************************/
/* Name: GEO_xGetDisplacementOfSprite */
/* Goal: See "ACP_sprites.doc"*/
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GEO_vSetDisplacementOfSprite ( ACP_tdxHandleOfSprite hSprite ,
MTH2D_tdstVector *p_stDis,
ACP_tdxIndex xSpriteNumber);
/*
-----------------------------------------------------------------------------
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)
-----------------------------------------------------------------------------
*/
#endif /* D_THROW_COMPLEX_SPRITE */
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __HEADERNAME_H */

View File

@@ -0,0 +1,146 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DESCRIPTION :
~~~~~~~~~~~
THIS IS AN EXAMPLE OF ACP HEADER FILES
For a given file <HeaderName>.h, all occurences of the string HEADERNAME
must be replaced with the string <HeaderName>.
For a given module, all occurences of the string MODULETAG must be replaced
with the CPA tag of the module (GLI, MTH ...) .
You must do :
#define MODULETAG_GLOBALS
in one (and only one) .c file of your Module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* To avoid unnecessary includes : */
#ifndef __GEO_GEOMEM_H
#define __GEO_GEOMEM_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
/* For Global declaration in C files : */
#ifdef GEO_GLOBALS
#define __GEO_EXTERN extern
#else /* !MODULETAG_GLOBALS */
#define __GEO_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)
-----------------------------------------------------------------------------
*/
#include "ErrGEO.h"
#include "MmgGEO.h"
/*
-----------------------------------------------------------------------------
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
-----------------------------------------------------------------------------
*/
extern CPA_EXPORT void
GEO_PrintUsedStaticMemory();
extern CPA_EXPORT void
GEO_xInitGEOError();
extern CPA_EXPORT void
GEO_xCreateMemoryChannel(unsigned char ucChannel,unsigned long ulSize);
extern CPA_EXPORT void
GEO_xSelectMemoryChannel(unsigned char ucChannel);
extern CPA_EXPORT void
GEO_xDeleteMemoryChannel(unsigned char ucChannel);
extern CPA_EXPORT void
GEO_xDeleteMemoryAll();
extern CPA_EXPORT void
GEO_xEvalMemorySize(unsigned char ucChannel);
extern CPA_EXPORT void
GEO_fn_vMemoryLogFile(void *p_vPointer,unsigned char ucAction,char *szFile,unsigned long ulLine,unsigned long ulSize);
extern CPA_EXPORT void
GEO_fn_vPrintMemoryInformation(void);
extern CPA_EXPORT unsigned char
GEO_fn_ucGetBlocNumberOf(void *p_vPointer);
/*
-----------------------------------------------------------------------------
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,43 @@
/* (c) Ubi R&D 1997*/
/* See Alain Robin for any comment or question*/
#ifndef __LOADBIN_H__
#define __LOADBIN_H__
#ifdef __cplusplus
extern "C" {
#endif
/* 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
/*----------------------------------------------------------------------------
// Description : GEO_fn_p_stLoadIndexedTriangle
// Loads an indexed triangle with script or a binary file
------------------------------------------------------------------------------
// Input : _szSectionName
// Output : The pointer to the indexed triangle
----------------------------------------------------------------------------*/
extern CPA_EXPORT GEO_tdstElementIndexedTriangles* GEO_fn_p_stLoadIndexedTriangle(char* _szSectionName);
/*----------------------------------------------------------------------------
// Description : GEO_fn_hLoadGeometricObject
// Load a geometric object from an ascii script or from a binary script
------------------------------------------------------------------------------
// Input : _szSectionName : Name of the section to load
// Output : Handle to the geometric element loaded
----------------------------------------------------------------------------*/
extern CPA_EXPORT ACP_tdxHandleOfObject GEO_fn_hLoadGeometricObject(char* _szSectionName, unsigned short _uwScriptMode);
#ifdef __cplusplus
}/* extern "C" */
#endif
#endif

View File

@@ -0,0 +1,222 @@
/*****************************************
// //
// Management of the Module : GEO //
// //
// File Name : MmgGEO.h //
// Date : 03/02/97 //
// Author : Philippe Vimont //
// //
*****************************************/
#ifndef __GEO_MMGGEO_H__
#define __GEO_MMGGEO_H__
/*#include <malloc.h>*/
#ifdef __cplusplus
extern "C" {
#endif
#include "ERM.h"
#include "MMG.h"
#include "errgeo.h"
#include "TMP.h"
#ifdef U64
#include "GLD/Specif/DisplMsg.h"
#include "ZeMem.h"
#endif
/* 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
typedef enum e_ucGEOStaticBlocks_{
E_ucGEOBlock1,
E_ucGEOBlock2,
E_ucGEOBlock3,
E_ucGEOBlock4,
//XB 16/06/99
E_ucGEOBlock5,
//End XB 16/06/99
E_ucGEOMaxBlocksNb /* maximum number of static block, You have to follow this syntax 'E_uc+ Abbreviation Module +MaxBlocksNb' */
} e_ucGEOStaticBlocks;
#undef __MMGGEO_EXTERN
#ifndef __DeclareGlobalVariableMmgGEO_h__
#define __MMGGEO_EXTERN extern /*external declaration*/
#else /*__DeclareGlobalVariableErrGEO_h__*/
#define __MMGGEO_EXTERN /*replace by nothing : we have to declare*/
#endif /*__DeclareGlobalVariableErrGEO_h__*/
__MMGGEO_EXTERN CPA_EXPORT unsigned char g_ucGEOMMemMallocMode /*number of identification of the Erm module*/
#if defined(__DeclareGlobalVariableMmgGEO_h__) && !defined(CPA_WANTS_IMPORT)
= E_ucDynamic
#endif /*__DeclareGlobalVariableErrGEO_h__&& CPA_WANTS_IMPORT*/
;
__MMGGEO_EXTERN CPA_EXPORT unsigned char GEO_g_bDynamicAllocation;
#ifndef _FIRE_DEADCODE_U64_ /* Added by RUC */
__MMGGEO_EXTERN CPA_EXPORT struct tdstBlockInfo_ GEO_g_stMyBlockInfo;
#endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC */
#ifndef _FIRE_DEADCODE_U64_ /* Added by RUC */
__MMGGEO_EXTERN CPA_EXPORT struct tdstBlockInfo_ g_a_stGEOBlocksInfo[E_ucGEOMaxBlocksNb];
#endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC */
#ifdef __DYNAMIC_MALLOC_ALLOWED__
#ifdef __DEBUG_MALLOC_MODE__
__MMGGEO_EXTERN CPA_EXPORT struct tdstDynInfo_ g_stGEODynInfo;
#endif /*__DEBUG_MALLOC_MODE__*/
#endif /*__DYNAMIC_MALLOC_ALLOWED__*/
#define GEO_C_ActionMalloc 0
#define GEO_C_ActionRealloc 1
#define GEO_C_ActionFree 2
#define GEO_C_CanNotUseDynamic 0
#define GEO_C_CanUseDynamic 1
#define GEO_C_UseDynamic 2
#define M_GEOInitMem() Mmg_M_SetModeAlloc4Ch( GEO , g_ucGEOMMemMallocMode ,C_ucMmgDefaultChannel)
/* XB
#define GEO_M_CPAMallocAlign8( Var, cast, ulSize, error) \
{\
if ( (ulSize)!=0 )\
{\
Mmg_M_SetModeAlloc4Ch( GEO , g_ucGEOMMemMallocMode+2,C_ucMmgDefaultChannel); \
(Var) = (cast)Mmg_fn_p_vAlloc4Ch(ulSize,C_ucMmgDefaultChannel);\
memset(Var,0,ulSize);\
}\
}
*/
#if !defined(U64)
#define GEO_M_CPAMalloc( Var, cast, ulSize, error) \
{\
if ( (ulSize)!=0 )\
{\
if (GEO_g_bDynamicAllocation!=GEO_C_UseDynamic)\
{\
M_GEOInitMem();\
(Var) = (cast)Mmg_fn_p_vAlloc4Ch(ulSize,C_ucMmgDefaultChannel);\
}\
if (GEO_g_bDynamicAllocation==GEO_C_UseDynamic||(GEO_g_bDynamicAllocation==GEO_C_CanUseDynamic&&(Var)==NULL))\
{\
Erm_M_ClearLastError ( C_ucErmDefaultChannel );\
if (GEO_g_bDynamicAllocation==GEO_C_CanUseDynamic)\
{\
Erm_M_UpdateLastError( GEO, C_ucErmDefaultChannel,E_uwGEODebugDynamicAllocation, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
Erm_M_ClearLastError ( C_ucErmDefaultChannel );\
GEO_g_bDynamicAllocation=GEO_C_UseDynamic;\
}\
Mmg_M_SetModeAlloc4Ch( GEO , E_ucDynamic , C_ucMmgDefaultChannel);\
(Var) = (cast)Mmg_fn_p_vAlloc4Ch(ulSize,C_ucMmgDefaultChannel);\
}\
if ((Var) == NULL)\
{\
Erm_M_ClearLastError ( C_ucErmDefaultChannel );\
Erm_M_UpdateLastError( GEO, C_ucErmDefaultChannel, (error), C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
}\
memset((Var),0,ulSize);\
GEO_fn_vMemoryLogFile((Var),GEO_C_ActionMalloc,__FILE__,__LINE__,ulSize); \
}\
}
#define GEO_M_CPARealloc( Var, OldVar, cast, ulSize, error) \
{\
if ( (ulSize)!=0 )\
{\
M_GEOInitMem();\
(Var) = (cast)Mmg_fn_p_vRealloc4Ch(OldVar,ulSize,C_ucMmgDefaultChannel);\
if (GEO_g_bDynamicAllocation==GEO_C_UseDynamic||(GEO_g_bDynamicAllocation==GEO_C_CanUseDynamic&&(Var)==NULL))\
{\
Erm_M_ClearLastError ( C_ucErmDefaultChannel );\
if (GEO_g_bDynamicAllocation==GEO_C_CanUseDynamic)\
{\
Erm_M_UpdateLastError( GEO, C_ucErmDefaultChannel,E_uwGEODebugDynamicAllocation, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
Erm_M_ClearLastError ( C_ucErmDefaultChannel );\
GEO_g_bDynamicAllocation=GEO_C_UseDynamic;\
}\
GEO_M_CPAMalloc( (Var), cast, (ulSize), (error));\
memcpy((Var),(OldVar),(ulSize));\
GEO_M_CPAFree((OldVar));\
}\
if ((Var)==NULL)\
{\
Erm_M_ClearLastError ( C_ucErmDefaultChannel );\
Erm_M_UpdateLastError( GEO, C_ucErmDefaultChannel, (error), C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL );\
}\
GEO_fn_vMemoryLogFile((Var),GEO_C_ActionRealloc,__FILE__,__LINE__,ulSize); \
}\
}
#define GEO_M_CPAFree( Var ) \
{\
M_GEOInitMem();\
GEO_fn_vMemoryLogFile((Var),GEO_C_ActionFree,__FILE__,__LINE__,0); \
if (GEO_g_bDynamicAllocation!=GEO_C_CanNotUseDynamic)\
{\
Mmg_fn_vGiveInformationBlock(Erm_M_ucGiveModuleId(GEO),(unsigned char)g_ucGEOMMemMallocMode,&GEO_g_stMyBlockInfo);\
if ((void*)(Var)<(void*)GEO_g_stMyBlockInfo.p_cBeginBlock||(void*)(Var)>(void*)GEO_g_stMyBlockInfo.p_cEndBlock)\
Mmg_M_SetModeAlloc4Ch(GEO,E_ucDynamic,C_ucMmgDefaultChannel);\
}\
Mmg_fn_vFree4Ch((void*)(Var),C_ucMmgDefaultChannel);\
if ( Erm_M_uwCheckError(Mmg, C_ucErmDefaultChannel) )\
{\
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
Erm_M_UpdateLastError(GEO, C_ucErmDefaultChannel, E_uwGEOCanNotFree , C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
}\
(Var) = NULL;\
}
#else /* U64 */
/* XB 22/06/99 */
void *GEO_fn_pvMalloc(unsigned long _ulSize);
#define GEO_M_CPAMalloc( Var, cast, ulSize, error) Var=(cast)GEO_fn_pvMalloc(ulSize);
void *GEO_fn_pvMallocAlign8(unsigned long _ulSize);
#define GEO_M_CPAMallocAlign8( Var, cast, ulSize, error) Var=(cast)GEO_fn_pvMallocAlign8(ulSize);
void *GEO_fn_pvMallocLDD(unsigned long _ulSize);
#define GEO_M_CPAMallocLDD( Var, cast, ulSize, error) Var=(cast)GEO_fn_pvMallocLDD(ulSize);
/* End XB 22/06/99 */
#endif /* U64 */
#define GEO_M_ucGetMemMallocMode() (g_ucGEOMMemMallocMode)
/*#define GEO_M_CPAMalloc( Var, cast, ulSize, error) \
Var = (cast)malloc(ulSize);
#define GEO_M_CPARealloc( Var, OldVar, cast, ulSize, error) \
Var = (cast)realloc(ulSize);\
memset(Var,0,ulSize);
#define GEO_M_CPAFree( Var ) \
free ((void*)var);\*/
/* ANNECY - MT 11/05/98 {*/
#define GEO_M_TMPMalloc(Var,cast,Size) (Var) = (cast) TMP_M_p_Malloc( Size )
#define GEO_M_TMPFree(Var) TMP_M_Free( Var )
/* END ANNECY MT }*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __MMGGEO_H__*/

View File

@@ -0,0 +1,126 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DESCRIPTION :
~~~~~~~~~~~
THIS IS AN EXAMPLE OF ACP HEADER FILES
For a given file <HeaderName>.h, all occurences of the string HEADERNAME
must be replaced with the string <HeaderName>.
For a given module, all occurences of the string MODULETAG must be replaced
with the CPA tag of the module (GLI, MTH ...) .
You must do :
#define MODULETAG_GLOBALS
in one (and only one) .c file of your Module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* To avoid unnecessary includes : */
#ifndef __GEO_COLOR_H
#define __GEO_COLOR_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
/* For Global declaration in C files : */
#ifdef GEO_GLOBALS
#define __GEO_EXTERN extern
#else /* !GEO_GLOBALS */
#define __GEO_EXTERN
#endif /* !GEO_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
-----------------------------------------------------------------------------
*/
#define GLI_tdstColor GEO_tdstColor
/*
-----------------------------------------------------------------------------
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 ;
-----------------------------------------------------------------------------
*/
typedef float GEO_tdxColorValue ;
typedef struct GEO_tdstColor_
{
GEO_tdxColorValue xR ;
GEO_tdxColorValue xG ;
GEO_tdxColorValue xB ;
GEO_tdxColorValue xA ;
}
GEO_tdstColor ;
/*
-----------------------------------------------------------------------------
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
-----------------------------------------------------------------------------
*/
/*
-----------------------------------------------------------------------------
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 /* __GEO_COLOR_H */