Add rayman2 source files
This commit is contained in:
149
Rayman_X/cpa/tempgrp/TMP/ErmTmp.h
Normal file
149
Rayman_X/cpa/tempgrp/TMP/ErmTmp.h
Normal file
@@ -0,0 +1,149 @@
|
||||
#if !defined(__ErmTMP_h__)
|
||||
#define __ErmTMP_h__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000 */
|
||||
/******************************************/
|
||||
|
||||
#include "TMP_Ver.h"
|
||||
|
||||
/***************************************/
|
||||
/**** Error macros (using ACPerror) ****/
|
||||
/***************************************/
|
||||
#define M_TMPFatalError(ErrorNum) \
|
||||
{ \
|
||||
if (ErrorNum>E_uwTMPFatalErr&&ErrorNum<E_uwTMPStartOfWarning) \
|
||||
{ \
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(TMP,C_ucErmDefaultChannel,ErrorNum,C_lErmNoDebugData,C_ucErmOpenInfoWindow,C_ucAllowStopForDebug, NULL);\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
Erm_M_UpdateLastError(TMP,C_ucErmDefaultChannel,E_uwTMPFatalErrorNotAFatalError,C_lErmNoDebugData,C_ucErmOpenInfoWindow,C_ucAllowStopForDebug, NULL);\
|
||||
} \
|
||||
}
|
||||
|
||||
#define M_TMPInformationError(ErrorNum) \
|
||||
{ \
|
||||
if (ErrorNum>E_uwTMPStartOfInformationWarning&&ErrorNum<E_uwTMPErrNumber) \
|
||||
{ \
|
||||
Erm_M_UpdateLastError(TMP,C_ucErmDefaultChannel,ErrorNum,C_lErmNoDebugData,C_ucErmNoOpenInfoWindow,C_ucNeverStopForDebug, NULL);\
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
M_TMPFatalError(E_uwTMPInformationErrorIsNotAInformationError); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define M_TMPWarningError(ErrorNum) \
|
||||
{ \
|
||||
if (ErrorNum>E_uwTMPStartOfWarning&&ErrorNum<E_uwTMPStartOfInformationWarning) \
|
||||
{ \
|
||||
Erm_M_UpdateLastError(TMP,C_ucErmDefaultChannel,ErrorNum,C_lErmNoDebugData,C_ucErmOpenInfoWindow,C_ucAllowStopForDebug, NULL);\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
M_TMPFatalError(E_uwTMPWarningErrorIsNotAWarningError); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define __FATAL_ERR_INPUT__
|
||||
#define __INFORMATION_ERR_INPUT__ /**** Treat as a level 1 warning ****/
|
||||
#define __WARNING_ERR_INPUT__ /**** Treat as a level 2 warning ****/
|
||||
|
||||
enum e_uwTMPErrNumber
|
||||
{
|
||||
E_uwTMPFatalErr,
|
||||
#if defined(__FATAL_ERR_INPUT__)
|
||||
/**** Error's errors ****/
|
||||
E_uwTMPFatalErrorNotAFatalError,
|
||||
E_uwTMPInformationErrorIsNotAInformationError,
|
||||
E_uwTMPWarningErrorIsNotAWarningError,
|
||||
E_uwTMPBadMallocSize,
|
||||
#endif /*__FATAL_ERR_INPUT__*/
|
||||
|
||||
E_uwTMPStartOfWarning,
|
||||
|
||||
#if defined(__WARNING_ERR_INPUT__)
|
||||
E_uwTMPMallocFailed,
|
||||
E_uwTMPDebugDynamicAllocation,
|
||||
#endif /*__WARNING_ERR_INPUT__*/
|
||||
|
||||
E_uwTMPStartOfInformationWarning,
|
||||
|
||||
#if defined(__INFORMATION_ERR_INPUT__)
|
||||
E_uwTMPFreeNullPointer,
|
||||
#endif /*__INFORMATION_ERR_INPUT__*/
|
||||
|
||||
E_uwTMPErrNumber,
|
||||
};
|
||||
|
||||
/*------------------*/
|
||||
/* Global Variables*/
|
||||
/*------------------*/
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#undef LOCAL
|
||||
#if !defined(D_TMP_VariableDefine)
|
||||
#define EXTERN extern /*external declaration*/
|
||||
#define LOCAL /*replace by nothing : we have to declare*/
|
||||
#else /* D_TMP_VariableDefine */
|
||||
#define EXTERN /*replace by nothing : we have to declare*/
|
||||
#define LOCAL /*replace by nothing : we have to declare*/
|
||||
#endif /* D_TMP_VariableDefine */
|
||||
|
||||
EXTERN unsigned char g_ucTMPModuleId /* number of identification of the Game module*/
|
||||
#if defined(D_TMP_VariableDefine)
|
||||
= C_ucModuleNotInitialized
|
||||
#endif /* D_TMP_VariableDefine */
|
||||
;
|
||||
|
||||
#if defined(__ERROR_STRINGS__)
|
||||
|
||||
EXTERN CPA_EXPORT char * g_a_szTMPInformationModule []
|
||||
#if defined(D_TMP_VariableDefine) && !defined(CPA_WANTS_IMPORT)
|
||||
= {C_szTMPVersion, C_szTMPFullName, C_szTMPDate}
|
||||
#endif /* D_TMP_VariableDefine && CPA_WANTS_IMPORT */
|
||||
;
|
||||
|
||||
EXTERN char * g_szTMPModuleName /* Obliged syntax 'sz'+[Abbreviation of ModuleName]+'ModuleName'*/
|
||||
#if defined(D_TMP_VariableDefine)
|
||||
= {"TMP"}
|
||||
#endif /* D_TMP_VariableDefine */
|
||||
;
|
||||
|
||||
EXTERN tdstErrorMsg g_a_stTMPTabErr[] /* Obliged syntax 'a_sz'+[Abbreviation of ModuleName]+'TabErr'*/
|
||||
#if defined(D_TMP_VariableDefine)
|
||||
=
|
||||
{
|
||||
#if defined(__FATAL_ERR_INPUT__)
|
||||
/**** Error's errors ****/
|
||||
E_uwTMPFatalErrorNotAFatalError,"M_TMPFatalError : try to raise a warning or an information",
|
||||
E_uwTMPInformationErrorIsNotAInformationError,"M_TMPInformationError : try to raise a fatal or a warning",
|
||||
E_uwTMPWarningErrorIsNotAWarningError,"M_TMPWarningError : try to raise a fatal or a information",
|
||||
E_uwTMPBadMallocSize,"TMP_fnp_vRealMalloc : Bad malloc size (0)",
|
||||
#endif /*__FATAL_ERR_INPUT__*/
|
||||
|
||||
#ifdef __WARNING_ERR_INPUT__
|
||||
E_uwTMPMallocFailed,"TMP_fnp_vRealMalloc : Malloc failed",
|
||||
E_uwTMPDebugDynamicAllocation,"Debug verion : dynamic allocation in bloc TMP (don't forget to increase the bloc)",
|
||||
#endif /*__WARNING_ERR_INPUT__*/
|
||||
|
||||
#ifdef __INFORMATION_ERR_INPUT__
|
||||
E_uwTMPFreeNullPointer,"TMP_fn_vFree : Attempt to free a NULL pointer.",
|
||||
#endif /*__INFORMATION_ERR_INPUT__*/
|
||||
|
||||
0xffff,"\0"/*fin*/
|
||||
}
|
||||
#endif /* D_TMP_VariableDefine */
|
||||
;
|
||||
#endif /* __ERROR_STRINGS__ */
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
|
||||
#endif /* !__ErmTMP_h__ */
|
38
Rayman_X/cpa/tempgrp/TMP/MmgTmp.h
Normal file
38
Rayman_X/cpa/tempgrp/TMP/MmgTmp.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef __MmgTMP_h__
|
||||
#define __MmgTMP_h__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000 */
|
||||
/******************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#if !defined(D_TMP_VariableDefine)
|
||||
#define EXTERN extern
|
||||
#else
|
||||
#define EXTERN
|
||||
#endif /* D_TMP_VariableDefine */
|
||||
|
||||
enum e_ucGameStaticBlocks{
|
||||
E_ucTMPFixMemory,
|
||||
//XB 08/04/99
|
||||
E_ucTMPLevelMemory,
|
||||
//End XB 08/04/99
|
||||
E_ucTMPMaxBlocksNb /* maximum number of static block, You have to follow this syntax 'E_uc+ Abbreviation Module +MaxBlocksNb'*/
|
||||
};
|
||||
|
||||
#define C_ucTMPFirstBlockMemory E_ucTMPMemory
|
||||
|
||||
#ifndef _FIRE_DEADCODE_U64_
|
||||
EXTERN tdstBlockInfo g_a_stTMPBlocksInfo[E_ucTMPMaxBlocksNb];
|
||||
#endif /* _FIRE_DEADCODE_U64_ */
|
||||
|
||||
#ifdef __DYNAMIC_MALLOC_ALLOWED__
|
||||
#ifdef __DEBUG_MALLOC_MODE__
|
||||
EXTERN tdstDynInfo g_stTMPDynInfo;
|
||||
#endif /* __DEBUG_MALLOC_MODE__ */
|
||||
#endif /* __DYNAMIC_MALLOC_ALLOWED__ */
|
||||
|
||||
#endif /* __MmgTMP_h__ */
|
141
Rayman_X/cpa/tempgrp/TMP/TMP.DSP
Normal file
141
Rayman_X/cpa/tempgrp/TMP/TMP.DSP
Normal file
@@ -0,0 +1,141 @@
|
||||
# Microsoft Developer Studio Project File - Name="TMP" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=TMP - 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 "Tmp.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 "Tmp.mak" CFG="TMP - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "TMP - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TMP - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "TMP - Win32 Retail" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""$/cpa/tempgrp/TMP", PCFAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "TMP - 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 /W4 /WX /GX /O2 /I "x:\Cpa\Public" /I "x:\Cpa\Public\tmp" /I "x:\cpa\tempgrp\tmp" /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\TMPP5_vr.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TMP - 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 "Temp\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 /MD /W4 /WX /GX /Z7 /Od /I "x:\Cpa\Public" /I "x:\Cpa\Public\tmp" /I "x:\cpa\tempgrp\tmp" /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\TMPP5_vd.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "TMP - Win32 Retail"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "TMP___Wi"
|
||||
# PROP BASE Intermediate_Dir "TMP___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 /W4 /WX /GX /O2 /I "x:\Cpa\Public" /I "x:\Cpa\Public\tmp" /I "x:\cpa\tempgrp\tmp" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "VISUAL" /FD /c
|
||||
# SUBTRACT BASE CPP /Fr /YX
|
||||
# ADD CPP /nologo /G5 /W4 /WX /GX /O2 /I "x:\Cpa\Public" /I "x:\Cpa\Public\tmp" /I "x:\cpa\tempgrp\tmp" /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\TMPP5_vr.lib"
|
||||
# ADD LIB32 /nologo /out:"x:\cpa\lib\TMPP5_vf.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "TMP - Win32 Release"
|
||||
# Name "TMP - Win32 Debug"
|
||||
# Name "TMP - Win32 Retail"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ErmTmp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MmgTmp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Public\TMP.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Tmp.mak
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Public\Tmp\Tmp_Ext.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TMP_Ver.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TmpMain.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TmpMem.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\TmpMem.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
249
Rayman_X/cpa/tempgrp/TMP/TMP.vcproj
Normal file
249
Rayman_X/cpa/tempgrp/TMP/TMP.vcproj
Normal file
@@ -0,0 +1,249 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="TMP"
|
||||
ProjectGUID="{85CC1274-40EE-4154-B4E4-9D9B582016B5}"
|
||||
SccProjectName=""$/cpa/tempgrp/TMP", PCFAAAAA"
|
||||
SccAuxPath=""
|
||||
SccLocalPath="."
|
||||
SccProvider="MSSCCI:NXN alienbrain">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="x:\cpa\libd"
|
||||
IntermediateDirectory=".\Temp\Debug"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
OptimizeForProcessor="1"
|
||||
AdditionalIncludeDirectories="x:\Cpa\Public,x:\Cpa\Public\tmp,x:\cpa\tempgrp\tmp"
|
||||
PreprocessorDefinitions="_DEBUG;VISUAL;WIN32;USE_PROFILER;MTH_CHECK;CPA_WANTS_EXPORT"
|
||||
RuntimeLibrary="3"
|
||||
PrecompiledHeaderFile=".\Temp\Debug/TMP.pch"
|
||||
AssemblerListingLocation=".\Temp\Debug/"
|
||||
ObjectFile=".\Temp\Debug/"
|
||||
ProgramDataBaseFileName=".\Temp\Debug/"
|
||||
WarningLevel="4"
|
||||
WarnAsError="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="x:\cpa\libd\TMPP5_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>
|
||||
<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,x:\Cpa\Public\tmp,x:\cpa\tempgrp\tmp"
|
||||
PreprocessorDefinitions="NDEBUG;VISUAL;WIN32;USE_PROFILER"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\Tmp\Release/TMP.pch"
|
||||
AssemblerListingLocation=".\Tmp\Release/"
|
||||
ObjectFile=".\Tmp\Release/"
|
||||
ProgramDataBaseFileName=".\Tmp\Release/"
|
||||
WarningLevel="4"
|
||||
WarnAsError="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="x:\cpa\lib\TMPP5_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="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,x:\Cpa\Public\tmp,x:\cpa\tempgrp\tmp"
|
||||
PreprocessorDefinitions="NDEBUG;VISUAL;WIN32;RETAIL"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\tmp/retail/TMP.pch"
|
||||
AssemblerListingLocation=".\tmp/retail/"
|
||||
ObjectFile=".\tmp/retail/"
|
||||
ProgramDataBaseFileName=".\tmp/retail/"
|
||||
WarningLevel="4"
|
||||
WarnAsError="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="x:\cpa\lib\TMPP5_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>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="ErmTmp.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="MmgTmp.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Public\TMP.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Tmp.mak">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\Public\Tmp\Tmp_Ext.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="TMP_Ver.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="TmpMain.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Retail|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="TmpMem.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Retail|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="TmpMem.h">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
9
Rayman_X/cpa/tempgrp/TMP/TMP_Ver.h
Normal file
9
Rayman_X/cpa/tempgrp/TMP/TMP_Ver.h
Normal file
@@ -0,0 +1,9 @@
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000 */
|
||||
/******************************************/
|
||||
|
||||
#define C_szTMPVersion "TMP V5.0.0" /* The format is XXX Va.b.c with Xxx is the Tag of the module */
|
||||
#define C_szTMPFullName "Temporary memory" /* the complete and clear name of the module */
|
||||
#define C_szTMPDate "Sep 27 1997" /* The format is "Mmm dd yyyy".You can use __DATE__ but be careful that you have the control of the compilation*/
|
29
Rayman_X/cpa/tempgrp/TMP/TmpCPA.h
Normal file
29
Rayman_X/cpa/tempgrp/TMP/TmpCPA.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#if !defined(__TmpCPA_h__)
|
||||
#define __TmpCPA_h__
|
||||
|
||||
/******************************************/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000 */
|
||||
/******************************************/
|
||||
|
||||
/****************************************
|
||||
* Here is the list of disabled WARNING *
|
||||
****************************************/
|
||||
#if defined(VISUAL)
|
||||
#pragma warning(disable:4010) /** single-line comment contains line-continuation character **/
|
||||
#pragma warning(disable:4032) /** formal parameter 1 has different type when promoted **/
|
||||
#pragma warning(disable:4100) /** unreferenced formal parameter **/
|
||||
#pragma warning(disable:4115) /** named type definition in parentheses **/
|
||||
#pragma warning(disable:4127) /** conditional expression is constant **/
|
||||
#pragma warning(disable:4201) /** nonstandard extension used : nameless struct/union **/
|
||||
#pragma warning(disable:4214) /** nonstandard extension used : bit field types other than int **/
|
||||
#pragma warning(disable:4310) /** cast truncates constant value **/
|
||||
#pragma warning(disable:4514) /** unreferenced inline function has been removed **/
|
||||
#pragma warning(disable:4702) /** unreachable code **/
|
||||
#pragma warning(disable:4711) /** selected for automatic inline expansion **/
|
||||
#endif /* VISUAL */
|
||||
|
||||
#include "MMG.h"
|
||||
|
||||
#endif /* __TmpCPA_h__ */
|
17
Rayman_X/cpa/tempgrp/TMP/TmpMain.c
Normal file
17
Rayman_X/cpa/tempgrp/TMP/TmpMain.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#define D_TMP_VariableDefine
|
||||
|
||||
#include "TmpCpa.h"
|
||||
|
||||
#include "Tmp_Ext.h"
|
||||
#include "ErmTmp.h"
|
||||
#include "MmgTmp.h"
|
||||
|
||||
#include "TmpMem.h"
|
||||
|
||||
/**************************************************************************/
|
||||
void TMP_fn_vFirstInit(void)
|
||||
{
|
||||
Erm_M_InitErrMsg(TMP);
|
||||
Mmg_M_InitMmg(TMP);
|
||||
Mmg_fn_cCheckAlignmentValidity();
|
||||
}
|
228
Rayman_X/cpa/tempgrp/TMP/TmpMem.c
Normal file
228
Rayman_X/cpa/tempgrp/TMP/TmpMem.c
Normal file
@@ -0,0 +1,228 @@
|
||||
/*#define TMP_D_DebugMalloc*/
|
||||
|
||||
#include "acp_base.h"
|
||||
#include "TmpCpa.h"
|
||||
|
||||
|
||||
#include "Tmp_Ext.h"
|
||||
#include "ErmTmp.h"
|
||||
#include "MmgTmp.h"
|
||||
|
||||
#include "TmpMem.h"
|
||||
|
||||
#ifdef U64
|
||||
#include "GLD\Specif\DisplMsg.h"
|
||||
#endif
|
||||
|
||||
#define TMP_C_ActionMalloc 0
|
||||
#define TMP_C_ActionRealloc 1
|
||||
#define TMP_C_ActionFree 2
|
||||
|
||||
/**************************************************************************/
|
||||
void TMP_fn_vCreateFixMemory(unsigned long _ulSize)
|
||||
{
|
||||
Mmg_M_InitBlock(TMP,E_ucTMPFixMemory,_ulSize);
|
||||
TMP_g_ucMemoryBlock = E_ucTMPFixMemory;
|
||||
}
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef _FIRE_DEADCODE_U64_ /* Added by RUC */
|
||||
void TMP_fn_vFreeFixMemory(void)
|
||||
{
|
||||
Mmg_M_FreeBlock(TMP,E_ucTMPFixMemory);
|
||||
Mmg_M_DeleteBlock(TMP,E_ucTMPFixMemory);
|
||||
}
|
||||
#endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC */
|
||||
|
||||
//XB 08/04/99
|
||||
/**************************************************************************/
|
||||
void TMP_fn_vCreateLevelMemory(unsigned long _ulSize)
|
||||
{
|
||||
Mmg_M_InitBlock(TMP,E_ucTMPLevelMemory,_ulSize);
|
||||
TMP_g_ucMemoryBlock = E_ucTMPLevelMemory;
|
||||
}
|
||||
/**************************************************************************/
|
||||
void TMP_fn_vFreeLevelMemory(void)
|
||||
{
|
||||
Mmg_M_FreeBlock(TMP,E_ucTMPLevelMemory);
|
||||
Mmg_M_DeleteBlock(TMP,E_ucTMPLevelMemory);
|
||||
}
|
||||
//End XB 08/04/99
|
||||
/**************************************************************************/
|
||||
INLINE void *TMP_fnp_vRealMalloc(unsigned long ulSize)
|
||||
{
|
||||
void *p_vPointer = NULL;
|
||||
static unsigned char ucDynamicAlloc = FALSE;
|
||||
|
||||
/**** Check parameters ****/
|
||||
#ifndef FINAL_VERSION
|
||||
if (ulSize==0)
|
||||
{
|
||||
M_TMPFatalError(E_uwTMPBadMallocSize);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**** Choice the good mode and the good block ****/
|
||||
Mmg_M_SetModeAlloc4Ch(TMP,(unsigned char)TMP_g_ucMemoryBlock,C_ucMmgDefaultChannel);
|
||||
|
||||
/**** Allocate memory ****/
|
||||
#if defined(U64) && !defined(FINAL_VERSION)
|
||||
g_ucModuleIdForDebug=4;
|
||||
#endif
|
||||
if (ucDynamicAlloc||(p_vPointer = Mmg_fn_p_vAlloc4Ch(ulSize,C_ucMmgDefaultChannel))==NULL)
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
if (!ucDynamicAlloc)
|
||||
{
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);
|
||||
M_TMPWarningError(E_uwTMPDebugDynamicAllocation);
|
||||
Erm_M_ClearLastError(C_ucErmDefaultChannel);
|
||||
ucDynamicAlloc = TRUE;
|
||||
}
|
||||
Mmg_M_SetModeAlloc4Ch(TMP,E_ucDynamic,C_ucMmgDefaultChannel);
|
||||
if ((p_vPointer = Mmg_fn_p_vAlloc4Ch(ulSize,C_ucMmgDefaultChannel))==NULL)
|
||||
{
|
||||
M_TMPWarningError(E_uwTMPMallocFailed);
|
||||
}
|
||||
#else
|
||||
M_TMPWarningError(E_uwTMPMallocFailed);
|
||||
#ifdef U64
|
||||
M_PrintfStopErrorN64(("TMP malloc failed !"));
|
||||
return NULL;
|
||||
#endif /*U64*/
|
||||
#endif /* _DEBUG */
|
||||
}
|
||||
#if defined(U64) && !defined(FINAL_VERSION)
|
||||
g_ucModuleIdForDebug=0xff;
|
||||
#endif
|
||||
|
||||
/**** Fill all the memory with 0 ****/
|
||||
memset(p_vPointer,0,ulSize);
|
||||
|
||||
return (p_vPointer);
|
||||
}
|
||||
/**************************************************************************/
|
||||
#ifndef U64
|
||||
void *TMP_fnp_vMalloc(unsigned long ulSize,char *szFile,unsigned long ulLine)
|
||||
#else
|
||||
void *TMP_fnp_vMalloc(unsigned long ulSize)
|
||||
#endif
|
||||
{
|
||||
void *Var;
|
||||
|
||||
Var = TMP_fnp_vRealMalloc(ulSize);
|
||||
|
||||
#if defined(TMP_D_DebugMalloc)
|
||||
TMP_fn_vMemoryLogFile(Var,ulSize,TMP_C_ActionMalloc,szFile,ulLine);
|
||||
#endif /* TMP_D_DebugMalloc */
|
||||
|
||||
return(Var);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
#ifndef U64
|
||||
void TMP_fn_vFree(void **p_vPointer,char *szFile,unsigned long ulLine)
|
||||
#else
|
||||
void TMP_fn_vFree(void **p_vPointer)
|
||||
#endif
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
struct tdstBlockInfo_ stMyBlockInfo;
|
||||
#endif /* _DEBUG */
|
||||
|
||||
if (*p_vPointer==NULL)
|
||||
{
|
||||
M_TMPInformationError(E_uwTMPFreeNullPointer);
|
||||
}
|
||||
|
||||
Mmg_M_SetModeAlloc4Ch(TMP,(unsigned char)TMP_g_ucMemoryBlock,C_ucMmgDefaultChannel);
|
||||
|
||||
#if defined(_DEBUG)
|
||||
Mmg_fn_vGiveInformationBlock(Erm_M_ucGiveModuleId(TMP),(unsigned char)TMP_g_ucMemoryBlock,&stMyBlockInfo);
|
||||
if (*p_vPointer<(void*)stMyBlockInfo.p_cBeginBlock||*p_vPointer>(void*)stMyBlockInfo.p_cEndBlock)
|
||||
Mmg_M_SetModeAlloc4Ch(TMP,E_ucDynamic,C_ucMmgDefaultChannel);
|
||||
#endif /* _DEBUG */
|
||||
|
||||
#if defined(TMP_D_DebugMalloc)
|
||||
TMP_fn_vMemoryLogFile(*p_vPointer,0,TMP_C_ActionFree,szFile,ulLine);
|
||||
#endif /* TMP_D_DebugMalloc */
|
||||
|
||||
#if defined(_DEBUG)
|
||||
/* Mmg_fn_vTestMallocIntegrityAt(*p_vPointer);*/
|
||||
#endif /*_DEBUG*/
|
||||
|
||||
Mmg_fn_vFree4Ch(*p_vPointer,C_ucMmgDefaultChannel);
|
||||
*p_vPointer = NULL;
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
#if !defined(RETAIL) || defined(FINAL_VERSION_FOR_TESTERS)
|
||||
void TMP_PrintUsedStaticMemory(void)
|
||||
{
|
||||
Mmg_M_PrintUsedStaticMemoryInModule(TMP);
|
||||
}
|
||||
#endif /* !defined(RETAIL) || defined(FINAL_VERSION_FOR_TESTERS) */
|
||||
/*End XB*/
|
||||
/**************************************************************************/
|
||||
/*XB*/
|
||||
#ifdef CHECK_MEMORY
|
||||
void TMP_CheckMemory(void)
|
||||
{
|
||||
Mmg_M_CheckMemory(TMP);
|
||||
}
|
||||
#endif /* CHECK_MEMORY */
|
||||
/*End XB*/
|
||||
|
||||
/**************************************************************************/
|
||||
/* XB 02/06/99 */
|
||||
#ifndef FINAL_VERSION
|
||||
unsigned long TMP_fn_ulGetUsedStaticMemory(void)
|
||||
{
|
||||
return Mmg_M_GetUsedStaticMemory(TMP);
|
||||
}
|
||||
#endif /* FINAL_VERSION */
|
||||
/* End XB 02/06/99 */
|
||||
|
||||
#ifndef _FIRE_DEADCODE_U64_ /* Added by RUC */
|
||||
char *fn_p_szGetLevelName(void);
|
||||
void TMP_fn_vMemoryLogFile(void *p_vPointer,unsigned long ulSize,unsigned char ucAction,char *szFile,unsigned long ulLine)
|
||||
{
|
||||
#if defined(_DEBUG)&& defined(TMP_D_DebugMalloc)
|
||||
static unsigned long AI_s_ulNumberOfAllocation = 0;
|
||||
FILE *p_stFile;
|
||||
char szFileName[30];
|
||||
unsigned short uwBlocId;
|
||||
void *p_vBeginBloc;
|
||||
|
||||
|
||||
Mmg_fn_vWhereIs((void*)p_vPointer,&uwBlocId,&p_vBeginBloc);
|
||||
sprintf(szFileName,"Mem%04x.log",uwBlocId);
|
||||
|
||||
p_stFile = fopen(szFileName,"at");
|
||||
if (p_stFile!=NULL)
|
||||
{
|
||||
if (ucAction==TMP_C_ActionMalloc)
|
||||
{
|
||||
AI_s_ulNumberOfAllocation++;
|
||||
fprintf(p_stFile,"%s Malloc : Number=#%05d, Block=#%04x, Offset=%p Size=%06d (%20s,%10d)\n",fn_p_szGetLevelName(),AI_s_ulNumberOfAllocation,uwBlocId,(long)p_vPointer-(long)p_vBeginBloc,ulSize,szFile,ulLine);
|
||||
}
|
||||
else if (ucAction==TMP_C_ActionRealloc)
|
||||
{
|
||||
fprintf(p_stFile,"%s Realloc : Number=#%05d, Block=#%04x, Offset=%p (%20s,%10d)\n",fn_p_szGetLevelName(),AI_s_ulNumberOfAllocation,uwBlocId,(long)p_vPointer-(long)p_vBeginBloc,szFile,ulLine);
|
||||
}
|
||||
else if (ucAction==TMP_C_ActionFree)
|
||||
{
|
||||
AI_s_ulNumberOfAllocation--;
|
||||
fprintf(p_stFile,"%s Free : Number=#%05d, Block=#%04x, Offset=%p (%20s,%10d)\n",fn_p_szGetLevelName(),AI_s_ulNumberOfAllocation,uwBlocId,(long)p_vPointer-(long)p_vBeginBloc,szFile,ulLine);
|
||||
}
|
||||
fclose(p_stFile);
|
||||
}
|
||||
else
|
||||
AI_s_ulNumberOfAllocation = 0;
|
||||
|
||||
|
||||
#endif /* _DEBUG && TMP_D_DebugMalloc */
|
||||
}
|
||||
#endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC */
|
||||
|
||||
/**************************************************************************/
|
34
Rayman_X/cpa/tempgrp/TMP/TmpMem.h
Normal file
34
Rayman_X/cpa/tempgrp/TMP/TmpMem.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#if !defined(__TmpMem_h__)
|
||||
#define __TmpMem_h__
|
||||
|
||||
#include "CPA_Expt.h"
|
||||
|
||||
#undef EXTERN
|
||||
#undef extern
|
||||
#if !defined(D_TMP_VariableDefine)
|
||||
#define EXTERN extern
|
||||
#else
|
||||
#define EXTERN
|
||||
#endif /* D_TMP_VariableDefine */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/*extern CPA_EXPORT void *TMP_fnp_vRealMalloc(unsigned long ulSize);*/
|
||||
void TMP_fn_vMemoryLogFile(void *p_vPointer,unsigned long ulSize,unsigned char ucAction,char *szFile,unsigned long ulLine);
|
||||
|
||||
|
||||
EXTERN unsigned char TMP_g_ucMemoryBlock;
|
||||
|
||||
#ifndef _FIRE_DEADCODE_U64_
|
||||
EXTERN unsigned long TMP_g_ulNumberOfAllocations;
|
||||
#endif /* _FIRE_DEADCODE_U64_ */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __TmpMem_h__ */
|
5
Rayman_X/cpa/tempgrp/TMP/mssccprj.scc
Normal file
5
Rayman_X/cpa/tempgrp/TMP/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a source code control file
|
||||
|
||||
[TMP.vcproj]
|
||||
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
|
||||
SCC_Project_Name = Perforce Project
|
Reference in New Issue
Block a user