forked from pool/dsda-doom
Accepting request 956042 from home:jengelh:dev
OBS-URL: https://build.opensuse.org/request/show/956042 OBS-URL: https://build.opensuse.org/package/show/games/dsda-doom?expand=0&rev=1
This commit is contained in:
commit
2546c6b6d7
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
6
dsda-doom.changes
Normal file
6
dsda-doom.changes
Normal file
@ -0,0 +1,6 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 19 16:16:32 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Initial package (v0.24.1) for build.opensuse.org
|
||||
- Reuse prboom-hbar-all.diff, prboom-hbar-gradient.diff,
|
||||
prboom-nodatetime.diff from prboom-plus package.
|
96
dsda-doom.spec
Normal file
96
dsda-doom.spec
Normal file
@ -0,0 +1,96 @@
|
||||
#
|
||||
# spec file for package dsda-doom
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: dsda-doom
|
||||
Version: 0.24.1
|
||||
Release: 0
|
||||
Summary: DOOM source port with Hexen support and demo compatibility
|
||||
License: GPL-2.0-or-later
|
||||
Group: Amusements/Games/3D/Shoot
|
||||
URL: https://github.com/kraflab/dsda-doom
|
||||
|
||||
Source: https://github.com/kraflab/dsda-doom/archive/refs/tags/v%version.tar.gz
|
||||
Patch1: prboom-nodatetime.diff
|
||||
Patch2: prboom-hbar-all.diff
|
||||
Patch3: prboom-hbar-gradient.diff
|
||||
BuildRequires: Mesa-devel
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fluidsynth-devel
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libvorbis-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: portmidi-devel
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(SDL2_image)
|
||||
BuildRequires: pkgconfig(SDL2_mixer)
|
||||
BuildRequires: pkgconfig(SDL2_net)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
Suggests: freedoom
|
||||
Provides: prboom
|
||||
Obsoletes: prboom
|
||||
Provides: prboom-plus
|
||||
Obsoletes: prboom-plus
|
||||
|
||||
%description
|
||||
DSDA-Doom is a source port derived from the PrBoom history line.
|
||||
It features:
|
||||
|
||||
* Extra tooling for demo recording, with focus on speedrunning:
|
||||
record-rewind support
|
||||
* Heretic and Hexen support
|
||||
* MBFv21, UMAPINFO and DSDHacked specification support
|
||||
|
||||
%prep
|
||||
%autosetup -p0
|
||||
|
||||
%build
|
||||
pushd prboom2/
|
||||
%cmake -DDOOMWADDIR="%_datadir/doom"
|
||||
%cmake_build
|
||||
popd
|
||||
|
||||
%install
|
||||
pushd prboom2/
|
||||
%cmake_install
|
||||
b="%buildroot"
|
||||
install -Dm0644 ICONS/dsda-doom.png "$b/%_datadir/icons/hicolor/apps/dsda-doom.png"
|
||||
install -Dm0644 ICONS/dsda-doom.desktop "$b/%_datadir/applications/dsda-doom.desktop"
|
||||
install -Dm0644 ICONS/dsda-doom.bash "$b/%_datadir/bash-completion/completions/dsda-doom.bash"
|
||||
popd
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1550
|
||||
%post
|
||||
%desktop_database_post
|
||||
%icon_theme_cache_post
|
||||
|
||||
%postun
|
||||
%desktop_database_postun
|
||||
%icon_theme_cache_postun
|
||||
%endif
|
||||
|
||||
%files
|
||||
%_bindir/*
|
||||
%_datadir/doom/
|
||||
%_datadir/applications/*.desktop
|
||||
%_datadir/icons/hicolor/apps/
|
||||
%_datadir/bash-completion/
|
||||
%doc docs/*.md
|
||||
|
||||
%changelog
|
76
prboom-hbar-all.diff
Normal file
76
prboom-hbar-all.diff
Normal file
@ -0,0 +1,76 @@
|
||||
From f8dc397539f27c601aa6f1f3ea0f6c1f177efd97 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Wed, 1 May 2013 09:53:49 +0200
|
||||
Subject: [PATCH 1/2] Add option to show health bar for all destructible mobjs
|
||||
References: https://github.com/coelckers/prboom-plus/pull/274
|
||||
|
||||
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 | 10 +++++++++-
|
||||
prboom2/src/m_misc.c | 1 +
|
||||
prboom2/src/r_things.c | 1 +
|
||||
prboom2/src/r_things.h | 1 +
|
||||
4 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: prboom2/src/gl_main.c
|
||||
===================================================================
|
||||
--- prboom2/src/gl_main.c.orig
|
||||
+++ prboom2/src/gl_main.c
|
||||
@@ -2467,9 +2467,17 @@ static void gld_DrawSprite(GLSprite *spr
|
||||
}
|
||||
}
|
||||
|
||||
+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->info->spawnhealth > 0 && thing->health > 0 &&
|
||||
+ gld_EvaluateShowBar(thing))
|
||||
{
|
||||
GLHealthBar hbar;
|
||||
int health_percent = thing->health * 100 / thing->info->spawnhealth;
|
||||
Index: prboom2/src/m_misc.c
|
||||
===================================================================
|
||||
--- prboom2/src/m_misc.c.orig
|
||||
+++ prboom2/src/m_misc.c
|
||||
@@ -997,6 +997,7 @@ default_t defaults[] =
|
||||
{ "screenshot_dir", { NULL, &screenshot_dir }, { 0, "" }, UL, UL, def_str, ss_none },
|
||||
{ "health_bar", { &health_bar }, { 0 }, 0, 1, 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, def_int, ss_stat },
|
||||
{ "health_bar_green", { &health_bar_green }, { 0 }, 0, 100, def_int, ss_stat },
|
||||
Index: prboom2/src/r_things.c
|
||||
===================================================================
|
||||
--- prboom2/src/r_things.c.orig
|
||||
+++ prboom2/src/r_things.c
|
||||
@@ -75,6 +75,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;
|
||||
Index: prboom2/src/r_things.h
|
||||
===================================================================
|
||||
--- prboom2/src/r_things.h.orig
|
||||
+++ 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;
|
85
prboom-hbar-gradient.diff
Normal file
85
prboom-hbar-gradient.diff
Normal file
@ -0,0 +1,85 @@
|
||||
From be1128c66a342ca381532ac3c6bcd286d871fdc3 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Wed, 1 May 2013 09:53:49 +0200
|
||||
Subject: [PATCH 2/2] Implement color gradient for health bar
|
||||
References: https://github.com/coelckers/prboom-plus/pull/274
|
||||
|
||||
---
|
||||
prboom2/src/gl_intern.h | 2 +-
|
||||
prboom2/src/gl_main.c | 31 +++++++++++++++++--------------
|
||||
2 files changed, 18 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git prboom2/src/gl_intern.h prboom2/src/gl_intern.h
|
||||
index b4be8d56..8c44d9a7 100644
|
||||
--- prboom2/src/gl_intern.h
|
||||
+++ prboom2/src/gl_intern.h
|
||||
@@ -219,7 +219,7 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
- int cm;
|
||||
+ float r,g;
|
||||
|
||||
float x1, x2, x3;
|
||||
float z1, z2, z3;
|
||||
diff --git prboom2/src/gl_main.c prboom2/src/gl_main.c
|
||||
index 763bcbae..8dcb03fd 100644
|
||||
--- prboom2/src/gl_main.c
|
||||
+++ prboom2/src/gl_main.c
|
||||
@@ -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)
|
||||
- hbar.cm = CR_RED;
|
||||
- else if (health_percent <= health_bar_yellow)
|
||||
- hbar.cm = CR_YELLOW;
|
||||
- else if (health_percent <= health_bar_green)
|
||||
- hbar.cm = CR_GREEN;
|
||||
+ hbar.r = hbar.g = -1.0f;
|
||||
+ if (health_percent <= 0) {
|
||||
+ hbar.r = 1.0f;
|
||||
+ hbar.g = 0.0f;
|
||||
+ } else if (health_percent <= health_bar_red) {
|
||||
+ hbar.r = 1.0f;
|
||||
+ hbar.g = yr == 0 ? 0 : (float)health_percent / yr;
|
||||
+ } else if (health_percent <= health_bar_yellow) {
|
||||
+ 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;
|
||||
+ hbar.g = 1.0f;
|
||||
+ }
|
||||
|
||||
- if (hbar.cm >= 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;
|
||||
@@ -2373,7 +2381,6 @@ static void gld_AddHealthBar(mobj_t* thing, GLSprite *sprite)
|
||||
static void gld_DrawHealthBars(void)
|
||||
{
|
||||
int i, count;
|
||||
- int cm = -1;
|
||||
|
||||
count = gld_drawinfo.num_items[GLDIT_HBAR];
|
||||
if (count > 0)
|
||||
@@ -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;
|
||||
- if (hbar->cm != cm)
|
||||
- {
|
||||
- cm = hbar->cm;
|
||||
- glColor4f(cm2RGB[cm][0], cm2RGB[cm][1], cm2RGB[cm][2], 1.0f);
|
||||
- }
|
||||
+ glColor4f(hbar->r, hbar->g, 0.0f, 1.0f);
|
||||
|
||||
glVertex3f(hbar->x1, hbar->y, hbar->z1);
|
||||
glVertex3f(hbar->x2, hbar->y, hbar->z2);
|
||||
--
|
||||
2.31.1
|
||||
|
30
prboom-nodatetime.diff
Normal file
30
prboom-nodatetime.diff
Normal file
@ -0,0 +1,30 @@
|
||||
From 2bf8068e0cd916b39fd2c57f3c9bf582b0fc45d8 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Sun, 19 Feb 2012 07:16:45 +0100
|
||||
Subject: [PATCH] Drop __DATE__/__TIME__ / enable reproducible builds
|
||||
|
||||
---
|
||||
prboom2/src/version.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git prboom2/src/version.c prboom2/src/version.c
|
||||
index 1f5401f2..2cc173f6 100644
|
||||
--- prboom2/src/version.c
|
||||
+++ prboom2/src/version.c
|
||||
@@ -37,11 +37,11 @@
|
||||
#include "version.h"
|
||||
|
||||
#ifndef BUILD_DATE
|
||||
-#define BUILD_DATE __DATE__
|
||||
+#define BUILD_DATE ""
|
||||
#endif
|
||||
|
||||
#ifndef BUILD_TIME
|
||||
-#define BUILD_TIME __TIME__
|
||||
+#define BUILD_TIME ""
|
||||
#endif
|
||||
|
||||
const char version_date[] = BUILD_DATE " " BUILD_TIME;
|
||||
--
|
||||
2.30.2
|
||||
|
3
v0.24.1.tar.gz
Normal file
3
v0.24.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4cc08913d11e6093181157ca16629ec6b1469c808e59276cc2812512b839a99f
|
||||
size 5598855
|
Loading…
Reference in New Issue
Block a user