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,153 @@
# Microsoft Developer Studio Project File - Name="IPO" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=IPO - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Ipo.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Ipo.mak" CFG="IPO - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "IPO - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "IPO - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "IPO - Win32 Retail" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""$/cpa/tempgrp/IPO", XIDAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
!IF "$(CFG)" == "IPO - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "x:\cpa\lib"
# PROP Intermediate_Dir "Tmp\Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G5 /W3 /GX /O2 /I "x:\CPA\Public" /D "NDEBUG" /D "VISUAL" /D "WIN32" /D "USE_PROFILER" /FD /c
# SUBTRACT CPP /Fr /YX
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"x:\CPA\Lib\IPOP5_vr.lib"
!ELSEIF "$(CFG)" == "IPO - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "x:\CPA\Lib"
# PROP Intermediate_Dir "Tmp\Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G5 /W3 /GX /Z7 /Od /I "x:\CPA\Public" /D "_DEBUG" /D "VISUAL" /D "WIN32" /D "USE_PROFILER" /D "MTH_CHECK" /D "CPA_WANTS_EXPORT" /FD /c
# SUBTRACT CPP /Fr /YX
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"x:\CPA\Lib\IPOP5_vd.lib"
!ELSEIF "$(CFG)" == "IPO - Win32 Retail"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "IPO___Wi"
# PROP BASE Intermediate_Dir "IPO___Wi"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "x:/cpa/lib"
# PROP Intermediate_Dir "tmp/retail"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /MD /W3 /GX /O2 /I "x:\CPA\Public" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "CPA_WANTS_EXPORT" /FD /c
# SUBTRACT BASE CPP /Fr /YX
# ADD CPP /nologo /G5 /W3 /GX /O2 /I "x:\CPA\Public" /D "NDEBUG" /D "VISUAL" /D "WIN32" /D "RETAIL" /FD /c
# SUBTRACT CPP /Fr /YX
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"x:\CPA\Lib\IPOP5_vr.lib"
# ADD LIB32 /nologo /out:"x:\CPA\Lib\IPOP5_vf.lib"
!ENDIF
# Begin Target
# Name "IPO - Win32 Release"
# Name "IPO - Win32 Debug"
# Name "IPO - Win32 Retail"
# Begin Group "inc"
# PROP Default_Filter "*.h"
# Begin Source File
SOURCE=..\..\Public\incipo.h
# End Source File
# Begin Source File
SOURCE=..\..\public\IPO.h
# End Source File
# Begin Source File
SOURCE=..\..\Public\IPO\IPOFunct.h
# End Source File
# Begin Source File
SOURCE=..\..\Public\IPO\IPOHandl.h
# End Source File
# Begin Source File
SOURCE=..\..\Public\IPO\IPOLoad.h
# End Source File
# Begin Source File
SOURCE=..\..\Public\IPO\IPOMacro.h
# End Source File
# Begin Source File
SOURCE=..\..\Public\IPO\IPOProto.h
# End Source File
# Begin Source File
SOURCE=..\..\Public\IPO\IPOStruc.h
# End Source File
# End Group
# Begin Group "src"
# PROP Default_Filter "*.c"
# Begin Source File
SOURCE=.\Specif\IPO.c
# End Source File
# Begin Source File
SOURCE=.\Specif\IPOLoad.c
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,257 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="IPO"
ProjectGUID="{D5674720-417F-47A8-9E03-A7E5DC60FED3}"
SccProjectName="&quot;$/cpa/tempgrp/IPO&quot;, XIDAAAAA"
SccAuxPath=""
SccLocalPath="."
SccProvider="MSSCCI:NXN alienbrain">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Retail|Win32"
OutputDirectory="x:/cpa/lib"
IntermediateDirectory=".\tmp/retail"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="x:\CPA\Public"
PreprocessorDefinitions="NDEBUG;VISUAL;WIN32;RETAIL"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\tmp/retail/IPO.pch"
AssemblerListingLocation=".\tmp/retail/"
ObjectFile=".\tmp/retail/"
ProgramDataBaseFileName=".\tmp/retail/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="x:\CPA\Lib\IPOP5_vf.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="x:\cpa\lib"
IntermediateDirectory=".\Tmp\Release"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="x:\CPA\Public"
PreprocessorDefinitions="NDEBUG;VISUAL;WIN32;USE_PROFILER"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
PrecompiledHeaderFile=".\Tmp\Release/IPO.pch"
AssemblerListingLocation=".\Tmp\Release/"
ObjectFile=".\Tmp\Release/"
ProgramDataBaseFileName=".\Tmp\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="x:\CPA\Lib\IPOP5_vr.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="x:\CPA\Libd"
IntermediateDirectory=".\Tmp\Debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="x:\CPA\Public"
PreprocessorDefinitions="_DEBUG;VISUAL;WIN32;USE_PROFILER;MTH_CHECK;CPA_WANTS_EXPORT"
RuntimeLibrary="3"
PrecompiledHeaderFile=".\Tmp\Debug/IPO.pch"
AssemblerListingLocation=".\Tmp\Debug/"
ObjectFile=".\Tmp\Debug/"
ProgramDataBaseFileName=".\Tmp\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="x:\CPA\Libd\IPOP5_vd.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="inc"
Filter="*.h">
<File
RelativePath="..\..\Public\incipo.h">
</File>
<File
RelativePath="..\..\public\IPO.h">
</File>
<File
RelativePath="..\..\Public\IPO\IPOFunct.h">
</File>
<File
RelativePath="..\..\Public\IPO\IPOHandl.h">
</File>
<File
RelativePath="..\..\Public\IPO\IPOLoad.h">
</File>
<File
RelativePath="..\..\Public\IPO\IPOMacro.h">
</File>
<File
RelativePath="..\..\Public\IPO\IPOProto.h">
</File>
<File
RelativePath="..\..\Public\IPO\IPOStruc.h">
</File>
</Filter>
<Filter
Name="src"
Filter="*.c">
<File
RelativePath="Specif\IPO.c">
<FileConfiguration
Name="Retail|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="Specif\IPOLoad.c">
<FileConfiguration
Name="Retail|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

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;
}

View File

@@ -0,0 +1,5 @@
SCC = This is a source code control file
[IPO.vcproj]
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
SCC_Project_Name = Perforce Project