From 1d14991acce0500eb48cfedf9705771a9bcde3c2 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 26 Jul 2019 21:54:45 +0000 Subject: [PATCH] Add MERGE_NODES macro for Polymost... this will be used in the following commit git-svn-id: https://svn.eduke32.com/eduke32@7845 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index b6cb263d5..e378ae076 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -2600,6 +2600,15 @@ static inline void yax_vsp_finalize_init(int32_t const yaxbunch, int32_t const v #define COMBINE_STRIPS #ifdef COMBINE_STRIPS + +#define MERGE_NODES(i, ni) \ + do \ + { \ + vsp[i].cy[1] = vsp[ni].cy[1]; \ + vsp[i].fy[1] = vsp[ni].fy[1]; \ + vsdel(ni); \ + } while (0); + static inline void vsdel(int32_t const i) { //Delete i @@ -3147,10 +3156,7 @@ skip: ; if (ni >= viewportNodeCount && (vsp[i].ctag == vsp[ni].ctag) && (vsp[i].ftag == vsp[ni].ftag)) { - vsp[i].cy[1] = vsp[ni].cy[1]; - vsp[i].fy[1] = vsp[ni].fy[1]; - vsdel(ni); - + MERGE_NODES(i, ni); #if 0 //POGO: This GL1 debug code draws the resulting merged VSP segment with floor and ceiling bounds lines as yellow and cyan respectively // To enable this, ensure that in polymost_drawrooms() that you are clearing the stencil buffer and color buffer.