Skip to content

Commit d5ae118

Browse files
committed
Btns: fix up alpha for half-life infected mod
1 parent e1c30e7 commit d5ae118

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Btns.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ void UI_LoadBmpButtons()
9292
dst_pos -= btn_sz;
9393
memcpy( &dst[dst_pos], &src[src_pos], btn_sz );
9494

95+
// fixup alpha for half-life infected mod
96+
if( bmp->GetBitmapHdr()->bitsPerPixel == 32 )
97+
{
98+
for( int j = dst_pos; j < dst_pos + btn_sz; j += 4 )
99+
dst[j+3] = 255;
100+
}
101+
95102
// fix misaligned gearbox btns
96103
memset( &dst[dst_pos], 0, stride );
97104

controls/PicButton.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ bool CMenuPicButton::KeyDown( int key )
216216
CMenuPicButton::DrawButton
217217
=================
218218
*/
219-
void CMenuPicButton::DrawButton(int r, int g, int b, int a, wrect_t *rects, int state)
219+
void CMenuPicButton::DrawButton( int r, int g, int b, int a, wrect_t *rects, int state )
220220
{
221221
EngFuncs::PIC_Set( hPic, r, g, b, a );
222222
#ifdef ALT_PICBUTTON_FOCUS_ANIM

0 commit comments

Comments
 (0)