Skip to content

Commit

Permalink
Merge additional HUD changes from HL25 Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Oct 20, 2024
1 parent b8d8a51 commit 0ccf5b8
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 49 deletions.
2 changes: 2 additions & 0 deletions cl_dll/cl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ inline struct cvar_s *CVAR_CREATE( const char *cv, const char *val, const int fl
// Use this to set any co-ords in 640x480 space
#define XRES(x) ( (int)( float(x) * ( (float)ScreenWidth / 640.0f ) + 0.5f ) )
#define YRES(y) ( (int)( float(y) * ( (float)ScreenHeight / 480.0f ) + 0.5f ) )
#define XRES_HD(x) ( (int)( float(x) * Q_max(1.f, (float)ScreenWidth / 1280.f )))
#define YRES_HD(y) ( (int)( float(y) * Q_max(1.f, (float)ScreenHeight / 720.f )))

// use this to project world coordinates to screen coordinates
#define XPROJECT(x) ( ( 1.0f + (x) ) * ScreenWidth * 0.5f )
Expand Down
19 changes: 15 additions & 4 deletions cl_dll/death.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ int CHudDeathNotice::Draw( float flTime )
{
int x, y, r, g, b;

int gap = 20;

const wrect_t& sprite = gHUD.GetSpriteRect(m_HUD_d_skull);
gap = sprite.bottom - sprite.top;

SCREENINFO screenInfo;

screenInfo.iSize = sizeof(SCREENINFO);
gEngfuncs.pfnGetScreenInfo(&screenInfo);
gap = Q_max( gap, screenInfo.iCharHeight );

for( int i = 0; i < MAX_DEATHNOTICES; i++ )
{
if( rgDeathNoticeList[i].iId == 0 )
Expand All @@ -119,10 +130,10 @@ int CHudDeathNotice::Draw( float flTime )
#endif
{
// Draw the death notice
y = YRES( DEATHNOTICE_TOP ) + 2 + ( 20 * i ); //!!!
y = YRES( DEATHNOTICE_TOP ) + 2 + ( gap * i ); //!!!

int id = ( rgDeathNoticeList[i].iId == -1 ) ? m_HUD_d_skull : rgDeathNoticeList[i].iId;
x = ScreenWidth - ConsoleStringLen( rgDeathNoticeList[i].szVictim ) - ( gHUD.GetSpriteRect(id).right - gHUD.GetSpriteRect(id).left );
x = ScreenWidth - ConsoleStringLen( rgDeathNoticeList[i].szVictim ) - ( gHUD.GetSpriteRect(id).right - gHUD.GetSpriteRect(id).left ) - 4;

if( !rgDeathNoticeList[i].iSuicide )
{
Expand All @@ -131,7 +142,7 @@ int CHudDeathNotice::Draw( float flTime )
// Draw killers name
if( rgDeathNoticeList[i].KillerColor )
DrawSetTextColor( rgDeathNoticeList[i].KillerColor[0], rgDeathNoticeList[i].KillerColor[1], rgDeathNoticeList[i].KillerColor[2] );
x = 5 + DrawConsoleString( x, y, rgDeathNoticeList[i].szKiller );
x = 5 + DrawConsoleString( x, y + 4, rgDeathNoticeList[i].szKiller );
}

r = 255; g = 80; b = 0;
Expand All @@ -151,7 +162,7 @@ int CHudDeathNotice::Draw( float flTime )
{
if( rgDeathNoticeList[i].VictimColor )
DrawSetTextColor( rgDeathNoticeList[i].VictimColor[0], rgDeathNoticeList[i].VictimColor[1], rgDeathNoticeList[i].VictimColor[2] );
x = DrawConsoleString( x, y, rgDeathNoticeList[i].szVictim );
x = DrawConsoleString( x, y + 4, rgDeathNoticeList[i].szVictim );
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions cl_dll/hud_spectator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,10 +657,10 @@ int CHudSpectator::Draw( float flTime )
// check if name would be in inset window
if( m_pip->value != INSET_OFF )
{
if( m_vPlayerPos[i][0] > XRES( m_OverviewData.insetWindowX ) &&
m_vPlayerPos[i][1] > YRES( m_OverviewData.insetWindowY ) &&
m_vPlayerPos[i][0] < XRES( m_OverviewData.insetWindowX + m_OverviewData.insetWindowWidth ) &&
m_vPlayerPos[i][1] < YRES( m_OverviewData.insetWindowY + m_OverviewData.insetWindowHeight) )
if( m_vPlayerPos[i][0] > XRES_HD( m_OverviewData.insetWindowX ) &&
m_vPlayerPos[i][1] > YRES_HD( m_OverviewData.insetWindowY ) &&
m_vPlayerPos[i][0] < XRES_HD( m_OverviewData.insetWindowX + m_OverviewData.insetWindowWidth ) &&
m_vPlayerPos[i][1] < YRES_HD( m_OverviewData.insetWindowY + m_OverviewData.insetWindowHeight) )
continue;
}

Expand Down
11 changes: 9 additions & 2 deletions cl_dll/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ int CHudMenu::Draw( float flTime )
return 1;
#endif

SCREENINFO screenInfo;

screenInfo.iSize = sizeof( SCREENINFO );
gEngfuncs.pfnGetScreenInfo( &screenInfo );

// draw the menu, along the left-hand side of the screen
// count the number of newlines
int nlc = 0;
Expand All @@ -96,15 +101,17 @@ int CHudMenu::Draw( float flTime )
nlc++;
}

int nFontHeight = Q_max(12, screenInfo.iCharHeight);

// center it
int y = ( ScreenHeight / 2 ) - ( ( nlc / 2 ) * 12 ) - 40; // make sure it is above the say text
int y = ( ScreenHeight / 2 ) - ( ( nlc / 2 ) * nFontHeight ) - (3 * nFontHeight + nFontHeight / 3); // make sure it is above the say text
int x = 20;

i = 0;
while( i < MAX_MENU_STRING && g_szMenuString[i] != '\0' )
{
gHUD.DrawHudString( x, y, 320, g_szMenuString + i, 255, 255, 255 );
y += 12;
y += nFontHeight;

while( i < MAX_MENU_STRING && g_szMenuString[i] != '\0' && g_szMenuString[i] != '\n' )
i++;
Expand Down
70 changes: 35 additions & 35 deletions cl_dll/vgui_SpectatorPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ extern "C" void DLLEXPORT HUD_ChatInputPosition( int *x, int *y )
{
if ( gHUD.m_Spectator.m_pip->value == INSET_OFF )
{
*y = YRES( PANEL_HEIGHT );
*y = YRES_HD( PANEL_HEIGHT );
}
else
{
*y = YRES( gHUD.m_Spectator.m_OverviewData.insetWindowHeight + 5 );
*y = YRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowHeight + 5 );
}
}
}
Expand Down Expand Up @@ -101,15 +101,15 @@ void SpectatorPanel::Initialize()

SchemeHandle_t hSmallScheme = pSchemes->getSchemeHandle( "Team Info Text" );

m_TopBorder = new CTransparentPanel( 64, 0, 0, ScreenWidth, YRES( PANEL_HEIGHT ) );
m_TopBorder = new CTransparentPanel( 64, 0, 0, ScreenWidth, YRES_HD( PANEL_HEIGHT ) );
m_TopBorder->setParent( this );

m_BottomBorder = new CTransparentPanel( 64, 0, ScreenHeight - YRES( 32 ), ScreenWidth, YRES( PANEL_HEIGHT ) );
m_BottomBorder = new CTransparentPanel( 64, 0, ScreenHeight - YRES_HD( PANEL_HEIGHT ), ScreenWidth, YRES_HD( PANEL_HEIGHT ) );
m_BottomBorder->setParent( this );

setPaintBackgroundEnabled( false );

m_ExtraInfo = new Label( "Extra Info", 0, 0, wide, YRES( PANEL_HEIGHT ) );
m_ExtraInfo = new Label( "Extra Info", 0, 0, wide, YRES_HD( PANEL_HEIGHT ) );
m_ExtraInfo->setParent( m_TopBorder );
m_ExtraInfo->setFont( pSchemes->getFont( hSmallScheme ) );

Expand All @@ -120,24 +120,24 @@ void SpectatorPanel::Initialize()
m_TimerImage = new CImageLabel( "timer", 0, 0, 14, 14 );
m_TimerImage->setParent( m_TopBorder );

m_TopBanner = new CImageLabel( "banner", 0, 0, XRES( BANNER_WIDTH ), YRES( BANNER_HEIGHT ) );
m_TopBanner = new CImageLabel( "banner", 0, 0, XRES_HD( BANNER_WIDTH ), YRES_HD( BANNER_HEIGHT ) );
m_TopBanner->setParent( this );

m_CurrentTime = new Label( "00:00", 0, 0, wide, YRES( PANEL_HEIGHT ) );
m_CurrentTime = new Label( "00:00", 0, 0, wide, YRES_HD( PANEL_HEIGHT ) );
m_CurrentTime->setParent( m_TopBorder );
m_CurrentTime->setFont( pSchemes->getFont( hSmallScheme ) );
m_CurrentTime->setPaintBackgroundEnabled( false );
m_CurrentTime->setFgColor( 143, 143, 54, 0 );
m_CurrentTime->setContentAlignment( vgui::Label::a_west );

m_Separator = new Panel( 0, 0, XRES( 64 ), YRES( 96 ) );
m_Separator = new Panel( 0, 0, XRES_HD( 64 ), YRES_HD( 96 ) );
m_Separator->setParent( m_TopBorder );
m_Separator->setFgColor( 59, 58, 34, 48 );
m_Separator->setBgColor( 59, 58, 34, 48 );

for( int j = 0; j < TEAM_NUMBER; j++ )
{
m_TeamScores[j] = new Label( " ", 0, 0, wide, YRES( PANEL_HEIGHT ) );
m_TeamScores[j] = new Label( " ", 0, 0, wide, YRES_HD( PANEL_HEIGHT ) );
m_TeamScores[j]->setParent( m_TopBorder );
m_TeamScores[j]->setFont( pSchemes->getFont( hSmallScheme ) );
m_TeamScores[j]->setPaintBackgroundEnabled( false );
Expand All @@ -147,8 +147,8 @@ void SpectatorPanel::Initialize()
}

// Initialize command buttons.
// m_OptionButton = new ColorButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES(15), YRES(6), XRES(OPTIONS_BUTTON_X), YRES(20), false, false );
m_OptionButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES(15), YRES(6), XRES(OPTIONS_BUTTON_X), YRES(20), false, false );
// m_OptionButton = new ColorButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES_HD(15), YRES_HD(6), XRES_HD(OPTIONS_BUTTON_X), YRES_HD(20), false, false );
m_OptionButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#SPECT_OPTIONS" ), XRES_HD(15), YRES_HD(6), XRES_HD(OPTIONS_BUTTON_X), YRES_HD(20), false, false );
m_OptionButton->setParent( m_BottomBorder );
m_OptionButton->setContentAlignment( vgui::Label::a_center );
m_OptionButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
Expand All @@ -158,7 +158,7 @@ void SpectatorPanel::Initialize()
m_OptionButton->setUnArmedColor( 143, 143, 54, 0 );
m_OptionButton->setArmedColor( 194, 202, 54, 0 );

m_CamButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#CAM_OPTIONS" ), ScreenWidth - ( XRES ( CAMOPTIONS_BUTTON_X ) + 15 ), YRES(6), XRES ( CAMOPTIONS_BUTTON_X ), YRES(20), false, false );
m_CamButton = new DropDownButton( CHudTextMessage::BufferedLocaliseTextString( "#CAM_OPTIONS" ), ScreenWidth - ( XRES_HD( CAMOPTIONS_BUTTON_X ) + 15 ), YRES_HD(6), XRES_HD ( CAMOPTIONS_BUTTON_X ), YRES_HD(20), false, false );
m_CamButton->setParent( m_BottomBorder );
m_CamButton->setContentAlignment( vgui::Label::a_center );
m_CamButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
Expand All @@ -168,8 +168,8 @@ void SpectatorPanel::Initialize()
m_CamButton->setUnArmedColor( 143, 143, 54, 0 );
m_CamButton->setArmedColor( 194, 202, 54, 0 );

// m_PrevPlayerButton= new ColorButton("<", XRES( 15 + OPTIONS_BUTTON_X + 15 ), YRES(6), XRES(24), YRES(20), false, false );
m_PrevPlayerButton= new CImageButton("arrowleft", XRES( 15 + OPTIONS_BUTTON_X + 15 ), YRES(6), XRES(24), YRES(20), false, false );
// m_PrevPlayerButton= new ColorButton("<", XRES_HD( 15 + OPTIONS_BUTTON_X + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20), false, false );
m_PrevPlayerButton= new CImageButton("arrowleft", XRES_HD( 15 + OPTIONS_BUTTON_X + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20), false, false );
m_PrevPlayerButton->setParent( m_BottomBorder );
m_PrevPlayerButton->setContentAlignment( vgui::Label::a_center );
m_PrevPlayerButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
Expand All @@ -179,8 +179,8 @@ void SpectatorPanel::Initialize()
m_PrevPlayerButton->setUnArmedColor( 143, 143, 54, 0 );
m_PrevPlayerButton->setArmedColor( 194, 202, 54, 0 );

// m_NextPlayerButton= new ColorButton(">", (ScreenWidth - (XRES ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES ( 24 + 15 ), YRES(6), XRES(24), YRES(20),false, false );
m_NextPlayerButton= new CImageButton("arrowright", (ScreenWidth - (XRES ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES ( 24 + 15 ), YRES(6), XRES(24), YRES(20),false, false );
// m_NextPlayerButton= new ColorButton(">", (ScreenWidth - (XRES_HD ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES_HD ( 24 + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20),false, false );
m_NextPlayerButton= new CImageButton("arrowright", (ScreenWidth - (XRES_HD ( CAMOPTIONS_BUTTON_X ) + 15)) - XRES_HD ( 24 + 15 ), YRES_HD(6), XRES_HD(24), YRES_HD(20),false, false );
m_NextPlayerButton->setParent( m_BottomBorder );
m_NextPlayerButton->setContentAlignment( vgui::Label::a_center );
m_NextPlayerButton->setBoundKey( (char)255 ); // special no bound to avoid leading spaces in name
Expand All @@ -191,10 +191,10 @@ void SpectatorPanel::Initialize()
m_NextPlayerButton->setArmedColor( 194, 202, 54, 0 );

// Initialize the bottom title.
float flLabelSize = ( ( ScreenWidth - ( XRES ( CAMOPTIONS_BUTTON_X ) + 15 ) ) - XRES( 24 + 15 ) ) - XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 38 );
float flLabelSize = ( ( ScreenWidth - ( XRES_HD ( CAMOPTIONS_BUTTON_X ) + 15 ) ) - XRES_HD( 24 + 15 ) ) - XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 38 );

m_BottomMainButton = new DropDownButton("Spectator Bottom",
XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES(6), flLabelSize, YRES(20),
XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES_HD(6), flLabelSize, YRES_HD(20),
false, false );

m_BottomMainButton->setParent(m_BottomBorder);
Expand All @@ -211,7 +211,7 @@ void SpectatorPanel::Initialize()


m_BottomMainLabel = new Label("Spectator Bottom",
XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES(6), flLabelSize, YRES(20));
XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES_HD(6), flLabelSize, YRES_HD(20));

m_BottomMainLabel->setParent( m_BottomBorder );
m_BottomMainLabel->setPaintBackgroundEnabled( false );
Expand All @@ -220,7 +220,7 @@ void SpectatorPanel::Initialize()
m_BottomMainLabel->setBorder( NULL );
m_BottomMainLabel->setVisible(false);

m_InsetViewButton = new ColorButton( "", XRES( 2 ), YRES( 2 ), XRES( 240 ), YRES( 180 ), false, false );
m_InsetViewButton = new ColorButton( "", XRES_HD( 2 ), YRES_HD( 2 ), XRES_HD( 240 ), YRES_HD( 180 ), false, false );
m_InsetViewButton->setParent( this );
m_InsetViewButton->setBoundKey( (char)255 );
m_InsetViewButton->addActionSignal( new CSpectatorHandler_Command( this, SPECTATOR_PANEL_CMD_TOGGLE_INSET ) );
Expand Down Expand Up @@ -257,11 +257,11 @@ void SpectatorPanel::ShowMenu( bool isVisible )
m_BottomMainButton->setVisible(false);

m_BottomMainLabel->getSize( iLabelSizeX, iLabelSizeY );
m_BottomMainLabel->setPos( ( ScreenWidth / 2 ) - ( iLabelSizeX / 2 ), YRES( 6 ) );
m_BottomMainLabel->setPos( ( ScreenWidth / 2 ) - ( iLabelSizeX / 2 ), YRES_HD( 6 ) );
}
else
{
m_BottomMainButton->setPos( XRES( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES(6) );
m_BottomMainButton->setPos( XRES_HD( ( 15 + OPTIONS_BUTTON_X + 15 ) + 31 ), YRES_HD(6) );
m_BottomMainLabel->setVisible(false);
m_BottomMainButton->setVisible(true);
}
Expand Down Expand Up @@ -328,18 +328,18 @@ void SpectatorPanel::EnableInsetView(bool isEnabled)
if( isEnabled )
{
// short black bar to see full inset
m_TopBorder->setBounds( XRES( offset ), 0, XRES(640 - offset ), YRES( PANEL_HEIGHT ) );
m_TopBorder->setBounds( XRES_HD( offset ), 0, XRES_HD(640 - offset ), YRES_HD( PANEL_HEIGHT ) );

if( gEngfuncs.IsSpectateOnly() )
{
m_TopBanner->setVisible( true );
m_TopBanner->setPos( XRES( offset ), 0 );
m_TopBanner->setPos( XRES_HD( offset ), 0 );
}
else
m_TopBanner->setVisible( false );

m_InsetViewButton->setBounds( XRES( x -1 ), YRES( y ),
XRES( wide +2), YRES( tall ) );
m_InsetViewButton->setBounds( XRES_HD( x -1 ), YRES_HD( y ),
XRES_HD( wide +2), YRES_HD( tall ) );
m_InsetViewButton->setVisible( true );
}
else
Expand All @@ -354,7 +354,7 @@ void SpectatorPanel::EnableInsetView(bool isEnabled)
else
m_TopBanner->setVisible( false );

m_TopBorder->setBounds( 0, 0, ScreenWidth, YRES( PANEL_HEIGHT ) );
m_TopBorder->setBounds( 0, 0, ScreenWidth, YRES_HD( PANEL_HEIGHT ) );

m_InsetViewButton->setVisible( false );
}
Expand Down Expand Up @@ -393,28 +393,28 @@ void SpectatorPanel::Update()
m_ExtraInfo->getTextSize( iTextWidth, iTextHeight );
m_CurrentTime->getTextSize( iTimeWidth, iTimeHeight );

