From bbc3173629c8b5eb5b79474377f9f79a72ebb26b Mon Sep 17 00:00:00 2001 From: Marrub Date: Thu, 25 Jun 2015 09:47:37 -0400 Subject: [PATCH 1/8] yep --- src/p_pspr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 63f3bc648..4e8340c5d 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -124,9 +124,9 @@ void P_SetPsprite (player_t *player, int position, FState *state, bool nofunctio if (sv_fastweapons >= 2 && position == ps_weapon) - psp->tics = state->ActionFunc == NULL? 0 : 1; + psp->tics = state->ActionFunc == NULL ? 0 : !(state->GetTics() == 0); else if (sv_fastweapons) - psp->tics = 1; // great for producing decals :) + psp->tics = !(state->GetTics() == 0); // great for producing decals :) else psp->tics = state->GetTics(); // could be 0 From 873ef3fea8e7b942e48ad19695ed6934605c3437 Mon Sep 17 00:00:00 2001 From: Marrub Date: Thu, 25 Jun 2015 10:15:40 -0400 Subject: [PATCH 2/8] that works better --- src/p_pspr.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 4e8340c5d..abe7f7320 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -124,9 +124,18 @@ void P_SetPsprite (player_t *player, int position, FState *state, bool nofunctio if (sv_fastweapons >= 2 && position == ps_weapon) - psp->tics = state->ActionFunc == NULL ? 0 : !(state->GetTics() == 0); + { + if(state->ActionFunc == NULL) + { + psp->tics = 0; + } + else + { + psp->tics = (state->GetTics() != 0); + } + } else if (sv_fastweapons) - psp->tics = !(state->GetTics() == 0); // great for producing decals :) + psp->tics = (state->GetTics() != 0); // great for producing decals :) else psp->tics = state->GetTics(); // could be 0 From 4208993f226aa33e1b0905721e0799d9a505dc13 Mon Sep 17 00:00:00 2001 From: Marrub Date: Sat, 27 Jun 2015 08:26:48 -0400 Subject: [PATCH 3/8] use sv_fastweapons 3 and 4 instead --- src/p_pspr.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index abe7f7320..414b414d5 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -123,7 +123,9 @@ void P_SetPsprite (player_t *player, int position, FState *state, bool nofunctio } - if (sv_fastweapons >= 2 && position == ps_weapon) + if (sv_fastweapons == 2 && position == ps_weapon) + psp->tics = state->ActionFunc == NULL ? 0 : 1; + else if (sv_fastweapons >= 4 && position == ps_weapon) { if(state->ActionFunc == NULL) { @@ -134,8 +136,10 @@ void P_SetPsprite (player_t *player, int position, FState *state, bool nofunctio psp->tics = (state->GetTics() != 0); } } + else if (sv_fastweapons == 3) + psp->tics = (state->GetTics() != 0); else if (sv_fastweapons) - psp->tics = (state->GetTics() != 0); // great for producing decals :) + psp->tics = 1; // great for producing decals :) else psp->tics = state->GetTics(); // could be 0 From 08e9d7553891dfb6b001b2de8332cd6d13bb1691 Mon Sep 17 00:00:00 2001 From: Marrub Date: Sat, 27 Jun 2015 15:00:31 -0400 Subject: [PATCH 4/8] removed sv_fastweapons 4 as it may cause issues --- src/p_pspr.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 414b414d5..7e36d22fe 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -125,17 +125,6 @@ void P_SetPsprite (player_t *player, int position, FState *state, bool nofunctio if (sv_fastweapons == 2 && position == ps_weapon) psp->tics = state->ActionFunc == NULL ? 0 : 1; - else if (sv_fastweapons >= 4 && position == ps_weapon) - { - if(state->ActionFunc == NULL) - { - psp->tics = 0; - } - else - { - psp->tics = (state->GetTics() != 0); - } - } else if (sv_fastweapons == 3) psp->tics = (state->GetTics() != 0); else if (sv_fastweapons) From 1bf1fc199b6ae1dcc25a4ce024d6c94d8eb6aaa8 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 3 Feb 2016 11:24:49 +0200 Subject: [PATCH 5/8] Adjust latency position depending on time visibility Latency placement is no longer fixed: * If time is visible, it is placed on top of the screen and latency is placed below * If time is not visible, latency is placed on top of the screen Both are displayed on alternative HUD only --- src/g_shared/sbar.h | 3 +++ src/g_shared/shared_hud.cpp | 32 +++++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/g_shared/sbar.h b/src/g_shared/sbar.h index b8416dd5d..764e427d3 100644 --- a/src/g_shared/sbar.h +++ b/src/g_shared/sbar.h @@ -57,6 +57,9 @@ class AWeapon; void ST_SetNeedRefresh(); +bool ST_IsTimeVisible(); +bool ST_IsLatencyVisible(); + // HUD Message base object -------------------------------------------------- class DHUDMessage : public DObject diff --git a/src/g_shared/shared_hud.cpp b/src/g_shared/shared_hud.cpp index 0fe8a4588..344f5b0ec 100644 --- a/src/g_shared/shared_hud.cpp +++ b/src/g_shared/shared_hud.cpp @@ -59,6 +59,7 @@ EXTERN_CVAR(Bool,am_follow) EXTERN_CVAR (Int, con_scaletext) EXTERN_CVAR (Bool, idmypos) +EXTERN_CVAR (Int, screenblocks) EXTERN_CVAR (Bool, am_showtime) EXTERN_CVAR (Bool, am_showtotaltime) @@ -868,7 +869,7 @@ static void DrawCoordinates(player_t * CPlayer) static void DrawTime() { - if (hud_showtime <= 0 || hud_showtime > 9) + if (!ST_IsTimeVisible()) { return; } @@ -935,6 +936,21 @@ static void DrawTime() DrawHudText(SmallFont, hud_timecolor, timeString, hudwidth - width, height, FRACUNIT); } +static bool IsAltHUDTextVisible() +{ + return hud_althud + && !automapactive + && (SCREENHEIGHT == viewheight) + && (11 == screenblocks); +} + +bool ST_IsTimeVisible() +{ + return IsAltHUDTextVisible() + && (hud_showtime > 0) + && (hud_showtime <= 9); +} + //--------------------------------------------------------------------------- // // Draw in-game latency @@ -943,9 +959,7 @@ static void DrawTime() static void DrawLatency() { - if (hud_showlag <= 0 || - (hud_showlag == 1 && !netgame) || - hud_showlag > 2) + if (!ST_IsLatencyVisible()) { return; } @@ -975,11 +989,19 @@ static void DrawLatency() const int characterCount = (int)strlen(tempstr); const int width = SmallFont->GetCharWidth('0') * characterCount + 2; // small offset from screen's border - const int height = SmallFont->GetHeight() * 2; + const int height = SmallFont->GetHeight() * (ST_IsTimeVisible() ? 2 : 1); DrawHudText(SmallFont, color, tempstr, hudwidth - width, height, FRACUNIT); } +bool ST_IsLatencyVisible() +{ + return IsAltHUDTextVisible() + && (hud_showlag > 0) + && (hud_showlag != 1 || netgame) + && (hud_showlag <= 2); +} + //--------------------------------------------------------------------------- // From b9b0029373b0948d2ee63454b6bff9081e9ce627 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 3 Feb 2016 12:03:19 +0200 Subject: [PATCH 6/8] Fixed overlapping of active artifacts with time/latency Active artifacts are now displayed below time and/or latency on alternative HUD --- src/g_shared/shared_sbar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/g_shared/shared_sbar.cpp b/src/g_shared/shared_sbar.cpp index bd2946f2a..0c74f52b7 100644 --- a/src/g_shared/shared_sbar.cpp +++ b/src/g_shared/shared_sbar.cpp @@ -1533,9 +1533,12 @@ void DBaseStatusBar::DrawPowerups () // Each icon gets a 32x32 block to draw itself in. int x, y; AInventory *item; + const int yshift = SmallFont->GetHeight(); x = -20; - y = 17; + y = 17 + + (ST_IsTimeVisible() ? yshift : 0) + + (ST_IsLatencyVisible() ? yshift : 0); for (item = CPlayer->mo->Inventory; item != NULL; item = item->Inventory) { if (item->DrawPowerup (x, y)) From bf066763b70c2c0d0325b3d5667824b0da76ebd9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 4 Feb 2016 01:20:35 +0100 Subject: [PATCH 7/8] - fixed: The FPS display should use the actual font info to calculate its size, not just assume that each character is 8*8 pixels. --- src/v_video.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v_video.cpp b/src/v_video.cpp index 042469193..37cc3163d 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -858,8 +858,8 @@ void DFrameBuffer::DrawRateStuff () int rate_x; chars = mysnprintf (fpsbuff, countof(fpsbuff), "%2u ms (%3u fps)", howlong, LastCount); - rate_x = Width - chars * 8; - Clear (rate_x, 0, Width, 8, GPalette.BlackIndex, 0); + rate_x = Width - ConFont->StringWidth(&fpsbuff[0]); + Clear (rate_x, 0, Width, ConFont->GetHeight(), GPalette.BlackIndex, 0); DrawText (ConFont, CR_WHITE, rate_x, 0, (char *)&fpsbuff[0], TAG_DONE); DWORD thisSec = ms/1000; From b8a24902bc4e6dc22f340a97fcffcb520f6a9542 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 4 Feb 2016 13:23:36 -0600 Subject: [PATCH 8/8] Move extra font characters into filter directories --- .../{ => filter/game-doom}/graphics/stcfn191.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn193.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn196.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn197.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn201.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn205.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn209.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn211.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn214.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn218.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn220.lmp | Bin .../{ => filter/game-doom}/graphics/stcfn223.lmp | Bin .../{ => filter/game-raven}/graphics/fonta164.lmp | Bin .../{ => filter/game-raven}/graphics/fonta165.lmp | Bin .../{ => filter/game-raven}/graphics/fonta182.lmp | Bin .../{ => filter/game-raven}/graphics/fonta188.lmp | Bin .../{ => filter/game-raven}/graphics/fonta191.lmp | Bin .../{ => filter/game-raven}/graphics/fonta60.lmp | Bin .../{ => filter/game-raven}/graphics/fonta61.lmp | Bin .../{ => filter/game-raven}/graphics/fonta62.lmp | Bin .../{ => filter/game-raven}/graphics/fonta63.lmp | Bin 21 files changed, 0 insertions(+), 0 deletions(-) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn191.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn193.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn196.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn197.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn201.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn205.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn209.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn211.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn214.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn218.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn220.lmp (100%) rename wadsrc/static/{ => filter/game-doom}/graphics/stcfn223.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta164.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta165.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta182.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta188.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta191.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta60.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta61.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta62.lmp (100%) rename wadsrc/static/{ => filter/game-raven}/graphics/fonta63.lmp (100%) diff --git a/wadsrc/static/graphics/stcfn191.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn191.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn191.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn191.lmp diff --git a/wadsrc/static/graphics/stcfn193.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn193.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn193.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn193.lmp diff --git a/wadsrc/static/graphics/stcfn196.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn196.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn196.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn196.lmp diff --git a/wadsrc/static/graphics/stcfn197.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn197.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn197.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn197.lmp diff --git a/wadsrc/static/graphics/stcfn201.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn201.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn201.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn201.lmp diff --git a/wadsrc/static/graphics/stcfn205.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn205.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn205.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn205.lmp diff --git a/wadsrc/static/graphics/stcfn209.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn209.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn209.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn209.lmp diff --git a/wadsrc/static/graphics/stcfn211.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn211.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn211.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn211.lmp diff --git a/wadsrc/static/graphics/stcfn214.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn214.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn214.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn214.lmp diff --git a/wadsrc/static/graphics/stcfn218.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn218.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn218.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn218.lmp diff --git a/wadsrc/static/graphics/stcfn220.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn220.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn220.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn220.lmp diff --git a/wadsrc/static/graphics/stcfn223.lmp b/wadsrc/static/filter/game-doom/graphics/stcfn223.lmp similarity index 100% rename from wadsrc/static/graphics/stcfn223.lmp rename to wadsrc/static/filter/game-doom/graphics/stcfn223.lmp diff --git a/wadsrc/static/graphics/fonta164.lmp b/wadsrc/static/filter/game-raven/graphics/fonta164.lmp similarity index 100% rename from wadsrc/static/graphics/fonta164.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta164.lmp diff --git a/wadsrc/static/graphics/fonta165.lmp b/wadsrc/static/filter/game-raven/graphics/fonta165.lmp similarity index 100% rename from wadsrc/static/graphics/fonta165.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta165.lmp diff --git a/wadsrc/static/graphics/fonta182.lmp b/wadsrc/static/filter/game-raven/graphics/fonta182.lmp similarity index 100% rename from wadsrc/static/graphics/fonta182.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta182.lmp diff --git a/wadsrc/static/graphics/fonta188.lmp b/wadsrc/static/filter/game-raven/graphics/fonta188.lmp similarity index 100% rename from wadsrc/static/graphics/fonta188.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta188.lmp diff --git a/wadsrc/static/graphics/fonta191.lmp b/wadsrc/static/filter/game-raven/graphics/fonta191.lmp similarity index 100% rename from wadsrc/static/graphics/fonta191.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta191.lmp diff --git a/wadsrc/static/graphics/fonta60.lmp b/wadsrc/static/filter/game-raven/graphics/fonta60.lmp similarity index 100% rename from wadsrc/static/graphics/fonta60.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta60.lmp diff --git a/wadsrc/static/graphics/fonta61.lmp b/wadsrc/static/filter/game-raven/graphics/fonta61.lmp similarity index 100% rename from wadsrc/static/graphics/fonta61.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta61.lmp diff --git a/wadsrc/static/graphics/fonta62.lmp b/wadsrc/static/filter/game-raven/graphics/fonta62.lmp similarity index 100% rename from wadsrc/static/graphics/fonta62.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta62.lmp diff --git a/wadsrc/static/graphics/fonta63.lmp b/wadsrc/static/filter/game-raven/graphics/fonta63.lmp similarity index 100% rename from wadsrc/static/graphics/fonta63.lmp rename to wadsrc/static/filter/game-raven/graphics/fonta63.lmp