Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,302 @@
/*///////////////////////////////////////////////////////////*/
/* //*/
/* Management of the Module : Gli //*/
/* // */
/* File Name : ErrGli.h //*/
/* Date : 29/01/97 //*/
/* Author : Christophe Martinaud //*/
/* //*/
/*///////////////////////////////////////////////////////////*/
/* //*/
/* abbreviation of the module-name. Used in macro is 'Gli' //*/
/* //*/
/*///////////////////////////////////////////////////////////*/
#ifndef __ERRGli_H__
#define __ERRGli_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define C_szGliVersion "Gli V5.8.6" /* The format is Tmr Va.b.c with Tmr is the Tag of the module */
#define C_szGliFullName "Graphic Library for Display"/* the complete and clear name of the module */
#define C_szGliDate "May 12 1997" /*The format is "Mmm dd yyyy".You can use __DATE__ but be careful that you have the control of the compilation*/
#include "CPA_Expt.h"
#ifndef __Erm_H__
#include "ERM.h"
#endif
#define __FATAL_ERR_Gli__
#define __WARNING1_ERR_Gli__
/*----------*/
/* Constant */
/*----------*/
/* error of the Gli Module*/
typedef enum e_uwGliErrNumber_{
E_uwGliFatalErr,
#ifdef __FATAL_ERR_Gli__
/* -----------------*/
/* Devices Errors*/
/* CreateDevice*/
E_uwGli_CD_DDCreateFailed,
E_uwGli_CD_DDQueryInterfaceFailed,
E_uwGli_CD_DDSetCoopLevelFailed,
E_uwGli_CD_DDSetDisplayModeFailed,
E_uwGli_CD_DDCreatePrimSurfFailed,
E_uwGli_CD_DDCreateClipperFailed,
E_uwGli_CD_DDSetClipperWndFailed,
E_uwGli_CD_DDSetClipperSurfFailed,
E_uwGli_CD_MaxNumberReached,
E_uwGli_CD_NotEnoughMemForDev,
E_uwGli_CD_DDGetBackBufferFailed,
E_uwGli_CD_DDGetSurfDescFailed,
E_uwGli_CD_DDCreateOffBufFailed,
E_uwGli_CD_NotEnoughMemForZBuf,
/* AdjustDeviceToWindow*/
E_uwGli_ADTW_DeviceInFullScrMode,
E_uwGli_ADTW_DDReleaseBufFailed,
E_uwGli_ADTW_DDCreateOffBufFailed,
E_uwGli_ADTW_NotEnoughMemForZBuf,
/* FlipDevice*/
E_uwGli_FD_DDRestoreSurfFailed,
E_uwGli_FD_DDFlipFailed,
E_uwGli_FD_DDBlitFailed,
/* DeleteDevice*/
E_uwGli_DD_DestroyDDObjFailed,
/* SwapDeviceMode*/
E_uwGli_SDM_AnotherDevInFScrMode,
E_uwGli_SDM_NotEnoughMemForSwap,
E_uwGli_SDM_DeleteDeviceFailed,
E_uwGli_SDM_CreateDeviceFailed,
/* Viewports Errors*/
/* ClearViewport*/
E_uwGli_CV_DDRestoreSurfFailed,
E_uwGli_CV_DDBltFailed,
/* RequestWriteToViewport*/
E_uwGli_RWTV_DDRestoreSurfFailed,
E_uwGli_RWTV_DDLockFailed,
/* WriteToViewportFinished*/
E_uwGli_WTVF_DDUnlockFailed,
/* CreateViewport*/
E_uwGli_CRV_MaxNumberReached,
E_uwGli_CRV_NotEnoughMemForVpt,
/* Rasters Errors*/
/* SetMonitorFrequency*/
E_uwGli_SMF_BadMonitorFrequency,
/* Creation of timer*/
E_uwGli_RCFR_CreateTimerFailed,
/* InitMainRasterObject */
E_uwGli_IMRO_NotEnoughMemoryForMRO,
/* CreateRasterForDevice*/
E_uwGli_CRFD_MaxNumberOfRastersReached,
E_uwGli_CRFD_NotEnoughMemForRaster,
/* Display rasters for device*/
E_uwGli_DRFD_DDRestoreSurfFailed,
E_uwGli_DRFD_DDLockFailed,
E_uwGli_DRFD_DDUnlockSurfFailed,
/* Pictures Errors*/
/* LoadPictures*/
E_uwGli_LP_DDCreateFailed,
E_uwGli_LP_DDQueryInterfaceFailed,
E_uwGli_LP_DDSetCoopLevelFailed,
E_uwGli_LP_MaxNumberOfPicReached,
E_uwGli_LP_NotEnoughMemForPic,
E_uwGli_LP_LoadBitmapFailed,
/* ReadFromPictureFinished*/
E_uwGli_RFPF_DDUnlockSurfFailed,
/* RequestReadFromPicture*/
E_uwGli_RRFP_ReloadBitmapFailed,
E_uwGli_RRFP_DDLockFailed,
E_uwGli_RRFP_DDRestoreSurfFailed,
#endif /*__FATAL_ERR_Gli__*/
E_uwGliStartOfWarning,/* important constant, it allows to recognize if an error is fatal or not.*/
#ifdef __WARNING1_ERR_Gli__
/* -------------------*/
/* ClearDevice*/
E_uwGli_CLD_EraseSurfaceFailed,
/* Create Device*/
E_uwGli_CD_InitTimerLibFailed,
/* Memory free*/
E_uwGliWarningCanNotFree,
#endif /*__WARNING1_ERR_Gli__*/
#ifdef __WARNING2_ERR_Gli__
/* -------------------*/
#endif /*__WARNING2_ERR_Gli__*/
#ifdef __WARNING3_ERR_Gli__
/* -------------------*/
#endif /*__WARNING3_ERR_Gli__*/
E_uwGliErrNumber
} e_uwGliErrNumber;
/*------------------*/
/* Global Variables*/
/*------------------*/
#undef __ERRGli_EXTERN
#ifndef __DeclareGlobalVariableErrGli_h__
#define __ERRGli_EXTERN extern /*external declaration*/
#else /*__DeclareGlobalVariableErrGli_h__*/
#define __ERRGli_EXTERN /*replace by nothing : we have to declare*/
#endif /*__DeclareGlobalVariableErrGli_h__*/
__ERRGli_EXTERN CPA_EXPORT unsigned char g_ucGliModuleId /*number of identification of the Erm module*/
#if defined(__DeclareGlobalVariableErrGli_h__) && !defined(CPA_WANTS_IMPORT)
= C_ucModuleNotInitialized
#endif /*__DeclareGlobalVariableErrGli_h__&& CPA_WANTS_IMPORT*/
;
#ifdef __ERROR_STRINGS__
__ERRGli_EXTERN CPA_EXPORT char * g_a_szGliInformationModule []
#if defined(__DeclareGlobalVariableErrGli_h__) && !defined(CPA_WANTS_IMPORT)
= {C_szGliVersion, C_szGliFullName, C_szGliDate}
#endif /*__DeclareGlobalVariableErrGli_h__ && CPA_WANTS_IMPORT*/
;
__ERRGli_EXTERN CPA_EXPORT char * g_szGliModuleName /* Mandatory syntax 'g_sz'+[Abbreviation of ModuleName]+'ModuleName'*/
#if defined(__DeclareGlobalVariableErrGli_h__) && !defined(CPA_WANTS_IMPORT)
= "Module Gli"
#endif /*__DeclareGlobalVariableErrGli_h__ && CPA_WANTS_IMPORT*/
;
__ERRGli_EXTERN CPA_EXPORT struct tdstErrorMsg_ g_a_stGliTabErr [] /* Mandatory syntax 'g_a_st'+[Abbreviation of ModuleName]+'TabErr'*/
#if defined(__DeclareGlobalVariableErrGli_h__) && !defined(CPA_WANTS_IMPORT)
={
#ifdef __FATAL_ERR_Gli__
/* -------------*/
/* Devices Errors*/
/* CreateDevice*/
E_uwGli_CD_DDCreateFailed, "CreateDevice : Can't create DirectDraw object",
E_uwGli_CD_DDQueryInterfaceFailed, "CreateDevice : Can't get DirectDraw2 Interface",
E_uwGli_CD_DDSetCoopLevelFailed, "CreateDevice : Can't set cooperative level",
E_uwGli_CD_DDSetDisplayModeFailed, "CreateDevice : Can't set display mode",
E_uwGli_CD_DDCreatePrimSurfFailed, "CreateDevice : Can't create Primary surface",
E_uwGli_CD_DDCreateClipperFailed, "CreateDevice : Can't create Clipper",
E_uwGli_CD_DDSetClipperWndFailed, "CreateDevice : Can't associate Clipper with window",
E_uwGli_CD_DDSetClipperSurfFailed, "CreateDevice : Can't associate Clipper with surface",
E_uwGli_CD_MaxNumberReached, "CreateDevice : Maximal number of devices has been reached",
E_uwGli_CD_NotEnoughMemForDev, "CreateDevice : Not enough memory to create device structure",
E_uwGli_CD_DDGetBackBufferFailed, "CreateDevice : Can't get back buffer",
E_uwGli_CD_DDGetSurfDescFailed, "CreateDevice : Can't get surface description",
E_uwGli_CD_DDCreateOffBufFailed, "CreateDevice : Can't create offscreen buffer",
E_uwGli_CD_NotEnoughMemForZBuf, "CreateDevice : Not enough memory to create Z Buffer",
/* AdjustDeviceToWindow*/
E_uwGli_ADTW_DeviceInFullScrMode, "AdjustDevice : Can't adjust a device in full screen mode",
E_uwGli_ADTW_DDReleaseBufFailed, "AdjustDevice : Can't release offscreen buffer",
E_uwGli_ADTW_DDCreateOffBufFailed, "AdjustDevice : Can't create new offscreen buffer",
E_uwGli_ADTW_NotEnoughMemForZBuf, "AdjustDevice : Not enough memory to adjust Z Buffer",
/* FlipDevice*/
E_uwGli_FD_DDRestoreSurfFailed, "FlipDevice : Can't restore surface",
E_uwGli_FD_DDFlipFailed, "FlipDevice : Can't flip",
E_uwGli_FD_DDBlitFailed, "FlipDevice : Can't blit",
/* DeleteDevice*/
E_uwGli_DD_DestroyDDObjFailed, "DeleteDevice : Can't destroy DirectDraw objects",
/* SwapDeviceMode*/
E_uwGli_SDM_AnotherDevInFScrMode, "SwapDeviceMode : Another device is already in fullscreen mode",
E_uwGli_SDM_NotEnoughMemForSwap, "SwapDeviceMode : Not enough memory to achieve operation",
E_uwGli_SDM_DeleteDeviceFailed, "SwapDeviceMode : Can't delete the old device",
E_uwGli_SDM_CreateDeviceFailed, "SwapDeviceMode : Can't create the new device",
/* Viewports Errors*/
/* ClearViewport*/
E_uwGli_CV_DDRestoreSurfFailed, "ClearViewport : Can't restore surface",
E_uwGli_CV_DDBltFailed, "ClearViewport : Can't blit",
/* RequestWriteToViewport*/
E_uwGli_RWTV_DDRestoreSurfFailed, "RequestWriteToVpt : Can't restore surface",
E_uwGli_RWTV_DDLockFailed, "RequestWriteToVpt : Can't lock the back buffer",
/* WriteToViewportFinished*/
E_uwGli_WTVF_DDUnlockFailed, "WriteToVptFinished : Can't unlock the back buffer",
/* CreateViewport*/
E_uwGli_CRV_MaxNumberReached, "CreateViewport : The maximal number of viewports has been reached",
E_uwGli_CRV_NotEnoughMemForVpt, "CreateViewport : Not enough memory to create the viewport structure",
/* Rasters Errors*/
/* SetMonitorFrequency*/
E_uwGli_SMF_BadMonitorFrequency, "SetMonitorFrequency : Invalid frequency for monitor",
/* Creation of raster*/
E_uwGli_RCFR_CreateTimerFailed, "Timer couldn't be created",
/* InitMainRasterObject */
E_uwGli_IMRO_NotEnoughMemoryForMRO, "Not enough memory to create a new set of rasters",
/* CreateRasterForDevice*/
E_uwGli_CRFD_MaxNumberOfRastersReached, "CreateRasterForDev : The maximal number of rasters has been reached for this set",
E_uwGli_CRFD_NotEnoughMemForRaster, "CreateRasterForDev : Not enough memory to create a new raster",
/* Display rasters for device*/
E_uwGli_DRFD_DDRestoreSurfFailed, "DisplayRasters : Can't restore back buffer",
E_uwGli_DRFD_DDLockFailed, "DisplayRasters : Can't lock back buffer",
E_uwGli_DRFD_DDUnlockSurfFailed, "DisplayRasters : Can't unlock back buffer",
/* Pictures Errors*/
/* LoadPictures*/
E_uwGli_LP_DDCreateFailed, "LoadPictures : Can't create DirectDraw object for pictures",
E_uwGli_LP_DDQueryInterfaceFailed, "LoadPictures : Can't get DirectDraw2 interface for pictures",
E_uwGli_LP_DDSetCoopLevelFailed, "LoadPictures : Can't set cooperative level for pictures",
E_uwGli_LP_MaxNumberOfPicReached, "LoadPictures : The maximal number of pictures has been reached",
E_uwGli_LP_NotEnoughMemForPic, "LoadPictures : Not enough memory for picture structure",
E_uwGli_LP_LoadBitmapFailed, "LoadPictures : Can't load bitmap in surface",
/* ReadFromPictureFinished*/
E_uwGli_RFPF_DDUnlockSurfFailed, "RequestReadFP : Can't unlock surface associated with picture",
/* RequestReadFromPicture*/
E_uwGli_RRFP_ReloadBitmapFailed, "RequestReadFP : Can't reload bitmap in surface",
E_uwGli_RRFP_DDLockFailed, "RequestReadFP : Can't lock surface associated with picture",
E_uwGli_RRFP_DDRestoreSurfFailed, "RequestReadFP : Can't restore surface",
#endif /*__FATAL_ERR_Gli__*/
#ifdef __WARNING1_ERR_Gli__
/* ----------------*/
/* ClearDevice*/
E_uwGli_CLD_EraseSurfaceFailed, "ClearDevice : Device surface couldn't be erased",
/* CreateDevice*/
E_uwGli_CD_InitTimerLibFailed, "CreateDevice : The timer library couldn't be initialized",
/* Memory free*/
E_uwGliWarningCanNotFree, "A block of memory couldn't be freed !!!",
#endif /*__WARNING1_ERR_Gli__*/
#ifdef __WARNING2_ERR_Gli__
/* ----------------*/
#endif /*__WARNING2_ERR_Gli__*/
#ifdef __WARNING3_ERR_Gli__
/* ----------------*/
#endif /*__WARNING3_ERR_Gli__*/
0xFFFF, "\0"/*fin*/
};
#endif /*__DeclareGlobalVariableErrGli_h__ && CPA_WANTS_IMPORT*/
;
#endif /*__ERROR_STRINGS__*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /*__ERRGli_H__*/

