/* ***********************************************************************************/
/* * "a3x_cach.h"																	**/
/* * Written by :	Sébastien Rubens												**/
/* * Tabulations :	4 char															**/
/* ***********************************************************************************/
#ifndef A3X_CACH_H
#define A3X_CACH_H
 
 
 
/* ***********************************************************************************/
typedef struct	tdstA3dHeader_
{
	unsigned short	uwNumOfCacheEntry;
	unsigned short	uwCacheList;
}	tdstA3dHeader;
 
 
typedef struct	tdstCacheLine_
{
	signed long		slCacheValue;
	unsigned short	uwNumOfA3dHeader;
	unsigned short	uwNumOfMemBloc;
	unsigned short	uwPrev;
	unsigned short	uwNext;
}	tdstCacheLine;
 
 
extern	unsigned short	*p_uwLastA3dGENERAL;
extern	unsigned long	*p_ulAnimOffsets;
extern	char			*p_cLoadAnimBuf;
extern	unsigned short	uwMaxInTabFrame3d;
extern	unsigned short	uwMaxInTabElement3d;
 
 
 
typedef struct	tdstOutputCacheLine_
{	void				*p_vSuperObject;
	tdstAnim3d			*p_stAnim3d;
	tdstFrame3d			*p_stFrame3d;
	tdstElement3d		*p_stElement3d;
	long				lNumOfLastFrame;
	MTH3D_tdstMatrix	stAngularSpeedMatrix;
}	tdstOutputCacheLine;
 
 
 
 
#ifndef	A3X_CACH_C
/* ***********************************************************************************/
extern	tdstA3dGENERAL		*fn_p_GetA3dGENERAL(	unsigned short	uwNumOfA3dGENERAL,
													unsigned long	ulFrameNumber );
extern	void				fn_v_InitCache( void );
extern	tdstOutputCacheLine	*fn_p_GetOutputCacheEntry(	unsigned short	_uwNumOfA3dGENERAL,
														unsigned long	_ulFrame,
														void			*_p_vSuperObject );
extern	tdstShortA3dGENERAL	*fn_p_ReadShortAnimFromROM(	unsigned short	_uwNumOfIntAnim );
 
 
/*-----------------------------------------------------------------------------
 *  Name : fn_vInitROMLoad
 *-----------------------------------------------------------------------------
 *  Description :   Initialise the ROM loading system for the animation
 *					(Real time load or use memory extension)
 *-----------------------------------------------------------------------------
 *  Input :         
 *  Output :        
 *-----------------------------------------------------------------------------*/
extern void fn_vInitROMLoad(void);
 
/* Global variables used by the load functions*/
extern char* g_p_cROMAnimBlocStart;
extern char* g_p_cROMAnimBlocStop;
extern int g_bRealTimeAnimationLoad;
extern char	*p_cCompressedAnimBuf;
 
 
/* ***********************************************************************************/
#endif
#endif
