Tweaks to level stats display in HUD.

This commit is contained in:
Mari the Deer 2023-07-29 12:25:53 +02:00
commit 7c9869052d
9 changed files with 151 additions and 45 deletions

View file

@ -79,6 +79,7 @@ server bool swwm_lobdoubled = false; // [LOB] Enable Double Death monster spawn
nosave int swwm_bardist = 2000; // distance at which healthbars will be visible (does not affect player bars)
nosave bool swwm_oldcheats = false; // has received the "old cheats" dialogue from Zanaveth
nosave bool swwm_ccmessage = false; // has received the "corruption cards" dialogue from Cytho
nosave bool swwm_percentstats = false; // show level stats as percentages, like in intermissions
// minimap settings
nosave bool swwm_mm_enable = true; // show a minimap below the score counter

View file

@ -975,7 +975,7 @@ SWWM_INTERTIP82 = "\"IF THE ZOO BANS ME FOR HOLLERING AT THE ANIMALS I WILL FACE
SWWM_INTERTIP83 = "This is truly some weird weapons mod for GZDoom.";
SWWM_INTERTIP84 = "\"In its vastness, the universe is no more than a mere grain of sand when compared to the limitless bounds of one's imagination.\"\n — Zanaveth Nekuraku III";
SWWM_INTERTIP85 = "You can shuffle the intermission art with Zoom, and these tips with Reload. Holding Altfire will hide the UI so you can see the art in full.";
SWWM_INTERTIP86 = "Add minced garlic, white pepper and basil to your tomato sauce, goes really well with pasta, you can thank me later.";
SWWM_INTERTIP86 = "Add cumin and sweet paprika to marinara sauce, it'll really enhance the flavor, you can thank me later.";
SWWM_INTERTIP87 = "This is a tip.";
SWWM_INTERTIP88 = "Some demons aren't actually evil. They'd rather just have a quiet life and enjoy a tasty hoagie every now and then.";
SWWM_INTERTIP89 = "Saya's design for the Demolitionist was inspired by Raidemin, the main character of a famous Nukuri anime.";

View file

@ -183,6 +183,7 @@ SWWM_DAMNUMS_COLOR = "Color Damage Numbers";
SWWM_SHOWMAPTITLE = "Animated Map Title";
SWWM_LOBDOUBLED = "LOB Double Death";
SWWM_BARDIST = "Healthbar Distance";
SWWM_PERCENTSTATS = "Percentual Stats";
SWWM_MM_ENABLE = "Show Minimap";
SWWM_MM_MISSILES = "Projectiles In Minimap";
SWWM_MM_COLORSET = "Minimap Color Set";
@ -273,6 +274,7 @@ TOOLTIP_SWWM_DAMNUMS_COLOR = "Damage numbers will change color based on the type
TOOLTIP_SWWM_SHOWMAPTITLE = "Shows an animated title card when entering a map. It's just like Dark Souls!";
TOOLTIP_SWWM_LOBDOUBLED = "[Legion of Bones] Enables \"Double Death\", which makes enemies first spawn as their vanilla variants to then turn undead on defeat.";
TOOLTIP_SWWM_BARDIST = "Distance in map units at which healthbar visibility will begin to fade. Does not affect the healthbars of other players.";
TOOLTIP_SWWM_PERCENTSTATS = "Shows kills/items/secrets in the HUD as percentages, rather than counters.";
TOOLTIP_SWWMACHIEVEMENTMENU = "View your achievements.";
TOOLTIP_SWWM_MM_ENABLE = "Displays a minimap on the top right corner of the screen.";
TOOLTIP_SWWM_MM_MISSILES = "Displays projectiles in the minimap. Can be toggled if this clutters too much.";

View file

@ -853,7 +853,7 @@ SWWM_INTERTIP82 = "\"SI EL ZOO ME PROHIBE LA ENTRADA POR GRITAR A LOS ANIMALES P
SWWM_INTERTIP83 = "Este es realmente un extraño mod de armas para GZDoom.";
SWWM_INTERTIP84 = "\"En su inmensidad, el universo no es más que un mero grano de arena cuando se compara a los límites ilimitados de nuestra imaginación.\" — Zanaveth Nekuraku III";
SWWM_INTERTIP85 = "Puedes alternar el arte de intermisión con Zoom, y estos consejos con Recarga. Mantener Fuego Secundario ocultará la interfaz para que puedas ver el arte al completo.";
SWWM_INTERTIP86 = "Mezcla ajo molido, pimienta blanca y albahaca con tu salsa de tomate, va ideal con pasta, puedes darme las gracias luego.";
SWWM_INTERTIP86 = "Añade comino y pimentón dulce a la salsa marinara, potenciará mucho el sabor, puedes darme las gracias luego.";
SWWM_INTERTIP87 = "Esto es un consejo.";
SWWM_INTERTIP88 = "Algunos demonios no son realmente malvados. Prefieren llevar una vida tranquila y disfrutar de un delicioso emparedado de vez en cuanto.";
SWWM_INTERTIP89 = "El diseño de Saya para la Demolicionista fue inspirado por Raidemin, el protagonista de un famoso anime Nukuri.";

