/*=========================================================================
* AnimEffect.h : AnimEffect's functions
*
*
*         AnimEffect MUST BE REPLACE BY THE HEADER FILENAME
*
*
* Version              1.0
* Creation date        01/10/96
* Revision date
*
* That file needs to be compatible for all platforms.
*
* (c) Ubi Studios 1996
*=======================================================================*/
 
#ifndef D_THROW_ANIM_EFFECT
 
#if !defined(__AnimEffect_H__)
#define __AnimEffect_H__
 
/******************************************/
#if _MSC_VER >= 1000
#pragma once
#endif /* _MSC_VER >= 1000*/
/******************************************/
 
#include "GAM/Header.h"
 
#undef EXTERN
#undef extern
#if !defined(D_AnimEffect_VariableDefine)
#define EXTERN extern
#else
#define EXTERN
#endif /* D_AnimEffect_VariableDefine */
 
#if defined(__cplusplus)
extern "C"
{
#endif /* __cplusplus */
 
struct tdstAnimEffect_
{
  /*these describe the sinus phase of a module displacement along the anim's axis
  relatively to the position given by the current frame.*/
  MTH3D_tdstVector stShiftPhase, stShiftMax;
 
  /*there are time shifts that apply between two consecutive modules,
  so that they dont always do the same thing together*/
  MTH3D_tdstVector stShiftPlus;
};
 
/***********************/
/**** Handle define ****/
/***********************/
typedef struct tdstAnimEffect_ * MS_tdxHandleToAnimEffect;
 
/**** AnimEffect scripts ****/
#define C_SectionAnimEffectDescription                "AnimEffect"
#define C_EntryAnimEffectShiftPhase                        "ShiftPhase"
#define C_EntryAnimEffectShiftMax                        "ShiftMax"
#define C_EntryAnimEffectShiftPlus                        "ShiftPlus"
 
/**** Put here all globals variables : ****/
/****    EXTERN typeofvar  variable;   ****/
 
/*******************************/
/**** Base functions define ****/
/*******************************/
#if !defined(U64)
extern CPA_EXPORT SCR_tde_Anl_ReturnValue fn_eAnimEffectScriptCallback(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction);
#endif /*AR980217*/
/*extern CPA_EXPORT void fn_vAnimEffectSaveMiniStructure(SCR_tdst_File_Description *p_stFile,struct tdstEngineObject_ *p_stObject);*/
extern CPA_EXPORT unsigned long fn_ulAnimEffectSizeOf();
extern CPA_EXPORT void fn_vAnimEffectAlloc(struct tdstEngineObject_ *p_stObject);
extern CPA_EXPORT MS_tdxHandleToAnimEffect fn_h_AnimEffectRealAlloc();
extern CPA_EXPORT void fn_vAnimEffectFree(struct tdstEngineObject_ *p_stObject);
extern CPA_EXPORT void fn_vAnimEffectInit(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjectInit);
extern CPA_EXPORT void fn_vAnimEffectDesinit(struct tdstEngineObject_ *p_stObject,enum tdeObjectTreeInit_ eObjectInit);
extern CPA_EXPORT void fn_vAnimEffectCopyClone(struct tdstEngineObject_ * _p_stObjectDest,struct tdstEngineObject_ * _p_stObjectSrc);
/*********************************/
/**** Access functions define ****/
/*********************************/
extern CPA_EXPORT MTH3D_tdstVector fn_stAnimEffectGetShiftPhase(MS_tdxHandleToAnimEffect h_AnimEffect);
extern CPA_EXPORT MTH3D_tdstVector fn_stAnimEffectGetShiftMax(MS_tdxHandleToAnimEffect h_AnimEffect);
extern CPA_EXPORT MTH3D_tdstVector fn_stAnimEffectGetShiftPlus(MS_tdxHandleToAnimEffect h_AnimEffect);
extern CPA_EXPORT void fn_vAnimEffectSetShiftPhase(MS_tdxHandleToAnimEffect h_AnimEffect,MTH3D_tdstVector _stVector);
extern CPA_EXPORT void fn_vAnimEffectSetShiftMax(MS_tdxHandleToAnimEffect h_AnimEffect,MTH3D_tdstVector _stVector);
extern CPA_EXPORT void fn_vAnimEffectSetShiftPlus(MS_tdxHandleToAnimEffect h_AnimEffect,MTH3D_tdstVector _stVector);
 
/**********************************/
/**** Special functions define ****/
/**********************************/
 
/**********************/
/**** SAI function ****/
/**********************/
extern CPA_EXPORT void fn_vAnimEffectInitValueSAI(MS_tdxHandleToAnimEffect h_AnimEffect);
extern CPA_EXPORT void fn_vAnimEffectSavedValueSAI(MS_tdxHandleToAnimEffect h_AnimEffect);
extern CPA_EXPORT void fn_vAnimEffectFreeInitValueSAI(MS_tdxHandleToAnimEffect h_AnimEffect);
 
#if defined(__cplusplus)
}
#endif /* __cplusplus */
 
#endif /* __AnimEffect_H__ */
#endif /* D_THROW_ANIM_EFFECT */
