reman3/Rayman_X/cpa/public/GAM/TBLLoad.h

165 lines
6.8 KiB
C

/*=========================================================================
* TBLLoad.h : Header file for loading TBL
*
* Version 1.0
* Creation date 29/05/97
* Revision date
*
* That file needs to be compatible for all platforms.
*
* (c) Ubi Studios 1997
*=======================================================================*/
#if !defined(__TBLLOAD_H__)
#define __TBLLOAD_H__
#if defined(__cplusplus)
extern "C"
{
#endif /* __cplusplus */
/* For DLL using these function :*/
#include "../cpa_expt.h"
/*****************************************************************************************/
/**** Below : macros used to read script. ****/
/*****************************************************************************************/
#define C_GrandChildSection ( 2)
#define C_ChildSection ( 1)
#define C_ThisSection ( 0)
#define C_ParentSection (-1)
#define C_GrandParentSection (-2)
#define C_GrandChildContext ( 2)
#define C_ChildContext ( 1)
#define C_ThisContext ( 0)
#define C_ParentContext (-1)
#define C_GrandParentContext (-2)
#define M_IsTitle (_eAction==SCR_EA_Anl_BeginSection)
#define M_IsEnd (_eAction==SCR_EA_Anl_EndSection)
#define M_IsBegSubSection (_eAction==SCR_EA_Anl_BeginSubSection)
#define M_IsEndSubSection (_eAction==SCR_EA_Anl_EndSubSection)
#define M_IsEntry (_eAction==SCR_EA_Anl_Entry)
#define M_ActionIs(szActionAsked) (!strcmpi(_p_szName,szActionAsked))
/**** TBL scripts ****/
#define C_Section_TBLHeader "TBL_HEADER"
#define C_Entry_FileVersion "VersionNumber"
#define C_Entry_MaximumIndex "MaximumIndex"
#define C_Entry_Duplicate "Duplicate" /* MR0707*/
#define C_Entry_MIRROR "MIRROR"
#define C_Section_TBLGeneral "TBL"
#define C_Entry_PHY "PHY"
#define C_Section_EVTGeneral "EVT"
#define C_Entry_ObjectType "ObjectType"
#define C_Entry_GenericEvent "GenericEvent"
#define C_Entry_FirstCall "FirstCall"
#define C_Entry_Period "Period"
#define C_Entry_Priority "Priority"
#define C_Entry_MechanicEvent "MechanicEvent"
#define C_Entry_SoundEvent "SoundEvent"
/* MR2706*/
#define C_Entry_LipsSynchro "LipsSynchro"
#define C_Entry_CustomZoom "CustomZoom"
/*
* Animations files script call-backs
*/
#if !defined(U64)
extern CPA_EXPORT SCR_tde_Anl_ReturnValue TBL_fn_eScriptCallBackHeader(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue TBL_fn_eScriptCallBackGeneral(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
/*BEGIN OS 23-Mar-98*/
extern CPA_EXPORT SCR_tde_Anl_ReturnValue TBL_fn_eScriptCallBackBinHeader(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
extern CPA_EXPORT SCR_tde_Anl_ReturnValue TBL_fn_eScriptCallBackBinGeneral(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
/*END OS 23-Mar-98*/
#endif /* U64 */
/*************************************************/
/********* global for TBL Link Table *************/
/*************************************************/
#if !defined(U64)
extern CPA_EXPORT SCR_tdst_Link_Table TBL_g_stLinkTable;
#endif /* U64 */
/*************************************************/
/*
* Initialisation and access to link table for TBL name storage
*/
#if !defined(U64)
extern CPA_EXPORT SCR_tdst_Link_Table *TBL_fn_p_stGetLinkTable(void);
#endif /* U64 */
extern CPA_EXPORT void TBL_fn_vInitLinkTable(void);
extern CPA_EXPORT void TBL_fn_vCloseLinkTable(void);
extern CPA_EXPORT void TBL_fn_vDeleteLinkTable(unsigned char ucMin,unsigned char ucMax);
extern CPA_EXPORT void TBL_fn_vRegisterAllScriptSections(void);
#if !defined(U64)
/*-----------------------------------------------------------------------------
* Description : Script callback for the V6 events
*-----------------------------------------------------------------------------
* Input : script inputs
* Output : script outputs
*-----------------------------------------------------------------------------
* Creation date : Jan 98 Author : Alain Robin
*---------------------------------------------------------------------------*/
extern CPA_EXPORT SCR_tde_Anl_ReturnValue TBL_fn_eScriptCallBackEvent(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
/*BEGIN OS 23-Mar-98*/
extern CPA_EXPORT SCR_tde_Anl_ReturnValue TBL_fn_eScriptCallBackBinEvent(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
/*END OS 23-Mar-98*/
/*-----------------------------------------------------------------------------
* Description : Create an event pointed in TBL (V6 format)
*-----------------------------------------------------------------------------
* Input :
* Output : pointer to the event
*-----------------------------------------------------------------------------
* Creation date : Jan 98 Author : Alain Robin
*---------------------------------------------------------------------------*/
struct tdstEventInTable_* GAM_fn_p_stCreateEventInTBL();
#endif /* !defined(U64) */
/*-----------------------------------------------------------------------------
* Description : Save binary function for TBL
*-----------------------------------------------------------------------------
* Input : _ulTBL : Address of the object table
* _p_cBuffer : Pointer to the buffer to fill
* Output : Length of the data written
*---------------------------------------------------------------------------*/
extern CPA_EXPORT unsigned long GAM_fn_ulWriteTBLBinaryBloc(unsigned long _ulTBL,char* _p_cBuffer);
/*-----------------------------------------------------------------------------
* Description : Write all TBL function
*-----------------------------------------------------------------------------
* Input :
* Output :
*---------------------------------------------------------------------------*/
extern CPA_EXPORT void GAM_fn_vWriteAllTBLBinaryBlocs(char* _szFileName);
/*-----------------------------------------------------------------------------
* Description : Read binary function for TBL
*-----------------------------------------------------------------------------
* Input : _ulTBL : Address of the object table
* Output :
*---------------------------------------------------------------------------*/
extern CPA_EXPORT void GAM_fn_vResolveTBLBinaryBloc(unsigned long _ulTBL);
#if defined(__cplusplus)
}
#endif /* __cplusplus */
/* !__TBLLOAD_H__ */
#endif