273 lines
10 KiB
C
273 lines
10 KiB
C
/*
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
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 */
|
|
|