Skip to content

Commit

Permalink
more widescreen hud icons
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveEyes committed Jun 25, 2024
1 parent 6e6239c commit 6889533
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions code/cgame/cg_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ static void CG_DrawPickupItem( void ) {
{
CG_RegisterItemVisuals( value );
cgi_R_SetColor( fadeColor );
CG_DrawPic( 573, 320, ICON_SIZE, ICON_SIZE, cg_items[ value ].icon );
CG_DrawPic( 573, 320, ICON_SIZE * cgs.widthRatioCoef, ICON_SIZE, cg_items[ value ].icon );
//CG_DrawBigString( ICON_SIZE + 16, 398, bg_itemlist[ value ].classname, fadeColor[0] );
//CG_DrawProportionalString( ICON_SIZE + 16, 398,
// bg_itemlist[ value ].classname, CG_SMALLFONT,fadeColor );
Expand Down Expand Up @@ -3212,7 +3212,7 @@ static void CG_DrawActivePowers(void)
int startx = icon_size*2+16;
int starty = SCREEN_HEIGHT - icon_size*2;

int endx = icon_size;
int endx = icon_size * cgs.widthRatioCoef;
int endy = icon_size;

if (cg.zoomMode)
Expand Down Expand Up @@ -3560,7 +3560,7 @@ static void CG_UseIcon()
if (cg_usingInFrontOf)
{
cgi_R_SetColor( NULL );
CG_DrawPic( 50, 285, 64, 64, cgs.media.useableHint );
CG_DrawPic( 50, 285, 64 * cgs.widthRatioCoef, 64, cgs.media.useableHint );
}
}

Expand Down
10 changes: 5 additions & 5 deletions codemp/cgame/cg_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2993,7 +2993,7 @@ static float CG_DrawEnemyInfo ( float y )
size = ICON_SIZE * 1.25;
y += 5;

CG_DrawPic( 640 - size - 12 + xOffset, y, size, size, cgs.media.weaponIcons[WP_SABER] );
CG_DrawPic( 640 - size - 12 + xOffset, y, size * cgs.widthRatioCoef, size, cgs.media.weaponIcons[WP_SABER] );

y += size;

Expand Down Expand Up @@ -3084,7 +3084,7 @@ static float CG_DrawEnemyInfo ( float y )

if ( ci->modelIcon )
{
CG_DrawPic( 640 - size - 5 + xOffset, y, size, size, ci->modelIcon );
CG_DrawPic( 640 - size - 5 + xOffset, y, size * cgs.widthRatioCoef, size, ci->modelIcon );
}

y += size;
Expand Down Expand Up @@ -4057,7 +4057,7 @@ static void CG_DrawPowerupIcons(int y)
icoShader = trap->R_RegisterShader( item->icon );
}

CG_DrawPic( (640-(ico_size*1.1)) + xOffset, y, ico_size, ico_size, icoShader );
CG_DrawPic( (640-(ico_size*1.1)) + xOffset, y, ico_size * cgs.widthRatioCoef, ico_size, icoShader );

y += ico_size;

Expand Down Expand Up @@ -5676,7 +5676,7 @@ static void CG_DrawHolocronIcons(void)
int startx = 10;
int starty = 10;//SCREEN_HEIGHT - icon_size*3;

int endx = icon_size;
int endx = icon_size * cgs.widthRatioCoef;
int endy = icon_size;

if (cg.snap->ps.zoomMode)
Expand Down Expand Up @@ -5731,7 +5731,7 @@ static void CG_DrawActivePowers(void)
int startx = icon_size*2+16;
int starty = SCREEN_HEIGHT - icon_size*2;

int endx = icon_size;
int endx = icon_size * cgs.widthRatioCoef;
int endy = icon_size;

if (cg.snap->ps.zoomMode)
Expand Down

0 comments on commit 6889533

Please sign in to comment.