iTimeWidth += XRES ( SEPERATOR_WIDTH*2 + 1 ); // +timer icon
iTimeWidth += XRES_HD ( SEPERATOR_WIDTH*2 + 1 ); // +timer icon
iTimeWidth += ( SEPERATOR_WIDTH-(iTimeWidth%SEPERATOR_WIDTH) );

if( iTimeWidth > iTextWidth )
iTextWidth = iTimeWidth;

int xPos = ScreenWidth - ( iTextWidth + XRES ( SEPERATOR_WIDTH + offset ) );
int xPos = ScreenWidth - ( iTextWidth + XRES_HD ( SEPERATOR_WIDTH + offset ) );

m_ExtraInfo->setBounds( xPos, YRES( SEPERATOR_HEIGHT ), iTextWidth, iTextHeight );
m_ExtraInfo->setBounds( xPos, YRES_HD( SEPERATOR_HEIGHT ), iTextWidth, iTextHeight );

m_TimerImage->setBounds( xPos, YRES( SEPERATOR_HEIGHT ) + iTextHeight , XRES(SEPERATOR_WIDTH*2 + 1), YRES(SEPERATOR_HEIGHT + 1) );
m_TimerImage->setBounds( xPos, YRES_HD( SEPERATOR_HEIGHT ) + iTextHeight , XRES_HD(SEPERATOR_WIDTH*2 + 1), YRES_HD(SEPERATOR_HEIGHT + 1) );

