mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +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:
@@ -1029,17 +1029,15 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
||||
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; ++iCounter )
|
||||
{
|
||||
// find a free slot
|
||||
if( iDoctorList[ iCounter ] != -1 )
|
||||
{
|
||||
|
||||
|
||||
if( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||
{
|
||||
// grab filename of face
|
||||
if ((iDoctorList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ))
|
||||
if ((iDoctorList[ iCounter ] != -1) && gMercProfiles[( Menptr[iDoctorList[iCounter]] ).ubProfile].Type == PROFILETYPE_IMP )
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
else
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
@@ -1047,56 +1045,20 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
||||
else
|
||||
{
|
||||
// grab filename of face
|
||||
if ((iDoctorList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ))
|
||||
if ((iDoctorList[ iCounter ] != -1) && gMercProfiles[( Menptr[iDoctorList[iCounter]] ).ubProfile].Type == PROFILETYPE_IMP )
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
else
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if ( ( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ) )
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else if ( ( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ) )
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else if(( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else if(( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
|
||||
|
||||
if( gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||
{
|
||||
// grab filename of face
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
// grab filename of face
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iDoctorList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
*/
|
||||
|
||||
// load the face
|
||||
// AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter ] );
|
||||
|
||||
if( !AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter ] ) )
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\speck.sti" );
|
||||
AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter ] );
|
||||
|
||||
}
|
||||
|
||||
iNumberOfDoctors++;
|
||||
|
||||
++iNumberOfDoctors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1105,11 +1067,10 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
||||
// find a free slot
|
||||
if( iPatientList[ iCounter ] != -1 )
|
||||
{
|
||||
|
||||
if( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||
{
|
||||
// grab filename of face
|
||||
if ((iPatientList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ))
|
||||
if ((iPatientList[ iCounter ] != -1) && gMercProfiles[( Menptr[iPatientList[iCounter]] ).ubProfile].Type == PROFILETYPE_IMP )
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
else
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
@@ -1117,56 +1078,22 @@ BOOLEAN AddFacesToAutoBandageBox( void )
|
||||
else
|
||||
{
|
||||
// grab filename of face
|
||||
if ((iPatientList[ iCounter ] != -1) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ))
|
||||
if ( (iPatientList[ iCounter ] != -1) && gMercProfiles[( Menptr[iPatientList[iCounter]] ).ubProfile].Type == PROFILETYPE_IMP )
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
else
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
|
||||
/*
|
||||
if ( ( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ) )
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else if ( ( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ) )
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else if(( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else if(( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ProfilId == -1 ))
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
|
||||
|
||||
if( gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex < 100 )
|
||||
{
|
||||
// grab filename of face
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
// grab filename of face
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ ( Menptr[ iPatientList[ iCounter ] ] ).ubProfile ].ubFaceIndex );
|
||||
}
|
||||
*/
|
||||
// load the face
|
||||
// AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter + iNumberOfDoctors ] );
|
||||
|
||||
if( !AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter + iNumberOfDoctors ] ) )
|
||||
{
|
||||
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\speck.sti" );
|
||||
AddVideoObject( &VObjectDesc, (UINT32 *)&giAutoBandagesSoldierFaces[ iCounter + iNumberOfDoctors ] );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// grab panels
|
||||
// grab panels
|
||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||
sprintf( VObjectDesc.ImageFile, "Interface\\panels.sti" );
|
||||
if( !AddVideoObject( &VObjectDesc, (UINT32 *)&giMercPanelImage ) )
|
||||
|
||||
Reference in New Issue
Block a user