Add rayman2 source files
This commit is contained in:
136
Rayman_X/cpa/public/TDE/ErrTde.h
Normal file
136
Rayman_X/cpa/public/TDE/ErrTde.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
/**/
|
||||
/* Management of the Module : Tde*/
|
||||
/**/
|
||||
/* File Name : ErrTde.h*/
|
||||
/* Date : 03/10/96*/
|
||||
/* Author : Yan Marchal*/
|
||||
/**/
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
/**/
|
||||
/* abbreviation of the module-name. Used in macro is 'Tde'*/
|
||||
/**/
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
|
||||
#ifndef __ERRTDE_H__
|
||||
#define __ERRTDE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define C_szTdeVersion "TDE V5.0.0" /* The format is XXX Va.b.c with Xxx is the Tag of the module */
|
||||
#define C_szTdeFullName "2D Engine"/* the complete and clear name of the module */
|
||||
#define C_szTdeDate __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_TDE__
|
||||
#define __WARNING1_ERR_TDE__
|
||||
#define __WARNING2_ERR_TDE__
|
||||
#define __WARNING3_ERR_TDE__
|
||||
/*----------*/
|
||||
/* Constant */
|
||||
/*----------*/
|
||||
/* error of the Tde Module*/
|
||||
typedef enum e_uwTdeErrNumber_{
|
||||
E_uwTdeFatalErr,
|
||||
#ifdef __FATAL_ERR_TDE__
|
||||
/* -----------------*/
|
||||
E_uwTdeFatalError1,
|
||||
#endif /*__FATAL_ERR_TDE__*/
|
||||
E_uwTdeStartOfWarning,/* important constant, it allows to recognize if an error is fatal or not.*/
|
||||
#ifdef __WARNING1_ERR_TDE__
|
||||
/* -------------------*/
|
||||
E_uwTdeWarningNotEnoughMemory,
|
||||
E_uwTdeWarningCantReadFile,
|
||||
E_uwTdeWarningCantOpenFileForReading,
|
||||
E_uwTdeWarningCanNotFree,
|
||||
E_uwTdeWarningPriorityTooHigh,
|
||||
E_uwTdeWarningMatrixStackOverflow,
|
||||
#endif /*__WARNING1_ERR_TDE__*/
|
||||
#ifdef __WARNING2_ERR_TDE__
|
||||
/* -------------------*/
|
||||
#endif /*__WARNING2_ERR_TDE__*/
|
||||
#ifdef __WARNING3_ERR_TDE__
|
||||
/* -------------------*/
|
||||
#endif /*__WARNING3_ERR_TDE__*/
|
||||
E_uwTdeErrNumber
|
||||
} e_uwTdeErrNumber;
|
||||
|
||||
/*------------------*/
|
||||
/* Global Variables*/
|
||||
/*------------------*/
|
||||
#undef __ERRTDE_EXTERN
|
||||
#ifndef __DeclareGlobalVariableErrTde_h__
|
||||
#define __ERRTDE_EXTERN extern /*external declaration*/
|
||||
#else /*__DeclareGlobalVariableErrTde_h__*/
|
||||
#define __ERRTDE_EXTERN /*replace by nothing : we have to declare*/
|
||||
#endif /*__DeclareGlobalVariableErrTde_h__*/
|
||||
|
||||
__ERRTDE_EXTERN CPA_EXPORT unsigned char g_ucTdeModuleId /*number of identification of the Erm module*/
|
||||
#if defined(__DeclareGlobalVariableErrTde_h__) && !defined(CPA_WANTS_IMPORT)
|
||||
= C_ucModuleNotInitialized
|
||||
#endif /*__DeclareGlobalVariableErrTde_h__&& CPA_WANTS_IMPORT*/
|
||||
;
|
||||
|
||||
#ifdef __ERROR_STRINGS__
|
||||
|
||||
__ERRTDE_EXTERN CPA_EXPORT char * g_a_szTdeInformationModule []
|
||||
#if defined(__DeclareGlobalVariableErrTde_h__) && !defined(CPA_WANTS_IMPORT)
|
||||
= {C_szTdeVersion, C_szTdeFullName, C_szTdeDate}
|
||||
#endif /*__DeclareGlobalVariableErrTde_h__ && CPA_WANTS_IMPORT*/
|
||||
;
|
||||
|
||||
__ERRTDE_EXTERN CPA_EXPORT char * g_szTdeModuleName /* Mandatory syntax 'g_sz'+[Abbreviation of ModuleName]+'ModuleName'*/
|
||||
#if defined(__DeclareGlobalVariableErrTde_h__) && !defined(CPA_WANTS_IMPORT)
|
||||
= "Module Tde"
|
||||
#endif /*__DeclareGlobalVariableErrTde_h__ && CPA_WANTS_IMPORT*/
|
||||
;
|
||||
|
||||
__ERRTDE_EXTERN CPA_EXPORT struct tdstErrorMsg_ g_a_stTdeTabErr [] /* Mandatory syntax 'g_a_st'+[Abbreviation of ModuleName]+'TabErr'*/
|
||||
#if defined(__DeclareGlobalVariableErrTde_h__) && !defined(CPA_WANTS_IMPORT)
|
||||
={
|
||||
#ifdef __FATAL_ERR_TDE__
|
||||
/* -------------*/
|
||||
E_uwTdeFatalError1, "Fatal Error 1 ",
|
||||
#endif /*__FATAL_ERR_TDE__*/
|
||||
#ifdef __WARNING1_ERR_TDE__
|
||||
/* ----------------*/
|
||||
E_uwTdeWarningCanNotFree, "Unable to free a block of allocated memory",
|
||||
E_uwTdeWarningNotEnoughMemory, "Not enough memory",
|
||||
E_uwTdeWarningCantReadFile, "Can't read file (this is probably not the good file format)",
|
||||
E_uwTdeWarningCantOpenFileForReading, "Can't open file for reading (the file probably does not exist)",
|
||||
E_uwTdeWarningPriorityTooHigh, "The Z-priority of a super-object is too high",
|
||||
E_uwTdeWarningMatrixStackOverflow, "Matrix stack overflow : too many levels in the hierarchy",
|
||||
#endif /*__WARNING1_ERR_TDE__*/
|
||||
#ifdef __WARNING2_ERR_TDE__
|
||||
/* ----------------*/
|
||||
#endif /*__WARNING2_ERR_TDE__*/
|
||||
#ifdef __WARNING3_ERR_TDE__
|
||||
/* ----------------*/
|
||||
#endif /*__WARNING3_ERR_TDE__*/
|
||||
0xFFFF, "\0"/*fin*/
|
||||
};
|
||||
#endif /*__DeclareGlobalVariableErrTde_h__ && CPA_WANTS_IMPORT*/
|
||||
;
|
||||
|
||||
#endif /*__ERROR_STRINGS__*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /*__ERRTDE_H__*/
|
||||
|
6
Rayman_X/cpa/public/TDE/Link.txt
Normal file
6
Rayman_X/cpa/public/TDE/Link.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
LIST OF MODULES YOU NEED :
|
||||
ERM
|
||||
MMG
|
||||
GLD
|
||||
|
||||
LIST OF MODULES WHO USE YOUR MODULE :
|
68
Rayman_X/cpa/public/TDE/MacroTde.h
Normal file
68
Rayman_X/cpa/public/TDE/MacroTde.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*////////////////////*/
|
||||
/* macro for Memory //*/
|
||||
/*////////////////////*/
|
||||
|
||||
#ifndef __TdeMACROS_H__
|
||||
|
||||
#define M_TdeInitMem() Mmg_M_SetModeAlloc4Ch(Tde, E_ucDynamic,C_ucMmgDefaultChannel)
|
||||
|
||||
#define M_TdeAlloc(Var, cast, ulSize)\
|
||||
{\
|
||||
M_TdeInitMem();\
|
||||
Var = (cast) Mmg_fn_p_vAlloc4Ch(ulSize,C_ucMmgDefaultChannel);\
|
||||
if (Erm_M_uwCheckError(Mmg, C_ucErmDefaultChannel)){\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(Tde, C_ucErmDefaultChannel, E_uwTdeWarningNotEnoughMemory, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define M_TdeAllocWithoutInitMem(Var, cast, ulSize)\
|
||||
{\
|
||||
Var = (cast) Mmg_fn_p_vAlloc4Ch(ulSize,C_ucMmgDefaultChannel);\
|
||||
if (Erm_M_uwCheckError(Mmg, C_ucErmDefaultChannel)){\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(Tde, C_ucErmDefaultChannel, E_uwTdeWarningNotEnoughMemory, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define M_TdeRealloc(Var, AdrSrc, cast, ulSize)\
|
||||
{\
|
||||
M_TdeInitMem();\
|
||||
Var = (cast) Mmg_fn_p_vRealloc4Ch(AdrSrc, ulSize,C_ucMmgDefaultChannel);\
|
||||
if (Erm_M_uwCheckError(Mmg, C_ucErmDefaultChannel)){\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(Tde, C_ucErmDefaultChannel, E_uwTdeWarningNotEnoughMemory, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define M_TdeReallocWithoutInitMem(Var, AdrSrc, cast, ulSize)\
|
||||
{\
|
||||
Var = (cast) Mmg_fn_p_vRealloc4Ch(AdrSrc, ulSize,C_ucMmgDefaultChannel);\
|
||||
if (Erm_M_uwCheckError(Mmg, C_ucErmDefaultChannel)){\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(Tde, C_ucErmDefaultChannel, E_uwTdeWarningNotEnoughMemory, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
|
||||
}\
|
||||
}
|
||||
|
||||
|
||||
#define M_TdeFree(p_cAdr) \
|
||||
{\
|
||||
M_TdeInitMem();\
|
||||
Mmg_fn_vFree4Ch(p_cAdr,C_ucMmgDefaultChannel);\
|
||||
if (Erm_M_uwCheckError(Mmg, C_ucErmDefaultChannel)){\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(Tde, C_ucErmDefaultChannel, E_uwTdeWarningCanNotFree, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define M_TdeFreeWithoutInitMem(p_cAdr) \
|
||||
{\
|
||||
Mmg_fn_vFree4Ch(p_cAdr,C_ucMmgDefaultChannel);\
|
||||
if (Erm_M_uwCheckError(Mmg, C_ucErmDefaultChannel)){\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(Tde, C_ucErmDefaultChannel, E_uwTdeWarningCanNotFree, C_lErmNoDebugData, C_ucErmOpenInfoWindow, C_ucAllowStopForDebug, NULL);\
|
||||
}\
|
||||
}
|
||||
|
||||
#endif /* __TdeMACROS_H__*/
|
||||
|
58
Rayman_X/cpa/public/TDE/MmgTde.h
Normal file
58
Rayman_X/cpa/public/TDE/MmgTde.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
/**/
|
||||
/* Memory Management of the Module : Tde*/
|
||||
/**/
|
||||
/* File Name : MmgTde.h*/
|
||||
/* Date : 703/10/96*/
|
||||
/* Author : Yan Marchal*/
|
||||
/**/
|
||||
/*///////////////////////////////////////////////////////////*/
|
||||
#ifndef __MmgTde_H__
|
||||
#define __MmgTde_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
|
||||
|
||||
|
||||
#include "MMG.h"
|
||||
|
||||
typedef enum e_ucTdeStaticBlocks_{
|
||||
E_ucTdeBlock1,
|
||||
/* E_ucTdeBlock2,*/
|
||||
/* E_ucTdeBlock3, */
|
||||
/* E_ucTdeBlock4, */
|
||||
E_ucTdeMaxBlocksNb /* maximum number of static block, You have to follow this syntax 'E_uc+ Abbreviation Module +MaxBlocksNb'*/
|
||||
} e_ucTdeStaticBlocks;
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __DeclareGlobalVariableMmgTde_h__
|
||||
#define EXTERN /*nothing*/
|
||||
#else /* no __DeclareGlobalVariableMmgTde_h__*/
|
||||
#define EXTERN extern
|
||||
#endif /*__DeclareGlobalVariableMmgTde_h__*/
|
||||
|
||||
EXTERN CPA_EXPORT struct tdstBlockInfo_ g_a_stTdeBlocksInfo[E_ucTdeMaxBlocksNb];
|
||||
|
||||
#ifdef __DYNAMIC_MALLOC_ALLOWED__
|
||||
#ifdef __DEBUG_MALLOC_MODE__
|
||||
EXTERN CPA_EXPORT struct tdstDynInfo_ g_stTdeDynInfo;
|
||||
#endif /*__DEBUG_MALLOC_MODE__*/
|
||||
#endif /*__DYNAMIC_MALLOC_ALLOWED__*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /*__MmgTde_H__*/
|
23
Rayman_X/cpa/public/TDE/New.txt
Normal file
23
Rayman_X/cpa/public/TDE/New.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
TDE V5.0.0
|
||||
Full name : Two dimension engine
|
||||
|
||||
WHAT'S NEW :
|
||||
|
||||
--- 97MMJJ HHhMM ------------------------
|
||||
Module & Version : TDE VX.X.X
|
||||
User : Frederic Philippe
|
||||
Description :
|
||||
XXXX
|
||||
|
||||
--- 970717 16h30 ------------------------
|
||||
Module & Version : TDE V5.0.1
|
||||
User : Frederic PHILIPPE
|
||||
Description :
|
||||
Add some extern functions
|
||||
Invert the GLD use flag
|
||||
|
||||
--- 970717 16h30 ------------------------
|
||||
Module & Version : TDE V5.0.0
|
||||
User : Frederic PHILIPPE
|
||||
Description :
|
||||
Creation of the module
|
109
Rayman_X/cpa/public/TDE/tde_Hierarchy.h
Normal file
109
Rayman_X/cpa/public/TDE/tde_Hierarchy.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/**************************************************************************************
|
||||
|
||||
File : HIERARCHY.H
|
||||
Author : Delattre Franck & Val<61>rie Cluzel
|
||||
Last update : 27 August 1996
|
||||
|
||||
***************************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_HIERARCHY_H
|
||||
#define __TDE_HIERARCHY_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)*/
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;*/
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
extern void TDE_vInitZList();
|
||||
|
||||
extern void TDE_vTransformSprite(TDE_tdsSuperObject *p_stSuperObject);
|
||||
|
||||
extern void TDE_vDrawSuperObject(TDE_tdsSuperObject *p_stSuperObject);
|
||||
|
||||
extern void TDE_vBuildHierarchy(TDE_tdsSuperObject *p_stSuperObject, TDE_p_stSuperObject *ZList);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_HIERARCHY_H */
|
108
Rayman_X/cpa/public/TDE/tde_Lines.h
Normal file
108
Rayman_X/cpa/public/TDE/tde_Lines.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_LINES_H
|
||||
#define __TDE_LINES_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
extern void TDE_vDrawSuperObjectLine16(GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsSuperObject *p_stSuperObject);
|
||||
|
||||
extern void TDE_vDrawSuperObjectClippedLine16(GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsSuperObject *p_stSuperObject);
|
||||
|
||||
extern void TDE_vDrawLine16(GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
long lFirstPointX, long lFirstPointY,
|
||||
long lSecondPointX, long lSecondPointY, long lColor);
|
||||
|
||||
extern void TDE_vCalculateIntermediatePoint(TDE_tdsVertex *Result_Point, TDE_tdsVertex *Point1, TDE_tdsVertex *Point2, TDE_tdxValue lValue1, TDE_tdxValue lValue2, TDE_tdxValue lInterValue);
|
||||
|
||||
extern void TDE_vDrawSuperObjectLineAbs(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_tdsSuperObject *p_stSuperObject);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_LINES_H */
|
||||
|
||||
|
||||
|
73
Rayman_X/cpa/public/TDE/tde_def.h
Normal file
73
Rayman_X/cpa/public/TDE/tde_def.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/****************************************************************************
|
||||
|
||||
TDE_DEF.H : Macro definitions for quantities
|
||||
Yan Marchal, 97/03/14
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_DEF_H
|
||||
#define __TDE_DEF_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
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANTS DECLARATION :
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define C_TDEDEC 1
|
||||
|
||||
#define TDE_M_PI ( 3.1415927 )
|
||||
#define TDE_M_2PI ( 6.2831854 )
|
||||
#define TDE_M_PIO2 ( 1.5707963 )
|
||||
#define TDE_M_PIO4 ( 0.7853982 )
|
||||
|
||||
/* The depth of the matrix stack, which also is the maximal number of*/
|
||||
/* levels in the hierarchy :*/
|
||||
#define TDE_kSTACKDEPTH 10
|
||||
/* Maximal priority (depth of the Z-list)*/
|
||||
#define TDE_kMAXPRIORITY 50
|
||||
/* Maximal number of intersecting super-objects (used for picking)*/
|
||||
#define TDE_kMAXPICK 20
|
||||
/* Number of letters in a bitmap font*/
|
||||
#define TDE_kNBLETTERS 224
|
||||
/* Index of the letter used for insert cursor (add 32 to get the ASCII index)*/
|
||||
#define TDE_kINSERTCURSOR 96
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_VAR_H */
|
||||
|
||||
|
||||
|
||||
|
189
Rayman_X/cpa/public/TDE/tde_draw.h
Normal file
189
Rayman_X/cpa/public/TDE/tde_draw.h
Normal file
@@ -0,0 +1,189 @@
|
||||
/**************************************************************************************
|
||||
|
||||
File : DRAW.H
|
||||
Basic drawing routines
|
||||
|
||||
***************************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_DRAW_H
|
||||
#define __TDE_DRAW_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vFastDrawMemorySpriteAbsolute
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Display a sprite stored in memory
|
||||
! ATTENTION ! : The sprite has to be defined with absolute coordinates
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
extern void TDE_vFastDrawMemorySpriteAbsolute (GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsSuperObject *p_stSuperObject,
|
||||
TDE_tdsRect *p_stScreenRect);
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vFastDrawMemorySpriteAbsoluteInvert
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Display a sprite stored in memory
|
||||
! ATTENTION ! : The sprite has to be defined with absolute coordinates
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
extern void TDE_vFastDrawMemorySpriteAbsoluteInvert (GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsSuperObject *p_stSuperObject,
|
||||
TDE_tdsRect *p_stScreenRect);
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vDrawSuperObject16
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Display a super object (for sprites)
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
|
||||
extern void TDE_vDrawSuperObject16(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_tdsSuperObject *p_stSuperObjet);
|
||||
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vDrawSuperObjectFast16
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Display a super object (for sprites) without stretch
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
|
||||
extern void TDE_vDrawSuperObjectFast16(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_tdsSuperObject *p_stSuperObjet);
|
||||
extern void TDE_vDrawMemSprite_Abs_16(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_tdsSuperObject *p_stSuperObjet);
|
||||
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vDrawSuperObjectRotated16
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Display a super object with rotation (for sprites)
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
|
||||
extern void TDE_vDrawSuperObjectRotated16(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_tdsSuperObject *p_stSuperObjet);
|
||||
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vDrawSuperObjectClipped16
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Display a super object with clipping (for sprites)
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
|
||||
extern void TDE_vDrawSuperObjectClipped16(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_tdsSuperObject *p_stSuperObjet);
|
||||
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vSendObjectsToViewPort
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Create Z list with a camera attached to a Viewport
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
extern void TDE_vSendObjectsToViewPort(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_tdsSuperObject *p_stSuperObject , TDE_p_stSuperObject *ZList);
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_vSendListToViewPort
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
AIM : Send Z liste to a viewport
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
extern void TDE_vSendListToViewPort(GLD_tdpstViewportAttributes p_stViewAttrib, TDE_p_stSuperObject *ZList, TDE_tdsRect *stClipScreenRect, BOOL bViewPortLocked);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_DRAW_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
64
Rayman_X/cpa/public/TDE/tde_dtext.h
Normal file
64
Rayman_X/cpa/public/TDE/tde_dtext.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/**************************************************************************************
|
||||
|
||||
File : TDE_DRAWTEXT.H
|
||||
Text drawing routines
|
||||
|
||||
***************************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_DRAWTEXT_H
|
||||
#define __TDE_DRAWTEXT_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
extern BOOL TDE_bIsBreakChar (char c);
|
||||
extern TDE_tdxValue TDE_xGetVerticalOffset (TDE_tdsTextBox *pTextBox, long *p_lNbLines);
|
||||
extern TDE_tdxValue TDE_xGetHorizontalOffset (TDE_tdsTextBox *pTextBox, long lStartIndex, long *p_lEndIndex);
|
||||
extern void TDE_vDrawBitmapText (GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsTextBox *pTextBox);
|
||||
extern void TDE_vTDE_vAdjustTextBoxFormatRect( TDE_tdsTextBox *pTextBox);
|
||||
extern void TDE_vDrawTrueTypeText (GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsTextBox *pTextBox);
|
||||
extern void TDE_vDrawTextInABox (GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsSuperObject *p_stSuperObject,
|
||||
BOOL bViewPortLocked);
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_DRAWTEXT_H */
|
||||
|
99
Rayman_X/cpa/public/TDE/tde_files.h
Normal file
99
Rayman_X/cpa/public/TDE/tde_files.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __MBM_H
|
||||
#define __MBM_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
extern long TDE_lReadMBMData (FILE *pFile, TDE_tdsSprite *p_stSprite);
|
||||
extern long TDE_lReadAndConvertMBMFile(char *filename, TDE_tdsSprite *p_stSprite);
|
||||
extern long TDE_lReadCursorAnimation (char *szDir, char *szTxtFile, TDE_tdsAnimatedCursor *Anim);
|
||||
extern void TDE_vDestroyAnimatedCursor(TDE_tdsAnimatedCursor *Anim);
|
||||
extern long TDE_lReadMBFFile(char *filename, TDE_tdsBitmapFont *BFont);
|
||||
extern long TDE_lReadMTFFile(char *filename, TDE_tdsTrueTypeFont *pFont);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __MBM_H */
|
||||
|
||||
|
||||
|
341
Rayman_X/cpa/public/TDE/tde_init.h
Normal file
341
Rayman_X/cpa/public/TDE/tde_init.h
Normal file
@@ -0,0 +1,341 @@
|
||||
/**************************************************************************************
|
||||
|
||||
File : TDE_INIT.H
|
||||
Author : Delattre Franck & Val<61>rie Cluzel
|
||||
Last update : 21 / 02 / 97
|
||||
|
||||
Three types of functions:
|
||||
- Initialization functions
|
||||
- functions used to change a field
|
||||
- liberation functions
|
||||
|
||||
***************************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_INIT_H
|
||||
#define __TDE_INIT_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
TDE_INIT.H
|
||||
First part : INITIALIZATION FUNCTIONS
|
||||
|
||||
- TDE_vInitPictureAttributes
|
||||
- TDE_vInitCamera
|
||||
- TDE_vInitSuperObject
|
||||
- TDE_vInitSuperObjectWithSprite
|
||||
- TDE_vInitLine
|
||||
- TDE_vInitSprite
|
||||
- TDE_vInitMemSprite
|
||||
- TDE_vInitMemSpriteWithoutSO
|
||||
- TDE_vInitTextBox
|
||||
- TDE_vCreateMenuBitmapFont
|
||||
- TDE_vCreateTrueTypeFont
|
||||
- TDE_vInitTransparencyTable
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
extern void TDE_vInitPictureAttributes(TDE_tdsPictureAttributes **h_stPicture,
|
||||
TDE_tdxValue xWidth,
|
||||
TDE_tdxValue xHeight,
|
||||
TDE_tdxValue xSrcPitch,
|
||||
TDE_tdLP_SOURCE lp_Data,
|
||||
TDE_tdLP_SURF lp_DDS);
|
||||
|
||||
|
||||
extern void TDE_vInitCamera(TDE_tdsCamera *stCamera);
|
||||
|
||||
extern void TDE_vInitSuperObject(TDE_tdsSuperObject **h_stSuperObject,
|
||||
short sPriority,
|
||||
TDE_tdsSuperObject *p_stChild,
|
||||
TDE_tdsSuperObject *p_stLeftBrother,
|
||||
TDE_tdsSuperObject *p_stRightBrother,
|
||||
TDE_tdsSuperObject *p_stFather,
|
||||
TDE_tdeType eType,
|
||||
TDE_tdxAngle xAngle,
|
||||
TDE_tdxValue xZX,
|
||||
TDE_tdxValue xZY,
|
||||
TDE_tdxValue xCenterX,
|
||||
TDE_tdxValue xCenterY,
|
||||
long lArea,
|
||||
long lObject);
|
||||
|
||||
extern void TDE_vInitSuperObjectWithSprite(TDE_tdsSuperObject **h_stSuperObject,
|
||||
TDE_tdsSprite *p_stSprite,
|
||||
short sPriority,
|
||||
TDE_tdsSuperObject *p_stChild,
|
||||
TDE_tdsSuperObject *p_stLeftBrother,
|
||||
TDE_tdsSuperObject *p_stRightBrother,
|
||||
TDE_tdsSuperObject *p_stFather,
|
||||
TDE_tdxAngle xAngle,
|
||||
TDE_tdxValue xZX,
|
||||
TDE_tdxValue xZY,
|
||||
TDE_tdxValue xCenterX,
|
||||
TDE_tdxValue xCenterY,
|
||||
long lArea,
|
||||
long lObject);
|
||||
|
||||
|
||||
extern void TDE_vInitLine(TDE_tdsSuperObject *p_SuperObject,
|
||||
TDE_tdxValue xLength,
|
||||
long lColor);
|
||||
|
||||
|
||||
extern void TDE_vInitSprite (TDE_tdsSuperObject *p_SuperObject,
|
||||
TDE_tdxValue xWidth,
|
||||
TDE_tdxValue xHeight,
|
||||
TDE_tdxValue xXs,
|
||||
TDE_tdxValue xYs,
|
||||
TDE_tdxPixel *v_pData,
|
||||
CHAR cFlip,
|
||||
CHAR c_NZ,
|
||||
CHAR cSemiTransparent,
|
||||
TDE_tdsPictureAttributes *p_stPicture);
|
||||
|
||||
|
||||
extern void TDE_vInitMemSprite (TDE_tdsSuperObject *p_SuperObject,
|
||||
TDE_tdxPixel *v_pData,
|
||||
CHAR c_NZ);
|
||||
|
||||
extern void TDE_vInitMemSpriteWithoutSO (TDE_tdsSprite **p_stSprite,
|
||||
TDE_tdxPixel *v_pData,
|
||||
CHAR c_NZ);
|
||||
|
||||
extern void TDE_vInitTextBox (TDE_tdsSuperObject *p_SuperObject,
|
||||
TDE_tdeFontType eFontType,
|
||||
void *p_stFont,
|
||||
unsigned long ulStyle);
|
||||
|
||||
extern void TDE_vCreateBitmapFont(TDE_tdsBitmapFont **BFont);
|
||||
|
||||
extern void TDE_vCreateTrueTypeFont(TDE_tdsTrueTypeFont **TFont);
|
||||
|
||||
extern void TDE_vInitTransparencyTable();
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
TDE_INIT.H
|
||||
Second part : FUNCTIONS USED TO CHANGE A STRUCTURE FIELD
|
||||
|
||||
- TDE_vSetSourcePointer
|
||||
- TDE_vSetSuperObjectDescendantsSourcePointer
|
||||
- TDE_vSetSourcePitch
|
||||
- TDE_vSetSuperObjectDescendantsSourcePitch
|
||||
- TDE_vChangeFormatRectangle
|
||||
- TDE_vChangeClipRectangle
|
||||
- TDE_vMoveFormatRectangle
|
||||
- TDE_vMoveClipRectangle
|
||||
- TDE_vChangeTextInTheBox
|
||||
- TDE_vChangeCursorType
|
||||
- TDE_vChangeCursorPosition
|
||||
- TDE_vChangeSuperObjetCoordinates
|
||||
- TDE_vChangeSuperObjetScale
|
||||
- TDE_vChangeSuperObjetAngle
|
||||
- TDE_vChangeSuperObjectFlip
|
||||
- TDE_vChangeSuperObjectAlpha
|
||||
- TDE_vChangeSuperObjectDescendantsAlpha
|
||||
- TDE_vChangeSuperObjectSemiTransparency
|
||||
- TDE_vChangeSuperObjectDescendantsSemiTransparency
|
||||
- TDE_vChangeSourceCoordinates
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
|
||||
extern void TDE_vSetSourcePointer(TDE_tdsSuperObject *p_stSuperObject, TDE_tdLP_SOURCE lp_Data);
|
||||
|
||||
extern void TDE_vSetSuperObjectDescendantsSourcePointer(TDE_tdsSuperObject *p_stSuperObject, TDE_tdLP_SOURCE lp_Data);
|
||||
|
||||
extern void TDE_vSetSourcePitch(TDE_tdsSuperObject *p_stSuperObject, TDE_tdxValue xSrcPitch);
|
||||
|
||||
extern void TDE_vSetSuperObjectDescendantsSourcePitch(TDE_tdsSuperObject *p_stSuperObject, TDE_tdxValue xSrcPitch);
|
||||
|
||||
|
||||
extern void TDE_vChangeFormatRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xCornerX, TDE_tdxValue xCornerY, TDE_tdxValue xWidth, TDE_tdxValue xHeight);
|
||||
|
||||
extern void TDE_vChangeClipRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xCornerX, TDE_tdxValue xCornerY, TDE_tdxValue xWidth, TDE_tdxValue xHeight);
|
||||
|
||||
extern void TDE_vMoveFormatRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xDx, TDE_tdxValue xDy);
|
||||
|
||||
extern void TDE_vMoveClipRectangle(TDE_tdsTextBox *Box, TDE_tdxValue xDx, TDE_tdxValue xDy);
|
||||
|
||||
extern void TDE_vChangeTextInTheBox(TDE_tdsSuperObject *p_SuperObject, char *p_cText);
|
||||
|
||||
extern void TDE_vChangeCursorType (TDE_tdsSuperObject *p_SuperObject,
|
||||
TDE_tdeCursorType eType);
|
||||
|
||||
extern void TDE_vChangeCursorPosition (TDE_tdsSuperObject *p_SuperObject,
|
||||
long lPosition);
|
||||
|
||||
void TDE_vChangeColorModeInTextBox (TDE_tdsSuperObject *p_SuperObject,
|
||||
char cColorMode);
|
||||
|
||||
extern void TDE_vChangeSuperObjetCoordinates(TDE_tdsSuperObject *p_stSuperObject,
|
||||
TDE_tdxValue xX,
|
||||
TDE_tdxValue xY);
|
||||
|
||||
extern void TDE_vChangeSuperObjetScale(TDE_tdsSuperObject *p_stSuperObject,
|
||||
TDE_tdxValue xZX,
|
||||
TDE_tdxValue xZY);
|
||||
|
||||
|
||||
extern void TDE_vChangeSuperObjetAngle(TDE_tdsSuperObject *p_stSuperObjet, TDE_tdxAngle xAngle);
|
||||
|
||||
|
||||
|
||||
extern void TDE_vChangeSuperObjectFlip(TDE_tdsSuperObject *p_stSuperObjet, char cFlip);
|
||||
|
||||
|
||||
|
||||
extern void TDE_vChangeSuperObjectAlpha(TDE_tdsSuperObject *p_stSuperObjet, TDE_tdxValue xAlpha);
|
||||
|
||||
|
||||
|
||||
extern void TDE_vChangeSuperObjectSemiTransparency(TDE_tdsSuperObject *p_stSuperObjet, char cSemiTransparent);
|
||||
|
||||
|
||||
|
||||
extern void TDE_vChangeSuperObjectDescendantsSemiTransparency(TDE_tdsSuperObject *p_stSuperObject, char cSemiTransparent);
|
||||
|
||||
|
||||
|
||||
extern void TDE_vChangeSuperObjectDescendantsAlpha(TDE_tdsSuperObject *p_stSuperObject, TDE_tdxValue xAlpha);
|
||||
|
||||
|
||||
|
||||
extern void TDE_vChangeSourceCoordinates(TDE_tdsSprite *p_stSprite,
|
||||
TDE_tdxValue xXs,
|
||||
TDE_tdxValue xYs);
|
||||
|
||||
|
||||
|
||||
/************************************************************************
|
||||
|
||||
TDE_INIT.C
|
||||
Third part : Get Functions
|
||||
|
||||
- TDE_eGetCursorType
|
||||
- TDE_lGetCursorPosition
|
||||
*************************************************************************/
|
||||
|
||||
extern TDE_tdeCursorType TDE_eGetCursorType ( TDE_tdsSuperObject *p_SuperObject );
|
||||
extern long TDE_lGetCursorPosition ( TDE_tdsSuperObject *p_SuperObject );
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
TDE_INIT.H
|
||||
Fourth part : LIBERATION FUNCTIONS
|
||||
|
||||
- TDE_vReleaseBitmapFont
|
||||
- TDE_vReleaseTrueTypeFont
|
||||
- TDE_vReleaseMemSprite
|
||||
- TDE_vDestroyPictureAttributes
|
||||
- TDE_vDestroyTextBox
|
||||
- TDE_vDestroySuperObject
|
||||
- TDE_vDestroySuperObjectDescendants
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
extern void TDE_vReleaseBitmapFont(TDE_tdsBitmapFont *BFont);
|
||||
|
||||
extern void TDE_vReleaseTrueTypeFont(TDE_tdsTrueTypeFont *TFont);
|
||||
|
||||
extern void TDE_vReleaseMemSprite(TDE_tdsSprite *p_stSprite);
|
||||
|
||||
extern void TDE_vDestroyPictureAttributes(TDE_tdsPictureAttributes **h_stPicture);
|
||||
|
||||
extern void TDE_vDestroyTextBox(TDE_tdsTextBox **h_stTextBox);
|
||||
|
||||
extern void TDE_vDestroySuperObject(TDE_tdsSuperObject **h_stSuperObject);
|
||||
|
||||
extern void TDE_vDestroySuperObjectDescendants(TDE_tdsSuperObject **h_stSuperObject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_INIT_H */
|
||||
|
119
Rayman_X/cpa/public/TDE/tde_matrix.h
Normal file
119
Rayman_X/cpa/public/TDE/tde_matrix.h
Normal file
@@ -0,0 +1,119 @@
|
||||
/*******************************************************************************************
|
||||
|
||||
File : Matrix.h
|
||||
Date : 24 july 96
|
||||
I have nothing to say more.
|
||||
|
||||
********************************************************************************************/
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_MATRIX_H
|
||||
#define __TDE_MATRIX_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
extern void TDE_vGetTranslateVertexMatrix(TDE_tdsSuperObjectMatrix *p_stMatrix, TDE_tdsVertex *p_stTranslate);
|
||||
extern void TDE_vGetAngleMatrix(TDE_tdsSuperObjectMatrix *p_stMatrix, TDE_tdxAngle *p_xAngle);
|
||||
extern void TDE_vCreateRotationMatrix(TDE_tdsMatrix *p_stMatrix, TDE_tdxAngle xAngle);
|
||||
extern void TDE_vCreateSuperObjectMatrix(TDE_tdsSuperObjectMatrix *p_stMatrix);
|
||||
extern void TDE_vCreateSuperObjectDescendancyMatrices(TDE_tdsSuperObject *p_stSuperObject);
|
||||
extern void TDE_vMulRxSMatrixByVertex(TDE_tdsSuperObjectMatrix *p_stMat, TDE_tdsVertex *p_stV, TDE_tdsVertex *p_stR);
|
||||
extern void TDE_vMulMatrixByVertex(TDE_tdsMatrix *p_stMat, TDE_tdsVertex *p_stV, TDE_tdsVertex *p_stR);
|
||||
extern void TDE_vMulMatrixMatrix(TDE_tdsSuperObjectMatrix *p_stMat1, TDE_tdsSuperObjectMatrix *p_stMat2, TDE_tdsSuperObjectMatrix *p_stResult);
|
||||
extern void TDE_vMulVertexToValue(TDE_tdsVertex *p_stV, TDE_tdxValue xValue, TDE_tdsVertex *p_stResult);
|
||||
extern void TDE_vAddVertexToVertex(TDE_tdsVertex *p_stV1, TDE_tdsVertex *p_stV2, TDE_tdsVertex *p_stResult);
|
||||
extern void TDE_vSubVertexToVertex(TDE_tdsVertex *p_stV1, TDE_tdsVertex *p_stV2, TDE_tdsVertex *p_stResult);
|
||||
extern TDE_tdxValue TDE_xNormeVertex(TDE_tdsVertex *p_stV);
|
||||
extern void TDE_vNormerVertex(TDE_tdsVertex *p_stV, TDE_tdsVertex *p_stResult);
|
||||
extern void ResetMatrixStack(TDE_tdsCamera *stCamera);
|
||||
extern void PushMatrix(TDE_tdsSuperObjectMatrix *p_stMat);
|
||||
extern void PopMatrix();
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_MATRIX_H */
|
||||
|
||||
|
||||
|
||||
|
70
Rayman_X/cpa/public/TDE/tde_pick.h
Normal file
70
Rayman_X/cpa/public/TDE/tde_pick.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
DESCRIPTION :
|
||||
~~~~~~~~~~~
|
||||
You must do :
|
||||
#define COL_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_PICKING_H
|
||||
#define __TDE_PICKING_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 COL_GLOBALS
|
||||
#define __COL_EXTERN extern
|
||||
#else /* !COL_GLOBALS */
|
||||
#define __COL_EXTERN
|
||||
#endif /* !COL_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
extern BOOL TDE_bGetSuperObjectPick( GLD_tdpstViewportAttributes p_stViewAttrib,
|
||||
TDE_tdsVertex *p_stSouris,
|
||||
TDE_tdstPickInfo *p_stPickInfo );
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_PICKING_H */
|
||||
|
||||
|
143
Rayman_X/cpa/public/TDE/tde_rect.h
Normal file
143
Rayman_X/cpa/public/TDE/tde_rect.h
Normal file
@@ -0,0 +1,143 @@
|
||||
/**************************************************************************************
|
||||
|
||||
File : RECT.H
|
||||
Authors : Val<61>rie Cluzel & Franck Delattre
|
||||
|
||||
***************************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_RECT_H
|
||||
#define __TDE_RECT_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
extern void iTde_vFastBlit(long W, long H, long lP, long *src, long *dest);
|
||||
|
||||
extern void iTde_vFastBlit_NZ(long W, long H, long lP, long MC, long *src, long *dest);
|
||||
|
||||
extern void iTde_vFastBlit_Invert(long W, long H, long lP, long MC, long *src, long *dest);
|
||||
|
||||
extern void iTde_vFastBlit_Invert_NZ(long W, long H, long lP, long MC, long *src, long *dest);
|
||||
|
||||
extern void iTDE_vFillsRect(TDE_tdsRect *Rect, TDE_tdxValue xCornerX, TDE_tdxValue xCornerY, TDE_tdxValue xWidth, TDE_tdxValue xHeight);
|
||||
|
||||
extern void iTDE_vFillsLRect(TDE_tdsRect *Rect, TDE_tdxValue xCornerX, TDE_tdxValue xCornerY, TDE_tdxValue xWidth, TDE_tdxValue xHeight);
|
||||
|
||||
extern void iTDE_vPercentToAbsoluteRect(TDE_tdsRect *Rect, GLD_tdpstViewportAttributes p_stViewAttrib);
|
||||
|
||||
extern void iTDE_vMoveRect(TDE_tdsRect *Rect, TDE_tdxValue xTx, TDE_tdxValue xTy);
|
||||
|
||||
extern void iTDE_vChangeRectCorner(TDE_tdsRect *Rect, TDE_tdxValue xCornerX, TDE_tdxValue xCornerY);
|
||||
|
||||
extern void iTDE_vAdjustRectToFlip(TDE_tdsRect *Rect, TDE_tdsRect *FlippedRect, char cFlip);
|
||||
|
||||
extern void iTDE_vAdjustScreenRectForClip(TDE_tdsRect *Rect, TDE_tdsRect *ClippedRect, long lViewPortW, long lViewPortH);
|
||||
|
||||
extern void iTDE_vAdjustScreenRectToClipRect(TDE_tdsRect *Rect, TDE_tdsRect *ClippedRect, TDE_tdsRect *stClipSq);
|
||||
|
||||
extern void iTDE_vAdjustSourceRectForClip(TDE_tdsRect *ScreenRect, TDE_tdsRect *SrcRect, TDE_tdsRect *SrcClippedRect, long lViewPortW, long lViewPortH);
|
||||
|
||||
extern void iTDE_vBlit(TDE_tdsRect *RectSource, TDE_tdsRect *RectDest);
|
||||
|
||||
extern void iTDE_vBlitFast(TDE_tdsRect *RectSource, TDE_tdsRect *RectDest);
|
||||
|
||||
extern void iTDE_vBlitFastMemory(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
extern void iTDE_vBlitFastMemory_NZ(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
extern void iTDE_vBlitFastMemory_Invert(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
extern void iTDE_vBlitFastMemory_Invert_NZ(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
|
||||
extern void iTDE_vBlitClipMemory(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
extern void iTDE_vBlitClipMemory_NZ(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
extern void iTDE_vBlitClipMemory_Invert(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
extern void iTDE_vBlitClipMemory_Invert_NZ(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
|
||||
extern void iTDE_vBlitClipMemory2(TDE_tdsMemZone *Source, TDE_tdsRect *RectDest);
|
||||
|
||||
extern void iTDE_vBlit_Transparency(TDE_tdsRect *RectSource, TDE_tdsRect *RectDest, TDE_tdxValue xAlpha);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_RECT_H */
|
||||
|
||||
|
||||
|
411
Rayman_X/cpa/public/TDE/tde_struct.h
Normal file
411
Rayman_X/cpa/public/TDE/tde_struct.h
Normal file
@@ -0,0 +1,411 @@
|
||||
/*********************************************************************************
|
||||
|
||||
STRUCT.h : Definition of basic structures
|
||||
Last update : 26 july 96
|
||||
Last modification : I don't remember
|
||||
|
||||
*********************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_STRUCT_H
|
||||
#define __TDE_STRUCT_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef NOTUSE_GLD
|
||||
/* Substitution viewport structure if we do not use GLD*/
|
||||
typedef struct GLD_stViewportAttributes
|
||||
{
|
||||
DWORD dwInitialHeight; /* Initial height of viewport in pixels */
|
||||
DWORD dwInitialWidth; /* Initial width of viewport in pixels */
|
||||
DWORD dwHeight; /* Current height of viewport in pixels */
|
||||
DWORD dwWidth; /* Current width of viewport in pixels */
|
||||
|
||||
DWORD dwBytesPerPixel;
|
||||
|
||||
DWORD dwTopInPix; /* Y of Left up corner */
|
||||
DWORD dwBottomInPix; /* Y of right down corner */
|
||||
DWORD dwLeftInPix; /* X of left up corner */
|
||||
DWORD dwRightInPix; /* X of right down corner */
|
||||
|
||||
DWORD dwTopInPixForClip; /* Y of Left up corner */
|
||||
DWORD dwBottomInPixForClip; /* Y of right down corner */
|
||||
DWORD dwLeftInPixForClip; /* X of left up corner */
|
||||
DWORD dwRightInPixForClip; /* X of right down corner */
|
||||
|
||||
DWORD dwTopInPercent; /* Y of Left up corner */
|
||||
DWORD dwBottomInPercent; /* Y of right down corner */
|
||||
DWORD dwLeftInPercent; /* X of left up corner */
|
||||
DWORD dwRightInPercent; /* X of right bottom corner */
|
||||
|
||||
char *p_cVirtualScreen; /* Pointer to back memory associated with the viewport */
|
||||
LONG lPitch; /* Distance to the start of the next line */
|
||||
void *p_vReserved; /* Reserved */
|
||||
void *p_vSpecificToXD; /* Additionnal Attributes specific to 2D or 3D */
|
||||
} GLD_tdstViewportAttributes, *GLD_tdpstViewportAttributes;
|
||||
|
||||
|
||||
/* Structures for Pictures */
|
||||
typedef struct GLD_stPictureAttributes
|
||||
{
|
||||
char *p_szBitmap; /* Bitmap loaded in surface */
|
||||
DWORD dwHeight; /* Height of picture in pixels */
|
||||
DWORD dwWidth; /* Width of picture in pixels */
|
||||
char *p_cVirtualScreen; /* Pointer to picture */
|
||||
LONG lPitch; /* Distance to the start of the next line */
|
||||
void *p_vReserved; /* Reserved */
|
||||
} GLD_tdstPictureAttributes, *GLD_tdpstPictureAttributes;
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
TDE_tdsVertex : 2D point structure
|
||||
***************************************************************************/
|
||||
typedef struct _TDE_tdsVertex
|
||||
{
|
||||
TDE_tdxValue xX;
|
||||
TDE_tdxValue xY;
|
||||
}TDE_tdsVertex;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
TDE_tdsVertex Point;
|
||||
TDE_tdsVertex TexPoint;
|
||||
} TDE_tdsClippedVertex;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
TDE_tdsVertex1616 : 16:16 format 2D point structure
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct _TDE_tdsVertex1616
|
||||
{
|
||||
TDE_tdl1616 lX;
|
||||
TDE_tdl1616 lY;
|
||||
}TDE_tdsVertex1616;
|
||||
|
||||
|
||||
|
||||
typedef struct _TDE_tdsClippedVertex1616
|
||||
{
|
||||
TDE_tdsVertex1616 Point;
|
||||
TDE_tdsVertex1616 TexPoint;
|
||||
}TDE_tdsClippedVertex1616;
|
||||
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_tdsRect
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
Rectangle structure. This rectangle is linked with a DDraw
|
||||
surface, so it contains info about it -> pith & pointer
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
typedef struct _TDE_tdsRect
|
||||
{
|
||||
TDE_tdsVertex tdsSommet[4];
|
||||
long lPitch;
|
||||
TDE_tdxPixel *p_usPointer;
|
||||
}TDE_tdsRect;
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_tdsLRect
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
Light Rectangle structure. Without DD surface.
|
||||
Used for Memory sprites
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
typedef struct _TDE_tdsLRect
|
||||
{
|
||||
TDE_tdsVertex tdsSommet[4];
|
||||
}TDE_tdsLRect;
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_tdsMemZone
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
Contains memory zone informations for memory sprites
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
typedef struct _TDE_tdsMemZone
|
||||
{
|
||||
TDE_tdxPixel *p_usPointer;
|
||||
TDE_tdsVertex stDim;
|
||||
TDE_tdxPixel xMagicColor;
|
||||
}TDE_tdsMemZone;
|
||||
|
||||
/********************************************************************************
|
||||
TDE_tdsSpriteMatrix : Matrix structure
|
||||
*********************************************************************************/
|
||||
typedef struct _TDE_tdsMatrix
|
||||
{
|
||||
TDE_tdxValue a4_xM[2][2];
|
||||
}TDE_tdsMatrix;
|
||||
|
||||
|
||||
typedef struct _TDE_tdsSuperObjectMatrix
|
||||
{
|
||||
TDE_tdxAngle xAngle; /* angle in radians*/
|
||||
TDE_tdsVertex stScale; /* zoom vertex*/
|
||||
TDE_tdsMatrix a4_xS; /* Scale matrix*/
|
||||
TDE_tdsMatrix a4_xRxS; /* Product matrix*/
|
||||
TDE_tdsVertex stTranslateVertex; /* Center coodinates*/
|
||||
}TDE_tdsSuperObjectMatrix;
|
||||
|
||||
/*********************************************************************************
|
||||
TDE_tdsPictureAttributes : source attributes
|
||||
**********************************************************************************/
|
||||
|
||||
typedef struct _TDE_tdsPictureAttributes
|
||||
{
|
||||
TDE_tdxValue xWidth;
|
||||
TDE_tdxValue xHeight;
|
||||
TDE_tdxValue xSrcPitch; /* Source pitch */
|
||||
TDE_tdLP_SOURCE lp_Data; /* Source type*/
|
||||
TDE_tdLP_SURF lp_DDS;
|
||||
}TDE_tdsPictureAttributes;
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
TDE_tdsSprite : sprite structure
|
||||
*********************************************************************************/
|
||||
typedef struct _TDE_tdsSprite
|
||||
{
|
||||
TDE_tdsVertex stDim; /* Dimensions of the sprite */
|
||||
TDE_tdxPixel xMagicColor;
|
||||
TDE_tdxPixel *v_pData; /* pointer on memory data */
|
||||
CHAR c_NZ; /* Is there a non-zero color ?*/
|
||||
TDE_tdsVertex stSourceOrigin;
|
||||
CHAR cFlip;
|
||||
TDE_tdsPictureAttributes stPicture; /* Picture attributes*/
|
||||
CHAR cSemiTransparent; /* 1 -> semi-transparent (50-50)*/
|
||||
TDE_tdxValue alpha;
|
||||
}TDE_tdsSprite;
|
||||
|
||||
/********************************************************************************
|
||||
TDE_tdsLine : line structure
|
||||
*********************************************************************************/
|
||||
typedef struct _TDE_tdsLine
|
||||
{
|
||||
LONG lColor; /* color of the line*/
|
||||
TDE_tdxValue xLength;
|
||||
}TDE_tdsLine;
|
||||
|
||||
/********************************************************************************
|
||||
TDE_tdsSuperObject : super object structure
|
||||
*********************************************************************************/
|
||||
|
||||
typedef enum {
|
||||
TDE_eOT_EMPTY = 0,
|
||||
TDE_eOT_SPRITE = 1,
|
||||
TDE_eOT_TEXTBOX = 2,
|
||||
TDE_eOT_LINE = 3
|
||||
} TDE_tdeType;
|
||||
|
||||
typedef struct _TDE_tdsSuperObject *TDE_p_stSuperObject;
|
||||
|
||||
typedef struct _TDE_tdsTextBox TDE_tdsTextBox;
|
||||
|
||||
typedef struct _TDE_tdsSuperObject
|
||||
{
|
||||
SHORT sPriority;
|
||||
TDE_tdsSuperObjectMatrix stMatrix; /* Rotation & translation matrix*/
|
||||
TDE_tdsSuperObjectMatrix stModifiedMatrix;
|
||||
TDE_p_stSuperObject p_stChild;
|
||||
TDE_p_stSuperObject p_stLeftBrother;
|
||||
TDE_p_stSuperObject p_stRightBrother;
|
||||
TDE_p_stSuperObject p_stFather;
|
||||
TDE_p_stSuperObject p_stNextZList;
|
||||
TDE_tdeType eType; /* Type of the object (sprite, line)*/
|
||||
union {
|
||||
TDE_tdsSprite *p_stSprite;
|
||||
TDE_tdsTextBox *p_stTextBox;
|
||||
TDE_tdsLine *p_stLine;
|
||||
void *p_vPointer;
|
||||
};
|
||||
TDE_tdsRect *p_stSOClipRect;
|
||||
long lArea; /* ID to menu_object*/
|
||||
long lObject; /* First dependance ! Maybe temporary */
|
||||
}TDE_tdsSuperObject;
|
||||
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////////*/
|
||||
/* TDE_tdsAnimatedCursor : */
|
||||
/* Sprite list of an animated cursor.*/
|
||||
/**/
|
||||
/* stActiveCoordinates are coordinates of the acive point of the mouse cursor.*/
|
||||
/* they are given in absolute coordinates but relatively to sprite center*/
|
||||
/**/
|
||||
/* ------------*/
|
||||
/* | |*/
|
||||
/* | (0,0) |*/
|
||||
/* | --------> X*/
|
||||
/* | | |*/
|
||||
/* | | |*/
|
||||
/* | | | */
|
||||
/* ------|-----*/
|
||||
/* Y v*/
|
||||
/**/
|
||||
/*/////////////////////////////////////////////////////////////////////////////*/
|
||||
typedef struct _TDE_tdsAnimatedCursor *TDE_p_stAnimatedCursor;
|
||||
|
||||
typedef struct _TDE_tdsAnimatedCursor
|
||||
{
|
||||
TDE_tdsVertex stActiveCoordinates;
|
||||
TDE_tdsSprite Step;
|
||||
TDE_p_stAnimatedCursor Next;
|
||||
}TDE_tdsAnimatedCursor;
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_tdsBitmapFont
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
MBF Font structure
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
typedef struct _TDE_tdsBitmapLetter
|
||||
{
|
||||
TDE_tdsSuperObject stBLetter;
|
||||
unsigned short usVAlign;
|
||||
}TDE_tdsBitmapLetter;
|
||||
|
||||
typedef struct _TDE_tdsBitmapFont
|
||||
{
|
||||
TDE_tdsBitmapLetter *p_stMBLetter[TDE_kNBLETTERS];
|
||||
unsigned short usHMax;
|
||||
unsigned short usVAMax;
|
||||
unsigned short usHorzSep;
|
||||
unsigned short usVertSep;
|
||||
}TDE_tdsBitmapFont;
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_tdsTrueTypeFont
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
MTF Font structure
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
typedef struct _TDE_tdsTrueTypeFont
|
||||
{
|
||||
HFONT hFont;
|
||||
COLORREF lColor;
|
||||
}TDE_tdsTrueTypeFont;
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_tdsTextBox
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
Third SO type after sprites & lines
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
typedef enum _TDE_tdeFontType
|
||||
{
|
||||
TDE_eFT_BITMAP,
|
||||
TDE_eFT_TRUETYPE,
|
||||
TDE_eFT_UNDEFINED
|
||||
} TDE_tdeFontType;
|
||||
|
||||
typedef enum _TDE_tdeCursorType
|
||||
{
|
||||
TDE_eCT_NOCURSOR = 0,
|
||||
TDE_eCT_INSERT = 1,
|
||||
TDE_eCT_OVERWRITE = 2
|
||||
} TDE_tdeCursorType;
|
||||
|
||||
typedef struct _TDE_tdsTextBox
|
||||
{
|
||||
/* Formatting rectangle*/
|
||||
TDE_tdsRect *p_stFormatRect;
|
||||
/* Clipping rectangle*/
|
||||
TDE_tdsRect *p_stClipRect;
|
||||
/* Font*/
|
||||
TDE_tdeFontType eFontType;
|
||||
union {
|
||||
TDE_tdsBitmapFont *p_stBFont;
|
||||
TDE_tdsTrueTypeFont *p_stTFont;
|
||||
};
|
||||
/* Format of the text (like in Windows DrawText function)*/
|
||||
unsigned long ulStyle;
|
||||
/* Text*/
|
||||
char *p_cText;
|
||||
/* Normal colors (0) or negative colors (1)*/
|
||||
char cColorMode;
|
||||
/* Index of flicking cursor in text*/
|
||||
long lCursorPosition;
|
||||
/* Cursor type*/
|
||||
TDE_tdeCursorType eCursorType;
|
||||
}TDE_tdsTextBox;
|
||||
|
||||
/********************************************************************************
|
||||
TDE_tdsCamera : camera structure
|
||||
*********************************************************************************/
|
||||
typedef TDE_tdsSuperObjectMatrix TDE_tdsCamera;
|
||||
|
||||
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**
|
||||
NAME : TDE_tdstPickInfo
|
||||
VERSION : 2.0 / Val<61>rie
|
||||
1.0 / Franck
|
||||
|
||||
Structure used for picking
|
||||
**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**/
|
||||
typedef struct TDE_tdstSprObjPickInfo_
|
||||
{
|
||||
TDE_tdsSuperObject *p_stSprObj;
|
||||
TDE_tdxPixel xColor;
|
||||
} TDE_tdstSprObjPickInfo;
|
||||
|
||||
|
||||
typedef struct TDE_tdstPickInfo_
|
||||
{
|
||||
int iNbSprPick;
|
||||
TDE_tdstSprObjPickInfo aDEF_stInfo[TDE_kMAXPICK];
|
||||
} TDE_tdstPickInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_STRUCT_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
102
Rayman_X/cpa/public/TDE/tde_values.h
Normal file
102
Rayman_X/cpa/public/TDE/tde_values.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_VALUES_H
|
||||
#define __TDE_VALUES_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
#include "TDE.h"
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
typedef long TDE_tdxErr ;
|
||||
typedef float TDE_tdxValue ;
|
||||
typedef float TDE_tdxAngle ;
|
||||
typedef float TDE_tdxUVValue ;
|
||||
typedef long TDE_tdl1616;
|
||||
typedef unsigned short TDE_tdxPixel;
|
||||
typedef LPDIRECTDRAWSURFACE TDE_tdLP_SURF;
|
||||
typedef char* TDE_tdLP_SOURCE;
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
#define TDE_M_FloatToValue(A) ( ( A ) )
|
||||
#define TDE_M_1616ToValue(A) ( ( A ) / 65536.0 )
|
||||
#define TDE_M_ValueToFloat(A) ( ( A ) )
|
||||
#define TDE_M_ValueTo1616(A) ( ( A ) * 65536.0 )
|
||||
#define TDE_M_ValueToLong(A) ( (long) ( A ) )
|
||||
#define TDE_M_LongToValue(A) ( (float) ( A ) )
|
||||
#define TDE_M_Mul(A,B) (TDE_tdxValue)( ( A ) * ( B ) )
|
||||
#define TDE_M_Sub(A,B) (TDE_tdxValue)( ( A ) - ( B ) )
|
||||
#define TDE_M_Add(A,B) (TDE_tdxValue)( ( A ) + ( B ) )
|
||||
#define TDE_M_Div(A,B) (TDE_tdxValue)( ( A ) / ( B ) )
|
||||
#define TDE_M_Neg(A) ( -( A ) )
|
||||
#define TDE_M_Sgn(A) ( ( ( A ) < 0.0 ) ? ( -1 ) \
|
||||
: ( ( ( A ) > 0.0 ) \
|
||||
? ( 1 ) : ( 0 ) ) )
|
||||
#define TDE_M_Inv(A) ( 1.0 / ( A ) )
|
||||
#define TDE_M_Abs(A) ( ( ( A ) > 0.0 ) ? ( A ) : ( -( A ) ) )
|
||||
#define TDE_M_Sqrt(A) ( sqrt ( (double) ( A ) ) )
|
||||
#define TDE_M_Sq(A) (TDE_tdxValue)( ( A ) * ( A ) )
|
||||
|
||||
#define TDE_M_AngToValue(A) (TDE_tdxValue)( ( A ) )
|
||||
#define TDE_M_ValueToAng(A) (TDE_tdxValue)( ( A ) )
|
||||
|
||||
#define TDE_M_DegToAng(A) (TDE_tdxValue)( ( A ) *(3.1415927/180.0) )
|
||||
#define TDE_M_RadToAng(A) (TDE_tdxValue)( ( A ) )
|
||||
#define TDE_M_AngToDeg(A) (TDE_tdxValue)( ( A ) *(180.0/3.1415927) )
|
||||
#define TDE_M_AngToRad(A) (TDE_tdxValue)( ( A ) )
|
||||
#define TDE_M_Cos(A) (TDE_tdxValue)( cos ( (double) ( A ) ) )
|
||||
#define TDE_M_Sin(A) (TDE_tdxValue)( sin ( (double) ( A ) ) )
|
||||
#define TDE_M_Tan(A) (TDE_tdxValue)( tan ( (double) ( A ) ) )
|
||||
#define TDE_M_Atan(A) (TDE_tdxValue)( atan ( (double) ( A ) ) )
|
||||
#define TDE_M_Cotan(A) (TDE_tdxValue)( 1.0 / tan ( (double) ( A ) ) )
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_VALUES_H */
|
||||
|
73
Rayman_X/cpa/public/TDE/tde_var.h
Normal file
73
Rayman_X/cpa/public/TDE/tde_var.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/****************************************************************************
|
||||
|
||||
VAR.H : global variables
|
||||
Last update : 26 july 96
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_VAR_H
|
||||
#define __TDE_VAR_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Matrix stack*/
|
||||
__TDE_EXTERN TDE_tdsSuperObjectMatrix MatrixStack[TDE_kSTACKDEPTH];
|
||||
/* Position in matrix stack*/
|
||||
__TDE_EXTERN short MS_Position;
|
||||
/* Transparency tables for 5 and 6 bits coded colors*/
|
||||
__TDE_EXTERN unsigned char a_cTransparencyTable5[64][32];
|
||||
__TDE_EXTERN unsigned char a_cTransparencyTable6[64][64];
|
||||
/* Flicking of the cursor*/
|
||||
__TDE_EXTERN char TDE_g_cFlick;
|
||||
/* The main Z-list and the Z-list of the cursor*/
|
||||
__TDE_EXTERN TDE_p_stSuperObject TDE_g_apZList [TDE_kMAXPRIORITY];
|
||||
__TDE_EXTERN TDE_p_stSuperObject TDE_g_apZListCursor [TDE_kMAXPRIORITY];
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_VAR_H */
|
||||
|
||||
|
106
Rayman_X/cpa/public/TDE/tde_vop1616.h
Normal file
106
Rayman_X/cpa/public/TDE/tde_vop1616.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/******************************
|
||||
VOP1616.h
|
||||
Visual basic OPerations
|
||||
for 16:16 format
|
||||
Needs VOP1616.CPP
|
||||
*******************************/
|
||||
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_VOP1616_H
|
||||
#define __TDE_VOP1616_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
extern long TDE_MUL (long A,long B);
|
||||
extern long TDE_DIV (long A,long B);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_VOP1616_H */
|
||||
|
||||
|
||||
|
||||
|
114
Rayman_X/cpa/public/TDE/tde_wop1616.h
Normal file
114
Rayman_X/cpa/public/TDE/tde_wop1616.h
Normal file
@@ -0,0 +1,114 @@
|
||||
/********************************************
|
||||
WOP1616.h
|
||||
Watcom basic OPerations for 16:16 format
|
||||
*********************************************/
|
||||
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
You must do :
|
||||
#define TDE_GLOBALS
|
||||
in one (and only one) .c file of your Module.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/* To avoid unnecessary includes : */
|
||||
#ifndef __TDE_WOP1616_H
|
||||
#define __TDE_WOP1616_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 : */
|
||||
#ifndef TDE_GLOBALS
|
||||
#define __TDE_EXTERN extern
|
||||
#else /* !TDE_GLOBALS */
|
||||
#define __TDE_EXTERN
|
||||
#endif /* !TDE_GLOBALS */
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
INCLUDES FILES :
|
||||
Include here any other header files of your module you need !
|
||||
Ex :
|
||||
#include "toto.h"
|
||||
Note : Do Not include header files from other Modules (do this in C files
|
||||
only)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
CONSTANT DECLARATION:
|
||||
Ex :
|
||||
#define TDE_C_LMAX 100
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
TYPES DEFINITION :
|
||||
Declare here any type you need, and constant you need to do this :
|
||||
Ex : typedef struct TDE_tdstToto_
|
||||
{
|
||||
long aLMAX_lBuffer[TDE_C_LMAX];
|
||||
...
|
||||
} TDE_tdst_Toto ;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
GLOBAL VARIABLE DECLARATION :
|
||||
Ex :
|
||||
__TDE_EXTERN <type> <variable name>
|
||||
#ifdef TDE_GLOBALS
|
||||
= <initial values>
|
||||
#endif
|
||||
;
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
FUNCTIONS DECLARATION:
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
long TDE_MUL (long A,long B);
|
||||
#pragma aux TDE_MUL = \
|
||||
"imul ebx" \
|
||||
"shrd eax,edx,16" \
|
||||
parm [eax] [ebx] \
|
||||
value [eax] \
|
||||
modify [edx];
|
||||
|
||||
long TDE_DIV (long A,long B);
|
||||
#pragma aux TDE_DIV = \
|
||||
"xor eax,eax" \
|
||||
"shrd eax,edx,16" \
|
||||
"sar edx,16" \
|
||||
"idiv ebx" \
|
||||
parm [edx] [ebx] \
|
||||
value [eax];
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __TDE_WOP1616_H */
|
Reference in New Issue
Block a user