From 81ac4d43609ca954fb258bf8d247fd9b084a18535c20fc49680568c5a9f9429b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 1 May 2021 11:55:55 +0000 Subject: [PATCH 1/3] - Update prboom-hbar-all.diff, prboom-hbar-gradient.diff from project. OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=40 --- prboom-hbar-all.diff | 71 +++++++++++++++++++++++++++++++++------ prboom-hbar-gradient.diff | 19 ++++++----- prboom-plus.changes | 6 ++++ 3 files changed, 77 insertions(+), 19 deletions(-) diff --git a/prboom-hbar-all.diff b/prboom-hbar-all.diff index 695339e..c84f7ea 100644 --- a/prboom-hbar-all.diff +++ b/prboom-hbar-all.diff @@ -1,29 +1,80 @@ -From a0bae535928cbce4eb9da8dd5d33b473776c9693 Mon Sep 17 00:00:00 2001 +From f8dc397539f27c601aa6f1f3ea0f6c1f177efd97 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 1 May 2013 09:53:49 +0200 -Subject: [PATCH 1/2] Show health bar for all destructible mobjs +Subject: [PATCH 1/2] Add option to show health bar for all destructible mobjs References: https://github.com/coelckers/prboom-plus/pull/274 -Show the health bar for all destructible items, especially so -including barrels and Lost Souls. +The current health bar fails to show for Lost Souls. +In addition, showing it for other destructible objects (such as +barrels - or DEH modifications in that spirit) can be used to gauge +the objects' remaining life. --- - prboom2/src/gl_main.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + prboom2/src/gl_main.c | 10 +++++++++- + prboom2/src/m_misc.c | 2 ++ + prboom2/src/r_things.c | 1 + + prboom2/src/r_things.h | 1 + + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git prboom2/src/gl_main.c prboom2/src/gl_main.c -index 20712b7e..e2402e16 100644 +index 20712b7e..763bcbae 100644 --- prboom2/src/gl_main.c +++ prboom2/src/gl_main.c -@@ -2328,7 +2328,8 @@ static void gld_DrawSprite(GLSprite *sprite) +@@ -2326,9 +2326,17 @@ static void gld_DrawSprite(GLSprite *sprite) + } + } ++static int gld_EvaluateShowBar(mobj_t* thing) ++{ ++ if (health_bar_shootables) ++ return thing->flags & MF_SHOOTABLE; ++ return (thing->flags & (MF_COUNTKILL | MF_CORPSE)) == MF_COUNTKILL; ++} ++ static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite) { - if (((thing->flags & (MF_COUNTKILL | MF_CORPSE)) == MF_COUNTKILL) && (thing->health > 0)) -+ if ((thing->flags & MF_SHOOTABLE) && thing->info->spawnhealth > 0 && -+ thing->health > 0) ++ if (thing->info->spawnhealth > 0 && thing->health > 0 && ++ gld_EvaluateShowBar(thing)) { GLHealthBar hbar; int health_percent = thing->health * 100 / thing->info->spawnhealth; +diff --git prboom2/src/m_misc.c prboom2/src/m_misc.c +index 0bf3f5b9..e819ad61 100644 +--- prboom2/src/m_misc.c ++++ prboom2/src/m_misc.c +@@ -1045,6 +1045,8 @@ default_t defaults[] = + def_bool,ss_stat}, + {"health_bar_full_length", {&health_bar_full_length}, {1},0,1, + def_bool,ss_stat}, ++ {"health_bar_shootables", {&health_bar_shootables}, {0},0,1, ++ def_bool,ss_stat}, + {"health_bar_red", {&health_bar_red}, {50},0,100, + def_int,ss_stat}, + {"health_bar_yellow", {&health_bar_yellow}, {99},0,100, +diff --git prboom2/src/r_things.c prboom2/src/r_things.c +index c537dd5e..fd1215fd 100644 +--- prboom2/src/r_things.c ++++ prboom2/src/r_things.c +@@ -73,6 +73,7 @@ int sprites_doom_order; + + int health_bar; + int health_bar_full_length; ++int health_bar_shootables; + int health_bar_red; + int health_bar_yellow; + int health_bar_green; +diff --git prboom2/src/r_things.h prboom2/src/r_things.h +index 2267cb83..52e5beea 100644 +--- prboom2/src/r_things.h ++++ prboom2/src/r_things.h +@@ -75,6 +75,7 @@ extern int sprites_doom_order; + + extern int health_bar; + extern int health_bar_full_length; ++extern int health_bar_shootables; + extern int health_bar_red; + extern int health_bar_yellow; + extern int health_bar_green; -- 2.31.1 diff --git a/prboom-hbar-gradient.diff b/prboom-hbar-gradient.diff index 97c1239..0ef45d5 100644 --- a/prboom-hbar-gradient.diff +++ b/prboom-hbar-gradient.diff @@ -1,4 +1,4 @@ -From 6566b0489164957581d091119bdf480d66e9ca20 Mon Sep 17 00:00:00 2001 +From be1128c66a342ca381532ac3c6bcd286d871fdc3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 1 May 2013 09:53:49 +0200 Subject: [PATCH 2/2] Implement color gradient for health bar @@ -23,12 +23,14 @@ index b4be8d56..8c44d9a7 100644 float x1, x2, x3; float z1, z2, z3; diff --git prboom2/src/gl_main.c prboom2/src/gl_main.c -index e2402e16..0a257ecf 100644 +index 763bcbae..8dcb03fd 100644 --- prboom2/src/gl_main.c +++ prboom2/src/gl_main.c -@@ -2334,15 +2334,23 @@ static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite) +@@ -2340,16 +2340,24 @@ static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite) + { GLHealthBar hbar; int health_percent = thing->health * 100 / thing->info->spawnhealth; ++ int yr = health_bar_yellow - health_bar_red; - hbar.cm = -1; - if (health_percent <= health_bar_red) @@ -43,10 +45,9 @@ index e2402e16..0a257ecf 100644 + hbar.g = 0.0f; + } else if (health_percent <= health_bar_red) { + hbar.r = 1.0f; -+ hbar.g = (double)health_percent / (health_bar_yellow - health_bar_red); ++ hbar.g = yr == 0 ? 0 : (float)health_percent / yr; + } else if (health_percent <= health_bar_yellow) { -+ hbar.r = (double)(health_bar_yellow - health_percent) / -+ (health_bar_yellow - health_bar_red); ++ hbar.r = yr == 0 ? 1 : (float)(health_bar_yellow - health_percent) / yr; + hbar.g = 1.0f; + } else if (health_percent <= health_bar_green) { + hbar.r = 0.0f; @@ -54,11 +55,11 @@ index e2402e16..0a257ecf 100644 + } - if (hbar.cm >= 0) -+ if (hbar.r >= 0) ++ if (hbar.r >= 0 && hbar.g >= 0) { float sx2 = (float)thing->radius / 2.0f / MAP_SCALE; float sx1 = sx2 - (float)health_percent * (float)thing->radius / 100.0f / MAP_SCALE; -@@ -2366,7 +2374,6 @@ static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite) +@@ -2373,7 +2381,6 @@ static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite) static void gld_DrawHealthBars(void) { int i, count; @@ -66,7 +67,7 @@ index e2402e16..0a257ecf 100644 count = gld_drawinfo.num_items[GLDIT_HBAR]; if (count > 0) -@@ -2377,11 +2384,7 @@ static void gld_DrawHealthBars(void) +@@ -2384,11 +2391,7 @@ static void gld_DrawHealthBars(void) for (i = count - 1; i >= 0; i--) { GLHealthBar *hbar = gld_drawinfo.items[GLDIT_HBAR][i].item.hbar; diff --git a/prboom-plus.changes b/prboom-plus.changes index 5ea9d22..d086c03 100644 --- a/prboom-plus.changes +++ b/prboom-plus.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat May 1 11:55:16 UTC 2021 - Jan Engelhardt + +- Update prboom-hbar-all.diff, prboom-hbar-gradient.diff + from project. + ------------------------------------------------------------------- Fri Apr 9 23:53:06 UTC 2021 - Jan Engelhardt From badd34c1646d9dffd66fdcc4e8dd4cdbde84cd308eb1e912d2a9cd2466d83536 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 1 May 2021 14:06:47 +0000 Subject: [PATCH 2/3] - Update to snapshot 2.6um+git81 (15431b3a9aac) OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=41 --- _service | 4 +--- prboom-plus-2.6um+g69.tar.xz | 3 --- prboom-plus-2.6um+g81.tar.xz | 3 +++ prboom-plus-2.6um+g84.tar.xz | 3 +++ prboom-plus.changes | 6 +++++- prboom-plus.spec | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 prboom-plus-2.6um+g69.tar.xz create mode 100644 prboom-plus-2.6um+g81.tar.xz create mode 100644 prboom-plus-2.6um+g84.tar.xz diff --git a/_service b/_service index 60d4619..cc98c2e 100644 --- a/_service +++ b/_service @@ -2,9 +2,7 @@ git https://github.com/coelckers/prboom-plus - data/sounds/dsdg* - data/sprites/dogs* - 07925d634cc4d5a8847f76ca4c4f2ce236ba6de8 + 15431b3a9aac0800c72276aa8dabb13a8f12632e 2.6um+g@TAG_OFFSET@ diff --git a/prboom-plus-2.6um+g69.tar.xz b/prboom-plus-2.6um+g69.tar.xz deleted file mode 100644 index 34c1a61..0000000 --- a/prboom-plus-2.6um+g69.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:314b5bd0e770cdc51f3d0cd1967bce3087776f74293bee7c049d684dd121f73d -size 1130204 diff --git a/prboom-plus-2.6um+g81.tar.xz b/prboom-plus-2.6um+g81.tar.xz new file mode 100644 index 0000000..2462de8 --- /dev/null +++ b/prboom-plus-2.6um+g81.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:112668c55d041cdf7306b7e55adb4d8b0a74524acf7464db724b3058d6ae55ec +size 1131916 diff --git a/prboom-plus-2.6um+g84.tar.xz b/prboom-plus-2.6um+g84.tar.xz new file mode 100644 index 0000000..7cf843e --- /dev/null +++ b/prboom-plus-2.6um+g84.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8c14f3828104636403b366a418583ea4e0975bb1a95c30529f6dbd22aa8a1ff +size 6299636 diff --git a/prboom-plus.changes b/prboom-plus.changes index d086c03..9fe3a6f 100644 --- a/prboom-plus.changes +++ b/prboom-plus.changes @@ -1,6 +1,10 @@ ------------------------------------------------------------------- -Sat May 1 11:55:16 UTC 2021 - Jan Engelhardt +Sat May 1 13:01:20 UTC 2021 - Jan Engelhardt +- Update to snapshot 2.6um+git81 (15431b3a9aac) + * Fix sky scaling for non-standard sky sizes + * Support widescreen assets + * Add OpenGL sprite fuzz options - Update prboom-hbar-all.diff, prboom-hbar-gradient.diff from project. diff --git a/prboom-plus.spec b/prboom-plus.spec index 162331f..0d95424 100644 --- a/prboom-plus.spec +++ b/prboom-plus.spec @@ -17,7 +17,7 @@ Name: prboom-plus -Version: 2.6um+g69 +Version: 2.6um+g81 Release: 0 Summary: DOOM source port with demo compatibility License: GPL-2.0-or-later From 1421f9a41e1bda5fded41e0195209655ca7a1e8adb1f2e5552d3cb065ba13378 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 1 May 2021 14:06:55 +0000 Subject: [PATCH 3/3] - Update to snapshot 2.6um+git81 (15431b3a9aac) OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=42 --- prboom-plus-2.6um+g84.tar.xz | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 prboom-plus-2.6um+g84.tar.xz diff --git a/prboom-plus-2.6um+g84.tar.xz b/prboom-plus-2.6um+g84.tar.xz deleted file mode 100644 index 7cf843e..0000000 --- a/prboom-plus-2.6um+g84.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8c14f3828104636403b366a418583ea4e0975bb1a95c30529f6dbd22aa8a1ff -size 6299636