reman3/Rayman_X/cpa/public/GLI/proj.h

135 lines
5.4 KiB
C

#ifndef GLI_PROJ_H
#define GLI_PROJ_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
struct GLI_tdstAligned2DVector_;
struct GLI_tdstAligned3DVector_;
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "vertex.h"
/**********************************************************************************************/
/* Name: GLI_xProjection */
/* Goal: Proje"ct a vertex*/
/* Code: Elie Khoury / 1.0*/
/* OPTIMMIZED : */
/**********************************************************************************************/
extern CPA_EXPORT void
GLI_xProjection ( struct GLI_tdstCamera_ *p_stCam ,
MTH3D_tdstVector *p_stSource ,
GLI_tdst2DVertex *p_stDest ) ;
/**********************************************************************************************/
/* Name: GLI_xSerialProjectionNoTrans 1.0*/
/* Goal: Perspective Project a list of 3d vertex- no Iso cameras*/
/* Code: Steve McCalla*/
/**********************************************************************************************/
extern CPA_EXPORT void
GLI_xSerialProjectionNoTrans ( struct GLI_tdstCamera_ *p_stCam ,
long lNbOfVertex ,
struct GLI_tdstAligned3DVector_ *p_stSource ,
struct GLI_tdstAligned2DVector_ *p_stDest );
/**********************************************************************************************/
/* Name: GLI_xSerialProjection 1.1 */
/* Goal: Project a list of 3d vertex*/
/* Code: Elie Khoury / 1.0*/
/* Philippe Vimont / 1.1 -> ASSEMBLY CODE*/
/* OPTIMMIZED : */
/**********************************************************************************************/
extern CPA_EXPORT void
GLI_xSerialProjection ( struct GLI_tdstCamera_ *p_stCam ,
long lNbOfVertex ,
struct GLI_tdstAligned3DVector_ *p_stSource ,
struct GLI_tdstAligned2DVector_ *p_stDest ) ;
/**********************************************************************************************/
/* Name: GLI_vInit_Projections*/
/* Goal: Init a table for f(x) = 1/x;*/
/* Code: Philippe Vimont / 1.0*/
/* OPTIMMIZED : No*/
/**********************************************************************************************/
extern CPA_EXPORT void
GLI_vInit_Projections();
void GLI_vSerialComputeScreenVertices(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters,long xStart,long xNumber);
typedef struct tdstGlobalsProjection_
{
MTH_tdxReal xOoXTable[1024];
}
tdstGlobalsProjection;
#ifndef NO_ASSEMBLY_IN_GLI
/**********************************************************************************************/
/* Name: GLI_xSerialProjectionAsm */
/* Goal: Project a table of vertices*/
/* Code: Philippe Vimont / 1.0*/
/* OPTIMMIZED : Assembly (serial.msm)*/
/**********************************************************************************************/
/***************************************************************************************/
/* C function*/
/***************************************************************************************/
/*
extern CPA_EXPORT void
GLI_xSerialProjectionAsm (
(long) long lNbOfVertex ,
(long) MTH_tdxReal *p_xCoefX,
(long) MTH_tdxReal *p_xCoefY,
(long) MTH3D_tdstVector *p_st3DVertices ,
(long) GLI_tdst2DVertex *p_st2DVertices ,
(long) GLI_tdst2DVertex *p_stTranslation ) ;*/
/***************************************************************************************/
/* Assembly function */
/***************************************************************************************/
#define GLI_xSerialProjectionAsm _GLI_xSerialProjectionAsm
CALLING_ASM_6_0(GLI_xSerialProjectionAsm ,ecx ,ebx ,edx ,esi ,edi ,eax );
#ifdef WATCOM
#pragma aux _GLI_xSerialProjectionAsm parm [ecx] [ebx] [edx] [esi] [edi] [eax] \
modify [ecx ebx edx esi edi eax];
#endif
/**********************************************************************************************/
/* Name: GLI_xSerialComputeOox */
/* Goal: f(x) = 1/x;*/
/* Code: Philippe Vimont / 1.0*/
/* OPTIMMIZED : Assembly (serial.msm)*/
/**********************************************************************************************/
/***************************************************************************************/
/* C function*/
/***************************************************************************************/
/*
extern CPA_EXPORT void
GLI_xSerialComputeOox (
(long) lNbOfVertex ,
(long) p_stSource ,
(long) &p_stDest->xOoZ,
(long) stProjGlobs.xOoXTable ,
(long) sizeof(MTH3D_tdstVector),
(long) sizeof(GLI_tdst2DVertex));*/
/***************************************************************************************/
/* Assembly function */
/***************************************************************************************/
#define GLI_xSerialComputeOox _GLI_xSerialComputeOox
CALLING_ASM_6_0(GLI_xSerialComputeOox ,ecx ,esi ,edi ,eax ,ebx ,edx );
#ifdef WATCOM
#pragma aux _GLI_xSerialComputeOox parm [ecx][esi][edi][eax][ebx][edx] modify [ecx esi edi eax ebx edx]
#endif
#endif /*NO_ASSEMBLY_IN_GLI*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_PROJ_H*/