Add rayman2 source files
This commit is contained in:
154
Rayman_X/cpa/public/VIG/ErrVIG.h
Normal file
154
Rayman_X/cpa/public/VIG/ErrVIG.h
Normal file
@@ -0,0 +1,154 @@
|
||||
#if !defined(__VIG_ERR_H_)
|
||||
#define __VIG_ERR_H_
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000 */
|
||||
/******************************************/
|
||||
|
||||
#include "VIG_Ver.h"
|
||||
|
||||
/***************************************/
|
||||
/**** Error macros (using ACPerror) ****/
|
||||
/***************************************/
|
||||
#define M_VIGFatalError(ErrorNum) \
|
||||
{ \
|
||||
if (ErrorNum>E_uwVIGFatalErr&&ErrorNum<E_uwVIGStartOfWarning) \
|
||||
{ \
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(VIG,C_ucErmDefaultChannel,ErrorNum,C_lErmNoDebugData,C_ucErmOpenInfoWindow,C_ucAllowStopForDebug, NULL);\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(VIG,C_ucErmDefaultChannel,E_uwVIGFatalErrorNotAFatalError,C_lErmNoDebugData,C_ucErmOpenInfoWindow,C_ucAllowStopForDebug, NULL);\
|
||||
} \
|
||||
}
|
||||
|
||||
#define M_VIGInformationError(ErrorNum) \
|
||||
{ \
|
||||
if (ErrorNum>E_uwVIGStartOfInformationWarning&&ErrorNum<E_uwVIGErrNumber) \
|
||||
{ \
|
||||
Erm_M_UpdateLastError(VIG,C_ucErmDefaultChannel,ErrorNum,C_lErmNoDebugData,C_ucErmNoOpenInfoWindow,C_ucNeverStopForDebug, NULL);\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
M_VIGFatalError(E_uwVIGInformationErrorIsNotAInformationError); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define M_VIGWarningError(ErrorNum) \
|
||||
{ \
|
||||
if (ErrorNum>E_uwVIGStartOfWarning&&ErrorNum<E_uwVIGStartOfInformationWarning) \
|
||||
{ \
|
||||
Erm_M_UpdateLastError(VIG,C_ucErmDefaultChannel,ErrorNum,C_lErmNoDebugData,C_ucErmOpenInfoWindow,C_ucAllowStopForDebug, NULL);\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
M_VIGFatalError(E_uwVIGWarningErrorIsNotAWarningError); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define __FATAL_ERR_INPUT__
|
||||
#define __INFORMATION_ERR_INPUT__ /**** Treat as a level 1 warning ****/
|
||||
#define __WARNING_ERR_INPUT__ /**** Treat as a level 2 warning ****/
|
||||
|
||||
enum e_uwVIGErrNumber
|
||||
{
|
||||
E_uwVIGFatalErr,
|
||||
#if defined(__FATAL_ERR_INPUT__)
|
||||
/**** Error's errors ****/
|
||||
E_uwVIGFatalErrorNotAFatalError,
|
||||
E_uwVIGInformationErrorIsNotAInformationError,
|
||||
E_uwVIGWarningErrorIsNotAWarningError,
|
||||
/**** Vignettes error ****/
|
||||
E_uwVIGCantLoadBmp,
|
||||
E_uwVIGBadFormatBmp,
|
||||
E_uwVIGBadConvertFormat,
|
||||
E_uwVIGBufferSizeTooLow,
|
||||
/**** Script errors ****/
|
||||
E_uwVIGScriptBadNumberOfArg,
|
||||
#endif /*__FATAL_ERR_INPUT__*/
|
||||
|
||||
E_uwVIGStartOfWarning,
|
||||
|
||||
#if defined(__WARNING_ERR_INPUT__)
|
||||
#endif /*__WARNING_ERR_INPUT__*/
|
||||
|
||||
E_uwVIGStartOfInformationWarning,
|
||||
|
||||
#if defined(__INFORMATION_ERR_INPUT__)
|
||||
#endif /*__INFORMATION_ERR_INPUT__*/
|
||||
|
||||
E_uwVIGErrNumber,
|
||||
};
|
||||
|
||||
/*------------------*/
|
||||
/* Global Variables*/
|
||||
/*------------------*/
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#undef LOCAL
|
||||
#if !defined(D_VIG_Input_VariableDefine)
|
||||
#define EXTERN extern /*external declaration*/
|
||||
#define LOCAL /*replace by nothing : we have to declare*/
|
||||
#else /* D_VIG_Input_VariableDefine */
|
||||
#define EXTERN /*replace by nothing : we have to declare*/
|
||||
#define LOCAL /*replace by nothing : we have to declare*/
|
||||
#endif /* D_VIG_Input_VariableDefine */
|
||||
|
||||
EXTERN unsigned char g_ucVIGModuleId /* number of identification of the Game module*/
|
||||
#if defined(D_VIG_Input_VariableDefine)
|
||||
= C_ucModuleNotInitialized
|
||||
#endif /* D_VIG_Input_VariableDefine */
|
||||
;
|
||||
|
||||
#if defined(__ERROR_STRINGS__)
|
||||
EXTERN CPA_EXPORT char * g_a_szVIGInformationModule []
|
||||
#if defined(D_VIG_Input_VariableDefine) && !defined(CPA_WANTS_IMPORT)
|
||||
= {C_szVIGVersion, C_szVIGFullName, C_szVIGDate}
|
||||
#endif /* D_VIG_Input_VariableDefine && CPA_WANTS_IMPORT */
|
||||
;
|
||||
|
||||
EXTERN char * g_szVIGModuleName /* Obliged syntax 'sz'+[Abbreviation of ModuleName]+'ModuleName'*/
|
||||
#if defined(D_VIG_Input_VariableDefine)
|
||||
= {"Input"}
|
||||
#endif /* D_VIG_Input_VariableDefine */
|
||||
;
|
||||
|
||||
EXTERN tdstErrorMsg g_a_stVIGTabErr[] /* Obliged syntax 'a_sz'+[Abbreviation of ModuleName]+'TabErr'*/
|
||||
#if defined(D_VIG_Input_VariableDefine)
|
||||
=
|
||||
{
|
||||
#if defined(__FATAL_ERR_INPUT__)
|
||||
/**** Error's errors ****/
|
||||
E_uwVIGFatalErrorNotAFatalError,"M_VIGFatalError : Try to raise a warning or an information",
|
||||
E_uwVIGInformationErrorIsNotAInformationError,"M_VIGInformationError : Try to raise a fatal or a warning",
|
||||
E_uwVIGWarningErrorIsNotAWarningError,"M_VIGWarningError : Try to raise a fatal or a information",
|
||||
/**** Vignettes error ****/
|
||||
E_uwVIGCantLoadBmp,"fn_vLoadBMPVignette : Can not open file.",
|
||||
E_uwVIGBadFormatBmp,"fn_vLoadBMPVignette : Bad file format (must be 640*480, 24 bits, not compressed).",
|
||||
E_uwVIGBadConvertFormat,"VIG_fn_vLoadBMPVignette : Can convert only in 16 or 32 bits.",
|
||||
E_uwVIGBufferSizeTooLow,"VIG_fn_vLoadBMPVignette : Buffer size too low.",
|
||||
/**** Script errors ****/
|
||||
E_uwVIGScriptBadNumberOfArg,"Script callback : bad number of arguments",
|
||||
#endif /*__FATAL_ERR_INPUT__*/
|
||||
|
||||
#ifdef __WARNING_ERR_INPUT__
|
||||
#endif /*__WARNING_ERR_INPUT__*/
|
||||
|
||||
#ifdef __INFORMATION_ERR_INPUT__
|
||||
#endif /*__INFORMATION_ERR_INPUT__*/
|
||||
|
||||
0xffff,"\0"/*fin*/
|
||||
}
|
||||
#endif /* D_VIG_Input_VariableDefine */
|
||||
;
|
||||
#endif /* __ERROR_STRINGS__ */
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
|
||||
#endif /* !__VIG_ERR_H_ */
|
145
Rayman_X/cpa/public/VIG/VIG_Def.h
Normal file
145
Rayman_X/cpa/public/VIG/VIG_Def.h
Normal file
@@ -0,0 +1,145 @@
|
||||
/*=========================================================================
|
||||
* Vignette.h : Load and display vignette
|
||||
* This is a part of the Game project.
|
||||
*
|
||||
* Version 1.0
|
||||
* Creation date 06/06/97
|
||||
* Revision date
|
||||
*
|
||||
* That file needs to be compatible for all platforms.
|
||||
*
|
||||
* (c) Ubi Studios 1997
|
||||
*=======================================================================*/
|
||||
#if !defined(__VIG_Def_h__)
|
||||
#define __VIG_Def_h__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000 */
|
||||
/******************************************/
|
||||
|
||||
#include "CPA_Expt.h"
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#if !defined(D_VIG_Input_VariableDefine)
|
||||
#define EXTERN extern
|
||||
#else
|
||||
#define EXTERN
|
||||
#endif /* D_VIG_Input_VariableDefine */
|
||||
|
||||
#define VIG_C_ScriptPgbSuffixe "pgb"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define VIG_C_SectionLoadVignettesDescription "Vignette"
|
||||
#define VIG_C_EVignetteMemoryBlock E_ucGameMiscMemory
|
||||
|
||||
#define VIG_C_lVignetteMaxNb 100
|
||||
|
||||
/* a virer */
|
||||
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;
|
||||
|
||||
|
||||
/*
|
||||
#pragma pack(push,1)
|
||||
struct VIG_tdstVignetteBmpFileHeader_
|
||||
{
|
||||
unsigned short uwType;
|
||||
unsigned long ulSize;
|
||||
unsigned long ulReserved;
|
||||
unsigned long ulOffsetBits;
|
||||
};
|
||||
|
||||
struct VIG_tdstVignetteBmpInfoHeader_
|
||||
{
|
||||
unsigned long ulSize;
|
||||
unsigned long ulWidth;
|
||||
unsigned long ulHeight;
|
||||
unsigned short uwPlanes;
|
||||
unsigned short uwBitCount;
|
||||
unsigned long ulCompression;
|
||||
unsigned long ulSizeImage;
|
||||
unsigned long ulXPelsPerMeter;
|
||||
unsigned long ulYPelsPerMeter;
|
||||
unsigned long ulColorsUsed;
|
||||
unsigned long ulColorsImportant;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
*/
|
||||
|
||||
struct VIG_tdstVignetteStructure_
|
||||
{
|
||||
char szVignetteFileName[_MAX_PATH];
|
||||
char szLevelVignetteFileName[_MAX_PATH];
|
||||
unsigned long ulMemoryBufferSize;
|
||||
unsigned char *p_ucMemoryBuffer;
|
||||
unsigned long ulWidth;
|
||||
unsigned long ulHeight;
|
||||
GLI_tdeVignetteFormat eFormat;
|
||||
GLD_tdstPixelFormat stVignetteFormat;
|
||||
|
||||
unsigned char bDisplayBar;
|
||||
unsigned long ulMaxBarValue;
|
||||
unsigned long ulActualBarValue; /* [0,ulMaxBarValue]*/
|
||||
unsigned long ulOldBarValue; /**** in pixel ****/
|
||||
unsigned long ulNewBarValue; /**** in pixel ****/
|
||||
unsigned long ulBarXMinPos,ulBarYMinPos;
|
||||
unsigned long ulBarXMaxPos,ulBarYMaxPos;
|
||||
|
||||
struct GEO_tdstColor_ stOutsideColor;
|
||||
struct GEO_tdstColor_ stInsideColor;
|
||||
struct GEO_tdstColor_ stUpLeftColor;
|
||||
struct GEO_tdstColor_ stUpRightColor;
|
||||
struct GEO_tdstColor_ stDownLeftColor;
|
||||
struct GEO_tdstColor_ stDownRightColor;
|
||||
};
|
||||
|
||||
extern CPA_EXPORT void VIG_fn_vOpenBigFileVignette(char *p_szFileName);
|
||||
extern CPA_EXPORT void VIG_fn_vCloseBigFileVignette(void);
|
||||
|
||||
extern CPA_EXPORT void VIG_fn_vSetPointToMemoryBuffer(struct VIG_tdstVignetteStructure_ *_p_stVignette,long _lX,long _lY,struct GEO_tdstColor_ *p_stColor);
|
||||
extern CPA_EXPORT struct VIG_tdstVignetteStructure_ *fn_p_stCreateVignette(void);
|
||||
|
||||
extern CPA_EXPORT void VIG_fn_vFirstInit(void);
|
||||
extern CPA_EXPORT void VIG_fn_vInitVignette();
|
||||
extern CPA_EXPORT void VIG_fn_vInitDeviceVignette(GLD_tdhDevice _hGLDDevice,GLD_tdhViewport _hGLDViewport, void * _hDrawSem);
|
||||
extern CPA_EXPORT void VIG_fn_vRegisterSection(void);
|
||||
extern CPA_EXPORT void VIG_fn_vDisplayVignette(struct VIG_tdstVignetteStructure_ *_p_stVignette);
|
||||
extern CPA_EXPORT void VIG_fn_vRefreshActualVignette(void);
|
||||
extern CPA_EXPORT void VIG_fn_vCopyVignetteToBackBuffer(struct VIG_tdstVignetteStructure_ *_p_stVignette);
|
||||
extern CPA_EXPORT void VIG_fn_vAddBarToVignette(struct VIG_tdstVignetteStructure_ *_p_stVignette);
|
||||
extern CPA_EXPORT void VIG_fn_vRefreshBarToVignette(struct VIG_tdstVignetteStructure_ *_p_stVignette,unsigned long _ulXMin,unsigned long _ulXMax);
|
||||
extern CPA_EXPORT void VIG_fn_vAddToProgressBar(unsigned long _ulInc);
|
||||
extern CPA_EXPORT void VIG_fn_vLoadBMPVignette(struct VIG_tdstVignetteStructure_ *_p_stVignette,char *_szFileName,GLI_tdeVignetteFormat _eFormat);
|
||||
extern CPA_EXPORT void VIG_fn_vLoadVignetteInStructure(struct VIG_tdstVignetteStructure_ *_p_stVignette,char *_szFileName,GLI_tdeVignetteFormat _eFormat);
|
||||
extern CPA_EXPORT void VIG_fn_vPreLoadVignetteInStructure(struct VIG_tdstVignetteStructure_ *_p_stVignette,char *_szFileName,GLI_tdeVignetteFormat _eFormat);
|
||||
#if !defined(U64)
|
||||
extern CPA_EXPORT SCR_tde_Anl_ReturnValue VIG_fn_eScriptCallBackVignettesDescription(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
|
||||
extern CPA_EXPORT SCR_tde_Anl_ReturnValue VIG_fn_eScriptCallBackBinVignettesDescription(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
|
||||
#endif /* U64 */
|
||||
extern CPA_EXPORT void VIG_fn_vSaveProgressBarLevelInfo(struct VIG_tdstVignetteStructure_ *_p_stVignette,char *_szFilemane);
|
||||
extern CPA_EXPORT void VIG_fn_vSaveProgressBarStandardInfo(struct VIG_tdstVignetteStructure_ *_p_stVignette,char *_szFileName);
|
||||
extern CPA_EXPORT void VIG_fn_vFreeVignette(struct VIG_tdstVignetteStructure_ *_p_stVignette);
|
||||
extern CPA_EXPORT void VIG_fn_vFreeMemoryVignette(struct VIG_tdstVignetteStructure_ *_p_stVignette);
|
||||
extern CPA_EXPORT void VIG_fn_vConvertAllVignette ( GLD_tdpstPixelFormat p_stDstPixelFormat );
|
||||
|
||||
EXTERN struct VIG_tdstVignetteStructure_ VIG_g_stActualVignette;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __VIG_Def_h__ */
|
3
Rayman_X/cpa/public/VIG/VIG_Ver.h
Normal file
3
Rayman_X/cpa/public/VIG/VIG_Ver.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#define C_szVIGVersion "VIG V5.0.1" /* The format is XXX Va.b.c with Xxx is the Tag of the module */
|
||||
#define C_szVIGFullName "Vignette" /* the complete and clear name of the module */
|
||||
#define C_szVIGDate "Jun 7 1997" /* The format is "Mmm dd yyyy".You can use __DATE__ but be careful that you have the control of the compilation*/
|
Reference in New Issue
Block a user