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,308 @@
/*///////////////////////////////////////////////////////////*/
/* //*/
/* Management of the Module : GLD //*/
/* // */
/* File Name : ErrGLD.h //*/
/* Date : 29/07/97 //*/
/* Author : Christophe Martinaud //*/
/* //*/
/*///////////////////////////////////////////////////////////*/
/* //*/
/* abbreviation of the module-name. Used in macro is 'GLD' //*/
/* //*/
/*///////////////////////////////////////////////////////////*/
/* Last modification : Variable g_szGLDModuleName has been */
/* suppressed...*/
/*///////////////////////////////////////////////////////////*/
#ifndef __ERRGLD_H__
#define __ERRGLD_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define C_szGLDVersion "GLD V5.8.7" /* The format is Tmr Va.b.c with Tmr is the Tag of the module */
#define C_szGLDFullName "Graphic Library for Display"/* the complete and clear name of the module */
#define C_szGLDDate "July 29 1997" /*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
#ifndef __Erm_H__
#include "ERM.h"
#endif
#define __FATAL_ERR_GLD__
#define __WARNING1_ERR_GLD__
/*----------*/
/* Constant */
/*----------*/
/* error of the GLD Module*/
typedef enum e_uwGLDErrNumber_{
E_uwGLDFatalErr,
#ifdef __FATAL_ERR_GLD__
/* -----------------*/
/* Devices Errors*/
/* CreateDevice*/
E_uwGLD_CD_DDCreateFailed,
E_uwGLD_CD_DDQueryInterfaceFailed,
E_uwGLD_CD_DDSetCoopLevelFailed,
E_uwGLD_CD_DDSetDisplayModeFailed,
E_uwGLD_CD_DDCreatePrimSurfFailed,
E_uwGLD_CD_DDCreateClipperFailed,
E_uwGLD_CD_DDSetClipperWndFailed,
E_uwGLD_CD_DDSetClipperSurfFailed,
E_uwGLD_CD_MaxNumberReached,
E_uwGLD_CD_NotEnoughMemForDev,
E_uwGLD_CD_DDGetBackBufferFailed,
E_uwGLD_CD_DDGetSurfDescFailed,
E_uwGLD_CD_DDCreateOffBufFailed,
E_uwGLD_CD_NotEnoughMemForZBuf,
/* AdjustDeviceToWindow*/
E_uwGLD_ADTW_DeviceInFullScrMode,
E_uwGLD_ADTW_DDReleaseBufFailed,
E_uwGLD_ADTW_DDCreateOffBufFailed,
E_uwGLD_ADTW_NotEnoughMemForZBuf,
/* FlipDevice*/
E_uwGLD_FD_DDRestoreSurfFailed,
E_uwGLD_FD_DDFlipFailed,
E_uwGLD_FD_DDBlitFailed,
/* DeleteDevice*/
E_uwGLD_DD_DestroyDDObjFailed,
/* SwapDeviceMode*/
E_uwGLD_SDM_AnotherDevInFScrMode,
E_uwGLD_SDM_NotEnoughMemForSwap,
E_uwGLD_SDM_DeleteDeviceFailed,
E_uwGLD_SDM_CreateDeviceFailed,
/* Viewports Errors*/
/* ClearViewport*/
E_uwGLD_CV_DDRestoreSurfFailed,
E_uwGLD_CV_DDBltFailed,
/* RequestWriteToViewport*/
E_uwGLD_RWTV_DDRestoreSurfFailed,
E_uwGLD_RWTV_DDLockFailed,
/* WriteToViewportFinished*/
E_uwGLD_WTVF_DDUnlockFailed,
/* CreateViewport*/
E_uwGLD_CRV_MaxNumberReached,
E_uwGLD_CRV_NotEnoughMemForVpt,
/* Rasters Errors*/
/* SetMonitorFrequency*/
E_uwGLD_SMF_BadMonitorFrequency,
/* Creation of timer*/
E_uwGLD_RCFR_CreateTimerFailed,
/* InitMainRasterObject */
E_uwGLD_IMRO_NotEnoughMemoryForMRO,
/* CreateRasterForDevice*/
E_uwGLD_CRFD_MaxNumberOfRastersReached,
E_uwGLD_CRFD_NotEnoughMemForRaster,
/* Display rasters for device*/
E_uwGLD_DRFD_DDRestoreSurfFailed,
E_uwGLD_DRFD_DDLockFailed,
E_uwGLD_DRFD_DDUnlockSurfFailed,
/* Pictures Errors*/
/* LoadPictures*/
E_uwGLD_LP_DDCreateFailed,
E_uwGLD_LP_DDQueryInterfaceFailed,
E_uwGLD_LP_DDSetCoopLevelFailed,
E_uwGLD_LP_MaxNumberOfPicReached,
E_uwGLD_LP_NotEnoughMemForPic,
E_uwGLD_LP_LoadBitmapFailed,
/* ReadFromPictureFinished*/
E_uwGLD_RFPF_DDUnlockSurfFailed,
/* RequestReadFromPicture*/
E_uwGLD_RRFP_ReloadBitmapFailed,
E_uwGLD_RRFP_DDLockFailed,
E_uwGLD_RRFP_DDRestoreSurfFailed,
#endif /*__FATAL_ERR_GLD__*/
E_uwGLDStartOfWarning,/* important constant, it allows to recognize if an error is fatal or not.*/
#ifdef __WARNING1_ERR_GLD__
/* -------------------*/
/* ClearDevice*/
E_uwGLD_CLD_EraseSurfaceFailed,
/* Create Device*/
E_uwGLD_CD_InitTimerLibFailed,
/* Memory free*/
E_uwGLDWarningCanNotFree,
#endif /*__WARNING1_ERR_GLD__*/
#ifdef __WARNING2_ERR_GLD__
/* -------------------*/
#endif /*__WARNING2_ERR_GLD__*/
#ifdef __WARNING3_ERR_GLD__
/* -------------------*/
#endif /*__WARNING3_ERR_GLD__*/
E_uwGLDErrNumber
} e_uwGLDErrNumber;
/*------------------*/
/* Global Variables*/
/*------------------*/
#undef __ERRGLD_EXTERN
#ifndef __DeclareGlobalVariableErrGLD_h__
#define __ERRGLD_EXTERN extern /*external declaration*/
#else /*__DeclareGlobalVariableErrGLD_h__*/
#define __ERRGLD_EXTERN /*replace by nothing : we have to declare*/
#endif /*__DeclareGlobalVariableErrGLD_h__*/
#ifndef _FIRE_DEADCODE_U64_ /* Added by RUC */
__ERRGLD_EXTERN CPA_EXPORT unsigned char g_ucGLDModuleId /*number of identification of the Erm module*/
#if defined(__DeclareGlobalVariableErrGLD_h__) && !defined(CPA_WANTS_IMPORT)
= C_ucModuleNotInitialized
#endif /*__DeclareGlobalVariableErrGLD_h__&& CPA_WANTS_IMPORT*/
;
#endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC */
#ifdef __ERROR_STRINGS__
__ERRGLD_EXTERN CPA_EXPORT char * g_a_szGLDInformationModule []
#if defined(__DeclareGlobalVariableErrGLD_h__) && !defined(CPA_WANTS_IMPORT)
= {C_szGLDVersion, C_szGLDFullName, C_szGLDDate}
#endif /*__DeclareGlobalVariableErrGLD_h__ && CPA_WANTS_IMPORT*/
;
__ERRGLD_EXTERN CPA_EXPORT struct tdstErrorMsg_ g_a_stGLDTabErr [] /* Mandatory syntax 'g_a_st'+[Abbreviation of ModuleName]+'TabErr'*/
#if defined(__DeclareGlobalVariableErrGLD_h__) && !defined(CPA_WANTS_IMPORT)
={
#ifdef __FATAL_ERR_GLD__
/* -------------*/
/* Devices Errors*/
/* CreateDevice*/
E_uwGLD_CD_DDCreateFailed, "CreateDevice : Can't create DirectDraw object",
E_uwGLD_CD_DDQueryInterfaceFailed, "CreateDevice : Can't get DirectDraw2 Interface",
E_uwGLD_CD_DDSetCoopLevelFailed, "CreateDevice : Can't set cooperative level",
E_uwGLD_CD_DDSetDisplayModeFailed, "CreateDevice : Can't set display mode",
E_uwGLD_CD_DDCreatePrimSurfFailed, "CreateDevice : Can't create Primary surface",
E_uwGLD_CD_DDCreateClipperFailed, "CreateDevice : Can't create Clipper",
E_uwGLD_CD_DDSetClipperWndFailed, "CreateDevice : Can't associate Clipper with window",
E_uwGLD_CD_DDSetClipperSurfFailed, "CreateDevice : Can't associate Clipper with surface",
E_uwGLD_CD_MaxNumberReached, "CreateDevice : Maximal number of devices has been reached",
E_uwGLD_CD_NotEnoughMemForDev, "CreateDevice : Not enough memory to create device structure",
E_uwGLD_CD_DDGetBackBufferFailed, "CreateDevice : Can't get back buffer",
E_uwGLD_CD_DDGetSurfDescFailed, "CreateDevice : Can't get surface description",
E_uwGLD_CD_DDCreateOffBufFailed, "CreateDevice : Can't create offscreen buffer",
E_uwGLD_CD_NotEnoughMemForZBuf, "CreateDevice : Not enough memory to create Z Buffer",
/* AdjustDeviceToWindow*/
E_uwGLD_ADTW_DeviceInFullScrMode, "AdjustDevice : Can't adjust a device in full screen mode",
E_uwGLD_ADTW_DDReleaseBufFailed, "AdjustDevice : Can't release offscreen buffer",
E_uwGLD_ADTW_DDCreateOffBufFailed, "AdjustDevice : Can't create new offscreen buffer",
E_uwGLD_ADTW_NotEnoughMemForZBuf, "AdjustDevice : Not enough memory to adjust Z Buffer",
/* FlipDevice*/
E_uwGLD_FD_DDRestoreSurfFailed, "FlipDevice : Can't restore surface",
E_uwGLD_FD_DDFlipFailed, "FlipDevice : Can't flip",
E_uwGLD_FD_DDBlitFailed, "FlipDevice : Can't blit",
/* DeleteDevice*/
E_uwGLD_DD_DestroyDDObjFailed, "DeleteDevice : Can't destroy DirectDraw objects",
/* SwapDeviceMode*/
E_uwGLD_SDM_AnotherDevInFScrMode, "SwapDeviceMode : Another device is already in fullscreen mode",
E_uwGLD_SDM_NotEnoughMemForSwap, "SwapDeviceMode : Not enough memory to achieve operation",
E_uwGLD_SDM_DeleteDeviceFailed, "SwapDeviceMode : Can't delete the old device",
E_uwGLD_SDM_CreateDeviceFailed, "SwapDeviceMode : Can't create the new device",
/* Viewports Errors*/
/* ClearViewport*/
E_uwGLD_CV_DDRestoreSurfFailed, "ClearViewport : Can't restore surface",
E_uwGLD_CV_DDBltFailed, "ClearViewport : Can't blit",
/* RequestWriteToViewport*/
E_uwGLD_RWTV_DDRestoreSurfFailed, "RequestWriteToVpt : Can't restore surface",
E_uwGLD_RWTV_DDLockFailed, "RequestWriteToVpt : Can't lock the back buffer",
/* WriteToViewportFinished*/
E_uwGLD_WTVF_DDUnlockFailed, "WriteToVptFinished : Can't unlock the back buffer",
/* CreateViewport*/
E_uwGLD_CRV_MaxNumberReached, "CreateViewport : The maximal number of viewports has been reached",
E_uwGLD_CRV_NotEnoughMemForVpt, "CreateViewport : Not enough memory to create the viewport structure",
/* Rasters Errors*/
/* SetMonitorFrequency*/
E_uwGLD_SMF_BadMonitorFrequency, "SetMonitorFrequency : Invalid frequency for monitor",
/* Creation of raster*/
E_uwGLD_RCFR_CreateTimerFailed, "Timer couldn't be created",
/* InitMainRasterObject */
E_uwGLD_IMRO_NotEnoughMemoryForMRO, "Not enough memory to create a new set of rasters",
/* CreateRasterForDevice*/
E_uwGLD_CRFD_MaxNumberOfRastersReached, "CreateRasterForDev : The maximal number of rasters has been reached for this set",
E_uwGLD_CRFD_NotEnoughMemForRaster, "CreateRasterForDev : Not enough memory to create a new raster",
/* Display rasters for device*/
E_uwGLD_DRFD_DDRestoreSurfFailed, "DisplayRasters : Can't restore back buffer",
E_uwGLD_DRFD_DDLockFailed, "DisplayRasters : Can't lock back buffer",
E_uwGLD_DRFD_DDUnlockSurfFailed, "DisplayRasters : Can't unlock back buffer",
/* Pictures Errors*/
/* LoadPictures*/
E_uwGLD_LP_DDCreateFailed, "LoadPictures : Can't create DirectDraw object for pictures",
E_uwGLD_LP_DDQueryInterfaceFailed, "LoadPictures : Can't get DirectDraw2 interface for pictures",
E_uwGLD_LP_DDSetCoopLevelFailed, "LoadPictures : Can't set cooperative level for pictures",
E_uwGLD_LP_MaxNumberOfPicReached, "LoadPictures : The maximal number of pictures has been reached",
E_uwGLD_LP_NotEnoughMemForPic, "LoadPictures : Not enough memory for picture structure",
E_uwGLD_LP_LoadBitmapFailed, "LoadPictures : Can't load bitmap in surface",
/* ReadFromPictureFinished*/
E_uwGLD_RFPF_DDUnlockSurfFailed, "RequestReadFP : Can't unlock surface associated with picture",
/* RequestReadFromPicture*/
E_uwGLD_RRFP_ReloadBitmapFailed, "RequestReadFP : Can't reload bitmap in surface",
E_uwGLD_RRFP_DDLockFailed, "RequestReadFP : Can't lock surface associated with picture",
E_uwGLD_RRFP_DDRestoreSurfFailed, "RequestReadFP : Can't restore surface",
#endif /*__FATAL_ERR_GLD__*/
#ifdef __WARNING1_ERR_GLD__
/* ----------------*/
/* ClearDevice*/
E_uwGLD_CLD_EraseSurfaceFailed, "ClearDevice : Device surface couldn't be erased",
/* CreateDevice*/
E_uwGLD_CD_InitTimerLibFailed, "CreateDevice : The timer library couldn't be initialized",
/* Memory free*/
E_uwGLDWarningCanNotFree, "A block of memory couldn't be freed !!!",
#endif /*__WARNING1_ERR_GLD__*/
#ifdef __WARNING2_ERR_GLD__
/* ----------------*/
#endif /*__WARNING2_ERR_GLD__*/
#ifdef __WARNING3_ERR_GLD__
/* ----------------*/
#endif /*__WARNING3_ERR_GLD__*/
0xFFFF, "\0"/*fin*/
};
#endif /*__DeclareGlobalVariableErrGLD_h__ && CPA_WANTS_IMPORT*/
;
#endif /*__ERROR_STRINGS__*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /*__ERRGLD_H__*/

