From 75b653e5f7c5520679b530aeda85d417728ab260edf00910cc7273de8ceced6f Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 26 Mar 2016 21:57:51 +0000 Subject: [PATCH 1/7] Accepting request 380193 from home:Mailaender:branches:games new stable upstream release OBS-URL: https://build.opensuse.org/request/show/380193 OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=17 --- clean_source.sh | 19 --- prboom-enable-tessellation.diff | 27 ---- prboom-hbar-all.diff | 26 ---- prboom-hbar-color.diff | 31 ----- prboom-hbar-gradient.diff | 120 ----------------- prboom-plus-2.5.1.4.tar.gz | 3 + prboom-plus-2.5.1.4~test4355.tar.xz | 3 - prboom-plus.changes | 5 + prboom-plus.spec | 72 ++++++----- prboom-types1.diff | 29 ----- prboom-types2.diff | 194 ---------------------------- 11 files changed, 46 insertions(+), 483 deletions(-) delete mode 100644 clean_source.sh delete mode 100644 prboom-enable-tessellation.diff delete mode 100644 prboom-hbar-all.diff delete mode 100644 prboom-hbar-color.diff delete mode 100644 prboom-hbar-gradient.diff create mode 100644 prboom-plus-2.5.1.4.tar.gz delete mode 100644 prboom-plus-2.5.1.4~test4355.tar.xz delete mode 100644 prboom-types1.diff delete mode 100644 prboom-types2.diff diff --git a/clean_source.sh b/clean_source.sh deleted file mode 100644 index 1c2395c..0000000 --- a/clean_source.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -ex -# Remove Wolfenstein dogs from source - -: ${DOOMWADDIR:=/usr/share/doom}; - -version=$(perl -lne 'if(/^Version\s*:\s*(\S+)/){print$1;exit}' wadinfo.txt; -rm -f prboom-plus.wad; -deutex -doom2 "$DOOMWADDIR" -create wadinfo.txt prboom-plus.wad; -find . -mindepth 1 -type d -print0 | xargs -0 rm -Rf; -mv wadinfo.txt prboom.txt; -rm -f error.txt output.txt; -popd; -find "prboom-plus-$version" -print0 | sort -z | \ - tar -T- --null --use=xz -cvf "prboom-plus-$version+.tar.xz"; diff --git a/prboom-enable-tessellation.diff b/prboom-enable-tessellation.diff deleted file mode 100644 index c0c353e..0000000 --- a/prboom-enable-tessellation.diff +++ /dev/null @@ -1,27 +0,0 @@ -Date: 2011-08-03 18:36:44+0200 -From: Jan Engelhardt -Upstream: sent - -Always do tesselation, because otherwise, map hacks like -self-referencing sectors (cf. -http://doom.wikia.com/wiki/Making_a_self-referencing_sector) will not -be rendered. - ---- - src/gl_main.c | 3 +++ - 1 file changed, 3 insertions(+) - -Index: prboom-plus-2.5.1.3/src/gl_main.c -=================================================================== ---- prboom-plus-2.5.1.3.orig/src/gl_main.c -+++ prboom-plus-2.5.1.3/src/gl_main.c -@@ -73,6 +73,9 @@ - #ifdef USE_CUSTOM_QSORT - #include "qsort.h" - #endif -+#ifndef USE_GLU_TESS -+# define USE_GLU_TESS 1 -+#endif - - // All OpenGL extentions will be disabled in gl_compatibility mode - int gl_compatibility = 0; diff --git a/prboom-hbar-all.diff b/prboom-hbar-all.diff deleted file mode 100644 index 3f9a7fd..0000000 --- a/prboom-hbar-all.diff +++ /dev/null @@ -1,26 +0,0 @@ -From: Jan Engelhardt -Date: 2013-05-01 09:53:49.000000000 +0200 -Category: improvement -Status: sent Wed, 1 May 2013 14:28:44 +0200 - -Show the health bar for all destructible items (including -barrels and Lost Souls). - ---- - src/gl_main.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: prboom2/src/gl_main.c -=================================================================== ---- prboom2.orig/src/gl_main.c -+++ prboom2/src/gl_main.c -@@ -2399,7 +2399,8 @@ static void gld_DrawSprite(GLSprite *spr - - 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) - { - GLHealthBar hbar; - int health_percent = thing->health * 100 / thing->info->spawnhealth; diff --git a/prboom-hbar-color.diff b/prboom-hbar-color.diff deleted file mode 100644 index 7a1aff9..0000000 --- a/prboom-hbar-color.diff +++ /dev/null @@ -1,31 +0,0 @@ -From: Jan Engelhardt -Date: 2013-05-01 09:42:45.000000000 +0200 -Category: improvement -Status: sent Wed, 1 May 2013 14:28:44 +0200 - -With the current value of health_hbar_green=0, green will never -be shown for monsters, which feels incorrect. - ---- - src/m_misc.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -Index: prboom2/src/m_misc.c -=================================================================== ---- prboom2.orig/src/m_misc.c -+++ prboom2/src/m_misc.c -@@ -953,11 +953,11 @@ default_t defaults[] = - def_bool,ss_stat}, - {"health_bar_full_length", {&health_bar_full_length}, {1},0,1, - def_bool,ss_stat}, -- {"health_bar_red", {&health_bar_red}, {50},0,100, -+ {"health_bar_red", {&health_bar_red}, {25},0,100, - def_int,ss_stat}, -- {"health_bar_yellow", {&health_bar_yellow}, {99},0,100, -+ {"health_bar_yellow", {&health_bar_yellow}, {50},0,100, - def_int,ss_stat}, -- {"health_bar_green", {&health_bar_green}, {0},0,100, -+ {"health_bar_green", {&health_bar_green}, {99},0,100, - def_int,ss_stat}, - #endif - diff --git a/prboom-hbar-gradient.diff b/prboom-hbar-gradient.diff deleted file mode 100644 index b6fc33a..0000000 --- a/prboom-hbar-gradient.diff +++ /dev/null @@ -1,120 +0,0 @@ -From: Jan Engelhardt -Date: 2013-05-01 14:27:39.000000000 +0200 -Category: improvement -Status: sent Wed, 1 May 2013 14:28:44 +0200 - -This makes the health bar above shootables use gradiented color. - ---- - src/gl_drawinfo.c | 4 ++-- - src/gl_intern.h | 2 +- - src/gl_main.c | 44 +++++++++++++++++--------------------------- - 3 files changed, 20 insertions(+), 30 deletions(-) - -Index: prboom2/src/gl_drawinfo.c -=================================================================== ---- prboom2.orig/src/gl_drawinfo.c -+++ prboom2/src/gl_drawinfo.c -@@ -111,10 +111,10 @@ static void gld_AddDrawRange(int size) - #define NEWSIZE (MAX(64 * 1024, itemsize)) - void gld_AddDrawItem(GLDrawItemType itemtype, void *itemdata) - { -- int itemsize = 0; -+ unsigned int itemsize = 0; - byte *item_p = NULL; - -- static int itemsizes[GLDIT_TYPES] = { -+ static const unsigned int itemsizes[GLDIT_TYPES] = { - 0, - sizeof(GLWall), sizeof(GLWall), sizeof(GLWall), sizeof(GLWall), sizeof(GLWall), - sizeof(GLWall), sizeof(GLWall), -Index: prboom2/src/gl_intern.h -=================================================================== ---- prboom2.orig/src/gl_intern.h -+++ prboom2/src/gl_intern.h -@@ -220,7 +220,7 @@ typedef struct - - typedef struct - { -- int cm; -+ float r,g; - - float x1, x2, x3; - float z1, z2, z3; -Index: prboom2/src/gl_main.c -=================================================================== ---- prboom2.orig/src/gl_main.c -+++ prboom2/src/gl_main.c -@@ -2405,15 +2405,20 @@ static void gld_AddHealthBar(mobj_t* thi - GLHealthBar hbar; - int health_percent = thing->health * 100 / thing->info->spawnhealth; - -- 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; -+ if (health_percent <= health_bar_red) { -+ hbar.r = 1; -+ hbar.g = 0; -+ } else if (health_percent <= health_bar_yellow) { -+ hbar.r = 1; -+ hbar.g = (double)(health_percent - health_bar_red) / -+ (health_bar_yellow - health_bar_red); -+ } else if (health_percent <= health_bar_green) { -+ /* FullSimplify[1-((percent-yellow)/(green-yellow))] */ -+ hbar.r = (double)(health_bar_green - health_percent) / -+ (health_bar_green - health_bar_yellow); -+ hbar.g = 1; -+ } - -- if (hbar.cm >= 0) - { - float sx2 = (float)thing->radius / 2.0f / MAP_SCALE; - float sx1 = sx2 - (float)health_percent * (float)thing->radius / 100.0f / MAP_SCALE; -@@ -2437,7 +2442,6 @@ static void gld_AddHealthBar(mobj_t* thi - static void gld_DrawHealthBars(void) - { - int i, count; -- int cm = -1; - - count = gld_drawinfo.num_items[GLDIT_HBAR]; - if (count > 0) -@@ -2448,31 +2452,17 @@ 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, 1); - - glVertex3f(hbar->x1, hbar->y, hbar->z1); - glVertex3f(hbar->x2, hbar->y, hbar->z2); -- } -- glEnd(); -- -- if (health_bar_full_length) -- { -- glColor4f(0.5f, 0.5f, 0.5f, 1.0f); -- glBegin(GL_LINES); -- for (i = count - 1; i >= 0; i--) -- { -- GLHealthBar *hbar = gld_drawinfo.items[GLDIT_HBAR][i].item.hbar; -- -+ if (health_bar_full_length) { -+ glColor4f(0.5f, 0.5f, 0.5f, 1.0f); - glVertex3f(hbar->x1, hbar->y, hbar->z1); - glVertex3f(hbar->x3, hbar->y, hbar->z3); - } -- glEnd(); - } -- -+ glEnd(); - gld_EnableTexture2D(GL_TEXTURE0_ARB, true); - } - } diff --git a/prboom-plus-2.5.1.4.tar.gz b/prboom-plus-2.5.1.4.tar.gz new file mode 100644 index 0000000..8f9d309 --- /dev/null +++ b/prboom-plus-2.5.1.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0e2241d174839b107f1a42b191aa9895dc6749e477cbc850ad520fba2353b94 +size 1627558 diff --git a/prboom-plus-2.5.1.4~test4355.tar.xz b/prboom-plus-2.5.1.4~test4355.tar.xz deleted file mode 100644 index ec3a5ff..0000000 --- a/prboom-plus-2.5.1.4~test4355.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d6d109705df868105df44a4fe7c30f7ffb33e8bcdd05f611e767f90c3628a41b -size 1202216 diff --git a/prboom-plus.changes b/prboom-plus.changes index 839cb25..44b855d 100644 --- a/prboom-plus.changes +++ b/prboom-plus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 26 09:54:56 UTC 2016 - mailaender@opensuse.org + +- Update to version 2.5.1.4 + ------------------------------------------------------------------- Sun Mar 29 19:19:54 UTC 2015 - jengelh@inai.de diff --git a/prboom-plus.spec b/prboom-plus.spec index 5f87077..46526e1 100644 --- a/prboom-plus.spec +++ b/prboom-plus.spec @@ -1,7 +1,7 @@ # # spec file for package prboom-plus # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,35 +17,32 @@ Name: prboom-plus -Version: 2.5.1.4~test4355 +Version: 2.5.1.4 Release: 0 Summary: Open source port of the DOOM game engine License: GPL-2.0+ Group: Amusements/Games/3D/Shoot Url: http://prboom-plus.sourceforge.net/ - -#SVN-Clone: https://svn.prboom.org/repos/branches/prboom-plus-24/prboom2 -#DL-URL: http://downloads.sf.net/prboom-plus/prboom-plus-2.5.1.3.tar.gz -Source: %name-%version.tar.xz +Source: http://downloads.sourceforge.net/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz +# PATCH-FIX-OPENSUSE avoid unnecessary rebuilds Patch1: prboom-nodatetime.diff -Patch2: prboom-types1.diff -Patch3: prboom-types2.diff -Patch5: prboom-enable-tessellation.diff -Patch6: prboom-hbar-color.diff -Patch7: prboom-hbar-all.diff -Patch8: prboom-hbar-gradient.diff -Source2: clean_source.sh BuildRequires: Mesa-devel +BuildRequires: autoconf BuildRequires: automake BuildRequires: fluidsynth-devel BuildRequires: libSDL_image-devel BuildRequires: libSDL_mixer-devel BuildRequires: libSDL_net-devel +BuildRequires: libdumb-devel BuildRequires: libpng-devel BuildRequires: libvorbis-devel +#BuildRequires: libmad-devel +BuildRequires: bash-completion +BuildRequires: hicolor-icon-theme BuildRequires: pcre-devel -BuildRequires: xz -Suggests: freedoom +BuildRequires: portmidi-devel +BuildRequires: update-desktop-files +Recommends: freedoom Provides: prboom = 2.5.0plus Obsoletes: prboom <= 2.5.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -54,7 +51,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build PrBoom+ is a Doom source port developed from the original PrBoom project. -prboom is an open-source port of Doom, the classic 3D first-person +PrBoom is an open-source port of Doom, the classic 3D first-person shooter game. It totally outclassed any 3D world games that preceded it, with amazing speed, flexibility, and outstanding gameplay. The specs to the game were released, and thousands of extra levels were @@ -69,35 +66,42 @@ Doom/Doom2 engines, and it is possible to be confident this will never happen in the future since compatibility is as important. %prep -%setup -qn prboom2 -%patch -P 1 -P 2 -P 3 -P 5 -P 6 -P 7 -P 8 -p1 +%setup -q +%patch1 -p1 %build -./bootstrap; # rpm has its own optimizations, so turn off shipped defaults %configure --enable-gl --disable-cpu-opt --program-prefix='' \ - --with-waddir=%_datadir/doom --disable-dogs + --with-waddir=%{_datadir}/doom --disable-dogs make %{?_smp_mflags} %install -b="%buildroot"; -make install DESTDIR="$b"; -# Will manually package docs (see %%files) -rm -Rf "$b/%_datadir/doc"; -mkdir -p "$b/%_bindir"; -mv "$b/%_prefix/games"/* "$b/%_bindir/"; -# Convenience symlink -ln -s prboom-plus "$b/%_bindir/prboom"; +%make_install gamesdir=%{_bindir} + +# convenience symlink +ln -s prboom-plus %{buildroot}%{_bindir}/prboom + +install -Dm644 ICONS/prboom-plus.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/prboom-plus.svg +install -Dm644 ICONS/prboom-plus.desktop %{buildroot}%{_datadir}/applications/prboom-plus.desktop + +install -Dm644 ICONS/prboom-plus.bash %{buildroot}%{_datadir}/bash-completion/completions/prboom-plus.bash %post -echo "INFO: %name: The global IWAD directory is %_datadir/doom."; +%desktop_database_post +%icon_theme_cache_post + +%postun +%desktop_database_postun +%icon_theme_cache_postun %files %defattr(-,root,root) -%doc NEWS AUTHORS README -%doc doc/MBF.txt doc/MBFFAQ.txt doc/README.compat doc/README.demos doc/boom.txt -%_bindir/* -%_datadir/doom -%_mandir/*/* +%{_bindir}/* +%{_datadir}/doom +%{_datadir}/doc/%{name}-%{version} +%{_mandir}/*/* +%{_datadir}/applications/prboom-plus.desktop +%{_datadir}/icons/hicolor/scalable/apps/prboom-plus.svg +%{_datadir}/bash-completion/completions/* %changelog diff --git a/prboom-types1.diff b/prboom-types1.diff deleted file mode 100644 index 5e8b7ac..0000000 --- a/prboom-types1.diff +++ /dev/null @@ -1,29 +0,0 @@ -From: Jan Engelhardt - -build: fix compiler warnings - -oplplayer.c:1347:9: warning: format '%i' expects type 'int', but -argument 3 has type 'size_t' -gl_main.c:1307:5: warning: format '%i' expects type 'int', but -argument 3 has type 'long int' - -size_t requires %z; the second instance actually has type ptrdiff_t, -so %t is required. - ---- - src/MUSIC/oplplayer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: prboom-plus-2.5.1.3/src/MUSIC/oplplayer.c -=================================================================== ---- prboom-plus-2.5.1.3.orig/src/MUSIC/oplplayer.c -+++ prboom-plus-2.5.1.3/src/MUSIC/oplplayer.c -@@ -1356,7 +1356,7 @@ static const void *I_OPL_RegisterSong(co - // time numbers we have to traverse the tracks and everything - if (mf.len < 100) - { -- lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%i bytes)\n", mf.len); -+ lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%zu bytes)\n", mf.len); - return NULL; - } - diff --git a/prboom-types2.diff b/prboom-types2.diff deleted file mode 100644 index 92bd069..0000000 --- a/prboom-types2.diff +++ /dev/null @@ -1,194 +0,0 @@ -From: Jan Engelhardt - -build: fix compiler warnings about casting across different-size types - -p_saveg.c: In function 'P_ArchivePlayers': -p_saveg.c:66:9: warning: cast from pointer to integer of different size -[...] - ---- - src/g_overflow.c | 3 ++- - src/p_saveg.c | 31 ++++++++++++++++--------------- - src/r_drawflush.inl | 4 +++- - 3 files changed, 21 insertions(+), 17 deletions(-) - -Index: prboom2/src/g_overflow.c -=================================================================== ---- prboom2.orig/src/g_overflow.c -+++ prboom2/src/g_overflow.c -@@ -35,6 +35,7 @@ - #include "config.h" - #endif - -+#include - #include - #include - -@@ -170,7 +171,7 @@ void InterceptsOverrun(int num_intercept - - InterceptsMemoryOverrun(location, intercept->frac); - InterceptsMemoryOverrun(location + 4, intercept->isaline); -- InterceptsMemoryOverrun(location + 8, (int) intercept->d.thing); -+ InterceptsMemoryOverrun(location + 8, (uintptr_t) intercept->d.thing); - } - } - } -Index: prboom2/src/p_saveg.c -=================================================================== ---- prboom2.orig/src/p_saveg.c -+++ prboom2/src/p_saveg.c -@@ -31,6 +31,7 @@ - * - *-----------------------------------------------------------------------------*/ - -+#include - #include "doomstat.h" - #include "r_main.h" - #include "p_maputl.h" -@@ -48,7 +49,7 @@ byte *save_p; - - // Pads save_p to a 4-byte boundary - // so that the load/save works on SGI&Gecko. --#define PADSAVEP() do { save_p += (4 - ((int) save_p & 3)) & 3; } while (0) -+#define PADSAVEP() do { save_p += (4 - ((uintptr_t) save_p & 3)) & 3; } while (0) - // - // P_ArchivePlayers - // -@@ -99,7 +100,7 @@ void P_UnArchivePlayers (void) - for (j=0 ; jnext) - if (th->function == P_MobjThinker) -- th->prev = (thinker_t *) ++number_of_thinkers; -+ th->prev = (thinker_t *)(uintptr_t) ++number_of_thinkers; - } - - // phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the -@@ -474,10 +475,10 @@ void P_UnArchiveThinkers (void) - memcpy (mobj, save_p, sizeof(mobj_t)); - save_p += sizeof(mobj_t); - -- mobj->state = states + (int) mobj->state; -+ mobj->state = states + (uintptr_t) mobj->state; - - if (mobj->player) -- (mobj->player = &players[(int) mobj->player - 1]) -> mo = mobj; -+ (mobj->player = &players[(uintptr_t) mobj->player - 1]) -> mo = mobj; - - P_SetThingPosition (mobj); - mobj->info = &mobjinfo[mobj->type]; -@@ -799,7 +800,7 @@ void P_UnArchiveSpecials (void) - ceiling_t *ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVEL, NULL); - memcpy (ceiling, save_p, sizeof(*ceiling)); - save_p += sizeof(*ceiling); -- ceiling->sector = §ors[(int)ceiling->sector]; -+ ceiling->sector = §ors[(uintptr_t)ceiling->sector]; - ceiling->sector->ceilingdata = ceiling; //jff 2/22/98 - - if (ceiling->thinker.function) -@@ -816,10 +817,10 @@ void P_UnArchiveSpecials (void) - vldoor_t *door = Z_Malloc (sizeof(*door), PU_LEVEL, NULL); - memcpy (door, save_p, sizeof(*door)); - save_p += sizeof(*door); -- door->sector = §ors[(int)door->sector]; -+ door->sector = §ors[(uintptr_t)door->sector]; - - //jff 1/31/98 unarchive line remembered by door as well -- door->line = (int)door->line!=-1? &lines[(int)door->line] : NULL; -+ door->line = (uintptr_t)door->line!=-1? &lines[(uintptr_t)door->line] : NULL; - - door->sector->ceilingdata = door; //jff 2/22/98 - door->thinker.function = T_VerticalDoor; -@@ -833,7 +834,7 @@ void P_UnArchiveSpecials (void) - floormove_t *floor = Z_Malloc (sizeof(*floor), PU_LEVEL, NULL); - memcpy (floor, save_p, sizeof(*floor)); - save_p += sizeof(*floor); -- floor->sector = §ors[(int)floor->sector]; -+ floor->sector = §ors[(uintptr_t)floor->sector]; - floor->sector->floordata = floor; //jff 2/22/98 - floor->thinker.function = T_MoveFloor; - P_AddThinker (&floor->thinker); -@@ -846,7 +847,7 @@ void P_UnArchiveSpecials (void) - plat_t *plat = Z_Malloc (sizeof(*plat), PU_LEVEL, NULL); - memcpy (plat, save_p, sizeof(*plat)); - save_p += sizeof(*plat); -- plat->sector = §ors[(int)plat->sector]; -+ plat->sector = §ors[(uintptr_t)plat->sector]; - plat->sector->floordata = plat; //jff 2/22/98 - - if (plat->thinker.function) -@@ -863,7 +864,7 @@ void P_UnArchiveSpecials (void) - lightflash_t *flash = Z_Malloc (sizeof(*flash), PU_LEVEL, NULL); - memcpy (flash, save_p, sizeof(*flash)); - save_p += sizeof(*flash); -- flash->sector = §ors[(int)flash->sector]; -+ flash->sector = §ors[(uintptr_t)flash->sector]; - flash->thinker.function = T_LightFlash; - P_AddThinker (&flash->thinker); - break; -@@ -875,7 +876,7 @@ void P_UnArchiveSpecials (void) - strobe_t *strobe = Z_Malloc (sizeof(*strobe), PU_LEVEL, NULL); - memcpy (strobe, save_p, sizeof(*strobe)); - save_p += sizeof(*strobe); -- strobe->sector = §ors[(int)strobe->sector]; -+ strobe->sector = §ors[(uintptr_t)strobe->sector]; - strobe->thinker.function = T_StrobeFlash; - P_AddThinker (&strobe->thinker); - break; -@@ -887,7 +888,7 @@ void P_UnArchiveSpecials (void) - glow_t *glow = Z_Malloc (sizeof(*glow), PU_LEVEL, NULL); - memcpy (glow, save_p, sizeof(*glow)); - save_p += sizeof(*glow); -- glow->sector = §ors[(int)glow->sector]; -+ glow->sector = §ors[(uintptr_t)glow->sector]; - glow->thinker.function = T_Glow; - P_AddThinker (&glow->thinker); - break; -@@ -899,7 +900,7 @@ void P_UnArchiveSpecials (void) - fireflicker_t *flicker = Z_Malloc (sizeof(*flicker), PU_LEVEL, NULL); - memcpy (flicker, save_p, sizeof(*flicker)); - save_p += sizeof(*flicker); -- flicker->sector = §ors[(int)flicker->sector]; -+ flicker->sector = §ors[(uintptr_t)flicker->sector]; - flicker->thinker.function = T_FireFlicker; - P_AddThinker (&flicker->thinker); - break; -@@ -912,7 +913,7 @@ void P_UnArchiveSpecials (void) - elevator_t *elevator = Z_Malloc (sizeof(*elevator), PU_LEVEL, NULL); - memcpy (elevator, save_p, sizeof(*elevator)); - save_p += sizeof(*elevator); -- elevator->sector = §ors[(int)elevator->sector]; -+ elevator->sector = §ors[(uintptr_t)elevator->sector]; - elevator->sector->floordata = elevator; //jff 2/22/98 - elevator->sector->ceilingdata = elevator; //jff 2/22/98 - elevator->thinker.function = T_MoveElevator; -Index: prboom2/src/r_drawflush.inl -=================================================================== ---- prboom2.orig/src/r_drawflush.inl -+++ prboom2/src/r_drawflush.inl -@@ -28,6 +28,8 @@ - * - *-----------------------------------------------------------------------------*/ - -+#include -+ - #if (R_DRAWCOLUMN_PIPELINE_BITS == 8) - #define SCREENTYPE byte - #define TOPLEFT byte_topleft -@@ -250,7 +252,7 @@ static void R_FLUSHQUAD_FUNCNAME(void) - } - #else - #if (R_DRAWCOLUMN_PIPELINE_BITS == 8) -- if ((sizeof(int) == 4) && (((int)source % 4) == 0) && (((int)dest % 4) == 0)) { -+ if ((sizeof(int) == 4) && (((uintptr_t)source % 4) == 0) && (((uintptr_t)dest % 4) == 0)) { - while(--count >= 0) - { - *(int *)dest = *(int *)source; From 95b480356974c11fcb2d352e63bddb07cf4ac887bfe199bb722a6b53071b63bf Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 26 Mar 2016 21:59:11 +0000 Subject: [PATCH 2/7] OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=18 --- prboom-plus.changes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prboom-plus.changes b/prboom-plus.changes index 44b855d..9fd6fcf 100644 --- a/prboom-plus.changes +++ b/prboom-plus.changes @@ -2,6 +2,9 @@ Sat Mar 26 09:54:56 UTC 2016 - mailaender@opensuse.org - Update to version 2.5.1.4 +- Removed prboom-types1.diff, prboom-types2.diff, + prboom-enable-tessellation.diff, prboom-hbar-color.diff, + prboom-hbar-all.diff and prboom-hbar-gradient.diff ------------------------------------------------------------------- Sun Mar 29 19:19:54 UTC 2015 - jengelh@inai.de From fe064aae55a091c7c8c69672f6ac70c63f008b8a2a7743b45f9f8f9477761467 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 29 Mar 2016 23:46:33 +0000 Subject: [PATCH 3/7] Restore/update sanitation script restore patches restore spec syntax restore suggests:freedoom trim description a bit OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=19 --- clean_source.sh | 17 +++ prboom-enable-tessellation.diff | 27 +++++ prboom-hbar-all.diff | 26 +++++ prboom-hbar-color.diff | 31 +++++ prboom-hbar-gradient.diff | 120 ++++++++++++++++++++ prboom-plus-2.5.1.4+.tar.xz | 3 + prboom-plus-2.5.1.4.tar.gz | 3 - prboom-plus.spec | 73 ++++++------ prboom-types1.diff | 29 +++++ prboom-types2.diff | 194 ++++++++++++++++++++++++++++++++ 10 files changed, 483 insertions(+), 40 deletions(-) create mode 100644 clean_source.sh create mode 100644 prboom-enable-tessellation.diff create mode 100644 prboom-hbar-all.diff create mode 100644 prboom-hbar-color.diff create mode 100644 prboom-hbar-gradient.diff create mode 100644 prboom-plus-2.5.1.4+.tar.xz delete mode 100644 prboom-plus-2.5.1.4.tar.gz create mode 100644 prboom-types1.diff create mode 100644 prboom-types2.diff diff --git a/clean_source.sh b/clean_source.sh new file mode 100644 index 0000000..afdda1d --- /dev/null +++ b/clean_source.sh @@ -0,0 +1,17 @@ +#!/bin/sh -ex +# Remove Wolfenstein dogs from source; they belong to another game +# with incompatible licensing. + +: ${DOOMWADDIR:=/usr/share/doom}; + +version=$(perl -lne 'if(/^Version\s*:\s*(\S+)/){print$1;exit}' "$i" +done +popd +find "prboom-plus-$version" -print0 | sort -z | \ + tar --no-r --null --use=xz -T- -cvf "prboom-plus-$version+.tar.xz" diff --git a/prboom-enable-tessellation.diff b/prboom-enable-tessellation.diff new file mode 100644 index 0000000..0fa15ce --- /dev/null +++ b/prboom-enable-tessellation.diff @@ -0,0 +1,27 @@ +Date: 2011-08-03 18:36:44+0200 +From: Jan Engelhardt +Upstream: sent + +Always do tesselation, because otherwise, map hacks like +self-referencing sectors (cf. +http://doom.wikia.com/wiki/Making_a_self-referencing_sector) will not +be rendered. + +--- + src/gl_main.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: prboom-plus-2.5.1.4/src/gl_main.c +=================================================================== +--- prboom-plus-2.5.1.4.orig/src/gl_main.c ++++ prboom-plus-2.5.1.4/src/gl_main.c +@@ -36,6 +36,9 @@ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif ++#ifndef USE_GLU_TESS ++# define USE_GLU_TESS 1 ++#endif + + #include "gl_opengl.h" + diff --git a/prboom-hbar-all.diff b/prboom-hbar-all.diff new file mode 100644 index 0000000..3f9a7fd --- /dev/null +++ b/prboom-hbar-all.diff @@ -0,0 +1,26 @@ +From: Jan Engelhardt +Date: 2013-05-01 09:53:49.000000000 +0200 +Category: improvement +Status: sent Wed, 1 May 2013 14:28:44 +0200 + +Show the health bar for all destructible items (including +barrels and Lost Souls). + +--- + src/gl_main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: prboom2/src/gl_main.c +=================================================================== +--- prboom2.orig/src/gl_main.c ++++ prboom2/src/gl_main.c +@@ -2399,7 +2399,8 @@ static void gld_DrawSprite(GLSprite *spr + + 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) + { + GLHealthBar hbar; + int health_percent = thing->health * 100 / thing->info->spawnhealth; diff --git a/prboom-hbar-color.diff b/prboom-hbar-color.diff new file mode 100644 index 0000000..7a1aff9 --- /dev/null +++ b/prboom-hbar-color.diff @@ -0,0 +1,31 @@ +From: Jan Engelhardt +Date: 2013-05-01 09:42:45.000000000 +0200 +Category: improvement +Status: sent Wed, 1 May 2013 14:28:44 +0200 + +With the current value of health_hbar_green=0, green will never +be shown for monsters, which feels incorrect. + +--- + src/m_misc.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: prboom2/src/m_misc.c +=================================================================== +--- prboom2.orig/src/m_misc.c ++++ prboom2/src/m_misc.c +@@ -953,11 +953,11 @@ default_t defaults[] = + def_bool,ss_stat}, + {"health_bar_full_length", {&health_bar_full_length}, {1},0,1, + def_bool,ss_stat}, +- {"health_bar_red", {&health_bar_red}, {50},0,100, ++ {"health_bar_red", {&health_bar_red}, {25},0,100, + def_int,ss_stat}, +- {"health_bar_yellow", {&health_bar_yellow}, {99},0,100, ++ {"health_bar_yellow", {&health_bar_yellow}, {50},0,100, + def_int,ss_stat}, +- {"health_bar_green", {&health_bar_green}, {0},0,100, ++ {"health_bar_green", {&health_bar_green}, {99},0,100, + def_int,ss_stat}, + #endif + diff --git a/prboom-hbar-gradient.diff b/prboom-hbar-gradient.diff new file mode 100644 index 0000000..0b959df --- /dev/null +++ b/prboom-hbar-gradient.diff @@ -0,0 +1,120 @@ +From: Jan Engelhardt +Date: 2013-05-01 14:27:39.000000000 +0200 +Category: improvement +Status: sent Wed, 1 May 2013 14:28:44 +0200 + +This makes the health bar above shootables use gradiented color. + +--- + src/gl_drawinfo.c | 4 ++-- + src/gl_intern.h | 2 +- + src/gl_main.c | 44 +++++++++++++++++--------------------------- + 3 files changed, 20 insertions(+), 30 deletions(-) + +Index: prboom-plus-2.5.1.4/src/gl_drawinfo.c +=================================================================== +--- prboom-plus-2.5.1.4.orig/src/gl_drawinfo.c ++++ prboom-plus-2.5.1.4/src/gl_drawinfo.c +@@ -112,10 +112,10 @@ static void gld_AddDrawRange(int size) + #define SIZEOF8(type) ((sizeof(type)+7)&~7) + void gld_AddDrawItem(GLDrawItemType itemtype, void *itemdata) + { +- int itemsize = 0; ++ unsigned int itemsize = 0; + byte *item_p = NULL; + +- static int itemsizes[GLDIT_TYPES] = { ++ static const unsigned int itemsizes[GLDIT_TYPES] = { + 0, + SIZEOF8(GLWall), SIZEOF8(GLWall), SIZEOF8(GLWall), SIZEOF8(GLWall), SIZEOF8(GLWall), + SIZEOF8(GLWall), SIZEOF8(GLWall), +Index: prboom-plus-2.5.1.4/src/gl_intern.h +=================================================================== +--- prboom-plus-2.5.1.4.orig/src/gl_intern.h ++++ prboom-plus-2.5.1.4/src/gl_intern.h +@@ -218,7 +218,7 @@ typedef struct + + typedef struct + { +- int cm; ++ float r,g; + + float x1, x2, x3; + float z1, z2, z3; +Index: prboom-plus-2.5.1.4/src/gl_main.c +=================================================================== +--- prboom-plus-2.5.1.4.orig/src/gl_main.c ++++ prboom-plus-2.5.1.4/src/gl_main.c +@@ -2339,15 +2339,20 @@ static void gld_AddHealthBar(mobj_t* thi + GLHealthBar hbar; + int health_percent = thing->health * 100 / thing->info->spawnhealth; + +- 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; ++ if (health_percent <= health_bar_red) { ++ hbar.r = 1; ++ hbar.g = 0; ++ } else if (health_percent <= health_bar_yellow) { ++ hbar.r = 1; ++ hbar.g = (double)(health_percent - health_bar_red) / ++ (health_bar_yellow - health_bar_red); ++ } else if (health_percent <= health_bar_green) { ++ /* FullSimplify[1-((percent-yellow)/(green-yellow))] */ ++ hbar.r = (double)(health_bar_green - health_percent) / ++ (health_bar_green - health_bar_yellow); ++ hbar.g = 1; ++ } + +- if (hbar.cm >= 0) + { + float sx2 = (float)thing->radius / 2.0f / MAP_SCALE; + float sx1 = sx2 - (float)health_percent * (float)thing->radius / 100.0f / MAP_SCALE; +@@ -2371,7 +2376,6 @@ static void gld_AddHealthBar(mobj_t* thi + static void gld_DrawHealthBars(void) + { + int i, count; +- int cm = -1; + + count = gld_drawinfo.num_items[GLDIT_HBAR]; + if (count > 0) +@@ -2382,31 +2386,17 @@ 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, 1); + + glVertex3f(hbar->x1, hbar->y, hbar->z1); + glVertex3f(hbar->x2, hbar->y, hbar->z2); +- } +- glEnd(); +- +- if (health_bar_full_length) +- { +- glColor4f(0.5f, 0.5f, 0.5f, 1.0f); +- glBegin(GL_LINES); +- for (i = count - 1; i >= 0; i--) +- { +- GLHealthBar *hbar = gld_drawinfo.items[GLDIT_HBAR][i].item.hbar; +- ++ if (health_bar_full_length) { ++ glColor4f(0.5f, 0.5f, 0.5f, 1.0f); + glVertex3f(hbar->x1, hbar->y, hbar->z1); + glVertex3f(hbar->x3, hbar->y, hbar->z3); + } +- glEnd(); + } +- ++ glEnd(); + gld_EnableTexture2D(GL_TEXTURE0_ARB, true); + } + } diff --git a/prboom-plus-2.5.1.4+.tar.xz b/prboom-plus-2.5.1.4+.tar.xz new file mode 100644 index 0000000..0c8e4b4 --- /dev/null +++ b/prboom-plus-2.5.1.4+.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5554c6690677886fc976182f03e2f4cc16d9b3ffb8e039c839065d082031bbe +size 1118052 diff --git a/prboom-plus-2.5.1.4.tar.gz b/prboom-plus-2.5.1.4.tar.gz deleted file mode 100644 index 8f9d309..0000000 --- a/prboom-plus-2.5.1.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0e2241d174839b107f1a42b191aa9895dc6749e477cbc850ad520fba2353b94 -size 1627558 diff --git a/prboom-plus.spec b/prboom-plus.spec index 46526e1..a7c92dd 100644 --- a/prboom-plus.spec +++ b/prboom-plus.spec @@ -22,69 +22,68 @@ Release: 0 Summary: Open source port of the DOOM game engine License: GPL-2.0+ Group: Amusements/Games/3D/Shoot -Url: http://prboom-plus.sourceforge.net/ -Source: http://downloads.sourceforge.net/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz -# PATCH-FIX-OPENSUSE avoid unnecessary rebuilds +Url: http://prboom-plus.sf.net/ + +#SVN-Clone: https://svn.prboom.org/repos/branches/prboom-plus-24/prboom2 +#DL-URL: http://downloads.sf.net/prboom-plus/prboom-plus-2.5.1.4.tar.gz +Source: %name-%version+.tar.xz +Source2: clean_source.sh Patch1: prboom-nodatetime.diff +Patch2: prboom-types1.diff +Patch3: prboom-types2.diff +Patch5: prboom-enable-tessellation.diff +Patch6: prboom-hbar-color.diff +Patch7: prboom-hbar-all.diff +Patch8: prboom-hbar-gradient.diff BuildRequires: Mesa-devel -BuildRequires: autoconf BuildRequires: automake +BuildRequires: bash-completion BuildRequires: fluidsynth-devel +BuildRequires: hicolor-icon-theme BuildRequires: libSDL_image-devel BuildRequires: libSDL_mixer-devel BuildRequires: libSDL_net-devel BuildRequires: libdumb-devel BuildRequires: libpng-devel BuildRequires: libvorbis-devel -#BuildRequires: libmad-devel -BuildRequires: bash-completion -BuildRequires: hicolor-icon-theme BuildRequires: pcre-devel BuildRequires: portmidi-devel BuildRequires: update-desktop-files -Recommends: freedoom +Suggests: freedoom Provides: prboom = 2.5.0plus Obsoletes: prboom <= 2.5.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description PrBoom+ is a Doom source port developed from the original PrBoom -project. +project, an open-source port of Doom, the classic 3D first-person +shooter game which outclassed any 3D world games that preceded +it, with amazing speed, flexibility, and outstanding gameplay. -PrBoom is an open-source port of Doom, the classic 3D first-person -shooter game. It totally outclassed any 3D world games that preceded -it, with amazing speed, flexibility, and outstanding gameplay. The -specs to the game were released, and thousands of extra levels were -written by fans of the game; even today new levels are written for -Doom faster then any one person could play them. - -The target of the prboom-plus project is to extend the original port -with features that are necessary or useful to the developers and all -those interested in their work. It is worth noting that all changes -introduced in no way break PrBoom's compatibility with the original -Doom/Doom2 engines, and it is possible to be confident this will -never happen in the future since compatibility is as important. +prboom(-plus) focuses heavily on retaining compatibility with the +original Doom engines, which plays a big role in demo recording and +playback. %prep %setup -q -%patch1 -p1 +%patch -P 1 -P 2 -P 3 -P 5 -P 6 -P 7 -P 8 -p1 %build # rpm has its own optimizations, so turn off shipped defaults -%configure --enable-gl --disable-cpu-opt --program-prefix='' \ - --with-waddir=%{_datadir}/doom --disable-dogs +%configure --enable-gl --disable-cpu-opt --program-prefix="" \ + --with-waddir="%_datadir/doom" --disable-dogs make %{?_smp_mflags} %install -%make_install gamesdir=%{_bindir} +%make_install gamesdir="%_bindir" # convenience symlink -ln -s prboom-plus %{buildroot}%{_bindir}/prboom +ln -s prboom-plus "%buildroot/%_bindir/prboom" -install -Dm644 ICONS/prboom-plus.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/prboom-plus.svg -install -Dm644 ICONS/prboom-plus.desktop %{buildroot}%{_datadir}/applications/prboom-plus.desktop +install -Dm0644 ICONS/prboom-plus.svg "%buildroot/%_datadir/icons/hicolor/scalable/apps/prboom-plus.svg" +install -Dm0644 ICONS/prboom-plus.desktop "%buildroot/%_datadir/applications/prboom-plus.desktop" -install -Dm644 ICONS/prboom-plus.bash %{buildroot}%{_datadir}/bash-completion/completions/prboom-plus.bash +install -Dm0644 ICONS/prboom-plus.bash "%buildroot/%_datadir/bash-completion/completions/prboom-plus.bash" %post %desktop_database_post @@ -96,12 +95,12 @@ install -Dm644 ICONS/prboom-plus.bash %{buildroot}%{_datadir}/bash-completion/co %files %defattr(-,root,root) -%{_bindir}/* -%{_datadir}/doom -%{_datadir}/doc/%{name}-%{version} -%{_mandir}/*/* -%{_datadir}/applications/prboom-plus.desktop -%{_datadir}/icons/hicolor/scalable/apps/prboom-plus.svg -%{_datadir}/bash-completion/completions/* +%_bindir/* +%_datadir/doom/ +%_datadir/doc/%name-%version/ +%_mandir/*/* +%_datadir/applications/prboom-plus.desktop +%_datadir/icons/hicolor/scalable/apps/prboom-plus.svg +%_datadir/bash-completion/completions/* %changelog diff --git a/prboom-types1.diff b/prboom-types1.diff new file mode 100644 index 0000000..5e8b7ac --- /dev/null +++ b/prboom-types1.diff @@ -0,0 +1,29 @@ +From: Jan Engelhardt + +build: fix compiler warnings + +oplplayer.c:1347:9: warning: format '%i' expects type 'int', but +argument 3 has type 'size_t' +gl_main.c:1307:5: warning: format '%i' expects type 'int', but +argument 3 has type 'long int' + +size_t requires %z; the second instance actually has type ptrdiff_t, +so %t is required. + +--- + src/MUSIC/oplplayer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: prboom-plus-2.5.1.3/src/MUSIC/oplplayer.c +=================================================================== +--- prboom-plus-2.5.1.3.orig/src/MUSIC/oplplayer.c ++++ prboom-plus-2.5.1.3/src/MUSIC/oplplayer.c +@@ -1356,7 +1356,7 @@ static const void *I_OPL_RegisterSong(co + // time numbers we have to traverse the tracks and everything + if (mf.len < 100) + { +- lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%i bytes)\n", mf.len); ++ lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%zu bytes)\n", mf.len); + return NULL; + } + diff --git a/prboom-types2.diff b/prboom-types2.diff new file mode 100644 index 0000000..92bd069 --- /dev/null +++ b/prboom-types2.diff @@ -0,0 +1,194 @@ +From: Jan Engelhardt + +build: fix compiler warnings about casting across different-size types + +p_saveg.c: In function 'P_ArchivePlayers': +p_saveg.c:66:9: warning: cast from pointer to integer of different size +[...] + +--- + src/g_overflow.c | 3 ++- + src/p_saveg.c | 31 ++++++++++++++++--------------- + src/r_drawflush.inl | 4 +++- + 3 files changed, 21 insertions(+), 17 deletions(-) + +Index: prboom2/src/g_overflow.c +=================================================================== +--- prboom2.orig/src/g_overflow.c ++++ prboom2/src/g_overflow.c +@@ -35,6 +35,7 @@ + #include "config.h" + #endif + ++#include + #include + #include + +@@ -170,7 +171,7 @@ void InterceptsOverrun(int num_intercept + + InterceptsMemoryOverrun(location, intercept->frac); + InterceptsMemoryOverrun(location + 4, intercept->isaline); +- InterceptsMemoryOverrun(location + 8, (int) intercept->d.thing); ++ InterceptsMemoryOverrun(location + 8, (uintptr_t) intercept->d.thing); + } + } + } +Index: prboom2/src/p_saveg.c +=================================================================== +--- prboom2.orig/src/p_saveg.c ++++ prboom2/src/p_saveg.c +@@ -31,6 +31,7 @@ + * + *-----------------------------------------------------------------------------*/ + ++#include + #include "doomstat.h" + #include "r_main.h" + #include "p_maputl.h" +@@ -48,7 +49,7 @@ byte *save_p; + + // Pads save_p to a 4-byte boundary + // so that the load/save works on SGI&Gecko. +-#define PADSAVEP() do { save_p += (4 - ((int) save_p & 3)) & 3; } while (0) ++#define PADSAVEP() do { save_p += (4 - ((uintptr_t) save_p & 3)) & 3; } while (0) + // + // P_ArchivePlayers + // +@@ -99,7 +100,7 @@ void P_UnArchivePlayers (void) + for (j=0 ; jnext) + if (th->function == P_MobjThinker) +- th->prev = (thinker_t *) ++number_of_thinkers; ++ th->prev = (thinker_t *)(uintptr_t) ++number_of_thinkers; + } + + // phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the +@@ -474,10 +475,10 @@ void P_UnArchiveThinkers (void) + memcpy (mobj, save_p, sizeof(mobj_t)); + save_p += sizeof(mobj_t); + +- mobj->state = states + (int) mobj->state; ++ mobj->state = states + (uintptr_t) mobj->state; + + if (mobj->player) +- (mobj->player = &players[(int) mobj->player - 1]) -> mo = mobj; ++ (mobj->player = &players[(uintptr_t) mobj->player - 1]) -> mo = mobj; + + P_SetThingPosition (mobj); + mobj->info = &mobjinfo[mobj->type]; +@@ -799,7 +800,7 @@ void P_UnArchiveSpecials (void) + ceiling_t *ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVEL, NULL); + memcpy (ceiling, save_p, sizeof(*ceiling)); + save_p += sizeof(*ceiling); +- ceiling->sector = §ors[(int)ceiling->sector]; ++ ceiling->sector = §ors[(uintptr_t)ceiling->sector]; + ceiling->sector->ceilingdata = ceiling; //jff 2/22/98 + + if (ceiling->thinker.function) +@@ -816,10 +817,10 @@ void P_UnArchiveSpecials (void) + vldoor_t *door = Z_Malloc (sizeof(*door), PU_LEVEL, NULL); + memcpy (door, save_p, sizeof(*door)); + save_p += sizeof(*door); +- door->sector = §ors[(int)door->sector]; ++ door->sector = §ors[(uintptr_t)door->sector]; + + //jff 1/31/98 unarchive line remembered by door as well +- door->line = (int)door->line!=-1? &lines[(int)door->line] : NULL; ++ door->line = (uintptr_t)door->line!=-1? &lines[(uintptr_t)door->line] : NULL; + + door->sector->ceilingdata = door; //jff 2/22/98 + door->thinker.function = T_VerticalDoor; +@@ -833,7 +834,7 @@ void P_UnArchiveSpecials (void) + floormove_t *floor = Z_Malloc (sizeof(*floor), PU_LEVEL, NULL); + memcpy (floor, save_p, sizeof(*floor)); + save_p += sizeof(*floor); +- floor->sector = §ors[(int)floor->sector]; ++ floor->sector = §ors[(uintptr_t)floor->sector]; + floor->sector->floordata = floor; //jff 2/22/98 + floor->thinker.function = T_MoveFloor; + P_AddThinker (&floor->thinker); +@@ -846,7 +847,7 @@ void P_UnArchiveSpecials (void) + plat_t *plat = Z_Malloc (sizeof(*plat), PU_LEVEL, NULL); + memcpy (plat, save_p, sizeof(*plat)); + save_p += sizeof(*plat); +- plat->sector = §ors[(int)plat->sector]; ++ plat->sector = §ors[(uintptr_t)plat->sector]; + plat->sector->floordata = plat; //jff 2/22/98 + + if (plat->thinker.function) +@@ -863,7 +864,7 @@ void P_UnArchiveSpecials (void) + lightflash_t *flash = Z_Malloc (sizeof(*flash), PU_LEVEL, NULL); + memcpy (flash, save_p, sizeof(*flash)); + save_p += sizeof(*flash); +- flash->sector = §ors[(int)flash->sector]; ++ flash->sector = §ors[(uintptr_t)flash->sector]; + flash->thinker.function = T_LightFlash; + P_AddThinker (&flash->thinker); + break; +@@ -875,7 +876,7 @@ void P_UnArchiveSpecials (void) + strobe_t *strobe = Z_Malloc (sizeof(*strobe), PU_LEVEL, NULL); + memcpy (strobe, save_p, sizeof(*strobe)); + save_p += sizeof(*strobe); +- strobe->sector = §ors[(int)strobe->sector]; ++ strobe->sector = §ors[(uintptr_t)strobe->sector]; + strobe->thinker.function = T_StrobeFlash; + P_AddThinker (&strobe->thinker); + break; +@@ -887,7 +888,7 @@ void P_UnArchiveSpecials (void) + glow_t *glow = Z_Malloc (sizeof(*glow), PU_LEVEL, NULL); + memcpy (glow, save_p, sizeof(*glow)); + save_p += sizeof(*glow); +- glow->sector = §ors[(int)glow->sector]; ++ glow->sector = §ors[(uintptr_t)glow->sector]; + glow->thinker.function = T_Glow; + P_AddThinker (&glow->thinker); + break; +@@ -899,7 +900,7 @@ void P_UnArchiveSpecials (void) + fireflicker_t *flicker = Z_Malloc (sizeof(*flicker), PU_LEVEL, NULL); + memcpy (flicker, save_p, sizeof(*flicker)); + save_p += sizeof(*flicker); +- flicker->sector = §ors[(int)flicker->sector]; ++ flicker->sector = §ors[(uintptr_t)flicker->sector]; + flicker->thinker.function = T_FireFlicker; + P_AddThinker (&flicker->thinker); + break; +@@ -912,7 +913,7 @@ void P_UnArchiveSpecials (void) + elevator_t *elevator = Z_Malloc (sizeof(*elevator), PU_LEVEL, NULL); + memcpy (elevator, save_p, sizeof(*elevator)); + save_p += sizeof(*elevator); +- elevator->sector = §ors[(int)elevator->sector]; ++ elevator->sector = §ors[(uintptr_t)elevator->sector]; + elevator->sector->floordata = elevator; //jff 2/22/98 + elevator->sector->ceilingdata = elevator; //jff 2/22/98 + elevator->thinker.function = T_MoveElevator; +Index: prboom2/src/r_drawflush.inl +=================================================================== +--- prboom2.orig/src/r_drawflush.inl ++++ prboom2/src/r_drawflush.inl +@@ -28,6 +28,8 @@ + * + *-----------------------------------------------------------------------------*/ + ++#include ++ + #if (R_DRAWCOLUMN_PIPELINE_BITS == 8) + #define SCREENTYPE byte + #define TOPLEFT byte_topleft +@@ -250,7 +252,7 @@ static void R_FLUSHQUAD_FUNCNAME(void) + } + #else + #if (R_DRAWCOLUMN_PIPELINE_BITS == 8) +- if ((sizeof(int) == 4) && (((int)source % 4) == 0) && (((int)dest % 4) == 0)) { ++ if ((sizeof(int) == 4) && (((uintptr_t)source % 4) == 0) && (((uintptr_t)dest % 4) == 0)) { + while(--count >= 0) + { + *(int *)dest = *(int *)source; From 3f0fc397d7f2b40c073e31c6009dd743d248aa74d58d939071c6eced9c1910e9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 29 Mar 2016 23:58:13 +0000 Subject: [PATCH 4/7] provide better changelog than just 'updated to 2.5.1.4', mention some important things what changed OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=20 --- prboom-plus.changes | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/prboom-plus.changes b/prboom-plus.changes index 9fd6fcf..6b2c4b4 100644 --- a/prboom-plus.changes +++ b/prboom-plus.changes @@ -1,10 +1,14 @@ ------------------------------------------------------------------- -Sat Mar 26 09:54:56 UTC 2016 - mailaender@opensuse.org +Tue Mar 29 23:57:18 UTC 2016 - jengelh@inai.de - Update to version 2.5.1.4 -- Removed prboom-types1.diff, prboom-types2.diff, - prboom-enable-tessellation.diff, prboom-hbar-color.diff, - prboom-hbar-all.diff and prboom-hbar-gradient.diff +* Added "Allow Jump" and "Allow Vertical Aiming" option on + Prboom-plus 'bad' compatibility settings" page. +* Added a "Backpack Changes Thresholds" option +* "Use GL surface for software mode" mode now works much faster + if gl_finish is 0 in config. +* Better support for Chex Quest, +* Fixed the classic "Long Wall" rendering error. ------------------------------------------------------------------- Sun Mar 29 19:19:54 UTC 2015 - jengelh@inai.de From b6d76f0bfaae30986e555730cdba9589d9fb67e131c6d311857a999750a694f7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 30 Mar 2016 00:18:44 +0000 Subject: [PATCH 5/7] no portmidi on 13.1 OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=21 --- prboom-plus.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prboom-plus.spec b/prboom-plus.spec index a7c92dd..9cc2012 100644 --- a/prboom-plus.spec +++ b/prboom-plus.spec @@ -47,7 +47,9 @@ BuildRequires: libdumb-devel BuildRequires: libpng-devel BuildRequires: libvorbis-devel BuildRequires: pcre-devel +%if 0%{?suse_version} >= 1320 BuildRequires: portmidi-devel +%endif BuildRequires: update-desktop-files Suggests: freedoom Provides: prboom = 2.5.0plus From 43af000a1ad95333afa4c78f6b3ddca6bcea84b376962dd7e6865274694953e6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 30 Mar 2016 00:46:07 +0000 Subject: [PATCH 6/7] no need to build-depend on bash-completion. do it like btrfsprogs. OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=22 --- prboom-plus.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/prboom-plus.spec b/prboom-plus.spec index 9cc2012..3789eee 100644 --- a/prboom-plus.spec +++ b/prboom-plus.spec @@ -37,7 +37,6 @@ Patch7: prboom-hbar-all.diff Patch8: prboom-hbar-gradient.diff BuildRequires: Mesa-devel BuildRequires: automake -BuildRequires: bash-completion BuildRequires: fluidsynth-devel BuildRequires: hicolor-icon-theme BuildRequires: libSDL_image-devel @@ -103,6 +102,6 @@ install -Dm0644 ICONS/prboom-plus.bash "%buildroot/%_datadir/bash-completion/com %_mandir/*/* %_datadir/applications/prboom-plus.desktop %_datadir/icons/hicolor/scalable/apps/prboom-plus.svg -%_datadir/bash-completion/completions/* +%_datadir/bash-completion/ %changelog From ae7b9e63a0ac6d7edf2ed5a94e74503d0af5a3fe4605bf02e18b0dd22db127af Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 12 Apr 2016 13:12:32 +0000 Subject: [PATCH 7/7] drop dumb. the package is in no good shape atm and MOD/XM playback can happen via timidity. OBS-URL: https://build.opensuse.org/package/show/games/prboom-plus?expand=0&rev=23 --- prboom-plus.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/prboom-plus.spec b/prboom-plus.spec index 3789eee..13e4d4f 100644 --- a/prboom-plus.spec +++ b/prboom-plus.spec @@ -42,7 +42,6 @@ BuildRequires: hicolor-icon-theme BuildRequires: libSDL_image-devel BuildRequires: libSDL_mixer-devel BuildRequires: libSDL_net-devel -BuildRequires: libdumb-devel BuildRequires: libpng-devel BuildRequires: libvorbis-devel BuildRequires: pcre-devel