ref: 04774b9853c78ab5eade40ae82ecf37cea1e31fd
parent: 75cce63effe86ed759d7dbbb5755a0117aba2f16
author: Andrew Apted <ajapted@gmail.com>
date: Wed Dec 20 11:19:29 EST 2023
updated the DumpNode() code for `side` removal and more precision.
--- a/nano_bsp.c
+++ b/nano_bsp.c
@@ -109,7 +109,8 @@
{char spaces[256];
- if (lev > 100) lev = 100;
+ if (lev > 100)
+ lev = 100;
int i;
for (i = 0 ; i < lev*2 ; i++)
@@ -121,9 +122,9 @@
if (N->segs == NULL)
{- printf ("%spartition (%d %d) --> (%d %d)\n", spaces,- N->x >> 16, N->y >> 16,
- (N->x + N->dx) >> 16, (N->y + N->dy) >> 16);
+ printf ("%spartition (%1.5f %1.5f) --> (%1.5f %1.5f)\n", spaces,+ N->x / 65536.0, N->y / 65536.0,
+ (N->x + N->dx) / 65536.0, (N->y + N->dy) / 65536.0);
printf ("%sright\n", spaces); printf ("%s{\n", spaces);@@ -142,10 +143,10 @@
seg_t * S;
for (S = N->segs ; S != NULL ; S = S->next)
{- printf ("%s line #%d, side %d : (%d %d) --> (%d %d)\n", spaces,- (int) (S->linedef - lines), S->side,
- S->v1->x >> 16, S->v1->y >> 16,
- S->v2->x >> 16, S->v2->y >> 16);
+ printf ("%s line #%d : (%1.5f %1.5f) --> (%1.5f %1.5f)\n", spaces,+ (int) (S->linedef - lines),
+ S->v1->x / 65536.0, S->v1->y / 65536.0,
+ S->v2->x / 65536.0, S->v2->y / 65536.0);
}
}
}
--
⑨