View File

@@ -0,0 +1,30 @@
/* ##CONSTANTE#--------------------------------------------------------------------------
Constantes declaration
---------------------------------------------------------------------------------------*/
enum Synchro {
C_AutoSynchro=0,
C_1FrameSynchro,
C_2FrameSynchro,
C_3FrameSynchro,
C_MaxFrameSynchro=0x07,
C_DefaultSynchro=0xFE,
C_NoSynchro=0xFF
};
#ifndef U64
/* Old call to flip device remain not synchronized*/
#define GLD_bFlipDevice(GLD_tdhDevice) GLD_bFlipDeviceWithSynchro(GLD_tdhDevice,C_NoSynchro)
/* ##F===================================================================================
NAME : GLD_vSetFrameSynchro
DESCRIPTION : This function set the type of synchro used with its parameter
For script interpretation
INPUT : Synchro ON or OFF
NbTrame (0 for hysteresis system)
Percent use to decrease NbTrame
=========================================================================================
CREATION : Carlos Torres / 11-12-1997
=======================================================================================*/
extern CPA_EXPORT void GLD_vSetFrameSynchro(char * szOnOff,char * szNbTrame,char * szPctLowLimit);
#endif /* U64 */

View File

@@ -0,0 +1,233 @@
/*
Gld_Pub.h
Structures, prototypes and error codes for Graphic Library for Display.
Authors : Christophe MARTINAUD
Elie Khoury
Philippe Vimont
Last update : 10/16/1996
Last update : 04/08/1997 : Upgrade to VC++ & VSS 5.0 !!!
*/
#ifndef __GLD_PUB_H
#define __GLD_PUB_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
typedef short GLD_tdhDevice; /* Handle of devices */
typedef short GLD_tdhViewport; /* Handle of viewports */
/*typedef short GLD_tdhPicture; /* Handle of pictures */
typedef float GLD_tdxValue;
/* 007*/
#ifndef RGB
#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
#endif /* RGB */
#include "Gld_Pu1.h"
/* Screen constantes */
#define GLD_C_lScreenDimInPixX 1024
#define GLD_C_lScreenDimInPixY 768
#define GLD_C_xScreenDimInMetersX (GLD_tdxValue)( 0.32 )
#define GLD_C_xScreenDimInMetersY (GLD_tdxValue)( 0.24 )
/* Begin : only for moteur D3D */
#define C_DRIVER_HARD (1)
#define C_DRIVER_SOFT (1<<1)
#define C_DRIVER_MONO (1<<2)
#define C_DRIVER_RGB (1<<3)
/* End : only for moteur D3D */
/* Constants used by GLD_bClear[Device/ViewPort]WithChoice */
#define GLD_C_CLEAR_NOTHING 0
#define GLD_C_CLEAR_BACKBUF 1
#define GLD_C_CLEAR_ZBUF 2
/* Structures for Viewports */
typedef struct GLD_tdstViewportAttributes_
{
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 dwWidthInPercent;
DWORD dwHeightInPercent;
DWORD dwClipTopInPix; /* Height of clip top */
DWORD dwClipBottomInPix; /* Height of clip bottom */
DWORD dwClipLeftInPix; /* Width of clip left */
DWORD dwClipRightInPix; /* Width of clip right */
DWORD dwClipTopInPercent; /* For clipping */
DWORD dwClipBottomInPercent;
DWORD dwClipLeftInPercent;
DWORD dwClipRightInPercent;
int iOffsetPosX; /* Offset of display window (relative to upper left corner) */
int iOffsetPosY;
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 */
/* Strega 10/12/96 */
/*void *p_vReserved2;*/
GLD_tdhDevice hDevice;
GLD_tdhViewport hViewport;
/* Strega fin */
} GLD_tdstViewportAttributes, *GLD_tdpstViewportAttributes;
/* Structures for Devices */
typedef struct GLD_tdstDeviceAttributes_
{
DWORD dwHeight; /* Current height of device */
DWORD dwWidth; /* Current width of device */
/*DWORD dwBitsPerPixel; /* Current depth of device */
/*DWORD dwBytesPerPixel; /* Current bytes per pixel for device */
GLD_tdxValue xPixelDimensionX ; /* Pixel dimensions in world units */
GLD_tdxValue xPixelDimensionY ; /* Pixel dimensions in world units */
char *p_cVirtualScreen; /* Pointer to back surface memory */
LONG lPitch; /* Distance to the start of the next line */
short *p_sZBuffer; /* Z Buffer associated with device */
/* Windows only */
DWORD dwFullScreenModeX; /* X resolution when in full screen mode */
DWORD dwFullScreenModeY; /* Y resolution when in full screen mode */
DWORD dwFullScreenModeBpp; /* Depth in bits per pixel when in full screen mode */
HWND hFullScreenModeWnd; /* Handle of the window associated with the device in full screen mode */
HWND hNormalModeWnd; /* Handle of the window associated with the device in normal mode */
BOOL bFullScreen; /* Is the device in full screen/exclusive mode ? */
unsigned int uiTypeDriver; /* The device is hardware or software (version D3D du moteur 3D) */
/*void *p_vReserved; /* Reserved */
/* Strega 10/12/96 */
POINT pClientOnPrimary;
RECT rtClientRect;
RECT rtWindowRect;
/* Strega fin */
} GLD_tdstDeviceAttributes, *GLD_tdpstDeviceAttributes;
/* Structures for Pictures */
/*typedef struct GLD_tdstPictureAttributes_*/
/*{*/
/* 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;*/
/* Prototypes */
/* Device management */
extern CPA_EXPORT BOOL GLD_bIsDeviceHandleValid( GLD_tdhDevice );
extern CPA_EXPORT void GLD_vInvalidateDeviceHandle( GLD_tdhDevice * );
extern CPA_EXPORT BOOL GLD_bCreateDevice( GLD_tdpstDeviceAttributes, GLD_tdhDevice * );
extern CPA_EXPORT BOOL GLD_bGetDeviceAttributes( GLD_tdhDevice, GLD_tdpstDeviceAttributes );
extern CPA_EXPORT BOOL GLD_bRequestWriteToDevice( GLD_tdhDevice, GLD_tdpstDeviceAttributes, BOOL * );
extern CPA_EXPORT BOOL GLD_bWriteToDeviceFinished( GLD_tdhDevice );
extern CPA_EXPORT BOOL GLD_bAdjustDeviceToWindow( GLD_tdhDevice ); /* windows only */
extern BOOL GLD_bBeginWriteToDevice( GLD_tdhDevice hNotUsed );
extern BOOL GLD_bEndWriteToDevice( GLD_tdhDevice hNotUsed );
extern CPA_EXPORT BOOL GLD_bFlipDeviceWithSynchro(GLD_tdhDevice hDev,enum Synchro eSynchro);
#ifdef U64
extern BOOL GLD_bFlipDevice( GLD_tdhDevice hDev ); /*AR980326*/
#endif
extern CPA_EXPORT BOOL GLD_bDeleteDevice( GLD_tdhDevice );
extern CPA_EXPORT BOOL GLD_bSwapDeviceMode( GLD_tdhDevice, BOOL );
extern CPA_EXPORT BOOL GLD_bSwapToWindowedMode( GLD_tdhDevice, BOOL ); /*bart990126*/
extern CPA_EXPORT BOOL GLD_bSwapToFullScreen( GLD_tdhDevice, BOOL ); /*bart990126*/
extern CPA_EXPORT BOOL GLD_fn_bReinitDeviceDisplayMode( GLD_tdhDevice ); /*bart990111*/
extern CPA_EXPORT BOOL GLD_bSetNewWindowForDevice( GLD_tdhDevice, HWND );
extern CPA_EXPORT BOOL GLD_bClearDevice( GLD_tdhDevice );
extern CPA_EXPORT BOOL GLD_bClearDeviceWithChoice( GLD_tdhDevice, short );
extern CPA_EXPORT BOOL GLD_bSetFullScreenModeForDevice( GLD_tdhDevice, DWORD, DWORD, DWORD, HWND );
extern CPA_EXPORT BOOL GLD_bSetBackgroundColorForDevice( GLD_tdhDevice, COLORREF );
extern CPA_EXPORT BOOL GLD_bHandleResolutionChange();
extern CPA_EXPORT LRESULT GLD_lDeviceCallback ( GLD_tdhDevice hDevice, HWND xHWnd , UINT xMessage, WPARAM wParam, LPARAM lParam );
/* Viewport management */
extern CPA_EXPORT BOOL GLD_bIsViewportHandleValid( GLD_tdhViewport );
extern CPA_EXPORT void GLD_vInvalidateViewportHandle( GLD_tdhViewport * );
extern CPA_EXPORT BOOL GLD_bCreateViewport( GLD_tdhDevice, GLD_tdpstViewportAttributes, GLD_tdhViewport * );
extern CPA_EXPORT BOOL GLD_bSetViewportPosition( GLD_tdhDevice, GLD_tdhViewport, GLD_tdpstViewportAttributes );
extern CPA_EXPORT BOOL GLD_bGetViewportAttributes( GLD_tdhDevice, GLD_tdhViewport, GLD_tdpstViewportAttributes );
extern CPA_EXPORT BOOL GLD_bRequestWriteToViewport( GLD_tdhDevice, GLD_tdhViewport, GLD_tdpstViewportAttributes, BOOL * );
extern CPA_EXPORT BOOL GLD_bWriteToViewportFinished( GLD_tdhDevice, GLD_tdhViewport );
extern CPA_EXPORT BOOL GLD_bRequestWriteToViewport2D( GLD_tdhDevice, GLD_tdhViewport, GLD_tdpstViewportAttributes, BOOL * );
extern CPA_EXPORT BOOL GLD_bWriteToViewportFinished2D( GLD_tdhDevice, GLD_tdhViewport );
extern CPA_EXPORT BOOL GLD_bRequestWriteToViewport3D( GLD_tdhDevice, GLD_tdhViewport, GLD_tdpstViewportAttributes, BOOL * );
extern CPA_EXPORT BOOL GLD_bWriteToViewportFinished3D( GLD_tdhDevice, GLD_tdhViewport );
extern CPA_EXPORT BOOL GLD_bDeleteViewport( GLD_tdhDevice, GLD_tdhViewport );
extern CPA_EXPORT BOOL GLD_bClearViewport( GLD_tdhDevice, GLD_tdhViewport );
extern CPA_EXPORT BOOL GLD_bClearViewportWithChoice( GLD_tdhDevice, GLD_tdhViewport, short );
extern CPA_EXPORT BOOL GLD_bGiveSpecificAttributesToViewport( GLD_tdhDevice, GLD_tdhViewport, void * );
/* Picture management */
/*
extern CPA_EXPORT BOOL GLD_bIsPictureHandleValid( GLD_tdhPicture );
extern CPA_EXPORT void GLD_vInvalidatePictureHandle( GLD_tdhPicture * );
extern CPA_EXPORT BOOL GLD_bLoadPicture( GLD_tdpstPictureAttributes, GLD_tdhPicture * );
extern CPA_EXPORT BOOL GLD_bGetPictureAttributes( GLD_tdhPicture, GLD_tdpstPictureAttributes );
extern CPA_EXPORT BOOL GLD_bRequestReadFromPicture( GLD_tdhPicture, GLD_tdpstPictureAttributes, BOOL * );
extern CPA_EXPORT BOOL GLD_bReadFromPictureFinished( GLD_tdhPicture );
extern CPA_EXPORT BOOL GLD_bDeletePicture( GLD_tdhPicture );
*/
/* Strega stuff */
/* Forgotten management */
/*extern CPA_EXPORT BOOL GLD_bSetDeviceAttributes( GLD_tdhDevice hDev, GLD_tdpstDeviceAttributes p_stDevAttrib );*/
/*extern CPA_EXPORT BOOL GLD_bIsGoodDevice( GLD_tdhDevice hDev );*/
/*extern BOOL GLD_bSetViewportAttributes( GLD_tdhDevice hDev, GLD_tdhViewport hVP, GLD_tdpstViewportAttributes p_stViewAttrib );*/
/* Strega end */
extern CPA_EXPORT BOOL GLD_bReleaseViewportAndDevice(GLD_tdhDevice hDev, GLD_tdhViewport hVP);
extern CPA_EXPORT void GLD_bHardwareSetContrast( float fContrast);
extern CPA_EXPORT void GLD_bHardwareSetLuminosity( float fLuminosity);
extern CPA_EXPORT void GLD_PrintUsedStaticMemory();
/*extern CPA_EXPORT void GLD_vSetDDDriver(long);*/
/*extern CPA_EXPORT void GLD_vSetD3DDevice(long);*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __GLD_H */

