diff --git a/graphics/AltHUD/BiosparkError.png b/graphics/AltHUD/BiosparkRed.png similarity index 100% rename from graphics/AltHUD/BiosparkError.png rename to graphics/AltHUD/BiosparkRed.png diff --git a/language.def_menu b/language.def_menu index cfbbd2b12..334a4ca92 100644 --- a/language.def_menu +++ b/language.def_menu @@ -208,6 +208,7 @@ SWWM_NODEATHEXIT = "Disable Death Exits"; SWWM_EXTENDEDPICKUP = "Extend Item Size"; SWWM_VOICELOG = "Log Player Comments"; SWWM_SKIPSKILL = "Skip Skill Confirmation"; +SWWM_ALTHUD = "Alternate HUD Style"; SWWM_MMTITLE = "Minimap Settings"; SWWM_MM_ENABLE = "Show Minimap"; SWWM_MM_ROTATE = "Rotate Minimap"; @@ -378,6 +379,7 @@ TOOLTIP_SWWM_NODEATHEXIT = "This option completely negates the effects of death TOOLTIP_SWWM_EXTENDEDPICKUP = "Gives all items a vanilla-sized \"virtual hitbox\" that allows picking them up from farther away. Requires a map restart if changed."; TOOLTIP_SWWM_VOICELOG = "Subtitled player comments will be saved to the Messages tab of the Demolitionist Menu."; TOOLTIP_SWWM_SKIPSKILL = "Skips confirmation of skill selection, if you get tired of seeing it every time."; +TOOLTIP_SWWM_ALTHUD = "Switches the HUD style to one akin to the Demolitionist Side Mods."; TOOLTIP_SWWMMINIMAPMENU = "Configure the minimap."; TOOLTIP_SWWMACHIEVEMENTMENU = "View your achievements."; TOOLTIP_SWWM_MM_ENABLE = "Displays a minimap under the score counter."; diff --git a/language.es_menu b/language.es_menu index 4aeedb533..c67b1aa61 100644 --- a/language.es_menu +++ b/language.es_menu @@ -207,6 +207,7 @@ SWWM_NODEATHEXIT = "Desactivar Salidas de Muerte"; SWWM_EXTENDEDPICKUP = "Extender Tamaño de Ítem"; SWWM_VOICELOG = "Registrar Comentarios de Jugador"; SWWM_SKIPSKILL = "Saltar Confirmación de Dificultad"; +SWWM_ALTHUD = "Estilo de HUD Alternativo"; SWWM_MMTITLE = "Opciones de Minimapa"; SWWM_MM_ENABLE = "Mostrar Minimapa"; SWWM_MM_ROTATE = "Rotar Minimapa"; @@ -382,6 +383,7 @@ TOOLTIP_SWWM_NODEATHEXIT = "Esta opción invalida completamente los efectos de l TOOLTIP_SWWM_EXTENDEDPICKUP = "Da a todos los ítems una \"hitbox virtual\" de tamaño vanilla que permite recogerlos a mayor distancia. Requiere reinicio de mapa si se cambia."; TOOLTIP_SWWM_VOICELOG = "Los comentarios de jugador subtitulados se guardarán en la pestaña de Mensajes del Menú de Demolicionista."; TOOLTIP_SWWM_SKIPSKILL = "Salta la confirmación de selección de dificultad, si te has cansado de verla todo el tiempo."; +TOOLTIP_SWWM_ALTHUD = "Cambia el estilo de HUD a uno parecido al de los Mods Paralelos de Demolicionista."; TOOLTIP_SWWMMINIMAPMENU = "Configura el minimapa."; TOOLTIP_SWWMACHIEVEMENTMENU = "Revisa tus logros."; TOOLTIP_SWWM_MM_ENABLE = "Muestra un minimapa bajo el contador de puntuación."; diff --git a/language.version b/language.version index 3c4473810..e21dfe3e0 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r91 \cu(Fri 3 Jun 21:43:08 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r91 \cu(2022-06-03 21:43:08)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r92 \cu(Sat 4 Jun 01:00:47 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r92 \cu(2022-06-04 01:00:47)\c-"; diff --git a/menudef.txt b/menudef.txt index f48aa63b8..d57f70d97 100644 --- a/menudef.txt +++ b/menudef.txt @@ -118,6 +118,7 @@ OptionMenu "SWWMOptionMenu" Option "$SWWM_FORCESTATS", "swwm_forcestats", "SWWMForceStats" Option "$SWWM_UNIQSTATS", "swwm_uniqstats", "YesNo" Slider "$SWWM_HUDMARGIN", "swwm_hudmargin", 0, 20, 1, 0 + Option "$SWWM_ALTHUD", "swwm_althud", "YesNo" Slider "$SWWM_MAXMSG", "swwm_maxshown", 1, 10, 1, 0 Slider "$SWWM_MAXMSGBIG", "swwm_maxshownbig", 1, 20, 1, 0 Slider "$SWWM_MAXPICK", "swwm_maxpickup", 1, 10, 1, 0 diff --git a/zscript/weapons/swwm_althud_weapons.zsc b/zscript/weapons/swwm_althud_weapons.zsc index 71675b8fe..71325e88a 100644 --- a/zscript/weapons/swwm_althud_weapons.zsc +++ b/zscript/weapons/swwm_althud_weapons.zsc @@ -1 +1,296 @@ // DrawWeaponAlt code for all weapons + +// Deep Impact +extend Class DeepImpact +{ + ui TextureID AltWeaponBox, AltAmmoBar; + + override void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/DeepImpactDisplay.png",TexMan.Type_Any); + if ( !AltAmmoBar ) AltAmmoBar = TexMan.CheckForTexture("graphics/AltHUD/DeepImpactBar.png",TexMan.Type_Any); + Screen.DrawTexture(AltWeaponBox,false,bx-7,by-24,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*20./100.))*hs); + bool blinking = (failtime>gametic)&&((failtime-gametic)%8>=4); + Screen.DrawTexture(AltAmmoBar,false,bx-5,by-22,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ClipTop,ct,DTA_ColorOverlay,blinking?Color(128,0,0,0):Color(0,0,0,0)); + } +} + +// Explodium Gun +extend Class ExplodiumGun +{ + ui TextureID AltWeaponBox, AltRoundTex; + + override void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/ExplodiumDisplay.png",TexMan.Type_Any); + if ( !AltRoundTex ) AltRoundTex = TexMan.CheckForTexture("graphics/AltHUD/ExplodiumRound.png",TexMan.Type_Any); + Screen.DrawTexture(AltWeaponBox,false,bx-9,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-7,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + for ( int i=0; i types[] = {"RedShell","GreenShell","WhiteShell","BlueShell","BlackShell","PurpleShell","GoldShell"}; + if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/SpreadgunDisplay.png",TexMan.Type_Any); + if ( !AltRoundTex[0] ) AltRoundTex[0] = TexMan.CheckForTexture("graphics/AltHUD/ShellRed.png",TexMan.Type_Any); + if ( !AltRoundTex[1] ) AltRoundTex[1] = TexMan.CheckForTexture("graphics/AltHUD/ShellGreen.png",TexMan.Type_Any); + if ( !AltRoundTex[2] ) AltRoundTex[2] = TexMan.CheckForTexture("graphics/AltHUD/ShellWhite.png",TexMan.Type_Any); + if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/ShellBlue.png",TexMan.Type_Any); + if ( !AltRoundTex[4] ) AltRoundTex[4] = TexMan.CheckForTexture("graphics/AltHUD/ShellBlack.png",TexMan.Type_Any); + if ( !AltRoundTex[5] ) AltRoundTex[5] = TexMan.CheckForTexture("graphics/AltHUD/ShellPurple.png",TexMan.Type_Any); + if ( !AltRoundTex[6] ) AltRoundTex[6] = TexMan.CheckForTexture("graphics/AltHUD/ShellGold.png",TexMan.Type_Any); + Screen.DrawTexture(AltWeaponBox,false,bx-9,by-6,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( !chambered ) return; + for ( int i=0; i<7; i++ ) + { + if ( loadammo != types[i] ) continue; + Screen.DrawTexture(AltRoundTex[i],false,bx-7,by-4,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(fired?128:0,0,0,0)); + break; + } + } +} + +// Wallbuster (less of a fuck in the alt hud) +extend Class Wallbuster +{ + ui TextureID AltWeaponBox, AltRoundTex[4], AltCursorTex; + + override void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + static const Class types[] = {"RedShell","GreenShell","BlueShell","PurpleShell"}; + if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/WallbusterDisplay.png",TexMan.Type_Any); + if ( !AltRoundTex[0] ) AltRoundTex[0] = TexMan.CheckForTexture("graphics/AltHUD/ShellRed.png",TexMan.Type_Any); + if ( !AltRoundTex[1] ) AltRoundTex[1] = TexMan.CheckForTexture("graphics/AltHUD/ShellGreen.png",TexMan.Type_Any); + if ( !AltRoundTex[2] ) AltRoundTex[2] = TexMan.CheckForTexture("graphics/AltHUD/ShellBlue.png",TexMan.Type_Any); + if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/ShellPurple.png",TexMan.Type_Any); + if ( !AltCursorTex ) AltCursorTex = TexMan.CheckForTexture("graphics/AltHUD/WallbusterCursor.png",TexMan.Type_Any); + Screen.DrawTexture(AltWeaponBox,false,bx-11,by-70,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + int curpos = 68-(rotation[5]*14+rotation[rotation[5]]*2); + Screen.DrawTexture(AltCursorTex,false,bx-9,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + for ( int i=0; i<25; i++ ) + { + curpos = 68-(i*2+(i/5)*4); + if ( !loaded[i] ) continue; + for ( int j=0; j<4; j++ ) + { + if ( loaded[i] != types[j] ) continue; + Screen.DrawTexture(AltRoundTex[j],false,bx-7,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(fired[i]?128:0,0,0,0)); + break; + } + } + } +} + +// Eviscerator +extend Class Eviscerator +{ + ui TextureID AltWeaponBox, AltRoundTex, AltSpreadIcon[2]; + + override void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/EvisceratorDisplay.png",TexMan.Type_Any); + if ( !AltRoundTex ) AltRoundTex = TexMan.CheckForTexture("graphics/AltHUD/EvisceratorRound.png",TexMan.Type_Any); + if ( !AltSpreadIcon[0] ) AltSpreadIcon[0] = TexMan.CheckForTexture("graphics/AltHUD/EvisceratorWide.png",TexMan.Type_Any); + if ( !AltSpreadIcon[1] ) AltSpreadIcon[1] = TexMan.CheckForTexture("graphics/AltHUD/EvisceratorTight.png",TexMan.Type_Any); + Screen.DrawTexture(AltWeaponBox,false,bx-9,by-18,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + Screen.DrawTexture(AltRoundTex,false,bx-7,by-7,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,chambered?Color(0,0,0,0):Color(128,0,0,0)); + Screen.DrawTexture(AltSpreadIcon[extended],false,bx-7,by-16,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + } +} + +// Hellblazer +extend Class Hellblazer +{ + ui TextureID AltWeaponBox, AltRoundTex[4]; + + override void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + static const Class types[] = {"HellblazerMissiles","HellblazerCrackshots","HellblazerRavagers","HellblazerWarheads"}; + if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/HellblazerDisplay.png",TexMan.Type_Any); + if ( !AltRoundTex[0] ) AltRoundTex[0] = TexMan.CheckForTexture("graphics/AltHUD/HellblazerMissile.png",TexMan.Type_Any); + if ( !AltRoundTex[1] ) AltRoundTex[1] = TexMan.CheckForTexture("graphics/AltHUD/HellblazerCrackshot.png",TexMan.Type_Any); + if ( !AltRoundTex[2] ) AltRoundTex[2] = TexMan.CheckForTexture("graphics/AltHUD/HellblazerRavager.png",TexMan.Type_Any); + if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/HellblazerWarhead.png",TexMan.Type_Any); + Screen.DrawTexture(AltWeaponBox,false,bx-12,by-28,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + int curtype = 0; + for ( int i=0; i<4; i++ ) + { + if ( loadammo != types[i] ) continue; + curtype = i; + break; + } + int yy = 26; + switch ( curtype ) + { + case 0: + for ( int i=0; i<6; i++ ) + { + Screen.DrawTexture(AltRoundTex[0],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0); + yy -= 4; + } + break; + case 1: + yy = 24; + for ( int i=0; i<3; i++ ) + { + Screen.DrawTexture(AltRoundTex[1],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0); + yy -= 8; + } + break; + case 2: + yy = 24; + for ( int i=0; i<3; i++ ) + { + Screen.DrawTexture(AltRoundTex[2],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0); + yy -= 8; + } + break; + case 3: + yy = 22; + for ( int i=0; i<2; i++ ) + { + Screen.DrawTexture(AltRoundTex[3],false,bx-10,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,((i<=magpos)&&(i>=(magpos-preload)))?magstate[i]?Color(128,0,0,0):Color(0,0,0,0):magstate[i]?Color(160,0,0,0):Color(96,0,0,0),DTA_Desaturate,magstate[i]?192:0); + yy -= 12; + } + break; + } + } +} + +// Biospark Carbine +extend Class Sparkster +{ + ui TextureID AltWeaponBox, AltRoundTex[2]; + + override void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + if ( !AltWeaponBox ) AltWeaponBox = TexMan.CheckForTexture("graphics/AltHUD/BiosparkDisplay.png",TexMan.Type_Any); + if ( !AltRoundTex[0] ) AltRoundTex[0] = TexMan.CheckForTexture("graphics/AltHUD/BiosparkShot.png",TexMan.Type_Any); + if ( !AltRoundTex[1] ) AltRoundTex[1] = TexMan.CheckForTexture("graphics/AltHUD/BiosparkRed.png",TexMan.Type_Any); + bool blinking = (failtime>gametic)&&((failtime-gametic)%16>=8); + if ( doublestacc ) + { + Screen.DrawTexture(AltWeaponBox,false,bx-6,by-24,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + Screen.DrawTexture(AltWeaponBox,false,bx-6,by-12,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( nomag ) return; + bool bRed; + int yy = 22; + for ( int i=0; i<8; i++ ) + { + if ( clipcount <= i ) Screen.DrawTexture(AltRoundTex[0],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Desaturate,255,DTA_ColorOverlay,Color(160,0,0,0)); + else + { + bRed = ((i>=4)&&(clipcount<6)||(i<4)&&(clipcount<2)); + Screen.DrawTexture(AltRoundTex[bRed],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0)); + } + yy -= 2; + if ( i == 3 ) yy -= 4; + } + } + else + { + Screen.DrawTexture(AltWeaponBox,false,bx-6,by-12,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( nomag ) return; + bool bRed; + int yy = 10; + for ( int i=0; i<4; i++ ) + { + if ( clipcount <= i ) Screen.DrawTexture(AltRoundTex[0],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Desaturate,255,DTA_ColorOverlay,Color(160,0,0,0)); + else + { + bRed = (clipcount<2); + Screen.DrawTexture(AltRoundTex[bRed],false,bx-4,by-yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(blinking?96:0,0,0,0)); + } + yy -= 2; + } + } + } +} + +// Silver Bullet JET +extend Class SilverBullet +{ + ui TextureID AltWeaponBox[2], AltZoomBar, AltRoundTex[4]; + + override void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + if ( !AltWeaponBox[0] ) AltWeaponBox[0] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletDisplay.png",TexMan.Type_Any); + if ( !AltWeaponBox[1] ) AltWeaponBox[1] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletZoomDisplay.png",TexMan.Type_Any); + if ( !AltZoomBar ) AltZoomBar = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletZoomBar.png",TexMan.Type_Any); + if ( !AltRoundTex[0] ) AltRoundTex[0] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletXSB.png",TexMan.Type_Any); + if ( !AltRoundTex[1] ) AltRoundTex[1] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletFCB.png",TexMan.Type_Any); + if ( !AltRoundTex[2] ) AltRoundTex[2] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletXSBCasing.png",TexMan.Type_Any); + if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/SilverBulletFCBCasing.png",TexMan.Type_Any); + int zl = clamp(ZoomInter?ZoomInter.GetValue():int(zoomlevel*10),0,160); + if ( zl >= 10 ) + { + Screen.DrawTexture(AltWeaponBox[1],false,bx-14,by-26,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + double zw = zl*10./160.; + Screen.DrawTexture(AltZoomBar,false,bx-12,by-24,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw); + } + Screen.DrawTexture(AltWeaponBox[0],false,bx-14,by-17,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( chambered ) Screen.DrawTexture(AltRoundTex[fcbchambered+fired*2],false,bx-12,by-15,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + for ( int i=0; i