View File

@@ -0,0 +1,119 @@
#ifndef GLI_DEFN_H
#define GLI_DEFN_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#if !defined(U64)
/*ANNECY jt {*/
/* #define C_lMaxLightInViewport 50*/
#define C_lMaxLightInViewport 300
/*ENDANNECY jt }*/
#else /* U64 */
#define C_lMaxLightInViewport 20
#endif /* U64 */
#define GLI_C_lIsTextured 1
#define GLI_C_lIsGouraud 2 /* else is flat*/
#define GLI_C_lIsNotWired 4 /* so is solid*/
#define GLI_C_lIsNotGrided 8
#define GLI_C_lIsNotDoted 16 /* means draw only the points*/
#define GLI_C_lIsNotOutlined 32 /* means draw only the points*/
#define GLI_C_lIsNotDrawCollideInformation 64 /* means draw collision spheres & box*/
#define GLI_C_lIsNotDrawCollideInformationLight 128 /* Draw only periferical */
#define GLI_C_lIsNotForceDefaultMaterial 256 /* Draw only periferical */
#define GLI_C_lIsNotForceColorMaterial 512 /* draw triangles with a single color set in the material*/
#define GLI_C_lIsTestingBackface 1024
#define GLI_C_lIsNotDrawingSuperObjectBoundingVolume 2048
#define GLI_C_lIsUseRLI 4096
#define GLI_C_lIsNotComputeSpecular 8192
/* #define GLI_C_lIsNotMakeWaterEffect 16384*/
/* FQ N64 Bug fix*/
#define GLI_C_lHasNotPriority 16384 /* 14eme bit : Means this object has no priority*/
#define GLI_C_lIsUseStaticLights 32768
#define GLI_C_lIsUseShadow 65536
#define GLI_C_lCameraIsUnderWater 131072
#define GLI_C_lNotForceZSorting 262144
#define GLI_C_lNotInvertBackfaces 524288
#define GLI_C_lNotHideWhatIsUnderWater 0x100000
#define GLI_C_lDrawNothing 0x200000
#define GLI_C_lIsNotChromed 0x400000
#define GLI_C_lIsNotVisibleInRealWorld 0x800000
#define GLI_C_lIsNotVisibleInSymetricWorld 0x1000000
#define GLI_C_lIsNotDrawingInMirror 0x2000000
#define GLI_C_lIsNotLightAlphaSensitive 0x4000000
#define GLI_C_lIsWriteZBuffer 0x8000000
#define GLI_C_lHasNoMirror 0x10000000
#define GLI_C_lIsNotSinusEffectOnRLI 0x20000000
#define GLI_C_lIsEnableZSorting 0x40000000
#define GLI_C_lHasNotSinusEffect 0x80000000
#define GLI_C_lIsSolid (GLI_C_lIsNotForceDefaultMaterial + \
GLI_C_lIsNotDrawCollideInformationLight + \
GLI_C_lIsNotDrawCollideInformation + \
GLI_C_lIsNotWired + \
GLI_C_lIsNotGrided + \
GLI_C_lIsNotForceColorMaterial + \
GLI_C_lIsNotDoted + \
GLI_C_lIsTestingBackface + \
GLI_C_lNotForceZSorting + \
GLI_C_lNotInvertBackfaces + \
GLI_C_lNotHideWhatIsUnderWater + \
GLI_C_lIsNotChromed + \
GLI_C_lIsNotOutlined+ \
GLI_C_lIsNotVisibleInRealWorld+ \
GLI_C_lIsNotLightAlphaSensitive+ \
GLI_C_lIsNotVisibleInSymetricWorld+\
GLI_C_lIsEnableZSorting+\
GLI_C_lIsWriteZBuffer)
#define GLI_C_lAllIsEnable 0xFFFFFFFF
#define C_lMaxIndexInViewingList 20000
#define C_lGouraudLineElement ((GLI_C_lIsSolid | GLI_C_lIsGouraud)- GLI_C_lIsNotWired)
#define C_lGouraudElement (GLI_C_lIsSolid | GLI_C_lIsGouraud)
#define C_lTexturedElement (GLI_C_lIsSolid | GLI_C_lIsTextured | GLI_C_lIsGouraud)
#define C_lTexturedElementGrid ((GLI_C_lIsSolid | GLI_C_lIsTextured | GLI_C_lIsGouraud)- GLI_C_lIsNotGrided)
#define C_lBoldLineElement (GLI_C_lIsNotDoted)
#define C_lBigDotsElement (0)
#define ISI_tdxColorCompFac 256.f
#define ISI_tdxColorCompMax 32767
#define ISI_tdxColorCompMin -32768
/*typedef unsigned char ISI_tdxColorComp;*/
typedef short ISI_tdxColorComp;
/*Declaration of structure*/
typedef struct ISI_tdstColor_
{
ISI_tdxColorComp xRed;
ISI_tdxColorComp xGreen;
ISI_tdxColorComp xBlue;
ISI_tdxColorComp xAlpha;
}ISI_tdstColor;
/*ROMTEAM Ionut Grozea PLG Files 01-05-1998*/
#ifdef ACTIVE_EDITOR
typedef struct ISI_tdstObjectColor_
{
int iNrVertex;
char csName[255];
ISI_tdstColor xVertexColor[1000];
}ISI_tdstObjectColor;
typedef struct ISI_tdstObjectColorStruct_
{
int iNrObjects;
ISI_tdstObjectColor objColor[100];
}ISI_tdstObjectColorStruct;
#endif
/*ENDROMTEAM Ionut Grozea PLG Files 01-05-1998*/
extern CPA_EXPORT void GLI_xClearViewingList ( void ) ;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@@ -0,0 +1,44 @@
#if !defined(__GLI_Vig_h__)
#define __GLI_Vig_h__
/********************************************************
*** Definition of formats : ***
*** GLI_EVF_xxxxyyyy_zz ***
*** xxxx : order of colors Red Green Blue and Alpha ***
*** yyyy : bits description ***
*** zz : Origin coordinate (Up Down Left Right) ***
********************************************************/
typedef enum GLI_tdeVignetteFormat_
{
GLI_EVF_RGB888_DL,
GLI_EVF_BGRA8888_UL,
GLI_EVF_BGR565_UL,
GLI_EVF_BGR1555_UL,
GLI_EVF_BGR4444_UL,
GLI_EVF_NumberOfFormat
} GLI_tdeVignetteFormat;
extern CPA_EXPORT GLI_tdeVignetteFormat GLI_fn_eConvertVignetteFormat(unsigned char *_p_ucBuffer,unsigned long _ulWidth,unsigned long _ulHeight,GLI_tdeVignetteFormat _eActualFormat,GLI_tdeVignetteFormat _eWantedFormat);
extern CPA_EXPORT void GLI_fn_vMemoryCopyBufferToBackBufferAndFlip(GLD_tdhDevice _hGLDDevice,GLD_tdhViewport _hGLDViewport,void *_p_vSourceBuffer,long _lWidth,long _lHeight,long _lDestX,long _lDestY,long _lWidthOfSource,GLI_tdeVignetteFormat _eFormat);
extern CPA_EXPORT void GLI_fn_vMemoryCopyBufferToBackBuffer(GLD_tdstViewportAttributes *_p_stViewportAttr,GLD_tdhDevice _hGLDDevice,GLD_tdhViewport _hGLDViewport,void *_p_vSourceBuffer,long _lWidth,long _lHeight,long _lDestX,long _lDestY,long _lWidthOfSource,GLI_tdeVignetteFormat _eFormat);
extern CPA_EXPORT void GLI_fn_vMemoryCopyBufferToBackBufferAndFlip2 ( GLD_tdhDevice _hGLDDevice,
GLD_tdhViewport _hGLDViewport,
void *_p_vSourceBuffer,
long _lWidth,
long _lHeight,
long _lDestX,
long _lDestY,
long _lWidthOfSource,
GLI_tdeVignetteFormat _eFormat );
extern CPA_EXPORT void GLI_fn_vMemoryCopyBufferToBackBuffer2 ( GLD_tdhDevice _hGLDDevice,
GLD_tdhViewport _hGLDViewport,
void *_p_vSourceBuffer,
long _lWidth,
long _lHeight,
long _lDestX,
long _lDestY,
long _lWidthOfSource,
GLI_tdeVignetteFormat _eFormat );
#endif /* __GLI_Vig_h__ */

View File

