From d975a017091dc5b5b7f179d32a3966fba0fa36fd Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 23 Sep 2006 02:32:22 +0000 Subject: [PATCH] ZDBSP fix: ShoveSegBehind needs to check for a positive result from Heuristic, not non-zero. SVN r335 (trunk) --- nodebuild.cpp | 10 +++++++--- resource.rc | 10 +++++----- zdbsp.h | 2 +- zdbsp.vcproj | 3 +++ zipsrc.bat | 4 ++-- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/nodebuild.cpp b/nodebuild.cpp index c006c5e..76ee490 100644 --- a/nodebuild.cpp +++ b/nodebuild.cpp @@ -196,6 +196,10 @@ void FNodeBuilder::CreateSubsectorsForReal () // Convert seg pointers into indices D(printf ("Output subsector %d:\n", Subsectors.Size())); + if (SegList[sub.firstline].SegPtr->linedef == -1) + { + printf (" Failure: Subsector %d is all minisegs!\n", Subsectors.Size()); + } for (unsigned int i = sub.firstline; i < SegList.Size(); ++i) { D(printf (" Seg %5d%c(%5d,%5d)-(%5d,%5d)\n", SegList[i].SegPtr - &Segs[0], @@ -403,7 +407,7 @@ bool FNodeBuilder::ShoveSegBehind (DWORD set, node_t &node, DWORD seg, DWORD mat node.dx = -node.dx; node.dy = -node.dy; } - return Heuristic (node, set, false) != 0; + return Heuristic (node, set, false) > 0; } // Splitters are chosen to coincide with segs in the given set. To reduce the @@ -1009,7 +1013,7 @@ void FNodeBuilder::PrintSet (int l, DWORD set) Printf ("set %d:\n", l); for (; set != DWORD_MAX; set = Segs[set].next) { - Printf ("\t%u(%d)%c%d(%d,%d)-%d(%d,%d)\n", set, + Printf ("\t%5u(%d)%c%d(%d,%d)-%d(%d,%d)\n", set, Segs[set].frontsector, Segs[set].linedef == -1 ? '+' : ':', Segs[set].v1, @@ -1020,7 +1024,7 @@ void FNodeBuilder::PrintSet (int l, DWORD set) Printf ("*\n"); } -#if defined(_WIN32) && !defined(__SSE2__) && !defined(DISABLE_SSE) && !defined(DISABLE_BACKPATCH) && !defined(_M_X64) && defined(__GNUC__) +#if defined(_WIN32) && !defined(__SSE2__) && !defined(DISABLE_SSE) && !defined(DISABLE_BACKPATCH) && defined(__i386__) && defined(__GNUC__) #define WIN32_LEAN_AND_MEAN #include diff --git a/resource.rc b/resource.rc index 5d2589e..272db2f 100644 --- a/resource.rc +++ b/resource.rc @@ -93,8 +93,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,8,0,0 - PRODUCTVERSION 1,8,0,0 + FILEVERSION 1,10,0,0 + PRODUCTVERSION 1,10,0,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -110,12 +110,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "ZDBSP Node Builder" - VALUE "FileVersion", "1.8" + VALUE "FileVersion", "1.10" VALUE "InternalName", "zdbsp" - VALUE "LegalCopyright", "Copyright (C) 2002-2006" + VALUE "LegalCopyright", "Copyright (C) 2002-2006 Randy Heit" VALUE "OriginalFilename", "zdbsp.exe" VALUE "ProductName", "ZDBSP" - VALUE "ProductVersion", "1.8" + VALUE "ProductVersion", "1.10" END END BLOCK "VarFileInfo" diff --git a/zdbsp.h b/zdbsp.h index e2e541f..5d53a47 100644 --- a/zdbsp.h +++ b/zdbsp.h @@ -16,7 +16,7 @@ typedef __int32 int32_t; #include #endif -#define ZDBSP_VERSION "1.9" +#define ZDBSP_VERSION "1.10" enum EBlockmapMode { diff --git a/zdbsp.vcproj b/zdbsp.vcproj index 229ea89..9167a6a 100644 --- a/zdbsp.vcproj +++ b/zdbsp.vcproj @@ -475,6 +475,9 @@ RelativePath=".\zlib\zutil.c"> + + diff --git a/zipsrc.bat b/zipsrc.bat index 8ea2416..e2aee5d 100644 --- a/zipsrc.bat +++ b/zipsrc.bat @@ -1,4 +1,4 @@ -zip -9 %1 COPYING *.cpp *.h *.c *.rc *.ds? *.sln *.vcproj unused/* zlib/* -kzip b%1 COPYING *.cpp *.h *.c *.rc *.ds? *.sln *.vcproj unused/* zlib/* +zip -9 %1 COPYING Makefile *.cpp *.h *.c *.rc *.ds? *.sln *.vcproj unused/* zlib/*.c zlib/*.h +kzip b%1 COPYING Makefile *.cpp *.h *.c *.rc *.ds? *.sln *.vcproj unused/* zlib/*.c zlib/*.h zipmix %1 b%1 del b%1 \ No newline at end of file