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,312 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#include "acp_base.h"
/*
#include "incGAM.h"
#include "SPO.h"
#include "GEO.h"
#include "MTH.h"
#include "GLI.h"
#include "incIPO.h"
*/
#define D_MSMagnet_StructureDefine
#include "MTH.h"
#include "MEC.h"
#include "GMT.h"
#include "GEO.h"
#include "GLI.h"
/*XB980506*/
/*#include "incGAM.h"*/
#include "fil.h"
#include "snd.h"
#include "pcs.h"
#include "gld.h"
#include "lst.h"
#ifdef USE_IPT_DX5
#include "IPT_DX5.h" /* InPuT (absolutely before GAM.h)*/
#else /* USE_IPT_WIN */
#include "IPT.h" /* InPuT (absolutely before GAM.h)*/
#endif /* USE_IPT_WIN */
/*#include "srf.h"*/
/*#include "env.h"*/
#include "sct.h"
#include "prt.h"
#include "gam.h"
/*#include "incSPO.h"*/
#include "pos.h"
#include "spo.h"
/*#include "incIPO.h"*/
#include "po.h"
/*XB980821*/
#ifndef D_THROW_IPO
#include "ipo.h"
#endif /* D_THROW_IPO */
/*End XB*/
/*XB980821*/
#ifndef D_THROW_IPO
#include "ISI.h"
#endif /* D_THROW_IPO */
/*End XB*/
#include "MGT\MGTStruc.h"
#include "MGTInit.h"
#include "MGTMain.h"
#include "MGTmm.h"
#include "MGTmo.h"
/*************************************************************************************************/
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vFirstInitMagnet( void )
{
ACP_tdxIndex xIndex;
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MAGNETS ; xIndex++ )
MGT_g_aDEF_hActivatedMagnets[ xIndex ] = NULL;
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MODIFIEDOBJECTS ; xIndex++ )
MGT_g_aDEF_hModifiedObjects[ xIndex ] = NULL;
MGT_g_xMaxIndexOfActivatedMagnet = 0;
MGT_g_xMaxIndexOfModifiedObject = 0;
}
/*======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vLastDesInitMagnet( void )
{
ACP_tdxIndex xIndex , xIndexModif;
MGT_tdxHandleToModifiedObject *p_h_ModifiedObject;
for( xIndex = 0 , p_h_ModifiedObject = MGT_g_aDEF_hModifiedObjects ;
xIndex < MGT_g_xMaxIndexOfModifiedObject;
xIndex++, p_h_ModifiedObject++ )
{
if( *p_h_ModifiedObject )
{
for( xIndexModif = 0 ; xIndexModif < MGT_MAX_NUMBEROF_MAGNETS ; xIndexModif++ )
{
if( (*p_h_ModifiedObject) -> aDEF_hMagnet[ xIndexModif ] != NULL )
{
MGT_fn_vDeleteMagnetModification( (*p_h_ModifiedObject) -> aDEF_hMagnet[ xIndexModif ] );
}
}
MGT_fn_vDeleteModifiedObject( xIndex );
}
}
MGT_g_xMaxIndexOfModifiedObject = 0;
MGT_fn_vUpdateActivatedMagnetsList();
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vAddObjectToMagnetList(HIE_tdxHandleToSuperObject p_stObject)
{
ACP_tdxIndex xIndex , xFreeIndex;
MS_tdxHandleToMSMagnet hMagnet;
xFreeIndex = MGT_g_xMaxIndexOfActivatedMagnet;
for( xIndex = 0 ; xIndex < MGT_g_xMaxIndexOfActivatedMagnet ; xIndex++ )
{
if( MGT_g_aDEF_hActivatedMagnets[ xIndex ] == p_stObject )
{
xFreeIndex = xIndex;
break;
}
else if( ( xFreeIndex == MGT_g_xMaxIndexOfActivatedMagnet ) && (MGT_g_aDEF_hActivatedMagnets[ xIndex ] == NULL) )
{
xFreeIndex = xIndex;
}
}
if( xFreeIndex != MGT_MAX_NUMBEROF_MAGNETS )
{
MGT_g_aDEF_hActivatedMagnets[ xFreeIndex ] = p_stObject;
if( xFreeIndex == MGT_g_xMaxIndexOfActivatedMagnet )
MGT_g_xMaxIndexOfActivatedMagnet++;
hMagnet = M_GetMSHandle(p_stObject, MSMagnet);
if( hMagnet )
{
fn_vMSMagnetSetStatus( hMagnet, MAGNETGROWING);
POS_fn_vGetTranslationVector( HIE_fn_hGetSuperObjectGlobalMatrix(p_stObject), fn_hMSMagnetGetPosition( hMagnet ) );
MGT_fn_vComputeInfluence( p_stObject , hMagnet, xFreeIndex );
}
}
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteObjectFromMagnetList(HIE_tdxHandleToSuperObject p_stObject)
{
ACP_tdxIndex xIndex;
MS_tdxHandleToMSMagnet hMagnet;
for( xIndex = 0 ; xIndex < MGT_g_xMaxIndexOfActivatedMagnet ; xIndex++ )
{
if( MGT_g_aDEF_hActivatedMagnets[ xIndex ] == p_stObject )
{
MGT_g_aDEF_hActivatedMagnets[ xIndex ] = NULL;
if( xIndex = (MGT_g_xMaxIndexOfActivatedMagnet-1) )
MGT_g_xMaxIndexOfActivatedMagnet--;
hMagnet = M_GetMSHandle(p_stObject, MSMagnet);
fn_vMSMagnetSetStatus( hMagnet, MAGNETOFF);
break;
}
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteMagnetFromMagnetList( ACP_tdxIndex x_Magnet )
{
MGT_g_aDEF_hActivatedMagnets[ x_Magnet ] = NULL;
if( x_Magnet == (MGT_g_xMaxIndexOfActivatedMagnet-1) )
MGT_g_xMaxIndexOfActivatedMagnet--;
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteMagnet( ACP_tdxIndex x_Magnet )
{
/*
ACP_tdxIndex xIndex;
MGT_tdxHandleToMagnetModification hModif;
for ( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MAGNETS ; xIndex++ )
{
hModif = fn_hMSMagnetGetMagnetModification( hMagnet, xIndex );
if( hModif )
{
MGT_fn_vDeleteMagnetModification( hModif );
}
}
*/
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteMSMagnetIfNeeded( ACP_tdxIndex x_Magnet )
{
ACP_tdxIndex xIndex;
MS_tdxHandleToMSMagnet h_Magnet;
h_Magnet = M_GetMSHandle( MGT_g_aDEF_hActivatedMagnets[ x_Magnet ], MSMagnet);
if( h_Magnet )
{
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MODIFIEDOBJECTS ; xIndex++ )
{
if( fn_hMSMagnetGetMagnetModification( h_Magnet, xIndex ) )
{
break;
}
}
if( (xIndex == MGT_MAX_NUMBEROF_MODIFIEDOBJECTS) && (fn_lMSMagnetGetStatus( h_Magnet ) == MAGNETRECOVERING) )
{
fn_vMSMagnetSetStatus( h_Magnet, MAGNETOFF);
/* delete the magnet from the active magnet list.*/
MGT_fn_vDeleteMagnetFromMagnetList( x_Magnet );
}
}
else
{
/* delete the magnet from the active magnet list.*/
MGT_fn_vDeleteMagnetFromMagnetList( x_Magnet );
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vUpdateModifiedObjectsList( void )
{
ACP_tdxIndex xIndex;
MGT_tdxHandleToModifiedObject *p_h_ModifiedObject;
for( xIndex = 0 , p_h_ModifiedObject = MGT_g_aDEF_hModifiedObjects ;
xIndex < MGT_g_xMaxIndexOfModifiedObject ;
xIndex++, p_h_ModifiedObject++ )
{
if( *p_h_ModifiedObject )
{
MGT_fn_vDeleteModifiedObjectIfNeeded( xIndex );
}
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vUpdateActivatedMagnetsList( void )
{
ACP_tdxIndex xIndex;
MS_tdxHandleToMSMagnet h_Magnet;
HIE_tdxHandleToSuperObject *p_hSO;
for ( xIndex = 0 , p_hSO = MGT_g_aDEF_hActivatedMagnets ;
xIndex < MGT_g_xMaxIndexOfActivatedMagnet ;
xIndex++, p_hSO++ )
{
if( *p_hSO )
{
h_Magnet = M_GetMSHandle( (*p_hSO) , MSMagnet);
MGT_fn_vDeleteMSMagnetIfNeeded( xIndex );
if( h_Magnet )
{
fn_vMSMagnetSetStrengthModification( h_Magnet, FALSE );
fn_vMSMagnetSetNearFarModification ( h_Magnet, FALSE );
}
}
}
}

View File

@@ -0,0 +1,44 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#if !defined( _MGTINIT_H_ )
#define _MGTINIT_H_
/*************************************************************************************************/
#include "cpa_expt.h"
#include "MGT\MGTStruc.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*************************************************************************************************/
extern CPA_EXPORT void MGT_fn_vAddObjectToMagnetList ( HIE_tdxHandleToSuperObject p_stObject );
extern CPA_EXPORT void MGT_fn_vDeleteObjectFromMagnetList ( HIE_tdxHandleToSuperObject p_stObject );
extern CPA_EXPORT void MGT_fn_vFirstInitMagnet ( void );
extern CPA_EXPORT void MGT_fn_vLastDesInitMagnet ( void );
/*************************************************************************************************/
void MGT_fn_vDeleteMagnetFromMagnetList ( ACP_tdxIndex x_Magnet );
void MGT_fn_vDeleteMagnet ( ACP_tdxIndex x_Magnet );
void MGT_fn_vDeleteMSMagnetIfNeeded ( ACP_tdxIndex x_Magnet );
void MGT_fn_vUpdateModifiedObjectsList ( void );
void MGT_fn_vUpdateActivatedMagnetsList ( void );
/*************************************************************************************************/
#ifdef __cplusplus
};
#endif /* __cplusplus */
/*************************************************************************************************/
#endif /* _MGTINIT_H_ */

View File

@@ -0,0 +1,975 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#include "acp_base.h"
#define D_MSMagnet_StructureDefine
#include "MTH.h"
#include "GEO.h"
#include "GLI.h"
/*XB980506*/
/*#include "incGAM.h"*/
#include "mec.h"
#include "fil.h"
#include "snd.h"
#include "pcs.h"
#include "gld.h"
#include "lst.h"
#ifdef USE_IPT_DX5
#include "IPT_DX5.h" /* InPuT (absolutely before GAM.h)*/
#else /* USE_IPT_WIN */
#include "IPT.h" /* InPuT (absolutely before GAM.h)*/
#endif /* USE_IPT_WIN */
/*#include "srf.h"*/
/*#include "env.h"*/
#include "sct.h"
#include "prt.h"
#include "gam.h"
/*#include "incSPO.h"*/
#include "pos.h"
#include "spo.h"
/*#include "incIPO.h"*/
#include "po.h"
/*XB980821*/
#ifndef D_THROW_IPO
#include "ipo.h"
#endif /* D_THROW_IPO */
/*End XB*/
/*End XB*/
#include "COL.h"
#include "MGT\MGTStruc.h"
#include "MGTInit.h"
#include "MGTMain.h"
#include "MGTmm.h"
#include "MGTmo.h"
#ifdef MGT_RASTER
#include "MGTRast.h"
#endif
#define MGT_C_NoMoveDistanceSqr MTH_M_xFloatToReal( 0.04 )
EXTERN HIE_tdxHandleToSuperObject SECT_hFatherSector;
/*************************************************************************************************/
#define MGT_M_bIsSetBit( p_cTab , xIndex ) ( p_cTab[ xIndex >> 3 ] & ( 1 << (xIndex & 0x00000007) ) )
#define MGT_M_vSetBit( p_cTab , xIndex ) ( p_cTab[ xIndex >> 3 ] |= ( 1 << (xIndex & 0x00000007) ) )
#define MGT_M_vUnSetBit( p_cTab , xIndex ) ( p_cTab[ xIndex >> 3 ] &= ~((char)( 1 << (xIndex & 0x00000007) )) )
/*
INLINE
ACP_tdxBool MGT_M_bIsSetBit( char *p_cTab , ACP_tdxIndex xIndex )
{
ACP_tdxIndex xDiv , xMod;
xDiv = xIndex >> 3;
xMod = ( xIndex & 0x00000007 );
return ( p_cTab[ xDiv ] & ( 1 << xMod ) );
}
INLINE
void MGT_M_vSetBit( char *p_cTab , ACP_tdxIndex xIndex )
{
ACP_tdxIndex xDiv , xMod;
xDiv = xIndex >> 3;
xMod = ( xIndex & 0x00000007 );
p_cTab[ xDiv ] |= ( 1 << xMod );
}
INLINE
void MGT_M_vUnSetBit( char *p_cTab , ACP_tdxIndex xIndex )
{
ACP_tdxIndex xDiv , xMod;
char cValue;
xDiv = xIndex >> 3;
xMod = ( xIndex & 0x00000007 );
cValue = ~((char)( 1 << xMod ));
p_cTab[ xDiv ] &= cValue;
}
*/
/*
===================================================================================================
* The main loop in Game Engine to deal with magnet morph.
*
* QZY 1997.11.18
===================================================================================================
*/
void MGT_fn_vTreatMagnets(void)
{
ACP_tdxIndex xMagnetIndex , xObjectIndex;
HIE_tdxHandleToSuperObject *p_h_SOMagnet;
MS_tdxHandleToMSMagnet h_Magnet;
MTH3D_tdstVector *p_stPreviousPosition , stCurrentPosition , stMove;
MTH_tdxReal xDistance;
MGT_tdxHandleToModifiedObject *p_h_ModifiedObject;
MGT_tdxHandleToMagnetModification *p_h_MagnetModif;
ACP_tdxBool bObjectChanged ;
unsigned char ucStatus;
/* update list of influenced points*/
if( MGT_g_xMaxIndexOfModifiedObject )
{
MGT_fn_vInitTreatement();
}
for ( xMagnetIndex = 0 , p_h_SOMagnet = MGT_g_aDEF_hActivatedMagnets ;
xMagnetIndex < MGT_g_xMaxIndexOfActivatedMagnet ; xMagnetIndex++, p_h_SOMagnet++ )
{
h_Magnet = (*p_h_SOMagnet) ? M_GetMSHandle( (*p_h_SOMagnet), MSMagnet) : NULL ;
if( h_Magnet )
{
ucStatus = fn_lMSMagnetGetStatus( h_Magnet );
if( fn_bMSMagnetIsNearFarModified( h_Magnet ) )
{
POS_fn_vGetTranslationVector( HIE_fn_hGetSuperObjectGlobalMatrix( (*p_h_SOMagnet) ), & stCurrentPosition );
p_stPreviousPosition = fn_hMSMagnetGetPosition( h_Magnet );
MTH3D_M_vSubVector( & stMove , & stCurrentPosition , p_stPreviousPosition );
fn_vMSMagnetSetPosition( h_Magnet, & stCurrentPosition );
MGT_fn_vComputeInfluence( (*p_h_SOMagnet), h_Magnet, xMagnetIndex );
}
else
{
/* compute movement distance*/
switch( fn_lMSMagnetGetStatus( h_Magnet ) )
{
case MAGNETOFF:
case MAGNETRECOVERING:
fn_vMSMagnetSetPositionModification( h_Magnet, FALSE );
MGT_fn_vUpdateInfluence( h_Magnet , FALSE );
MGT_fn_vSetMagnetModificationUse( h_Magnet , TRUE );
break;
case MAGNETON:
case MAGNETGROWING:
POS_fn_vGetTranslationVector( HIE_fn_hGetSuperObjectGlobalMatrix( (*p_h_SOMagnet) ), & stCurrentPosition );
p_stPreviousPosition = fn_hMSMagnetGetPosition( h_Magnet );
MTH3D_M_vSubVector( & stMove , & stCurrentPosition , p_stPreviousPosition );
xDistance = MTH3D_M_xSqrVector( & stMove );
if( MTH_M_bGreater( xDistance , MGT_C_NoMoveDistanceSqr ) )
{
fn_vMSMagnetSetPosition( h_Magnet, & stCurrentPosition );
fn_vMSMagnetSetPositionModification( h_Magnet, TRUE );
MGT_fn_vComputeInfluence( (*p_h_SOMagnet), h_Magnet, xMagnetIndex );
}
else
{
fn_vMSMagnetSetPositionModification( h_Magnet, FALSE );
MGT_fn_vSetMagnetModificationUse( h_Magnet , TRUE );
}
break;
}
}
}
}
if( MGT_g_xMaxIndexOfModifiedObject )
{
MGT_fn_vEndTreatement();
}
/* compute influence*/
for( xObjectIndex = 0 , p_h_ModifiedObject = MGT_g_aDEF_hModifiedObjects ;
xObjectIndex < MGT_g_xMaxIndexOfModifiedObject ;
xObjectIndex++, p_h_ModifiedObject++ )
{
if( *p_h_ModifiedObject )
{
bObjectChanged = FALSE;
for( xMagnetIndex = 0 , p_h_MagnetModif = (*p_h_ModifiedObject) -> aDEF_hMagnet ;
xMagnetIndex < MGT_MAX_NUMBEROF_MAGNETS ;
xMagnetIndex++, p_h_MagnetModif++ )
{
if( *p_h_MagnetModif )
{
if( MGT_fn_bMorphMagnetModif( *p_h_MagnetModif ) )
bObjectChanged = TRUE;
}
}
if( bObjectChanged )
{
GEO_vEndModifyObject2( (*p_h_ModifiedObject) -> p_stMorphedObject );
}
}
}
if( MGT_g_xMaxIndexOfModifiedObject )
{
/* recompute bounding volume*/
MGT_fn_bUpdateBoundingVolume();
/* update ModifiedObjects List*/
MGT_fn_vUpdateModifiedObjectsList();
}
/**/
if( MGT_g_xMaxIndexOfActivatedMagnet )
{
/* update MSMagnet List*/
MGT_fn_vUpdateActivatedMagnetsList();
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vInitTreatement( void )
{
ACP_tdxIndex xIndex , xIndexMagnet;
MGT_tdxHandleToModifiedObject *p_h_ModifiedObject;
MGT_tdxHandleToMagnetModification *p_h_MagnetModif;
for( xIndex = 0 , p_h_ModifiedObject = MGT_g_aDEF_hModifiedObjects ;
xIndex < MGT_g_xMaxIndexOfModifiedObject ;
xIndex++, p_h_ModifiedObject++ )
{
if( *p_h_ModifiedObject )
{
MGT_fn_vClearAlreadyInfluencedPointsOfModifiedObject( *p_h_ModifiedObject );
for ( xIndexMagnet = 0 , p_h_MagnetModif = (*p_h_ModifiedObject) -> aDEF_hMagnet ;
xIndexMagnet < MGT_MAX_NUMBEROF_MAGNETS ; xIndexMagnet++, p_h_MagnetModif++ )
{
if( (*p_h_MagnetModif) )
(*p_h_MagnetModif) -> bUsed = FALSE;
}
}
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vEndTreatement( void )
{
ACP_tdxIndex xIndex , xIndexMagnet;
MGT_tdxHandleToModifiedObject *p_h_ModifiedObject;
MGT_tdxHandleToMagnetModification *p_h_MagnetModif;
for( xIndex = 0 , p_h_ModifiedObject = MGT_g_aDEF_hModifiedObjects ;
xIndex < MGT_g_xMaxIndexOfModifiedObject ;
xIndex++, p_h_ModifiedObject++ )
{
if( *p_h_ModifiedObject )
{
MGT_fn_vClearAlreadyInfluencedPointsOfModifiedObject( *p_h_ModifiedObject );
for ( xIndexMagnet = 0 , p_h_MagnetModif = (*p_h_ModifiedObject) -> aDEF_hMagnet ;
xIndexMagnet < MGT_MAX_NUMBEROF_MAGNETS ; xIndexMagnet++, p_h_MagnetModif++ )
{
if( (*p_h_MagnetModif) )
{
if( (*p_h_MagnetModif) -> bUsed )
break;
else
MGT_fn_vDeleteMagnetModification( *p_h_MagnetModif );
}
}
if( xIndexMagnet == MGT_MAX_NUMBEROF_MAGNETS )
MGT_fn_vDeleteModifiedObjectIfNeeded( xIndex );
}
}
}
/*=======================================================================================
* Description compute the influence of magnet in all static objects
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vComputeInfluence( HIE_tdxHandleToSuperObject h_SO , MS_tdxHandleToMSMagnet h_Magnet , ACP_tdxIndex x_Magnet )
{
/* init influence*/
ACP_tdxIndex xIndex;
MTH_tdxReal xFar, xFarFar;
MS_tdxHandleToSectInfo hSectInfo;
HIE_tdxHandleToSuperObject h_SOSector;
SECT_tdxHandleOfElementLstCollisionInteraction hCollisionList;
MGT_fn_vUpdateInfluence( h_Magnet , TRUE );
MGT_fn_vSetMagnetModificationUse( h_Magnet , FALSE );
xFar = fn_xMSMagnetGetFar( h_Magnet );
xFarFar = MTH_M_xSqr( xFar );
MGT_fn_vClearMagnetModificationFlagInHierarchy( SECT_hFatherSector );
hSectInfo = M_GetMSHandle( h_SO , SectInfo );
h_SOSector = fn_h_SectInfoGetCurrentSector( hSectInfo );
/* call recurse influence on Current sector*/
MGT_fn_bComputeInfluenceOnSuperObject( h_Magnet, x_Magnet, xFarFar, h_SOSector );
/* call recurse influence on collisionable sectors*/
SECT_M_ForEachCollisionNodeInCollisionInteractionList( h_SOSector, hCollisionList, xIndex )
{
h_SOSector = SECT_GetSectorInCollisionList( hCollisionList );
MGT_fn_bComputeInfluenceOnSuperObject( h_Magnet, x_Magnet, xFarFar, h_SOSector );
}
/* update MSMagnet*/
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MODIFIEDOBJECTS ; xIndex++ )
{
if( fn_hMSMagnetGetMagnetModification( h_Magnet, xIndex ) )
{
break;
}
}
if( ( xIndex == MGT_MAX_NUMBEROF_MODIFIEDOBJECTS ) && (fn_lMSMagnetGetStatus( h_Magnet ) == MAGNETRECOVERING) )
{
fn_vMSMagnetSetStatus( h_Magnet, MAGNETOFF);
/* delete the magnet from the active magnet list.*/
MGT_fn_vDeleteMagnetFromMagnetList( x_Magnet );
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
ACP_tdxIndex MGT_fn_bComputeInfluenceOnSuperObject( MS_tdxHandleToMSMagnet h_Magnet , ACP_tdxIndex x_Magnet , MTH_tdxReal xFarFar, HIE_tdxHandleToSuperObject h_SuperObject )
{
GEO_tdstGeometricObject *p_stObject;
HIE_tdxHandleToSuperObject h_Child;
ACP_tdxIndex xIndex;
POS_tdxHandleToPosition hMatrix;
POS_tdstCompletePosition stMatrix;
MTH3D_tdstVector stMagnetLocalPosition, *p_stPosition;
MTH_tdxReal xRadius;
ACP_tdxIndex x_ModifiedObject;
ACP_tdxBool bObjectModified , bIntersectBdV, bBoxVolume;
GEO_tdxHandleToParallelBox hBoxVolume;
GEO_tdxHandleToBoundingSphere hSphereVolume;
MTH3D_tdstVector stMaxBoxPoint , stMinBoxPoint , stCenter;
/* compute influence on the SO*/
bIntersectBdV = TRUE;
bObjectModified = FALSE;
p_stObject = HIE_fn_p_stGetGeometricObjectFromSuperObject( h_SuperObject );
if( p_stObject )
{
bBoxVolume = HIE_fn_SO_bHasABoxBoundingVolume( h_SuperObject );
x_ModifiedObject = MGT_fn_xFindModifiedObject( p_stObject );
bObjectModified = FALSE;
hMatrix = HIE_fn_hGetSuperObjectGlobalMatrix( h_SuperObject );
p_stPosition = fn_hMSMagnetGetPosition( h_Magnet );
/**/
/* take account Bounding Box of SO*/
if( bBoxVolume )
{
hBoxVolume = (GEO_tdxHandleToParallelBox)HIE_fn_hGetSuperObjectBoundingVolume( h_SuperObject );
if( hBoxVolume )
{
MTH3D_M_vAddVector( & stMaxBoxPoint, & hMatrix -> stTranslationVector, GEO_fn_pGetMaxPointOfParallelBox( hBoxVolume ) );
MTH3D_M_vAddVector( & stMinBoxPoint, & hMatrix -> stTranslationVector, GEO_fn_pGetMinPointOfParallelBox( hBoxVolume ) );
bIntersectBdV = INT_fn_bIntersectSphereWithBox( p_stPosition, fn_xMSMagnetGetFar( h_Magnet ), & stMinBoxPoint, & stMaxBoxPoint );
}
if( bIntersectBdV )
{
POS_fn_vInvertMatrix( & stMatrix , hMatrix );
POS_fn_vMulMatrixVertex( & stMagnetLocalPosition , & stMatrix , p_stPosition );
}
}
else
{
hSphereVolume = (GEO_tdxHandleToBoundingSphere)HIE_fn_hGetSuperObjectBoundingVolume( h_SuperObject );
POS_fn_vInvertMatrix( & stMatrix , hMatrix );
POS_fn_vMulMatrixVertex( & stMagnetLocalPosition , & stMatrix , p_stPosition );
if( hSphereVolume )
{
MTH3D_M_vCopyVector(&stCenter, GEO_fn_pGetCenterPointOfBoundingSphere(hSphereVolume));
xRadius = GEO_fn_xGetRadiusOfBoundingSphere(hSphereVolume);
bIntersectBdV = INT_fn_bIntersectSphereWithSphere( & stMagnetLocalPosition, fn_xMSMagnetGetFar( h_Magnet ), & stCenter , xRadius );
}
}
if( bIntersectBdV )
{
bObjectModified = MGT_fn_bComputeInfluenceOnObject( x_Magnet, xFarFar, p_stObject , &x_ModifiedObject, & stMagnetLocalPosition , h_SuperObject );
if( bObjectModified )
{
HIE_fn_vSetMagnetModification( h_SuperObject, TRUE );
}
}
if( (x_ModifiedObject != MGT_C_xIndexError) && ! bObjectModified && ( fn_lMSMagnetGetStatus( h_Magnet ) == MAGNETRECOVERING ) )
{
MGT_fn_hDeleteIfExistsMagnetModification( x_ModifiedObject, x_Magnet );
}
}
if( bIntersectBdV )
{
/* node examination*/
HIE_M_ForEachChildOf(h_SuperObject, h_Child, xIndex)
{
/* recurence*/
bObjectModified |= MGT_fn_bComputeInfluenceOnSuperObject( h_Magnet , x_Magnet , xFarFar, h_Child );
}
}
HIE_fn_vSetMagnetModification( h_SuperObject, bObjectModified );
return bObjectModified;
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vClearMagnetModificationFlagInHierarchy( HIE_tdxHandleToSuperObject h_SuperObject )
{
HIE_tdxHandleToSuperObject h_Child;
ACP_tdxIndex xIndex;
HIE_fn_vSetMagnetModification( h_SuperObject, FALSE );
HIE_M_ForEachChildOf(h_SuperObject, h_Child, xIndex)
{
/* recurence*/
MGT_fn_vClearMagnetModificationFlagInHierarchy( h_Child);
}
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_bUpdateBoundingVolume( void )
{
HIE_tdxHandleToSuperObject h_Child;
ACP_tdxIndex xIndex;
HIE_M_ForEachChildOf(SECT_hFatherSector, h_Child, xIndex)
{
if( HIE_fn_bGetMagnetModification( h_Child ) )
MGT_fn_vRecurUpdateBoundingVolumeInHierarchy( h_Child );
}
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vRecurUpdateBoundingVolumeInHierarchy( HIE_tdxHandleToSuperObject h_SuperObject )
{
HIE_tdxHandleToSuperObject h_Child;
ACP_tdxIndex xIndex;
GEO_tdstGeometricObject * hGeometricObject;
GEO_tdxHandleToParallelBox hBdVBoxFather;
GEO_tdxHandleToBoundingSphere hBdVSphereFather;
MTH3D_tdstVector * p_stGlobalMaxBoxPointFather, *p_stGlobalMinBoxPointFather , stSphereCenterFather;
ACP_tdxBool bBdVIsABox;
MTH_tdxReal xRadiusFather;
GEO_tdxHandleToMatrix hGlobalMatrix;
if( ! HIE_fn_bGetMagnetModification( h_SuperObject ) )
return;
/* current*/
/**/
hGeometricObject = HIE_fn_p_stGetGeometricObjectFromSuperObject( h_SuperObject );
hGlobalMatrix = HIE_fn_hGetSuperObjectGlobalMatrix( h_SuperObject );
bBdVIsABox = HIE_fn_SO_bHasABoxBoundingVolume( h_SuperObject );
/* add local bounding volume*/
/* compute local bounding volume*/
if( bBdVIsABox )
{
hBdVBoxFather = (GEO_tdxHandleToParallelBox)HIE_fn_hGetSuperObjectBoundingVolume( h_SuperObject );
hBdVSphereFather = NULL;
if( hBdVBoxFather )
{
p_stGlobalMaxBoxPointFather = GEO_fn_pGetMaxPointOfParallelBox( hBdVBoxFather );
p_stGlobalMinBoxPointFather = GEO_fn_pGetMinPointOfParallelBox( hBdVBoxFather );
if( hGeometricObject )
{
MTH3D_tdstVector stLocalMaxBoxPoint, stLocalMinBoxPoint;
MTH3D_M_vCopyVector(&stLocalMaxBoxPoint, hGeometricObject->d_stListOfPoints);
MTH3D_M_vCopyVector(&stLocalMinBoxPoint, hGeometricObject->d_stListOfPoints);
MTH3D_M_vMulMatrixVector( p_stGlobalMaxBoxPointFather, &hGlobalMatrix->stTransformMatrix, &stLocalMaxBoxPoint);
MTH3D_M_vMulMatrixVector( p_stGlobalMinBoxPointFather, &hGlobalMatrix->stTransformMatrix, &stLocalMinBoxPoint);
GEO_fn_vAddObjectToBox(hGeometricObject, hGlobalMatrix, p_stGlobalMaxBoxPointFather, p_stGlobalMinBoxPointFather);
}
else
{
/* init bdv*/
MTH3D_M_vNullVector( p_stGlobalMaxBoxPointFather );
MTH3D_M_vNullVector( p_stGlobalMinBoxPointFather );
}
}
}
else
{
hBdVSphereFather = (GEO_tdxHandleToBoundingSphere)HIE_fn_hGetSuperObjectBoundingVolume( h_SuperObject );
hBdVBoxFather = NULL;
if( hBdVSphereFather )
{
MTH3D_M_vCopyVector(&stSphereCenterFather, GEO_fn_pGetCenterPointOfBoundingSphere(hBdVSphereFather));
xRadiusFather = GEO_fn_xGetRadiusOfBoundingSphere(hBdVSphereFather);
if( hGeometricObject )
{
GEO_fn_vAddObjectToSphere(hGeometricObject, &stSphereCenterFather , & xRadiusFather );
}
else
{
/* init bdv*/
MTH3D_M_vNullVector( & stSphereCenterFather );
xRadiusFather = MTH_C_ZERO;
}
}
}
HIE_M_ForEachChildOf(h_SuperObject, h_Child, xIndex)
{
/* compute bounding volume of child chil*/
MGT_fn_vRecurUpdateBoundingVolumeInHierarchy( h_Child );
/*
Now, the bounding volume of a SuperObject doesn't take account the bounding volume of children
// recompute Bounding volume with children
if( hBdVBoxFather || hBdVSphereFather )
{
// take account this bouding volume
hLocalMatrix = HIE_fn_hGetSuperObjectMatrix( h_Child );
POS_fn_vGetTranslationVector( hLocalMatrix, &stTranslation );
if( HIE_fn_SO_bHasABoxBoundingVolume( h_Child ) )
{
// Child has a Box as Bounding Volume
GEO_tdxHandleToParallelBox hBdVBox;
MTH3D_tdstVector *p_stGlobalMaxBoxPoint, *p_stGlobalMinBoxPoint;
MTH3D_tdstVector stLocalMaxBoxPoint, stLocalMinBoxPoint;
hBdVBox = (GEO_tdxHandleToParallelBox)HIE_fn_hGetSuperObjectBoxBoundingVolume( h_Child );
if( hBdVBox )
{
p_stGlobalMaxBoxPoint = GEO_fn_pGetMaxPointOfParallelBox( hBdVBox );
p_stGlobalMinBoxPoint = GEO_fn_pGetMinPointOfParallelBox( hBdVBox );
// translate points to father axis
MTH3D_M_vAddVector( &stLocalMaxBoxPoint, p_stGlobalMaxBoxPoint, &stTranslation );
MTH3D_M_vAddVector( &stLocalMinBoxPoint, p_stGlobalMinBoxPoint, &stTranslation );
if( bBdVIsABox )
{
// Father has a Box as Bounding Volume
// Box = Box + Box
GEO_fn_vComputeParallelBoxOfTwoBoxes( p_stGlobalMaxBoxPointFather, p_stGlobalMinBoxPointFather,
& stLocalMaxBoxPoint, & stLocalMinBoxPoint,
p_stGlobalMaxBoxPointFather, p_stGlobalMinBoxPointFather );
}
else
{
// Father has a Sphere as Bounding Volume
// Sphere = Sphere + Box
MTH3D_tdstVector stSphereCenter;
MTH_tdxReal xRadius;
GEO_fn_vGetSphereFromParallelBox( & stSphereCenter , &xRadius, & stLocalMaxBoxPoint, & stLocalMinBoxPoint );
GEO_fn_vComputeBoundingSphereOfTwoSpheres( & stSphereCenterFather , & xRadiusFather,
& stSphereCenterFather , xRadiusFather,
& stSphereCenter , xRadius );
}
}
}
else
{
// Child has a Sphere as Bounding Volume
ACP_tdxHandleOfObject hBdVSphere;
MTH3D_tdstVector stSphereCenter;
MTH_tdxReal xRadius;
hBdVSphere = HIE_fn_hGetSuperObjectBoundingVolume( h_Child );
if( hBdVSphere )
{
GEO_fn_vGetSphereFromBoundingVolume( & stSphereCenter , &xRadius , hBdVSphere );
// translate sphere to father axis
MTH3D_M_vAddVector( & stSphereCenter, & stSphereCenter, & stTranslation );
if( bBdVIsABox )
{
// Father has a Box as Bounding Volume
// Box = Box + Sphere
COL_fn_vComputeBoundingBoxOfSphereAndBox ( p_stGlobalMinBoxPointFather, p_stGlobalMaxBoxPointFather,
& stSphereCenter , xRadius ,
p_stGlobalMinBoxPointFather, p_stGlobalMaxBoxPointFather );
}
else
{
// Father has a Sphere as Bounding Volume
// Sphere = Sphere + Sphere
GEO_fn_vComputeBoundingSphereOfTwoSpheres( & stSphereCenterFather , & xRadiusFather,
& stSphereCenterFather , xRadiusFather,
& stSphereCenter , xRadius );
}
}
}
if( ! bBdVIsABox )
{
GEO_fn_vSetSphereToBoundingVolume( & stSphereCenterFather, xRadiusFather, hBdVSphereFather);
}
}
*/
}
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
ACP_tdxBool MGT_fn_bComputeInfluenceOnObject( ACP_tdxIndex x_Magnet, MTH_tdxReal xFarFar, GEO_tdstGeometricObject *p_stObject ,
ACP_tdxIndex *p_x_ModifiedObject ,
MTH3D_tdstVector *p_stMagnetPosition , HIE_tdxHandleToSuperObject h_SuperObject )
{
ACP_tdxIndex xIndexPoint;
MTH3D_tdstVector *p_stCurrentPoint, stVect;
MTH_tdxReal xDX , xTemp;
MGT_tdxHandleToMagnetModification h_MagnetModif;
ACP_tdxBool bObjectModified;
bObjectModified = FALSE;
h_MagnetModif = NULL;
for ( xIndexPoint = 0 , p_stCurrentPoint = p_stObject -> d_stListOfPoints ; xIndexPoint < p_stObject -> xNbPoints ; xIndexPoint++, p_stCurrentPoint++ )
{
MTH3D_M_vSubVector( &stVect , p_stMagnetPosition, p_stCurrentPoint );
xDX = MTH_M_xSqr( stVect . xX );
if (MTH_M_bLess( xDX, xFarFar ))
{
xTemp = MTH_M_xSqr( stVect . xY );
xDX = MTH_M_xAdd( xDX, xTemp );
if (MTH_M_bLess( xDX, xFarFar ))
{
xTemp = MTH_M_xSqr( stVect . xZ );
xDX = MTH_M_xAdd( xDX, xTemp );
if (MTH_M_bLess( xDX, xFarFar ))
{
/* the point is modified*/
if( h_MagnetModif == NULL )
{
/* new object modified*/
if( *p_x_ModifiedObject == MGT_C_xIndexError )
*p_x_ModifiedObject = MGT_fn_xCreateModifiedObject( p_stObject );
h_MagnetModif = MGT_fn_hFindOrAddMagnetModification( x_Magnet , *p_x_ModifiedObject , p_stObject );
if( h_MagnetModif )
{
h_MagnetModif -> h_SuperObject = h_SuperObject;
h_MagnetModif -> bUsed = TRUE;
bObjectModified = TRUE;
}
}
if( h_MagnetModif )
{
MGT_M_vSetBit( h_MagnetModif -> d_cFieldBitsModifiedPoints , xIndexPoint );
MGT_M_vSetBit( h_MagnetModif -> d_cFieldBitsInfluencedPoints , xIndexPoint );
}
}
}
}
}
return bObjectModified;
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vUpdateInfluence( MS_tdxHandleToMSMagnet h_Magnet, ACP_tdxBool bRecompute )
{
ACP_tdxIndex xIndex;
MGT_tdxHandleToMagnetModification h_MagnetModif;
for ( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MODIFIEDOBJECTS ; xIndex++ )
{
h_MagnetModif = fn_hMSMagnetGetMagnetModification( h_Magnet ,xIndex );
if( h_MagnetModif )
{
MGT_fn_vClearInfluencedPointsOfMagnetModification( h_MagnetModif );
}
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vSetMagnetModificationUse( MS_tdxHandleToMSMagnet h_Magnet, ACP_tdxBool bUse )
{
ACP_tdxIndex xIndex;
MGT_tdxHandleToMagnetModification h_MagnetModif;
for ( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MODIFIEDOBJECTS ; xIndex++ )
{
h_MagnetModif = fn_hMSMagnetGetMagnetModification( h_Magnet ,xIndex );
if( h_MagnetModif )
{
h_MagnetModif -> bUsed = bUse;
}
}
}
/*=======================================================================================
* Description compute the influence of magnet in all static objects
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
ACP_tdxBool MGT_fn_bMorphMagnetModif( MGT_tdxHandleToMagnetModification h_MagnetModif )
{
ACP_tdxIndex xIndexPoint;
GEO_tdstGeometricObject *h_Object;
POS_tdxHandleToPosition hMatrix;
POS_tdstCompletePosition stMatrix;
MTH3D_tdstVector stMagnetLocalPosition, *p_stPosition;
MS_tdxHandleToMSMagnet h_Magnet;
MTH_tdxReal xNear , xFar , xStrength , xInvFarMinusNear , xInvFrames;
ACP_tdxBool bChanged , bUnsetPoint , bMagnetModified , bGrowing;
unsigned long ulFrameDuration , *p_ulCurrentDuration;
MTH3D_tdstVector *p_stOriginalPosition , *p_stCurrentPosition;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
char *p_cFieldBitsOfAlreadyInfluencedPoints;
/**/
if( ( h_MagnetModif == NULL ) || ! MGT_fn_bIsExistModifiedPointsOnMagnetModification( h_MagnetModif ) )
return FALSE;
/**/
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ h_MagnetModif -> xIndexOfModifiedObject ];
p_cFieldBitsOfAlreadyInfluencedPoints = h_ModifiedObject -> d_cFieldBitsAlreadyInfluencedPoints;
ulFrameDuration = g_stEngineStructure.stEngineTimer.ulUsefulDeltaTime;
h_Object = h_ModifiedObject -> p_stMorphedObject;
if( MGT_g_aDEF_hActivatedMagnets[ h_MagnetModif -> xIndexOfActivatedMagnet ] == NULL )
{
for ( xIndexPoint = 0 , p_ulCurrentDuration = h_MagnetModif -> d_ulCurrentDuration , p_stOriginalPosition = h_ModifiedObject -> d_stOriginalPosition , p_stCurrentPosition = h_Object -> d_stListOfPoints ;
xIndexPoint < h_Object -> xNbPoints ;
xIndexPoint++, p_ulCurrentDuration++, p_stOriginalPosition++, p_stCurrentPosition++ )
{
if( MGT_M_bIsSetBit( h_MagnetModif -> d_cFieldBitsModifiedPoints , xIndexPoint ) /* the point is modified, recompute influence*/
&& ! MGT_M_bIsSetBit( h_MagnetModif -> d_cFieldBitsInfluencedPoints , xIndexPoint ) /* the point is currently not influenced by the magnet*/
&& ((*p_ulCurrentDuration) > 0)
)
{
(*p_ulCurrentDuration) -= ( (*p_ulCurrentDuration) >= ulFrameDuration ) ? ulFrameDuration : (*p_ulCurrentDuration);
MGT_fn_vComputePreviousPosition( h_MagnetModif, xIndexPoint, p_cFieldBitsOfAlreadyInfluencedPoints,
(*p_ulCurrentDuration) , ulFrameDuration ,
p_stOriginalPosition , p_stCurrentPosition );
bChanged = TRUE;
if( (*p_ulCurrentDuration) == 0 )
{
MGT_M_vUnSetBit( h_MagnetModif -> d_cFieldBitsModifiedPoints , xIndexPoint );
bUnsetPoint = TRUE;
}
}
}
}
else if( h_Magnet = M_GetMSHandle( MGT_g_aDEF_hActivatedMagnets[ h_MagnetModif -> xIndexOfActivatedMagnet ], MSMagnet)) /* volontary assignment*/
{
bGrowing = FALSE;
xFar = fn_xMSMagnetGetFar(h_Magnet);
xNear = fn_xMSMagnetGetNear(h_Magnet);
xStrength = fn_xMSMagnetGetStrength(h_Magnet);
xInvFarMinusNear = MTH_M_xSub( xFar , xNear );
bMagnetModified = fn_bMSMagnetIsNearFarModified (h_Magnet) ||
fn_bMSMagnetIsStrengthModified(h_Magnet) ||
fn_bMSMagnetIsPositionModified(h_Magnet);
if( MTH_M_bDifferentZero( xInvFarMinusNear ) )
xInvFarMinusNear = MTH_M_xInv( xInvFarMinusNear );
else
xInvFarMinusNear = MTH_C_ONE;
xInvFrames = MTH_M_xInv( (float)(h_Magnet -> ulDuration) );
hMatrix = HIE_fn_hGetSuperObjectGlobalMatrix( h_MagnetModif -> h_SuperObject );
POS_fn_vInvertMatrix( & stMatrix , hMatrix );
p_stPosition = fn_hMSMagnetGetPosition( h_Magnet );
POS_fn_vMulMatrixVertex( & stMagnetLocalPosition , & stMatrix , p_stPosition );
h_Object = h_ModifiedObject -> p_stMorphedObject;
bChanged = FALSE;
bUnsetPoint = FALSE;
for ( xIndexPoint = 0 , p_ulCurrentDuration = h_MagnetModif -> d_ulCurrentDuration , p_stOriginalPosition = h_ModifiedObject -> d_stOriginalPosition , p_stCurrentPosition = h_Object -> d_stListOfPoints ;
xIndexPoint < h_Object -> xNbPoints ;
xIndexPoint++, p_ulCurrentDuration++, p_stOriginalPosition++, p_stCurrentPosition++ )
{
if( MGT_M_bIsSetBit( h_MagnetModif -> d_cFieldBitsModifiedPoints , xIndexPoint ) )
{
/* the point is modified, recompute influence*/
if( MGT_M_bIsSetBit( h_MagnetModif -> d_cFieldBitsInfluencedPoints , xIndexPoint ) )
{
/* the point is currently influenced by the magnet*/
if( ((*p_ulCurrentDuration) < h_Magnet -> ulDuration) || bMagnetModified )
{
(*p_ulCurrentDuration) += ulFrameDuration;
if( (*p_ulCurrentDuration) > h_Magnet -> ulDuration )
{
(*p_ulCurrentDuration) = h_Magnet -> ulDuration;
}
MGT_fn_vComputeNewPosition( h_MagnetModif, xIndexPoint, p_cFieldBitsOfAlreadyInfluencedPoints, (*p_ulCurrentDuration) ,
p_stOriginalPosition , p_stCurrentPosition , p_stPosition ,
xNear , xStrength , xInvFarMinusNear , xInvFrames);
bChanged = TRUE;
}
}
else
{
/* the point is currently not influenced by the magnet*/
if( (*p_ulCurrentDuration) > 0 )
{
(*p_ulCurrentDuration) -= ( (*p_ulCurrentDuration) >= ulFrameDuration ) ? ulFrameDuration : (*p_ulCurrentDuration);
MGT_fn_vComputePreviousPosition( h_MagnetModif, xIndexPoint, p_cFieldBitsOfAlreadyInfluencedPoints,
(*p_ulCurrentDuration) , ulFrameDuration ,
p_stOriginalPosition , p_stCurrentPosition );
bChanged = TRUE;
if( (*p_ulCurrentDuration) == 0 )
{
MGT_M_vUnSetBit( h_MagnetModif -> d_cFieldBitsModifiedPoints , xIndexPoint );
bUnsetPoint = TRUE;
}
}
}
}
}
}
else
return FALSE;
if( bUnsetPoint && ! MGT_fn_bIsExistModifiedPointsOnMagnetModification( h_MagnetModif ) )
{
MGT_fn_vDeleteMagnetModification( h_MagnetModif );
}
return bChanged;
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vComputeNewPosition( MGT_tdxHandleToMagnetModification h_MagnetModif , ACP_tdxIndex xIndexPoint, char *p_cFieldBitAlreadyInfluenced, unsigned long ulCurrentDuration ,
MTH3D_tdstVector *p_stInitialPosition , MTH3D_tdstVector *p_stCurrentPosition , MTH3D_tdstVector *p_stMagnetPosition ,
MTH_tdxReal xNear , MTH_tdxReal xStrength , MTH_tdxReal xInvFarMinusNear , MTH_tdxReal xInvFrames)
{
MTH_tdxReal xDistance , xFrameRatio, xRatio;
MTH3D_tdstVector stVect , stVectA , stVectB ;
xFrameRatio = MTH_M_xMul( (MTH_tdxReal)ulCurrentDuration , xInvFrames ) ;
MTH3D_M_vSubVector( & stVect , p_stMagnetPosition, p_stInitialPosition );
xDistance = MTH3D_M_xNormVector( & stVect );
MTH3D_M_vNormalizeVector( & stVectB, & stVect );
if( MTH_M_bLess( xDistance , xNear) )
{
if( MTH_M_bLess( xDistance , xStrength ) )
xRatio = MTH_M_xMul( xFrameRatio , xDistance );
else
xRatio = MTH_M_xMul( xFrameRatio , xStrength );
}
else
{
xRatio = MTH_M_xSub( xDistance, xNear );
xRatio = MTH_M_xMul( xRatio, xInvFarMinusNear );
xRatio = MTH_M_xSub( MTH_C_ONE, xRatio );
xRatio = MTH_M_xMul( xRatio, xStrength );
xRatio = MTH_M_xMul( xRatio, xFrameRatio );
}
MTH3D_M_vMulScalarVector( & stVectA, xRatio, & stVectB);
if( MGT_M_bIsSetBit( p_cFieldBitAlreadyInfluenced , xIndexPoint ) )
{
/* the point isn't already influenced by another magnet, uses the initial value*/
MTH3D_M_vAddVector ( & stVectB , p_stInitialPosition , & stVectA );
MTH3D_M_vMiddleVector( p_stCurrentPosition , p_stCurrentPosition, & stVectB );
}
else
{
/* the point is already influenced by another magnet, uses the modified value*/
MTH3D_M_vAddVector( p_stCurrentPosition , p_stInitialPosition , & stVectA );
MGT_M_vSetBit( p_cFieldBitAlreadyInfluenced , xIndexPoint );
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vComputePreviousPosition( MGT_tdxHandleToMagnetModification h_MagnetModif , ACP_tdxIndex xIndexPoint, char *p_cFieldBitAlreadyInfluenced,
unsigned long ulCurrentDuration , unsigned long ulDecreaseDuration ,
MTH3D_tdstVector *p_stInitialPosition , MTH3D_tdstVector *p_stCurrentPosition)
{
MTH_tdxReal xFrameRatio;
MTH3D_tdstVector stVect , stVectA , stVectB ;
/* compute previous deformation*/
MTH3D_M_vSubVector( & stVect, p_stCurrentPosition, p_stInitialPosition );
/* compute previous to current ratio*/
xFrameRatio = MTH_M_xFloatToReal( ((float)ulCurrentDuration) / ((float)(ulCurrentDuration+ulDecreaseDuration)) );
/* compute current deformation*/
MTH3D_M_vMulScalarVector( & stVectA, xFrameRatio, & stVect );
if( MGT_M_bIsSetBit( p_cFieldBitAlreadyInfluenced , xIndexPoint ) )
{
/* the point is already influenced by another magnet, uses the initial value*/
MTH3D_M_vAddVector ( & stVectB , p_stInitialPosition , & stVectA );
MTH3D_M_vMiddleVector( p_stCurrentPosition , p_stCurrentPosition, & stVectB );
}
else
{
/* the point isn't already influenced by another magnet, uses the modified value*/
MTH3D_M_vAddVector( p_stCurrentPosition , p_stInitialPosition , & stVectA );
MGT_M_vSetBit( p_cFieldBitAlreadyInfluenced , xIndexPoint );
}
}

View File

@@ -0,0 +1,57 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#if !defined( _MGTMAIN_H_ )
#define _MGTMAIN_H_
/*************************************************************************************************/
#include "cpa_expt.h"
#include "MGT\MGTStruc.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*************************************************************************************************/
extern CPA_EXPORT void MGT_fn_vTreatMagnets ( void );
/*************************************************************************************************/
void MGT_fn_vInitTreatement ( void );
void MGT_fn_vEndTreatement ( void );
ACP_tdxBool MGT_fn_bMorphMagnetModif ( MGT_tdxHandleToMagnetModification h_MagnetModif );
void MGT_fn_vComputeInfluence ( HIE_tdxHandleToSuperObject h_SO , MS_tdxHandleToMSMagnet h_Magnet , ACP_tdxIndex x_Magnet );
ACP_tdxIndex MGT_fn_bComputeInfluenceOnSuperObject ( MS_tdxHandleToMSMagnet h_Magnet , ACP_tdxIndex x_Magnet , MTH_tdxReal xFarFar, HIE_tdxHandleToSuperObject h_SuperObject );
ACP_tdxBool MGT_fn_bComputeInfluenceOnObject ( ACP_tdxIndex x_Magnet, MTH_tdxReal xFarFar, GEO_tdstGeometricObject *p_stObject ,
ACP_tdxIndex *p_x_ModifiedObject ,
MTH3D_tdstVector *p_stMagnetPosition , HIE_tdxHandleToSuperObject h_SuperObject );
void MGT_fn_vUpdateInfluence ( MS_tdxHandleToMSMagnet h_Magnet, ACP_tdxBool bRecompute );
void MGT_fn_vSetMagnetModificationUse ( MS_tdxHandleToMSMagnet h_Magnet, ACP_tdxBool bRecompute );
void MGT_fn_vComputeNewPosition ( MGT_tdxHandleToMagnetModification h_MagnetModif , ACP_tdxIndex xIndexPoint, char *p_cFieldBitAlreadyInfluenced, unsigned long ulCurrentDuration ,
MTH3D_tdstVector *p_stInitialPosition , MTH3D_tdstVector *p_stCurrentPosition , MTH3D_tdstVector *p_stMagnetPosition ,
MTH_tdxReal xNear , MTH_tdxReal xStrength , MTH_tdxReal xInvFarMinusNear , MTH_tdxReal xInvFrames);
void MGT_fn_vComputePreviousPosition ( MGT_tdxHandleToMagnetModification h_MagnetModif , ACP_tdxIndex xIndexPoint, char *p_cFieldBitAlreadyInfluenced,
unsigned long ulCurrentDuration , unsigned long ulDecreaseDuration ,
MTH3D_tdstVector *p_stInitialPosition , MTH3D_tdstVector *p_stCurrentPosition);
void MGT_fn_bUpdateBoundingVolume ( void );
void MGT_fn_vClearMagnetModificationFlagInHierarchy ( HIE_tdxHandleToSuperObject h_SuperObject );
void MGT_fn_vRecurUpdateBoundingVolumeInHierarchy ( HIE_tdxHandleToSuperObject h_SuperObject );
/*************************************************************************************************/
#ifdef __cplusplus
};
#endif /* __cplusplus */
/*************************************************************************************************/
#endif /* _MGTMAIN_H_ */

View File

@@ -0,0 +1,21 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#ifdef MGT_RASTER
#include "MGTRast.h"
unsigned long gs_ulMGTRasterSearch = 0;
unsigned long gs_ulMGTCounterSearch = 0;
unsigned long gs_ulMGTRasterCompute = 0;
unsigned long gs_ulMGTCounterCompute = 0;
unsigned long gs_ulTmp = 0;
unsigned long gs_ulMGTRasterAlloc = 0;
unsigned long gs_ulMGTCounterAlloc = 0;
#endif /* MGT_RASTER */

View File

@@ -0,0 +1,51 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#ifdef MGT_RASTER
#if !defined(_MGTRAST_H_)
#define _MGTRAST_H_
/*************************************************************************************************/
extern unsigned long gs_ulMGTRasterSearch;
extern unsigned long gs_ulMGTCounterSearch;
extern unsigned long gs_ulMGTRasterCompute;
extern unsigned long gs_ulMGTCounterCompute;
extern unsigned long gs_ulTmp;
extern unsigned long gs_ulMGTRasterAlloc;
extern unsigned long gs_ulMGTCounterAlloc;
/* ======================================== Macros ========================================*/
#define RDTSC __asm _emit 0x0F __asm _emit 0x31
/* ======================================== Inline functions ========================================*/
#pragma warning (disable : 4035) /* To prevent from displaying the 'no return value' warning message*/
/*-----------------------------------------------------------------------------*/
/* PRF_fn_lGetPentiumTimerValue*/
/* Give the current value of the Pentium timer*/
/*-----------------------------------------------------------------------------*/
INLINE
long __fastcall PRF_fn_lGetPentiumTimerValue ()
{
__asm
{
PUSH EDX
RDTSC
SHRD EAX,EDX,4
POP EDX
}
}
#pragma warning (default : 4035)
#endif /* _MGTRAST_H_ */
#endif /* MGT_RASTER */

View File

@@ -0,0 +1,182 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#include "acp_base.h"
#define D_MSMagnet_StructureDefine
/*XB9800506*/
/*#include "incGEO.h"*/
#include "GEO.h"
/*#include "incGLI.h"*/
#include "GLI.h"
/*#include "incGAM.h"*/
#include "mec.h"
#include "fil.h"
#include "snd.h"
#include "pcs.h"
#include "gld.h"
#include "lst.h"
#ifdef USE_IPT_DX5
#include "IPT_DX5.h" /* InPuT (absolutely before GAM.h)*/
#else /* USE_IPT_WIN */
#include "IPT.h" /* InPuT (absolutely before GAM.h)*/
#endif /* USE_IPT_WIN */
/*#include "srf.h"*/
/*#include "env.h"*/
#include "sct.h"
#include "prt.h"
#include "gam.h"
/*End XB*/
#include "MGT\MGTStruc.h"
#include "MGTmm.h"
#include "MGTmo.h"
#ifdef MGT_RASTER
#include "MGTRast.h"
#endif
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
MGT_tdxHandleToMagnetModification MGT_fn_hFindOrAddMagnetModification( ACP_tdxIndex x_Magnet , ACP_tdxIndex x_ModifiedObject , GEO_tdstGeometricObject *p_stObject )
{
ACP_tdxIndex xIndex , xFreeIndex;
MGT_tdxHandleToMagnetModification h_MagnetModif;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ x_ModifiedObject ];
xFreeIndex = MGT_MAX_NUMBEROF_MODIFIEDOBJECTS;
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MAGNETS ; xIndex++ )
{
h_MagnetModif = h_ModifiedObject -> aDEF_hMagnet[ xIndex ];
if( h_MagnetModif )
{
if( h_MagnetModif -> xIndexOfActivatedMagnet == x_Magnet )
return h_MagnetModif;
}
else if( xFreeIndex == MGT_MAX_NUMBEROF_MODIFIEDOBJECTS )
{
xFreeIndex = xIndex;
}
}
h_MagnetModif = MGT_fn_hCreateMagnetModification( x_Magnet, x_ModifiedObject );
return h_MagnetModif;
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
MGT_tdxHandleToMagnetModification MGT_fn_hCreateMagnetModification( ACP_tdxIndex x_Magnet , ACP_tdxIndex x_ModifiedObject )
{
MGT_tdxHandleToMagnetModification h_MagnetModif;
MS_tdxHandleToMSMagnet h_Magnet;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ x_ModifiedObject ];
h_Magnet = M_GetMSHandle( MGT_g_aDEF_hActivatedMagnets[ x_Magnet ] , MSMagnet);
MGT_M_pvMalloc( h_MagnetModif , MGT_tdxHandleToMagnetModification , sizeof ( MGT_tdstMagnetModification ) );
h_MagnetModif -> xIndexOfActivatedMagnet = x_Magnet;
h_MagnetModif -> xIndexOfModifiedObject = x_ModifiedObject;
h_MagnetModif -> h_SuperObject = NULL;
h_MagnetModif -> xNbPoints = h_ModifiedObject -> p_stMorphedObject -> xNbPoints;
MGT_fn_vAddMagnetModificationToModifiedObject( h_MagnetModif );
fn_vMSMagnetAddMagnetModification( h_Magnet, h_MagnetModif );
/**/
MGT_M_pvMalloc( h_MagnetModif -> d_cFieldBitsInfluencedPoints , char* , MGT_M_BYTESFORBITS( h_MagnetModif -> xNbPoints ) );
MGT_fn_vClearInfluencedPointsOfMagnetModification( h_MagnetModif );
MGT_M_pvMalloc( h_MagnetModif -> d_cFieldBitsModifiedPoints , char* , MGT_M_BYTESFORBITS( h_MagnetModif -> xNbPoints ) );
MGT_fn_vClearModifiedPointsOfMagnetModification( h_MagnetModif );
MGT_M_pvMalloc( h_MagnetModif -> d_ulCurrentDuration, unsigned long* , h_MagnetModif -> xNbPoints * sizeof ( unsigned long ) );
memset( h_MagnetModif -> d_ulCurrentDuration, 0, h_MagnetModif -> xNbPoints * sizeof ( unsigned long ) );
return h_MagnetModif;
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vClearModifiedPointsOfMagnetModification( MGT_tdxHandleToMagnetModification h_MagnetModif )
{
memset( h_MagnetModif -> d_cFieldBitsModifiedPoints, 0, MGT_M_BYTESFORBITS( h_MagnetModif -> xNbPoints ) );
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vClearInfluencedPointsOfMagnetModification( MGT_tdxHandleToMagnetModification h_MagnetModif )
{
memset( h_MagnetModif -> d_cFieldBitsInfluencedPoints, 0, MGT_M_BYTESFORBITS( h_MagnetModif -> xNbPoints ) );
}
/*=======================================================================================
* Description Free MagnetModification and delete it from ModifiedObject and MSMagnet
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteMagnetModification( MGT_tdxHandleToMagnetModification h_MagnetModif )
{
MGT_M_Free( h_MagnetModif -> d_cFieldBitsInfluencedPoints );
MGT_M_Free( h_MagnetModif -> d_cFieldBitsModifiedPoints );
MGT_M_Free( h_MagnetModif -> d_ulCurrentDuration );
/**/
if( h_MagnetModif -> xIndexOfModifiedObject != MGT_C_xIndexError )
MGT_fn_vDeleteMagnetModificationToModifiedObject( h_MagnetModif );
/**/
if( ( h_MagnetModif -> xIndexOfActivatedMagnet != MGT_C_xIndexError ) &&
MGT_g_aDEF_hActivatedMagnets[ h_MagnetModif -> xIndexOfActivatedMagnet ] &&
M_GetMSHandle( MGT_g_aDEF_hActivatedMagnets[ h_MagnetModif -> xIndexOfActivatedMagnet ] , MSMagnet) )
fn_vMSMagnetDeleteMagnetModification( M_GetMSHandle( MGT_g_aDEF_hActivatedMagnets[ h_MagnetModif -> xIndexOfActivatedMagnet ] , MSMagnet), h_MagnetModif );
MGT_M_Free( h_MagnetModif );
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
ACP_tdxBool MGT_fn_bIsExistModifiedPointsOnMagnetModification( MGT_tdxHandleToMagnetModification h_MagnetModif )
{
ACP_tdxIndex xSize , xCurrent;
xSize = MGT_M_BYTESFORBITS( h_MagnetModif -> xNbPoints );
for( xCurrent = 0 ; xCurrent < xSize ; xCurrent++ )
{
if( h_MagnetModif -> d_cFieldBitsModifiedPoints[ xCurrent ] )
break;
}
return (xCurrent != xSize);
}

View File

@@ -0,0 +1,40 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#if !defined( _MGTMM_H_ )
#define _MGTMM_H_
/*************************************************************************************************/
#include "cpa_expt.h"
#include "MGT\MGTStruc.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*************************************************************************************************/
MGT_tdxHandleToMagnetModification MGT_fn_hCreateMagnetModification ( ACP_tdxIndex x_Magnet , ACP_tdxIndex x_ModifiedObject );
MGT_tdxHandleToMagnetModification MGT_fn_hFindOrAddMagnetModification ( ACP_tdxIndex x_Magnet , ACP_tdxIndex x_ModifiedObject , GEO_tdstGeometricObject *p_stObject );
void MGT_fn_vClearModifiedPointsOfMagnetModification ( MGT_tdxHandleToMagnetModification h_MagnetModif );
void MGT_fn_vClearInfluencedPointsOfMagnetModification( MGT_tdxHandleToMagnetModification h_MagnetModif );
ACP_tdxBool MGT_fn_bIsExistModifiedPointsOnMagnetModification( MGT_tdxHandleToMagnetModification h_MagnetModif );
void MGT_fn_vDeleteMagnetModification ( MGT_tdxHandleToMagnetModification h_MagnetModif );
/*************************************************************************************************/
#ifdef __cplusplus
};
#endif /* __cplusplus */
/*************************************************************************************************/
#endif /* _MGTMM_H_ */

View File

@@ -0,0 +1,250 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#include "acp_base.h"
#define D_MSMagnet_StructureDefine
/*XB9800506*/
/*#include "incGEO.h"*/
#include "GEO.h"
/*#include "incGLI.h"*/
#include "GLI.h"
/*#include "incGAM.h"*/
#include "mec.h"
#include "fil.h"
#include "snd.h"
#include "pcs.h"
#include "gld.h"
#include "lst.h"
#ifdef USE_IPT_DX5
#include "IPT_DX5.h" /* InPuT (absolutely before GAM.h)*/
#else /* USE_IPT_WIN */
#include "IPT.h" /* InPuT (absolutely before GAM.h)*/
#endif /* USE_IPT_WIN */
/*#include "srf.h"*/
/*#include "env.h"*/
#include "sct.h"
#include "prt.h"
#include "gam.h"
/*End XB*/
#include "MGT\MGTStruc.h"
#include "MGTmo.h"
#include "MGTmm.h"
#ifdef MGT_RASTER
#include "MGTRast.h"
#endif
HIE_tdxHandleToSuperObject MGT_g_aDEF_hActivatedMagnets[MGT_MAX_NUMBEROF_MAGNETS]; /* handle of activated magnets */
ACP_tdxIndex MGT_g_xMaxIndexOfActivatedMagnet;
MGT_tdxHandleToModifiedObject MGT_g_aDEF_hModifiedObjects[MGT_MAX_NUMBEROF_MODIFIEDOBJECTS];
ACP_tdxIndex MGT_g_xMaxIndexOfModifiedObject;
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
ACP_tdxIndex MGT_fn_xCreateModifiedObject( GEO_tdstGeometricObject *p_stObject )
{
MGT_tdxHandleToModifiedObject h_ModifiedObject , *p_h_ModifiedObject;
ACP_tdxIndex xIndex;
MGT_M_pvMalloc( h_ModifiedObject, MGT_tdxHandleToModifiedObject , sizeof ( MGT_tdstModifiedObject ) );
h_ModifiedObject -> p_stMorphedObject = p_stObject;
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MAGNETS ; xIndex++ )
h_ModifiedObject -> aDEF_hMagnet[ xIndex ] = NULL;
MGT_M_pvMalloc( h_ModifiedObject -> d_cFieldBitsAlreadyInfluencedPoints , char* , MGT_M_BYTESFORBITS( p_stObject -> xNbPoints ) );
MGT_fn_vClearAlreadyInfluencedPointsOfModifiedObject( h_ModifiedObject );
MGT_M_pvMalloc( h_ModifiedObject -> d_stOriginalPosition , MTH3D_tdstVector* , p_stObject -> xNbPoints * sizeof( MTH3D_tdstVector ) );
memcpy( h_ModifiedObject -> d_stOriginalPosition , p_stObject -> d_stListOfPoints , p_stObject -> xNbPoints * sizeof( MTH3D_tdstVector ) );
h_ModifiedObject -> p_stOctree = p_stObject -> p_stOctree;
p_stObject -> p_stOctree = NULL;
h_ModifiedObject -> h_SuperObject = NULL;
/* add to global list*/
for ( xIndex = 0 , p_h_ModifiedObject = MGT_g_aDEF_hModifiedObjects ;
xIndex < MGT_g_xMaxIndexOfModifiedObject ;
xIndex++, p_h_ModifiedObject++ )
{
if( (*p_h_ModifiedObject) == NULL )
{
*p_h_ModifiedObject = h_ModifiedObject;
return xIndex;
break;
}
}
if( MGT_g_xMaxIndexOfModifiedObject < MGT_MAX_NUMBEROF_MODIFIEDOBJECTS )
{
*p_h_ModifiedObject = h_ModifiedObject; /* xIndex = MGT_g_xMaxIndexOfModifiedObject*/
MGT_g_xMaxIndexOfModifiedObject++;
return xIndex;
}
return MGT_C_xIndexError;
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
ACP_tdxIndex MGT_fn_xFindModifiedObject( GEO_tdstGeometricObject *p_stObject )
{
MGT_tdxHandleToModifiedObject *p_h_ModifiedObject;
ACP_tdxIndex xObjectIndex;
for ( xObjectIndex = 0 , p_h_ModifiedObject = MGT_g_aDEF_hModifiedObjects ; xObjectIndex < MGT_g_xMaxIndexOfModifiedObject ; xObjectIndex++, p_h_ModifiedObject++ )
{
if( *p_h_ModifiedObject && ( (*p_h_ModifiedObject) -> p_stMorphedObject == p_stObject ) )
return xObjectIndex;
}
return MGT_C_xIndexError;
}
/*=======================================================================================
* Description
*
* Creation date 01/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vAddMagnetModificationToModifiedObject( MGT_tdxHandleToMagnetModification h_MagnetModif )
{
ACP_tdxIndex xIndex;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ h_MagnetModif -> xIndexOfModifiedObject ];
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MAGNETS ; xIndex++ )
{
if( h_ModifiedObject -> aDEF_hMagnet[ xIndex ] == NULL )
{
h_ModifiedObject -> aDEF_hMagnet[ xIndex ] = h_MagnetModif;
break;
}
}
}
/*=======================================================================================
* Description
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vClearAlreadyInfluencedPointsOfModifiedObject( MGT_tdxHandleToModifiedObject h_ModifiedObject )
{
memset( h_ModifiedObject -> d_cFieldBitsAlreadyInfluencedPoints, 0, MGT_M_BYTESFORBITS( h_ModifiedObject -> p_stMorphedObject -> xNbPoints ) );
}
/*=======================================================================================
* Description Delete MagnetModification from ModifiedObject
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteMagnetModificationToModifiedObject( MGT_tdxHandleToMagnetModification h_MagnetModif )
{
ACP_tdxIndex xIndex;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ h_MagnetModif -> xIndexOfModifiedObject ];
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MAGNETS ; xIndex++ )
{
if( h_ModifiedObject -> aDEF_hMagnet[ xIndex ] == h_MagnetModif )
{
h_ModifiedObject -> aDEF_hMagnet[ xIndex ] = NULL;
break;
}
}
}
/*=======================================================================================
* Description Free ModifiedObject and delete it from global list
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteModifiedObject( ACP_tdxIndex x_ModifiedObject )
{
GEO_tdstGeometricObject *p_stObject;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ x_ModifiedObject ];
p_stObject = h_ModifiedObject -> p_stMorphedObject;
MGT_M_Free( h_ModifiedObject -> d_cFieldBitsAlreadyInfluencedPoints );
memcpy( p_stObject -> d_stListOfPoints , h_ModifiedObject -> d_stOriginalPosition , p_stObject -> xNbPoints * sizeof( MTH3D_tdstVector ) );
MGT_M_Free( h_ModifiedObject -> d_stOriginalPosition );
p_stObject -> p_stOctree = h_ModifiedObject -> p_stOctree;
GEO_vEndModifyObject2(p_stObject);
MGT_g_aDEF_hModifiedObjects[ x_ModifiedObject ] = NULL;
if( x_ModifiedObject == MGT_g_xMaxIndexOfModifiedObject-1 )
MGT_g_xMaxIndexOfModifiedObject--;
MGT_M_Free( h_ModifiedObject );
}
/*=======================================================================================
* Description Free ModifiedObject and delete it from global list
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_hDeleteIfExistsMagnetModification( ACP_tdxIndex x_ModifiedObject, ACP_tdxIndex x_Magnet )
{
ACP_tdxIndex xIndex;
MGT_tdxHandleToMagnetModification *p_h_MagnetModif;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ x_ModifiedObject ];
for( xIndex = 0 , p_h_MagnetModif = h_ModifiedObject -> aDEF_hMagnet ;
xIndex < MGT_MAX_NUMBEROF_MAGNETS ;
xIndex++, p_h_MagnetModif++ )
{
if( *p_h_MagnetModif && ( (*p_h_MagnetModif) -> xIndexOfActivatedMagnet == x_Magnet ) )
{
MGT_fn_vDeleteMagnetModification( *p_h_MagnetModif );
break;
}
}
}
/*=======================================================================================
* Description Delete Modified Object if it has no MagnetModification
*
* Creation date 02/03/98
* Author Marc Trabucato
*=====================================================================================*/
void MGT_fn_vDeleteModifiedObjectIfNeeded( ACP_tdxIndex x_ModifiedObject )
{
ACP_tdxIndex xIndex;
MGT_tdxHandleToModifiedObject h_ModifiedObject;
h_ModifiedObject = MGT_g_aDEF_hModifiedObjects[ x_ModifiedObject ];
for( xIndex = 0 ; xIndex < MGT_MAX_NUMBEROF_MAGNETS ; xIndex++ )
{
if( h_ModifiedObject -> aDEF_hMagnet[ xIndex ] != NULL )
break;
}
if( xIndex == MGT_MAX_NUMBEROF_MAGNETS )
MGT_fn_vDeleteModifiedObject( x_ModifiedObject );
}

View File

@@ -0,0 +1,54 @@
/**********************************************************
* *
* Magnet *
* *
* Author : Ubi China - Marc Trabucato *
* *
**********************************************************/
#if !defined( _MGTMO_H_ )
#define _MGTMO_H_
/*************************************************************************************************/
#include "cpa_expt.h"
#include "MGT\MGTStruc.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*************************************************************************************************/
#define MGT_M_BYTESFORBITS( lNumberOfBits ) ( (lNumberOfBits>>3) + ( (lNumberOfBits&0x7) ? 1 : 0 ) )
#define MGT_C_xIndexError ((ACP_tdxIndex)-1)
#define MGT_M_pvMalloc(Var,cast,Size) Var = (cast) TMP_M_p_Malloc(Size)
#define MGT_M_Free(Var) TMP_M_Free(Var)
/*************************************************************************************************/
ACP_tdxIndex MGT_fn_xCreateModifiedObject ( GEO_tdstGeometricObject *p_stObject );
ACP_tdxIndex MGT_fn_xFindModifiedObject ( GEO_tdstGeometricObject *p_stObject );
void MGT_fn_vAddMagnetModificationToModifiedObject ( MGT_tdxHandleToMagnetModification h_MagnetModif );
void MGT_fn_vClearAlreadyInfluencedPointsOfModifiedObject( MGT_tdxHandleToModifiedObject h_ModifiedObject );
void MGT_fn_vDeleteMagnetModificationToModifiedObject ( MGT_tdxHandleToMagnetModification h_MagnetModif );
void MGT_fn_vDeleteModifiedObject ( ACP_tdxIndex x_ModifiedObject );
void MGT_fn_hDeleteIfExistsMagnetModification ( ACP_tdxIndex x_ModifiedObject, ACP_tdxIndex x_Magnet );
void MGT_fn_vDeleteModifiedObjectIfNeeded ( ACP_tdxIndex x_ModifiedObject );
/*************************************************************************************************/
extern HIE_tdxHandleToSuperObject MGT_g_aDEF_hActivatedMagnets[MGT_MAX_NUMBEROF_MAGNETS]; /* handle of activated magnets */
extern ACP_tdxIndex MGT_g_xMaxIndexOfActivatedMagnet;
extern MGT_tdxHandleToModifiedObject MGT_g_aDEF_hModifiedObjects[MGT_MAX_NUMBEROF_MODIFIEDOBJECTS];
extern ACP_tdxIndex MGT_g_xMaxIndexOfModifiedObject;
/*************************************************************************************************/
#ifdef __cplusplus
};
#endif /* __cplusplus */
/*************************************************************************************************/
#endif /* _MGTMO_H_ */

View File

@@ -0,0 +1,182 @@
# Microsoft Developer Studio Project File - Name="Mgt" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=mgt - 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 "Mgt.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 "Mgt.mak" CFG="mgt - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Mgt - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "Mgt - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "Mgt - Win32 Retail" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""$/cpa/tempgrp/Mgt", SCLAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
!IF "$(CFG)" == "Mgt - 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 /W3 /GX /O2 /I "X:\CPA\Public" /I ".\inc" /D "NDEBUG" /D "USE_PROFILER" /D "VISUAL" /D "WIN32" /D "_AI_LIB_" /D "USE_IPT_DX5" /YX /FD /c
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\MgtP5_vr.lib"
!ELSEIF "$(CFG)" == "Mgt - 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 /W3 /GX /Z7 /Od /I "..\..\public" /D "_DEBUG" /D "USE_PROFILER" /D "MTH_CHECK" /D "CPA_WANTS_EXPORT" /D "VISUAL" /D "WIN32" /D "_AI_LIB_" /YX /FD /c
# SUBTRACT CPP /Fr
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\MgtP5_vd.lib"
!ELSEIF "$(CFG)" == "Mgt - Win32 Retail"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Mgt___Wi"
# PROP BASE Intermediate_Dir "Mgt___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 /W3 /GX /O2 /I "X:\CPA\Public" /I ".\inc" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "RAY2EGYPTE" /D "RAYII" /D "_____MGT_RASTER" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "X:\CPA\Public" /I ".\inc" /D "NDEBUG" /D "RETAIL" /D "VISUAL" /D "WIN32" /D "_AI_LIB_" /D "USE_IPT_DX5" /YX /FD /c
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"x:\Cpa\Lib\MgtP5_vr.lib"
# ADD LIB32 /nologo /out:"x:\Cpa\Lib\MgtP5_vf.lib"
!ENDIF
# Begin Target
# Name "Mgt - Win32 Release"
# Name "Mgt - Win32 Debug"
# Name "Mgt - Win32 Retail"
# Begin Group "Includes"
# PROP Default_Filter "*.h"
# Begin Source File
SOURCE=..\..\public\Mgt.h
# End Source File
# Begin Source File
SOURCE=.\MGTInit.h
# End Source File
# Begin Source File
SOURCE=.\MGTMain.h
# End Source File
# Begin Source File
SOURCE=.\MGTmm.h
# End Source File
# Begin Source File
SOURCE=.\MGTmo.h
# End Source File
# Begin Source File
SOURCE=..\..\public\Mgt\MGTProto.h
# End Source File
# Begin Source File
SOURCE=.\MGTRast.h
# End Source File
# Begin Source File
SOURCE=..\..\public\Mgt\MGTStruc.h
# End Source File
# End Group
# Begin Group "Sources"
# PROP Default_Filter "*.c"
# Begin Source File
SOURCE=.\MGTInit.c
# End Source File
# Begin Source File
SOURCE=.\MGTMain.c
# End Source File
# Begin Source File
SOURCE=.\MGTmm.c
# End Source File
# Begin Source File
SOURCE=.\MGTmo.c
# End Source File
# Begin Source File
SOURCE=.\MGTRast.c
!IF "$(CFG)" == "Mgt - Win32 Release"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "Mgt - Win32 Debug"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "Mgt - Win32 Retail"
# PROP BASE Exclude_From_Build 1
# PROP Exclude_From_Build 1
!ENDIF
# End Source File
# End Group
# Begin Source File
SOURCE=.\Mgt.mak
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,344 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="Mgt"
ProjectGUID="{A5A7C27B-7AC8-4EE4-B2F8-FF0F4E2BEE89}"
SccProjectName="&quot;$/cpa/tempgrp/Mgt&quot;, SCLAAAAA"
SccAuxPath=""
SccLocalPath="."
SccProvider="MSSCCI:NXN alienbrain">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="x:\cpa\lib"
IntermediateDirectory=".\Tmp\Release"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="X:\CPA\Public,.\inc"
PreprocessorDefinitions="NDEBUG;USE_PROFILER;VISUAL;WIN32;_AI_LIB_;USE_IPT_DX5"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Tmp\Release/Mgt.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\MgtP5_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"
AdditionalIncludeDirectories="X:\CPA\Public,.\inc"
PreprocessorDefinitions="NDEBUG;RETAIL;VISUAL;WIN32;_AI_LIB_;USE_IPT_DX5"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\tmp/retail/Mgt.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\MgtP5_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="Debug|Win32"
OutputDirectory="x:\cpa\libd"
IntermediateDirectory=".\tmp\Debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\public"
PreprocessorDefinitions="_DEBUG;USE_PROFILER;MTH_CHECK;CPA_WANTS_EXPORT;VISUAL;WIN32;_AI_LIB_"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\tmp\Debug/Mgt.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\MgtP5_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="Includes"
Filter="*.h">
<File
RelativePath="..\..\public\Mgt.h">
</File>
<File
RelativePath="MGTInit.h">
</File>
<File
RelativePath="MGTMain.h">
</File>
<File
RelativePath="MGTmm.h">
</File>
<File
RelativePath="MGTmo.h">
</File>
<File
RelativePath="..\..\public\Mgt\MGTProto.h">
</File>
<File
RelativePath="MGTRast.h">
</File>
<File
RelativePath="..\..\public\Mgt\MGTStruc.h">
</File>
</Filter>
<Filter
Name="Sources"
Filter="*.c">
<File
RelativePath="MGTInit.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Retail|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="MGTMain.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Retail|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="MGTmm.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Retail|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="MGTmo.c">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Retail|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="MGTRast.c">
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Retail|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
</Filter>
<File
RelativePath="Mgt.mak">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

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