Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
/*=========================================================================
* IPO.c : Instanciated Physical Objects functions
*
* Version 1.0
* Creation date 25/04/97
* Revision date
*
* That file needs to be compatible for all platforms.
*
* (c) Ubi Studios 1997
*=======================================================================*/
#define IPO_FRIEND
#include "ACP_Base.h"
#include "GEO.h"
#include "GLI.h"
#include "SPO.h"
#include "PCS.h"
#include "PO.h"
#include "IPO.h"
/* ***************************************************************************** */
/* ********************** Basics functions for IPOs **************************** */
/* ***************************************************************************** */
/*-----------------------------------------------------------------------------
* Description : Allocate a Instanciated Physical Object
*-----------------------------------------------------------------------------
* Creation date : 28/04/97 Author : Sebastien DAVID
*-----------------------------------------------------------------------------*/
IPO_tdxHandleToInstanciatedPhysicalObject IPO_fn_hAllocInstanciatedPhysicalObject(void)
{
IPO_tdstInstanciatedPhysicalObject *p_stInstanciatedPhysicalObject;
/*p_stInstanciatedPhysicalObject = (struct IPO_tdstInstanciatedPhysicalObject_ *)Mmg_fn_p_vAlloc(sizeof(struct IPO_tdstInstanciatedPhysicalObject_));*/
MMG_fn_vAddMemoryInfo (MMG_C_lTypeIPO , MMG_C_lSubTypeIPOStructure , NULL);
GEO_M_CPAMalloc(p_stInstanciatedPhysicalObject,struct IPO_tdstInstanciatedPhysicalObject_ *, sizeof(struct IPO_tdstInstanciatedPhysicalObject_), E_uwGEONotEnoughtMemory);
p_stInstanciatedPhysicalObject->_hPhysicalObject = NULL;
p_stInstanciatedPhysicalObject->_hRadiosity = NULL;
return (p_stInstanciatedPhysicalObject);
}
/*-----------------------------------------------------------------------------
* Description : Free a Physical Object
*-----------------------------------------------------------------------------
* Creation date : 28/04/97 Author : Sebastien DAVID
*-----------------------------------------------------------------------------*/
#ifndef _FIRE_DEADCODE_U64_
void IPO_fn_vFreeInstanciatedPhysicalObject(IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject)
{
Mmg_fn_vFree4Ch(_hInstanciatedPhysicalObject,C_ucMmgDefaultChannel);
}
#endif /* _FIRE_DEADCODE_U64_ */
/* ***************************************************************************** */
/* ******************** Access functions to Objects in IPO *********************** */
/* ***************************************************************************** */
/*-----------------------------------------------------------------------------
* Description : Get the PhysicalObject in a Instanciated Physical Object
*-----------------------------------------------------------------------------
* Creation date : 28/04/97 Author : Sebastien DAVID
*-----------------------------------------------------------------------------*/
PO_tdxHandleToPhysicalObject IPO_fn_hGetPhysicalObject(IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject)
{
return(_hInstanciatedPhysicalObject->_hPhysicalObject);
}
/*-----------------------------------------------------------------------------
* Description : Set the PhysicalObject in a Instanciated Physical Object
*-----------------------------------------------------------------------------
* Creation date : 28/04/97 Author : Sebastien DAVID
*-----------------------------------------------------------------------------*/
#ifndef _FIRE_DEADCODE_U64_
void IPO_fn_vSetPhysicalObject(IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject
,PO_tdxHandleToPhysicalObject _hPhysicalObject)
{
_hInstanciatedPhysicalObject->_hPhysicalObject = _hPhysicalObject;
}
#endif /* _FIRE_DEADCODE_U64_ */
/*-----------------------------------------------------------------------------
* Description : Get the Radiosity in a Instanciated Physical Object
*-----------------------------------------------------------------------------
* Creation date : 28/04/97 Author : Sebastien DAVID
*-----------------------------------------------------------------------------*/
ACP_tdxHandleToRadiosity IPO_fn_hGetRadiosity(IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject)
{
return(_hInstanciatedPhysicalObject->_hRadiosity);
}
/*-----------------------------------------------------------------------------
* Description : Set the Radiosity in a Instanciated Physical Object
*-----------------------------------------------------------------------------
* Creation date : 28/04/97 Author : Sebastien DAVID
*-----------------------------------------------------------------------------*/
void IPO_fn_vSetRadiosity(IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject
,ACP_tdxHandleToRadiosity _hRadiosity)
{
_hInstanciatedPhysicalObject->_hRadiosity = _hRadiosity;
}