@@ -0,0 +1,63 @@
#ifndef INIT_GLI_H
#define INIT_GLI_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
/*
extern CPA_EXPORT void GLI_vInitGliDFX(void);
extern CPA_EXPORT void GLI_vInitGliD3D(void);
extern CPA_EXPORT void GLI_vInitGliCif(void);
extern CPA_EXPORT void GLI_vInitGliP5(void);
*/
extern CPA_EXPORT void GLI_xInitGli (void) ;
#ifdef U64
#include "Rom64.h"
#include "h_level.h"
extern void GLI_fn_vInitCache(unsigned short _a6_uwCacheSize[6]);
#endif /* U64 */
extern CPA_EXPORT void GLI_xInitGliGlobal (void);
extern CPA_EXPORT void GLI_vEndofGeometricLoad();
extern CPA_EXPORT void GLI_vCloseGli ();
extern CPA_EXPORT void GLI_vSignalCurrentMemoryChannel(unsigned char CurrentChannel);
extern CPA_EXPORT void GLI_vKillMemoryChannel(unsigned char CurrentChannel);
extern CPA_EXPORT long GLI_xIsGliInit();
extern CPA_EXPORT void GLI_vSetBenchMode(long lEnable);
extern CPA_EXPORT void GLI_vChangeBenchMode();
/* End of turn engine.*/
//extern CPA_EXPORT void GLI_vEndOfTurnEngine(void);
#define GLI_C_VersionGlide 0
#define GLI_C_VersionPentium 1
#define GLI_C_VersionSoft 1
#define GLI_C_VersionD3DRM 2
#define GLI_C_VersionD3DDP 3
#define GLI_C_VersionCIF 4
#define GLI_C_VersionGlide3 5
extern CPA_EXPORT long GLI_lWhatIsGLI();
/* Return a pointer on the text version of GLI engine.*/
extern CPA_EXPORT unsigned char *GLI_ucGetTextOfVersion(void);
/* Return version number.*/
extern CPA_EXPORT long GLI_lGetNumOfVersion(void);
/*bart990108:*/
extern CPA_EXPORT char GLI_fn_cWindowedModeIsOptimized(void);
extern CPA_EXPORT void GLI_fn_vOptimizedWindowedMode(void);
extern CPA_EXPORT void GLI_fn_vNonOptimizedWindowedMode(void);
extern CPA_EXPORT void GLI_fn_vSetMainWindowForRender(void * _hWnd);
extern CPA_EXPORT void GLI_fn_vRecomputeViewportToMaximizeDisplay(int _arg);
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* INIT_GLI_H*/

View File

@@ -0,0 +1,111 @@
/* (c) Ubi Studios 1997 */
/* See Vincent Greco for any comment or question */
/* To avoid unnecessary includes : */
#ifndef __LGTLOAD_H__
#define __LGTLOAD_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
#if !defined(U64)
extern CPA_EXPORT SCR_tdst_Link_Table * LGT_fn_p_stGetLightLinkTable();
#endif /* U64 */
extern CPA_EXPORT BOOL LGT_fn_bInitLGTLoading();
extern CPA_EXPORT BOOL LGT_fn_bStopLGTLoading();
/********************************************************************
NAME : LGT_fn_xLoadLight
AIM : Load a Light (with scripts)
*********************************************************************/
#if !defined(U64)
extern CPA_EXPORT SCR_tde_Anl_ReturnValue LGT_fn_xLoadLight(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
#endif /* U64 */
/*----------------------------------------------------------------------------
// Description : GLI_fn_vPrepareSaveLightBinaryBloc
//----------------------------------------------------------------------------
// Input :
// Output :
----------------------------------------------------------------------------*/
extern CPA_EXPORT void GLI_fn_vPrepareSaveLightBinaryBloc();
/*----------------------------------------------------------------------------
// Description : GLI_fn_ulWriteLightBinaryBloc
//----------------------------------------------------------------------------
// Input : _ulStructAdress : Address of the structure to be written
// _p_cDestBuffer : Output buffer
// Output : The length of the data written
----------------------------------------------------------------------------*/
extern CPA_EXPORT unsigned long GLI_fn_ulWriteLightBinaryBloc(unsigned long _ulStructAdress,
char* _p_cDestBuffer);
/*----------------------------------------------------------------------------
// Description : GLI_fn_vWriteAllLightBinaryBlocs
//----------------------------------------------------------------------------
// Input : _szBinaryFileName
// Output :
----------------------------------------------------------------------------*/
extern CPA_EXPORT void GLI_fn_vWriteAllLightBinaryBlocs(char* _szBinaryFileName);
/*----------------------------------------------------------------------------
// Description : GLI_fn_ulReadLightBinaryBloc
//----------------------------------------------------------------------------
// Input : _p_cLoadedBuffer : Input buffer
// _ulLoadedBufferSize : Size of the loaded buffer
// Output : The address of the allocated bloc
----------------------------------------------------------------------------*/
extern CPA_EXPORT unsigned long GLI_fn_ulReadLightBinaryBloc(char* _p_cLoadedBuffer,unsigned long _ulLoadedBufferSize);
/*----------------------------------------------------------------------------
// Description : GLI_fn_vReadAllLightBinaryBlocs
//----------------------------------------------------------------------------
// Input : _szBinaryFileName : The binary file name
// Output :
----------------------------------------------------------------------------*/
extern CPA_EXPORT void GLI_fn_vReadAllLightsBinaryBlocs(char* _szBinaryFileName);
/*----------------------------------------------------------------------------
// Description : GLI_fn_vReadAllLightBinaryBlocs2
//----------------------------------------------------------------------------
// Input : _szBinaryFileName : The binary file name
// Output :
----------------------------------------------------------------------------*/
extern CPA_EXPORT void GLI_fn_vReadAllLightsBinaryBlocs2(char* _szBinaryFileName);
/*----------------------------------------------------------------------------
// Description : GMT_fn_hLoadGameMaterial
// Load a game material from the scripts or from the binary bloc
//----------------------------------------------------------------------------
// Input : _szSectionName : Name of the section to load
// Output : A handle to the loaded game material
----------------------------------------------------------------------------*/
extern CPA_EXPORT struct GLI_tdstLight_* GMT_fn_hLoadLight(char* _szSectionName);
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __LGTLOAD_H__ */

View File

@@ -0,0 +1,58 @@
#ifndef LINKTAB_H
#define LINKTAB_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
/* fonctions d'acces direct */
#if !defined(U64)
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfGeometric();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementIndexedTriangle();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementTMeshe();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementFaceMapDescriptor();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementSprite();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementLine();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementSphere();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementAlignedBoxe();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementPoint();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementCone();
#ifdef USE_ALTIMAPS
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfElementAltimap();
#endif /*USE_ALTIMAPS*/
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfFaceMapDescriptor();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfSprite();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfTexture();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfTextureSection();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfVisualMaterial();
extern CPA_EXPORT SCR_tdst_Link_Table *GLI_p_stGetLinkTableOfFrontierElement();
#endif /* U64 */
/* fonctions d'init */
extern CPA_EXPORT void GLI_vInitLinkTableOfGeometric();
/* fonctions de desinit */
extern CPA_EXPORT void GLI_vCloseLinkTableOfGeometric();
/* fonctions d'ajout */
extern CPA_EXPORT void GLI_vSetValueInLinkTableOfGeometric( char *_p_szKey,unsigned long _ulValue);
/* fonctions de recherche par clef */
extern CPA_EXPORT unsigned long GLI_ulSearchKeyInLinkTableOfGeometric( char *_p_szKey);
/* fonctions de recherche par valeur */
extern CPA_EXPORT char * GLI_p_cSearchValueInLinkTableOfGeometric( unsigned long _ulValue);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LINKTAB_H */

View File

@@ -0,0 +1,70 @@
#ifndef D_THROW_VISUAL_SET
#ifndef VISUALSETH
#define VISUALSETH
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct GEO_tdstVisualSet_ *GEO_tdxHandleToVisualSet;
/* For DLL using these function :*/
#include "cpa_expt.h"
/*
=======================================================================================
Creation
=======================================================================================
*/
GEO_tdxHandleToVisualSet GLI_p_stCreateVisualSet ( long lNbLOD);
GEO_tdxHandleToVisualSet GLI_p_stCreateTMPVisualSet ( long lNbLOD);
extern CPA_EXPORT void GLI_vSetVisualSetLOD ( GEO_tdxHandleToVisualSet p_stVisualSet, long lNumberOfLodToSet, MTH_tdxReal xThreshold, GEO_tdstGeometricObject *p_stObject);
GEO_tdstGeometricObject *GLI_hGetVisualSetGeometricForADistance( GEO_tdxHandleToVisualSet p_stVSE, MTH_tdxReal xThreshold );
extern CPA_EXPORT void GLI_vGetVisualSetLOD ( GEO_tdxHandleToVisualSet p_stVisualSet, long lNumberOfLodToGet, MTH_tdxReal *p_xThreshold, GEO_tdstGeometricObject **h_stObject );
extern CPA_EXPORT long GLI_lGetVisualSetNumbertOfLOD ( GEO_tdxHandleToVisualSet p_stVisualSet );
extern CPA_EXPORT void GLI_p_stRecursiveReinitGameMaterialOfVisualsets ( GEO_tdxHandleToVisualSet p_stVisualSet );
/*
=======================================================================================
Display
=======================================================================================
*/
extern CPA_EXPORT void GLI_lSendVisualSetToViewport( struct GLD_tdstViewportAttributes_ *p_stVpt, struct GEO_tdstVisualSet_ *p_stVisualSet, MTH_tdxReal xDistance, long lDrawModeMask );
extern CPA_EXPORT void GLI_lSendVisualSetToViewport2( struct GLD_tdstViewportAttributes_ *p_stVpt, struct GEO_tdstVisualSet_ *p_stVisualSet, MTH3D_tdstVector *p_xCenter, long lDrawModeMask );
extern CPA_EXPORT void GLI_lSendVisualSetToViewportBV2( struct GLD_tdstViewportAttributes_ *p_stVpt, struct GEO_tdstVisualSet_ *p_stVisualSet, MTH3D_tdstVector *p_xCenter, MTH_tdxReal xRadiusOfSphere, long lDrawModeMask);
extern CPA_EXPORT void GLI_lSendVisualSetToViewportWithRLI2( struct GLD_tdstViewportAttributes_ *p_stVpt, struct GEO_tdstVisualSet_ *p_stVisualSet, MTH3D_tdstVector *p_xCenter, long lDrawModeMask, ACP_tdxHandleToRadiosity hISI);
/*
=======================================================================================
RLI
=======================================================================================
*/
extern CPA_EXPORT ACP_tdxHandleToRadiosity GLI_hGetRLI ( GEO_tdxHandleToVisualSet hVisualSet, unsigned char ucIndex ) ;
#ifndef D_THROW_IPO
extern CPA_EXPORT ACP_tdxHandleToRadiosity GLI_hComputeBlendRLI (GEO_tdxHandleToVisualSet hVisualSet, unsigned char ucIndex1, unsigned char ucIndex2, ACP_tdxIndex xNumISILOD,MTH_tdxReal xPercent) ;
#endif /* D_THROW_IPO */
extern CPA_EXPORT void GLI_vVisualSetSetRLITable (GEO_tdxHandleToVisualSet hVisualSet, ACP_tdxHandleToRadiosity *d_hRLI, long lNumberOfTable) ;
extern CPA_EXPORT ACP_tdxHandleToRadiosity *GLI_vVisualSetLoadRLI (char *szSection, long *lNumberOfTable) ;
#ifndef U64
extern SCR_tde_Anl_ReturnValue GLI_fn_xLoadRLI(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType) ;
#endif
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif
#endif /* D_THROW_VISUAL_SET */

View File

@@ -0,0 +1,41 @@
#ifndef GLI_VPT3D_H
#define GLI_VPT3D_H
/* Vpt3D.h*/
/* Additionnal attributes for 3D Viewports*/
/* Author : Christophe MARTINAUD*/
/* Last update : 07/18/1996*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "vertex.h"
#include "POS.h"
#define C_MAX_MATRIX_IN_VPT 100
typedef struct GLI_tdstSpecificAttributesFor3D_
{
/* long lNumberOfMatrixToPush;*/
/* POS_tdstCompletePosition aDEF_stMatrixStack[C_MAX_MATRIX_IN_VPT];*/
struct GLI_tdstCamera_ *p_stCam;
MTH_tdxReal xNear;
/* GLI_tdst2DVertex stTransVertex ; */
#if defined(U64)
Gfx a_stGList[8];
Mtx stProjectionMtx;
float a16_fProjectionMtx[16];
unsigned short uwPerspNorm;
#endif /* U64 */
} GLI_tdstSpecificAttributesFor3D, *GLI_pstSpecificAttributesFor3D;
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_VPT3D_H*/

