[yquake2] 07/09: d/patches/7.01: Import some post-release fixes from upstream

Simon McVittie smcv at debian.org
Sun Jun 18 15:19:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository yquake2.

commit da321a6585a0777e0f878056e99c70e1503c12e7
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Jun 18 15:33:17 2017 +0100

    d/patches/7.01: Import some post-release fixes from upstream
---
 debian/changelog                                   |   1 +
 ...l-Jaquays-name-in-credits-and-quit-screen.patch | 204 +++++++++++++++++++++
 ...andMadeMath.h-to-include-my-non-SSE-patch.patch | 109 +++++++++++
 ...-LD-FLAGS-instead-of-overriding-them-to-o.patch |   2 +-
 ...y-use-usr-local-opt-openal-soft-on-Darwin.patch |   2 +-
 .../Remove-unwanted-rpaths-from-LDFLAGS.patch      |   2 +-
 debian/patches/series                              |   2 +
 7 files changed, 319 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3e8d0a1..a97f448 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ yquake2 (7.00~dfsg1-1) UNRELEASED; urgency=medium
   * New upstream release (Closes: #864483)
     - d/copyright: Update
     - d/patches: Refresh
+    - d/patches/7.01: Import some post-release fixes from upstream
   * d/control: Fix spelling of "contributors"
   * d/p/Only-use-usr-local-opt-openal-soft-on-Darwin.patch:
     Don't try to link to OpenAL from /usr/local/opt/openal-soft
diff --git a/debian/patches/7.01/Fix-Jennell-Jaquays-name-in-credits-and-quit-screen.patch b/debian/patches/7.01/Fix-Jennell-Jaquays-name-in-credits-and-quit-screen.patch
new file mode 100644
index 0000000..fa5f8de
--- /dev/null
+++ b/debian/patches/7.01/Fix-Jennell-Jaquays-name-in-credits-and-quit-screen.patch
@@ -0,0 +1,204 @@
+From: Daniel Gibson <metalcaedes at gmail.com>
+Date: Mon, 12 Jun 2017 18:21:09 +0200
+Subject: Fix Jennell Jaquays' name in credits and quit screen
+
+the latter is done by identifying the baseq2 pics/quit.pcx in LoadPCX()
+and changing some pixels
+---
+ CMakeLists.txt                 |  2 +
+ Makefile                       |  6 ++-
+ src/client/menu/menu.c         |  6 +--
+ src/client/refresh/files/pcx.c | 98 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 107 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e4a1b3..cd42d2d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -431,6 +431,7 @@ set(GL1-Source
+ 	${GL_SRC_DIR}/files/stb.c
+ 	${GL_SRC_DIR}/files/wal.c
+ 	${COMMON_SRC_DIR}/shared/shared.c
++	${COMMON_SRC_DIR}/md4.c
+ 	)
+ 
+ set(GL1-Header
+@@ -465,6 +466,7 @@ set(GL3-Source
+ 	${GL_SRC_DIR}/files/stb.c
+ 	${GL_SRC_DIR}/files/wal.c
+ 	${COMMON_SRC_DIR}/shared/shared.c
++	${COMMON_SRC_DIR}/md4.c
+ 	)
+ 
+ set(GL3-Header
+diff --git a/Makefile b/Makefile
+index 6d654bb..5ef906b 100755
+--- a/Makefile
++++ b/Makefile
+@@ -816,7 +816,8 @@ REFGL1_OBJS_ := \
+ 	src/client/refresh/files/pcx.o \
+ 	src/client/refresh/files/stb.o \
+ 	src/client/refresh/files/wal.o \
+-	src/common/shared/shared.o 
++	src/common/shared/shared.o \
++	src/common/md4.o
+ 	
+ ifeq ($(YQ2_OSTYPE), Windows)
+ REFGL1_OBJS_ += \
+@@ -847,7 +848,8 @@ REFGL3_OBJS_ := \
+ 	src/client/refresh/files/pcx.o \
+ 	src/client/refresh/files/stb.o \
+ 	src/client/refresh/files/wal.o \
+-	src/common/shared/shared.o
++	src/common/shared/shared.o \
++	src/common/md4.o
+ 
+ ifeq ($(YQ2_OSTYPE), Windows)
+ REFGL3_OBJS_ += \
+diff --git a/src/client/menu/menu.c b/src/client/menu/menu.c
+index 1f8c3a3..c67256d 100644
+--- a/src/client/menu/menu.c
++++ b/src/client/menu/menu.c
+@@ -1509,7 +1509,7 @@ static const char *idcredits[] = {
+ 	"Tim Willits",
+ 	"American McGee",
+ 	"Christian Antkow",
+-	"Paul Jaquays",
++	"Jennell Jaquays",
+ 	"Brandon James",
+ 	"",
+ 	"+BIZ",
+@@ -1667,7 +1667,7 @@ static const char *xatcredits[] =
+     "Paul Steed",
+     "Tim Willits",
+     "Christian Antkow",
+-    "Paul Jaquays",
++    "Jennell Jaquays",
+     "Brandon James",
+     "Todd Hollenshead",
+     "Barrett (Bear) Alexander",
+@@ -1791,7 +1791,7 @@ static const char *roguecredits[] =
+     "Paul Steed",
+     "Tim Willits",
+     "Christian Antkow",
+-    "Paul Jaquays",
++    "Jennell Jaquays",
+     "Brandon James",
+     "Todd Hollenshead",
+     "Barrett (Bear) Alexander",
+diff --git a/src/client/refresh/files/pcx.c b/src/client/refresh/files/pcx.c
+index f511775..010a224 100644
+--- a/src/client/refresh/files/pcx.c
++++ b/src/client/refresh/files/pcx.c
+@@ -26,6 +26,96 @@
+ 
+ #include "../ref_shared.h"
+ 
++// Fix Jennell Jaquays' name in the Quitscreen
++// this is 98x11 pixels, each value an index
++// into the standard baseq2/pak0/pics/quit.pcx colormap
++static unsigned char quitscreenfix[] = {
++	191,191,191,47,28,39,4,4,39,1,47,28,47,28,29,1,
++	28,28,47,31,31,1,29,31,1,28,47,47,47,47,29,28,
++	47,31,30,28,40,40,4,28,28,40,39,40,29,102,102,245,
++	28,39,4,4,39,103,40,40,1,1,102,94,47,47,1,94,
++	94,94,94,47,102,245,103,103,103,47,1,102,1,102,29,29,
++	29,29,47,28,245,31,31,31,47,1,28,1,28,47,1,102, 102,102,
++	191,191,142,47,4,8,8,8,8,4,47,28,1,28,29,28,
++	29,29,31,1,47,245,47,47,28,28,31,47,28,1,31,1,
++	1,245,47,39,8,8,8,40,39,8,8,8,39,1,1,47,
++	4,8,8,8,8,4,47,29,28,31,28,28,29,28,28,28,
++	29,28,31,28,47,29,1,28,31,47,1,28,1,1,29,29,
++	29,47,28,1,28,28,245,28,28,28,28,47,29,28,47,102,102,103,
++	191,191,142,31,29,36,8,8,36,31,40,39,40,4,1,1,
++	39,40,39,40,40,31,28,40,40,4,39,40,28,47,31,40,
++	39,40,4,1,36,8,8,4,47,36,8,8,39,1,1,1,
++	29,36,8,8,36,4,4,39,40,4,47,1,47,40,40,39,
++	39,40,28,40,40,47,45,39,40,28,4,39,40,4,39,1,
++	28,4,40,28,28,4,39,28,47,40,40,39,40,39,28,28,1,103,
++	1,142,29,142,28,39,8,8,36,36,8,8,8,8,36,1,
++	8,8,8,8,8,36,39,8,8,8,8,8,36,40,36,8,
++	8,8,8,36,40,8,8,40,1,4,8,8,40,1,1,31,
++	28,39,8,8,36,8,8,8,8,8,36,31,36,8,8,8,
++	8,8,36,8,8,4,40,8,8,36,8,8,8,8,8,36,
++	40,8,8,40,39,8,8,40,36,8,8,8,8,8,39,29,28,29,
++	103,191,142,47,28,40,8,8,40,8,8,33,33,8,8,36,
++	8,8,36,36,8,8,36,8,8,36,36,8,8,36,8,8,
++	33,33,8,8,36,8,8,4,47,40,8,8,39,47,28,245,
++	28,40,8,8,40,40,36,36,33,8,8,36,8,8,36,36,
++	8,8,36,8,8,40,40,8,8,40,4,36,36,33,8,8,
++	36,8,8,39,39,8,8,36,8,8,33,36,36,39,28,1,47,28,
++	103,246,1,47,1,39,8,8,40,8,8,8,8,8,8,36,
++	8,8,4,40,8,8,36,8,8,40,4,8,8,36,8,8,
++	8,8,8,8,36,8,8,40,29,39,8,8,39,1,1,47,
++	1,39,8,8,40,36,8,8,8,8,8,36,8,8,4,40,
++	8,8,36,8,8,40,39,8,8,40,36,8,8,8,8,8,
++	36,8,8,39,40,8,8,40,36,8,8,8,8,36,28,1,1,29,
++	103,47,40,40,4,36,8,8,36,8,8,33,36,36,36,4,
++	8,8,39,4,8,8,36,8,8,4,40,8,8,36,8,8,
++	33,36,36,36,36,8,8,40,31,40,8,8,40,47,40,40,
++	4,36,8,8,36,8,8,33,33,8,8,36,8,8,36,36,
++	8,8,36,8,8,36,36,8,8,36,8,8,33,33,8,8,
++	36,8,8,36,36,8,8,4,39,36,36,33,8,8,4,40,4,31,
++	191,40,8,8,8,8,8,36,29,36,8,8,8,8,8,40,
++	8,8,40,4,8,8,36,8,8,40,39,8,8,39,36,8,
++	8,8,8,8,39,8,8,39,45,4,8,8,40,40,8,8,
++	8,8,8,36,29,36,8,8,8,8,8,40,36,8,8,8,
++	8,8,40,36,8,8,8,8,8,40,36,8,8,8,8,8,
++	40,36,8,8,8,8,8,36,8,8,8,8,8,36,4,8,8,4,
++	47,45,40,39,40,39,39,245,246,1,40,40,40,39,4,47,
++	40,4,28,29,39,40,30,39,39,1,28,40,4,28,1,40,
++	40,40,39,4,29,40,39,1,1,1,4,4,47,45,40,39,
++	40,39,39,245,246,29,39,40,40,40,4,47,28,39,39,36,
++	8,8,4,1,39,40,4,40,40,1,29,4,39,4,40,39,
++	1,39,36,36,33,8,8,4,39,4,39,4,40,47,36,8,8,40,
++	1,28,47,28,28,29,1,28,47,28,31,28,28,27,47,28,
++	45,246,30,28,245,29,47,47,29,30,28,47,27,1,246,47,
++	47,47,1,28,47,28,47,1,47,47,1,29,29,47,47,28,
++	28,29,1,47,1,47,47,28,31,47,47,31,47,47,47,4,
++	8,8,39,245,1,47,28,245,28,47,31,28,47,28,28,28,
++	40,8,8,8,8,8,36,47,28,1,246,47,1,40,8,8,36,1,
++	47,1,102,1,102,102,47,94,94,102,47,47,102,102,102,102,
++	94,1,94,47,102,1,102,47,30,30,102,27,47,102,94,1,
++	102,47,1,94,102,103,1,102,103,103,47,47,47,29,1,29,
++	28,28,29,28,1,47,28,31,29,1,47,29,28,1,1,47,
++	4,39,1,47,47,1,28,28,28,47,1,28,45,28,47,47,
++	1,40,4,4,40,4,29,28,31,45,47,28,47,47,4,40,28,28
++};
++
++static void
++fixQuitScreen(byte* px)
++{
++	// overwrite 11 lines, 98 pixels each, from quitscreenfix[]
++	// starting at line 140, column 188
++	// quitscreen is 320x240 px
++	int r, qsIdx = 0;
++
++	px += 140*320; // go to line 140
++	px += 188; // to colum 188
++	for(r=0; r<11; ++r)
++	{
++		memcpy(px, quitscreenfix+qsIdx, 98);
++		qsIdx += 98;
++		px += 320;
++	}
++}
++
+ void
+ LoadPCX(char *origname, byte **pic, byte **palette, int *width, int *height)
+ {
+@@ -134,6 +224,14 @@ LoadPCX(char *origname, byte **pic, byte **palette, int *width, int *height)
+ 		free(*pic);
+ 		*pic = NULL;
+ 	}
++	else if(pcx->xmax == 319 && pcx->ymax == 239
++			&& Q_strcasecmp(origname, "pics/quit.pcx") == 0
++			&& Com_BlockChecksum(pcx, len) == 3329419434u)
++	{
++		// it's the quit screen, and the baseq2 one (identified by checksum)
++		// so fix it
++		fixQuitScreen(*pic);
++	}
+ 
+ 	ri.FS_FreeFile(pcx);
+ }
diff --git a/debian/patches/7.01/GL3-Update-HandMadeMath.h-to-include-my-non-SSE-patch.patch b/debian/patches/7.01/GL3-Update-HandMadeMath.h-to-include-my-non-SSE-patch.patch
new file mode 100644
index 0000000..8f0c0f1
--- /dev/null
+++ b/debian/patches/7.01/GL3-Update-HandMadeMath.h-to-include-my-non-SSE-patch.patch
@@ -0,0 +1,109 @@
+From: Daniel Gibson <metalcaedes at gmail.com>
+Date: Fri, 9 Jun 2017 12:30:44 +0200
+Subject: GL3: Update HandMadeMath.h to include my non-SSE patch
+
+from https://github.com/StrangeZak/Handmade-Math/pull/60
+
+Hopefully fixes #204 (broken build on ARM)
+---
+ src/client/refresh/gl3/gl3_main.c            |  3 ---
+ src/client/refresh/gl3/header/HandmadeMath.h | 38 ++++++++++++++++++++++------
+ 2 files changed, 30 insertions(+), 11 deletions(-)
+
+diff --git a/src/client/refresh/gl3/gl3_main.c b/src/client/refresh/gl3/gl3_main.c
+index 8052243..323d297 100644
+--- a/src/client/refresh/gl3/gl3_main.c
++++ b/src/client/refresh/gl3/gl3_main.c
+@@ -29,9 +29,6 @@
+ #include "../../header/ref.h"
+ #include "header/local.h"
+ 
+-#ifndef __SSE__
+-#define HANDMADE_MATH_NO_SSE
+-#endif
+ #define HANDMADE_MATH_IMPLEMENTATION
+ #include "header/HandmadeMath.h"
+ 
+diff --git a/src/client/refresh/gl3/header/HandmadeMath.h b/src/client/refresh/gl3/header/HandmadeMath.h
+index 9bdc6fe..010dc82 100644
+--- a/src/client/refresh/gl3/header/HandmadeMath.h
++++ b/src/client/refresh/gl3/header/HandmadeMath.h
+@@ -173,6 +173,8 @@
+           (*) Resolved compiler warnings on gcc and g++
+      1.1.2
+           (*) Fixed invalid HMMDEF's in the function definitions
++     1.1.3
++          (*) Fixed compile error in C mode
+           
+   LICENSE
+   
+@@ -198,7 +200,27 @@
+    Insofaras (@insofaras)
+ */
+ 
+-#ifndef HANDMADE_NO_SSE
++
++// let's figure out if SSE is really available (unless disabled anyway)
++// (it isn't on non-x86/x86_64 platforms or even x86 without explicit SSE support)
++// => only use "#ifdef HANDMADE_MATH__USE_SSE" to check for SSE support below this block!
++#ifndef HANDMADE_MATH_NO_SSE
++
++# ifdef _MSC_VER
++   // MSVC supports SSE in amd64 mode or _M_IX86_FP >= 1 (2 means SSE2)
++#  if defined(_M_AMD64) || ( defined(_M_IX86_FP) && _M_IX86_FP >= 1 )
++#   define HANDMADE_MATH__USE_SSE 1
++#  endif
++# else // not MSVC, probably GCC, clang, icc or something that doesn't support SSE anyway
++#  ifdef __SSE__ // they #define __SSE__ if it's supported
++#   define HANDMADE_MATH__USE_SSE 1
++#  endif //  __SSE__
++# endif // not _MSC_VER
++
++#endif // #ifndef HANDMADE_MATH_NO_SSE
++
++
++#ifdef HANDMADE_MATH__USE_SSE
+ #include <xmmintrin.h>
+ #endif
+ 
+@@ -755,12 +777,12 @@ HMM_SquareRootF(float Value)
+ {
+     float Result = 0.0f;
+ 
+-#ifdef HANDMADE_MATH_NO_SSE
+-    Result = sqrtf(Value);
+-#else        
++#ifdef HANDMADE_MATH__USE_SSE
+     __m128 In = _mm_set_ss(Value);
+     __m128 Out = _mm_sqrt_ss(In);
+     Result = _mm_cvtss_f32(Out);
++#else
++    Result = sqrtf(Value);
+ #endif 
+ 
+     return(Result);
+@@ -771,12 +793,12 @@ HMM_RSquareRootF(float Value)
+ {
+     float Result = 0.0f;
+ 
+-#ifdef HANDMADE_MATH_NO_SSE
+-    Result = 1.0f/HMM_SquareRootF(Value);
+-#else        
++#ifdef HANDMADE_MATH__USE_SSE
+     __m128 In = _mm_set_ss(Value);
+     __m128 Out = _mm_rsqrt_ss(In);
+     Result = _mm_cvtss_f32(Out);
++#else
++    Result = 1.0f/HMM_SquareRootF(Value);
+ #endif
+ 
+     return(Result);
+@@ -1692,7 +1714,7 @@ HMM_NLerp(hmm_quaternion Left, float Time, hmm_quaternion Right)
+     Result.Z = HMM_Lerp(Left.Z, Time, Right.Z);
+     Result.W = HMM_Lerp(Left.W, Time, Right.W);
+ 
+-    HMM_NormalizeQuaternion(Result);
++    Result = HMM_NormalizeQuaternion(Result);
+ 
+     return(Result);
+ }
diff --git a/debian/patches/Append-to-C-LD-FLAGS-instead-of-overriding-them-to-o.patch b/debian/patches/Append-to-C-LD-FLAGS-instead-of-overriding-them-to-o.patch
index 7d26252..567a468 100644
--- a/debian/patches/Append-to-C-LD-FLAGS-instead-of-overriding-them-to-o.patch
+++ b/debian/patches/Append-to-C-LD-FLAGS-instead-of-overriding-them-to-o.patch
@@ -12,7 +12,7 @@ but yquake2 doesn't.
  1 file changed, 8 insertions(+), 7 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index ee4940d..396822d 100755
+index 5ab757e..76a2d1a 100755
 --- a/Makefile
 +++ b/Makefile
 @@ -155,12 +155,13 @@ endif
diff --git a/debian/patches/Only-use-usr-local-opt-openal-soft-on-Darwin.patch b/debian/patches/Only-use-usr-local-opt-openal-soft-on-Darwin.patch
index 084a152..74a1215 100644
--- a/debian/patches/Only-use-usr-local-opt-openal-soft-on-Darwin.patch
+++ b/debian/patches/Only-use-usr-local-opt-openal-soft-on-Darwin.patch
@@ -12,7 +12,7 @@ Signed-off-by: Simon McVittie <smcv at debian.org>
  1 file changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 6d654bb..ee4940d 100755
+index 5ef906b..5ab757e 100755
 --- a/Makefile
 +++ b/Makefile
 @@ -430,8 +430,12 @@ else
diff --git a/debian/patches/Remove-unwanted-rpaths-from-LDFLAGS.patch b/debian/patches/Remove-unwanted-rpaths-from-LDFLAGS.patch
index 640fc18..7c48427 100644
--- a/debian/patches/Remove-unwanted-rpaths-from-LDFLAGS.patch
+++ b/debian/patches/Remove-unwanted-rpaths-from-LDFLAGS.patch
@@ -8,7 +8,7 @@ Forwarded: no, Debian-specific
  1 file changed, 21 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 396822d..50f62e5 100755
+index 76a2d1a..0d211d9 100755
 --- a/Makefile
 +++ b/Makefile
 @@ -457,27 +457,6 @@ ifneq ($(YQ2_OSTYPE), Darwin)
diff --git a/debian/patches/series b/debian/patches/series
index e56bd4c..7dcd8cb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
+7.01/GL3-Update-HandMadeMath.h-to-include-my-non-SSE-patch.patch
+7.01/Fix-Jennell-Jaquays-name-in-credits-and-quit-screen.patch
 Only-use-usr-local-opt-openal-soft-on-Darwin.patch
 Append-to-C-LD-FLAGS-instead-of-overriding-them-to-o.patch
 Remove-unwanted-rpaths-from-LDFLAGS.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/yquake2.git



More information about the Pkg-games-commits mailing list