/*******************************************************/ /**** For the structures and variables declarations ****/ /*******************************************************/ #define D_MSSound_StructureDefine #define D_MSSound_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 lTagSaturationDistance 'utaS' #define lTagBackGroundDistance 'kcaB' /***************************************************************** Function name : fn_iCreateMSSound Description : Author : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM Creation Date : 13-Oct-98 Modified : Return type : int Argument : LDT_tdst_Link *pLink *****************************************************************/ int fn_iCreateMSSound( LDT_tdst_Link *pLink ) { MS_tdxHandleToMSSound h_MSSound; struct tdstEngineObject_ *p_stEngineObject = (struct tdstEngineObject_ *)pLink->pParent->pObject; MMG_fn_vBeginMemoryInfo (MMG_C_lTypeMiniStructure , MMG_C_lSubTypeMSSound , p_stEngineObject); h_MSSound = fn_h_MSSoundRealAlloc(); MMG_fn_vEndMemoryInfo (); p_stEngineObject->h_MSSound = h_MSSound; pLink->pObject = (void*)h_MSSound; return 0; } /***************************************************************** Function name : fn_iLoadMSSound Description : Author : Ovidiu Scripa (oscripa@ubisoft.ro) - ROMTEAM Creation Date : 13-Oct-98 Modified : Return type : int Argument : LDT_tdst_Link *pLink *****************************************************************/ int fn_iLoadMSSound( LDT_tdst_Link *pLink ) { LDT_tdeParseResult result=ParseResult_BeginSection; MS_tdxHandleToMSSound h_MSSound = (MS_tdxHandleToMSSound)pLink->pObject; while( result!=ParseResult_EndSection ) { result=LDT_GetNextEntry(); switch( result ) { case ParseResult_Entry: /* an entry */ { char *szEntry=LDT_szGetEntryName(); switch (*(long*)szEntry) { case lTagSaturationDistance : /* */ { h_MSSound->stRollOff.rDistSatur = atol(LDT_szGetParam(1)); } break; case lTagBackGroundDistance : /* */ { h_MSSound->stRollOff.rDistBackGround = atol(LDT_szGetParam(1)); } break; } } } } return 0; }