View File

@@ -0,0 +1,18 @@
#ifndef ZBUFFER_H
#define ZBUFFER_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
extern CPA_EXPORT void GLI_GetZBufferFromViewport(struct GLD_tdstViewportAttributes_ *p_stVpt ,long lOutSizeX,long OutSizeY,float *p_ZBufferOut,long lPitchOutInByte); /*ANNECY BBB proto*/
extern CPA_EXPORT void GLI_ZBufferClearNearestAndCompareInverted();
extern CPA_EXPORT void GLI_ZBufferCompareRestored();
extern CPA_EXPORT void GLI_ClearZBufferRegion(long lXStart,long lXEnd,long lYStart,long lYEnd);
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* LIGHT_H*/

View File

@@ -0,0 +1,132 @@
#ifndef CAMERAH
#define CAMERAH
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "util.h"
typedef struct GLI_tdstCamera_
{
long lSizeOfThis;
long lTypeOfThis;
long lCameraMode;
POS_tdstCompletePosition stMatrix;
MTH_tdxReal xAlphaX;
MTH_tdxReal xAlphaY;
GLI_tdxValue xNear;
GLI_tdxValue xFar;
GLI_tdxValue xScreen;
GLI_tdst2DVertex stScale;
GLI_tdst2DVertex stTrans;
long lVptInitialHeight;
long lVptInitialWidth;
MTH3D_tdstVector stNormPlaneLeft;
MTH_tdxReal xDistPlaneLeft;
MTH3D_tdstVector stNormPlaneRight;
MTH_tdxReal xDistPlaneRight;
MTH3D_tdstVector stNormPlaneUp;
MTH_tdxReal xDistPlaneUp;
MTH3D_tdstVector stNormPlaneDown;
MTH_tdxReal xDistPlaneDown;
MTH_tdxReal xRatio ;
}
GLI_tdstCamera ;
/* For DLL using these function :*/
#include "cpa_expt.h"
#define GLI_C_lIsoCamWithDistorsion 100
#define GLI_C_lIsoCamWithoutDistorsion 101
#define GLI_C_lPersCamWithDistorsion 102
#define GLI_C_lPersCamWithoutDistorsion 103
#define GLI_C_xZClippingNear GLI_M_FloatToValue ( 0.25f )
extern CPA_EXPORT void
GLI_xCreateCamera ( struct GLI_tdstCamera_ **h_stCam ,
long lCameraMode ) ;
extern CPA_EXPORT void
GLI_xSetCameraNearFar ( struct GLI_tdstCamera_ *p_stCam ,
MTH_tdxReal xNear ,
MTH_tdxReal xFar );
extern CPA_EXPORT void
GLI_xGetCameraNearFar ( struct GLI_tdstCamera_ *p_stCam ,
GLI_tdxValue *p_xNear ,
GLI_tdxValue *p_xFar );
extern CPA_EXPORT void
GLI_xGetCameraMatrix ( struct GLI_tdstCamera_ *p_stCam ,
struct POS_stCompletePosition *p_stMatrix ) ;
extern CPA_EXPORT void
GLI_xSetCameraMatrix ( struct GLI_tdstCamera_ *p_stCam ,
struct POS_stCompletePosition *p_stMatrix ) ;
extern CPA_EXPORT void
GLI_xSetViewportCamera ( GLD_tdhDevice, GLD_tdhViewport,
struct GLI_tdstCamera_ * ) ;
extern CPA_EXPORT void
GLI_xGetViewportCamera ( GLD_tdhDevice hDevice,
GLD_tdhViewport hViewport,
struct GLI_tdstCamera_ **p_stCam );
extern CPA_EXPORT void
GLI_xSetCameraAspectAndRatio ( struct GLI_tdstCamera_ *p_stCam ,
MTH_tdxReal xAlphaX ,
MTH_tdxReal xRatio ) ;
extern CPA_EXPORT void
GLI_xGetCameraAspectAndRatio ( struct GLI_tdstCamera_ *p_stCam ,
MTH_tdxReal *p_xAlphaX ,
MTH_tdxReal *p_xRatio ) ;
extern CPA_EXPORT void
GLI_xSetCameraRatio ( struct GLI_tdstCamera_ *p_stCam ,
MTH_tdxReal xRatio ) ;
extern CPA_EXPORT void
GLI_xGetCameraRatio ( struct GLI_tdstCamera_ *p_stCam ,
MTH_tdxReal *p_xRatio ) ;
extern CPA_EXPORT void
GLI_xGetCameraMode ( struct GLI_tdstCamera_ *p_stCam , long *p_lMode);
extern CPA_EXPORT void
GLI_xSetCameraMode ( struct GLI_tdstCamera_ *p_stCam , long lMode);
extern CPA_EXPORT void
GLI_xAdjustCameraToViewport ( GLD_tdhDevice hDevice,
GLD_tdhViewport hViewport,
struct GLI_tdstCamera_ *p_stCam ) ;
extern CPA_EXPORT void
GLI_xAdjustCameraToViewport2 ( GLD_tdstDeviceAttributes *p_stDev,
GLD_tdstViewportAttributes *p_stVpt,
GLI_tdstCamera *p_stCam ) ;
extern CPA_EXPORT void
GLI_vCopyCamera ( struct GLI_tdstCamera_ *p_stCamDest ,struct GLI_tdstCamera_ *p_stCamSource );
extern CPA_EXPORT struct GLI_tdstCamera_ *
GLI_xDuplicateCamera ( struct GLI_tdstCamera_ *p_stCamSource );
extern CPA_EXPORT void GLI_xGetCameraTransXY(struct GLI_tdstCamera_ *p_stCam , MTH_tdxReal *p_xX , MTH_tdxReal *p_xY);
extern CPA_EXPORT void GLI_xSetCameraTransXY(struct GLI_tdstCamera_ *p_stCam , MTH_tdxReal *p_xX , MTH_tdxReal *p_xY);
extern CPA_EXPORT void GLI_xMulCameraScale(struct GLI_tdstCamera_ *p_stCam , MTH_tdxReal xCoef);
extern CPA_EXPORT MTH_tdxReal GLI_xGetCameraFocalizationPoint(struct GLI_tdstCamera_ *p_stCam , MTH_tdxReal xDistanceZ);
extern CPA_EXPORT MTH_tdxReal GLI_xGetCameraFocalizationPlane(struct GLI_tdstCamera_ *p_stCam );
/*ANNECY JMD 24/02/98{*/
extern CPA_EXPORT void GLI_vGet3DVertexFromScreenPos ( GLD_tdstViewportAttributes *p_stVpt,MTH3D_tdstVector *p_stVertex,MTH_tdxReal xX, MTH_tdxReal xY, MTH_tdxReal xSize ) ;
/*ENDANNECY JMD }*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif

View File

@@ -0,0 +1,30 @@
#ifndef GLIERR_H
#define GLIERR_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GLI_C_BaseErr 4096
#define GLI_C_NoErr 0
#define GLI_C_NotEnoughMemory ( 1 + GLI_C_BaseErr )
#define GLI_C_UnduplicableObject ( 2 + GLI_C_BaseErr )
#define GLI_C_SendObjectToUnassociateViewport ( 3 + GLI_C_BaseErr )
#define GLI_C_NullObjext ( 4 + GLI_C_BaseErr )
#define GLI_C_ErrorOpenFile (100+GLI_C_BaseErr) /*Erreur d'ouverture de fichier*/
#define GLI_C_ErrorBadFile (101+GLI_C_BaseErr) /*Mauvais type de fichier*/
#define GLI_C_ErrorReadFile (102+GLI_C_BaseErr) /*Erreur de lecture de fichier*/
#define GLI_C_UnfindableFile (103+GLI_C_BaseErr)
#define GLI_C_EndOfFile (104+GLI_C_BaseErr)
#define GLI_C_ErrorCloseFile (105+GLI_C_BaseErr)
#define GLI_C_BadVersionFile (106+GLI_C_BaseErr)
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLIERR_H*/

View File