View File

@@ -0,0 +1,400 @@
/*=========================================================================
* Load.c : Loading IPO Files
*
* Version 1.0
* Creation date 29/04/97
* Revision date
*
* That file needs to be compatible for all platforms.
*
* (c) Ubi Studios 1997
*=======================================================================*/
#define IPO_FRIEND
#include "ACP_Base.h"
#include "SCR.h"
#include "DPT.h"
#include "GEO.h"
#include "GLI.h"
#include "SPO.h"
#include "PCS.h"
#include "PO.h"
/*#include "BIN.h"*/
#include "IPO.h"
#include "ISI.h"
/* global for IPO Link Table*/
SCR_tdst_Link_Table IPO_g_stLinkTable;
/*-----------------------------------------------------------------------------
* Description : initialize and close link table for IPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : 29/04/97 Author : Sebastien DAVID (G<>zmo)
*-----------------------------------------------------------------------------
* Modification date : Modification Author :
* Modifications :
*---------------------------------------------------------------------------*/
SCR_tdst_Link_Table *IPO_fn_p_stGetLinkTable(void)
{
return(&IPO_g_stLinkTable);
}
void IPO_fn_vInitLinkTable(void)
{
SCR_fn_v_Link_InitTable(&IPO_g_stLinkTable);
}
void IPO_fn_vCloseLinkTable(void)
{
SCR_fn_v_Link_CloseTable(&IPO_g_stLinkTable);
}
/*-----------------------------------------------------------------------------
* Description : Used to register all script callback functions
*-----------------------------------------------------------------------------
* Creation date : 30/04/97 Author : Sebastien DAVID (G<>zmo)
*-----------------------------------------------------------------------------*/
void IPO_fn_vRegisterAllScriptSections(void)
{
SCR_fn_v_RdL0_RegisterCallback(C_Section_IPOHeader, IPO_fn_eScriptCallBackHeader,SCR_CRC_c_RdL0_ForSection);
SCR_fn_v_RdL0_RegisterCallback(C_Section_IPOGeneral, IPO_fn_eScriptCallBackGeneral,SCR_CRC_c_RdL0_ForSection);
SCR_fn_v_RdL0_RegisterCallback(C_Section_IPO_MirrorGeneral, IPO_fn_eScriptCallBackGeneral,SCR_CRC_c_RdL0_ForSection);
/*BEGIN OS 23-Mar-98*/
/* SCR_fn_v_RdL0_RegisterCallback(C_Section_IPOHeader, IPO_fn_eScriptCallBackBinHeader,SCR_CRC_c_RdL0_ForBinSection);*/
/* SCR_fn_v_RdL0_RegisterCallback(C_Section_IPOGeneral, IPO_fn_eScriptCallBackBinGeneral,SCR_CRC_c_RdL0_ForBinSection);*/
/* SCR_fn_v_RdL0_RegisterCallback(C_Section_IPO_MirrorGeneral, IPO_fn_eScriptCallBackBinGeneral,SCR_CRC_c_RdL0_ForBinSection);*/
/*END OS 23-Mar-98*/
}
/*-----------------------------------------------------------------------------
* Description : call-back for header section of IPO script file
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : 30/04/97 Author : Sebastien DAVID (G<>zmo)
*-----------------------------------------------------------------------------*/
SCR_tde_Anl_ReturnValue IPO_fn_eScriptCallBackHeader(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction)
{
SCR_tde_Anl_ReturnValue eReturnValue = SCR_ERV_Anl_NormalReturn;
if ( M_IsEntry )
{
if ( M_ActionIs( C_Entry_FileVersion ) )
{
/* not used yet*/
/*gs_wIPOFileVersion = (short)fn_lAToI( _ap_szParams[0] );*/
}
}
return ( eReturnValue );
}
/*-----------------------------------------------------------------------------
* Description : call-back for general section of IPO script file
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : 30/04/96 Author : Sebastien DAVID (G<>zmo)
*-----------------------------------------------------------------------------*/
SCR_tde_Anl_ReturnValue IPO_fn_eScriptCallBackGeneral(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction)
{
SCR_tde_Anl_ReturnValue eReturnValue = SCR_ERV_Anl_NormalReturn;
IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject;
SCR_tdst_Cxt_Values *p_stVal;
static char sz_LongPathForLinkTable[256];
SCR_fn_v_RdL0_SetPriorityPath(fn_szGetLevelsDataPath());
if ( M_IsTitle )
{
_hInstanciatedPhysicalObject = IPO_fn_hAllocInstanciatedPhysicalObject();
SCR_M_RdL0_SetSectionLong(C_ThisContext,0,_hInstanciatedPhysicalObject);
SCR_M_RdL0_ComputeOpenSectionNameR(0,sz_LongPathForLinkTable);
SCR_M_v_Link_SetAdditionalLong(SCR_fnp_st_Link_SetValue(&IPO_g_stLinkTable,sz_LongPathForLinkTable,(unsigned long)_hInstanciatedPhysicalObject),1,strlen(sz_LongPathForLinkTable)-strlen(SCR_M_RdL0_GetCompleteSectionNameR(0)));
}
else if ( M_IsEntry )
{
if ( M_ActionIs( C_Entry_PO ) )
{
SCR_M_RdL0_GetSectionLong(C_ThisContext,0,IPO_tdxHandleToInstanciatedPhysicalObject,_hInstanciatedPhysicalObject);
_hInstanciatedPhysicalObject->_hPhysicalObject=CS_fn_xLoadPhysicalObject(_ap_szParams[0]);
}
else if ( M_ActionIs( C_Entry_RLI ) )
{
SCR_M_RdL0_GetSectionLong(C_ThisContext,0,IPO_tdxHandleToInstanciatedPhysicalObject,_hInstanciatedPhysicalObject);
p_stVal = SCR_fnp_st_RdL0_AnalyseSection(_ap_szParams[0], SCR_CDF_uw_Anl_Normal);
_hInstanciatedPhysicalObject->_hRadiosity = (ACP_tdxHandleToRadiosity)SCR_M_ul_RdL0_ExtractLongValue(p_stVal,0);
}
}
return ( eReturnValue );
}
/*-----------------------------------------------------------------------------
* Description : function to load a IPO (script or binary load)
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
IPO_tdxHandleToInstanciatedPhysicalObject IPO_fn_xLoadInstanciatedPhysicalObject(char* _szSectionName)
{
SCR_tdst_Cxt_Values *p_stValues;
SCR_tdst_Link_Value *p_stLinkValue;
IPO_tdxHandleToInstanciatedPhysicalObject hInstanciatedPhysicalObject=NULL;
unsigned int uiPos;
uiPos = 0;
SCR_M_DyAr_GetNextElement(SCR_tdst_Link_Value, uiPos, p_stLinkValue,SCR_M_st_Link_GetDynamicArray(&IPO_g_stLinkTable));
while(p_stLinkValue)
{
if(!strcmpi(SCR_M_p_sz_Link_GetKey(p_stLinkValue) + SCR_M_ul_Link_GetAdditionalLong(p_stLinkValue,1),_szSectionName))
break;
uiPos++;
SCR_M_DyAr_GetNextElement(SCR_tdst_Link_Value, uiPos, p_stLinkValue,SCR_M_st_Link_GetDynamicArray(&IPO_g_stLinkTable));
}
/* p_stLinkValue=BIN_fn_p_stSearchShortKey(&IPO_g_stLinkTable,_szSectionName);*/
if(p_stLinkValue==NULL)
{
p_stValues = SCR_fnp_st_RdL0_AnalyseSection(_szSectionName, SCR_CDF_uw_Anl_Normal);
hInstanciatedPhysicalObject = (IPO_tdxHandleToInstanciatedPhysicalObject)SCR_M_ul_RdL0_ExtractLongValue(p_stValues,0);
return hInstanciatedPhysicalObject;
}
else
return (IPO_tdxHandleToInstanciatedPhysicalObject)p_stLinkValue->ulValue;
}
/*-----------------------------------------------------------------------------
* Description : function to prepare the binary save process
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
void IPO_fn_vPrepareSaveBinaryBloc()
{
BIN_fn_vCreateBinaryIds(&IPO_g_stLinkTable,BIN_C_IPOID);
PO_fn_vPrepareSaveBinaryBloc();
ISI_fn_vPrepareSaveBinaryBloc();
}
*/
/*-----------------------------------------------------------------------------
* Description : function to write a binary IPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
unsigned long IPO_fn_ulWriteBinaryBloc(unsigned long _ulStructAddress, char* _p_cDestBuffer)
{
IPO_tdxHandleToInstanciatedPhysicalObject hIPO=(IPO_tdxHandleToInstanciatedPhysicalObject)_ulStructAddress;
char* p_cBufferPointer=_p_cDestBuffer;
p_cBufferPointer=BIN_fn_p_cPutPointer(p_cBufferPointer,
(unsigned long)IPO_fn_hGetPhysicalObject(hIPO),
&PO_g_stLinkTable);
p_cBufferPointer=BIN_fn_p_cPutPointer(p_cBufferPointer,
(unsigned long)IPO_fn_hGetRadiosity(hIPO),
ISI_fn_pGetLinkTable());
return p_cBufferPointer-_p_cDestBuffer;
}
*/
/*-----------------------------------------------------------------------------
* Description : function to write all the binary IPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
void IPO_fn_vWriteAllIPOBinaryBlocs(char* _szBinaryFileName)
{
IPO_fn_vPrepareSaveBinaryBloc();
BIN_fn_vPutBinaryDataIntoFileFromLinkTable(_szBinaryFileName,&IPO_g_stLinkTable,
2*sizeof(unsigned long),IPO_fn_ulWriteBinaryBloc);
}
*/
/*-----------------------------------------------------------------------------
* Description : function to read a binary IPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
unsigned long IPO_fn_ulReadBinaryBloc(char* _p_cLoadedBuffer,unsigned long _ulLoadedBufferSize)
{
unsigned long ulAddress;
IPO_tdxHandleToInstanciatedPhysicalObject hIPO;
char* p_cBufferPointer=_p_cLoadedBuffer;
// Allocation
hIPO = IPO_fn_hAllocInstanciatedPhysicalObject();
p_cBufferPointer=BIN_fn_p_cGetPointer(p_cBufferPointer,(unsigned long*)&ulAddress,&PO_g_stLinkTable);
IPO_fn_vSetPhysicalObject(hIPO,(PO_tdxHandleToPhysicalObject)ulAddress);
p_cBufferPointer=BIN_fn_p_cGetPointer(p_cBufferPointer,(unsigned long*)&ulAddress,ISI_fn_pGetLinkTable());
IPO_fn_vSetRadiosity(hIPO,(ACP_tdxHandleToRadiosity)ulAddress);
return (unsigned long)hIPO;
}
*/
/*-----------------------------------------------------------------------------
* Description : function to read all the binary blocs fort the IPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
void IPO_fn_vReadAllIPOBinaryBlocs(char* _szBinaryFileName)
{
BIN_fn_vReadDataFromLinkTable(&IPO_g_stLinkTable,IPO_fn_ulReadBinaryBloc,2*sizeof(unsigned long),_szBinaryFileName);
}
*/
/*-----------------------------------------------------------------------------
* Description : function to read a binary IPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
void IPO_fn_vResolveBinaryBloc(unsigned long _ulAddress)
{
IPO_tdxHandleToInstanciatedPhysicalObject hIPO;
hIPO=(IPO_tdxHandleToInstanciatedPhysicalObject)_ulAddress;
BIN_fn_p_cGetPointer((char*)&hIPO->_hPhysicalObject,(unsigned long*)&hIPO->_hPhysicalObject,&PO_g_stLinkTable);
BIN_fn_p_cGetPointer((char*)&hIPO->_hRadiosity,(unsigned long*)&hIPO->_hRadiosity,ISI_fn_pGetLinkTable());
}
*/
/*
char* IPO_fn_p_cGenericAllocationFunction(unsigned long ulSize)
{
char* p_cBuffer;
GEO_M_CPAMalloc(p_cBuffer,char *, ulSize, E_uwGEONotEnoughtMemory);
return p_cBuffer;
}
*/
/*-----------------------------------------------------------------------------
* Description : function to read all the binary blocs fort the IPO
*-----------------------------------------------------------------------------
*-----------------------------------------------------------------------------
* Creation date : Aug 97 Author : Alain Robin
*-----------------------------------------------------------------------------*/
/*
void IPO_fn_vReadAllIPOBinaryBlocs2(char* _szBinaryFileName)
{
BIN_fn_vReadDataFromLinkTableWithoutAllocation(&IPO_g_stLinkTable,IPO_fn_vResolveBinaryBloc,
2*sizeof(unsigned long),_szBinaryFileName,
IPO_fn_p_cGenericAllocationFunction);
}
*/
/*
BEGIN OS 06.03.98
Callbacks for bin files.
*/
/*-----------------------------------------------------------------------------
* Description : function to load a IPO (script or binary load)
*-----------------------------------------------------------------------------*/
/*
IPO_tdxHandleToInstanciatedPhysicalObject IPO_fn_xLoadBinInstanciatedPhysicalObject(char* _szSectionName)
{
SCR_tdst_Cxt_Values *p_stValues;
SCR_tdst_Link_Value *p_stLinkValue;
IPO_tdxHandleToInstanciatedPhysicalObject hInstanciatedPhysicalObject=NULL;
p_stLinkValue=BIN_fn_p_stSearchShortKey(&IPO_g_stLinkTable,_szSectionName);
if(p_stLinkValue==NULL)
{
p_stValues = SCR_fnp_st_Bin_GetREFERENCE( _szSectionName );
hInstanciatedPhysicalObject = (IPO_tdxHandleToInstanciatedPhysicalObject)SCR_M_ul_RdL0_ExtractLongValue(p_stValues,0);
return hInstanciatedPhysicalObject;
}
else
return (IPO_tdxHandleToInstanciatedPhysicalObject)p_stLinkValue->ulValue;
}
*/
/*-----------------------------------------------------------------------------
* Description : call-back for header section of IPO script file
*-----------------------------------------------------------------------------*/
/*
SCR_tde_Anl_ReturnValue IPO_fn_eScriptCallBackBinHeader(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction)
{
SCR_tde_Anl_ReturnValue eReturnValue = SCR_ERV_Anl_NormalReturn;
if( _eAction != SCR_EA_Anl_BeginSection )
{
// do whatever ...
return SCR_ERV_Anl_NormalReturn;
}
SCR_fn_v_Bin_BeginSection(_p_stFile);
SCR_fn_us_Bin_GetUSHORT( _p_stFile ); //VersionNumber
SCR_fn_v_Bin_EndSection(_p_stFile);
return ( eReturnValue );
}
*/
/*-----------------------------------------------------------------------------
* Description : call-back for general section of IPO script file
*-----------------------------------------------------------------------------*/
/*
SCR_tde_Anl_ReturnValue IPO_fn_eScriptCallBackBinGeneral(SCR_tdst_File_Description *_p_stFile,char *_p_szName,char *_ap_szParams[],SCR_tde_Anl_Action _eAction)
{
SCR_tde_Anl_ReturnValue eReturnValue = SCR_ERV_Anl_NormalReturn;
IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject;
SCR_tdst_Cxt_Values *p_stVal;
char sz_LongPathForLinkTable[256], szP0[MAX_PATH];
if( _eAction != SCR_EA_Anl_BeginSection )
{
// do whatever ...
return SCR_ERV_Anl_NormalReturn;
}
SCR_fn_v_Bin_BeginSection(_p_stFile);
_hInstanciatedPhysicalObject = IPO_fn_hAllocInstanciatedPhysicalObject();
SCR_M_RdL0_SetSectionLong(C_ThisContext,0,_hInstanciatedPhysicalObject);
SCR_M_RdL0_ComputeOpenSectionNameR(0,sz_LongPathForLinkTable);
SCR_M_v_Link_SetAdditionalLong(SCR_fnp_st_Link_SetValue(&IPO_g_stLinkTable,sz_LongPathForLinkTable,(unsigned long)_hInstanciatedPhysicalObject),1,strlen(sz_LongPathForLinkTable)-strlen(SCR_M_RdL0_GetCompleteSectionNameR(0)));
// PO
SCR_fn_sz_Bin_GetREFERENCE2Buffer( _p_stFile, szP0 );
_hInstanciatedPhysicalObject->_hPhysicalObject=CS_fn_xLoadBinPhysicalObject(szP0);
// RLI
SCR_fn_sz_Bin_GetREFERENCE2Buffer( _p_stFile, szP0 );
p_stVal = SCR_fnp_st_Bin_GetREFERENCE( szP0 );
_hInstanciatedPhysicalObject->_hRadiosity = (ACP_tdxHandleToRadiosity)SCR_M_ul_RdL0_ExtractLongValue(p_stVal,0);
SCR_fn_v_Bin_EndSection(_p_stFile);
return ( eReturnValue );
}
*/
/*
END OS 06.03.98
Callbacks for bin files.
*/

