240 lines
9.2 KiB
C
240 lines
9.2 KiB
C
#define DEMO_ON
|
|
/*=========================================================================
|
|
* Demo.h : Demo's functions
|
|
*
|
|
*
|
|
* Demo MUST BE REPLACE BY THE HEADER FILENAME
|
|
*
|
|
*
|
|
* Version 1.0
|
|
* Creation date 16/04/98
|
|
* Revision date
|
|
*
|
|
* That file needs to be compatible for all platforms.
|
|
*
|
|
* (c) Ubi Studios 1998
|
|
*=======================================================================*/
|
|
|
|
#if !defined(__Demo_H__)
|
|
#define __Demo_H__
|
|
|
|
/******************************************/
|
|
#if _MSC_VER >= 1000
|
|
#pragma once
|
|
#endif /* _MSC_VER >= 1000 */
|
|
/******************************************/
|
|
|
|
#if defined(__cplusplus)
|
|
extern "C"
|
|
{
|
|
#endif /* __cplusplus */
|
|
|
|
#include "GAM/Header.h"
|
|
|
|
#define DEMO_DELTACOUNT 20 /* Save complete position only 1 out of DEMO_DELTACOUNT*/
|
|
|
|
#define DEMO_NOTHING 0
|
|
#define DEMO_RECORD 1
|
|
#define DEMO_PLAY 2
|
|
|
|
#define DEMO_FLAG_NEW_ENGINE_FRAME 0x00000001
|
|
#define DEMO_FLAG_STATE_CHANGE 0x00000002
|
|
#define DEMO_FLAG_FRAME_CHANGE 0x00000004
|
|
#define DEMO_FLAG_TRANSPARENCY_CHANGE 0x00000008
|
|
|
|
#define DEMO_FLAG_TRANSLATION_COMPLETE 0x00000010
|
|
#define DEMO_FLAG_TRANSLATION_DELTA 0x00000020
|
|
#define DEMO_FLAG_ROTATION_COMPLETE 0x00000040
|
|
#define DEMO_FLAG_ROTATION_DELTA 0x00000080
|
|
|
|
#define DEMO_FLAG_ACTIVATE 0x00000100
|
|
#define DEMO_FLAG_DESACTIVATE 0x00000200
|
|
#define DEMO_FLAG_ACTIVATE_CANAL 0x00000400
|
|
#define DEMO_FLAG_DESACTIVATE_CANAL 0x00000800
|
|
|
|
#define DEMO_FLAG_IS_AN_ALWAYS 0x00001000
|
|
/* #define DEMO_FLAG_SECTOR_CHANGE 0x00002000*/
|
|
#define DEMO_FLAG_COMPRESS_ACTOR_NUMBER 0x00002000
|
|
#define DEMO_FLAG_DELTA_POSITION 0x00004000
|
|
#define DEMO_FLAG_EXTENDED 0x00008000
|
|
|
|
#define DEMO_FLAG_ACTIVE_DESACTIVE 0x00000001
|
|
#define DEMO_FLAG_SUPERIMPOSED_TEXT 0x00000002
|
|
#define DEMO_FLAG_FIX_CHANGE 0x00000004
|
|
/* ANNECY AV {*/
|
|
#define DEMO_FLAG_CHANGE_VIEWPORT_SIZE 0x00000008
|
|
#define DEMO_FLAG_MODULE_TRANSPARENCY 0x00000010
|
|
#define DEMO_FLAG_ACTIVATE_TRANSPARENCY 0x00000020
|
|
#define DEMO_FLAG_DESACTIVATE_TRANSPARENCY 0x00000040
|
|
#define DEMO_FLAG_MOVE_MODULE 0x00000080
|
|
#define DEMO_FLAG_ROTATE_MODULE 0x00000100
|
|
#define DEMO_FLAG_GENERATE_AGO 0x00000200
|
|
/* END ANNECY AV }*/
|
|
|
|
/*
|
|
#define DEMO_FIX_HIT_POINTS 1
|
|
#define DEMO_FIX_HIT_POINTS_MAX 2
|
|
#define DEMO_FIX_SILVER_SPADE 3
|
|
#define DEMO_FIX_SILVER_SPADE_MAX 4
|
|
#define DEMO_FIX_LIVES 5
|
|
#define DEMO_FIX_TINGS 6
|
|
#define DEMO_FIX_BEES 7
|
|
*/
|
|
|
|
|
|
#define DEMO_TEST_FLAG(Flag,Mask) ( ((Flag) & (Mask)) == (Mask) )
|
|
|
|
#define DEMO_FLAG_CAST unsigned short
|
|
|
|
#define M_DEMO_MOVE(type) gp_DEMO_CurrentPosInMemory += sizeof(type)
|
|
|
|
#define M_DEMO_WRITE(info,type) \
|
|
{ \
|
|
memcpy(gp_DEMO_CurrentPosInMemory,info,sizeof(type)); \
|
|
M_DEMO_MOVE(type); \
|
|
}
|
|
|
|
#define M_DEMO_READ(info,type) \
|
|
{ \
|
|
memcpy(info,gp_DEMO_CurrentPosInMemory,sizeof(type)); \
|
|
M_DEMO_MOVE(type); \
|
|
}
|
|
|
|
#define M_DEMO_LOOK(info,decal,type) \
|
|
{ \
|
|
memcpy(info,gp_DEMO_CurrentPosInMemory+(decal),sizeof(type)); \
|
|
}
|
|
|
|
/* ANNECY AV {*/
|
|
typedef struct tdstDemoCompressedMatrix_
|
|
{
|
|
short a9_sCoef [9];
|
|
} tdstDemoCompressedMatrix;
|
|
|
|
typedef struct tdstDemoUltraConpressedMatrix_
|
|
{
|
|
char a9_cCoef [9];
|
|
} tdstDemoUltraCompressedMatrix;
|
|
|
|
typedef struct tdstDemoSOList_
|
|
{
|
|
LST2_M_StaticElementDeclaration(DEMO_tdxHandleToDemoSOElement)
|
|
HIE_tdxHandleToSuperObject hCharacterSupObject;
|
|
|
|
unsigned char ucReInit;
|
|
unsigned char ucDeltaCounter;
|
|
MTH3D_tdstVector _stTrs; /* translation*/
|
|
/* ANNECY AV {*/
|
|
/* POS_tdstShortQuaternion _stQuaternion; // rotation*/
|
|
tdstDemoCompressedMatrix stCompressedMatrix;
|
|
/* END ANNECY AV }*/
|
|
|
|
unsigned short wStateNumber;
|
|
unsigned short uwCurrentFrame;
|
|
unsigned char ucActivate;
|
|
unsigned char ucTransparence;
|
|
} tdstDemoSOList;
|
|
|
|
typedef struct tdstDemoGMTList_
|
|
{
|
|
LST2_M_StaticElementDeclaration(DEMO_tdxHandleToDemoGMTElement)
|
|
GMT_tdxHandleToGameMaterial hGameMaterial;
|
|
} tdstDemoGMTList;
|
|
|
|
extern void DEMO_fn_vPrepareForRead(int _iNbFramesToWait);
|
|
extern void DEMO_fn_vPrepareForWrite(void);
|
|
|
|
extern void DEMO_fn_vLoadFromFile(char *szFileName);
|
|
#ifndef RETAIL
|
|
extern void DEMO_fn_vSaveToFile(void);
|
|
#endif /* RETAIL */
|
|
|
|
extern void DEMO_fn_vSetTestInputDuringDemo (int _bTestInput);
|
|
extern void DEMO_fn_vSetMapToLoadWhenDemoFinished (char * _szMapName);
|
|
|
|
extern void DEMO_fn_vSwitchVCRMode ();
|
|
|
|
extern void DEMO_fn_vAutoPlayDemoFromFile(char *szFileName);
|
|
|
|
extern void DEMO_fn_vAllocateMemory(void);
|
|
extern void DEMO_fn_vCloseFirstInit(void);
|
|
|
|
#ifndef RETAIL
|
|
extern void DEMO_fn_vSaveACompleteCharacterPosition(HIE_tdxHandleToSuperObject hSO);
|
|
#endif /* RETAIL */
|
|
extern void DEMO_fn_vGetACompleteCharacterPosition(HIE_tdxHandleToSuperObject hSO);
|
|
extern void DEMO_fn_vGoToTheNextInfoBlock(void);
|
|
|
|
|
|
extern void DEMO_fn_vInitSOList(void);
|
|
extern tdstDemoSOList* DEMO_fn_p_stCreateSOListElement(void);
|
|
/* ANNECY AV {*/
|
|
extern void DEMO_fn_vStartOfAlwaysCreation ();
|
|
/* END ANNECY AV }*/
|
|
extern void DEMO_fn_vPutCharacterInList(HIE_tdxHandleToSuperObject hSO);
|
|
extern void DEMO_fn_vReInitSOList(void);
|
|
|
|
extern unsigned short DEMO_fn_wGetNumberFromSO(HIE_tdxHandleToSuperObject hSO);
|
|
extern tdstDemoSOList * DEMO_fn_p_stGetInfosPointerFromSO(HIE_tdxHandleToSuperObject hSO);
|
|
extern unsigned short DEMO_fn_vFindMainCharacterNumber(void);
|
|
|
|
#ifndef RETAIL
|
|
extern void DEMO_fn_vSaveFixValuesChange(unsigned char FieldFlag,unsigned char ucNewValue);
|
|
/* ANNECY AV {*/
|
|
/* extern void DEMO_fn_vSaveSuperImposedTextActivationDesactivation(int iIndex,FON_tdxHandleOfString hText,FON_tdxHandleOfFont hFont,MTH_tdxReal xPosX,MTH_tdxReal xPosY,long lLiveTime,int Activate);*/
|
|
extern void DEMO_fn_vSaveChangeViewportSize (unsigned char _ucParam1 , unsigned char _ucParam2 , unsigned char _ucParam3 ,
|
|
unsigned char _ucParam4 , unsigned char _ucParam5 , unsigned char _ucParam6 ,
|
|
unsigned char _ucParam7 , unsigned char _ucParam8 , unsigned char _ucParam9 , unsigned char _ucParam10);
|
|
extern void DEMO_fn_vSaveModuleTransparencyValue (HIE_tdxHandleToSuperObject hSO , unsigned char ucChannelNumber , MTH_tdxReal xTransparencyValue);
|
|
extern void DEMO_fn_vSaveActivateModuleTransparency (HIE_tdxHandleToSuperObject hSO , unsigned char ucChannelNumber , int bTransparencyActive);
|
|
extern void DEMO_fn_vSaveModuleMove (HIE_tdxHandleToSuperObject hSO , unsigned char ucChannelNumber , int bSaveTransformMatrix);
|
|
/* END ANNECY AV }*/
|
|
extern void DEMO_fn_vSaveHitPointValuesChange(MS_tdxHandleToStandardGame h_StdGame,unsigned char ucHitPoints,int HitPointsFlag);
|
|
extern void DEMO_fn_vSaveAlwaysActivationDesactivation(HIE_tdxHandleToSuperObject hSO,MTH3D_tdstVector * p_stTempVector,int Activate);
|
|
extern void DEMO_fn_vSaveCanalActivationDesactivation(HIE_tdxHandleToSuperObject hSO, unsigned char ucChannelNumber,int Activate);
|
|
/* extern void DEMO_fn_vSaveSectorChange(HIE_tdxHandleToSuperObject hSO, HIE_tdxHandleToSuperObject hSectorNew);*/
|
|
extern CPA_EXPORT void DEMO_fn_vTestAndSaveActivationDesactivation(HIE_tdxHandleToSuperObject hSO, int Active);
|
|
extern void DEMO_SaveInfo(HIE_tdxHandleToSuperObject hSO);
|
|
#endif /* RETAIL */
|
|
|
|
|
|
extern BOOL DEMO_Play(HIE_tdxHandleToSuperObject hSO);
|
|
extern ACP_tdxBool DEMO_fn_bUpdateDynamicHierarchy(void);
|
|
|
|
/* ANNECY MT - 04/12/98 {*/
|
|
extern CPA_EXPORT void DEMO_fn_vStopWhenPlaying(void);
|
|
/* END ANNECY MT }*/
|
|
|
|
extern CPA_EXPORT unsigned short g_DEMO_KeybTest;
|
|
extern unsigned short g_DEMO_FirstInitFlag;
|
|
|
|
|
|
|
|
|
|
/* ANNECY MT - 30/04/99 { */
|
|
extern void DEMO_fn_vInitGMTFixList(void);
|
|
extern void DEMO_fn_vInitGMTLevelList(void);
|
|
|
|
extern tdstDemoGMTList* DEMO_fn_p_stCreateGMTListElement(void);
|
|
extern tdstDemoGMTList* DEMO_fn_p_stCreateGMTListElement(void);
|
|
|
|
extern void DEMO_fn_vPutGMTInList(GMT_tdxHandleToGameMaterial _hGameMaterial);
|
|
|
|
extern unsigned short DEMO_fn_wGetNumberFromGMT(GMT_tdxHandleToGameMaterial _hGameMaterial);
|
|
extern GMT_tdxHandleToGameMaterial DEMO_fn_hGetGMTFromList(unsigned short _uwIndex);
|
|
|
|
#ifndef RETAIL
|
|
extern void DEMO_fn_vSaveGenerateAGO (unsigned long PartType, MTH3D_tdstVector *p_stPosition, MTH3D_tdstVector *p_stDirection, GMT_tdxHandleToGameMaterial hGameMaterial, float parameter);
|
|
#endif /* RETAIL */
|
|
|
|
extern void DEMO_fn_vDesInitLevel();
|
|
extern void DEMO_fn_vDesInitGame();
|
|
|
|
/* END ANNECY MT } */
|
|
|
|
#if defined(__cplusplus)
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __Demo_H__ */
|