m_CurrentTime->setBounds( xPos + XRES ( SEPERATOR_WIDTH*2 + 1 ), YRES( SEPERATOR_HEIGHT ) + iTextHeight , iTimeWidth, iTimeHeight );
m_CurrentTime->setBounds( xPos + XRES_HD ( SEPERATOR_WIDTH*2 + 1 ), YRES_HD( SEPERATOR_HEIGHT ) + iTextHeight , iTimeWidth, iTimeHeight );

m_Separator->setPos( ScreenWidth - ( iTextWidth + XRES ( 2*SEPERATOR_WIDTH+SEPERATOR_WIDTH/2+offset ) ) , YRES( 5 ) );
m_Separator->setSize( XRES( 1 ), PANEL_HEIGHT - 10 );
m_Separator->setPos( ScreenWidth - ( iTextWidth + XRES_HD ( 2*SEPERATOR_WIDTH+SEPERATOR_WIDTH/2+offset ) ) , YRES_HD( 5 ) );
m_Separator->setSize( XRES_HD( 1 ), PANEL_HEIGHT - 10 );

for( j = 0; j < TEAM_NUMBER; j++ )
{
int iwidth, iheight;

m_TeamScores[j]->getTextSize( iwidth, iheight );
m_TeamScores[j]->setBounds( ScreenWidth - ( iTextWidth + XRES ( 2*SEPERATOR_WIDTH+2*SEPERATOR_WIDTH/2+offset ) + iwidth ), YRES( SEPERATOR_HEIGHT ) + ( iheight * j ), iwidth, iheight );
m_TeamScores[j]->setBounds( ScreenWidth - ( iTextWidth + XRES_HD ( 2*SEPERATOR_WIDTH+2*SEPERATOR_WIDTH/2+offset ) + iwidth ), YRES_HD( SEPERATOR_HEIGHT ) + ( iheight * j ), iwidth, iheight );
}
}
8 changes: 4 additions & 4 deletions cl_dll/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1496,10 +1496,10 @@ void V_CalcSpectatorRefdef( struct ref_params_s * pparams )
{
// second renderer cycle, inset window
// set inset parameters
pparams->viewport[0] = XRES( gHUD.m_Spectator.m_OverviewData.insetWindowX ); // change viewport to inset window
pparams->viewport[1] = YRES( gHUD.m_Spectator.m_OverviewData.insetWindowY );
pparams->viewport[2] = XRES( gHUD.m_Spectator.m_OverviewData.insetWindowWidth );
pparams->viewport[3] = YRES( gHUD.m_Spectator.m_OverviewData.insetWindowHeight );
pparams->viewport[0] = XRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowX ); // change viewport to inset window
pparams->viewport[1] = YRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowY );
pparams->viewport[2] = XRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowWidth );
pparams->viewport[3] = YRES_HD( gHUD.m_Spectator.m_OverviewData.insetWindowHeight );
pparams->nextView = 0; // on further view

// override some settings in certain modes
Expand Down

0 comments on commit 0ccf5b8

Please sign in to comment.