mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
always draw demo status bar with the lightest and darkest color available
Fixes visibility in Tetanus
This commit is contained in:
parent
f1799e90de
commit
e4add0d07a
@ -380,6 +380,16 @@ static char* ColorByHealth(int health, int maxhealth, boolean invul)
|
|||||||
return colrngs[CR_BLUE];
|
return colrngs[CR_BLUE];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lightest_color, darkest_color;
|
||||||
|
|
||||||
|
static void HU_InitDemoProgressBar (void)
|
||||||
|
{
|
||||||
|
byte *playpal = W_CacheLumpName("PLAYPAL", PU_STATIC);
|
||||||
|
|
||||||
|
lightest_color = I_GetPaletteIndex(playpal, 0xFF, 0xFF, 0xFF);
|
||||||
|
darkest_color = I_GetPaletteIndex(playpal, 0x00, 0x00, 0x00);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// HU_Init()
|
// HU_Init()
|
||||||
//
|
//
|
||||||
@ -481,6 +491,8 @@ void HU_Init(void)
|
|||||||
// [FG] support crosshair patches from extras.wad
|
// [FG] support crosshair patches from extras.wad
|
||||||
HU_InitCrosshair();
|
HU_InitCrosshair();
|
||||||
|
|
||||||
|
HU_InitDemoProgressBar();
|
||||||
|
|
||||||
HU_ParseHUD();
|
HU_ParseHUD();
|
||||||
|
|
||||||
// [Woof!] prepare player messages for colorization
|
// [Woof!] prepare player messages for colorization
|
||||||
@ -1340,8 +1352,8 @@ boolean HU_DemoProgressBar(boolean force)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawHorizLine(0, SCREENHEIGHT - 2, FG, progress, colormaps[0][0]); // [crispy] black
|
V_DrawHorizLine(0, SCREENHEIGHT - 2, FG, progress, darkest_color);
|
||||||
V_DrawHorizLine(0, SCREENHEIGHT - 1, FG, progress, colormaps[0][4]); // [crispy] white
|
V_DrawHorizLine(0, SCREENHEIGHT - 1, FG, progress, lightest_color);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user