diff --git a/cvarinfo.base b/cvarinfo.base index cde225c28..8ce712da7 100644 --- a/cvarinfo.base +++ b/cvarinfo.base @@ -42,12 +42,12 @@ nosave int swwm_maxtargetdist = 2000; // maximum distance for target healthbars nosave int swwm_maxtargets = 40; // maximum targeter healthbars to display (0 = unlimited) nosave int swwm_maxscorenums = 0; // maximum score numbers to display (0 = unlimited) nosave int swwm_maxdamnums = 0; // maximum damage/healing numbers to display (0 = unlimited) -nosave int swwm_hudscale = 0; // HUD scaling (0 = use GZDoom scaling) -nosave int swwm_barscale = 2; // target healthbar scaling (0 = use GZDoom scaling) -nosave int swwm_scrscale = 2; // score scaling (0 = use GZDoom scaling) -nosave int swwm_numscale = 3; // damnum scaling (0 = use GZDoom scaling) -nosave int swwm_poiscale = 1; // point of interest scaling (0 = use GZDoom scaling) -nosave int swwm_detscale = 2; // item sense scaling (0 = use GZDoom scaling) +nosave bool swwm_hudscale = false; // HUD scaling (false = tight scaling, true = loose scaling) +nosave int swwm_barscalerel = -1; // target healthbar scaling (relative) +nosave int swwm_numscalerel = 0; // damnum scaling (relative) +nosave int swwm_scrscalerel = -1; // score scaling (relative) +nosave int swwm_poiscalerel = -2; // point of interest scaling (relative) +nosave int swwm_detscalerel = -1; // item sense scaling (relative) server bool swwm_blood = true; // custom blood/gibbing server int swwm_maxblood = 200; // max blood effects at any time server int swwm_maxgibs = 100; // max gibs at any time diff --git a/language.def_menu b/language.def_menu index ae5511816..13567ad46 100644 --- a/language.def_menu +++ b/language.def_menu @@ -91,7 +91,8 @@ SWWM_NUMSCALE = "Number Scaling"; SWWM_SCRSCALE = "Score Scaling"; SWWM_POISCALE = "POI Scaling"; SWWM_DETSCALE = "Item Sense Scaling"; -SWWM_GZSCALE = "Use GZDoom Setting"; +SWWM_TFITSCALE = "Tight Fit"; +SWWM_LFITSCALE = "Loose Fit"; SWWM_BLOOD = "Enable Custom Blood"; SWWM_FUZZ = "Enable Animated Menu BG"; SWWM_BUSTERPAUSE = "Pause on Wallbuster Reload"; @@ -297,12 +298,12 @@ TOOLTIP_SWWM_MAXTARGETDIST = "Limit the farthest distance at which healthbars fo TOOLTIP_SWWM_MAXTARGETS = "Limit the amount of healthbars to display on-screen. Helps keep the screen less cluttered."; TOOLTIP_SWWM_MAXDAMNUMS = "Limit the amount of damage/healing numbers to display on-screen. Helps keep the screen less cluttered."; TOOLTIP_SWWM_MAXSCORENUMS = "Limit the amount of score numbers to display on-screen. Helps keep the screen less cluttered."; -TOOLTIP_SWWM_HUDSCALE = "Scaling factor of the HUD. Set to 0 to use GZDoom's own HUD scaling."; -TOOLTIP_SWWM_BARSCALE = "Scaling factor for targetter healthbars. Set to 0 to use GZDoom's own HUD scaling."; -TOOLTIP_SWWM_NUMSCALE = "Scaling factor for damage/healing numbers. Set to 0 to use GZDoom's own HUD scaling."; -TOOLTIP_SWWM_SCRSCALE = "Scaling factor for score numbers. Set to 0 to use GZDoom's own HUD scaling."; -TOOLTIP_SWWM_POISCALE = "Scaling factor for points of interest. Set to 0 to use GZDoom's own HUD scaling."; -TOOLTIP_SWWM_DETSCALE = "Scaling factor for sensed items. Set to 0 to use GZDoom's own HUD scaling."; +TOOLTIP_SWWM_HUDSCALE = "Scaling factor of the HUD. \"Tight\" scales to fit the width of the full HUD, while \"Loose\" is recommended for ultrawide to avoid overlaps."; +TOOLTIP_SWWM_BARSCALEREL = "Relative scaling factor for targetter healthbars. A factor of 0 matches the HUD scale."; +TOOLTIP_SWWM_NUMSCALEREL = "Relative scaling factor for damage/healing numbers. A factor of 0 matches the HUD scale."; +TOOLTIP_SWWM_SCRSCALEREL = "Relative scaling factor for score numbers. A factor of 0 matches the HUD scale."; +TOOLTIP_SWWM_POISCALEREL = "Relative scaling factor for points of interest. A factor of 0 matches the HUD scale."; +TOOLTIP_SWWM_DETSCALEREL = "Relative scaling factor for sensed items. A factor of 0 matches the HUD scale."; TOOLTIP_SWWM_BLOOD = "Enable custom blood and gore effects, adapted from Soundless Mound. I'd honestly recommend Nashgore instead, it's better."; TOOLTIP_SWWM_FUZZ = "Toggling this off is recommended if you're recording/streaming as this effect can harm video quality."; TOOLTIP_SWWM_CBTPAUSE = "The game will pause while the Wallbuster reload menu is open (only in singleplayer)."; diff --git a/language.es_menu b/language.es_menu index a6d81800e..1d6b000d3 100644 --- a/language.es_menu +++ b/language.es_menu @@ -91,7 +91,8 @@ SWWM_NUMSCALE = "Escala de Números"; SWWM_SCRSCALE = "Escala de Puntuaciones"; SWWM_POISCALE = "Escala de Puntos de Interés"; SWWM_DETSCALE = "Escala de Sensor de Ítems"; -SWWM_GZSCALE = "Usar Opción de GZDoom"; +SWWM_TFITSCALE = "Escalado Ajustado"; +SWWM_LFITSCALE = "Escalado Holgado"; SWWM_BLOOD = "Habilitar Sangre Personalizada"; SWWM_FUZZ = "Habilitar Fondo Animado de Menú"; SWWM_BUSTERPAUSE = "Pausar en Recarga de Wallbuster"; @@ -296,12 +297,12 @@ TOOLTIP_SWWM_MAXTARGETDIST = "Limita la distancia máxima a la que se muestran l TOOLTIP_SWWM_MAXTARGETS = "Limita la cantidad de barras de salud a mostrar en pantalla. Ayuda a mantener la pantalla más despejada."; TOOLTIP_SWWM_MAXDAMNUMS = "Limita la cantidad de números de daño/curación a mostrar en pantalla. Ayuda a mantener la pantalla más despejada."; TOOLTIP_SWWM_MAXSCORENUMS = "Limita la cantidad de números de puntuación a mostrar en pantalla. Ayuda a mantener la pantalla más despejada."; -TOOLTIP_SWWM_HUDSCALE = "Factor de escalado del HUD. Pon a 0 para usar el escalado de HUD de GZDoom."; -TOOLTIP_SWWM_BARSCALE = "Factor de escalado para las barras de salud. Pon a 0 para usar el escalado de HUD de GZDoom."; -TOOLTIP_SWWM_NUMSCALE = "Factor de escalado para los números de daño/salud. Pon a 0 para usar el escalado de HUD de GZDoom."; -TOOLTIP_SWWM_SCRSCALE = "Factor de escalado para los números de puntuación. Pon a 0 para usar el escalado de HUD de GZDoom."; -TOOLTIP_SWWM_POISCALE = "Factor de escalado para los puntos de interés. Pon a 0 para usar el escalado de HUD de GZDoom."; -TOOLTIP_SWWM_DETSCALE = "Factor de escalado para los ítems detectados. Pon a 0 para usar el escalado de HUD de GZDoom."; +TOOLTIP_SWWM_HUDSCALE = "Factor de escalado del HUD. El escalado \"Ajustado\" intenta que quepa todo el HUD en el ancho de la pantalla, mientras que el \"Holgado\" está recomendado para pantallas ultrawide."; +TOOLTIP_SWWM_BARSCALEREL = "Factor de escalado relativo para las barras de salud. Un factor de 0 es igual al escalado del HUD."; +TOOLTIP_SWWM_NUMSCALEREL = "Factor de escalado relativo para los números de daño/salud. Un factor de 0 es igual al escalado del HUD."; +TOOLTIP_SWWM_SCRSCALEREL = "Factor de escalado relativo para los números de puntuación. Un factor de 0 es igual al escalado del HUD."; +TOOLTIP_SWWM_POISCALEREL = "Factor de escalado relativo para los puntos de interés. Un factor de 0 es igual al escalado del HUD."; +TOOLTIP_SWWM_DETSCALEREL = "Factor de escalado relativo para los ítems detectados. Un factor de 0 es igual al escalado del HUD."; TOOLTIP_SWWM_BLOOD = "Activa efectos de sangre y vísceras personalizados, adaptados de Soundless Mound. Sinceramente, recomendaría usar Nashgore, es mejor."; TOOLTIP_SWWM_FUZZ = "Desactivar esto es recomendado si estás grabando o haciendo streaming, ya que este effecto puede dañar la calidad del vídeo."; TOOLTIP_SWWM_CBTPAUSE = "El juego será pausado mientras el menú de recarga de Wallbuster está abierto (sólo en modo de un jugador)."; diff --git a/language.version b/language.version index ad6cbcd7a..36e99ab64 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r89 \cu(Sat 18 Dec 00:50:11 CET 2021)\c-"; -SWWM_SHORTVER="\cw1.2pre r89 \cu(2021-12-18 00:50:11)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r91 \cu(Sat 18 Dec 02:07:11 CET 2021)\c-"; +SWWM_SHORTVER="\cw1.2pre r91 \cu(2021-12-18 02:07:11)\c-"; diff --git a/menudef.txt b/menudef.txt index d9ae97b87..49df583c6 100644 --- a/menudef.txt +++ b/menudef.txt @@ -73,6 +73,11 @@ OptionValue "SWWMPistolStart" 1, "$SWWM_PISTOLSTART_MAP" 2, "$SWWM_PISTOLSTART_CLUSTER" } +OptionValue "SWWMHUDScale" +{ + 0, "$SWWM_TFITSCALE" + 1, "$SWWM_LFITSCALE" +} OptionMenu "SWWMOptionMenu" { Class "SWWMOptionMenu" @@ -132,15 +137,15 @@ OptionMenu "SWWMOptionMenu" ScaleSlider "$SWWM_MAXTARGETS", "swwm_maxtargets", 0, 1000, 1, "$SWWM_UNLIMITED" ScaleSlider "$SWWM_MAXDAMNUMS", "swwm_maxdamnums", 0, 1000, 1, "$SWWM_UNLIMITED" ScaleSlider "$SWWM_MAXSCORENUMS", "swwm_maxscorenums", 0, 1000, 1, "$SWWM_UNLIMITED" - ScaleSlider "$SWWM_HUDSCALE", "swwm_hudscale", 0, 8, 1, "$SWWM_GZSCALE" - ScaleSlider "$SWWM_BARSCALE", "swwm_barscale", 0, 8, 1, "$SWWM_GZSCALE" - ScaleSlider "$SWWM_NUMSCALE", "swwm_numscale", 0, 8, 1, "$SWWM_GZSCALE" - ScaleSlider "$SWWM_SCRSCALE", "swwm_scrscale", 0, 8, 1, "$SWWM_GZSCALE" + Option "$SWWM_HUDSCALE", "swwm_hudscale", "SWWMHudScale" + Slider "$SWWM_BARSCALE", "swwm_barscalerel", -4, 4, 1, 0 + Slider "$SWWM_NUMSCALE", "swwm_numscalerel", -4, 4, 1, 0 + Slider "$SWWM_SCRSCALE", "swwm_scrscalerel", -4, 4, 1, 0 IfGame(Doom, Heretic) { - ScaleSlider "$SWWM_POISCALE", "swwm_poiscale", 0, 8, 1, "$SWWM_GZSCALE" + Slider "$SWWM_POISCALE", "swwm_poiscalerel", -4, 4, 1, 0 } - ScaleSlider "$SWWM_DETSCALE", "swwm_detscale", 0, 8, 1, "$SWWM_GZSCALE" + Slider "$SWWM_DETSCALE", "swwm_detscalerel", -4, 4, 1, 0 Option "$SWWM_NUMCOLOR_SCR", "swwm_numcolor_scr", "TextColors" Option "$SWWM_NUMCOLOR_BONUS", "swwm_numcolor_bonus", "TextColors" Option "$SWWM_NUMCOLOR_DMG", "swwm_numcolor_dmg", "TextColors" diff --git a/zscript/hud/swwm_hud.zsc b/zscript/hud/swwm_hud.zsc index f6c7587ec..4d3c96ef0 100644 --- a/zscript/hud/swwm_hud.zsc +++ b/zscript/hud/swwm_hud.zsc @@ -24,12 +24,18 @@ Class SWWMStatusBar : BaseStatusBar SWWMHandler hnd; // shared stuff - Vector2 ss, hs; - Vector2 ssb, hsb; - Vector2 ssn, hsn; - Vector2 sss, hss; - Vector2 ssi, hsi; - Vector2 ssd, hsd; + double hs; + double hsb; + double hsn; + double hss; + double hsi; + double hsd; + Vector2 ss; + Vector2 ssb; + Vector2 ssn; + Vector2 sss; + Vector2 ssi; + Vector2 ssd; int margin; double FracTic; double FrameTime; @@ -1105,16 +1111,6 @@ Class SWWMStatusBar : BaseStatusBar override void Init() { Super.Init(); - // scaling is set to 640 pixels wide minimum - // and height set so it fits up to ultrawide (2.370:1 ~ 2.4:1) - // ultrawide is honestly an abomination, - // and these numbers should be proof enough of it - // none of the commercially available "21:9" screens even have - // that actual ratio in the first place, what the fuck man - // they dangle anywhere between 12:4, 43:18 and 64:27 - // fuck ultrawide, seriously - // get a 16:10 screen instead, it's the best aspect ratio - SetSize(0,640,266); StatusTex = TexMan.CheckForTexture("graphics/HUD/StatusBox.png",TexMan.Type_Any); DashTex = TexMan.CheckForTexture("graphics/HUD/DashBar.png",TexMan.Type_Any); FuelTex[0] = TexMan.CheckForTexture("graphics/HUD/FuelBar.png",TexMan.Type_Any); @@ -1219,9 +1215,9 @@ Class SWWMStatusBar : BaseStatusBar else tag = String.Format("\cy%s\c-",StringTable.Localize("$SWWM_NEXIT")); } } - Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsi.x*smallfont2.StringWidth(tag)/2.)/hsi.x,(vpos.y-hsi.y*smallfont2.GetHeight()/2.)/hsi.y,tag,DTA_VirtualWidthF,ssi.x,DTA_VirtualHeightF,ssi.y,DTA_KeepRatio,true,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsi*smallfont2.StringWidth(tag)/2.)/hsi,(vpos.y-hsi*smallfont2.GetHeight()/2.)/hsi,tag,DTA_VirtualWidthF,ssi.x,DTA_VirtualHeightF,ssi.y,DTA_KeepRatio,true,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); tag = String.Format("\cu(%s\cu)\c-",FormatDist(tdir.length())); - Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsi.x*smallfont2.StringWidth(tag)/2.)/hsi.x,(vpos.y+hsi.y*smallfont2.GetHeight()/2.)/hsi.y,tag,DTA_VirtualWidthF,ssi.x,DTA_VirtualHeightF,ssi.y,DTA_KeepRatio,true,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsi*smallfont2.StringWidth(tag)/2.)/hsi,(vpos.y+hsi*smallfont2.GetHeight()/2.)/hsi,tag,DTA_VirtualWidthF,ssi.x,DTA_VirtualHeightF,ssi.y,DTA_KeepRatio,true,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } } // sensed items @@ -1240,13 +1236,13 @@ Class SWWMStatusBar : BaseStatusBar double alph = clamp(((s.updated+mtime)-(level.maptime+fractic))/35.,0.,1.); alph *= clamp(1.5-1.5*(tdir.length()/(thesight?1200.:800.)),0.,1.); tag = s.tag; - Screen.DrawText(smallfont2,s.vipitem?Font.CR_PURPLE:s.scoreitem?Font.CR_GOLD:Font.CR_GREEN,(vpos.x-hsd.x*smallfont2.StringWidth(tag)/2.)/hsd.x,(vpos.y-hsd.y*smallfont2.GetHeight()/2.)/hsd.y,tag,DTA_VirtualWidthF,ssd.x,DTA_VirtualHeightF,ssd.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(smallfont2,s.vipitem?Font.CR_PURPLE:s.scoreitem?Font.CR_GOLD:Font.CR_GREEN,(vpos.x-hsd*smallfont2.StringWidth(tag)/2.)/hsd,(vpos.y-hsd*smallfont2.GetHeight()/2.)/hsd,tag,DTA_VirtualWidthF,ssd.x,DTA_VirtualHeightF,ssd.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); tag = String.Format("\cu(%s\cu)\c-",FormatDist(tdir.length())); - Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsd.x*smallfont2.StringWidth(tag)/2.)/hsd.x,(vpos.y+hsd.y*smallfont2.GetHeight()/2.)/hsd.y,tag,DTA_VirtualWidthF,ssd.x,DTA_VirtualHeightF,ssd.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsd*smallfont2.StringWidth(tag)/2.)/hsd,(vpos.y+hsd*smallfont2.GetHeight()/2.)/hsd,tag,DTA_VirtualWidthF,ssd.x,DTA_VirtualHeightF,ssd.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); if ( s.item is 'SWWMRespawnTimer' ) { tag = String.Format(StringTable.Localize("$SWWM_TRESPAWN"),s.item.special2/GameTicRate); - Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsd.x*smallfont2.StringWidth(tag)/2.)/hsd.x,(vpos.y+hsd.y*smallfont2.GetHeight()*2)/hsd.y,tag,DTA_VirtualWidthF,ssd.x,DTA_VirtualHeightF,ssd.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(smallfont2,Font.CR_WHITE,(vpos.x-hsd*smallfont2.StringWidth(tag)/2.)/hsd,(vpos.y+hsd*smallfont2.GetHeight()*2)/hsd,tag,DTA_VirtualWidthF,ssd.x,DTA_VirtualHeightF,ssd.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } } } @@ -1277,8 +1273,8 @@ Class SWWMStatusBar : BaseStatusBar if ( thesight && (targ.lasthealth > 0) ) mtime += 105; double alph = clamp(((targ.updated+mtime)-(level.maptime+fractic))/35.,0.,1.); Vector2 barsiz = TexMan.GetScaledSize(EnemyBTex); - barsiz.x *= hsb.x; - barsiz.y *= hsb.y; + barsiz.x *= hsb; + barsiz.y *= hsb; Vector2 barpos = vpos-(barsiz/2.); barpos.y -= 16.; Font fnt = swwm_bigtags?smallfont:smallfont2; @@ -1290,37 +1286,37 @@ Class SWWMStatusBar : BaseStatusBar if ( col == -1 ) col = Font.CR_WHITE; } if ( swwm_targettags || targ.myplayer && (tag != "") ) - Screen.DrawText(fnt,col,(barpos.x+barsiz.x/2.-(fnt.StringWidth(tag)*hsb.x)/2.)/hsb.x,(barpos.y-fnt.GetHeight()*hsb.y)/hsb.y,tag,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); - Screen.DrawTexture(EnemyBTex,false,barpos.x/hsb.x,barpos.y/hsb.y,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(fnt,col,(barpos.x+barsiz.x/2.-(fnt.StringWidth(tag)*hsb)/2.)/hsb,(barpos.y-fnt.GetHeight()*hsb)/hsb,tag,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(EnemyBTex,false,barpos.x/hsb,barpos.y/hsb,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); double ht = clamp(targ.intp.GetValue(),0,targ.maxhealth*100); double hw = (min(ht,targ.maxhealth)*50.)/targ.maxhealth; if ( targ.mytarget && (targ.mytarget.bInvulnerable || (targ.myplayer && (targ.myplayer.cheats&(CF_GODMODE|CF_GODMODE2))) || targ.mytarget.FindInventory("InvinciballPower")) ) { - Screen.DrawTexture(EnemyHTex[4],false,(barpos.x+2*hsb.x)/hsb.x,(barpos.y+2*hsb.y)/hsb.y,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(EnemyHTex[4],false,(barpos.x+2*hsb)/hsb,(barpos.y+2*hsb)/hsb,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } else { - Screen.DrawTexture(EnemyHTex[0],false,(barpos.x+2*hsb.x)/hsb.x,(barpos.y+2*hsb.y)/hsb.y,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(EnemyHTex[0],false,(barpos.x+2*hsb)/hsb,(barpos.y+2*hsb)/hsb,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); if ( ht > targ.maxhealth ) { hw = (min(ht-targ.maxhealth,targ.maxhealth)*50.)/targ.maxhealth; - Screen.DrawTexture(EnemyHTex[1],false,(barpos.x+2*hsb.x)/hsb.x,(barpos.y+2*hsb.y)/hsb.y,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(EnemyHTex[1],false,(barpos.x+2*hsb)/hsb,(barpos.y+2*hsb)/hsb,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } if ( ht > targ.maxhealth*2 ) { hw = (min(ht-targ.maxhealth*2,targ.maxhealth*3)*50.)/(targ.maxhealth*3); - Screen.DrawTexture(EnemyHTex[2],false,(barpos.x+2*hsb.x)/hsb.x,(barpos.y+2*hsb.y)/hsb.y,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(EnemyHTex[2],false,(barpos.x+2*hsb)/hsb,(barpos.y+2*hsb)/hsb,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } if ( ht > targ.maxhealth*5 ) { hw = (min(ht-targ.maxhealth*5,targ.maxhealth*5)*50.)/(targ.maxhealth*5); - Screen.DrawTexture(EnemyHTex[3],false,(barpos.x+2*hsb.x)/hsb.x,(barpos.y+2*hsb.y)/hsb.y,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(EnemyHTex[3],false,(barpos.x+2*hsb)/hsb,(barpos.y+2*hsb)/hsb,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_WindowRightF,hw,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } } if ( targ.mytarget && targ.mytarget.FindInventory("DivineSpriteEffect") ) { double falph = clamp((ht-targ.maxhealth*10)/(targ.maxhealth*60.),0.,1.); - Screen.DrawTexture(EnemyHTex[5],false,(barpos.x+2*hsb.x)/hsb.x,(barpos.y+2*hsb.y)/hsb.y,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph*falph,DTA_LegacyRenderStyle,STYLE_Add,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(EnemyHTex[5],false,(barpos.x+2*hsb)/hsb,(barpos.y+2*hsb)/hsb,DTA_VirtualWidthF,ssb.x,DTA_VirtualHeightF,ssb.y,DTA_KeepRatio,true,DTA_Alpha,alph*falph,DTA_LegacyRenderStyle,STYLE_Add,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } } // floating kill scores and others @@ -1360,9 +1356,9 @@ Class SWWMStatusBar : BaseStatusBar fo.y = snum.initialspan-(snum.lifespan-fractic); isscore = true; } - Vector2 hs0 = isscore?hss:hsn; + double hs0 = isscore?hss:hsn; Vector2 ss0 = isscore?sss:ssn; - Screen.DrawText(smallfont2,snum.tcolor,(vpos.x-hs0.x*(fo.x+smallfont2.StringWidth(tag)/2.))/hs0.x,(vpos.y-hs0.y*(fo.y+(smallfont2.GetHeight()/2.)))/hs0.y,tag,DTA_VirtualWidthF,ss0.x,DTA_VirtualHeightF,ss0.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(smallfont2,snum.tcolor,(vpos.x-hs0*(fo.x+smallfont2.StringWidth(tag)/2.))/hs0,(vpos.y-hs0*(fo.y+(smallfont2.GetHeight()/2.)))/hs0,tag,DTA_VirtualWidthF,ss0.x,DTA_VirtualHeightF,ss0.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); // extra strings (if available) if ( !swwm_scorebonus ) continue; fo.y += smallfont2.GetHeight(); @@ -1371,7 +1367,7 @@ Class SWWMStatusBar : BaseStatusBar tag = snum.xstr[i]; if ( snum.xscore[i] == int.max ) tag.AppendFormat(" MAX"); else if ( snum.xscore[i] > 0 ) tag.AppendFormat(" x%d",snum.xscore[i]); - Screen.DrawText(smallfont2,snum.xtcolor[i],(vpos.x-hss.x*(fo.x+smallfont2.StringWidth(tag)/2.))/hss.x,(vpos.y-hss.y*(fo.y+(smallfont2.GetHeight()/2.)))/hss.y,tag,DTA_VirtualWidthF,sss.x,DTA_VirtualHeightF,sss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawText(smallfont2,snum.xtcolor[i],(vpos.x-hss*(fo.x+smallfont2.StringWidth(tag)/2.))/hss,(vpos.y-hss*(fo.y+(smallfont2.GetHeight()/2.)))/hss,tag,DTA_VirtualWidthF,sss.x,DTA_VirtualHeightF,sss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); fo.y += smallfont2.GetHeight(); } } @@ -1692,13 +1688,13 @@ Class SWWMStatusBar : BaseStatusBar [visible, rv1, rv2] = SWWMUtility.LiangBarsky((-1,-1)*zoomclip,(1,1)*zoomclip,rv1,rv2); if ( !visible ) continue; // scale to minimap frame - rv1 *= (HALFMAPSIZE/zoomclip)*hs.x; - rv2 *= (HALFMAPSIZE/zoomclip)*hs.x; + rv1 *= (HALFMAPSIZE/zoomclip)*hs; + rv2 *= (HALFMAPSIZE/zoomclip)*hs; // offset to minimap center rv1 += basepos; rv2 += basepos; // draw the line - Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs.x*.25),mm_gridcolor); + Screen.DrawThickLine(int(rv1.x),int(rv1.y),int(rv2.x),int(rv2.y),max(1.,hs*.25),mm_gridcolor); } for ( int i=0; i 0.) ) yy -= int(25*clamp(hnd.bossalpha*2.,0.,1.)); int len = smallfont.StringWidth(ntagstr); double xx = (ss.x-len)/2.; - Screen.Dim("Black",.8*nalph,int((xx-6)*hs.x),int(yy*hs.y),int((len+12)*hs.x),int((h+4)*hs.y)); + Screen.Dim("Black",.8*nalph,int((xx-6)*hs),int(yy*hs),int((len+12)*hs),int((h+4)*hs)); Screen.DrawText(smallfont,ntagcol,int(xx),yy+2,ntagstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,nalph); } if ( PickupQueue.Size() <= 0 ) return; @@ -2488,7 +2484,7 @@ Class SWWMStatusBar : BaseStatusBar if ( len > maxlen ) maxlen = len; } double xx = (ss.x-maxlen)/2.; - Screen.Dim("Black",.8*alph,int((xx-6)*hs.x),int((yy-h*(l.Count()-1))*hs.y),int((maxlen+12)*hs.x),int((h*l.Count()+4)*hs.y)); + Screen.Dim("Black",.8*alph,int((xx-6)*hs),int((yy-h*(l.Count()-1))*hs),int((maxlen+12)*hs),int((h*l.Count()+4)*hs)); for ( int j=l.Count()-1; j>=0; j-- ) { int len = smallfont.StringWidth(l.StringAt(j)); @@ -2518,7 +2514,7 @@ Class SWWMStatusBar : BaseStatusBar xx = int((ss.x*ssp-maxlen)/2.); yy = ss.y*ssp*.375; yy -= (h*l.Count()+4)/2; // center - Screen.Dim("Black",.8*alph,int((xx-6)*hs.x*hsp),int(yy*hs.y*hsp),int((maxlen+12)*hs.x*hsp),int((h*l.Count()+4)*hs.y*hsp)); + Screen.Dim("Black",.8*alph,int((xx-6)*hs*hsp),int(yy*hs*hsp),int((maxlen+12)*hs*hsp),int((h*l.Count()+4)*hs*hsp)); for ( int i=0; i w ) w = lw; } int cw = int(ceil((max(max(w1,w2),w)+8)/6.))*6; - Screen.Dim("Black",.5*alpha,int((pos.x-(cw+4)/2)*hs.x),int((pos.y-(h+6))*hs.y),int((cw+4)*hs.x),int((8+h+4+smallfont.GetHeight()+8+smallfont2.GetHeight()*l.Count())*hs.y)); + Screen.Dim("Black",.5*alpha,int((pos.x-(cw+4)/2)*hs),int((pos.y-(h+6))*hs),int((cw+4)*hs),int((8+h+4+smallfont.GetHeight()+8+smallfont2.GetHeight()*l.Count())*hs)); Screen.DrawTexture(icon,false,pos.x,pos.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_CenterBottomOffset,true); pos.y += 4; Screen.DrawText(smallfont,Font.CR_FIRE,pos.x-w1/2,pos.y,wpn,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha); @@ -316,7 +313,8 @@ Class SWWMDirectMessage : HUDMessageBase int enddelay, pausedelay; int rss; int fadein, fadeout; - Vector2 ss, hs, origin; + double hs; + Vector2 ss, origin; SWWMDirectMessage nextmsg; // for chaining messages together from different characters bool nextdirect; // skips directly to next message without delays or fades @@ -534,10 +532,10 @@ Class SWWMDirectMessage : HUDMessageBase double fractic = SWWMStatusBar(statusbar)?SWWMStatusBar(statusbar).fractic:0; if ( seqnum == 0 ) alph = (fadein+fractic)/15.; else if ( seqnum == (seqcnt+1) ) alph = 1.-(fadeout+fractic)/30.; - if ( swwm_hudscale <= 0 ) hs = StatusBar.GetHUDScale(); - else hs.x = swwm_hudscale; - hs.y = hs.x; - ss = (Screen.GetWidth()/hs.x,Screen.GetHeight()/hs.y); + double hs; + if ( swwm_hudscale ) hs = CleanXFac_1; + else hs = max(floor(Screen.GetWidth()/640.),1.); + ss = (Screen.GetWidth()/hs,Screen.GetHeight()/hs); origin = (int(ss.x-270)/2,swwm_hudmargin+70); Screen.DrawTexture(MessageBox,false,origin.x,origin.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); if ( (seqnum < 1) || (seqnum > seqcnt) ) return; diff --git a/zscript/weapons/swwm_baseweapon.zsc b/zscript/weapons/swwm_baseweapon.zsc index 6d135e95f..695c6182f 100644 --- a/zscript/weapons/swwm_baseweapon.zsc +++ b/zscript/weapons/swwm_baseweapon.zsc @@ -260,7 +260,7 @@ Class SWWMWeapon : Weapon abstract return Super.GetObituary(victim,inflictor,mod,playerattack); } // draw ammo on hud above weapon box - virtual ui void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + virtual ui void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { } // animations diff --git a/zscript/weapons/swwm_blazeit.zsc b/zscript/weapons/swwm_blazeit.zsc index 8abcbca40..4b5e52766 100644 --- a/zscript/weapons/swwm_blazeit.zsc +++ b/zscript/weapons/swwm_blazeit.zsc @@ -126,11 +126,10 @@ Class Hellblazer : SWWMWeapon SWWMUtility.PrepareProjData(projdata,e.ViewPos,e.ViewAngle,e.ViewPitch,e.ViewRoll,players[consoleplayer].fov); int cliptop = projdata.viewy, clipbottom = projdata.viewy+projdata.viewh, clipleft = projdata.viewx, clipright = projdata.viewx+projdata.vieww; - Vector2 hs; - if ( swwm_hudscale <= 0 ) hs = StatusBar.GetHUDScale(); - else hs.x = swwm_hudscale; - hs.y = hs.x; - Vector2 ss = (Screen.GetWidth()/hs.x,Screen.GetHeight()/hs.y); + double hs; + if ( swwm_hudscale ) hs = CleanXFac_1; + else hs = max(floor(Screen.GetWidth()/640.),1.); + Vector2 ss = (Screen.GetWidth()/hs,Screen.GetHeight()/hs); for ( int i=0; i<3; i++ ) { if ( !seektarget[i] ) continue; @@ -138,11 +137,11 @@ Class Hellblazer : SWWMWeapon Vector3 ndc = SWWMUtility.ProjectPoint(projdata,e.viewpos+level.Vec3Diff(e.viewpos,tpos+(0,0,seektarget[i].Height/2))); if ( ndc.z > 1. ) continue; Vector2 vpos = SWWMUtility.NDCToViewport(projdata,ndc); - Screen.DrawTexture(LockIcon[curtype],false,vpos.x/hs.x,vpos.y/hs.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_CenterOffset,true,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); + Screen.DrawTexture(LockIcon[curtype],false,vpos.x/hs,vpos.y/hs,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_CenterOffset,true,DTA_ClipTop,cliptop,DTA_ClipBottom,clipbottom,DTA_ClipLeft,clipleft,DTA_ClipRight,clipright); } } - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { static const Class types[] = {"HellblazerMissiles","HellblazerCrackshots","HellblazerRavagers","HellblazerWarheads"}; if ( !WeaponBox ) diff --git a/zscript/weapons/swwm_cbt.zsc b/zscript/weapons/swwm_cbt.zsc index bbda2dd1a..79a909038 100644 --- a/zscript/weapons/swwm_cbt.zsc +++ b/zscript/weapons/swwm_cbt.zsc @@ -29,7 +29,7 @@ Class Wallbuster : SWWMWeapon if ( curobt is 'PurpleShell' ) return StringTable.Localize("$O_WALLBUSTER_PURPLE"); return Super.GetObituary(victim,inflictor,mod,playerattack); } - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { static const Class types[] = {"RedShell","GreenShell","BlueShell","PurpleShell"}; /* diff --git a/zscript/weapons/swwm_danmaku.zsc b/zscript/weapons/swwm_danmaku.zsc index 408779993..ada64ec1d 100644 --- a/zscript/weapons/swwm_danmaku.zsc +++ b/zscript/weapons/swwm_danmaku.zsc @@ -17,7 +17,7 @@ Class Eviscerator : SWWMWeapon transient ui TextureID WeaponBox, AmmoIcon; - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/EvisceratorDisplay.png",TexMan.Type_Any); if ( !AmmoIcon ) AmmoIcon = TexMan.CheckForTexture("graphics/HUD/EvisceratorShell.png",TexMan.Type_Any); diff --git a/zscript/weapons/swwm_deathlydeathcannon.zsc b/zscript/weapons/swwm_deathlydeathcannon.zsc index 51e07a5bb..eb6945c3b 100644 --- a/zscript/weapons/swwm_deathlydeathcannon.zsc +++ b/zscript/weapons/swwm_deathlydeathcannon.zsc @@ -27,7 +27,7 @@ Class Ynykron : SWWMWeapon Property ClipCount : clipcount; - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/YnykronDisplay.png",TexMan.Type_Any); if ( !ChargeBar[0] ) ChargeBar[0] = TexMan.CheckForTexture("graphics/HUD/YnykronBarA.png",TexMan.Type_Any); @@ -36,7 +36,7 @@ Class Ynykron : SWWMWeapon if ( !BoxSide[1] ) BoxSide[1] = TexMan.CheckForTexture("graphics/HUD/YnykronSideB.png",TexMan.Type_Any); Screen.DrawTexture(WeaponBox,false,bx-33,by-44,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); int chg = clamp(ChargeInter?ChargeInter.GetValue():int(chargelevel*10),0,400); - int ct = int(((by-2)-chg/10.)*hs.y); + int ct = int(((by-2)-chg/10.)*hs); Screen.DrawText(smallfont,Font.CR_FIRE,bx-30,by-15,String.Format("%d",Ammo1.Amount),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); Screen.DrawTexture(BoxSide[inverted],false,bx-23,by-31,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,clipcount?Color(0,0,0,0):Color(128,0,0,0)); Screen.DrawTexture(ChargeBar[inverted],false,bx-6,by-42,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(chargestate==CS_READY)?Color(int(clamp(sin((level.maptime+TicFrac)*8)*40+24,0.,64.)),255,255,255):Color(0,0,0,0),DTA_ClipTop,ct); diff --git a/zscript/weapons/swwm_deepdarkimpact.zsc b/zscript/weapons/swwm_deepdarkimpact.zsc index 2e2289170..4ce8720d0 100644 --- a/zscript/weapons/swwm_deepdarkimpact.zsc +++ b/zscript/weapons/swwm_deepdarkimpact.zsc @@ -49,13 +49,13 @@ Class DeepImpact : SWWMWeapon Property ClipCount : clipcount; - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/DeepImpactDisplay.png",TexMan.Type_Any); if ( !AmmoBar ) AmmoBar = TexMan.CheckForTexture("graphics/HUD/DeepImpactBar.png",TexMan.Type_Any); Screen.DrawTexture(WeaponBox,false,bx-36,by-54,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); int chg = clamp(ChargeInter?ChargeInter.GetValue():clipcount,0,100); - int ct = int(((by-2)-(chg*50./100.))*hs.y); + int ct = int(((by-2)-(chg*50./100.))*hs); Screen.DrawTexture(AmmoBar,false,bx-7,by-52,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ClipTop,ct); Screen.DrawText(smallfont,Font.CR_FIRE,bx-35,by-12,String.Format("%3d%%",chg),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); } diff --git a/zscript/weapons/swwm_jackhammer.zsc b/zscript/weapons/swwm_jackhammer.zsc index 0827966b8..5547ebaa2 100644 --- a/zscript/weapons/swwm_jackhammer.zsc +++ b/zscript/weapons/swwm_jackhammer.zsc @@ -9,7 +9,7 @@ Class PusherWeapon : SWWMWeapon transient ui TextureID WeaponBox, ChargeBar; transient ui DynamicValueInterpolator ChargeInter; - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/PusherDisplay.png",TexMan.Type_Any); if ( !ChargeBar ) ChargeBar = TexMan.CheckForTexture("graphics/HUD/PusherBar.png",TexMan.Type_Any); diff --git a/zscript/weapons/swwm_shot.zsc b/zscript/weapons/swwm_shot.zsc index 5ff9351bb..022e12899 100644 --- a/zscript/weapons/swwm_shot.zsc +++ b/zscript/weapons/swwm_shot.zsc @@ -156,7 +156,7 @@ Class Spreadgun : SWWMWeapon return Super.GetObituary(victim,inflictor,mod,playerattack); } - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { static const Class types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"}; if ( !WeaponBox ) diff --git a/zscript/weapons/swwm_sparkyboi.zsc b/zscript/weapons/swwm_sparkyboi.zsc index dcb8396e1..58d2d201d 100644 --- a/zscript/weapons/swwm_sparkyboi.zsc +++ b/zscript/weapons/swwm_sparkyboi.zsc @@ -13,7 +13,7 @@ Class Sparkster : SWWMWeapon transient ui DynamicValueInterpolator iclip; transient int failtime; - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox ) { diff --git a/zscript/weapons/swwm_splode.zsc b/zscript/weapons/swwm_splode.zsc index 43f48216b..56d2d1d84 100644 --- a/zscript/weapons/swwm_splode.zsc +++ b/zscript/weapons/swwm_splode.zsc @@ -13,7 +13,7 @@ Class ExplodiumGun : SWWMWeapon Property ClipCount : ClipCount; - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/ExplodiumDisplay.png",TexMan.Type_Any); Screen.DrawTexture(WeaponBox,false,bx-24,by-22,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); @@ -585,7 +585,7 @@ Class DualExplodiumGun : SWWMWeapon Property ClipCount : ClipCount; - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/DualExplodiumDisplay.png",TexMan.Type_Any); Screen.DrawTexture(WeaponBox,false,bx-48,by-22,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); diff --git a/zscript/weapons/swwm_tastytreat.zsc b/zscript/weapons/swwm_tastytreat.zsc index 17a842999..46b614d32 100644 --- a/zscript/weapons/swwm_tastytreat.zsc +++ b/zscript/weapons/swwm_tastytreat.zsc @@ -82,7 +82,7 @@ Class CandyGun : SWWMWeapon return gotstuff, gotspares; } - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( Amount <= 0 ) return; if ( !WeaponBox ) WeaponBox = TexMan.CheckForTexture("graphics/HUD/CandygunDisplay.png",TexMan.Type_Any); diff --git a/zscript/weapons/swwm_thiccboolet.zsc b/zscript/weapons/swwm_thiccboolet.zsc index d812b1bef..8e7fa104c 100644 --- a/zscript/weapons/swwm_thiccboolet.zsc +++ b/zscript/weapons/swwm_thiccboolet.zsc @@ -243,7 +243,7 @@ Class SilverBullet : SWWMWeapon return Super.GetObituary(victim,inflictor,mod,playerattack); } - override void DrawWeapon( double TicFrac, double bx, double by, Vector2 hs, Vector2 ss ) + override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { if ( !WeaponBox[0] ) WeaponBox[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletDisplay.png",TexMan.Type_Any); if ( !WeaponBox[1] ) WeaponBox[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomDisplay.png",TexMan.Type_Any);