View file

@ -180,6 +180,7 @@ SWWM_DAMNUMS_COLOR = "Colorear Números de Daño";
SWWM_SHOWMAPTITLE = "Título de Mapa Animado";
SWWM_LOBDOUBLED = "LOB Doble Muerte";
SWWM_BARDIST = "Distancia de Barras de Salud";
SWWM_PERCENTSTATS = "Estadísticas Percentuales";
SWWM_MM_ENABLE = "Mostrar Minimapa";
SWWM_MM_MISSILES = "Proyectiles en Minimapa";
SWWM_MM_COLORSET = "Set de Colores de Minimapa";
@ -271,6 +272,7 @@ TOOLTIP_SWWM_DAMNUMS_COLOR = "Los números de daño cambiarán color en base al
TOOLTIP_SWWM_SHOWMAPTITLE = "Muestra una animación de título al entrar en un mapa. ¡Es igualito que Dark Souls!";
TOOLTIP_SWWM_LOBDOUBLED = "[Legion of Bones] Habilita \"Doble Muerte\", lo cual hace que los enemigos aparezcan primero como sus variantes vanilla para luego volverse no-muertos al derrotarlos.";
TOOLTIP_SWWM_BARDIST = "Distancia en unidades de mapa a la cual la visibilidad de las barras de salud irá desvaneciendo. No afecta a las barras de salud de otros jugadores.";
TOOLTIP_SWWM_PERCENTSTATS = "Muestra las estadísticas de bajas/ítems/secretos en el HUD como porcentajes, en lugar de contadores.";
TOOLTIP_SWWMACHIEVEMENTMENU = "Revisa tus logros.";
TOOLTIP_SWWM_MM_ENABLE = "Muestra un minimapa en la esquina superior derecha de la pantalla.";
TOOLTIP_SWWM_MM_MISSILES = "Muestra proyectiles en el minimapa. Puede ser desactivado si causa problemas de visibilidad.";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r810 \cu(Sat 15 Jul 21:03:30 CEST 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r810 \cu(2023-07-15 21:03:30)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r811 \cu(Sat 29 Jul 15:01:17 CEST 2023)\c-";
SWWM_SHORTVER="\cw1.3pre r811 \cu(2023-07-29 15:01:17)\c-";

View file

@ -147,6 +147,7 @@ OptionMenu "SWWMOptionMenu"
Option "$SWWM_MENUPAUSE", "swwm_menupause", "YesNo"
Option "$SWWM_SKIPSKILL", "swwm_skipskill", "YesNo"
Option "$SWWM_FORCESTATS", "swwm_forcestats", "SWWMForceStats"
Option "$SWWM_PERCENTSTATS", "swwm_percentstats", "YesNo"
Option "$SWWM_UNIQSTATS", "swwm_uniqstats", "YesNo"
Slider "$SWWM_HUDMARGIN", "swwm_hudmargin", 0, 20, 1, 0
Option "$SWWM_HUDALLAMMO", "swwm_hudallammo", "YesNo"

View file

@ -168,20 +168,22 @@ Class SWWMStatusBar : BaseStatusBar
Array<KeyGet> keyflash;
int oldkills, olditems, oldsecrets;
int oldtkills, oldtitems, oldtsecrets;
int killflash, itemflash, secretflash;
int tkillflash, titemflash, tsecretflash;
int oldpkills, oldpitems, oldpsecrets;
transient int killflash, itemflash, secretflash;
transient int tkillflash, titemflash, tsecretflash;
transient int pkillflash, pitemflash, psecretflash;
// top stuff colors
int tclabel, tcvalue, tcextra, tccompl, tcsucks;
String tclabel_s, tcextra_s;
int AmmoFlash[18]; // flash when new ammo is received
transient int AmmoFlash[18]; // flash when new ammo is received
int AmmoOldAmounts[18]; // to detect when to flash
int AmmoMaxFlash[18]; // flash when ammo max amount changes
transient int AmmoMaxFlash[18]; // flash when ammo max amount changes
int AmmoOldMaxAmounts[18]; // to detect when to flash
Class<SWWMAmmo> AmmoSlots[18]; // ammo type on each slot
String AmmoNames[18]; // ammo 4-letter names
int HealthFlash; // flash when healing
transient int HealthFlash; // flash when healing
int LastHealth; // to detect when to flash
int LagHealth[10]; // for delayed decay bar

View file

@ -68,6 +68,27 @@ extend Class SWWMStatusBar
oldtsecrets = level.total_secrets;
tsecretflash = gametic+25;
}
if ( level.total_monsters > 0 )
{
int pkills = (level.killed_monsters*100)/level.total_monsters;
if ( pkills != oldpkills )
pkillflash = gametic+25;
oldpkills = pkills;
}
if ( level.total_items > 0 )
{
int pitems = (level.found_items*100)/level.total_items;
if ( pitems != oldpitems )
pitemflash = gametic+25;
oldpitems = pitems;
}
if ( level.total_secrets > 0 )
{
int psecrets = (level.found_secrets*100)/level.total_secrets;
if ( psecrets != oldpsecrets )
psecretflash = gametic+25;
oldpsecrets = psecrets;
}
// purge expired key flashes
for ( int i=0; i<keyflash.Size(); i++ )
{
@ -814,6 +835,7 @@ extend Class SWWMStatusBar
}
// draw stats and timer when automap is open
int fstats = swwm_forcestats;
bool pstats = swwm_percentstats;
if ( automapactive || (fstats > 0) )
{
xx = int(ss.x-(margin+2));
@ -828,65 +850,141 @@ extend Class SWWMStatusBar
int iof;
if ( ((iof = ln.RightIndexOf(" - by: ")) != -1) || ((iof = ln.RightIndexOf(" - by ")) != -1) || ((iof = ln.RightIndexOf(" - ")) != -1) )
ln.Truncate(iof);
if ( !label || ((level.clusterflags&level.CLUSTER_HUB) && (label == 2)) ) str = ln;
else str = String.Format("%s - %s",level.mapname.MakeUpper(),ln);
Screen.DrawText(mSmallFontOutline,tclabel,xx-mSmallFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( !label || ((level.clusterflags&level.CLUSTER_HUB) && (label == 2)) )
{
str = ln;
Screen.DrawText(mSmallFontOutline,tcvalue,xx-mSmallFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
else
{
str = level.mapname.MakeUpper()..": ";
int labelw = MiniHUDFontOutline.StringWidth(str);
int namew = mSmallFontOutline.StringWidth(ln);
Screen.DrawText(MiniHUDFontOutline,tclabel,xx-(labelw+namew),yy+4,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawText(mSmallFontOutline,tcvalue,xx-namew,yy,ln,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
yy += mSmallFontOutline.GetHeight()+4;
}
if ( (level.total_monsters > 0) && am_showmonsters && !deathmatch )
{
str = String.Format("\c"..tclabel_s.."K \c-%d\c"..tcextra_s.."/\c-%d",level.killed_monsters,level.total_monsters);
Screen.DrawText(MiniHUDFontOutline,(level.killed_monsters>=level.total_monsters)?tccompl:tcvalue,xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( killflash && (gametic < killflash) )
int pct = (level.killed_monsters*100)/level.total_monsters;
if ( pstats ) str = String.Format("\c"..tclabel_s.."K \c-%3d\c"..tcextra_s.."%%\c-",pct);
else str = String.Format("\c"..tclabel_s.."K \c-%d\c"..tcextra_s.."/\c-%d",level.killed_monsters,level.total_monsters);
int basew = MiniHUDFontOutline.StringWidth(str);
if ( pstats )
{
double alph = max((killflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d/%d",level.killed_monsters,level.total_monsters);
int slashpos = str.IndexOf("/");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(slashpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
int dcnt = 2-int(Log10(clamp(pct,1,999)));
for ( int j=0; j<dcnt; j++ )
Screen.DrawChar(MiniHUDFontOutline,(level.killed_monsters>=level.total_monsters)?tccompl:tcvalue,(xx-basew)+8+j*4,yy,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(160,0,0,0));
}
if ( tkillflash && (gametic < tkillflash) )
Screen.DrawText(MiniHUDFontOutline,(level.killed_monsters>=level.total_monsters)?tccompl:tcvalue,xx-basew,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( pstats )
{
double alph = max((tkillflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d",level.total_monsters);
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
if ( pkillflash && (gametic < pkillflash) )
{
double alph = max((pkillflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%3d%%",pct);
int pctpos = str.IndexOf("%");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(pctpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
}
else
{
if ( killflash && (gametic < killflash) )
{
double alph = max((killflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d/%d",level.killed_monsters,level.total_monsters);
int slashpos = str.IndexOf("/");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(slashpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
if ( tkillflash && (gametic < tkillflash) )
{
double alph = max((tkillflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d",level.total_monsters);
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
}
yy += MiniHUDFontOutline.GetHeight()+2;
}
if ( (level.total_items > 0) && am_showitems && !deathmatch )
{
str = String.Format("\c"..tclabel_s.."I \c-%d\c"..tcextra_s.."/\c-%d",level.found_items,level.total_items);
Screen.DrawText(MiniHUDFontOutline,(level.found_items>=level.total_items)?tccompl:tcvalue,xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( itemflash && (gametic < itemflash) )
int pct = (level.found_items*100)/level.total_items;
if ( pstats ) str = String.Format("\c"..tclabel_s.."I \c-%3d\c"..tcextra_s.."%%\c-",pct);
else str = String.Format("\c"..tclabel_s.."I \c-%d\c"..tcextra_s.."/\c-%d",level.found_items,level.total_items);
int basew = MiniHUDFontOutline.StringWidth(str);
if ( pstats )
{
double alph = max((itemflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d/%d",level.found_items,level.total_items);
int slashpos = str.IndexOf("/");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(slashpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
int dcnt = 2-int(Log10(clamp(pct,1,999)));
for ( int j=0; j<dcnt; j++ )
Screen.DrawChar(MiniHUDFontOutline,(level.found_items>=level.total_items)?tccompl:tcvalue,(xx-basew)+8+j*4,yy,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(160,0,0,0));
}
if ( titemflash && (gametic < titemflash) )
Screen.DrawText(MiniHUDFontOutline,(level.found_items>=level.total_items)?tccompl:tcvalue,xx-basew,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( pstats )
{
double alph = max((titemflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d",level.total_items);
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
if ( pitemflash && (gametic < pitemflash) )
{
double alph = max((pitemflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%3d%%",pct);
int pctpos = str.IndexOf("%");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(pctpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
}
else
{
if ( itemflash && (gametic < itemflash) )
{
double alph = max((itemflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d/%d",level.found_items,level.total_items);
int slashpos = str.IndexOf("/");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(slashpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
if ( titemflash && (gametic < titemflash) )
{
double alph = max((titemflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d",level.total_items);
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
}
yy += MiniHUDFontOutline.GetHeight()+2;
}
if ( (level.total_secrets > 0) && am_showsecrets && !deathmatch )
{
str = String.Format("\c"..tclabel_s.."S \c-%d\c"..tcextra_s.."/\c-%d",level.found_secrets,level.total_secrets);
Screen.DrawText(MiniHUDFontOutline,(level.found_secrets>=level.total_secrets)?tccompl:tcvalue,xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( secretflash && (gametic < secretflash) )
int pct = (level.found_secrets*100)/level.total_secrets;
if ( pstats ) str = String.Format("\c"..tclabel_s.."S \c-%3d\c"..tcextra_s.."%%\c-",pct);
else str = String.Format("\c"..tclabel_s.."S \c-%d\c"..tcextra_s.."/\c-%d",level.found_secrets,level.total_secrets);
int basew = MiniHUDFontOutline.StringWidth(str);
if ( pstats )
{
double alph = max((secretflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d/%d",level.found_secrets,level.total_secrets);
int slashpos = str.IndexOf("/");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(slashpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
int dcnt = 2-int(Log10(clamp(pct,1,999)));
for ( int j=0; j<dcnt; j++ )
Screen.DrawChar(MiniHUDFontOutline,(level.found_secrets>=level.total_secrets)?tccompl:tcvalue,(xx-basew)+8+j*4,yy,0x30,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(160,0,0,0));
}
if ( tsecretflash && (gametic < tsecretflash) )
Screen.DrawText(MiniHUDFontOutline,(level.found_secrets>=level.total_secrets)?tccompl:tcvalue,xx-basew,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( pstats )
{
double alph = max((tsecretflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d",level.total_secrets);
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
if ( psecretflash && (gametic < psecretflash) )
{
double alph = max((psecretflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%3d%%",pct);
int pctpos = str.IndexOf("%");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(pctpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
}
else
{
if ( secretflash && (gametic < secretflash) )
{
double alph = max((secretflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d/%d",level.found_secrets,level.total_secrets);
int slashpos = str.IndexOf("/");
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str.Left(slashpos),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
if ( tsecretflash && (gametic < tsecretflash) )
{
double alph = max((tsecretflash-(gametic+FracTic))/25.,0.)**1.5;
str = String.Format("%d",level.total_secrets);
Screen.DrawText(MiniHUDFontOutline,mhudfontcol[MCR_FLASH],xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph);
}
}
yy += MiniHUDFontOutline.GetHeight()+2;
}