mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Store the profile type in the profile structure and remove superfluous code
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8620 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -71,24 +71,16 @@ STR pbCarPortraitFileNames[ ]={
|
||||
"INTERFACE\\Jeep.sti",
|
||||
};
|
||||
|
||||
|
||||
// load int he portraits for the car faces that will be use in mapscreen
|
||||
BOOLEAN LoadCarPortraitValues( void )
|
||||
{
|
||||
VOBJECT_DESC VObjectDesc;
|
||||
|
||||
/*
|
||||
if( giCarPortraits[ 0 ] != -1 )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
*/
|
||||
|
||||
for ( INT32 iCounter = 0; iCounter < NUM_PROFILES; ++iCounter )
|
||||
{
|
||||
// silversurfer: fixed to make sure that we only create objects for vehicles that have a face defined
|
||||
// otherwise CHECKF will fail and return FALSE breaking the for loop and ignoring any further vehicles
|
||||
if ( gProfilesVehicle[ iCounter ].ProfilId == iCounter && gNewVehicle[ iCounter ].szIconFace[0] != 0 )
|
||||
if ( gMercProfiles[iCounter].Type == PROFILETYPE_VEHICLE && gNewVehicle[ iCounter ].szIconFace[0] != 0 )
|
||||
{
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
strcpy( VObjectDesc.ImageFile, gNewVehicle[ iCounter ].szIconFace );
|
||||
@@ -96,44 +88,21 @@ BOOLEAN LoadCarPortraitValues( void )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
for( iCounter = 0; iCounter < NUMBER_CAR_PORTRAITS; iCounter++ )
|
||||
{
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
sprintf( VObjectDesc.ImageFile, pbCarPortraitFileNames[ iCounter ] );
|
||||
CHECKF( AddVideoObject( &VObjectDesc, (UINT32 *)&giCarPortraits[ iCounter ] ) );
|
||||
}*/
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
// get rid of the images we loaded for the mapscreen car portraits
|
||||
void UnLoadCarPortraits( void )
|
||||
{
|
||||
// car protraits loaded?
|
||||
/*
|
||||
if( giCarPortraits[ 0 ] == -1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for( iCounter = 0; iCounter < NUMBER_CAR_PORTRAITS; iCounter++ )
|
||||
{
|
||||
DeleteVideoObjectFromIndex( giCarPortraits[ iCounter ] );
|
||||
giCarPortraits[ iCounter ] = -1;
|
||||
}
|
||||
*/
|
||||
|
||||
for ( INT32 iCounter = 0; iCounter < NUM_PROFILES; ++iCounter )
|
||||
{
|
||||
if ( gProfilesVehicle[ iCounter ].ProfilId == iCounter )
|
||||
if ( gMercProfiles[iCounter].Type == PROFILETYPE_VEHICLE )
|
||||
{
|
||||
DeleteVideoObjectFromIndex( giCarPortraits[ iCounter ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DrawLifeUIBarEx( SOLDIERTYPE *pSoldier, INT16 sXPos, INT16 sYPos, INT16 sWidth, INT16 sHeight, BOOLEAN fErase, UINT32 uiBuffer )
|
||||
{
|
||||
FLOAT dStart, dEnd, dPercentage;
|
||||
|
||||
Reference in New Issue
Block a user