View File

@@ -0,0 +1,60 @@
/*///////////////////////////////////////////////////////////*/
/* //*/
/* Memory Management of the Module : GLD //*/
/* // */
/* File Name : MmgGLD.h //*/
/* Date : 29/01/97 //*/
/* Author : Christophe Martinaud //*/
/* //*/
/*///////////////////////////////////////////////////////////*/
#ifndef __MemGLD_H__
#define __MemGLD_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
#ifndef __Mmg_H__
#include "MMG.h"
#endif
typedef enum e_ucGLDStaticBlocks_{
E_ucGLDBlock1,
E_ucGLDBlock2,
E_ucGLDBlock3,
E_ucGLDBlock4,
E_ucGLDMaxBlocksNb /* maximum number of static block, You have to follow this syntax 'E_uc+ Abbreviation Module +MaxBlocksNb'*/
} e_ucGLDStaticBlocks;
#undef __MMG_GLD_EXTERN
#ifdef __DeclareGlobalVariableMmgGLD_h__
#define __MMG_GLD_EXTERN /*nothing*/
#else /* no __DeclareGlobalVariableMmgGLD_h__*/
#define __MMG_GLD_EXTERN extern
#endif /*__DeclareGlobalVariableMmgGLD_h__*/
#ifndef _FIRE_DEADCODE_U64_
__MMG_GLD_EXTERN CPA_EXPORT struct tdstBlockInfo_ g_a_stGLDBlocksInfo[E_ucGLDMaxBlocksNb];
#endif /* _FIRE_DEADCODE_U64_ */
#ifdef __DYNAMIC_MALLOC_ALLOWED__
#ifdef __DEBUG_MALLOC_MODE__
__MMG_GLD_EXTERN CPA_EXPORT struct tdstDynInfo_ g_stGLDDynInfo;
#endif /*__DEBUG_MALLOC_MODE__*/
#endif /*__DYNAMIC_MALLOC_ALLOWED__*/
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /*__MemGLD_H__*/

