pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

doomlegacy-devel: Update to SVN revision 1518 (1.48 RC2)



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Mon Apr 27 16:58:23 2020 +0200
Changeset:	32451ab9b4370c401591bed9fab2c2e87f4008f7

Modified Files:
	doomlegacy-devel/Makefile
	doomlegacy-devel/TODO
	doomlegacy-devel/distinfo
Added Files:
	doomlegacy-devel/patches/patch-src_sdl_endtxt.c

Log Message:
doomlegacy-devel: Update to SVN revision 1518 (1.48 RC2)

Add patch for interpretation of ENDOOM lump.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=32451ab9b4370c401591bed9fab2c2e87f4008f7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 doomlegacy-devel/Makefile                       |  2 +-
 doomlegacy-devel/TODO                           | 21 ++++--
 doomlegacy-devel/distinfo                       |  1 +
 doomlegacy-devel/patches/patch-src_sdl_endtxt.c | 94 +++++++++++++++++++++++++
 4 files changed, 110 insertions(+), 8 deletions(-)

diffs:
diff --git a/doomlegacy-devel/Makefile b/doomlegacy-devel/Makefile
index a46f183bfe..09a5e0942d 100644
--- a/doomlegacy-devel/Makefile
+++ b/doomlegacy-devel/Makefile
@@ -2,7 +2,7 @@
 
 VERS=		1.47.2
 #PKGNAME=	doomlegacy-${VERS}
-SVNVERS=	1517
+SVNVERS=	1518
 DISTNAME=	doomlegacy-devel-0r${SVNVERS}
 CATEGORIES=	games
 
diff --git a/doomlegacy-devel/TODO b/doomlegacy-devel/TODO
index 83fec98628..2a95670bd1 100644
--- a/doomlegacy-devel/TODO
+++ b/doomlegacy-devel/TODO
@@ -98,13 +98,6 @@ On some maps the rendering is broken (only in parts of the map).
 Part 5 finished.
 
 
-Part 6: Import final release
-============================
-
-[ ] Import version 1.48.1
-    Not released yet
-
-
 Part 7: Support for extended nodes
 ==================================
 [X] Add patch to support DeeP and ZDoom extended nodes
@@ -112,4 +105,18 @@ Part 7: Support for extended nodes
 [X] Created upstream feature request #95
 
 
+Part 8: Fix output of ENDOOM lump to terminal
+=============================================
+[X] Add patch to fix endianess
+[X] Add patch to fix interpretation of blinking flag
+[X] Add patch to convert text from IBM437 codepage to Unicode
+
+
+Part 6: Import final release
+============================
+
+[ ] Import version 1.48.2
+    Not released yet
+
+
 EOF
diff --git a/doomlegacy-devel/distinfo b/doomlegacy-devel/distinfo
index b8b3ee8f79..5c47002aa4 100644
--- a/doomlegacy-devel/distinfo
+++ b/doomlegacy-devel/distinfo
@@ -9,3 +9,4 @@ SHA1 (patch-src_am__map.c) = 8d7d17d29c0934c92ca933e8976a5ecc692e465d
 SHA1 (patch-src_doomdata.h) = 662d580457440fff338c683a76581b6d8973f8e5
 SHA1 (patch-src_p__setup.c) = 9bdd3c882871cf3d49e2f8ef99d92715d1afe64b
 SHA1 (patch-src_r__defs.h) = bd3846096127cfd7f99f541e0e94b79b5ca8229a
