Add rayman2 source files
This commit is contained in:
80
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_cach.h
Normal file
80
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_cach.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* ***********************************************************************************/
|
||||
/* * "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
|
478
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_glob.h
Normal file
478
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_glob.h
Normal file
@@ -0,0 +1,478 @@
|
||||
/* ***********************************************************************************/
|
||||
/* * "a3x_glob.h" **/
|
||||
/* * Written by : S<>bastien Rubens **/
|
||||
/* * Tabulations : 4 char **/
|
||||
/* ***********************************************************************************/
|
||||
#ifndef A3X_GLOB_H
|
||||
#define A3X_GLOB_H
|
||||
|
||||
#include "specif\a3x_pref.h"
|
||||
/* ***********************************************************************************/
|
||||
/* Main Defines*/
|
||||
#define KillChannels
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Defines*/
|
||||
|
||||
#define SEB_Invalid 0xFFFF
|
||||
|
||||
#define xZero ((SEB_xReal) 0.0)
|
||||
#define xOne ((SEB_xReal) 1.0)
|
||||
#define xHalfOne ((SEB_xReal) 0.5)
|
||||
|
||||
/*#define xEps ((SEB_xReal) 0.0001)*/
|
||||
/*#define xOneSubEps ((SEB_xReal) 0.9999)*/
|
||||
#define xHalfPi ((SEB_xReal) 1.570796326795)
|
||||
#define xPi ((SEB_xReal) 3.14159265359)
|
||||
#define xTwoPi ((SEB_xReal) 6.28318530718)
|
||||
|
||||
#define xExpandValue ((SEB_xReal)3.05185094759971922971282082583e-5)
|
||||
#define xCompactValue 32767.0f
|
||||
|
||||
#define lEps 1
|
||||
#define lOne 32767
|
||||
#define lOneSubEps 32766
|
||||
|
||||
#define lDecSin 3L
|
||||
#define lNbSin 8192L /* Size of sinus table*/
|
||||
#define lNbSinDiv2 (lNbSin >> 1)
|
||||
#define lNbSinDiv4 (lNbSin >> 2)
|
||||
#define lNbSin34 (lNbSinDiv4 * 3)
|
||||
#define lMaskNbSin (lNbSin - 1)
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
#define SEB_xMaskQuatOri 0x0001
|
||||
#define SEB_xMaskQuatSca 0x0002
|
||||
#define SEB_xMaskScaleValues 0x0004
|
||||
#define SEB_xMaskPosition 0x0008
|
||||
#define SEB_xMaskAllLow 0x000F
|
||||
#define SEB_xMaskIdQuatOri 0x0010
|
||||
#define SEB_xMaskIdQuatSca 0x0020
|
||||
#define SEB_xMaskIdScaleValues 0x0040
|
||||
#define SEB_xMaskLastKey 0x0080
|
||||
#define SEB_xMaskZeroAngCentre 0x0100
|
||||
|
||||
#define SEB_xTypeWrapLastKey 0x0200
|
||||
#define SEB_xTypeChangeOfHierarchy 0x0400
|
||||
#define SEB_xTypeHierarchized 0x0800
|
||||
#define SEB_xTypeSoundEvent 0x1000
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Types definitions*/
|
||||
/* ***********************************************************************************/
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Matrices, vectors and quaternions definitions*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef SEB_xReal tdxMatrix33[3][3];
|
||||
typedef SEB_xReal tdxVector3[3];
|
||||
typedef SEB_xReal tdxQuater4[4];
|
||||
typedef unsigned long tdxULongVector3[3];
|
||||
typedef signed short tdxSShortQuater4[4];
|
||||
|
||||
|
||||
typedef char tdFileName[256];
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Stack definition*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstStackInfos_ {
|
||||
unsigned long ulPosAlloc;
|
||||
unsigned long ulStackPos;
|
||||
unsigned long ulMaxPos;
|
||||
unsigned long ulResetPos;
|
||||
} tdstStackInfos;
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Cutted animations definition*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstCuttedAnim_ {
|
||||
unsigned short uwStartFrame;
|
||||
unsigned short uwEndFrame;
|
||||
unsigned short uwPrevAnim;
|
||||
unsigned short uwNextAnim;
|
||||
unsigned short uwMaxNumberOfElements;
|
||||
unsigned short uwAlign;
|
||||
} tdstCuttedAnim;
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* NTTO*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileNTTO_ {
|
||||
#ifndef U64
|
||||
unsigned short uwTypeOfObject; /* + hierarchized object info !*/
|
||||
unsigned short ucNumberInTable; /* temporary a short AR9810*/
|
||||
unsigned char ucTransparency;
|
||||
#else
|
||||
unsigned short uwTypeOfObject; /* + hierarchized object info !*/
|
||||
unsigned char ucNumberInTable;
|
||||
unsigned char ucTransparency;
|
||||
#endif
|
||||
} tdstFileNTTO;
|
||||
|
||||
typedef struct tdstNTTO_ {
|
||||
#ifndef U64
|
||||
unsigned short uwTypeOfObject; /* + hierarchized object info !*/
|
||||
unsigned short ucNumberInTable; /* temporary a short AR9810*/
|
||||
unsigned char ucTransparency;
|
||||
#else
|
||||
unsigned short uwTypeOfObject; /* + hierarchized object info !*/
|
||||
unsigned char ucNumberInTable;
|
||||
unsigned char ucTransparency;
|
||||
#endif
|
||||
} tdstNTTO;
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Hierarchy*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileHierarchy_ {
|
||||
unsigned short uwChild;
|
||||
unsigned short uwFather;
|
||||
} tdstFileHierarchy;
|
||||
|
||||
typedef struct tdstBinHierarchy_ {
|
||||
unsigned short uwChild;
|
||||
unsigned short uwFather;
|
||||
} tdstBinHierarchy;
|
||||
|
||||
typedef struct tdstHierarchy_ {
|
||||
unsigned short uwChild;
|
||||
unsigned short uwFather;
|
||||
} tdstHierarchy;
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Only Frame*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileOnlyFrame_ {
|
||||
unsigned short uwNumOfAngularSpeedQuat;
|
||||
unsigned short uwNumOfSpeedVector;
|
||||
|
||||
unsigned short uwHierarchyNbCouples;
|
||||
unsigned short uwNumOfHierarchyCouples;
|
||||
|
||||
unsigned short uwNumOfSavedFrame;
|
||||
unsigned short uwAlign;
|
||||
} tdstFileOnlyFrame;
|
||||
|
||||
typedef struct tdstBinOnlyFrame_ {
|
||||
signed long slNumOfAngularSpeedQuat;
|
||||
signed long slNumOfSpeedVector;
|
||||
|
||||
unsigned short uwHierarchyNbCouples;
|
||||
unsigned short uwNumOfSavedFrame;
|
||||
|
||||
signed long slNumOfHierarchyCouples;
|
||||
|
||||
tdxQuater4 tdxAngularSpeedQuat; /* only for binarisation*/
|
||||
tdxVector3 tdxSpeedVector; /* only for binarisation*/
|
||||
} tdstBinOnlyFrame;
|
||||
|
||||
typedef struct tdstOnlyFrame_ {
|
||||
unsigned short uwNumOfAngularSpeedQuat;
|
||||
unsigned short uwNumOfSpeedVector;
|
||||
|
||||
unsigned short uwHierarchyNbCouples;
|
||||
unsigned short uwNumOfFirstHierarchyCouple;
|
||||
|
||||
unsigned short uwNumOfSavedFrame;
|
||||
/* unsigned short uwAlign; // AR9811 To save memory...*/
|
||||
} tdstOnlyFrame;
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Channel*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileChannel_ {
|
||||
unsigned short uwNumberOfKeys;
|
||||
unsigned short uwChannelNumber;
|
||||
unsigned short uwNumOfLocalPivotPos;
|
||||
unsigned short uwAlign;
|
||||
} tdstFileChannel;
|
||||
|
||||
typedef struct tdstBinChannel_ {
|
||||
unsigned short uwNumberOfKeys;
|
||||
unsigned short uwChannelNumber;
|
||||
signed long slNumOfLocalPivotPos;
|
||||
|
||||
/* signed long slNumOfFrameNTTO; // in tdstBinFrame*/
|
||||
signed long slNumOfFrames;
|
||||
/* signed short slNumOfKeyFrame; // in tdstBinFrame*/
|
||||
|
||||
unsigned short uwUsedChannel; /* only for binarisation*/
|
||||
unsigned short uwGenerateChannel; /* only for binarisation*/
|
||||
|
||||
tdxVector3 a3_xLocalPivotPos; /* only for binarisation*/
|
||||
} tdstBinChannel;
|
||||
|
||||
typedef struct tdstChannel_ {
|
||||
unsigned short uwNumberOfKeys;
|
||||
unsigned short uwChannelNumber;
|
||||
unsigned short uwNumOfLocalPivotPos;
|
||||
|
||||
unsigned short uwNumOfFirstFrame;
|
||||
unsigned long ulNumOfFirstFrameKF;
|
||||
unsigned short uwNumOfFirstKeyFrame;
|
||||
/* unsigned short uwAlign; // AR9811 To save memory...*/
|
||||
} tdstChannel;
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Frames KF*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFrameKF_ {
|
||||
unsigned short uwNumOfKeyFrame;
|
||||
/* unsigned short uwAlign; //AR9808 Too much memory lost*/
|
||||
} tdstFrameKF;
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Frame*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileFrame_ {
|
||||
/* signed short swNumberInTable;*/
|
||||
/* unsigned short uwTypeOfObject; // + hierarchized object info !*/
|
||||
unsigned short uwNumOfNTTO;
|
||||
/* unsigned short uwAlign; //AR9808 Too much memory lost*/
|
||||
} tdstFileFrame;
|
||||
|
||||
typedef struct tdstBinFrame_ {
|
||||
signed short swNumberInTable;
|
||||
unsigned short uwTypeOfObject;
|
||||
unsigned short uwFrameNumber;
|
||||
unsigned char ucTransparency;
|
||||
unsigned char ucAlign;
|
||||
|
||||
tdxQuater4 a4_xQuatOri; /* Orientation of quaternion*/
|
||||
tdxQuater4 a4_xQuatSca; /* Orientation of scale*/
|
||||
tdxVector3 a3_xScaleValues; /* Scaling values*/
|
||||
tdxVector3 a3_xPosition; /* Channel position*/
|
||||
tdxVector3 a3_xWorldPivotPosition; /* Pivot position in world axes*/
|
||||
SEB_xReal xDistMaster;
|
||||
SEB_xReal xInterpolationParameter;
|
||||
unsigned short uwMask; /* Interpolation mask to speed up calculation*/
|
||||
unsigned short uwAttribute; /* Key attribute*/
|
||||
unsigned short uwChildrenInHierarchy; /* only for binarisation*/
|
||||
|
||||
signed long slNumOfNTTO;
|
||||
|
||||
signed long slNumOfQuatOri;
|
||||
signed long slNumOfQuatSca;
|
||||
signed long slNumOfScaleValues;
|
||||
signed long slNumOfPosition;
|
||||
} tdstBinFrame;
|
||||
|
||||
typedef struct tdstFrame_ {
|
||||
/* signed short swNumberInTable;*/
|
||||
/* unsigned short uwTypeOfObject; // + hierarchized object info !*/
|
||||
/* unsigned short uwNumOfNTTO;*/
|
||||
|
||||
unsigned short uwNumOfNTTO;
|
||||
/* unsigned short uwAlign; //AR9808 Too much memory lost*/
|
||||
} tdstFrame;
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Key Frame*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileKeyFrame_ {
|
||||
unsigned short uwFrameNumber;
|
||||
unsigned short uwMask;
|
||||
|
||||
unsigned short uwNumOfQuatOri;
|
||||
unsigned short uwNumOfQuatSca;
|
||||
unsigned short uwNumOfScaleValues;
|
||||
unsigned short uwNumOfPosition;
|
||||
signed short swInterpolationParameter;
|
||||
} tdstFileKeyFrame;
|
||||
|
||||
typedef struct tdstKeyFrame_ {
|
||||
tdxVector3 a3_xWorldPivotPosition;
|
||||
SEB_xReal xDistMaster;
|
||||
|
||||
unsigned short uwFrameNumber;
|
||||
unsigned short uwMask;
|
||||
|
||||
unsigned short uwNumOfQuatOri;
|
||||
unsigned short uwNumOfQuatSca;
|
||||
unsigned short uwNumOfScaleValues;
|
||||
unsigned short uwNumOfPosition;
|
||||
|
||||
unsigned short uwAngQuatOri;
|
||||
unsigned short uwAngQuatSca;
|
||||
unsigned short uwAngObjCentre;
|
||||
signed short swInterpolationParameter;
|
||||
} tdstKeyFrame;
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* A3D General*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileA3dAnimationGENERAL_ {
|
||||
unsigned short uwAnimationSpeed;
|
||||
|
||||
unsigned short uwNumberOfVectors;
|
||||
unsigned short uwNumberOfQuaternions;
|
||||
unsigned short uwNumberOfHierarchies;
|
||||
unsigned short uwNumberOfSavedNTTO;
|
||||
unsigned short uwNumberOfSavedFrames;
|
||||
|
||||
unsigned short uwNumberOfChannels;
|
||||
unsigned short uwNumberOfFrames;
|
||||
unsigned short uwNumberOfKeyFrames;
|
||||
unsigned short uwNumberOfEvents;
|
||||
unsigned short uwNumOfFirstPosition;
|
||||
|
||||
unsigned short uwStartFrame;
|
||||
unsigned short uwEndFrame;
|
||||
unsigned short uwFakeAnimSpeed;
|
||||
unsigned short uwFlags;
|
||||
|
||||
unsigned short uwNumOfAnimationTranslationOffset;
|
||||
unsigned short uwNumOfAnimationRotationOffset;
|
||||
|
||||
unsigned short uwNumberOfMorphData;
|
||||
} tdstFileA3dAnimationGENERAL;
|
||||
|
||||
/* For fast load (reduced structure)*/
|
||||
typedef struct tdstShortA3dGENERAL_
|
||||
{
|
||||
unsigned short uwNumberOfFrames;
|
||||
unsigned short uwFrameRate;
|
||||
unsigned short uwMaxNumberOfElements;
|
||||
unsigned short uwNumberOfEvents;
|
||||
unsigned short uwNumberOfMorphData;
|
||||
unsigned short uwAlign;
|
||||
|
||||
tdxVector3 a3_xAnimationTranslationOffset;
|
||||
tdxSShortQuater4 a4_uwAnimationRotationOffset; /* Can be Eliminated... See later*/
|
||||
} tdstShortA3dGENERAL;
|
||||
|
||||
typedef struct tdstBinA3dAnimationGENERAL_ {
|
||||
unsigned short uwAnimationSpeed;
|
||||
|
||||
unsigned short uwNumberOfSavedVectors;
|
||||
unsigned short uwNumberOfSavedQuaternions;
|
||||
unsigned short uwNumberOfHierarchies;
|
||||
unsigned short uwNumberOfSavedNTTO;
|
||||
unsigned short uwNumberOfSavedFrames;
|
||||
|
||||
unsigned short uwNumberOfChannels;
|
||||
unsigned short uwNumberOfFrames;
|
||||
unsigned short uwNumberOfKeyFrames;
|
||||
unsigned short uwNumberOfEvents;
|
||||
unsigned short uwNumberOfMorphData;
|
||||
unsigned short uwAlign;
|
||||
|
||||
unsigned short uwStartFrame;
|
||||
unsigned short uwEndFrame;
|
||||
unsigned short uwFlags;
|
||||
unsigned short uwFakeAnimSpeed;
|
||||
|
||||
signed long slNumOfAnimationTranslationOffset;
|
||||
signed long slNumOfAnimationRotationOffset;
|
||||
signed long slNumOfPositions;
|
||||
|
||||
signed long slNumOfSavedVectors;
|
||||
signed long slNumOfSavedQuaternions;
|
||||
signed long slNumOfHierarchies;
|
||||
signed long slNumOfSavedNTTO;
|
||||
signed long slNumOfOnlyFrames;
|
||||
signed long slNumOfChannels;
|
||||
signed long slNumOfEvents;
|
||||
signed long slNumOfMorphData;
|
||||
|
||||
/* ----------------*/
|
||||
signed long slNumOfFramesNTTO;
|
||||
|
||||
/* Before optimisation*/
|
||||
unsigned short uwNumberOfVectors;
|
||||
unsigned short uwNumberOfQuaternions;
|
||||
signed long slNumOfVectors;
|
||||
signed long slNumOfQuaternions;
|
||||
|
||||
tdxVector3 uwAnimationTranslationOffset;
|
||||
tdxQuater4 uwAnimationRotationOffset;
|
||||
} tdstBinA3dAnimationGENERAL;
|
||||
|
||||
typedef struct tdstA3dGENERAL_ {
|
||||
unsigned short uwAnimationSpeed;
|
||||
|
||||
unsigned short uwNumberOfVectors;
|
||||
unsigned short uwNumberOfQuaternions;
|
||||
unsigned short uwNumberOfHierarchies;
|
||||
unsigned short uwNumberOfNTTO;
|
||||
unsigned short uwNumberOfSavedFrames;
|
||||
|
||||
unsigned short uwNumberOfChannels;
|
||||
unsigned short uwNumberOfFrames;
|
||||
unsigned short uwNumberOfKeyFrames;
|
||||
unsigned short uwNumberOfEvents;
|
||||
unsigned short uwNumOfFirstPosition;
|
||||
|
||||
unsigned short uwStartFrame;
|
||||
unsigned short uwEndFrame;
|
||||
unsigned short uwFakeAnimSpeed;
|
||||
unsigned short uwFlags;
|
||||
|
||||
unsigned short uwNumOfAnimationTranslationOffset;
|
||||
unsigned short uwNumOfAnimationRotationOffset;
|
||||
|
||||
unsigned short uwNumberOfMorphData;
|
||||
|
||||
unsigned short uwNumOfFirstVector;
|
||||
unsigned short uwNumOfFirstQuaternion;
|
||||
unsigned short uwNumOfFirstHierarchy;
|
||||
unsigned short uwNumOfFirstNTTO;
|
||||
|
||||
unsigned short uwNumOfFirstOnlyFrame;
|
||||
unsigned short uwNumOfFirstChannel;
|
||||
unsigned short uwNumOfFirstEvent;
|
||||
unsigned short uwNumOfFirstMorphData;
|
||||
|
||||
} tdstA3dGENERAL;
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Morph Data*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
typedef struct tdstFileMorphData_ {
|
||||
unsigned char ucTarget;
|
||||
unsigned char ucMorphingAmount;
|
||||
unsigned short uwChannelNumber;
|
||||
unsigned short uwFrameNumber;
|
||||
unsigned short uwAlign; /* Usefull for storage structures AR9809*/
|
||||
} tdstFileMorphData; /*AR9803 Written into binary file*/
|
||||
|
||||
typedef struct tdstBinMorphData_ {
|
||||
unsigned char ucTarget;
|
||||
unsigned char ucMorphingAmount;
|
||||
unsigned short uwChannelNumber;
|
||||
unsigned short uwFrameNumber;
|
||||
unsigned short uwAlign;
|
||||
} tdstBinMorphData; /*AR9803 Filled by scripts*/
|
||||
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
/* Event definition*/
|
||||
/* ----------------------------------------------------------------------------------*/
|
||||
#define A3i_Version 0x1110 /* 1.17 */
|
||||
|
||||
/* AR9809 Now, this structure is common (event loaded the same way than PC)*/
|
||||
|
||||
/* Storage structure*/
|
||||
typedef struct tdstFileEvent_ {
|
||||
unsigned short usEventNumberInTBL;
|
||||
unsigned short uwFrameNumber;
|
||||
unsigned short uwChannelNumber;
|
||||
unsigned short uwAlign;
|
||||
} tdstFileEvent;
|
||||
|
||||
/* Binarisation structure*/
|
||||
typedef struct tdstBinEvent_ {
|
||||
unsigned short usEventNumberInTBL;
|
||||
unsigned short uwFrameNumber;
|
||||
unsigned short uwChannelNumber;
|
||||
} tdstBinEvent;
|
||||
|
||||
/* ***********************************************************************************/
|
||||
#endif
|
125
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_int.h
Normal file
125
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_int.h
Normal file
@@ -0,0 +1,125 @@
|
||||
/* ***********************************************************************************/
|
||||
/* * "a3x_int.h" **/
|
||||
/* * Written by : S<>bastien Rubens **/
|
||||
/* * Tabulations : 4 char **/
|
||||
/* ***********************************************************************************/
|
||||
#ifndef A3X_INT_H
|
||||
#define A3X_INT_H
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
enum { eQX, eQY, eQZ, eQW };
|
||||
|
||||
|
||||
#ifndef A3X_INT_C
|
||||
/* ***********************************************************************************/
|
||||
/* Precalculations*/
|
||||
|
||||
extern void fn_v_InitSinTab( void );
|
||||
extern signed short ax_SinTab[];
|
||||
extern tdxQuater4 a4_xQuater1;
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Matrices tests*/
|
||||
|
||||
extern unsigned short fn_uw_IsDiagonale( tdxMatrix33 _a3a3_xMtx );
|
||||
extern unsigned short fn_uw_IsOrthogonale( tdxMatrix33 _a3a3_xMtx );
|
||||
extern unsigned short fn_uw_IsOrthonormee( tdxMatrix33 _a3a3_xMtx );
|
||||
extern unsigned short fn_uw_IsUnitQuat( tdxQuater4 _a4_xQuat );
|
||||
extern unsigned short fn_uw_AreSameMatrix( tdxMatrix33 _a3a3_xMtx1,
|
||||
tdxMatrix33 _a3a3_xMtx2 );
|
||||
extern unsigned short fn_uw_AreSameQuat( tdxQuater4 _a4_xQuat1,
|
||||
tdxQuater4 _a4_xQuat2 );
|
||||
extern unsigned short fn_uw_AreSameVect( tdxVector3 _a3_xVect1,
|
||||
tdxVector3 _a3_xVect2 );
|
||||
extern unsigned short fn_uw_CompQuat( tdxQuater4 _a4_xQuat1,
|
||||
tdxQuater4 _a4_xQuat2 );
|
||||
extern unsigned short fn_uw_CompVect( tdxVector3 _a3_xVect1,
|
||||
tdxVector3 _a3_xVect2 );
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Miscellaneous matrices operations*/
|
||||
|
||||
extern void fn_v_SetIdMatrix( tdxMatrix33 _a3a3_xMatrix );
|
||||
extern void fn_v_SetZeroVector( tdxVector3 _a3_xVector );
|
||||
extern void fn_v_SetOneVector( tdxVector3 _a3_xVector );
|
||||
extern void fn_v_SetIdQuater( tdxQuater4 _a4_xQuater );
|
||||
extern void fn_v_ExpandQuat( tdxQuater4 _a4_xQuatD,
|
||||
tdxSShortQuater4 _a4_xQuatS );
|
||||
extern void fn_v_CopyQuat( tdxQuater4 _a4_xQuatD,
|
||||
tdxQuater4 _a4_xQuatS );
|
||||
extern void fn_v_CopyVect( tdxVector3 _a3_xVectD,
|
||||
tdxVector3 _a3_xVectS );
|
||||
extern void fn_v_CopyMatrix( tdxMatrix33 _a3a3_xMtxD,
|
||||
tdxMatrix33 _a3a3_xMtxS );
|
||||
extern void fn_v_MatrixToVecDia( tdxVector3 _a3_xVec,
|
||||
tdxMatrix33 _a3a3_xMtx );
|
||||
extern void fn_v_TranMatrix( tdxMatrix33 _a3a3_xMtxD,
|
||||
tdxMatrix33 _a3a3_xMtxS );
|
||||
extern void fn_v_TranMatrixOne( tdxMatrix33 _a3a3_xMtxD );
|
||||
extern unsigned short fn_uw_AngleBetweenVect( tdxVector3 _a3_xVec1,
|
||||
tdxVector3 _a3_xVec2 );
|
||||
extern unsigned short fn_uw_AngleBetweenQuat( tdxQuater4 _a4_xQuat1,
|
||||
tdxQuater4 _a4_xQuat2 );
|
||||
extern SEB_xReal fn_x_VectorLength( tdxVector3 _a3_xVect );
|
||||
extern void fn_v_NormalizeVector( tdxVector3 _a3_xVect );
|
||||
extern SEB_xReal fn_x_NormalizeVector( tdxVector3 _a3_xVect );
|
||||
extern SEB_xReal fn_x_QuaterLength( tdxQuater4 _a4_xQuat );
|
||||
extern SEB_xReal fn_x_NormalizeQuater( tdxQuater4 _a4_xQuat );
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Matrices computations*/
|
||||
|
||||
extern void fn_v_MatrixByVector( tdxVector3 _a3_xVecD,
|
||||
tdxMatrix33 _a3a3_xMtxS,
|
||||
tdxVector3 _a3_xVecS );
|
||||
extern void fn_v_DiaByMatrix( tdxVector3 _a3a3_xMtxD,
|
||||
tdxVector3 _a3_xVecS,
|
||||
tdxMatrix33 _a3a3_xMtxS );
|
||||
extern void fn_v_MatrixByDia( tdxMatrix33 _a3a3_xMtxD,
|
||||
tdxMatrix33 _a3a3_xMtxS,
|
||||
tdxVector3 _a3_xVecS );
|
||||
extern void fn_v_MultMatrix( tdxMatrix33 _a3a3_xMtxR,
|
||||
tdxMatrix33 _a3a3_xMtx1,
|
||||
tdxMatrix33 _a3a3_xMtx2 );
|
||||
extern void fn_v_InvRotDiaRot( tdxMatrix33 _a3a3_xMtxD,
|
||||
tdxMatrix33 _a3a3_xMtxS,
|
||||
tdxVector3 _a3_xVecS );
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Matrices / Quaternions conversions*/
|
||||
|
||||
extern void fn_v_QuatToMatrix( tdxMatrix33 _a3a3_xMtx,
|
||||
tdxQuater4 _a4_xQuat );
|
||||
extern void fn_v_MatrixToQuat( tdxQuater4 _a4_xQuat,
|
||||
tdxMatrix33 _a3a3_xMtx );
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Interpolations computations*/
|
||||
|
||||
extern void fn_v_InterpolVect( tdxVector3 _a3_xVecD,
|
||||
tdxVector3 _a3_xVecS1,
|
||||
tdxVector3 _a3_xVecS2,
|
||||
register SEB_xReal _xT );
|
||||
extern void fn_v_InterpolQuat( tdxQuater4 _a4_xQuatD,
|
||||
tdxQuater4 _a4_xQuatS1,
|
||||
tdxQuater4 _a4_xQuatS2,
|
||||
register SEB_xReal _xT );
|
||||
extern void fn_v_InterpolQuatWithOmega( tdxQuater4 _a4_xQuatD,
|
||||
tdxQuater4 _a4_xQuatS1,
|
||||
tdxQuater4 _a4_xQuatS2,
|
||||
register SEB_xReal _xT,
|
||||
register signed short _swOmega );
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
#endif
|
||||
|
||||
#endif
|
84
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_intn.h
Normal file
84
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_intn.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/* ***********************************************************************************/
|
||||
/* * "a3x_intn.h" **/
|
||||
/* * Written by : S<>bastien Rubens **/
|
||||
/* * Tabulations : 4 char **/
|
||||
/* ***********************************************************************************/
|
||||
#ifndef A3X_INTN_H
|
||||
#define A3X_INTN_H
|
||||
|
||||
|
||||
#define C_uwAnimNotInterpolated 0xFFFF
|
||||
|
||||
|
||||
#ifndef A3X_INTN_C
|
||||
/* ***********************************************************************************/
|
||||
/* Interpolations computations*/
|
||||
extern void fn_v_CalculateGeneral( tdstAnim3d *_p_stAnim3d,
|
||||
unsigned long _ulFrame );
|
||||
extern tdstEvent *fn_v_GetEventsAddress( tdstAnim3d *_p_stAnim3d,
|
||||
unsigned long _ulFrame,
|
||||
tdxHandleToObjectsTablesList _h_ObjectsTablesListElement);/*AR9809 Parameter necessary for U64*/
|
||||
extern tdstFrame3d *fn_p_GetFramesAddress( tdstAnim3d *_p_stAnim,
|
||||
unsigned short _uwNumFrame,
|
||||
unsigned long _ulFrame,
|
||||
void *p_stSuperObject );
|
||||
|
||||
/* ****************************************************************** fn_vUpdateFrame*/
|
||||
/* Update Frame structure if it wasn't - but matrix isn't update*/
|
||||
/* Set Linear and Angular Speed (Alloc or Free Matrix) */
|
||||
/* Set Hierarchy*/
|
||||
/* Fill Element3D Array : ElementNuber,ElementType,ActiveStatus,ChannelNumber*/
|
||||
/* */
|
||||
/* 17/07/98 - Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern void fn_vUpdateFrame(void * _p_stSuperObject,
|
||||
tdstFrame3d * _p_stFrame,
|
||||
tdstAnim3d * _p_stAnim3d,
|
||||
unsigned short _uwFrame);
|
||||
|
||||
/* ************************************************************ fn_vUpdateFrameMatrix*/
|
||||
/* Update Frame if it wasn't update*/
|
||||
/* And Update Matrix in Channel Array */
|
||||
/* if they weren't updated*/
|
||||
/* or if bolean ForceUpdate is TRUE*/
|
||||
/* */
|
||||
/* 17/07/98 - Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern void fn_vUpdateFrameMatrix(void * _p_stSuperObject,
|
||||
tdstFrame3d * _p_stFrame,
|
||||
tdstAnim3d * _p_stAnim3d,
|
||||
unsigned short _uwFrame,
|
||||
unsigned char ucForceUpdate,
|
||||
tdstAChannel * d_stChannelArray);
|
||||
|
||||
/* ****************************************************** fn_p_stGetLinearSpeedVector*/
|
||||
/* Return the Linear Speed Vector */
|
||||
/* the vector returned is a reference so*/
|
||||
/* DON'T Modify it or Free it*/
|
||||
/* if there is no speed, return NULL*/
|
||||
/* reference remain valid until animation is free*/
|
||||
/* */
|
||||
/* 20/07/98 - Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern MTH3D_tdstVector * fn_p_stGetLinearSpeedVector(tdstAnim3d * _p_stAnim3d,unsigned short _uwFrame);
|
||||
|
||||
/* ***************************************************** fn_p_stGetAngularSpeedMatrix*/
|
||||
/* Return the Angular Speed Matrix */
|
||||
/* Fill the Matrix if exist and return pointer */
|
||||
/* If no angular speed return NULL*/
|
||||
/* The matrix pass in parameter must be allocate by the calling function*/
|
||||
/* */
|
||||
/* 20/07/98 - Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern MTH3D_tdstMatrix * fn_p_stGetAngularSpeedMatrix(tdstAnim3d * _p_stAnim3d,
|
||||
unsigned short _uwFrame,
|
||||
MTH3D_tdstMatrix * p_stMatrix);
|
||||
|
||||
#ifdef U64
|
||||
/*AR9902 Function to get the hierarchy couples of an animation even if it isn't loaded into the cache anymore*/
|
||||
extern tdstCouple* fn_p_stGetOldHieCouples(tdstAnim3d *p_stOldAnim,
|
||||
unsigned short uwOldFrameNumber);
|
||||
#endif /*U64*/
|
||||
#endif
|
||||
|
||||
#endif
|
22
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_load.h
Normal file
22
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_load.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/* ***********************************************************************************/
|
||||
/* * "a3x_load.h" **/
|
||||
/* * Written by : S<>bastien Rubens **/
|
||||
/* * Tabulations : 4 char **/
|
||||
/* ***********************************************************************************/
|
||||
#ifndef A3X_LOAD_H
|
||||
#define A3X_LOAD_H
|
||||
|
||||
|
||||
#ifndef A3X_LOAD_C
|
||||
/* ***********************************************************************************/
|
||||
extern unsigned short fn_uw_LoadAnimV6 ( void *_p_vStartFile );
|
||||
extern void fn_v_LoadCachedAnimV6 ( char *_p_cDestMem,
|
||||
void *_p_vStartFile,
|
||||
unsigned long _ulMaxlength );
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
#endif
|
||||
|
||||
#endif
|
128
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_mem.h
Normal file
128
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/a3x_mem.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/* ***********************************************************************************/
|
||||
/* * "a3x_mem.h" **/
|
||||
/* * Written by : S<>bastien Rubens **/
|
||||
/* * Tabulations : 4 char **/
|
||||
/* ***********************************************************************************/
|
||||
#ifndef A3X_MEM_H
|
||||
#define A3X_MEM_H
|
||||
|
||||
#include "a3x_glob.h"
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Defines*/
|
||||
|
||||
enum
|
||||
{ eStackA3dGENERAL,
|
||||
eStackVertexes,
|
||||
eStackQuaternions,
|
||||
eStackHierarchies,
|
||||
eStackNTTO,
|
||||
eStackOnlyFrames,
|
||||
eStackChannels,
|
||||
eStackFrames,
|
||||
eStackFramesKF,
|
||||
eStackKeyFrames,
|
||||
eStackEvents,
|
||||
eStackMorphData,
|
||||
/* the following stack are not affected by fn_v_UnclearPreviousLoadedAnims*/
|
||||
/*eStackFrame3d, */
|
||||
/*eStackElement3d,*/
|
||||
eStackNbMax
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Defines*/
|
||||
#define M_v_ResetOneStack( uwNumStack ) \
|
||||
tdstStacks[ (uwNumStack) ].ulPosAlloc= \
|
||||
tdstStacks[ (uwNumStack) ].ulStackPos= \
|
||||
tdstStacks[ (uwNumStack) ].ulResetPos
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Externs*/
|
||||
|
||||
extern tdstStackInfos tdstStacks[];
|
||||
/*extern tdstAnimLights stAnimLights;*/
|
||||
|
||||
extern tdstA3dGENERAL *p_stA3dGENERAL;
|
||||
extern tdxVector3 *p_a3_xVectors;
|
||||
extern tdxSShortQuater4 *p_a4_xQuaternions;
|
||||
extern tdstHierarchy *p_stHierarchies;
|
||||
extern tdstNTTO *p_stNTTO;
|
||||
extern tdstOnlyFrame *p_stOnlyFrames;
|
||||
extern tdstChannel *p_stChannels;
|
||||
extern tdstFrame *p_stFrames;
|
||||
extern tdstFrameKF *p_stFramesKF;
|
||||
extern tdstKeyFrame *p_stKeyFrames;
|
||||
extern tdstEvent *p_stEvents;
|
||||
extern tdstMorphData *p_stMorphData; /*AR9803*/
|
||||
|
||||
/*extern tdstFrame3d *p_stFrame3d;*/
|
||||
/*extern tdstElement3d **p_p_stElement3d;*/
|
||||
extern MTH3D_tdstMatrix *p_stAngularSpeedMatrix;
|
||||
extern tdstPLA_Hierarchy *p_stHierarchy;
|
||||
extern tdstElement3d *p_stElement3d;
|
||||
extern POS_tdstCompletePosition *p_stPosMatrix;
|
||||
|
||||
#ifdef U64
|
||||
extern tdstCuttedAnim *p_stCuttedAnim;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef A3X_MEM_C
|
||||
/* ***********************************************************************************/
|
||||
extern unsigned long fn_ul_GetStackAlloc( unsigned short _uwNumStack );
|
||||
extern unsigned long fn_ul_GetStackPos( unsigned short _uwNumStack );
|
||||
extern void fn_v_AllocateOnStack( unsigned short uwNumStack,
|
||||
unsigned short uwWantedSize );
|
||||
extern unsigned long fn_ul_AllocateOnStack( unsigned short _uwNumStack,
|
||||
unsigned short _uwWantedSize );
|
||||
extern void fn_v_DeAllocateOnStack( unsigned short _uwNumStack,
|
||||
unsigned short _uwSize );
|
||||
|
||||
/* ************************************************** fn_v_UnclearPreviousLoadedAnims*/
|
||||
/* Allow to keep the N First Anims when clear*/
|
||||
/* Must be call after loading the N anims*/
|
||||
/* 03/07/98 Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern void fn_v_UnclearPreviousLoadedAnims( void );
|
||||
|
||||
/* ************************************************************ fn_v_ClearLoadedAnims*/
|
||||
/* Clear Loaded Anims depending on parameter ucClearAll*/
|
||||
/* False : Until the position set by fn_v_UnclearPreviousLoadedAnims*/
|
||||
/* True : ALL anims*/
|
||||
/* 03/07/98 Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern void fn_v_ClearLoadedAnims(unsigned char ucClearAll);
|
||||
|
||||
/* **************************************************************** fn_v_InitInterpol*/
|
||||
/* Make allocation and init structure for anim management*/
|
||||
/* Must be called only once*/
|
||||
/* 03/07/98 Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern void fn_v_InitInterpol( void );
|
||||
|
||||
/* **************************************************************** fn_vSetStackSize*/
|
||||
/* Set the stack size */
|
||||
/* Must be called only once for all stack to configure it*/
|
||||
/**/
|
||||
/* 27/10/98 Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern void fn_vSetStackSize(unsigned short uwNumStack,unsigned long ulSize);
|
||||
|
||||
#ifndef RETAIL
|
||||
/* ***************************************************************** fn_vAnimStackLog*/
|
||||
/* Make a log of Memory used for each stack in an open file*/
|
||||
/**/
|
||||
/* 11/12/98 Carlos Torres*/
|
||||
/* ***********************************************************************************/
|
||||
extern void fn_vAnimStackLog(FILE * fLogFile);
|
||||
#endif /* RETAIL */
|
||||
|
||||
/* ***********************************************************************************/
|
||||
#endif
|
||||
|
||||
#endif
|
53
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/specif/a3x_pref.h
Normal file
53
Rayman_X/cpa/public/GAM/PlayAnim/Interpol/specif/a3x_pref.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* ***********************************************************************************/
|
||||
/* * "a3x_pref.h" **/
|
||||
/* * Written by : S<>bastien Rubens **/
|
||||
/* * Tabulations : 4 char **/
|
||||
/* ***********************************************************************************/
|
||||
#ifndef A3X_PREF_H
|
||||
#define A3X_PREF_H
|
||||
|
||||
/* ***********************************************************************************/
|
||||
/* Main Defines*/
|
||||
|
||||
#define PC
|
||||
#define NoInvalid
|
||||
|
||||
#define DIR_EXE "x:\\cpa\\exe\\main\\"
|
||||
#define DIR_FAMILIES "gamedata\\World\\Levels\\_common\\Families"
|
||||
#define DIR_ANIMS "World\\graphics\\anims"
|
||||
#define DIR_DATA "GameData"
|
||||
|
||||
#define REL_DIR_FAMILY "World\\Levels\\_common\\Families"
|
||||
|
||||
/*#define A3xDebug // A3x debug version ?*/
|
||||
/*#define A3X_CUT // Cutted animations*/
|
||||
/*#define MaxRAMSizeOfAnim 10240 // 10 Ko*/
|
||||
|
||||
/*#define A3X_AcpLight // If you want a light version of ACP structures*/
|
||||
|
||||
#define A3X_PC /* If you are on PC computer (nothing else)*/
|
||||
|
||||
#ifndef A3X_PC /* do not use with PC*/
|
||||
#define A3X_N64 /* We are on N64 ?*/
|
||||
#endif
|
||||
|
||||
#ifdef A3X_BINARISATION
|
||||
#define SEB_xReal double /* For binarisation*/
|
||||
#else
|
||||
#define SEB_xReal float /* For realtime*/
|
||||
#endif
|
||||
/*#define A3X_CacheIsUsed // If you use cache*/
|
||||
|
||||
#ifndef A3X_CacheIsUsed /* do not use with cache !*/
|
||||
|
||||
/*ANNECY TQ 22/07/98{*/
|
||||
/* We no longer use the static tables*/
|
||||
/*#define A3X_StaticTables // If you use static tables (or alloc tables)*/
|
||||
/*ENDANNECY TQ}*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* ***********************************************************************************/
|
||||
#endif
|
Reference in New Issue
Block a user