View File

@@ -0,0 +1,105 @@
/* PixFmt.h*/
/* Prototypes and structures for PixFmt.c*/
/* Author : Frederic PHILIPPE*/
/* Last update : 08/07/1997*/
#ifndef __PIXFMT_H
#define __PIXFMT_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "acp_base.h"
/* #ifdef GLI_D3D */
#if !defined(U64) /* N64 does not want D3D stuffs... thanks*/
/*#include <d3d.h>*/
#endif /* U64 */
/* #endif */
/* format predefini de pixel */
#define GLD_C_xUndefinedPixelFormat 0 /* 0000 0000 0000 0000 0000 0000 0000 0000 */
#define GLD_C_xN1B5G5R5PixelFormat 1 /* 0000 0000 0000 0000 0BBB BBGG GGGR RRRR */
#define GLD_C_xA1B5G5R5PixelFormat 2 /* 0000 0000 0000 0000 ABBB BBGG GGGR RRRR */
#define GLD_C_xN1R5G5B5PixelFormat 3 /* 0000 0000 0000 0000 0RRR RRGG GGGB BBBB */
#define GLD_C_xA4B4G4R4PixelFormat 4 /* 0000 0000 0000 0000 AAAA BBBB GGGG RRRR */
#define GLD_C_xB8G8R8PixelFormat 5 /* 0000 0000 BBBB BBBB GGGG GGGG RRRR RRRR */
#define GLD_C_xA8B8G8R8PixelFormat 6 /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
#define GLD_C_xB5G6R5PixelFormat 7 /* 0000 0000 0000 0000 BBBB BGGG GGGR RRRR */
#define GLD_C_xB6G5R5PixelFormat 8 /* 0000 0000 0000 0000 BBBB BBGG GGGR RRRR */
#define GLD_C_xB5G5R6PixelFormat 9 /* 0000 0000 0000 0000 BBBB BGGG GGRR RRRR */
#define GLD_C_xB5G5R5A1PixelFormat 10 /* 0000 0000 0000 0000 BBBB BGGG GGRR RRRA */
#define GLD_C_xR5G6B5PixelFormat 11 /* 0000 0000 0000 0000 RRRR RGGG GGGB BBBB */
#define GLD_C_xR6G5B5PixelFormat 12 /* 0000 0000 0000 0000 RRRR RRGG GGGB BBBB */
#define GLD_C_xR5G5B6PixelFormat 13 /* 0000 0000 0000 0000 RRRR RGGG GGBB BBBB */
#if defined(U64)
#define GLD_C_xR5G5B5A1PixelFormat 14 /* 0000 0000 0000 0000 RRRR RGGG GGBB BBBA */
#endif /* U64 */
#define GLD_C_lMaxNumberOfPixelFormat 16
/* pixel format */
typedef struct GLD_stPixelFormat
{
/* numero du format */
ACP_tdxIndex xFormatNumber;
/* alpha ? */
ACP_tdxBool bAlpha;
/* nombre de bits total du pixel */
long lPixelNbBits;
/* masque du pixel */
unsigned long ulPixelMask;
/* nombre d octets par pixel */
long lPixelNbBytes;
/* composante rouge */
long lRedNbBits;
long lRedShift;
unsigned long ulRedMask;
/* composante verte */
long lGreenNbBits;
long lGreenShift;
unsigned long ulGreenMask;
/* composante bleue */
long lBlueNbBits;
long lBlueShift;
unsigned long ulBlueMask;
/* composante alpha */
long lAlphaNbBits;
long lAlphaShift;
unsigned long ulAlphaMask;
} GLD_tdstPixelFormat, *GLD_tdpstPixelFormat;
void GLD_vSetDefinedPixelFormat ( GLD_tdpstPixelFormat p_stPixelFormat, ACP_tdxIndex xPixelFormatNumber );
void GLD_vCopyPixelFormat ( GLD_tdpstPixelFormat p_stDstPixelFormat, GLD_tdpstPixelFormat p_stSrcPixelFormat );
GLD_tdstPixelFormat *GLD_fn_p_stGetDefinedPixelFormat( long _lFormatIndex );
long GLD_fn_lAddDefinedPixelFormat( GLD_tdstPixelFormat *_p_stNewPF );
#if !defined(U64) /* N64 does not want DirectDraw Pixel Foramt... thanks*/
/*extern CPA_EXPORT void GLD_vConvertDDPixelFormatToPixelFormat ( ACP_tdxIndex xFormatNumber, GLD_tdpstPixelFormat p_stDstPixelFormat, LPDDPIXELFORMAT p_stDDPixelFormat );*/
/*extern CPA_EXPORT ACP_tdxBool GLD_bConvertDDPixelFormatToDefinedPixelFormat ( GLD_tdpstPixelFormat p_stDstPixelFormat, LPDDPIXELFORMAT p_stDDPixelFormat );*/
#endif /* U64 */
extern CPA_EXPORT ACP_tdxBool GLD_bGetPixelFormatOfDevice ( GLD_tdpstPixelFormat p_stDstPixelFormat, GLD_tdhDevice hDev, GLD_tdhViewport hVP );
/* attention : convertion entre les formats RGB 16 bits seulement */
extern CPA_EXPORT void GLD_vBitmapConvert16bPixelFormat ( GLD_tdpstPixelFormat p_stDstPixelFormat, GLD_tdpstPixelFormat p_stSrcPixelFormat, unsigned short *p_usBuffer, long lBufferSize );
extern CPA_EXPORT void GLD_vYInvertBitmap24b ( unsigned char *_p_ucBuffer, long _lWidth, long _lHeight );
extern CPA_EXPORT void GLD_vBitmapConvert24bTo16bPixelFormat ( unsigned short *_p_usDstBuffer, unsigned char *_p_ucSrcBuffer, long _lWidth, long _lHeight );
extern CPA_EXPORT void GLD_vBitmapConvert24bTo16bPixelFormatAndFiltre ( unsigned short *_p_usDstBuffer, long _lWDst, long _lHDst, unsigned char *_p_ucSrcBuffer, long _lWSrc, long _lHSrc );
extern CPA_EXPORT void GLD_fn_vBlit16b ( long _lW, long _lH, unsigned short *_p_usBufferDst, long _lPitch, unsigned short *_p_usBufferSrc );
extern CPA_EXPORT void GLD_fn_vBlitStretched16b ( long _lWDst, long _lHDst, unsigned short *_p_usBufferDst, long _lPitch, long _lWSrc, long _lHSrc, unsigned short *_p_usBufferSrc );
extern CPA_EXPORT void GLD_vBitmapConvertAndBlit24bTo16bPixelFormat ( GLD_tdhDevice _hGLDDevice, GLD_tdhViewport _hGLDViewport, long _lWidth, long _lHeight, unsigned char *_p_ucBufferSrc );
extern CPA_EXPORT void GLD_vGetFrontBufferIn24BitsAA( GLD_tdhDevice,GLD_tdhViewport,unsigned long _lWidth,unsigned long _lHeight,unsigned char *p_lBufferDst );
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __PIXFMT_H*/

Binary file not shown.