+SHA1 (patch-src_sdl_endtxt.c) = c48c58b002f893940b5716fd491b0a499610f913
diff --git a/doomlegacy-devel/patches/patch-src_sdl_endtxt.c b/doomlegacy-devel/patches/patch-src_sdl_endtxt.c
new file mode 100644
index 0000000000..209d8d3634
--- /dev/null
+++ b/doomlegacy-devel/patches/patch-src_sdl_endtxt.c
@@ -0,0 +1,94 @@
+$NetBSD$
+
+Fix endianess for interpretation of ENDOOM lump.
+
+The MSB of the attributes is not part of the bg color field, interpret
+as blinking flag according to unofficial Doom specs (section 8-3):
+<http://www.gamers.org/dhs/helpdocs/dmsp1666.html>
+
+Convert text encoding from IBM437 codepage to Unicode.
+
+--- src/sdl/endtxt.c.orig	2020-04-27 14:36:13.000000000 +0000
++++ src/sdl/endtxt.c
+@@ -28,6 +28,20 @@
+ #include "w_wad.h"
+ #include "z_zone.h"
+ #include "m_argv.h"
++#include "m_swap.h"
++
++// [MB] 2020-04-26: Added UTF-8 sequences for upper half of codepage IBM437
++static const char *cp437[128] =
++{
++    "\xC3\x87", "\xC3\xBC", "\xC3\xA9", "\xC3\xA2", "\xC3\xA4", "\xC3\xA0", "\xC3\xA5", "\xC3\xA7", "\xC3\xAA", "\xC3\xAB", "\xC3\xA8", "\xC3\xAF", "\xC3\xAE", "\xC3\xAC", "\xC3\x84", "\xC3\x85",
++    "\xC3\x89", "\xC3\xA6", "\xC3\x86", "\xC3\xB4", "\xC3\xB6", "\xC3\xB2", "\xC3\xBB", "\xC3\xB9", "\xC3\xBF", "\xC3\x96", "\xC3\x9C", "\xC2\xA2", "\xC2\xA3", "\xC2\xA5", "\xE2\x82\xA7", "\xC6\x92",
++    "\xC3\xA1", "\xC3\xAD", "\xC3\xB3", "\xC3\xBA", "\xC3\xB1", "\xC3\x91", "\xC2\xAA", "\xC2\xBA", "\xC2\xBF", "\xE2\x8C\x90", "\xC2\xAC", "\xC2\xBD", "\xC2\xBC", "\xC2\xA1", "\xC2\xAB", "\xC2\xBB",
++    "\xE2\x96\x91", "\xE2\x96\x92", "\xE2\x96\x93", "\xE2\x94\x82", "\xE2\x94\xA4", "\xE2\x95\xA1", "\xE2\x95\xA2", "\xE2\x95\x96", "\xE2\x95\x95", "\xE2\x95\xA3", "\xE2\x95\x91", "\xE2\x95\x97", "\xE2\x95\x9D", "\xE2\x95\x9C", "\xE2\x95\x9B", "\xE2\x94\x90",
++    "\xE2\x94\x94", "\xE2\x94\xB4", "\xE2\x94\xAC", "\xE2\x94\x9C", "\xE2\x94\x80", "\xE2\x94\xBC", "\xE2\x95\x9E", "\xE2\x95\x9F", "\xE2\x95\x9A", "\xE2\x95\x94", "\xE2\x95\xA9", "\xE2\x95\xA6", "\xE2\x95\xA0", "\xE2\x95\x90", "\xE2\x95\xAC", "\xE2\x95\xA7",
++    "\xE2\x95\xA8", "\xE2\x95\xA4", "\xE2\x95\xA5", "\xE2\x95\x99", "\xE2\x95\x98", "\xE2\x95\x92", "\xE2\x95\x93", "\xE2\x95\xAB", "\xE2\x95\xAA", "\xE2\x94\x98", "\xE2\x94\x8C", "\xE2\x96\x88", "\xE2\x96\x84", "\xE2\x96\x8C", "\xE2\x96\x90", "\xE2\x96\x80",
++    "\xCE\xB1", "\xC3\x9F", "\xCE\x93", "\xCF\x80", "\xCE\xA3", "\xCF\x83", "\xC2\xB5", "\xCF\x84", "\xCE\xA6", "\xCE\x98", "\xCE\xA9", "\xCE\xB4", "\xE2\x88\x9E", "\xCF\x86", "\xCE\xB5", "\xE2\x88\xA9",
++    "\xE2\x89\xA1", "\xC2\xB1", "\xE2\x89\xA5", "\xE2\x89\xA4", "\xE2\x8C\xA0", "\xE2\x8C\xA1", "\xC3\xB7", "\xE2\x89\x88", "\xC2\xB0", "\xE2\x88\x99", "\xC2\xB7", "\xE2\x88\x9A", "\xE2\x81\xBF", "\xC2\xB2", "\xE2\x96\xA0", "\xC2\xA0"
++};
+ 
+ // [WDJ] Changed to public interface name.
+ // Original name was ShowEndText.
+@@ -59,9 +73,12 @@ void I_Show_EndText( uint16_t * text )
+ 
+ 	/* print 80x25 text and deal with the attributes too */
+ 	for (i=1; i<=80*25; i++) {
++		// [MB] 2020-04-26: Reset blinking
++		printf("\033[25m");
+ 		/* attribute first */
+ 		/* attribute changed? */
+-		if ((j = *text >> 8) != att) {
++		// [MB] 2020-04-26: Fixed endianess
++		if ((j = ((uint16_t)LE_SWAP16(*text)) >> 8) != att) {
+ 			/* save current attribute */
+ 			att = j;
+ 			/* set new attribute, forground color first */
+@@ -117,9 +134,16 @@ void I_Show_EndText( uint16_t * text )
+ 				break;
+ 			}
+ 			printf("m");
++			// [MB] 2020-04-26: Add support for blinking
++			printf("\033[");
++			if((j >> 4) & 0x08)
++				printf("5m");
++			else
++				printf("25m");
+ 			/* now background color */
+ 			printf("\033[");
+-			switch((j >> 4) & 0x0f) {
++			// [MB] 2020-04-26: Mask for bg color bits fixed
++			switch((j >> 4) & 0x07) {
+ 			case 0:		/* black */
+ 				printf("40");
+ 				break;
+@@ -144,6 +168,7 @@ void I_Show_EndText( uint16_t * text )
+ 			case 7:		/* bright grey */
+ 				printf("47");
+ 				break;
++#if 0  // [MB] 2020-04-26: Not available for bg color (MSB is the blink flag)
+ 			case 8:		/* dark grey */
+ 				printf("1;40");
+ 				break;
+@@ -168,12 +193,19 @@ void I_Show_EndText( uint16_t * text )
+ 			case 15:	/* white */
+ 				printf("1;47");
+ 				break;
++#endif
+ 			}
+ 			printf("m");
+ 		}
+ 
+ 		/* now the text */
+-		putchar(*text++ & 0xff);
++		// [MB] 2020-04-26: Fixed endianess
++		j = (uint16_t)LE_SWAP16(*text++) & 0xff;
++		// [MB] 2020-04-26: Convert data to Unicode before printing
++		if (128 > j)
++			putchar(j);
++		else
++			printf(cp437[j - 128]);
+ 
+ 		/* do we need a nl? */
+ 		if (nlflag) {


Home | Main Index | Thread Index | Old Index