mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
BUGFIX 501 - portraits weren't being re-initialized when changing the TOPTION_SHOW_TACTICAL_FACE_ICONS parameter.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4484 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Binary file not shown.
+51
-42
@@ -274,6 +274,55 @@ UINT32 CalcUIMessageDuration( STR16 wString );
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN InitializeTacticalPortraits( )
|
||||||
|
{
|
||||||
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
|
//CHRISL: Moved from InitializeTacticalInterface so we can reinitialize portait graphics as we need to
|
||||||
|
//legion 2 jazz
|
||||||
|
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_ICONS ] == TRUE)
|
||||||
|
{
|
||||||
|
//additional face icons (legion 2)
|
||||||
|
if (gGameExternalOptions.bTacticalFaceIconStyle == 0)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\portraiticons_a.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\portraiticons_a.sti" );
|
||||||
|
}
|
||||||
|
else if (gGameExternalOptions.bTacticalFaceIconStyle == 1)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\portraiticons_b.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\portraiticons_b.sti" );
|
||||||
|
}
|
||||||
|
else if (gGameExternalOptions.bTacticalFaceIconStyle == 2)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\portraiticons_c.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\portraiticons_c.sti" );
|
||||||
|
}
|
||||||
|
else if (gGameExternalOptions.bTacticalFaceIconStyle == 3)
|
||||||
|
{
|
||||||
|
FilenameForBPP("INTERFACE\\portraiticons_d.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\portraiticons_d.sti" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// JA2 classic face icons
|
||||||
|
FilenameForBPP("INTERFACE\\portraiticons.sti", VObjectDesc.ImageFile);
|
||||||
|
|
||||||
|
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
||||||
|
AssertMsg(0, "Missing INTERFACE\\portraiticons.sti" );
|
||||||
|
}
|
||||||
|
|
||||||
|
return ( TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN InitializeTacticalInterface( )
|
BOOLEAN InitializeTacticalInterface( )
|
||||||
{
|
{
|
||||||
@@ -421,48 +470,8 @@ BOOLEAN InitializeTacticalInterface( )
|
|||||||
|
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
|
|
||||||
//legion 2 jazz
|
//CHRISL: Moved to seperate function so we can call seperately
|
||||||
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_ICONS ] == TRUE)
|
InitializeTacticalPortraits();
|
||||||
{
|
|
||||||
//additional face icons (legion 2)
|
|
||||||
if (gGameExternalOptions.bTacticalFaceIconStyle == 0)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\portraiticons_a.sti", VObjectDesc.ImageFile);
|
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
|
||||||
AssertMsg(0, "Missing INTERFACE\\portraiticons_a.sti" );
|
|
||||||
}
|
|
||||||
else if (gGameExternalOptions.bTacticalFaceIconStyle == 1)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\portraiticons_b.sti", VObjectDesc.ImageFile);
|
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
|
||||||
AssertMsg(0, "Missing INTERFACE\\portraiticons_b.sti" );
|
|
||||||
}
|
|
||||||
else if (gGameExternalOptions.bTacticalFaceIconStyle == 2)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\portraiticons_c.sti", VObjectDesc.ImageFile);
|
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
|
||||||
AssertMsg(0, "Missing INTERFACE\\portraiticons_c.sti" );
|
|
||||||
}
|
|
||||||
else if (gGameExternalOptions.bTacticalFaceIconStyle == 3)
|
|
||||||
{
|
|
||||||
FilenameForBPP("INTERFACE\\portraiticons_d.sti", VObjectDesc.ImageFile);
|
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
|
||||||
AssertMsg(0, "Missing INTERFACE\\portraiticons_d.sti" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// JA2 classic face icons
|
|
||||||
FilenameForBPP("INTERFACE\\portraiticons.sti", VObjectDesc.ImageFile);
|
|
||||||
|
|
||||||
if( !AddVideoObject( &VObjectDesc, &guiPORTRAITICONS ) )
|
|
||||||
AssertMsg(0, "Missing INTERFACE\\portraiticons.sti" );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//legion
|
//legion
|
||||||
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] == TRUE)
|
if (gGameSettings.fOptions[ TOPTION_SHOW_TACTICAL_FACE_GEAR ] == TRUE)
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ typedef enum
|
|||||||
|
|
||||||
} InterfacePanelDefines;
|
} InterfacePanelDefines;
|
||||||
|
|
||||||
|
BOOLEAN InitializeTacticalPortraits( );
|
||||||
BOOLEAN InitializeTacticalInterface( );
|
BOOLEAN InitializeTacticalInterface( );
|
||||||
BOOLEAN ShutdownTacticalInterface( );
|
BOOLEAN ShutdownTacticalInterface( );
|
||||||
extern BOOLEAN fInterfacePanelDirty;
|
extern BOOLEAN fInterfacePanelDirty;
|
||||||
|
|||||||
Reference in New Issue
Block a user