diff --git a/cvarinfo.base b/cvarinfo.base index ffc6e38b7..3d643de91 100644 --- a/cvarinfo.base +++ b/cvarinfo.base @@ -122,6 +122,7 @@ server bool swwm_nodeathexit = false; // completely sidesteps the inventory res server bool swwm_extendedpickup = false; // items will have an additional "virtual hitbox" that's the same size as vanilla nosave bool swwm_voicelog = false; // adds player voicelines to the message log nosave bool swwm_skipskill = false; // skips skill confirmations +nosave bool swwm_althud = false; // alternate, more compact hud (like in the side mods) // minimap settings nosave bool swwm_mm_enable = true; // show a minimap below the score counter diff --git a/fonts/MiniHUDOutline/0025.png b/fonts/MiniHUDOutline/0025.png new file mode 100644 index 000000000..932518658 Binary files /dev/null and b/fonts/MiniHUDOutline/0025.png differ diff --git a/fonts/MiniHUDOutline/002B.png b/fonts/MiniHUDOutline/002B.png new file mode 100644 index 000000000..d3efbd67a Binary files /dev/null and b/fonts/MiniHUDOutline/002B.png differ diff --git a/fonts/MiniHUDOutline/002D.png b/fonts/MiniHUDOutline/002D.png new file mode 100644 index 000000000..3ab01436b Binary files /dev/null and b/fonts/MiniHUDOutline/002D.png differ diff --git a/fonts/MiniHUDOutline/002F.png b/fonts/MiniHUDOutline/002F.png new file mode 100644 index 000000000..5eb3a8361 Binary files /dev/null and b/fonts/MiniHUDOutline/002F.png differ diff --git a/fonts/MiniHUDOutline/0030.png b/fonts/MiniHUDOutline/0030.png new file mode 100644 index 000000000..2a447ecb0 Binary files /dev/null and b/fonts/MiniHUDOutline/0030.png differ diff --git a/fonts/MiniHUDOutline/0031.png b/fonts/MiniHUDOutline/0031.png new file mode 100644 index 000000000..a23f38d0e Binary files /dev/null and b/fonts/MiniHUDOutline/0031.png differ diff --git a/fonts/MiniHUDOutline/0032.png b/fonts/MiniHUDOutline/0032.png new file mode 100644 index 000000000..18a501fcd Binary files /dev/null and b/fonts/MiniHUDOutline/0032.png differ diff --git a/fonts/MiniHUDOutline/0033.png b/fonts/MiniHUDOutline/0033.png new file mode 100644 index 000000000..c7654b139 Binary files /dev/null and b/fonts/MiniHUDOutline/0033.png differ diff --git a/fonts/MiniHUDOutline/0034.png b/fonts/MiniHUDOutline/0034.png new file mode 100644 index 000000000..83af4d853 Binary files /dev/null and b/fonts/MiniHUDOutline/0034.png differ diff --git a/fonts/MiniHUDOutline/0035.png b/fonts/MiniHUDOutline/0035.png new file mode 100644 index 000000000..bb695cdff Binary files /dev/null and b/fonts/MiniHUDOutline/0035.png differ diff --git a/fonts/MiniHUDOutline/0036.png b/fonts/MiniHUDOutline/0036.png new file mode 100644 index 000000000..fa8dbe84f Binary files /dev/null and b/fonts/MiniHUDOutline/0036.png differ diff --git a/fonts/MiniHUDOutline/0037.png b/fonts/MiniHUDOutline/0037.png new file mode 100644 index 000000000..e81487659 Binary files /dev/null and b/fonts/MiniHUDOutline/0037.png differ diff --git a/fonts/MiniHUDOutline/0038.png b/fonts/MiniHUDOutline/0038.png new file mode 100644 index 000000000..912d9fc0e Binary files /dev/null and b/fonts/MiniHUDOutline/0038.png differ diff --git a/fonts/MiniHUDOutline/0039.png b/fonts/MiniHUDOutline/0039.png new file mode 100644 index 000000000..23d8720b0 Binary files /dev/null and b/fonts/MiniHUDOutline/0039.png differ diff --git a/fonts/MiniHUDOutline/003A.png b/fonts/MiniHUDOutline/003A.png new file mode 100644 index 000000000..74a1addc3 Binary files /dev/null and b/fonts/MiniHUDOutline/003A.png differ diff --git a/fonts/MiniHUDOutline/0041.png b/fonts/MiniHUDOutline/0041.png new file mode 100644 index 000000000..a73e3c1ec Binary files /dev/null and b/fonts/MiniHUDOutline/0041.png differ diff --git a/fonts/MiniHUDOutline/0042.png b/fonts/MiniHUDOutline/0042.png new file mode 100644 index 000000000..ea6042003 Binary files /dev/null and b/fonts/MiniHUDOutline/0042.png differ diff --git a/fonts/MiniHUDOutline/0043.png b/fonts/MiniHUDOutline/0043.png new file mode 100644 index 000000000..52eb4d3b8 Binary files /dev/null and b/fonts/MiniHUDOutline/0043.png differ diff --git a/fonts/MiniHUDOutline/0044.png b/fonts/MiniHUDOutline/0044.png new file mode 100644 index 000000000..d67782703 Binary files /dev/null and b/fonts/MiniHUDOutline/0044.png differ diff --git a/fonts/MiniHUDOutline/0045.png b/fonts/MiniHUDOutline/0045.png new file mode 100644 index 000000000..e6d3255b3 Binary files /dev/null and b/fonts/MiniHUDOutline/0045.png differ diff --git a/fonts/MiniHUDOutline/0046.png b/fonts/MiniHUDOutline/0046.png new file mode 100644 index 000000000..6ca53935c Binary files /dev/null and b/fonts/MiniHUDOutline/0046.png differ diff --git a/fonts/MiniHUDOutline/0047.png b/fonts/MiniHUDOutline/0047.png new file mode 100644 index 000000000..60eb39b7b Binary files /dev/null and b/fonts/MiniHUDOutline/0047.png differ diff --git a/fonts/MiniHUDOutline/0048.png b/fonts/MiniHUDOutline/0048.png new file mode 100644 index 000000000..9a422d692 Binary files /dev/null and b/fonts/MiniHUDOutline/0048.png differ diff --git a/fonts/MiniHUDOutline/0049.png b/fonts/MiniHUDOutline/0049.png new file mode 100644 index 000000000..e22209108 Binary files /dev/null and b/fonts/MiniHUDOutline/0049.png differ diff --git a/fonts/MiniHUDOutline/004A.png b/fonts/MiniHUDOutline/004A.png new file mode 100644 index 000000000..1a4252f39 Binary files /dev/null and b/fonts/MiniHUDOutline/004A.png differ diff --git a/fonts/MiniHUDOutline/004B.png b/fonts/MiniHUDOutline/004B.png new file mode 100644 index 000000000..df08257c6 Binary files /dev/null and b/fonts/MiniHUDOutline/004B.png differ diff --git a/fonts/MiniHUDOutline/004C.png b/fonts/MiniHUDOutline/004C.png new file mode 100644 index 000000000..559208913 Binary files /dev/null and b/fonts/MiniHUDOutline/004C.png differ diff --git a/fonts/MiniHUDOutline/004D.png b/fonts/MiniHUDOutline/004D.png new file mode 100644 index 000000000..165175fec Binary files /dev/null and b/fonts/MiniHUDOutline/004D.png differ diff --git a/fonts/MiniHUDOutline/004E.png b/fonts/MiniHUDOutline/004E.png new file mode 100644 index 000000000..53ed1c885 Binary files /dev/null and b/fonts/MiniHUDOutline/004E.png differ diff --git a/fonts/MiniHUDOutline/004F.png b/fonts/MiniHUDOutline/004F.png new file mode 100644 index 000000000..2a447ecb0 Binary files /dev/null and b/fonts/MiniHUDOutline/004F.png differ diff --git a/fonts/MiniHUDOutline/0050.png b/fonts/MiniHUDOutline/0050.png new file mode 100644 index 000000000..cb5302407 Binary files /dev/null and b/fonts/MiniHUDOutline/0050.png differ diff --git a/fonts/MiniHUDOutline/0051.png b/fonts/MiniHUDOutline/0051.png new file mode 100644 index 000000000..5fb53d3a3 Binary files /dev/null and b/fonts/MiniHUDOutline/0051.png differ diff --git a/fonts/MiniHUDOutline/0052.png b/fonts/MiniHUDOutline/0052.png new file mode 100644 index 000000000..2302b9ab9 Binary files /dev/null and b/fonts/MiniHUDOutline/0052.png differ diff --git a/fonts/MiniHUDOutline/0053.png b/fonts/MiniHUDOutline/0053.png new file mode 100644 index 000000000..7ad3a66b3 Binary files /dev/null and b/fonts/MiniHUDOutline/0053.png differ diff --git a/fonts/MiniHUDOutline/0054.png b/fonts/MiniHUDOutline/0054.png new file mode 100644 index 000000000..c2d5f9351 Binary files /dev/null and b/fonts/MiniHUDOutline/0054.png differ diff --git a/fonts/MiniHUDOutline/0055.png b/fonts/MiniHUDOutline/0055.png new file mode 100644 index 000000000..d01080e50 Binary files /dev/null and b/fonts/MiniHUDOutline/0055.png differ diff --git a/fonts/MiniHUDOutline/0056.png b/fonts/MiniHUDOutline/0056.png new file mode 100644 index 000000000..69efda2d0 Binary files /dev/null and b/fonts/MiniHUDOutline/0056.png differ diff --git a/fonts/MiniHUDOutline/0057.png b/fonts/MiniHUDOutline/0057.png new file mode 100644 index 000000000..63d7a355e Binary files /dev/null and b/fonts/MiniHUDOutline/0057.png differ diff --git a/fonts/MiniHUDOutline/0058.png b/fonts/MiniHUDOutline/0058.png new file mode 100644 index 000000000..853853838 Binary files /dev/null and b/fonts/MiniHUDOutline/0058.png differ diff --git a/fonts/MiniHUDOutline/0059.png b/fonts/MiniHUDOutline/0059.png new file mode 100644 index 000000000..162dca879 Binary files /dev/null and b/fonts/MiniHUDOutline/0059.png differ diff --git a/fonts/MiniHUDOutline/005A.png b/fonts/MiniHUDOutline/005A.png new file mode 100644 index 000000000..29c156937 Binary files /dev/null and b/fonts/MiniHUDOutline/005A.png differ diff --git a/fonts/MiniHUDOutline/0073.png b/fonts/MiniHUDOutline/0073.png new file mode 100644 index 000000000..b18750395 Binary files /dev/null and b/fonts/MiniHUDOutline/0073.png differ diff --git a/fonts/MiniHUDOutline/207A.png b/fonts/MiniHUDOutline/207A.png new file mode 100644 index 000000000..85335b1f4 Binary files /dev/null and b/fonts/MiniHUDOutline/207A.png differ diff --git a/fonts/MiniHUDOutline/221E.png b/fonts/MiniHUDOutline/221E.png new file mode 100644 index 000000000..a6cd51646 Binary files /dev/null and b/fonts/MiniHUDOutline/221E.png differ diff --git a/fonts/MiniHUDOutline/font.inf b/fonts/MiniHUDOutline/font.inf new file mode 100644 index 000000000..e393e1dc7 --- /dev/null +++ b/fonts/MiniHUDOutline/font.inf @@ -0,0 +1,4 @@ +TranslationType Standard +SpaceWidth 5 +FontHeight 6 +Kerning -1 diff --git a/fonts/MiniHUDShadow/0025.png b/fonts/MiniHUDShadow/0025.png new file mode 100644 index 000000000..5b4153de1 Binary files /dev/null and b/fonts/MiniHUDShadow/0025.png differ diff --git a/fonts/MiniHUDShadow/002B.png b/fonts/MiniHUDShadow/002B.png new file mode 100644 index 000000000..b519e4ff2 Binary files /dev/null and b/fonts/MiniHUDShadow/002B.png differ diff --git a/fonts/MiniHUDShadow/002D.png b/fonts/MiniHUDShadow/002D.png new file mode 100644 index 000000000..fa5e0bebb Binary files /dev/null and b/fonts/MiniHUDShadow/002D.png differ diff --git a/fonts/MiniHUDShadow/002F.png b/fonts/MiniHUDShadow/002F.png new file mode 100644 index 000000000..ea52ce324 Binary files /dev/null and b/fonts/MiniHUDShadow/002F.png differ diff --git a/fonts/MiniHUDShadow/0030.png b/fonts/MiniHUDShadow/0030.png new file mode 100644 index 000000000..9932417b3 Binary files /dev/null and b/fonts/MiniHUDShadow/0030.png differ diff --git a/fonts/MiniHUDShadow/0031.png b/fonts/MiniHUDShadow/0031.png new file mode 100644 index 000000000..d7dfe2ef8 Binary files /dev/null and b/fonts/MiniHUDShadow/0031.png differ diff --git a/fonts/MiniHUDShadow/0032.png b/fonts/MiniHUDShadow/0032.png new file mode 100644 index 000000000..166a5e0f1 Binary files /dev/null and b/fonts/MiniHUDShadow/0032.png differ diff --git a/fonts/MiniHUDShadow/0033.png b/fonts/MiniHUDShadow/0033.png new file mode 100644 index 000000000..d12f320e1 Binary files /dev/null and b/fonts/MiniHUDShadow/0033.png differ diff --git a/fonts/MiniHUDShadow/0034.png b/fonts/MiniHUDShadow/0034.png new file mode 100644 index 000000000..f05204188 Binary files /dev/null and b/fonts/MiniHUDShadow/0034.png differ diff --git a/fonts/MiniHUDShadow/0035.png b/fonts/MiniHUDShadow/0035.png new file mode 100644 index 000000000..6f42c7875 Binary files /dev/null and b/fonts/MiniHUDShadow/0035.png differ diff --git a/fonts/MiniHUDShadow/0036.png b/fonts/MiniHUDShadow/0036.png new file mode 100644 index 000000000..3a6006fd1 Binary files /dev/null and b/fonts/MiniHUDShadow/0036.png differ diff --git a/fonts/MiniHUDShadow/0037.png b/fonts/MiniHUDShadow/0037.png new file mode 100644 index 000000000..f92c325c3 Binary files /dev/null and b/fonts/MiniHUDShadow/0037.png differ diff --git a/fonts/MiniHUDShadow/0038.png b/fonts/MiniHUDShadow/0038.png new file mode 100644 index 000000000..842a512a6 Binary files /dev/null and b/fonts/MiniHUDShadow/0038.png differ diff --git a/fonts/MiniHUDShadow/0039.png b/fonts/MiniHUDShadow/0039.png new file mode 100644 index 000000000..78f395db4 Binary files /dev/null and b/fonts/MiniHUDShadow/0039.png differ diff --git a/fonts/MiniHUDShadow/003A.png b/fonts/MiniHUDShadow/003A.png new file mode 100644 index 000000000..305989b10 Binary files /dev/null and b/fonts/MiniHUDShadow/003A.png differ diff --git a/fonts/MiniHUDShadow/0041.png b/fonts/MiniHUDShadow/0041.png new file mode 100644 index 000000000..75c4c9868 Binary files /dev/null and b/fonts/MiniHUDShadow/0041.png differ diff --git a/fonts/MiniHUDShadow/0042.png b/fonts/MiniHUDShadow/0042.png new file mode 100644 index 000000000..4d7108553 Binary files /dev/null and b/fonts/MiniHUDShadow/0042.png differ diff --git a/fonts/MiniHUDShadow/0043.png b/fonts/MiniHUDShadow/0043.png new file mode 100644 index 000000000..9cd31e1df Binary files /dev/null and b/fonts/MiniHUDShadow/0043.png differ diff --git a/fonts/MiniHUDShadow/0044.png b/fonts/MiniHUDShadow/0044.png new file mode 100644 index 000000000..ff1391a2b Binary files /dev/null and b/fonts/MiniHUDShadow/0044.png differ diff --git a/fonts/MiniHUDShadow/0045.png b/fonts/MiniHUDShadow/0045.png new file mode 100644 index 000000000..77f23086f Binary files /dev/null and b/fonts/MiniHUDShadow/0045.png differ diff --git a/fonts/MiniHUDShadow/0046.png b/fonts/MiniHUDShadow/0046.png new file mode 100644 index 000000000..ee4f0e124 Binary files /dev/null and b/fonts/MiniHUDShadow/0046.png differ diff --git a/fonts/MiniHUDShadow/0047.png b/fonts/MiniHUDShadow/0047.png new file mode 100644 index 000000000..8f6e0ebb1 Binary files /dev/null and b/fonts/MiniHUDShadow/0047.png differ diff --git a/fonts/MiniHUDShadow/0048.png b/fonts/MiniHUDShadow/0048.png new file mode 100644 index 000000000..86f68fade Binary files /dev/null and b/fonts/MiniHUDShadow/0048.png differ diff --git a/fonts/MiniHUDShadow/0049.png b/fonts/MiniHUDShadow/0049.png new file mode 100644 index 000000000..17e4e931b Binary files /dev/null and b/fonts/MiniHUDShadow/0049.png differ diff --git a/fonts/MiniHUDShadow/004A.png b/fonts/MiniHUDShadow/004A.png new file mode 100644 index 000000000..83cf092cd Binary files /dev/null and b/fonts/MiniHUDShadow/004A.png differ diff --git a/fonts/MiniHUDShadow/004B.png b/fonts/MiniHUDShadow/004B.png new file mode 100644 index 000000000..33ad403ea Binary files /dev/null and b/fonts/MiniHUDShadow/004B.png differ diff --git a/fonts/MiniHUDShadow/004C.png b/fonts/MiniHUDShadow/004C.png new file mode 100644 index 000000000..870c17799 Binary files /dev/null and b/fonts/MiniHUDShadow/004C.png differ diff --git a/fonts/MiniHUDShadow/004D.png b/fonts/MiniHUDShadow/004D.png new file mode 100644 index 000000000..b329f0b24 Binary files /dev/null and b/fonts/MiniHUDShadow/004D.png differ diff --git a/fonts/MiniHUDShadow/004E.png b/fonts/MiniHUDShadow/004E.png new file mode 100644 index 000000000..bc4971d25 Binary files /dev/null and b/fonts/MiniHUDShadow/004E.png differ diff --git a/fonts/MiniHUDShadow/004F.png b/fonts/MiniHUDShadow/004F.png new file mode 100644 index 000000000..9932417b3 Binary files /dev/null and b/fonts/MiniHUDShadow/004F.png differ diff --git a/fonts/MiniHUDShadow/0050.png b/fonts/MiniHUDShadow/0050.png new file mode 100644 index 000000000..b1e6b0faf Binary files /dev/null and b/fonts/MiniHUDShadow/0050.png differ diff --git a/fonts/MiniHUDShadow/0051.png b/fonts/MiniHUDShadow/0051.png new file mode 100644 index 000000000..d4c76f6e1 Binary files /dev/null and b/fonts/MiniHUDShadow/0051.png differ diff --git a/fonts/MiniHUDShadow/0052.png b/fonts/MiniHUDShadow/0052.png new file mode 100644 index 000000000..e3a6d8aa5 Binary files /dev/null and b/fonts/MiniHUDShadow/0052.png differ diff --git a/fonts/MiniHUDShadow/0053.png b/fonts/MiniHUDShadow/0053.png new file mode 100644 index 000000000..2b09a9bb8 Binary files /dev/null and b/fonts/MiniHUDShadow/0053.png differ diff --git a/fonts/MiniHUDShadow/0054.png b/fonts/MiniHUDShadow/0054.png new file mode 100644 index 000000000..fc684ce11 Binary files /dev/null and b/fonts/MiniHUDShadow/0054.png differ diff --git a/fonts/MiniHUDShadow/0055.png b/fonts/MiniHUDShadow/0055.png new file mode 100644 index 000000000..20591c67a Binary files /dev/null and b/fonts/MiniHUDShadow/0055.png differ diff --git a/fonts/MiniHUDShadow/0056.png b/fonts/MiniHUDShadow/0056.png new file mode 100644 index 000000000..b2c4b4cfd Binary files /dev/null and b/fonts/MiniHUDShadow/0056.png differ diff --git a/fonts/MiniHUDShadow/0057.png b/fonts/MiniHUDShadow/0057.png new file mode 100644 index 000000000..c125bb7bf Binary files /dev/null and b/fonts/MiniHUDShadow/0057.png differ diff --git a/fonts/MiniHUDShadow/0058.png b/fonts/MiniHUDShadow/0058.png new file mode 100644 index 000000000..b63a6004f Binary files /dev/null and b/fonts/MiniHUDShadow/0058.png differ diff --git a/fonts/MiniHUDShadow/0059.png b/fonts/MiniHUDShadow/0059.png new file mode 100644 index 000000000..93f2fbf4f Binary files /dev/null and b/fonts/MiniHUDShadow/0059.png differ diff --git a/fonts/MiniHUDShadow/005A.png b/fonts/MiniHUDShadow/005A.png new file mode 100644 index 000000000..d0c7b752c Binary files /dev/null and b/fonts/MiniHUDShadow/005A.png differ diff --git a/fonts/MiniHUDShadow/0073.png b/fonts/MiniHUDShadow/0073.png new file mode 100644 index 000000000..985c361a2 Binary files /dev/null and b/fonts/MiniHUDShadow/0073.png differ diff --git a/fonts/MiniHUDShadow/207A.png b/fonts/MiniHUDShadow/207A.png new file mode 100644 index 000000000..944320613 Binary files /dev/null and b/fonts/MiniHUDShadow/207A.png differ diff --git a/fonts/MiniHUDShadow/221E.png b/fonts/MiniHUDShadow/221E.png new file mode 100644 index 000000000..2615ecff8 Binary files /dev/null and b/fonts/MiniHUDShadow/221E.png differ diff --git a/fonts/MiniHUDShadow/font.inf b/fonts/MiniHUDShadow/font.inf new file mode 100644 index 000000000..bb45bc970 --- /dev/null +++ b/fonts/MiniHUDShadow/font.inf @@ -0,0 +1,3 @@ +TranslationType Standard +SpaceWidth 4 +FontHeight 6 diff --git a/graphics/AltHUD/AmmoBoxB.png b/graphics/AltHUD/AmmoBoxB.png new file mode 100644 index 000000000..341e6fc6e Binary files /dev/null and b/graphics/AltHUD/AmmoBoxB.png differ diff --git a/graphics/AltHUD/AmmoBoxM.png b/graphics/AltHUD/AmmoBoxM.png new file mode 100644 index 000000000..7037c7f83 Binary files /dev/null and b/graphics/AltHUD/AmmoBoxM.png differ diff --git a/graphics/AltHUD/AmmoBoxT.png b/graphics/AltHUD/AmmoBoxT.png new file mode 100644 index 000000000..e9a0bbdcd Binary files /dev/null and b/graphics/AltHUD/AmmoBoxT.png differ diff --git a/graphics/AltHUD/BiosparkDisplay.png b/graphics/AltHUD/BiosparkDisplay.png new file mode 100644 index 000000000..128285e22 Binary files /dev/null and b/graphics/AltHUD/BiosparkDisplay.png differ diff --git a/graphics/AltHUD/BiosparkRed.png b/graphics/AltHUD/BiosparkRed.png new file mode 100644 index 000000000..8f2868398 Binary files /dev/null and b/graphics/AltHUD/BiosparkRed.png differ diff --git a/graphics/AltHUD/BiosparkShot.png b/graphics/AltHUD/BiosparkShot.png new file mode 100644 index 000000000..8c976d768 Binary files /dev/null and b/graphics/AltHUD/BiosparkShot.png differ diff --git a/graphics/AltHUD/CandyRound.png b/graphics/AltHUD/CandyRound.png new file mode 100644 index 000000000..be58ce0b6 Binary files /dev/null and b/graphics/AltHUD/CandyRound.png differ diff --git a/graphics/AltHUD/DashBar.png b/graphics/AltHUD/DashBar.png new file mode 100644 index 000000000..88de7a5c3 Binary files /dev/null and b/graphics/AltHUD/DashBar.png differ diff --git a/graphics/AltHUD/DeepImpactBar.png b/graphics/AltHUD/DeepImpactBar.png new file mode 100644 index 000000000..1403248c6 Binary files /dev/null and b/graphics/AltHUD/DeepImpactBar.png differ diff --git a/graphics/AltHUD/DeepImpactDisplay.png b/graphics/AltHUD/DeepImpactDisplay.png new file mode 100644 index 000000000..1cc86b676 Binary files /dev/null and b/graphics/AltHUD/DeepImpactDisplay.png differ diff --git a/graphics/AltHUD/EvisceratorDisplay.png b/graphics/AltHUD/EvisceratorDisplay.png new file mode 100644 index 000000000..9520ae6a1 Binary files /dev/null and b/graphics/AltHUD/EvisceratorDisplay.png differ diff --git a/graphics/AltHUD/EvisceratorRound.png b/graphics/AltHUD/EvisceratorRound.png new file mode 100644 index 000000000..4010dd5a6 Binary files /dev/null and b/graphics/AltHUD/EvisceratorRound.png differ diff --git a/graphics/AltHUD/EvisceratorTight.png b/graphics/AltHUD/EvisceratorTight.png new file mode 100644 index 000000000..7c57e1794 Binary files /dev/null and b/graphics/AltHUD/EvisceratorTight.png differ diff --git a/graphics/AltHUD/EvisceratorWide.png b/graphics/AltHUD/EvisceratorWide.png new file mode 100644 index 000000000..299a1d8ad Binary files /dev/null and b/graphics/AltHUD/EvisceratorWide.png differ diff --git a/graphics/AltHUD/ExplodiumDisplay.png b/graphics/AltHUD/ExplodiumDisplay.png new file mode 100644 index 000000000..368ec6c2b Binary files /dev/null and b/graphics/AltHUD/ExplodiumDisplay.png differ diff --git a/graphics/AltHUD/ExplodiumRound.png b/graphics/AltHUD/ExplodiumRound.png new file mode 100644 index 000000000..e92437f05 Binary files /dev/null and b/graphics/AltHUD/ExplodiumRound.png differ diff --git a/graphics/AltHUD/FuelBar.png b/graphics/AltHUD/FuelBar.png new file mode 100644 index 000000000..3b545dd45 Binary files /dev/null and b/graphics/AltHUD/FuelBar.png differ diff --git a/graphics/AltHUD/FuelBarS.png b/graphics/AltHUD/FuelBarS.png new file mode 100644 index 000000000..15c611726 Binary files /dev/null and b/graphics/AltHUD/FuelBarS.png differ diff --git a/graphics/AltHUD/GenericAmmoBoxL.png b/graphics/AltHUD/GenericAmmoBoxL.png new file mode 100644 index 000000000..208a28db8 Binary files /dev/null and b/graphics/AltHUD/GenericAmmoBoxL.png differ diff --git a/graphics/AltHUD/GenericAmmoBoxM.png b/graphics/AltHUD/GenericAmmoBoxM.png new file mode 100644 index 000000000..8110ca2d9 Binary files /dev/null and b/graphics/AltHUD/GenericAmmoBoxM.png differ diff --git a/graphics/AltHUD/GenericAmmoBoxR.png b/graphics/AltHUD/GenericAmmoBoxR.png new file mode 100644 index 000000000..1946be32b Binary files /dev/null and b/graphics/AltHUD/GenericAmmoBoxR.png differ diff --git a/graphics/AltHUD/HealthBar0.png b/graphics/AltHUD/HealthBar0.png new file mode 100644 index 000000000..7514d1283 Binary files /dev/null and b/graphics/AltHUD/HealthBar0.png differ diff --git a/graphics/AltHUD/HealthBar1.png b/graphics/AltHUD/HealthBar1.png new file mode 100644 index 000000000..1e480ff06 Binary files /dev/null and b/graphics/AltHUD/HealthBar1.png differ diff --git a/graphics/AltHUD/HealthBar2.png b/graphics/AltHUD/HealthBar2.png new file mode 100644 index 000000000..b4858b970 Binary files /dev/null and b/graphics/AltHUD/HealthBar2.png differ diff --git a/graphics/AltHUD/HealthBar3.png b/graphics/AltHUD/HealthBar3.png new file mode 100644 index 000000000..1a053fc1a Binary files /dev/null and b/graphics/AltHUD/HealthBar3.png differ diff --git a/graphics/AltHUD/HealthBarD.png b/graphics/AltHUD/HealthBarD.png new file mode 100644 index 000000000..4f34d7ae6 Binary files /dev/null and b/graphics/AltHUD/HealthBarD.png differ diff --git a/graphics/AltHUD/HealthBarF.png b/graphics/AltHUD/HealthBarF.png new file mode 100644 index 000000000..9391ece36 Binary files /dev/null and b/graphics/AltHUD/HealthBarF.png differ diff --git a/graphics/AltHUD/HealthBarL.png b/graphics/AltHUD/HealthBarL.png new file mode 100644 index 000000000..b33f43bbf Binary files /dev/null and b/graphics/AltHUD/HealthBarL.png differ diff --git a/graphics/AltHUD/HealthBarP.png b/graphics/AltHUD/HealthBarP.png new file mode 100644 index 000000000..878ed49ad Binary files /dev/null and b/graphics/AltHUD/HealthBarP.png differ diff --git a/graphics/AltHUD/HealthBarS.png b/graphics/AltHUD/HealthBarS.png new file mode 100644 index 000000000..829203140 Binary files /dev/null and b/graphics/AltHUD/HealthBarS.png differ diff --git a/graphics/AltHUD/HellblazerCrackshot.png b/graphics/AltHUD/HellblazerCrackshot.png new file mode 100644 index 000000000..05382f569 Binary files /dev/null and b/graphics/AltHUD/HellblazerCrackshot.png differ diff --git a/graphics/AltHUD/HellblazerDisplay.png b/graphics/AltHUD/HellblazerDisplay.png new file mode 100644 index 000000000..d5e9b5e1c Binary files /dev/null and b/graphics/AltHUD/HellblazerDisplay.png differ diff --git a/graphics/AltHUD/HellblazerMissile.png b/graphics/AltHUD/HellblazerMissile.png new file mode 100644 index 000000000..2804f44c4 Binary files /dev/null and b/graphics/AltHUD/HellblazerMissile.png differ diff --git a/graphics/AltHUD/HellblazerRavager.png b/graphics/AltHUD/HellblazerRavager.png new file mode 100644 index 000000000..4749268eb Binary files /dev/null and b/graphics/AltHUD/HellblazerRavager.png differ diff --git a/graphics/AltHUD/HellblazerWarhead.png b/graphics/AltHUD/HellblazerWarhead.png new file mode 100644 index 000000000..f398673f6 Binary files /dev/null and b/graphics/AltHUD/HellblazerWarhead.png differ diff --git a/graphics/AltHUD/ScoreBox.png b/graphics/AltHUD/ScoreBox.png new file mode 100644 index 000000000..1bca2a6d7 Binary files /dev/null and b/graphics/AltHUD/ScoreBox.png differ diff --git a/graphics/AltHUD/ShellBlack.png b/graphics/AltHUD/ShellBlack.png new file mode 100644 index 000000000..e5e7916e3 Binary files /dev/null and b/graphics/AltHUD/ShellBlack.png differ diff --git a/graphics/AltHUD/ShellBlue.png b/graphics/AltHUD/ShellBlue.png new file mode 100644 index 000000000..fce4bd5af Binary files /dev/null and b/graphics/AltHUD/ShellBlue.png differ diff --git a/graphics/AltHUD/ShellGold.png b/graphics/AltHUD/ShellGold.png new file mode 100644 index 000000000..3600d2532 Binary files /dev/null and b/graphics/AltHUD/ShellGold.png differ diff --git a/graphics/AltHUD/ShellGreen.png b/graphics/AltHUD/ShellGreen.png new file mode 100644 index 000000000..a5285cd41 Binary files /dev/null and b/graphics/AltHUD/ShellGreen.png differ diff --git a/graphics/AltHUD/ShellPurple.png b/graphics/AltHUD/ShellPurple.png new file mode 100644 index 000000000..eb8434d55 Binary files /dev/null and b/graphics/AltHUD/ShellPurple.png differ diff --git a/graphics/AltHUD/ShellRed.png b/graphics/AltHUD/ShellRed.png new file mode 100644 index 000000000..0c72896e9 Binary files /dev/null and b/graphics/AltHUD/ShellRed.png differ diff --git a/graphics/AltHUD/SilverBulletDisplay.png b/graphics/AltHUD/SilverBulletDisplay.png new file mode 100644 index 000000000..c815d621a Binary files /dev/null and b/graphics/AltHUD/SilverBulletDisplay.png differ diff --git a/graphics/AltHUD/SilverBulletFCB.png b/graphics/AltHUD/SilverBulletFCB.png new file mode 100644 index 000000000..fda477d7f Binary files /dev/null and b/graphics/AltHUD/SilverBulletFCB.png differ diff --git a/graphics/AltHUD/SilverBulletFCBCasing.png b/graphics/AltHUD/SilverBulletFCBCasing.png new file mode 100644 index 000000000..6e377ea4a Binary files /dev/null and b/graphics/AltHUD/SilverBulletFCBCasing.png differ diff --git a/graphics/AltHUD/SilverBulletXSB.png b/graphics/AltHUD/SilverBulletXSB.png new file mode 100644 index 000000000..1d336045b Binary files /dev/null and b/graphics/AltHUD/SilverBulletXSB.png differ diff --git a/graphics/AltHUD/SilverBulletXSBCasing.png b/graphics/AltHUD/SilverBulletXSBCasing.png new file mode 100644 index 000000000..88d0d7573 Binary files /dev/null and b/graphics/AltHUD/SilverBulletXSBCasing.png differ diff --git a/graphics/AltHUD/SilverBulletZoomBar.png b/graphics/AltHUD/SilverBulletZoomBar.png new file mode 100644 index 000000000..c1c8c2bed Binary files /dev/null and b/graphics/AltHUD/SilverBulletZoomBar.png differ diff --git a/graphics/AltHUD/SilverBulletZoomDisplay.png b/graphics/AltHUD/SilverBulletZoomDisplay.png new file mode 100644 index 000000000..656f7db18 Binary files /dev/null and b/graphics/AltHUD/SilverBulletZoomDisplay.png differ diff --git a/graphics/AltHUD/SpreadgunDisplay.png b/graphics/AltHUD/SpreadgunDisplay.png new file mode 100644 index 000000000..387d9d898 Binary files /dev/null and b/graphics/AltHUD/SpreadgunDisplay.png differ diff --git a/graphics/AltHUD/StatusBox.png b/graphics/AltHUD/StatusBox.png new file mode 100644 index 000000000..c418c5b34 Binary files /dev/null and b/graphics/AltHUD/StatusBox.png differ diff --git a/graphics/AltHUD/WallbusterCursor.png b/graphics/AltHUD/WallbusterCursor.png new file mode 100644 index 000000000..6ced632cf Binary files /dev/null and b/graphics/AltHUD/WallbusterCursor.png differ diff --git a/graphics/AltHUD/WallbusterDisplay.png b/graphics/AltHUD/WallbusterDisplay.png new file mode 100644 index 000000000..2ba9a7846 Binary files /dev/null and b/graphics/AltHUD/WallbusterDisplay.png differ diff --git a/graphics/AltHUD/WeaponBox.png b/graphics/AltHUD/WeaponBox.png new file mode 100644 index 000000000..71898b066 Binary files /dev/null and b/graphics/AltHUD/WeaponBox.png differ diff --git a/graphics/AltHUD/YnykronBarBeam.png b/graphics/AltHUD/YnykronBarBeam.png new file mode 100644 index 000000000..6d272a15b Binary files /dev/null and b/graphics/AltHUD/YnykronBarBeam.png differ diff --git a/graphics/AltHUD/YnykronBarVortex.png b/graphics/AltHUD/YnykronBarVortex.png new file mode 100644 index 000000000..fb903dfd2 Binary files /dev/null and b/graphics/AltHUD/YnykronBarVortex.png differ diff --git a/graphics/AltHUD/YnykronDisplay.png b/graphics/AltHUD/YnykronDisplay.png new file mode 100644 index 000000000..20decd7e8 Binary files /dev/null and b/graphics/AltHUD/YnykronDisplay.png differ diff --git a/graphics/AltHUD/YnykronIconBeam.png b/graphics/AltHUD/YnykronIconBeam.png new file mode 100644 index 000000000..c54fc0a51 Binary files /dev/null and b/graphics/AltHUD/YnykronIconBeam.png differ diff --git a/graphics/AltHUD/YnykronIconVortex.png b/graphics/AltHUD/YnykronIconVortex.png new file mode 100644 index 000000000..b4c1f7d41 Binary files /dev/null and b/graphics/AltHUD/YnykronIconVortex.png differ diff --git a/language.def_menu b/language.def_menu index f0e0f22c5..f8ad6c0f4 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"; @@ -369,6 +370,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 e79470353..1505fa77a 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"; @@ -373,6 +374,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 19bc4d87b..fc4842ddb 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.28 r2 \cu(Wed 22 Jun 23:39:42 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.2.28 r2 \cu(2022-06-22 23:39:42)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.2.28 r3 \cu(Wed 22 Jun 23:58:55 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.2.28 r3 \cu(2022-06-22 23:58:55)\c-"; diff --git a/menudef.txt b/menudef.txt index 8a84c3857..4a3ced4dc 100644 --- a/menudef.txt +++ b/menudef.txt @@ -117,6 +117,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/textcolors.txt b/textcolors.txt index a2eb7939e..4c5fc8424 100644 --- a/textcolors.txt +++ b/textcolors.txt @@ -92,3 +92,183 @@ Console: Flat: #998B79 } + +// mod-specific minihud font colors +MiniDemoHUD // classic desaturated aqua hud borders +{ + #000000 #080C10 0 50 + #080C10 #101820 51 101 + #101820 #203040 102 151 + #203040 #40607F 152 203 + #40607F #608FBF 204 255 +} +MiniIbukiHUD // dark gray hud borders +{ + #000000 #1A1A1A 0 50 + #1A1A1A #262626 51 101 + #262626 #404040 102 151 + #404040 #4D4D4D 152 203 + #4D4D4D #666666 204 255 +} +MiniSayaHUD // desaturated dark red hud borders +{ + #000000 #100808 0 50 + #100808 #201010 51 101 + #201010 #402020 102 151 + #402020 #7F4040 152 203 + #7F4040 #BF6060 204 255 +} +MiniKirinHUD // brown-ish hud borders +{ + #000000 #331A1A 0 50 + #331A1A #663B33 51 101 + #663B33 #99664D 102 151 + #99664D #CC9966 152 203 + #CC9966 #FFD480 204 255 +} +MiniMarisaHUD // silvery white hud borders +{ + #000000 #1F2233 0 50 + #1F2233 #475266 51 101 + #475266 #7A8A99 102 151 + #7A8A99 #B8C5CC 152 203 + #B8C5CC #FFFFFF 204 255 +} +MiniVoidHUD // faint violet hud borders +{ + #000000 #2D2050 0 50 + #2D2050 #49347D 51 101 + #49347D #5E439A 102 151 + #5E439A #7F66B3 152 203 + #7F66B3 #B09FCD 204 255 +} +// general minihud font colors +MiniWhite +{ + #000000 #FFFFFF +} +MiniRed +{ + #000000 #FF0000 +} +MiniGreen +{ + #000000 #00FF00 +} +MiniBlue +{ + #000000 #3030FF +} +MiniCyan +{ + #000000 #00FFFF +} +MiniYellow +{ + #000000 #FFE030 +} +MiniPurple +{ + #000000 #8000FF +} +// specialized minihud font colors +MiniBrass +{ + #000000 #330800 0 50 + #330800 #662200 51 101 + #662200 #994D00 102 151 + #994D00 #CC8800 152 203 + #CC8800 #FFD500 204 255 +} +MiniSilver +{ + #000000 #262933 0 50 + #262933 #4D5366 51 101 + #4D5366 #737C99 102 151 + #737C99 #99A6CC 152 203 + #99A6CC #BFCFFF 204 255 +} +MiniGold +{ + #000000 #332A00 0 50 + #332A00 #806A00 51 101 + #806A00 #CCAA00 102 151 + #CCAA00 #E6C939 152 203 + #E6C939 #FFEA80 204 255 +} +MiniMana +{ + #000000 #002233 0 50 + #002233 #002266 51 101 + #002266 #000099 102 151 + #000099 #4400CC 152 203 + #4400CC #AA00FF 204 255 +} +MiniCrimson // Anarukon blood +{ + #000000 #330022 0 50 + #330022 #660033 51 101 + #660033 #990033 102 151 + #880033 #CC0022 152 203 + #CC0022 #FF0000 204 255 +} +MiniEldritch // funky green, usually for wild mana +{ + #000000 #003333 0 50 + #003333 #006644 51 101 + #006644 #009944 102 151 + #009944 #00CC33 152 203 + #00CC33 #00FF00 204 255 +} +MiniKinylum // aqua-blue gradient +{ + #000000 #001133 0 50 + #001133 #003366 51 101 + #003366 #006699 102 151 + #006699 #00AACC 152 203 + #00AACC #00FFFF 204 255 +} +MiniNokron // red-pink gradient +{ + #000000 #330033 0 50 + #330033 #660044 51 101 + #660044 #990033 102 151 + #990033 #CC0000 152 203 + #CC0000 #FF5500 204 255 +} +MiniNokorokinylum // violet-blue gradient +{ + #000000 #000055 0 50 + #000055 #1C00AA 51 101 + #1C00AA #5500FF 102 151 + #5500FF #AA55FF 152 203 + #AA55FF #E3AAFF 204 255 +} +MiniDemoBlue // Blue from Demo-chan's chassis +{ + #000000 #110A33 0 50 + #110A33 #1F1F66 51 101 + #1F1F66 #3D4D99 102 151 + #3D4D99 #6688CC 152 203 + #6688CC #99CCFF 204 255 +} +MiniDemoPink // Pink from Demo-chan's chassis +{ + #000000 #330022 0 50 + #330022 #66144B 51 101 + #66144B #993D7A 102 151 + #993D7A #CC7AB1 152 203 + #CC7AB1 #FFCCEE 204 255 +} +// more colors will be added as needed over time +// flash colors (flat, cut to black on outline/shadow) +MiniFlash // "obtained" +{ + #000000 #FFC040 0 50 + #FFC040 #FFC040 51 255 +} +MiniRedFlash // "low health" +{ + #000000 #FF0000 0 50 + #FF0000 #FF0000 51 255 +} diff --git a/zscript.txt b/zscript.txt index 226cc21e6..2d77ab67c 100644 --- a/zscript.txt +++ b/zscript.txt @@ -60,6 +60,7 @@ version "4.8" #include "zscript/hud/swwm_hud.zsc" #include "zscript/hud/swwm_hudextra.zsc" #include "zscript/hud/swwm_hudobjects.zsc" +#include "zscript/hud/swwm_althud.zsc" // kbase #include "zscript/kbase/swwm_kbase.zsc" #include "zscript/kbase/swwm_kbase_priv.zsc" @@ -119,6 +120,7 @@ version "4.8" #include "zscript/weapons/swwm_deathlydeathcannon.zsc" #include "zscript/weapons/swwm_deathlydeathcannon_fx.zsc" #include "zscript/weapons/swwm_weapons_hud.zsc" +#include "zscript/weapons/swwm_weapons_althud.zsc" // monsters #include "zscript/swwm_monsters.zsc" // DLC1 - Weapon Set @@ -144,6 +146,7 @@ version "4.8" #include "zscript/dlc1/swwm_ultimate.zsc" #include "zscript/dlc1/swwm_ultimate_fx.zsc" #include "zscript/dlc1/swwm_dlcweapons_hud.zsc" +#include "zscript/dlc1/swwm_dlcweapons_althud.zsc" // DLC2 - Game Set #include "zscript/dlc2/swwm_demoland.zsc" #include "zscript/dlc2/swwm_demoshmup.zsc" diff --git a/zscript/dlc1/swwm_dlcweapons_althud.zsc b/zscript/dlc1/swwm_dlcweapons_althud.zsc new file mode 100644 index 000000000..e4b365f71 --- /dev/null +++ b/zscript/dlc1/swwm_dlcweapons_althud.zsc @@ -0,0 +1 @@ +// DrawWeaponAlt code for DLC weapons diff --git a/zscript/handler/swwm_handler_process.zsc b/zscript/handler/swwm_handler_process.zsc index 121e745ee..1e60e77f3 100644 --- a/zscript/handler/swwm_handler_process.zsc +++ b/zscript/handler/swwm_handler_process.zsc @@ -3,6 +3,8 @@ extend Class SWWMHandler { // for menu events transient Array checklist; + // for the compact hud + transient int WeaponFlash[10]; override void ConsoleProcess( ConsoleEvent e ) { @@ -504,6 +506,12 @@ extend Class SWWMHandler let s = SWWMStats.Find(players[e.Args[0]]); if ( s ) s.oldcheat = true; } + else if ( e.Name ~== "swwmweaponreceive" ) + { + if ( e.Args[1] != consoleplayer ) return; + if ( (e.Args[0] < 0) || (e.Args[0] > 9) ) return; + WeaponFlash[e.Args[0]] = gametic+25; + } // cheats go here else CheatEvent(e); } diff --git a/zscript/hud/swwm_althud.zsc b/zscript/hud/swwm_althud.zsc new file mode 100644 index 000000000..b1984b160 --- /dev/null +++ b/zscript/hud/swwm_althud.zsc @@ -0,0 +1,747 @@ +// Alternate, more compact hud with full ammo listing + +Class KeyGet +{ + Class got; + int flashtime; +} + +Enum EMiniHUDFontColor +{ + MCR_DEMOHUD, + MCR_IBUKIHUD, + MCR_SAYAHUD, + MCR_KIRINHUD, + MCR_MARISAHUD, + MCR_VOIDHUD, + MCR_WHITE, + MCR_RED, + MCR_GREEN, + MCR_BLUE, + MCR_YELLOW, + MCR_CYAN, + MCR_PURPLE, + MCR_BRASS, + MCR_SILVER, + MCR_GOLD, + MCR_MANA, + MCR_CRIMSON, + MCR_ELDRITCH, + MCR_KINYLUM, + MCR_NOKRON, + MCR_NOKOROKINYLUM, + MCR_DEMOBLUE, + MCR_DEMOPINK, + MCR_FLASH, + MCR_REDFLASH, + NUM_MINIHUD_COLOR +}; + +extend Class SWWMStatusBar +{ + TextureID AltStatusTex, AltWeaponTex, AltScoreTex, AltHealthTex[9], + AltFuelTex[2], AltDashTex, AltGenericAmmoTex[3], AltAmmoTex[3]; + Font MiniHUDFont, MiniHUDFontOutline; + int mhudfontcol[NUM_MINIHUD_COLOR]; + + int PulsePhase; // for health pulsing + + // for flashing some elements in the hud + Array keyflash; + int oldkills, olditems, oldsecrets; + int oldtkills, oldtitems, oldtsecrets; + int killflash, itemflash, secretflash; + int tkillflash, titemflash, tsecretflash; + + // top stuff colors + int tclabel, tcvalue, tcextra, tccompl, tcsucks; + String tclabel_s, tcextra_s; + + int AmmoFlash[17]; // flash when new ammo is received + int AmmoOldAmounts[17]; // to detect when to flash + int AmmoMaxFlash[17]; // flash when ammo max amount changes + int AmmoOldMaxAmounts[17]; // to detect when to flash + Class AmmoSlots[17]; // ammo type on each slot + String AmmoNames[17]; // ammo 4-letter names + int HealthFlash; // flash when healing + int LastHealth; // to detect when to flash + int LagHealth[10]; // for delayed decay bar + + SmoothDynamicValueInterpolator AltHealthInter, AltFuelInter, AltDashInter; + SmoothLinearValueInterpolator LagHealthInter; + + void Alt_FlushInterpolators() + { + int hp = CPlayer.Health; + AltHealthInter.Reset(hp); + for ( int i=9; i>0; i-- ) + LagHealth[i] = hp; + LagHealthInter.Reset(hp); + let d = Demolitionist(CPlayer.mo); + if ( d ) + { + AltFuelInter.Reset(d.dashfuel/2); + AltDashInter.Reset((40-d.dashcooldown)*3); + } + else + { + AltFuelInter.Reset(0); + AltDashInter.Reset(0); + } + } + + void Alt_UpdateInterpolators() + { + int hp = CPlayer.Health; + AltHealthInter.Update(hp); + // flash 'em + if ( hp > LastHealth ) HealthFlash = gametic+25; + // lag + if ( hp > LastHealth ) + { + for ( int i=9; i>0; i-- ) + LagHealth[i] = hp; + } + LagHealth[0] = LastHealth = hp; + LagHealthInter.Update(LagHealth[9]); + for ( int i=9; i>0; i-- ) + LagHealth[i] = LagHealth[i-1]; + // ammo updates + for ( int i=0; i<17; i++ ) + { + let a = SWWMAmmo(CPlayer.mo.FindInventory(AmmoSlots[i])); + int amt = 0; + int maxamt = 0; + if ( a ) + { + amt = a.Amount; + maxamt = a.MaxAmount; + if ( a.MagAmmoType ) + { + let m = MagAmmo(CPlayer.mo.FindInventory(a.MagAmmoType)); + if ( m ) + { + amt *= m.ClipSize; + amt += m.Amount; + maxamt *= m.ClipSize; + } + } + } + else + { + let a = GetDefaultByType(AmmoSlots[i]); + maxamt = a.MaxAmount; + if ( a.MagAmmoType ) + { + let m = GetDefaultByType(a.MagAmmoType); + maxamt *= m.ClipSize; + } + } + if ( (amt > AmmoOldAmounts[i]) && (AmmoOldAmounts[i] != int.min) ) + AmmoFlash[i] = gametic+25; + AmmoOldAmounts[i] = amt; + if ( (maxamt > AmmoOldMaxAmounts[i]) && (AmmoOldMaxAmounts[i] != int.min) ) + AmmoMaxFlash[i] = gametic+25; + AmmoOldMaxAmounts[i] = maxamt; + } + } + + void Alt_Tick() + { + let d = Demolitionist(CPlayer.mo); + if ( d ) + { + AltFuelInter.Update(d.dashfuel/2); + AltDashInter.Update((40-d.dashcooldown)*3); + } + else + { + AltFuelInter.Update(0); + AltDashInter.Update(0); + } + // stats flashing + if ( level.killed_monsters > oldkills ) + { + oldkills = level.killed_monsters; + killflash = gametic+25; + } + if ( level.found_items > olditems ) + { + olditems = level.found_items; + itemflash = gametic+25; + } + if ( level.found_secrets > oldsecrets ) + { + oldsecrets = level.found_secrets; + secretflash = gametic+25; + } + if ( level.total_monsters > oldtkills ) + { + oldtkills = level.total_monsters; + tkillflash = gametic+25; + } + if ( level.total_items > oldtitems ) + { + oldtitems = level.total_items; + titemflash = gametic+25; + } + if ( level.total_secrets > oldtsecrets ) + { + oldtsecrets = level.total_secrets; + tsecretflash = gametic+25; + } + // purge expired key flashes + for ( int i=0; i= gametic ) continue; + keyflash.Delete(i--); + } + // low health pulsing + if ( (CPlayer.health <= 0) || (CPlayer.health > 25) ) + { + PulsePhase = 0; + return; + } + PulsePhase--; + if ( (PulsePhase < 0) || (PulsePhase > CPlayer.health*2+25) ) + PulsePhase = CPlayer.health*2+25; + } + + // hello??? why is this function clearscope??? + override void ReceivedWeapon( Weapon weapn ) + { + Super.ReceivedWeapon(weapn); + int dummy, slot; + [dummy, slot] = players[consoleplayer].weapons.LocateWeapon(weapn.GetClass()); + EventHandler.SendNetworkEvent("swwmweaponreceive",slot,consoleplayer); + } + + void Alt_Init() + { + AltStatusTex = TexMan.CheckForTexture("graphics/AltHUD/StatusBox.png",TexMan.Type_Any); + AltWeaponTex = TexMan.CheckForTexture("graphics/AltHUD/WeaponBox.png",TexMan.Type_Any); + AltScoreTex = TexMan.CheckForTexture("graphics/AltHUD/ScoreBox.png",TexMan.Type_Any); + AltHealthTex[0] = TexMan.CheckForTexture("graphics/AltHUD/HealthBar0.png",TexMan.Type_Any); + AltHealthTex[1] = TexMan.CheckForTexture("graphics/AltHUD/HealthBar1.png",TexMan.Type_Any); + AltHealthTex[2] = TexMan.CheckForTexture("graphics/AltHUD/HealthBar2.png",TexMan.Type_Any); + AltHealthTex[3] = TexMan.CheckForTexture("graphics/AltHUD/HealthBar3.png",TexMan.Type_Any); + AltHealthTex[4] = TexMan.CheckForTexture("graphics/AltHUD/HealthBarS.png",TexMan.Type_Any); + AltHealthTex[5] = TexMan.CheckForTexture("graphics/AltHUD/HealthBarD.png",TexMan.Type_Any); + AltHealthTex[6] = TexMan.CheckForTexture("graphics/AltHUD/HealthBarP.png",TexMan.Type_Any); + AltHealthTex[7] = TexMan.CheckForTexture("graphics/AltHUD/HealthBarF.png",TexMan.Type_Any); + AltHealthTex[8] = TexMan.CheckForTexture("graphics/AltHUD/HealthBarL.png",TexMan.Type_Any); + AltFuelTex[0] = TexMan.CheckForTexture("graphics/AltHUD/FuelBar.png",TexMan.Type_Any); + AltFuelTex[1] = TexMan.CheckForTexture("graphics/AltHUD/FuelBarS.png",TexMan.Type_Any); + AltDashTex = TexMan.CheckForTexture("graphics/AltHUD/DashBar.png",TexMan.Type_Any); + AltGenericAmmoTex[0] = TexMan.CheckForTexture("graphics/AltHUD/GenericAmmoBoxL.png",TexMan.Type_Any); + AltGenericAmmoTex[1] = TexMan.CheckForTexture("graphics/AltHUD/GenericAmmoBoxM.png",TexMan.Type_Any); + AltGenericAmmoTex[2] = TexMan.CheckForTexture("graphics/AltHUD/GenericAmmoBoxR.png",TexMan.Type_Any); + AltAmmoTex[0] = TexMan.CheckForTexture("graphics/AltHUD/AmmoBoxT.png",TexMan.Type_Any); + AltAmmoTex[1] = TexMan.CheckForTexture("graphics/AltHUD/AmmoBoxM.png",TexMan.Type_Any); + AltAmmoTex[2] = TexMan.CheckForTexture("graphics/AltHUD/AmmoBoxB.png",TexMan.Type_Any); + MiniHudFont = Font.GetFont("MiniHUDShadow"); + MiniHudFontOutline = Font.GetFont("MiniHUDOutline"); + mhudfontcol[MCR_DEMOHUD] = Font.FindFontColor("MiniDemoHUD"); + mhudfontcol[MCR_IBUKIHUD] = Font.FindFontColor("MiniIbukiHUD"); + mhudfontcol[MCR_SAYAHUD] = Font.FindFontColor("MiniSayaHUD"); + mhudfontcol[MCR_KIRINHUD] = Font.FindFontColor("MiniKirinHUD"); + mhudfontcol[MCR_MARISAHUD] = Font.FindFontColor("MiniMarisaHUD"); + mhudfontcol[MCR_VOIDHUD] = Font.FindFontColor("MiniVoidHUD"); + mhudfontcol[MCR_WHITE] = Font.FindFontColor("MiniWhite"); + mhudfontcol[MCR_RED] = Font.FindFontColor("MiniRed"); + mhudfontcol[MCR_GREEN] = Font.FindFontColor("MiniGreen"); + mhudfontcol[MCR_BLUE] = Font.FindFontColor("MiniBlue"); + mhudfontcol[MCR_YELLOW] = Font.FindFontColor("MiniYellow"); + mhudfontcol[MCR_CYAN] = Font.FindFontColor("MiniCyan"); + mhudfontcol[MCR_PURPLE] = Font.FindFontColor("MiniPurple"); + mhudfontcol[MCR_BRASS] = Font.FindFontColor("MiniBrass"); + mhudfontcol[MCR_SILVER] = Font.FindFontColor("MiniSilver"); + mhudfontcol[MCR_GOLD] = Font.FindFontColor("MiniGold"); + mhudfontcol[MCR_MANA] = Font.FindFontColor("MiniMana"); + mhudfontcol[MCR_CRIMSON] = Font.FindFontColor("MiniCrimson"); + mhudfontcol[MCR_ELDRITCH] = Font.FindFontColor("MiniEldritch"); + mhudfontcol[MCR_KINYLUM] = Font.FindFontColor("MiniKinylum"); + mhudfontcol[MCR_NOKRON] = Font.FindFontColor("MiniNokron"); + mhudfontcol[MCR_NOKOROKINYLUM] = Font.FindFontColor("MiniNokorokinylum"); + mhudfontcol[MCR_DEMOBLUE] = Font.FindFontColor("MiniDemoBlue"); + mhudfontcol[MCR_DEMOPINK] = Font.FindFontColor("MiniDemoPink"); + mhudfontcol[MCR_FLASH] = Font.FindFontColor("MiniFlash"); + mhudfontcol[MCR_REDFLASH] = Font.FindFontColor("MiniRedFlash"); + tclabel = mhudfontcol[MCR_BRASS]; + tcvalue = mhudfontcol[MCR_WHITE]; + tcextra = mhudfontcol[MCR_IBUKIHUD]; + tccompl = mhudfontcol[MCR_YELLOW]; + tcsucks = mhudfontcol[MCR_RED]; + tclabel_s = "[MiniBrass]"; + tcextra_s = "[MiniIbukiHUD]"; + LastHealth = CPlayer?CPlayer.health:100; + let d = Demolitionist(CPlayer?CPlayer.mo:null); + AltHealthInter = SmoothDynamicValueInterpolator.Create(LastHealth,.5,1,100); + AltFuelInter = SmoothDynamicValueInterpolator.Create(d?(d.dashfuel/2):120,.5,1,120); + AltDashInter = SmoothDynamicValueInterpolator.Create(d?((40-d.dashcooldown)*3):40,.5,1,40); + LagHealthInter = SmoothLinearValueInterpolator.Create(LastHealth,2); + for ( int i=0; i<10; i++ ) LagHealth[i] = LastHealth; + AmmoSlots[0] = 'RedShell'; + AmmoSlots[1] = 'GreenShell'; + AmmoSlots[2] = 'BlueShell'; + AmmoSlots[3] = 'PurpleShell'; + AmmoSlots[4] = 'BlackShell'; + AmmoSlots[5] = 'GoldShell'; + AmmoSlots[6] = 'EvisceratorShell'; + AmmoSlots[7] = 'HellblazerMissiles'; + AmmoSlots[8] = 'HellblazerCrackshots'; + AmmoSlots[9] = 'HellblazerRavagers'; + AmmoSlots[10] = 'HellblazerWarheads'; + AmmoSlots[11] = 'SparkUnit'; + AmmoSlots[12] = 'SilverBulletAmmo'; + AmmoSlots[13] = 'SilverBulletAmmo2'; + AmmoSlots[14] = 'CandyGunAmmo'; + AmmoSlots[15] = 'CandyGunSpares'; + AmmoSlots[16] = 'YnykronAmmo'; + AmmoNames[0] = "SHOT"; + AmmoNames[1] = "SLUG"; + AmmoNames[2] = "SALT"; + AmmoNames[3] = "BALL"; + AmmoNames[4] = "FLCH"; + AmmoNames[5] = "GOLD"; + AmmoNames[6] = "FLAK"; + AmmoNames[7] = "RCKT"; + AmmoNames[8] = "CLUS"; + AmmoNames[9] = "RAVG"; + AmmoNames[10] = "WARH"; + AmmoNames[11] = "BSPK"; + AmmoNames[12] = "RIFL"; + AmmoNames[13] = "CHOD"; + AmmoNames[14] = "CAND"; + AmmoNames[15] = "CGUN"; + AmmoNames[16] = "CRYS"; + for ( int i=0; i<17; i++ ) + { + AmmoFlash[i] = 0; + AmmoOldAmounts[i] = int.min; + AmmoMaxFlash[i] = 0; + AmmoOldMaxAmounts[i] = int.min; + } + } + + void Alt_DrawTopStuff() + { + int xx, yy = margin; + if ( !automapactive && swwm_mm_enable ) + yy += ((HALFMAPSIZE+2)*2)+5; + // draw stats and timer when automap is open + int fstats = swwm_forcestats; + if ( automapactive || (fstats > 0) ) + { + xx = int(ss.x-(margin+2)); + String str; + if ( automapactive || (fstats > 1) ) + { + int label = am_showmaplabel; + String ln = level.levelname; + int iof = ln.IndexOf(" - by: "); + if ( iof != -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(mBigFont,tclabel,xx-mBigFont.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + yy += mBigFont.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) ) + { + 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) ) + { + 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) ) + { + 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; + } + int sec; + if ( am_showtime ) + { + sec = Thinker.Tics2Seconds(level.maptime); + str = String.Format("\c"..tclabel_s.."T \c-%02d\c"..tcextra_s..":\c-%02d\c"..tcextra_s..":\c-%02d",sec/3600,(sec%3600)/60,sec%60); + Screen.DrawText(MiniHUDFontOutline,((level.sucktime>0)&&(sec>=(level.sucktime*3600)))?tcsucks:((level.partime>0)&&(sec<=level.partime))?tccompl:tcvalue,xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + yy += MiniHUDFontOutline.GetHeight()+2; + } + // don't show total time if it's equal to map time + if ( am_showtotaltime && (level.totaltime != level.maptime) ) + { + sec = Thinker.Tics2Seconds(level.totaltime); + str = String.Format("\c"..tclabel_s.."TT \c-%02d\c"..tcextra_s..":\c-%02d\c"..tcextra_s..":\c-%02d",sec/3600,(sec%3600)/60,sec%60); + Screen.DrawText(MiniHUDFontOutline,tcvalue,xx-MiniHUDFontOutline.StringWidth(str),yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + yy += MiniHUDFontOutline.GetHeight()+2; + } + yy += 3; + } + // draw key icons + Vector2 keypos = (ss.x-(margin+2),yy); + int colc = 0; + double colh = 0; + int n = Key.GetKeyTypeCount(); + Array klist; + for ( int i=0; i= keyflash[j].flashtime) ) continue; + double alph = max((keyflash[j].flashtime-(gametic+FracTic))/25.,0.)**1.5; + Screen.DrawTexture(icon,false,keypos.x-siz.x,keypos.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_TopLeft,true,DTA_ColorOverlay,0xFFFFC040,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph); + break; + } + keypos.x -= siz.x+2; + colh = max(colh,siz.y); + if ( ++colc == maxcolc ) + { + keypos.x = ss.x-(margin+2); + keypos.y += colh+2; + colh = colc = 0; + } + } + } + + void Alt_DrawWeapons() + { + if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeaponAlt(FracTic,ss.x-(margin+56),ss.y-(margin+12),hs,ss); + else if ( CPlayer.ReadyWeapon ) + { + // generic display + double xx = ss.x-(margin+58), yy = ss.y-(margin+22); + String str; + int len; + if ( CPlayer.ReadyWeapon.Ammo2 && (CPlayer.ReadyWeapon.Ammo2 != CPlayer.ReadyWeapon.Ammo1) ) + { + str = String.Format("%d",CPlayer.ReadyWeapon.Ammo2.Amount); + len = str.Length(); + yy -= 12; + Screen.DrawTexture(AltGenericAmmoTex[2],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + for ( int i=0; i 0) || Weapon(inv).bAMMO_OPTIONAL) || (Weapon(inv).Ammo2 && ((Weapon(inv).Ammo2.Amount > 0) || Weapon(inv).bALT_AMMO_OPTIONAL))) ) + hasammo = true; + } + if ( !hasammo ) ncolor = mhudfontcol[MCR_RED]; + } + Screen.DrawText(MiniHUDFont,ncolor,xx,yy,String.Format("%d",(i%10)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + int f = hnd.WeaponFlash[i%10]; + if ( f && (gametic < f) ) + { + double alph = max((f-(gametic+FracTic))/25.,0.)**1.5; + Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],xx,yy,String.Format("%d",(i%10)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph,DTA_LegacyRenderStyle,STYLE_Add); + } + } + xx = ss.x-(margin+54); + yy = ss.y-(margin+14); + Screen.DrawTexture(AltAmmoTex[2],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + String str; + for ( int i=16; i>=0; i-- ) + { + yy -= 6; + Screen.DrawTexture(AltAmmoTex[1],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + xx += 2; + let a = AmmoSlots[i]; + let cur = SWWMAmmo(CPlayer.mo.FindInventory(a)); + int amt, amax; + if ( !cur ) + { + amt = 0; + amax = GetDefaultByType(a).MaxAmount; + let def = GetDefaultByType(a); + if ( def.MagAmmoType ) + amax *= GetDefaultByType(def.MagAmmoType).ClipSize; + } + else + { + amt = cur.Amount; + amax = cur.MaxAmount; + if ( cur.MagAmmoType ) + { + let mag = MagAmmo(CPlayer.mo.FindInventory(cur.MagAmmoType)); + // theoretically this should never be null, but nevertheless... + if ( mag ) + { + amt = amt*mag.ClipSize+mag.Amount; + amax = amax*mag.ClipSize+mag.MaxAmount; + } + else + { + let def = GetDefaultByType(cur.MagAmmoType); + amt = amt*def.ClipSize; + amax = amax*def.ClipSize+def.MaxAmount; + } + } + } + bool selected = false, used = false; + if ( CPlayer.ReadyWeapon ) + { + if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) + { + selected = SWWMWeapon(CPlayer.ReadyWeapon).IsCurrentAmmo(a); + used = SWWMWeapon(CPlayer.ReadyWeapon).UsesAmmo(a); + } + else used = selected = (CPlayer.ReadyWeapon.AmmoType1 == a)||(CPlayer.ReadyWeapon.AmmoType2 == a); + } + int scol = mhudfontcol[selected?MCR_BRASS:MCR_WHITE]; + int ncolor = (amt>0)?scol:mhudfontcol[MCR_RED]; + int dcnt1 = 2-int(Log10(clamp(amt,1,999))); + int dcnt2 = 2-int(Log10(clamp(amax,1,999))); + for ( int j=0; j 500 ) hcolor = MCR_YELLOW; + else if ( round(ht) > 200 ) hcolor = MCR_PURPLE; + else if ( round(ht) > 100 ) hcolor = MCR_CYAN; + if ( isInvulnerable() || CPlayer.mo.FindInventory("InvinciballPower") ) + { + Screen.DrawTexture(AltHealthTex[0],false,margin+3,ss.y-(margin+19),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,Color(255,0,0,0)); + Screen.DrawTexture(AltHealthTex[4],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); + hcolor = MCR_WHITE; + } + else + { + Screen.DrawTexture(AltHealthTex[0],false,margin+3,ss.y-(margin+19),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_ColorOverlay,Color(255,0,0,0)); + Screen.DrawTexture(AltHealthTex[0],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); + if ( ht > 100 ) + { + hw = min(ht-100,100); + Screen.DrawTexture(AltHealthTex[1],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); + } + if ( ht > 200 ) + { + hw = min(ht-200,300)/3.; + Screen.DrawTexture(AltHealthTex[2],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); + } + if ( ht > 500 ) + { + hw = min(ht-500,500)/5.; + Screen.DrawTexture(AltHealthTex[3],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw); + } + } + if ( CPlayer.mo.FindInventory("DivineSpriteEffect") ) + { + double falph = clamp((ht-1000)/6000.,0.,1.); + Screen.DrawTexture(AltHealthTex[5],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph,DTA_LegacyRenderStyle,STYLE_Add); + String tst; + double alph = .1; + int trl = 9; + for ( double alph = .1; alph <= .5; alph += .1 ) + { + tst = "AAA"; + SWWMUtility.ObscureText(tst,(gametic-trl)/3,true); + trl--; + Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_WHITE],margin+107,ss.y-(margin+20),tst,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,falph*alph,DTA_LegacyRenderStyle,STYLE_Add); + } + Screen.DrawText(MiniHUDFont,mhudfontcol[hcolor],margin+107,ss.y-(margin+20),String.Format("%3d",clamp(round(ht),0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,1.-falph); + } + else + { + Screen.DrawText(MiniHUDFont,mhudfontcol[hcolor],margin+107,ss.y-(margin+20),String.Format("%3d",clamp(round(ht),0,999)),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + int f = HealthFlash; + if ( f && (gametic < f) ) + { + double alph = max((f-(gametic+FracTic))/25.,0.)**1.5; + Screen.DrawTexture(AltHealthTex[7],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,bhw,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph); + Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_FLASH],margin+107,ss.y-(margin+20),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_LegacyRenderStyle,STYLE_Add,DTA_Alpha,alph); + } + if ( (CPlayer.health > 0) && (CPlayer.health <= 25) && (PulsePhase <= 15) ) + { + double alph = clamp(sin((PulsePhase-FracTic)*12.),0.,1.); + Screen.DrawTexture(AltHealthTex[6],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,hw,DTA_Alpha,alph); + Screen.DrawText(MiniHUDFont,mhudfontcol[MCR_REDFLASH],margin+107,ss.y-(margin+20),str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); + } + ht = clamp(LagHealthInter.GetValue(fractic),0,1000); + double hwl = min(ht,100); + if ( hwl > bhw ) + { + Screen.DrawTexture(AltHealthTex[8],false,margin+3,ss.y-(margin+19),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,bhw,DTA_WindowRightF,hwl,DTA_ColorOverlay,Color(255,0,0,0)); + Screen.DrawTexture(AltHealthTex[8],false,margin+2,ss.y-(margin+20),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowLeftF,bhw,DTA_WindowRightF,hwl); + } + } + double ft = clamp(AltFuelInter.GetValue(fractic),0,120); + Screen.DrawTexture(AltFuelTex[swwm_superfuel],false,margin+3,ss.y-(margin+7),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,ft,DTA_ColorOverlay,Color(255,0,0,0)); + Screen.DrawTexture(AltFuelTex[swwm_superfuel],false,margin+2,ss.y-(margin+8),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,ft); + let d = Demolitionist(CPlayer.mo); + bool blink = (!d || (d.dashfuel > 20) || ((gametic%10) < 5)); + double dt = clamp(AltDashInter.GetValue(fractic),0,120); + Screen.DrawTexture(AltDashTex,false,margin+3,ss.y-(margin+4),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,dt,DTA_ColorOverlay,Color(255,0,0,0)); + Screen.DrawTexture(AltDashTex,false,margin+2,ss.y-(margin+5),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,dt,DTA_ColorOverlay,Color(blink?0:96,0,0,0)); + } +} diff --git a/zscript/hud/swwm_hud.zsc b/zscript/hud/swwm_hud.zsc index d6ac9423a..40031a7ac 100644 --- a/zscript/hud/swwm_hud.zsc +++ b/zscript/hud/swwm_hud.zsc @@ -68,6 +68,7 @@ Class SWWMStatusBar : BaseStatusBar bool camhidden; int pausetime; Vector2 pausepos, pausedir; + bool isalthud; // shared from renderunderlay, needed for proper interpolation of some things Vector3 viewpos, viewrot; @@ -119,6 +120,7 @@ Class SWWMStatusBar : BaseStatusBar ScoreInter.Reset(SWWMCredits.Get(CPlayer)); FuelInter.Reset((CPlayer.mo is 'Demolitionist')?int(Demolitionist(CPlayer.mo).dashfuel):0); DashInter.Reset((CPlayer.mo is 'Demolitionist')?int((40-Demolitionist(CPlayer.mo).dashcooldown)*3.):0); + Alt_FlushInterpolators(); if ( level.maptime <= 1 ) { // flush ALL messages @@ -164,6 +166,19 @@ Class SWWMStatusBar : BaseStatusBar } return true; } + else if ( msg.Left(11) ~== "swwmkeyget." ) + { + String kname = msg.Mid(11); + Class k = kname; + if ( k ) + { + let kg = new("KeyGet"); + kg.got = k; + kg.flashtime = gametic+25; + keyflash.Push(kg); + } + return true; + } SWWMDirectMessage m, m2; // more hack if ( msg ~== "swwmultdoom2map20dlg" ) @@ -938,8 +953,8 @@ Class SWWMStatusBar : BaseStatusBar void TickInterpolators() { HealthInter.Update(CPlayer.health); - if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); ScoreInter.Update(SWWMCredits.Get(CPlayer)); + Alt_UpdateInterpolators(); } override void Tick() @@ -989,6 +1004,7 @@ Class SWWMStatusBar : BaseStatusBar if ( abs(minimapzoom-desiredzoom) <= .01 ) minimapzoom = desiredzoom; } + if ( !hnd ) hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); let cam = players[consoleplayer].camera; Vector3 viewvec = (cos(viewrot.x)*cos(viewrot.y),sin(viewrot.x)*cos(viewrot.y),sin(-viewrot.y)); int sz; @@ -1142,6 +1158,7 @@ Class SWWMStatusBar : BaseStatusBar } } lastwep = CPlayer.PendingWeapon; + Alt_Tick(); // make sure vanilla nametags don't display DetachMessageID(0x5745504e); // WEPN DetachMessageID(0x53494e56); // SINV @@ -1242,6 +1259,7 @@ Class SWWMStatusBar : BaseStatusBar FuelInter = DynamicValueInterpolator.Create(120,.5,1,100); DashInter = DynamicValueInterpolator.Create(120,.5,1,40); hnd = SWWMHandler(EventHandler.Find("SWWMHandler")); + Alt_Init(); PrevFrame = MSTimeF(); } @@ -2184,14 +2202,18 @@ Class SWWMStatusBar : BaseStatusBar return StringTable.Localize("$SWWM_PLACE"..val); } - private void DrawScore() + private void DrawTopStuff( bool minimaponly = false ) { - String sstr = String.Format("%09d",ScoreInter.GetValue()); - int xx = 73; - Screen.DrawTexture(ScoreTex,false,ss.x-(margin+xx),margin,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); - xx -= 15; - Screen.DrawText(mSmallFont,Font.CR_FIRE,ss.x-(margin+xx),margin+2,sstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); - int yy = margin+19; + int xx, yy = margin; + if ( !minimaponly ) + { + String sstr = String.Format("%09d",ScoreInter.GetValue()); + xx = 73; + Screen.DrawTexture(ScoreTex,false,ss.x-(margin+xx),margin,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + xx -= 15; + Screen.DrawText(mSmallFont,Font.CR_FIRE,ss.x-(margin+xx),margin+2,sstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + yy = margin+19; + } // obviously, don't draw the minimap if the automap is open if ( !automapactive && swwm_mm_enable ) { @@ -2218,6 +2240,7 @@ Class SWWMStatusBar : BaseStatusBar Screen.ClearClipRect(); yy += ((HALFMAPSIZE+2)*2)+3; } + if ( minimaponly ) return; // draw stats and timer when automap is open int fstats = swwm_forcestats; if ( automapactive || (fstats > 0) ) @@ -2341,7 +2364,7 @@ Class SWWMStatusBar : BaseStatusBar } } - private bool DrawInvIcon( Inventory i, double xx, double yy, double alpha = 1., bool forceamt = false, bool aspowerup = false ) + private bool DrawInvIcon( Inventory i, double xx, double yy, double alpha = 1., bool forceamt = false, bool selected = false, bool aspowerup = false ) { if ( !i || !i.Icon.IsValid() ) return false; Vector2 scl = TexMan.GetScaledSize(i.Icon); @@ -2352,24 +2375,48 @@ Class SWWMStatusBar : BaseStatusBar { Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,Powerup(i).IsBlinking()?alpha*.5:alpha,DTA_TopOffset,0,DTA_LeftOffset,0); String nstr = String.Format("%ds",Powerup(i).EffectTics/GameTicRate); - int len = mSmallFont.StringWidth(nstr); - Screen.DrawText(mSmallFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,Powerup(i).IsBlinking()?alpha*.5:alpha); + if ( isalthud ) + { + int len = MiniHudFontOutline.StringWidth(nstr); + Screen.DrawText(MiniHudFontOutline,mhudfontcol[MCR_BRASS],(xx+30)-len,(yy+30)-6,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,Powerup(i).IsBlinking()?alpha*.5:alpha); + } + else + { + int len = mSmallFont.StringWidth(nstr); + Screen.DrawText(mSmallFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,Powerup(i).IsBlinking()?alpha*.5:alpha); + } return true; } if ( (i is 'SWWMLamp') && aspowerup ) { Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,SWWMLamp(i).isBlinking()?alpha*.5:alpha,DTA_TopOffset,0,DTA_LeftOffset,0); String nstr = String.Format("%d%%",SWWMLamp(i).Charge); - int len = mSmallFont.StringWidth(nstr); - Screen.DrawText(mSmallFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,SWWMLamp(i).isBlinking()?alpha*.5:alpha); + if ( isalthud ) + { + int len = MiniHudFontOutline.StringWidth(nstr); + Screen.DrawText(MiniHudFontOutline,mhudfontcol[SWWMLamp(i).bActive?MCR_BRASS:MCR_WHITE],(xx+30)-len,(yy+30)-6,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,SWWMLamp(i).isBlinking()?alpha*.5:alpha); + } + else + { + int len = mSmallFont.StringWidth(nstr); + Screen.DrawText(mSmallFont,SWWMLamp(i).bActive?Font.CR_FIRE:Font.CR_WHITE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,SWWMLamp(i).isBlinking()?alpha*.5:alpha); + } return true; } if ( (i is 'DivineSpriteEffect') && aspowerup ) { Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,DivineSpriteEffect(i).isBlinking()?alpha*.5:alpha,DTA_TopOffset,0,DTA_LeftOffset,0); String nstr = String.Format("%ds",DivineSpriteEffect(i).healtim/GameTicRate); - int len = mSmallFont.StringWidth(nstr); - Screen.DrawText(mSmallFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,DivineSpriteEffect(i).isBlinking()?alpha*.5:alpha); + if ( isalthud ) + { + int len = MiniHudFontOutline.StringWidth(nstr); + Screen.DrawText(MiniHudFontOutline,mhudfontcol[MCR_BRASS],(xx+30)-len,(yy+30)-6,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,DivineSpriteEffect(i).isBlinking()?alpha*.5:alpha); + } + else + { + int len = mSmallFont.StringWidth(nstr); + Screen.DrawText(mSmallFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,DivineSpriteEffect(i).isBlinking()?alpha*.5:alpha); + } return true; } Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_TopOffset,0,DTA_LeftOffset,0); @@ -2378,40 +2425,48 @@ Class SWWMStatusBar : BaseStatusBar String nstr; if ( (i.Amount > 99999) && !forceamt ) nstr = "99999"; else nstr = String.Format("%d",i.Amount); - int len = mSmallFont.StringWidth(nstr); - Screen.DrawText(mSmallFont,Font.CR_FIRE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha); + if ( isalthud ) + { + int len = MiniHudFontOutline.StringWidth(nstr); + Screen.DrawText(MiniHudFontOutline,mhudfontcol[(i.Amount<=0)?MCR_RED:selected?MCR_BRASS:MCR_WHITE],(xx+30)-len,(yy+30)-6,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha); + } + else + { + int len = mSmallFont.StringWidth(nstr); + Screen.DrawText(mSmallFont,(i.Amount<=0)?Font.CR_RED:selected?Font.CR_FIRE:Font.CR_WHITE,(xx+30)-len,(yy+30)-10,nstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha); + } } return true; } - private void DrawInventory() + private void DrawInventory( int invy = 58 ) { // active items (armor / powerups) double xx = margin+2; - double yy = ss.y-(margin+58); + double yy = ss.y-(margin+invy); if ( CPlayer.mo.InvSel && !isInventoryBarVisible() ) yy -= 34; bool drewarmor = false; for ( Inventory i=CPlayer.mo.Inv; i; i=i.Inv ) { if ( (i.Amount <= 0) || (!(i is 'SWWMArmor') && !(i is 'BasicArmor')) ) continue; - if ( !DrawInvIcon(i,xx,yy,forceamt:true) ) continue; + if ( !DrawInvIcon(i,xx,yy,forceamt:true,selected:true) ) continue; yy -= 34; drewarmor = true; } - yy = ss.y-(margin+58); + yy = ss.y-(margin+invy); if ( drewarmor ) xx += 40; else if ( CPlayer.mo.InvSel && !isInventoryBarVisible() ) yy -= 34; for ( Inventory i=CPlayer.mo.Inv; i; i=i.Inv ) { if ( (i is 'SWWMLamp') && SWWMLamp(i).bActivated ) { - DrawInvIcon(i,xx,yy,aspowerup:true); + DrawInvIcon(i,xx,yy,selected:true,aspowerup:true); yy -= 34; continue; } if ( (i is 'DivineSpriteEffect') && !DivineSpriteEffect(i).bHealDone ) { - DrawInvIcon(i,xx,yy,aspowerup:true); + DrawInvIcon(i,xx,yy,selected:true,aspowerup:true); yy -= 34; continue; } @@ -2445,18 +2500,18 @@ Class SWWMStatusBar : BaseStatusBar xx = (ss.x-34)/2; yy = (ss.y+64)/2; Screen.DrawTexture(InventoryTex,false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); - DrawInvIcon(CPlayer.mo.InvSel,xx+2,yy+2); + DrawInvIcon(CPlayer.mo.InvSel,xx+2,yy+2,selected:true); DrawInvIcon(prev[0],xx-32,yy+2,2./3.); DrawInvIcon(prev[1],xx-66,yy+2,1./3.); DrawInvIcon(next[0],xx+36,yy+2,2./3.); DrawInvIcon(next[1],xx+70,yy+2,1./3.); return; } - Screen.DrawTexture(InventoryTex,false,margin,ss.y-(margin+60),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); - DrawInvIcon(CPlayer.mo.InvSel,margin+2,ss.y-(margin+58)); + Screen.DrawTexture(InventoryTex,false,margin,ss.y-(margin+invy+2),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + DrawInvIcon(CPlayer.mo.InvSel,margin+2,ss.y-(margin+invy),selected:true); } - private void DrawWeapon() + private void DrawWeapons() { if ( CPlayer.ReadyWeapon is 'SWWMWeapon' ) SWWMWeapon(CPlayer.ReadyWeapon).DrawWeapon(FracTic,ss.x-margin,ss.y-(margin+28),hs,ss); else if ( CPlayer.ReadyWeapon ) @@ -2884,6 +2939,7 @@ Class SWWMStatusBar : BaseStatusBar ssi = (Screen.GetWidth()/hsi,Screen.GetHeight()/hsi); ssd = (Screen.GetWidth()/hsd,Screen.GetHeight()/hsd); FracTic = TicFrac; + isalthud = swwm_althud; if ( camhidden ) { if ( hnd ) hnd.DrawBossBar(self); @@ -2894,12 +2950,20 @@ Class SWWMStatusBar : BaseStatusBar else { DrawTarget(); - if ( state != HUD_AltHUD ) // proper support for an alt hud will come someday + if ( isalthud ) { - DrawScore(); + DrawTopStuff(true); + Alt_DrawTopStuff(); + DrawInventory(56); + Alt_DrawStatus(); + Alt_DrawWeapons(); + } + else + { + DrawTopStuff(); DrawInventory(); DrawStatus(); - DrawWeapon(); + DrawWeapons(); } if ( hnd ) hnd.DrawBossBar(self); DrawPickups(); diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index 88922480e..a2282c015 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -202,3 +202,65 @@ Class SWWMFlyTracker : Inventory +INVENTORY.UNCLEARABLE; } } + +// fractic-compatible interpolators, with double value +Class SmoothLinearValueInterpolator +{ + private double val, oldval, diff; + + static SmoothLinearValueInterpolator Create( double val, double diff ) + { + let v = new("SmoothLinearValueInterpolator"); + v.oldval = v.val = val; + v.diff = diff; + return v; + } + void Reset( double newval ) + { + oldval = val = newval; + } + void Update( double newval ) + { + oldval = val; + if ( abs(newval-val) < diff ) val = newval; + else if ( val > newval ) val = max(newval,val-diff); + else val = min(newval,val+diff); + } + double GetValue( double fractic = 1. ) + { + return SWWMUtility.Lerp(oldval,val,fractic); + } +} +Class SmoothDynamicValueInterpolator +{ + private double val, oldval, factor, mindiff, maxdiff; + + static SmoothDynamicValueInterpolator Create( double val, double factor, double mindiff, double maxdiff ) + { + let v = new("SmoothDynamicValueInterpolator"); + v.oldval = v.val = val; + v.factor = factor; + v.mindiff = mindiff; + v.maxdiff = maxdiff; + return v; + } + void Reset( double newval ) + { + oldval = val = newval; + } + void Update( double newval ) + { + oldval = val; + if ( abs(newval-val) < mindiff ) val = newval; + else + { + double diff = min(abs(newval-val)*factor,maxdiff); + if ( val > newval ) val = max(newval,val-diff); + else val = min(newval,val+diff); + } + } + double GetValue( double fractic = 1. ) + { + return SWWMUtility.Lerp(oldval,val,fractic); + } +} diff --git a/zscript/utility/swwm_utility.zsc b/zscript/utility/swwm_utility.zsc index 11bcff58b..721368541 100644 --- a/zscript/utility/swwm_utility.zsc +++ b/zscript/utility/swwm_utility.zsc @@ -354,7 +354,7 @@ Class SWWMUtility return str; } - static clearscope void ObscureText( out String str, int seed ) + static clearscope void ObscureText( out String str, int seed, bool alnum = false ) { int len = str.CodePointCount(); String newstr = ""; @@ -365,6 +365,12 @@ Class SWWMUtility [ch, pos] = str.GetNextCodePoint(pos); if ( (ch == 0x20) || (ch == 0x09) || (ch == 0x0A) ) newstr.AppendCharacter(ch); + else if ( alnum ) + { + int sd = abs(seed%36); + if ( sd >= 10 ) sd += 7; + newstr.AppendCharacter(sd+48); + } else newstr.AppendCharacter((abs(seed)%95)+32); } str = newstr; diff --git a/zscript/weapons/swwm_baseweapon.zsc b/zscript/weapons/swwm_baseweapon.zsc index d1b64778a..e32b4d0f0 100644 --- a/zscript/weapons/swwm_baseweapon.zsc +++ b/zscript/weapons/swwm_baseweapon.zsc @@ -343,6 +343,10 @@ Class SWWMWeapon : Weapon abstract virtual ui void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss ) { } + // for alt hud + virtual ui void DrawWeaponAlt( double TicFrac, double bx, double by, double hs, Vector2 ss ) + { + } // animations action void A_PlayerFire() { @@ -456,6 +460,11 @@ Class SWWMWeapon : Weapon abstract { return (AmmoType1&&(kind is AmmoType1))||(AmmoType2&&(kind is AmmoType2)); } + // for the alt hud, this is meant for weapons with switchable types + virtual clearscope bool IsCurrentAmmo( Class kind ) + { + return false; + } override void ModifyDropAmount( int dropamount ) { self.dropamount = dropamount; @@ -545,6 +554,14 @@ Class SWWMDualWeaponGiver : Inventory FloatBobStrength 0.25; } + override void BeginPlay() + { + Super.BeginPlay(); + if ( !swwm_extendedpickup ) return; + let box = Spawn("SWWMExtendedItemHitbox",pos); + box.master = self; + } + override void Touch( Actor toucher ) { // show prompt to swap weapon, and prevent normal pickup diff --git a/zscript/weapons/swwm_baseweapon_fx.zsc b/zscript/weapons/swwm_baseweapon_fx.zsc index 45f6d784d..45b223272 100644 --- a/zscript/weapons/swwm_baseweapon_fx.zsc +++ b/zscript/weapons/swwm_baseweapon_fx.zsc @@ -257,7 +257,7 @@ Class BigPunchImpact : Actor override void PostBeginPlay() { Super.PostBeginPlay(); - A_QuakeEx(8,8,8,18,0,600,"",QF_RELATIVE|QF_SCALEDOWN,falloff:200,rollIntensity:.9); + A_QuakeEx(8,8,8,18,0,600,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:200,rollIntensity:.9); A_StartSound("demolitionist/xpunch",CHAN_VOICE,CHANF_DEFAULT,bAMBUSH?.6:1.); A_SprayDecal("BigWallCrack",-20); int numpt = Random[Ponch](9,16); diff --git a/zscript/weapons/swwm_blazeit.zsc b/zscript/weapons/swwm_blazeit.zsc index c0349af29..fb13efb5d 100644 --- a/zscript/weapons/swwm_blazeit.zsc +++ b/zscript/weapons/swwm_blazeit.zsc @@ -241,6 +241,11 @@ Class Hellblazer : SWWMWeapon return false; } + override bool IsCurrentAmmo( Class kind ) + { + return (kind is nextammo); + } + action void A_GlassOverlay( StateLabel g ) { player.SetPSprite(PSP_WEAPON+1,invoker.FindState(g)); diff --git a/zscript/weapons/swwm_cbt.zsc b/zscript/weapons/swwm_cbt.zsc index 7e4d1f641..83d19e3b1 100644 --- a/zscript/weapons/swwm_cbt.zsc +++ b/zscript/weapons/swwm_cbt.zsc @@ -28,7 +28,6 @@ Class Wallbuster : SWWMWeapon if ( curobt is 'PurpleShell' ) return StringTable.Localize("$O_WALLBUSTER_PURPLE"); return Super.GetObituary(victim,inflictor,mod,playerattack); } - override void HudTick() { Super.HudTick(); diff --git a/zscript/weapons/swwm_deathlydeathcannon.zsc b/zscript/weapons/swwm_deathlydeathcannon.zsc index f2cdafb99..ec7ec3ec8 100644 --- a/zscript/weapons/swwm_deathlydeathcannon.zsc +++ b/zscript/weapons/swwm_deathlydeathcannon.zsc @@ -4,6 +4,7 @@ Class Ynykron : SWWMWeapon { transient ui DynamicValueInterpolator ChargeInter; + transient ui SmoothDynamicValueInterpolator AltChargeInter; enum EChargeState { @@ -31,6 +32,8 @@ Class Ynykron : SWWMWeapon Super.HudTick(); if ( !ChargeInter ) ChargeInter = DynamicValueInterpolator.Create(int(chargelevel*10),.5,1,400); ChargeInter.Update(int(chargelevel*10)); + if ( !AltChargeInter ) AltChargeInter = SmoothDynamicValueInterpolator.Create(chargelevel*10,.5,1.,400.); + AltChargeInter.Update(chargelevel*10); if ( lastmode && (lastmode != inverted+1) && (Owner.player == players[consoleplayer]) ) { let bar = SWWMStatusBar(statusbar); diff --git a/zscript/weapons/swwm_deepdarkimpact.zsc b/zscript/weapons/swwm_deepdarkimpact.zsc index b5735430e..92f67c888 100644 --- a/zscript/weapons/swwm_deepdarkimpact.zsc +++ b/zscript/weapons/swwm_deepdarkimpact.zsc @@ -50,6 +50,7 @@ Class DeepImpact : SWWMWeapon bool charging; transient ui DynamicValueInterpolator ChargeInter; + transient ui SmoothDynamicValueInterpolator AltChargeInter; transient int failtime; Property ClipCount : clipcount; @@ -59,6 +60,8 @@ Class DeepImpact : SWWMWeapon Super.HudTick(); if ( !ChargeInter ) ChargeInter = DynamicValueInterpolator.Create(clipcount,.5,1,25); ChargeInter.Update(clipcount); + if ( !AltChargeInter ) AltChargeInter = SmoothDynamicValueInterpolator.Create(clipcount,.5,1.,25.); + AltChargeInter.Update(clipcount); } override bool ReportHUDAmmo() diff --git a/zscript/weapons/swwm_shot.zsc b/zscript/weapons/swwm_shot.zsc index 6d35c6fb1..abaf9759a 100644 --- a/zscript/weapons/swwm_shot.zsc +++ b/zscript/weapons/swwm_shot.zsc @@ -179,6 +179,11 @@ Class Spreadgun : SWWMWeapon return false; } + override bool IsCurrentAmmo( Class kind ) + { + return (kind is nextammo); + } + action void A_SelectUnloadState() { static const Class types[] = {"RedShell","GreenShell","BlueShell","PurpleShell","BlackShell","GoldShell"}; diff --git a/zscript/weapons/swwm_thiccboolet.zsc b/zscript/weapons/swwm_thiccboolet.zsc index 457d12a8a..aaeaa07c9 100644 --- a/zscript/weapons/swwm_thiccboolet.zsc +++ b/zscript/weapons/swwm_thiccboolet.zsc @@ -225,6 +225,7 @@ Class SilverBullet : SWWMWeapon int nkills; transient ui DynamicValueInterpolator ZoomInter; + transient ui SmoothDynamicValueInterpolator AltZoomInter; bool zoomed; double zoomlevel; @@ -249,6 +250,8 @@ Class SilverBullet : SWWMWeapon Super.HudTick(); if ( !ZoomInter ) ZoomInter = DynamicValueInterpolator.Create(int(zoomlevel*10),.5,1,20); ZoomInter.Update(int(zoomlevel*10)); + if ( !AltZoomInter ) AltZoomInter = SmoothDynamicValueInterpolator.Create(zoomlevel*10,.5,1.,20.); + AltZoomInter.Update(zoomlevel*10); if ( lastammo && (lastammo != fcbselected+1) && (Owner.player == players[consoleplayer]) ) { let bar = SWWMStatusBar(statusbar); @@ -268,6 +271,11 @@ Class SilverBullet : SWWMWeapon if ( (Ammo1.Amount <= 0) && (Ammo2.Amount <= 0) && (Owner.CountInv("SilverBullets") <= 0) && (Owner.CountInv("SilverBullets2") <= 0) ) return false; return true; } + override bool IsCurrentAmmo( Class kind ) + { + if ( fcbselected ) return (kind is AmmoType2); + return (kind is AmmoType1); + } override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount ) { if ( sv_infiniteammo || Owner.FindInventory('PowerInfiniteAmmo',true) ) return true; diff --git a/zscript/weapons/swwm_weapons_althud.zsc b/zscript/weapons/swwm_weapons_althud.zsc new file mode 100644 index 000000000..c77849577 --- /dev/null +++ b/zscript/weapons/swwm_weapons_althud.zsc @@ -0,0 +1,298 @@ +// 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-8,by-25,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + double chg = clamp(AltChargeInter?AltChargeInter.GetValue(TicFrac):clipcount,0.,100.); + double ch = chg*20./100.; + bool blinking = (failtime>gametic)&&((failtime-gametic)%8>=4); + Screen.DrawTexture(AltAmmoBar,false,bx-5,by-(2+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,20.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,DTA_ColorOverlay,Color(255,0,0,0)); + Screen.DrawTexture(AltAmmoBar,false,bx-6,by-(3+ch),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcY,20.-ch,DTA_SrcHeight,ch,DTA_DestHeightF,ch,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-10,by-21,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( chambered ) Screen.DrawTexture(AltRoundTex,false,bx-8,by-19,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + for ( int i=0; i types[] = {"RedShell","GreenShell","BlueShell","PurpleShell","BlackShell","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/ShellBlue.png",TexMan.Type_Any); + if ( !AltRoundTex[3] ) AltRoundTex[3] = TexMan.CheckForTexture("graphics/AltHUD/ShellPurple.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/ShellGold.png",TexMan.Type_Any); + Screen.DrawTexture(AltWeaponBox,false,bx-10,by-7,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( !chambered ) return; + for ( int i=0; i<6; i++ ) + { + if ( loadammo != types[i] ) continue; + Screen.DrawTexture(AltRoundTex[i],false,bx-8,by-5,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-12,by-75,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + int curpos = 73-(rotation[5]*15+rotation[rotation[5]]*2); + Screen.DrawTexture(AltCursorTex,false,bx-10,by-curpos,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + for ( int i=0; i<25; i++ ) + { + curpos = 73-(i*2+(i/5)*5); + if ( !loaded[i] ) continue; + for ( int j=0; j<4; j++ ) + { + if ( loaded[i] != types[j] ) continue; + Screen.DrawTexture(AltRoundTex[j],false,bx-8,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-10,by-20,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + Screen.DrawTexture(AltRoundTex,false,bx-8,by-8,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-8,by-18,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-13,by-29,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 = 27; + switch ( curtype ) + { + case 0: + for ( int i=0; i<6; i++ ) + { + Screen.DrawTexture(AltRoundTex[0],false,bx-11,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 = 25; + for ( int i=0; i<3; i++ ) + { + Screen.DrawTexture(AltRoundTex[1],false,bx-11,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 = 25; + for ( int i=0; i<3; i++ ) + { + Screen.DrawTexture(AltRoundTex[2],false,bx-11,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 = 23; + for ( int i=0; i<2; i++ ) + { + Screen.DrawTexture(AltRoundTex[3],false,bx-11,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-7,by-26,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + Screen.DrawTexture(AltWeaponBox,false,bx-7,by-13,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( nomag ) return; + bool bRed; + int yy = 24; + 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-5,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 -= 5; + } + } + else + { + Screen.DrawTexture(AltWeaponBox,false,bx-7,by-13,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( nomag ) return; + bool bRed; + int yy = 11; + for ( int i=0; i<4; i++ ) + { + if ( clipcount <= i ) Screen.DrawTexture(AltRoundTex[0],false,bx-5,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-5,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); + double zl = clamp(AltZoomInter?AltZoomInter.GetValue(TicFrac):(zoomlevel*10),0.,160.); + if ( zl >= 10. ) + { + Screen.DrawTexture(AltWeaponBox[1],false,bx-15,by-28,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + double zw = zl*10./160.; + Screen.DrawTexture(AltZoomBar,false,bx-12,by-25,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw,DTA_ColorOverlay,Color(255,0,0,0)); + Screen.DrawTexture(AltZoomBar,false,bx-13,by-26,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw); + } + Screen.DrawTexture(AltWeaponBox[0],false,bx-15,by-18,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + if ( chambered ) Screen.DrawTexture(AltRoundTex[fcbchambered+fired*2],false,bx-13,by-16,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); + for ( int i=0; i