@@ -0,0 +1,298 @@
/*
=======================================================================================
Name : light.h
Description : proto for light functions
=======================================================================================
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef LIGHT_H
#define LIGHT_H
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
struct GLI_tdstInternalGlobalValuesFor3dEngine_;
#include "cpa_expt.h"
#include "GLI\GLI_Defn.h" /*pour ISI_tdstColor*/
#include "util.h"
#include "GEO.h"
#include "GLD.h"
#include "SAI.h"
#ifndef LIGHT_ST_H
typedef struct GLI_tdstLight_ GLI_tdstLight;
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*
=======================================================================================
Constants
=======================================================================================
*/
/*
* type of ligth
*/
#define GLI_C_lParallelLight 1
#define GLI_C_lSphericalLight 2
#define GLI_C_lHotSpotLight 3
#define GLI_C_lAmbientLight 4
#define GLI_C_lParallelLight_With_Limit 5
#define GLI_C_lFogLight 6
/*
* what is Lighted
*/
#define GLI_C_LightMap 0x01
#define GLI_C_LightPerso 0x02
/*
* state of ligth
*/
#define GLI_C_ActivateLight 1
#define GLI_C_DisactivateLight 0
/*
* number max of fog at same time
*/
#define GLI_C_lMaxFog 16
/*
=======================================================================================
Structure
=======================================================================================
*/
/*
* to store fog parameter
*/
typedef struct tdstFogParams_
{
MTH_tdxReal xDepthStart;
MTH_tdxReal xDepthEnd;
MTH_tdxReal xInfinite;
MTH_tdxReal xBlendStart;
MTH_tdxReal xBlendEnd;
GEO_tdstColor stColor;
} tdstFogParams;
/*
=======================================================================================
Globals
=======================================================================================
*/
/*
* for fog
*/
extern CPA_EXPORT char GLI_cGlobalFogIsOn;
extern CPA_EXPORT MTH_tdxReal GLI_xFogNear;
extern CPA_EXPORT MTH_tdxReal GLI_xFogFar;
extern CPA_EXPORT MTH_tdxReal GLI_xFogInfinite;
extern CPA_EXPORT MTH_tdxReal GLI_xFogBlendNear;
extern CPA_EXPORT MTH_tdxReal GLI_xFogBlendFar;
/*YLG*/
extern CPA_EXPORT GEO_tdstColor GLI_stFogColor;
extern CPA_EXPORT ACP_tdxBool GLI_g_bSaveFog;
extern CPA_EXPORT tdstFogParams GLI_g_stSaveFog;
extern CPA_EXPORT tdstFogParams GLI_g_stGlobalFog;
extern CPA_EXPORT tdstFogParams GLI_ga_stFogTable[ GLI_C_lMaxFog ];
extern CPA_EXPORT tdstFogParams *GLI_gp_stLastFog;
extern CPA_EXPORT tdstFogParams *GLI_gp_stActiveFog;
extern CPA_EXPORT tdstFogParams *GLI_gp_stLastComputedFog;
extern CPA_EXPORT GLI_tdstLight *GLI_pstCurrentFogLight ;
extern CPA_EXPORT long GLI_lUseGlobalFog ;
extern float xZDepthStart,xZDepthEnd;
extern ACP_tdxIndex xFogIsOn;
extern GEO_tdstColor stColorDepthCuing;
/*
* for PLG files
*/
#ifdef ACTIVE_EDITOR
extern ISI_tdstObjectColorStruct m_ObjectColorStruct;
#endif
/*
=======================================================================================
Manage with table of active light for charachter
=======================================================================================
*/
extern CPA_EXPORT void GLI_vResetTableOfActiveLightsForChar(char _cValue);
void GLI_vSetLightActivityForChar( int iNum, unsigned char ucState );
ACP_tdxBool GLI_bIsLightActiveForChar( int iNum );
ACP_tdxBool GLI_bDoesLightAffectBV( GLI_tdstLight * p_stLight, MTH3D_tdstVector * p_stCenter, MTH_tdxReal xRadius );
/*
=======================================================================================
ZBuffer
=======================================================================================
*/
extern CPA_EXPORT long GLI_vIsLightZbufferLight(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_vSetLightAsZBufferLight(struct GLI_tdstLight_ *p_stLight , long bEnbleDisable);
extern CPA_EXPORT long GLI_bAssignZBufferToLight(struct GLI_tdstLight_ *p_stLight , long lZBufferSizeX,long lZBufferSizeY,float *p_ZBuffer);
extern CPA_EXPORT long GLI_lCreateZBufferForLight(void **p_BufferToCreate, long lSizeX,long lSizeY,struct GLI_tdstLight_ *p_stLight );
extern CPA_EXPORT BOOL GLI_bLightBufferisNotBuilding(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT float *GLI_p_GetPtrOfZBuffer(struct GLI_tdstLight_ *p_stLight , long lFaceNumberOfCubeForSphericalLight);
extern CPA_EXPORT long GLI_p_GetNumberOfIterationForBuildZBufferOfALight(struct GLI_tdstLight_ *p_stLight );
/*
=======================================================================================
List of ligth
=======================================================================================
*/
extern CPA_EXPORT void GLI_vAddLightToViewport(struct GLD_tdstViewportAttributes_ *p_stVpt , struct GLI_tdstLight_ *p_stLight );
extern CPA_EXPORT void GLI_vPopLightsInViewport(struct GLD_tdstViewportAttributes_ *p_stVpt , unsigned long lNbLightsToPop);
extern CPA_EXPORT void GLI_xSetViewportLightsOnOff(unsigned char bOnOff);
extern CPA_EXPORT void GLI_vClearListOfLightInViewport (struct GLD_tdstViewportAttributes_ *p_stVpt);
/*
=======================================================================================
Creation of light
=======================================================================================
*/
extern CPA_EXPORT void GLI_xCreateLight ( struct GLI_tdstLight_ **h_stLight , long lTypeOfThis ) ;
extern CPA_EXPORT void GLI_vCopyLight(struct GLI_tdstLight_ *p_stLightDst,struct GLI_tdstLight_ *p_stLightSrc);
extern CPA_EXPORT unsigned long GLI_ulGetLightSize();
/*
=======================================================================================
Save light
=======================================================================================
*/
extern CPA_EXPORT void GLI_vStoreLightForInit(struct GLI_tdstLight_ *p_stLight,SAI_tdeFlags eUserFlags);
extern CPA_EXPORT void GLI_vRemoveLightForInit(struct GLI_tdstLight_ *p_stLight,SAI_tdeFlags eUserFlags);
extern CPA_EXPORT void GLI_vReInitLight(struct GLI_tdstLight_ *p_stLight,SAI_tdeFlags eUserFlags);
/*
=======================================================================================
Ligth structure access function
=======================================================================================
*/
extern CPA_EXPORT void GLI_vComputeLight_SphereBox (struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_xSetLightState ( struct GLI_tdstLight_ *p_stLight , long b_lOnOff ) ;
extern CPA_EXPORT void GLI_xGetLightState ( struct GLI_tdstLight_ *p_stLight , long *pb_lOnOff ) ;
extern CPA_EXPORT void GLI_xSetLightColor ( struct GLI_tdstLight_ *p_stLight , struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xGetLightColor ( struct GLI_tdstLight_ *p_stLight , struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xGetLightMatrix ( struct GLI_tdstLight_ *p_stLight , struct POS_stCompletePosition *p_stMatrix ) ;
extern CPA_EXPORT void GLI_xSetLightMatrix ( struct GLI_tdstLight_ *p_stLight , struct POS_stCompletePosition *p_stMatrix ) ;
extern CPA_EXPORT MTH3D_tdstVector *GLI_p_stGetLightTranslation(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_vSetLightNearFar ( struct GLI_tdstLight_ *p_stLight , MTH_tdxReal xNear, MTH_tdxReal xFar ) ;
extern CPA_EXPORT void GLI_vGetLightNearFar ( struct GLI_tdstLight_ *p_stLight , MTH_tdxReal *p_xNear, MTH_tdxReal *p_xFar ) ;
extern CPA_EXPORT void GLI_vSetLightAlphas ( struct GLI_tdstLight_ *p_stLight , MTH_tdxReal xLittleAlpha, MTH_tdxReal xBigAlpha);
extern CPA_EXPORT void GLI_vGetLightAlphas ( struct GLI_tdstLight_ *p_stLight , MTH_tdxReal *p_xLittleAlpha, MTH_tdxReal *p_xBigAlpha);
extern CPA_EXPORT long GLI_lGetLightType(struct GLI_tdstLight_ *p_stLight );
extern CPA_EXPORT void GLI_vSetLightType (struct GLI_tdstLight_ *p_stLight ,long lNewType);
extern CPA_EXPORT void GLI_vSetPaintingLightFlag (struct GLI_tdstLight_ *p_stLight, long bIsPainting) ;
extern CPA_EXPORT unsigned char GLI_ucGetPaintingLightFlag (struct GLI_tdstLight_ *p_stLight) ;
extern CPA_EXPORT void GLI_vSetPaintLight( struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_vSetAlphaLightFlag (struct GLI_tdstLight_ *p_stLight, long bIsAlpha) ;
extern CPA_EXPORT unsigned char GLI_ucGetAlphaLightFlag (struct GLI_tdstLight_ *p_stLight) ;
extern CPA_EXPORT void GLI_vSetAlphaLight(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_xSetLightBackgroundColor ( struct GLI_tdstLight_ *p_stLight , struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xGetLightBackgroundColor ( struct GLI_tdstLight_ *p_stLight , struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_vSetLight_Intensity_Min_Max (struct GLI_tdstLight_ *p_stLight , MTH_tdxReal xIntensity_Min, MTH_tdxReal xIntensity_Max );
extern CPA_EXPORT void GLI_vGetLight_Intensity_Min_Max (struct GLI_tdstLight_ *p_stLight , MTH_tdxReal * xIntensity_Min, MTH_tdxReal * xIntensity_Max );
extern CPA_EXPORT void GLI_vSetLight_Exter_Max_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector xExter_Max_Pos);
extern CPA_EXPORT void GLI_vSetLight_Exter_Min_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector xExter_Min_Pos);
extern CPA_EXPORT void GLI_vSetLight_Inter_Max_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector xInter_Max_Pos);
extern CPA_EXPORT void GLI_vSetLight_Inter_Min_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector xInter_Min_Pos);
extern CPA_EXPORT void GLI_vGetLight_Exter_Max_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector *xExter_Max_Pos);
extern CPA_EXPORT void GLI_vGetLight_Exter_Min_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector *xExter_Min_Pos);
extern CPA_EXPORT void GLI_vGetLight_Inter_Max_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector *xInter_Max_Pos);
extern CPA_EXPORT void GLI_vGetLight_Inter_Min_Pos (struct GLI_tdstLight_ *p_stLight , MTH3D_tdstVector *xInter_Min_Pos);
extern CPA_EXPORT unsigned char GLI_ucGetObjectLighted( struct GLI_tdstLight_ *p_stLight) ;
extern CPA_EXPORT void GLI_vSetLightMap( struct GLI_tdstLight_ *p_stLight , unsigned char bLightMap) ;
extern CPA_EXPORT void GLI_vSetLightPerso( struct GLI_tdstLight_ *p_stLight , unsigned char bLightPerso) ;
extern CPA_EXPORT void GLI_vSetObjectLighted( struct GLI_tdstLight_ *p_stLight , unsigned char ucObjectLighted) ;
extern CPA_EXPORT void GLI_fn_vFogSetNear(struct GLI_tdstLight_ *p_stLight, MTH_tdxReal);
extern CPA_EXPORT MTH_tdxReal GLI_fn_xFogGetNear(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_fn_vFogSetFar(struct GLI_tdstLight_ *p_stLight, MTH_tdxReal);
extern CPA_EXPORT MTH_tdxReal GLI_fn_xFogGetFar(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_fn_vFogSetInfinite(struct GLI_tdstLight_ *p_stLight, MTH_tdxReal);
extern CPA_EXPORT MTH_tdxReal GLI_fn_xFogGetInfinite(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_fn_vFogSetBlendNear(struct GLI_tdstLight_ *p_stLight, MTH_tdxReal);
extern CPA_EXPORT MTH_tdxReal GLI_fn_xFogGetBlendNear(struct GLI_tdstLight_ *p_stLight);
extern CPA_EXPORT void GLI_fn_vFogSetBlendFar(struct GLI_tdstLight_ *p_stLight, MTH_tdxReal);
extern CPA_EXPORT MTH_tdxReal GLI_fn_xFogGetBlendFar(struct GLI_tdstLight_ *p_stLight);
/*
=======================================================================================
compute light
=======================================================================================
*/
extern CPA_EXPORT void GLI_vSendObjectToLights
(
struct GLI_tdstLight_ **p_stLight ,
struct GEO_tdstGeometricObject_ *p_stObject ,
struct GEO_tdstColor_ *p_stColorRLID ,
struct GEO_tdstColor_ *p_stColorRLIS ,
struct GEO_tdstColor_ *p_stColorRLIA ,
long lNumberOfLights,
struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobaleMT
);
/*
=======================================================================================
Other (RLI buffer, Init)
=======================================================================================
*/
extern CPA_EXPORT void GLI_vSpecularOn();
extern CPA_EXPORT void GLI_vSpecularOff();
void GLI_vCopyRLI2ComputeBuffer(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters, GEO_tdstColor *p_stColorRLID , long xStart , long lNumber);
void GLI_vCopyRLI2ComputeBufferISI(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters, ISI_tdstColor *p_stColorRLID , long xStart , long lNumber);
void GLI_vInitSpecularAndAmbiamt(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobaleMT );
/*
=======================================================================================
fog ( in fog.c )
=======================================================================================
*/
extern CPA_EXPORT void GLI_vSetFog (GLI_tdxValue xDepthStart, GLI_tdxValue xDepthEnd, GLI_tdxValue xInfinite , GEO_tdstColor *p_stFogColor);
extern CPA_EXPORT void GLI_vSetFog2(GLI_tdxValue xBlendStart, GLI_tdxValue xDepthStart, GLI_tdxValue xBlendEnd, GLI_tdxValue xDepthEnd, GLI_tdxValue xInfinite, GEO_tdstColor *p_stFogColor);
extern CPA_EXPORT void GLI_vGetFog(GLI_tdxValue *p_xDepthStart, GLI_tdxValue *p_xDepthEnd, GEO_tdstColor *p_stFogColor);
extern CPA_EXPORT void GLI_vFogOn();
extern CPA_EXPORT void GLI_vFogOff();
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* LIGHT_H*/

View File

@@ -0,0 +1,26 @@
#ifndef GLI_LINES_H
#define GLI_LINES_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
/***************************************************************************************/
/* Name: GLI_xDraw3DLine16 */
/* Goal: project,clip & draw a 3d line */
/* Code: Elie Khoury / 1.0*/
/* OPTIMMIZED : no*/
/***************************************************************************************/
extern CPA_EXPORT void
GLI_xDraw3DLine16 ( struct GLD_tdstViewportAttributes_ *p_stVpt,
MTH3D_tdstVector *,
MTH3D_tdstVector *,
long lColor );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_LINES_H*/

View File

@@ -0,0 +1,113 @@
/**************
LOAD.H
Ver 2.1
***************/
#ifndef _LOAD_H_
#define _LOAD_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "SCR.h"
#ifdef EXTERN_GLI
#undef EXTERN_GLI
#endif
#ifdef MAIN_GLI
#define EXTERN_GLI
#else
#define EXTERN_GLI extern
#endif
/*HP 03/03/98*/
#if !defined(U64)
#define GLI_C_SectionTexture "Texture"
#define GLI_C_SectionVisualMaterial "Material"
#define GLI_C_SectionGeometric "Geometric"
#define GLI_C_SectionPhysical "Physical"
#define GLI_C_SectionSpecialEffect "SpecialEffect"
#define GLI_C_SectionElementIndexedTriangles "ElementIndexedTriangles"
#define GLI_C_SectionElementFaceMapDescriptors "ElementFaceMapDescriptors"
#define GLI_C_SectionElementSprites "ElementSprites"
#define GLI_C_SectionElementTMeshes "ElementTMeshes"
#define GLI_C_SectionElementLines "ElementLines"
#define GLI_C_SectionElementSpheres "ElementSpheres"
#define GLI_C_SectionElementAlignedBoxes "ElementAlignedBoxes"
#define GLI_C_SectionElementPoints "ElementPoints"
#define GLI_C_SectionElementCones "ElementCones"
#ifdef USE_ALTIMAPS
/*--- Marc FASCIA - Annecy - 12/02/1998 ---*/
#define GLI_C_SectionElementAltimap "ElementAltimap"
#endif /*USE_ALTIMAPS*/
#define GLI_C_SectionFaceMapDescriptor "FaceMapDescriptor"
#define GLI_C_SectionSprite "Sprite"
/*=============*/
/* STRUCTURES */
/*=============*/
typedef struct GLI_tdstGeometricInfo_
{
char a_cFileName[255];
char a_cSectionName[255];
ACP_tdxHandleOfObject hObject;
} GLI_tdstGeometricInfo;
/*===========================================================*/
/* FONCTIONS UTILISEES POUR LE CHARGEMENT D'OBJET GRAPHIQUE */
/*===========================================================*/
extern CPA_EXPORT ACP_tdxHandleOfObject GLI_pLoadGeometricInFile(char *szGeometricName);
extern CPA_EXPORT ACP_tdxHandleOfObject GLI_pLoadBinGeometricInFile(char *szGeometricName);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadGeometric(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementIndexedTriangles(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementFaceMapDescriptors(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementSprites(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementLines(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementSpheres(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementAlignedBoxes(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementPoints(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
#ifdef USE_ALTIMAPS
/*--- Marc FASCIA - Annecy - 12/02/1998 ---*/
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementAltimap(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
#endif /*USE_ALTIMAPS*/
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadMaterial(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadFaceMapDescriptor(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadSprite(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue GLI_xLoadElementTMeshes(SCR_tdst_File_Description *p_fFile, char *szAction, char *szParams[], SCR_tde_Anl_Action cType);
/*============================================================*/
/* FONCTIONS UTILISEES POUR LE CHARGEMENT D'UN FICHIER ENTIER */
/*============================================================*/
extern CPA_EXPORT void GLI_vLoadMODFile(char *szPathName, char *szFileName, GLI_tdstGeometricInfo **h_xGeometricInFile, ACP_tdxIndex *p_xNbGeometric);
#endif /* U64 */
extern CPA_EXPORT void GLI_vInitLoad();
extern CPA_EXPORT double GLI_dGetFileVersion(char *szGeometricFile);
extern CPA_EXPORT double GLI_dGetUnitInMeterInFile(char *szGeometricFile);
extern CPA_EXPORT void GLI_vSetPathOfTexture(char *szLoadPath);
extern CPA_EXPORT char *GLI_fn_szGetPathOfTexture(void);
/*================================================*/
/* FONCTIONS UTILISEES POUR LA SAUVEGARDE BINAIRE */
/*================================================*/
extern CPA_EXPORT void GLI_fn_vPrepareSaveMaterialBinaryBloc();
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* _LOAD_H_ */

View File

@@ -0,0 +1,102 @@
#ifndef GLI_MATERIAL_H
#define GLI_MATERIAL_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
struct GEO_tdstColor_;
/* For DLL using these function :*/
#include "cpa_expt.h"
extern CPA_EXPORT void GLI_xCreateMaterial( ACP_tdxHandleOfMaterial *p_hMaterial ) ;
extern CPA_EXPORT void GLI_xDeleteMaterial( ACP_tdxHandleOfMaterial hMaterial );
extern CPA_EXPORT void GLI_xDuplicateMaterial( ACP_tdxHandleOfMaterial *p_hDest, ACP_tdxHandleOfMaterial p_hSource ) ;
extern CPA_EXPORT void GLI_xSetMaterialAmbientCoef( ACP_tdxHandleOfMaterial hMaterial, struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xGetMaterialAmbientCoef( ACP_tdxHandleOfMaterial hMaterial, struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xSetMaterialDiffuseCoef( ACP_tdxHandleOfMaterial hMaterial, struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xGetMaterialDiffuseCoef( ACP_tdxHandleOfMaterial hMaterial, struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xSetMaterialSpecularCoef( ACP_tdxHandleOfMaterial hMaterial, long lSpecularExponent, struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xGetMaterialSpecularCoef( ACP_tdxHandleOfMaterial hMaterial, long *p_lSpecularExponent, struct GEO_tdstColor_ *p_stColor ) ;
extern CPA_EXPORT void GLI_xGetMaterialType( ACP_tdxHandleOfMaterial hMaterial, unsigned long *xMType );
extern CPA_EXPORT void GLI_xSetMaterialType( ACP_tdxHandleOfMaterial hMaterial, unsigned long xMType );
extern CPA_EXPORT void GLI_xSetMaterialTexture( ACP_tdxHandleOfMaterial hMaterial, struct GLI_tdstTexture_ *p_stTexture );
extern CPA_EXPORT void GLI_xGetMaterialTexture( ACP_tdxHandleOfMaterial hMaterial, struct GLI_tdstTexture_ **p_stTexture );
extern CPA_EXPORT void GLI_xSetMaterialColor( ACP_tdxHandleOfMaterial hMaterial, struct GEO_tdstColor_ *p_stColor );
extern CPA_EXPORT void GLI_xGetMaterialColor( ACP_tdxHandleOfMaterial hMaterial, struct GEO_tdstColor_ *p_stColor );
extern CPA_EXPORT long GLI_xIsMaterialTransparent ( ACP_tdxHandleOfMaterial hMaterial );
extern CPA_EXPORT long GLI_bIsMaterialChromed ( ACP_tdxHandleOfMaterial hMaterial );
extern CPA_EXPORT void GLI_vSetMaterialAsChromed ( ACP_tdxHandleOfMaterial hMaterial , long lTextureNumber );
extern CPA_EXPORT long GLI_bIsMaterialBackface ( ACP_tdxHandleOfMaterial hMaterial );
extern CPA_EXPORT void GLI_xSetMaterialTextureScrollingOnOff( ACP_tdxHandleOfMaterial hMaterial,long bSwitch);
extern CPA_EXPORT void GLI_xSetMaterialTextureScrollingCoef( ACP_tdxHandleOfMaterial hMaterial , long lNumberOfTexture , long bSwitch , float fUSpeed , float fVSpeed ) ;
extern CPA_EXPORT void GLI_xSetMaterialTextureDecalage( ACP_tdxHandleOfMaterial hMaterial , long lNumberOfTexture , long bSwitch , float fUSpeed , float fVSpeed ) ;
extern CPA_EXPORT void GLI_xGetMaterialTextureScrollingCoef( ACP_tdxHandleOfMaterial hMaterial , long lNumberOfTexture , long *p_bSwitch , float *p_fUSpeed , float *p_fVSpeed );
extern CPA_EXPORT void GLI_xRefreshAnimatedTexture( ACP_tdxHandleOfMaterial hMaterial );
extern CPA_EXPORT void GLI_vAddMaterialAnimatedTexture( ACP_tdxHandleOfMaterial hMaterial, long lNumberOfAnimatedTexture, struct GLI_tdstTexture_ *p_stTexture ,float fExpositionTimeInSeconds);
extern CPA_EXPORT long GLI_lGetMaterialNumberOfAnimatedTexture( ACP_tdxHandleOfMaterial hMaterial );
extern CPA_EXPORT void GLI_vGetMaterialAnimatedTexture( ACP_tdxHandleOfMaterial hMaterial , long lNumberOfAnimatedTexture,struct GLI_tdstTexture_ **h_stTexture ,float *p_fDisplayTime);
extern CPA_EXPORT void GLI_vModifyMaterialAnimatedTexture( ACP_tdxHandleOfMaterial hMaterial , long lNumberOfAnimatedTexture,struct GLI_tdstTexture_ *p_stTexture ,float fDisplayTime);
/* Functions to lock and unlock an animated texture*/
extern CPA_EXPORT void GLI_vLockAnimatedTexture(ACP_tdxHandleOfMaterial _hMaterial);
extern CPA_EXPORT void GLI_vUnLockAnimatedTexture(ACP_tdxHandleOfMaterial _hMaterial);
extern CPA_EXPORT void GLI_vSetCurrentAnimatedTextureNumber( ACP_tdxHandleOfMaterial hMaterial, long lTextureNumber ); /* For AI*/
extern CPA_EXPORT long GLI_lGetCurrentAnimatedTextureNumber( ACP_tdxHandleOfMaterial hMaterial ); /* For AI*/
extern CPA_EXPORT void GLI_vDeleteMaterialAnimatedTexture( ACP_tdxHandleOfMaterial hMaterial , long lNumberOfAnimatedTexture);
/*VLMT*/
/*
* new functions to take care of multitexture purpose
*/
#ifdef MULTI_TEXTURE
void GLI_Material_fn_vInitMultiTexturePart( ACP_tdxHandleOfMaterial _hVisualMat );
long GLI_Material_fn_lSetTexture( ACP_tdxHandleOfMaterial _hVisualMat, long _lIndex, struct GLI_tdstTexture_ *_p_stTexture );
long GLI_Material_fn_lSetTextureOp( ACP_tdxHandleOfMaterial _hVisualMat, long _lIndex, long _lTextureOp );
long GLI_Material_fn_lSetUVFunction( ACP_tdxHandleOfMaterial _hVisualMat, long _lCanal, long _lFunc, float _fScaleU, float _fScaleV, float _fAlphaSpeed, float _fAlpha, float _fSpeedU, float _fSpeedV, float _fOffsetU, float _fOffsetV );
long GLI_Material_fn_lSetTextureOpWithString( ACP_tdxHandleOfMaterial _hVisualMat, long _lIndex, char *_szOpString );
long GLI_Material_fn_lSetUVFuncWithString( ACP_tdxHandleOfMaterial _hVisualMat, long _lCanal, char *_szFuncString, float _fScaleU, float _fScaleV, float _fAlphaSpeed, float _fAlpha, float _fSpeedU, float _fSpeedV, float _fOffsetU, float _fOffsetV );
#else
#define GLI_Material_fn_vInitMultiTexturePart( a )
#define GLI_Material_fn_lSetTexture( a, b, c )
#define GLI_Material_fn_lSetTextureOp( a, b, c )
#define GLI_Material_fn_lSetUVFunction( a, b, c, d, e, f, g, h, i, j, k )
#define GLI_Material_fn_lSetTextureOpWithString( a, b, c )
#define GLI_Material_fn_lSetUVFuncWithString( a, b, c, d, e, f, g, h, i, j, k )
#endif /*MULTI_TEXTURE*/
/* For binarisation purposes */
/*extern CPA_EXPORT void GLI_fn_vPrepareSaveMaterialBinaryBloc();*/
/*extern CPA_EXPORT void GLI_fn_vResolveMaterialBinaryBloc(unsigned long _ulStructAddress);*/
/*extern CPA_EXPORT unsigned long GLI_fn_ulWriteMaterialBinaryBloc(unsigned long _ulStructAddress, char* _p_cDestBuffer);*/
/*----------------------------------------------------------------------------
// Description : GLI_fn_vWriteAllVisualMaterialBinaryBlocs
//----------------------------------------------------------------------------
// Input : _szBinaryFileName
// Output :
----------------------------------------------------------------------------*/
/*extern CPA_EXPORT void GLI_fn_vWriteAllVisualMaterialBinaryBlocs(char* _szBinaryFileName);*/
/*extern CPA_EXPORT void TEX_fn_vWriteAllTextureBinaryBlocs(char* _szBinaryFileName);*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_MATERIAL_H*/

View File

@@ -0,0 +1,54 @@
#ifndef GLI_MATSTACK_H
#define GLI_MATSTACK_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "POS.h"
EXTERN_GLI POS_tdstCompletePosition *g_p_stCurrentMatrix ;
#if !defined (U64) /* Oliv' - 26/06/1998*/
#define GLI_C_lMaxMatrixInStack 100
#define GLI_C_lStackFull 200
#define GLI_C_lStackEmpty 201
EXTERN_GLI POS_tdstCompletePosition g_aDEF_stMatrixStack [ GLI_C_lMaxMatrixInStack ] ;
EXTERN_GLI long g_lNbMatrixInStack ;
extern CPA_EXPORT void
GLI_xInitMatrixStack ( void ) ; /*marc*/
extern CPA_EXPORT void
GLI_xPushMatrix ( POS_tdstCompletePosition *p_stMatrix ) ;
extern CPA_EXPORT void
GLI_xPrePushMatrix ( POS_tdstCompletePosition *p_stMatrix ) ;/*NZO*/
extern CPA_EXPORT void
GLI_xPopMatrix ( void ) ;
extern CPA_EXPORT void
GLI_xLoadMatrix ( POS_tdstCompletePosition *p_stMatrix ) ;
extern CPA_EXPORT void
GLI_xResetMatrixStack ( void ) ;
extern CPA_EXPORT void
GLI_xLoadAndResetMatrix ( POS_tdstCompletePosition *p_stMatrix ) ;
#endif /* U64 */ /* Oliv' - 26/06/1998*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_MATSTACK_H*/

View File

@@ -0,0 +1,104 @@
#ifndef OBJECTH
#define OBJECTH
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
struct GLI_tdstDataOfElement_;
struct GLI_tdstInternalGlobalValuesFor3dEngine_;
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "gld.h"
#include "GEO.H"
/*#include "GAM\ToolsCPA.h"*/
/*#define C_IndexedTrianglesObject 0xC0DE0001
#define C_lDuplicable 1
#define C_lMobile 2
#define C_lMorphable 4 */
extern CPA_EXPORT void
GLI_xSendObjectToViewportWithLights ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
struct GEO_tdstGeometricObject_ *p_stObj ,
long lDrawModeMask);
extern CPA_EXPORT void
GLI_xSendObjectToViewport ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
struct GEO_tdstGeometricObject_ *p_stObj ,
struct GLI_tdstLight_ *p_stLight ,
long lDrawModeMask);
extern CPA_EXPORT void
GLI_vSetDefaultMaterial ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
ACP_tdxHandleOfMaterial hMaterial);
extern CPA_EXPORT void
GLI_vCreateObjectsReference();
extern CPA_EXPORT long
GLI_lPickSprites ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
struct GEO_tdstGeometricObject_ *p_stObj ,
MTH2D_tdstVector *p_stMouseCoords,
ACP_tdxIndex xNbMaxElements,
ACP_tdxIndex *p_xNbElements,
struct GLI_tdstDataOfElement_ *d_stDataOfElement,
MTH3D_tdstVector *p_stVertexA,
ACP_tdxBool bBack);
extern CPA_EXPORT void
GLI_vDraw2DSprite ( GLD_tdstViewportAttributes *p_stVpt ,
MTH_tdxReal xXPointA,
MTH_tdxReal xXPointB,
MTH_tdxReal xYPointA,
MTH_tdxReal xYPointB,
ACP_tdxHandleOfMaterial hMaterial);
extern CPA_EXPORT void
GLI_vDraw2DSpriteWithUV ( GLD_tdstViewportAttributes *p_stVpt ,
MTH_tdxReal xXMin,
MTH_tdxReal xXMax,
MTH_tdxReal xYMin,
MTH_tdxReal xYMax,
MTH_tdxReal xUMin,
MTH_tdxReal xUMax,
MTH_tdxReal xVMin,
MTH_tdxReal xVMax,
ACP_tdxHandleOfMaterial hMaterial);
extern CPA_EXPORT void
GLI_xSetRLIForNextObjectToDraw ( ISI_tdstColor *p_ListOfRLI,GEO_tdstGeometricObject *p_stObj);
/*extern CPA_EXPORT void
GLI_vSendPOToViewport ( GLD_tdstViewportAttributes *p_stVpt , PO_tdxHandleToPhysicalObject h_stPhysicalObject , long lDrawModeMask);
extern CPA_EXPORT void
GLI_vSendIPOToViewport ( GLD_tdstViewportAttributes *p_stVpt , IPO_tdxHandleToInstanciatedPhysicalObject h_stInstanciablePhysicalObject , long lDrawModeMask );*/
void
GLI_vObjectsEndOfDraw();
extern CPA_EXPORT void GLI_xComputeLightForObject(GEO_tdstGeometricObject *p_stObj,
GEO_tdstColor *Tab_stColor);
extern CPA_EXPORT void GLI_vSetGlobalAlpha(float Alpha);
extern CPA_EXPORT float GLI_vGetGlobalAlpha();
extern CPA_EXPORT ACP_tdxBool GLI_vAdjustCameraToMirror(
ACP_tdxHandleOfObject hHandleOfGometricMirror,
GEO_tdxHandleToMatrix hGlobalMatrixOfMirror,
GEO_tdxHandleToMatrix hGlobalMatrixOfCamera,
struct GLI_tdstCamera_ *pstCamera,
GLD_tdstViewportAttributes *p_stVpt,
long lDrawModeMask);
extern CPA_EXPORT void GLI_vDoMaterialSelection(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobaleMT);
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* OBJECTH*/

View File

@@ -0,0 +1,63 @@
#ifndef GLI_POLYGON_H
#define GLI_POLYGON_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "vertex.h"
#define C_MaxVertexInPolygLine 30
typedef struct GLI_tdstIndexedTriangle_
{
long lA ;
long lB ;
long lC ;
}
GLI_tdstIndexedTriangle ;
typedef struct GLI_tdstSphere_
{
MTH3D_tdstVector stCentre ;
MTH_tdxReal xRadius ;
}
GLI_tdstSphere ;
typedef struct GLI_tdst2DTriangle_
{
GLI_tdst2DVertex stA2DVertex ;
GLI_tdst2DVertex stB2DVertex ;
GLI_tdst2DVertex stC2DVertex ;
}
GLI_tdst2DTriangle ;
typedef struct GLI_tdstTriangle_
{
MTH3D_tdstVector stAVertex ;
MTH3D_tdstVector stBVertex ;
MTH3D_tdstVector stCVertex ;
}
GLI_tdstTriangle ;
typedef struct GLI_tdstPolygLine_
{
long lNbVertex ;
MTH3D_tdstVector aDEF_stVertex[C_MaxVertexInPolygLine] ;
}
GLI_tdstPolygLine ;
typedef struct GLI_tdst2DPolygLine_
{
long lNb2DVertex ;
GLI_tdst2DVertex aDEF_st2DVertex[C_MaxVertexInPolygLine] ;
}
GLI_tdst2DPolygLine ;
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_POLYGON_H*/

View File

@@ -0,0 +1,134 @@
#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*/

View File

@@ -0,0 +1,22 @@
#ifndef SENDH
#define SENDH
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
extern CPA_EXPORT void
GLI_xSendListToViewport ( struct GLD_tdstViewportAttributes_ *p_stVpt ) ;
extern CPA_EXPORT void
GLI_xSendBegin(struct GLD_tdstViewportAttributes_ *p_stVpt) ;
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif

View File

@@ -0,0 +1,81 @@
#ifndef SPRITEH
#define SPRITEH
#ifdef __cplusplus
extern "C"
{
#endif
/* For DLL using these function :*/
#include "cpa_expt.h"
#define GLI_C_lSpriteDrawMode2DScaled 1
#define GLI_C_lSpriteDrawMode2DRotativ 2
#define GLI_C_lSpriteDrawDisable 4
#define GLI_C_lMaxTimeForLensFlare 8
#define GLI_C_MaxLensFlare 10
typedef struct stLensFlareTab_ tdstLensFlareTab ;
struct stLensFlareTab_ {
void *p_vReference[GLI_C_MaxLensFlare] ;
long lApparitionTrame[GLI_C_MaxLensFlare] ;
long lCounter[GLI_C_MaxLensFlare] ;
char bIntersect[GLI_C_MaxLensFlare] ;
long lNumberOfLensFlare ;
} ;
extern CPA_EXPORT void GLI_vSetLensFlareRef ( void *p_vRef ) ;
extern CPA_EXPORT char GLI_cRegisterLensFlare (void *p_vRef) ;
extern CPA_EXPORT void GLI_vUnregisterLensFlare(void *p_vRef) ;
extern CPA_EXPORT long GLI_lLensFlareExist(void *p_vRef) ;
extern CPA_EXPORT void GLI_vInitLensFlare (void) ;
/**********************************************************************************************/
/* Name: GLI_xDrawIndexedSprite*/
/* Goal: */
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
extern CPA_EXPORT void
GLI_vDrawIndexedSprite ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
struct GEO_tdstGeometricObject_ *p_stObj ,
struct GEO_tdstIndexedSprite_ *p_stISpr ,
struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobaleMT);
extern CPA_EXPORT void
GLI_vDraw2DSpriteWithUV ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
MTH_tdxReal xXMin,
MTH_tdxReal xXMax,
MTH_tdxReal xYMin,
MTH_tdxReal xYMax,
MTH_tdxReal xUMin,
MTH_tdxReal xUMax,
MTH_tdxReal xVMin,
MTH_tdxReal xVMax,
ACP_tdxHandleOfMaterial hMaterial);
extern CPA_EXPORT long
/* REM : DO NOT MODIFY THIS FUNCTION, THIS MUST STAY THE COPY OF DRAWINDEXED SPRITE*/
GLI_vPickIndexedSprite ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
struct GEO_tdstGeometricObject_ *p_stObj ,
struct GEO_tdstIndexedSprite_ *p_stISpr ,
MTH2D_tdstVector *p_stScreenCoord,
struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobaleMT);
/*ANNECY VL PRT 18/03/98{*/
extern CPA_EXPORT void GLI_vFastDrawIndexedSprite
(
GLD_tdstViewportAttributes *p_stVpt ,
GEO_tdstGeometricObject *p_stObj ,
GEO_tdstElementSprite *p_stSpriteElem ,
struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobaleMT
);
/*ENDANNECY VL}*/
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif

View File

@@ -0,0 +1,53 @@
#ifndef GLI_TEXTURE_H
#define GLI_TEXTURE_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
#define GLI_C_lTiledTexture 0x00000001
#define GLI_C_lNZTexture 0x00000002
#define GLI_C_lMipMapTexture 0x00000004
#define GLI_C_lAlphaTexture 0x00000008
#define GLI_C_lNZFilteredTexture 0x00000010
#define GLI_C_lAddTransparencyTexture 0x00000020
#define GLI_C_lNoZBufferWriteTexture 0x00000040
#define GLI_C_lPaletteTexture 0x00000080
#define GLI_C_lAlphaTest 0x00000100
#define GLI_C_lAAATexture 0x00000200
#define GLI_C_lMAATexture 0x00000400
/*
* To Indicate that's a PROCEDURAL_TEXTURE
*/
#define GLI_C_lProceduralTexture 0x00000800
#define GLI_C_lTGATexture 0x80000000
#define GLI_C_lBMPTexture 0x40000000
/*
* Procedural_texture type
*/
#define TEXPRO_C_lWater 0
#define TEXPRO_C_lFire 1
#define GLI_C_lNBMaxOfTextures 1024
extern CPA_EXPORT void GLI_xLoadTexture (struct GLI_tdstTexture_ **h_stTexture, struct GLD_tdstDeviceAttributes_ *p_stDev, char *d_ucFileName, long lTextureCaps, long lTextureQuality);
extern CPA_EXPORT void GLI_fn_vOpenBigFileTextures(char *p_szFileName);
extern CPA_EXPORT void GLI_fn_vCloseBigFileTextures(void);
extern CPA_EXPORT void GLI_vRefreshAllCyclingTextures( float fCoefOfMultiplicatoin);
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_TEXTURE_H*/

View File

@@ -0,0 +1,90 @@
#ifndef GLI_UTIL_H
#define GLI_UTIL_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <math.h>
#include "MTH.h"
/*typedef long GLI_tdxErr ;*/
typedef MTH_tdxReal GLI_tdxValue ;
/*typedef float GLI_tdxReal;*/
/*typedef MTH_tdxReal GLI_tdxAngle ;*/
#ifndef __GEO_FMD_H
typedef float GLI_tdxUVValue ;
#endif
/*
* Constant for error
*/
#define C_GLIBASE 4096
#define C_GLINOERROR (0)
#define C_GLINOTENOUGHTMEMORY (C_GLIBASE + 1)
#define GLI_M_FloatToValue(A) MTH_M_xFloatToReal((float)A)
/*#define GLI_M_1616ToValue(A) MTH_M_xFixed16_16ToReal(A)*/
#define GLI_M_ValueToFloat(A) MTH_M_xRealToFloat(A)
/*#define GLI_M_ValueTo1616(A) MTH_M_xRealToFixed16_16(A)*/
/*#define GLI_M_ValueToLong(A) MTH_M_xRealToLong( A )*/
#define GLI_M_LongToValue(A) MTH_M_xLongToReal( A )
#define GLI_M_Mul(A,B) MTH_M_xMul(A, B)
#define GLI_M_Sub(A,B) MTH_M_xSub(A, B)
#define GLI_M_Add(A,B) MTH_M_xAdd(A, B)
#define GLI_M_Div(A,B) MTH_M_xDiv(A, B)
#define GLI_M_Neg(A) MTH_M_xNeg(A)
#define GLI_M_Sgn(A) MTH_M_xSign(A)
#define GLI_M_Inv(A) MTH_M_xInv(A)
#define GLI_M_Abs(A) MTH_M_xAbs(A)
#define GLI_M_Sqrt(A) MTH_M_xSqrt(A)
/*#define GLI_M_DegToAng(A) MTH_M_xDegToRad(A)*/
/*#define GLI_M_AngToRad(A) (MTH_tdxReal)( ( A ) )*/
#define GLI_M_Cos(A) MTH_M_xCos(A)
#define GLI_M_Sin(A) MTH_M_xSin(A)
#define GLI_M_Tan(A) MTH_M_xTan(A)
#define GLI_M_Atan(A) MTH_M_xATan(A)
#define GLI_M_Cotan(A) MTH_M_xCoTan(A)
#define GLI_M_PI MTH_C_Pi
#define GLI_M_2PI MTH_C_2Pi
#define GLI_M_PIO2 MTH_C_PiBy2
#define GLI_M_PIO4 MTH_C_PiBy4
/*
#ifdef EXTERN_GLI
#undef EXTERN_GLI
#endif
#ifdef MAIN_GLI
#define EXTERN_GLI
#else
#define EXTERN_GLI extern
#endif
*/
/*EXTERN_GLI long g_b_lBackFaceOn ;*/
/*EXTERN_GLI long g_b_lSurfacesOn ;*/
/*#ifndef _FIRE_DEADCODE_U64_*/
/*EXTERN_GLI long g_b_lLinesOn ;*/
/*EXTERN_GLI long g_lRenderCount;*/
/*#endif /* _FIRE_DEADCODE_U64_ */
/*typedef struct
GLI_tdstSurfaceDescriptor_
{
void *p_vSurfacePtr;
long lPitch;
long lBytesPerPixel ;
}
GLI_tdstSurfaceDescriptor;
*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_UTIL_H*/

View File

@@ -0,0 +1,62 @@
#ifndef GLI_VERTEX_H
#define GLI_VERTEX_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*#define GLI_tdstVertex_ MTH3D_tdstVector_
#define GLI_tdstVertex MTH3D_tdstVector*/
typedef struct GLI_tdst2DVertex_
{
float xX ;
float xY ;
float xOoZ;
}
GLI_tdst2DVertex ;
/* #define GLI_M_ScreenVertex(p_stGlobaleMT) ((GLI_tdstScreenVertex *)p_stGlobaleMT->gs_aDEF_stDuplicatedScreenVertex) */
/* #define GLI_M_SetVertexX(A,B) MTH3D_M_vSetXofVector(A,B) */
/* #define GLI_M_SetVertexY(A,B) MTH3D_M_vSetYofVector(A,B) */
/* #define GLI_M_SetVertexZ(A,B) MTH3D_M_vSetZofVector(A,B) */
/* #define GLI_M_SetVertexXYZ(A,B,C,D) MTH3D_M_vSetVectorElements(A,B,C,D) */
/* #define GLI_M_GetVertexX(A,B) *(B) = MTH3D_M_xGetXofVector(A) */
/* #define GLI_M_GetVertexY(A,B) *(B) = MTH3D_M_xGetYofVector(A) */
/* #define GLI_M_GetVertexZ(A,B) *(B) = MTH3D_M_xGetZofVector(A) */
/* #define GLI_M_GetVertexXYZ(A,B,C,D) MTH3D_M_vGetVectorElements(B,C,D,A) */ /* WARNING !!! INVERSION OF PARAMS*/
/* #define GLI_M_NullVertex(A) MTH3D_M_vNullVector(A) */
/* #define GLI_M_AddVertex(A,B) MTH3D_M_vAddVector(A,A,B) */
/* #define GLI_M_SubVertex(A,B) MTH3D_M_vSubVector(A,A,B) */
/* #define GLI_M_ScaleVertex(A,B)\
(A)->xX = GLI_M_Mul( (A)->xX , (B)->xX ) ; \
(A)->xY = GLI_M_Mul( (A)->xY , (B)->xY ) ; \
(A)->xZ = GLI_M_Mul( (A)->xZ , (B)->xZ ) */ /* WARNING A FAIRE : AJOUTER A MTH !!!! */
/* #define GLI_M_MulVertex(A,B) MTH3D_M_vMulScalarVector(A,B,A) */
/* #define GLI_M_DotProduct(A,B) MTH3D_M_xDotProductVector(A,B) */
/* #define GLI_M_CrossProduct(A,B,C) MTH3D_M_vCrossProductVector( A, B, C) */
/* #define GLI_M_Norme(A) MTH3D_M_xNormVector(A) */
/* #define GLI_M_Normalize(A) MTH3D_M_vNormalizeVector( A, A) */
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* GLI_VERTEX_H*/

View File

@@ -0,0 +1,73 @@
#ifndef MATERPLANEH
#define MATERPLANEH
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "cpa_expt.h"
#include "gld.h"
#define GLI_C_l2DPlaneIsEnable 1
#define GLI_C_lWaterPlaneHorizonIsNotInScreen 2
#define GLI_C_lWaterPlaneDoItForAll 4
#define GLI_C_lWaterPlaneCameraIsInWater 8
#define GLI_C_lWaterPlaneNoRefraction 16
#define GLI_C_lWaterPlaneNoSinusMoves 32
#define GLI_C_lWaterPlaneNoFog 64
extern CPA_EXPORT void GLI_vInitWaterplaneModule();
extern CPA_EXPORT void GLI_vSetWaterplaneOn();
extern CPA_EXPORT void GLI_vSetWaterplaneOff();
extern CPA_EXPORT void GLI_vSetWaterplane(struct GLD_tdstViewportAttributes_ *p_stVpt,MTH3D_tdstVector *p_stNormale,MTH_tdxReal xDistance);
extern CPA_EXPORT void GLI_vSetWaterplaneRefraction(MTH_tdxReal xRefraction);
extern CPA_EXPORT void GLI_vSetWaterplane2DMoveSize(MTH_tdxReal xSizeInPixels);
extern CPA_EXPORT void GLI_vWaterplaneEnableRefraction();
extern CPA_EXPORT void GLI_vWaterplaneDisableRefraction();
extern CPA_EXPORT void GLI_vWaterplaneEnable2DSinus();
extern CPA_EXPORT void GLI_vWaterplaneDisable2DSinus();
extern CPA_EXPORT void GLI_vSetWaterplane2DMoveDepthStart(MTH_tdxReal xDepth);
extern CPA_EXPORT void GLI_vFogWaterPlaneEffect(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters,long xStart,long xNumber);
extern CPA_EXPORT void GLI_v2DWaterPlaneEffect(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters,long xStart,long xNumber);
extern CPA_EXPORT void GLI_v3DWaterPlaneEffect(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters,long xStart,long xNumber);
extern CPA_EXPORT void GLI_vSetWaterFog(MTH_tdxReal xDepth,GLI_tdstColor *p_stFogColor);
extern CPA_EXPORT long GLI_vIsWaterplaneEnable(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters);
/*ANNECY VL04/03/98{*/
/*
* function for sinus effect
*/
#define C_SinusEffect_cAffectSecondViewPort 1
#define C_SinusEffect_cUseZFactor 2
extern char g_cSinusEffectState;
extern char g_cSinusEffectFlag;
extern CPA_EXPORT char GLI_fn_SinusEffect_cIsSecondViewportAffected( void );
extern CPA_EXPORT void GLI_fn_SinusEffect_vSetFlag( char _cFlag );
extern CPA_EXPORT char GLI_fn_SinusEffect_vGetFlag( void );
extern CPA_EXPORT void GLI_fn_SinusEffect_vSetState( char _cState );
extern CPA_EXPORT char GLI_fn_SinusEffect_vGetState( void );
extern CPA_EXPORT void GLI_fn_SinusEffect_vSetFreq( long _lXFreq, long _lYFreq, long _lZFreq );
extern CPA_EXPORT void GLI_fn_SinusEffect_vSetAmplitude( MTH3D_tdstVector *_p_stAmpVector );
extern CPA_EXPORT void GLI_v3DSinusEffect( struct GLI_tdstInternalGlobalValuesFor3dEngine_ *_p_stGP, long _xStart, long _xNumber);
extern CPA_EXPORT void GLI_v2DSinusEffect(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobalsParrameters,long xStart,long xNumber);
/*ENDANNECY VL}*/
extern CPA_EXPORT void GLI_vSetSinusEffectOnRLIAmp ( MTH_tdxReal xRed, MTH_tdxReal xGreen, MTH_tdxReal xBlue ) ;
extern CPA_EXPORT void GLI_vSetSinusEffectOnRLIBase ( MTH_tdxReal xRed, MTH_tdxReal xGreen, MTH_tdxReal xBlue ) ;
extern CPA_EXPORT void GLI_vSetSinEffetBase (MTH_tdxReal xBase) ;
extern CPA_EXPORT void GLI_vSaveSinusContext ( void ) ;
extern CPA_EXPORT void GLI_vRestoreSinusContext ( void ) ;
/*
* function to update some effect var each trame
*/
void GLI_vUpdateEffectData( unsigned long _ulDeltaT );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* OBJECTH*/