View File

@@ -0,0 +1,74 @@
#include "ldt.h"
/*****************************************************************
Name:
Description: Create callback for LDT
Author: Mircea Petrescu
Date: 7/2/98
Modified:
*****************************************************************/
int IPO_iCreateGeneral( LDT_tdst_Link *pLink )
{
IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject;
int iLen;
char sz_LongPathForLinkTable[256];
_hInstanciatedPhysicalObject = IPO_fn_hAllocInstanciatedPhysicalObject();
iLen=LDT_ComputeSectionName(pLink,sz_LongPathForLinkTable);
SCR_M_v_Link_SetAdditionalLong(SCR_fnp_st_Link_SetValue(&IPO_g_stLinkTable,sz_LongPathForLinkTable,(unsigned long)_hInstanciatedPhysicalObject),1,iLen);
pLink->pObject=(void *)_hInstanciatedPhysicalObject;
return 0;
}
HREF hrefIPO;
void IPO_PostProcessLDT(HREF hrefIPO)
{
int iType=1;
short shCount=1;
long *pVal;
LDT_tdst_Link *pObj, *pGetFrom;
while (!(LDT_GetRefFromTable(hrefIPO, &pObj, &pGetFrom, &iType, &shCount, &pVal )))
((IPO_tdxHandleToInstanciatedPhysicalObject)pObj->pObject)->_hRadiosity = (ACP_tdxHandleToRadiosity) pGetFrom->pObject;
}
/*****************************************************************
Name:
Description: Load callback for LDT
Author: Mircea Petrescu
Date: 7/2/98
Modified:
*****************************************************************/
int IPO_iLoadGeneral( LDT_tdst_Link *pLink )
{
LDT_tdeParseResult result=ParseResult_BeginSection;
IPO_tdxHandleToInstanciatedPhysicalObject _hInstanciatedPhysicalObject=( IPO_tdxHandleToInstanciatedPhysicalObject )pLink->pObject;
SCR_fn_v_RdL0_SetPriorityPath(fn_szGetLevelsDataPath());
while( result!=ParseResult_EndSection )
{
result=LDT_GetNextEntry();
switch( result )
{
case ParseResult_Entry: /* an entry */
{
char *szEntry=LDT_szGetEntryName();
if( *(short *)szEntry=='OP' ) /* PO */
_hInstanciatedPhysicalObject->_hPhysicalObject=CS_fn_xLoadPhysicalObject( LDT_szGetParam( 1 ) );
else if( *(long *)szEntry=='ILR' ) /* RLI */
{
LDT_LoadSection(LDT_szGetParam( 1 ));
LDT_AddToRefsTable( hrefIPO, pLink, 1, 0);
}
}
}
}
return 0;
}