 
#if defined(WIN32)
#include <stdio.h>
#endif /* WIN32 */
 
#include "ToolsCPA.h"
 
#include "Macros.h"
 
#include "Actions/AllActs.h"
 
#include "Structur/EngMode.h"
#include "Structur/ErrGame.h"
#include "Structur/Input_S.h"
#include "Structur/StdObjSt.h"
#include "Structur/Objects.h"
 
#include "Ai\AiBase\WPEngDsp.h"
 
#include "Always.h"
#include "Basic.h"
#include "Input.h"
#include "InitEng.h"
#include "GameEng.h"
#include "GamOpt.h"
#include "ObjInit.h"
#include "ObjType.h"
#include "Zemem.h"
#include "Mainchar.h"
 
#include "prf.h"
 
#if !defined(U64)
#include "SnapShot.h"
#endif /* U64 */
 
#ifdef GAME_MENUS
#endif /* GAME_MENUS */
 
extern BOOL g_bAnimConstantSpeed;
 
#if !defined(U64)
void GLI_vChangeBenchMode();
#endif /* U64 */
 
#define D_3dData_StructureDefine
#include "LipsSync.h"
#include "micros.h"
#include "actions\3dData.h"
 
 
#include "ldt.h"
 
/*BEGIN FS 9/15/98*/
#if defined(GAM_USE_SCRIPT)
/*----------------------------------------------------------------------
 *  Description: callback for IptLink from .IPT script file
 *----------------------------------------------------------------------
 *  Input:
 *  Output:
 *----------------------------------------------------------------------
 *  Author: FS
 *  Creation date:9/15/98
 *  Modif date:
 *----------------------------------------------------------------------*/
int LoadIPT_Link( LDT_tdst_Link *pLink )
{
	LDT_tdeParseResult result=ParseResult_BeginSection;
	char *szEntryName;
 
	unsigned long ulNumberOfEntry=0;
	IPT_tdxHandleToEntryElement hCurrentEntry;
	
	/*Working for Entries*/
	result=LDT_GetNextEntry();
	while( result!=ParseResult_EndSection )
	{
		szEntryName=LDT_szGetEntryName();
		switch (*(long*)(szEntryName))
		{
		case 'RddA': /*AddRef*/
			if (!( ((*(long*)(LDT_szGetParam(1)))=='AroF') /*"ForAllVersion"*/
#if defined(WIN32)
				|| ((*(long*)(LDT_szGetParam(1)))=='ProF') /*"ForPc"*/
#endif /* WIN32 */
				 ))
			{
				hCurrentEntry = IPT_fn_hGetEntryActionHandle(LDT_szGetParam(1));
				*((IPT_tdxHandleToEntryElement*)&g_st_3DOS_EntryActions+ulNumberOfEntry) = hCurrentEntry;
				ulNumberOfEntry++;
			}
			break;
		} /* end switch*/
		result=LDT_GetNextEntry();
	} /*end while for entries*/
 
	/*Working for EndSection*/
	if (ulNumberOfEntry!=sizeof(struct tdst_EntryActions_)/sizeof(IPT_tdxHandleToEntryElement))
		M_GameFatalError(E_uwGameScriptBadIPTLinkNumber); 
 
	return 0;
}
#endif /* GAM_USE_SCRIPT */
/*END FS 9/15/98*/
