146 lines
5.3 KiB
C
146 lines
5.3 KiB
C
/*=========================================================================
|
|
* 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__ */
|