116 lines
3.2 KiB
C
116 lines
3.2 KiB
C
/*******************************************************/
|
|
/**** For the structures and variables declarations ****/
|
|
/*******************************************************/
|
|
#define D_AnimEffect_StructureDefine
|
|
#define D_AnimEffect_VariableDefine
|
|
|
|
#include "ToolsCPA.h"
|
|
|
|
#include "Options/Options.h"
|
|
#include "Macros.h"
|
|
|
|
#include "Actions/AllActs.h"
|
|
|
|
#include "Structur/MemGame.h"
|
|
#include "Structur/ErrGame.h"
|
|
#include "Structur/Objects.h"
|
|
#include "Structur/GameScpt.h"
|
|
#include "Structur/StdObjSt.h"
|
|
#include "Structur/EngMode.h"
|
|
|
|
#include "Basic.h"
|
|
#include "ObjInit.h"
|
|
#include "ZeMem.h"
|
|
|
|
#include "ldt.h"
|
|
|
|
#define lTagShiftPhase 'hPtf'
|
|
#define lTagShiftMax 'aMtf'
|
|
#define lTagShiftPlus 'lPtf'
|
|
|
|
|
|
|
|
/*****************************************************************
|
|
Function name : fn_iCreateAnimEffect
|
|
Description :
|
|
Author : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
|
|
Creation Date : 13-Oct-98
|
|
Modified :
|
|
Return type : int
|
|
Argument : LDT_tdst_Link *pLink
|
|
*****************************************************************/
|
|
int fn_iCreateAnimEffect( LDT_tdst_Link *pLink )
|
|
{
|
|
MS_tdxHandleToAnimEffect h_AnimEffect;
|
|
struct tdstEngineObject_ *p_stEngineObject = (struct tdstEngineObject_ *)pLink->pParent->pObject;
|
|
|
|
MMG_fn_vBeginMemoryInfo (MMG_C_lTypeMiniStructure , MMG_C_lSubTypeAnimEffect , p_stEngineObject);
|
|
h_AnimEffect = fn_h_AnimEffectRealAlloc();
|
|
MMG_fn_vEndMemoryInfo ();
|
|
|
|
p_stEngineObject->h_AnimEffect = h_AnimEffect;
|
|
|
|
pLink->pObject = (void*)h_AnimEffect;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
|
Function name : fn_iLoadAnimEffect
|
|
Description :
|
|
Author : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM
|
|
Creation Date : 13-Oct-98
|
|
Modified :
|
|
Return type : int
|
|
Argument : LDT_tdst_Link *pLink
|
|
*****************************************************************/
|
|
int fn_iLoadAnimEffect( LDT_tdst_Link *pLink )
|
|
{
|
|
LDT_tdeParseResult result=ParseResult_BeginSection;
|
|
MS_tdxHandleToAnimEffect h_AnimEffect = (MS_tdxHandleToAnimEffect)pLink->pObject;
|
|
MTH3D_tdstVector stVector;
|
|
|
|
while( result!=ParseResult_EndSection )
|
|
{
|
|
result=LDT_GetNextEntry();
|
|
switch( result )
|
|
{
|
|
case ParseResult_Entry: /* an entry */
|
|
{
|
|
char *szEntry=LDT_szGetEntryName();
|
|
switch (*(long*)szEntry)
|
|
{
|
|
|
|
case lTagShiftPhase : /* */
|
|
{
|
|
MTH3D_M_vSetVectorElements( &stVector,
|
|
(float)atof(LDT_szGetParam(1)), (float)atof(LDT_szGetParam(2)), (float)atof(LDT_szGetParam(3)) );
|
|
fn_vAnimEffectSetShiftPhase(h_AnimEffect, stVector);
|
|
|
|
}
|
|
break;
|
|
case lTagShiftMax : /* */
|
|
{
|
|
MTH3D_M_vSetVectorElements( &stVector,
|
|
(float)atof(LDT_szGetParam(1)), (float)atof(LDT_szGetParam(2)), (float)atof(LDT_szGetParam(3)) );
|
|
fn_vAnimEffectSetShiftMax(h_AnimEffect, stVector);
|
|
}
|
|
break;
|
|
case lTagShiftPlus : /* */
|
|
{
|
|
MTH3D_M_vSetVectorElements( &stVector,
|
|
(float)atof(LDT_szGetParam(1)), (float)atof(LDT_szGetParam(2)), (float)atof(LDT_szGetParam(3)) );
|
|
fn_vAnimEffectSetShiftPlus(h_AnimEffect, stVector);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|