pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
doomlegacy-devel: Add patch from Eternity Engine
Module Name: pkgsrc-wip
Committed By: Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By: micha
Date: Wed Nov 18 13:52:55 2020 +0100
Changeset: 63e67034616520651336e6f2cccebceb44d22df1
Modified Files:
doomlegacy-devel/Makefile
doomlegacy-devel/files/p_blockmap.c
Log Message:
doomlegacy-devel: Add patch from Eternity Engine
Fix for blockmap creation code.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=63e67034616520651336e6f2cccebceb44d22df1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
doomlegacy-devel/Makefile | 1 +
doomlegacy-devel/files/p_blockmap.c | 30 +++++++++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)
diffs:
diff --git a/doomlegacy-devel/Makefile b/doomlegacy-devel/Makefile
index 73ef903da7..d10272740b 100644
--- a/doomlegacy-devel/Makefile
+++ b/doomlegacy-devel/Makefile
@@ -70,6 +70,7 @@ SUBST_SED.makeopt+= -e 's,HAVE_LIBZIP,\# HAVE_LIBZIP,'
SUBST_SED.makeopt+= -e 's,HAVE_DLOPEN,\# HAVE_DLOPEN,'
# Enable debug build
SUBST_SED.makeopt+= -e 's,\# DEBUG=1,DEBUG=1,'
+
INSTALL_UNSTRIPPED= yes
# Configure defaults for LEGACYWADDIR and DOOMWADDIR
diff --git a/doomlegacy-devel/files/p_blockmap.c b/doomlegacy-devel/files/p_blockmap.c
index 1ac19bd388..8b5aa96de3 100644
--- a/doomlegacy-devel/files/p_blockmap.c
+++ b/doomlegacy-devel/files/p_blockmap.c
@@ -59,13 +59,18 @@ static void *I_Realloc(void *ptr, size_t size)
// [crispy] taken from mbfsrc/P_SETUP.C:547-707, slightly adapted
/*
- * [MB] 2020-05-12: Ported from Crispy Doom 5.8.0 (src/doom/p_blockmap.c)
- * - Change indentation to 4 SPs (matching DooM Legacy style)
- * - Replace blockmap with blockmapindex (int32_t* => uint32_t*)
- * Global pointer to header of the blockmap lump
- * - Replace blockmaplump with blockmaphead (int32_t* => uint32_t*)
- * Global pointer to beginning of the part containing the offsets
- * - Added typecasts for unsigned target types
+ * [MB] 2020-05-12: Ported from Crispy Doom 5.8.0 (src/doom/p_blockmap.c)
+ * - Change indentation to 4 SPs (matching DooM Legacy style)
+ * - Replace blockmap with blockmapindex (int32_t* => uint32_t*)
+ * Global pointer to header of the blockmap lump
+ * - Replace blockmaplump with blockmaphead (int32_t* => uint32_t*)
+ * Global pointer to beginning of the part containing the offsets
+ * - Added typecasts for unsigned target types
+ *
+ * [MB] 2020-11-18: Added patch from Altazimuth for Eternity Engine
+ * https://github.com/team-eternity/eternity/commit/d89fae15b55e92f3d88c32f401248ecf99624746
+ * - Bugfix for handling of first vertex
+ * - Demo version dependency removed
*/
void P_CreateBlockMap(void)
{
@@ -73,6 +78,17 @@ void P_CreateBlockMap(void)
fixed_t minx = INT_MAX, miny = INT_MAX;
fixed_t maxx = INT_MIN, maxy = INT_MIN;
+#if 1
+ // [MB] 2020-11-18: Added patch from Altazimuth for Eternity Engine
+ // This fixes MBF's code, which has a bug where maxx/maxy
+ // are wrong if the 0th node has the largest x or y
+ if (numvertexes)
+ {
+ minx = maxx = vertexes->x >> FRACBITS;
+ miny = maxy = vertexes->y >> FRACBITS;
+ }
+#endif
+
// First find limits of map
for (i=0 ; i<numvertexes ; i++)
{
Home |
Main Index |
Thread Index |
Old Index