diff --git a/doomsday/engine/portable/include/hedge.h b/doomsday/engine/portable/include/hedge.h index 91d7826e82..28dc1d0987 100644 --- a/doomsday/engine/portable/include/hedge.h +++ b/doomsday/engine/portable/include/hedge.h @@ -40,7 +40,7 @@ void HEdge_Delete(HEdge* hedge); boolean HEdge_PrepareWallDivs(HEdge* hedge, SideDefSection section, Sector* frontSector, Sector* backSector, - walldiv_t* leftWallDivs, walldiv_t* rightWallDivs, float matOffset[2]); + walldivs_t* leftWallDivs, walldivs_t* rightWallDivs, float matOffset[2]); /** * Get a property value, selected by DMU_* name. diff --git a/doomsday/engine/portable/include/r_data.h b/doomsday/engine/portable/include/r_data.h index 18afc6d2c1..28d9197db9 100644 --- a/doomsday/engine/portable/include/r_data.h +++ b/doomsday/engine/portable/include/r_data.h @@ -145,11 +145,17 @@ typedef struct glcommand_vertex_s { int index; } glcommand_vertex_t; -#define RL_MAX_DIVS 64 -typedef struct walldiv_s { - unsigned int num; - coord_t pos[RL_MAX_DIVS]; -} walldiv_t; +/// Maximum number of walldivnode_ts in a walldivs_t dataset. +#define WALLDIVS_MAX_NODES 64 + +typedef struct walldivnode_s { + coord_t height; +} walldivnode_t; + +typedef struct walldivs_s { + uint num; + walldivnode_t nodes[WALLDIVS_MAX_NODES]; +} walldivs_t; typedef struct rvertex_s { float pos[3]; @@ -298,14 +304,14 @@ void R_FreeRendColors(ColorRawf* rcolors); void R_FreeRendTexCoords(rtexcoord_t* rtexcoords); void R_InfoRendVerticesPool(void); -void R_DivVerts(rvertex_t* dst, const rvertex_t* src, const walldiv_t* leftDivs, - const walldiv_t* rightDivs); +void R_DivVerts(rvertex_t* dst, const rvertex_t* src, const walldivs_t* leftDivs, + const walldivs_t* rightDivs); -void R_DivVertColors(ColorRawf* dst, const ColorRawf* src, const walldiv_t* leftDivs, - const walldiv_t* rightDivs, float bL, float tL, float bR, float tR); +void R_DivVertColors(ColorRawf* dst, const ColorRawf* src, const walldivs_t* leftDivs, + const walldivs_t* rightDivs, float bL, float tL, float bR, float tR); -void R_DivTexCoords(rtexcoord_t* dst, const rtexcoord_t* src, const walldiv_t* leftDivs, - const walldiv_t* rightDivs, float bL, float tL, float bR, float tR); +void R_DivTexCoords(rtexcoord_t* dst, const rtexcoord_t* src, const walldivs_t* leftDivs, + const walldivs_t* rightDivs, float bL, float tL, float bR, float tR); void R_InitTranslationTables(void); void R_UpdateTranslationTables(void); diff --git a/doomsday/engine/portable/include/rend_dynlight.h b/doomsday/engine/portable/include/rend_dynlight.h index 29498a3f22..c0f5d24d87 100644 --- a/doomsday/engine/portable/include/rend_dynlight.h +++ b/doomsday/engine/portable/include/rend_dynlight.h @@ -32,8 +32,8 @@ typedef struct { uint numVertices, realNumVertices; const coord_t* texTL, *texBR; boolean isWall; - const walldiv_t* leftWallDivs; - const walldiv_t* rightWallDivs; + const walldivs_t* leftWallDivs; + const walldivs_t* rightWallDivs; } renderlightprojectionparams_t; /** diff --git a/doomsday/engine/portable/include/rend_fakeradio.h b/doomsday/engine/portable/include/rend_fakeradio.h index a888183600..aeb387e1a5 100644 --- a/doomsday/engine/portable/include/rend_fakeradio.h +++ b/doomsday/engine/portable/include/rend_fakeradio.h @@ -55,7 +55,7 @@ void Rend_RadioUpdateLinedef(LineDef* line, boolean backSide); * Render FakeRadio for the given hedge section. */ void Rend_RadioSegSection(const rvertex_t* rvertices, - const walldiv_t* leftWallDivs, const walldiv_t* rightWallDivs, + const walldivs_t* leftWallDivs, const walldivs_t* rightWallDivs, const rendsegradio_params_t* params); /** diff --git a/doomsday/engine/portable/include/rend_shadow.h b/doomsday/engine/portable/include/rend_shadow.h index 0db61f6428..a8d9bd2a9c 100644 --- a/doomsday/engine/portable/include/rend_shadow.h +++ b/doomsday/engine/portable/include/rend_shadow.h @@ -49,8 +49,8 @@ typedef struct { uint numVertices, realNumVertices; const coord_t* texTL, *texBR; boolean isWall; - const walldiv_t* leftWallDivs; - const walldiv_t* rightWallDivs; + const walldivs_t* leftWallDivs; + const walldivs_t* rightWallDivs; } rendershadowprojectionparams_t; /** diff --git a/doomsday/engine/portable/src/hedge.cpp b/doomsday/engine/portable/src/hedge.cpp index 471ab0c70b..34547161c7 100644 --- a/doomsday/engine/portable/src/hedge.cpp +++ b/doomsday/engine/portable/src/hedge.cpp @@ -27,25 +27,26 @@ static int C_DECL sortWallDivNode(const void* e1, const void* e2) { - const coord_t f1 = *(coord_t*)e1; - const coord_t f2 = *(coord_t*)e2; - if(f1 > f2) return 1; - if(f2 > f1) return -1; + const coord_t h1 = ((walldivnode_t*)e1)->height; + const coord_t h2 = ((walldivnode_t*)e2)->height; + if(h1 > h2) return 1; + if(h2 > h1) return -1; return 0; } -static coord_t* findWallDivNodeByZOrigin(walldiv_t* wallDivs, float height) +static walldivnode_t* findWallDivNodeByZOrigin(walldivs_t* wallDivs, float height) { Q_ASSERT(wallDivs); for(uint i = 0; i < wallDivs->num; ++i) { - if(wallDivs->pos[i] == height) - return &wallDivs->pos[i]; + walldivnode_t* node = &wallDivs->nodes[i]; + if(node->height == height) + return node; } return NULL; } -static void addWallDivNodesForPlaneIntercepts(HEdge* hedge, walldiv_t* wallDivs, +static void addWallDivNodesForPlaneIntercepts(HEdge* hedge, walldivs_t* wallDivs, SideDefSection section, coord_t bottomZ, coord_t topZ, boolean doRight) { const boolean isTwoSided = (hedge->lineDef && hedge->lineDef->L_frontside && hedge->lineDef->L_backside)? true:false; @@ -109,10 +110,10 @@ static void addWallDivNodesForPlaneIntercepts(HEdge* hedge, walldiv_t* wallDivs, { if(!findWallDivNodeByZOrigin(wallDivs, pln->visHeight)) { - wallDivs->pos[wallDivs->num++] = pln->visHeight; + wallDivs->nodes[wallDivs->num++].height = pln->visHeight; // Have we reached the div limit? - if(wallDivs->num == RL_MAX_DIVS) + if(wallDivs->num == WALLDIVS_MAX_NODES) stopScan = true; } } @@ -146,10 +147,10 @@ static void addWallDivNodesForPlaneIntercepts(HEdge* hedge, walldiv_t* wallDivs, { if(!findWallDivNodeByZOrigin(wallDivs, z)) { - wallDivs->pos[wallDivs->num++] = z; + wallDivs->nodes[wallDivs->num++].height = z; // Have we reached the div limit? - if(wallDivs->num == RL_MAX_DIVS) + if(wallDivs->num == WALLDIVS_MAX_NODES) stopScan = true; } } @@ -164,34 +165,34 @@ static void addWallDivNodesForPlaneIntercepts(HEdge* hedge, walldiv_t* wallDivs, } while(!stopScan); } -static void buildWallDiv(walldiv_t* wallDivs, HEdge* hedge, +static void buildWallDiv(walldivs_t* wallDivs, HEdge* hedge, SideDefSection section, coord_t bottomZ, coord_t topZ, boolean doRight) { wallDivs->num = 0; // Add the first node. - wallDivs->pos[wallDivs->num++] = bottomZ; + wallDivs->nodes[wallDivs->num++].height = bottomZ; // Add nodes for intercepts. addWallDivNodesForPlaneIntercepts(hedge, wallDivs, section, bottomZ, topZ, doRight); // Add the last node. - wallDivs->pos[wallDivs->num++] = topZ; + wallDivs->nodes[wallDivs->num++].height = topZ; if(!(wallDivs->num > 2)) return; // Sorting is required. This shouldn't take too long... // There seldom are more than two or three nodes. - qsort(wallDivs->pos, wallDivs->num, sizeof(*wallDivs->pos), sortWallDivNode); + qsort(wallDivs->nodes, wallDivs->num, sizeof(*wallDivs->nodes), sortWallDivNode); #ifdef RANGECHECK for(uint i = 1; i < wallDivs->num - 1; ++i) { - const coord_t pos = wallDivs->pos[i]; - if(pos > topZ || pos < bottomZ) + const walldivnode_t* node = &wallDivs->nodes[i]; + if(node->height > topZ || node->height < bottomZ) { Con_Error("WallDiv node #%i pos (%f) <> hi (%f), low (%f), num=%i\n", - i, pos, topZ, bottomZ, wallDivs->num); + i, node->height, topZ, bottomZ, wallDivs->num); } } #endif @@ -199,7 +200,7 @@ static void buildWallDiv(walldiv_t* wallDivs, HEdge* hedge, boolean HEdge_PrepareWallDivs(HEdge* hedge, SideDefSection section, Sector* frontSec, Sector* backSec, - walldiv_t* leftWallDivs, walldiv_t* rightWallDivs, float matOffset[2]) + walldivs_t* leftWallDivs, walldivs_t* rightWallDivs, float matOffset[2]) { Q_ASSERT(hedge); SideDef* frontSide = HEDGE_SIDEDEF(hedge); diff --git a/doomsday/engine/portable/src/r_data.c b/doomsday/engine/portable/src/r_data.c index a9d0833375..34bf3dc110 100644 --- a/doomsday/engine/portable/src/r_data.c +++ b/doomsday/engine/portable/src/r_data.c @@ -896,8 +896,8 @@ void Rtu_TranslateOffsetv(rtexmapunit_t* rtu, float const st[2]) Rtu_TranslateOffset(rtu, st[0], st[1]); } -void R_DivVerts(rvertex_t* dst, const rvertex_t* src, const walldiv_t* leftDivs, - const walldiv_t* rightDivs) +void R_DivVerts(rvertex_t* dst, const rvertex_t* src, const walldivs_t* leftDivs, + const walldivs_t* rightDivs) { #define COPYVERT(d, s) (d)->pos[VX] = (s)->pos[VX]; \ (d)->pos[VY] = (s)->pos[VY]; \ @@ -919,7 +919,7 @@ void R_DivVerts(rvertex_t* dst, const rvertex_t* src, const walldiv_t* leftDivs, { dst[numL + 2 + i].pos[VX] = src[2].pos[VX]; dst[numL + 2 + i].pos[VY] = src[2].pos[VY]; - dst[numL + 2 + i].pos[VZ] = rightDivs->pos[rightDivs->num-1 - 1 - i]; + dst[numL + 2 + i].pos[VZ] = rightDivs->nodes[rightDivs->num-1 - 1 - i].height; } // Left fan: @@ -931,14 +931,14 @@ void R_DivVerts(rvertex_t* dst, const rvertex_t* src, const walldiv_t* leftDivs, { dst[2 + i].pos[VX] = src[0].pos[VX]; dst[2 + i].pos[VY] = src[0].pos[VY]; - dst[2 + i].pos[VZ] = leftDivs->pos[1 + i]; + dst[2 + i].pos[VZ] = leftDivs->nodes[1 + i].height; } #undef COPYVERT } -void R_DivTexCoords(rtexcoord_t* dst, const rtexcoord_t* src, const walldiv_t* leftDivs, - const walldiv_t* rightDivs, float bL, float tL, float bR, float tR) +void R_DivTexCoords(rtexcoord_t* dst, const rtexcoord_t* src, const walldivs_t* leftDivs, + const walldivs_t* rightDivs, float bL, float tL, float bR, float tR) { #define COPYTEXCOORD(d, s) (d)->st[0] = (s)->st[0]; \ (d)->st[1] = (s)->st[1]; @@ -959,7 +959,7 @@ void R_DivTexCoords(rtexcoord_t* dst, const rtexcoord_t* src, const walldiv_t* l height = tR - bR; for(i = 0; i < rightDivs->num - 2; ++i) { - float inter = (rightDivs->pos[rightDivs->num-1 - 1 - i] - bR) / height; + float inter = (rightDivs->nodes[rightDivs->num-1 - 1 - i].height - bR) / height; dst[numL + 2 + i].st[0] = src[3].st[0]; dst[numL + 2 + i].st[1] = src[2].st[1] + @@ -974,7 +974,7 @@ void R_DivTexCoords(rtexcoord_t* dst, const rtexcoord_t* src, const walldiv_t* l height = tL - bL; for(i = 0; i < leftDivs->num - 2; ++i) { - float inter = (leftDivs->pos[1 + i] - bL) / height; + float inter = (leftDivs->nodes[1 + i].height - bL) / height; dst[2 + i].st[0] = src[0].st[0]; dst[2 + i].st[1] = src[0].st[1] + @@ -984,8 +984,8 @@ void R_DivTexCoords(rtexcoord_t* dst, const rtexcoord_t* src, const walldiv_t* l #undef COPYTEXCOORD } -void R_DivVertColors(ColorRawf* dst, const ColorRawf* src, const walldiv_t* leftDivs, - const walldiv_t* rightDivs, float bL, float tL, float bR, float tR) +void R_DivVertColors(ColorRawf* dst, const ColorRawf* src, const walldivs_t* leftDivs, + const walldivs_t* rightDivs, float bL, float tL, float bR, float tR) { #define COPYVCOLOR(d, s) (d)->rgba[CR] = (s)->rgba[CR]; \ (d)->rgba[CG] = (s)->rgba[CG]; \ @@ -1009,7 +1009,7 @@ void R_DivVertColors(ColorRawf* dst, const ColorRawf* src, const walldiv_t* left for(i = 0; i < rightDivs->num - 2; ++i) { uint c; - float inter = (rightDivs->pos[rightDivs->num-1 - 1 - i] - bR) / height; + float inter = (rightDivs->nodes[rightDivs->num-1 - 1 - i].height - bR) / height; for(c = 0; c < 4; ++c) { @@ -1027,7 +1027,7 @@ void R_DivVertColors(ColorRawf* dst, const ColorRawf* src, const walldiv_t* left for(i = 0; i < leftDivs->num - 2; ++i) { uint c; - float inter = (leftDivs->pos[1 + i] - bL) / height; + float inter = (leftDivs->nodes[1 + i].height - bL) / height; for(c = 0; c < 4; ++c) { diff --git a/doomsday/engine/portable/src/rend_fakeradio.c b/doomsday/engine/portable/src/rend_fakeradio.c index 7e49475104..869dc63eee 100644 --- a/doomsday/engine/portable/src/rend_fakeradio.c +++ b/doomsday/engine/portable/src/rend_fakeradio.c @@ -964,8 +964,8 @@ static void quadTexCoords(rtexcoord_t* tc, const rvertex_t* rverts, tc[0].st[1] = tc[3].st[1] + (rverts[3].pos[VZ] - rverts[2].pos[VZ]) / texHeight; } -static void renderShadowSeg(const rvertex_t* origVertices, const walldiv_t* leftWallDivs, - const walldiv_t* rightWallDivs, const rendershadowseg_params_t* p, +static void renderShadowSeg(const rvertex_t* origVertices, const walldivs_t* leftWallDivs, + const walldivs_t* rightWallDivs, const rendershadowseg_params_t* p, const float shadowRGB[3], float shadowDark) { float texOrigin[2][3]; @@ -1054,7 +1054,7 @@ static void renderShadowSeg(const rvertex_t* origVertices, const walldiv_t* left * Create the appropriate FakeRadio shadow polygons for the wall segment. */ static void rendRadioSegSection(const rvertex_t* rvertices, - const walldiv_t* leftWallDivs, const walldiv_t* rightWallDivs, + const walldivs_t* leftWallDivs, const walldivs_t* rightWallDivs, const rendsegradio_params_t* p) { const coord_t* fFloor, *fCeil, *bFloor, *bCeil; @@ -1146,8 +1146,8 @@ static void rendRadioSegSection(const rvertex_t* rvertices, } } -void Rend_RadioSegSection(const rvertex_t* rvertices, const walldiv_t* leftWallDivs, - const walldiv_t* rightWallDivs, const rendsegradio_params_t* params) +void Rend_RadioSegSection(const rvertex_t* rvertices, const walldivs_t* leftWallDivs, + const walldivs_t* rightWallDivs, const rendsegradio_params_t* params) { if(!rvertices || !params) return; // Disabled? diff --git a/doomsday/engine/portable/src/rend_main.c b/doomsday/engine/portable/src/rend_main.c index aa50fe4c55..84db03bcc8 100644 --- a/doomsday/engine/portable/src/rend_main.c +++ b/doomsday/engine/portable/src/rend_main.c @@ -754,7 +754,7 @@ typedef struct { } rendworldpoly_params_t; static boolean renderWorldPoly(rvertex_t* rvertices, uint numVertices, - const walldiv_t* leftWallDivs, const walldiv_t* rightWallDivs, + const walldivs_t* leftWallDivs, const walldivs_t* rightWallDivs, const rendworldpoly_params_t* p, const materialsnapshot_t* msA, float inter, const materialsnapshot_t* msB) { @@ -1238,7 +1238,7 @@ static boolean doRenderHEdge(HEdge* hedge, const float* lightColor, uint lightListIdx, uint shadowListIdx, - const walldiv_t* leftWallDivs, const walldiv_t* rightWallDivs, + const walldivs_t* leftWallDivs, const walldivs_t* rightWallDivs, boolean skyMask, boolean addFakeRadio, vec3d_t texTL, vec3d_t texBR, @@ -1297,19 +1297,19 @@ static boolean doRenderHEdge(HEdge* hedge, // Vertex coords. // Bottom Left. V2f_Copyd(rvertices[0].pos, hedge->HE_v1origin); - rvertices[0].pos[VZ] = (float)leftWallDivs->pos[0]; + rvertices[0].pos[VZ] = (float)leftWallDivs->nodes[0].height; // Top Left. V2f_Copyd(rvertices[1].pos, hedge->HE_v1origin); - rvertices[1].pos[VZ] = (float)leftWallDivs->pos[leftWallDivs->num-1]; + rvertices[1].pos[VZ] = (float)leftWallDivs->nodes[leftWallDivs->num-1].height; // Bottom Right. V2f_Copyd(rvertices[2].pos, hedge->HE_v2origin); - rvertices[2].pos[VZ] = (float)rightWallDivs->pos[0]; + rvertices[2].pos[VZ] = (float)rightWallDivs->nodes[0].height; // Top Right. V2f_Copyd(rvertices[3].pos, hedge->HE_v2origin); - rvertices[3].pos[VZ] = (float)rightWallDivs->pos[rightWallDivs->num-1]; + rvertices[3].pos[VZ] = (float)rightWallDivs->nodes[rightWallDivs->num-1].height; // Draw this hedge. if(renderWorldPoly(rvertices, 4, leftWallDivs, rightWallDivs, ¶ms, msA, inter, msB)) @@ -1343,19 +1343,19 @@ static boolean doRenderHEdge(HEdge* hedge, // Bottom Left. V2f_Copyd(rvertices[0].pos, hedge->HE_v1origin); - rvertices[0].pos[VZ] = (float)leftWallDivs->pos[0]; + rvertices[0].pos[VZ] = (float)leftWallDivs->nodes[0].height; // Top Left. V2f_Copyd(rvertices[1].pos, hedge->HE_v1origin); - rvertices[1].pos[VZ] = (float)leftWallDivs->pos[leftWallDivs->num-1]; + rvertices[1].pos[VZ] = (float)leftWallDivs->nodes[leftWallDivs->num-1].height; // Bottom Right. V2f_Copyd(rvertices[2].pos, hedge->HE_v2origin); - rvertices[2].pos[VZ] = (float)rightWallDivs->pos[0]; + rvertices[2].pos[VZ] = (float)rightWallDivs->nodes[0].height; // Top Right. V2f_Copyd(rvertices[3].pos, hedge->HE_v2origin); - rvertices[3].pos[VZ] = (float)rightWallDivs->pos[rightWallDivs->num-1]; + rvertices[3].pos[VZ] = (float)rightWallDivs->nodes[rightWallDivs->num-1].height; // kludge end. @@ -1558,7 +1558,8 @@ static void Rend_RenderPlane(planetype_t type, coord_t height, static boolean rendHEdgeSection(HEdge* hedge, SideDefSection section, int flags, float lightLevel, const float* lightColor, - const walldiv_t* leftWallDivs, const walldiv_t* rightWallDivs, float const matOffset[2]) + const walldivs_t* leftWallDivs, const walldivs_t* rightWallDivs, + float const matOffset[2]) { SideDef* frontSide = HEDGE_SIDEDEF(hedge); Surface* surface = &frontSide->SW_surface(section); @@ -1566,7 +1567,7 @@ static boolean rendHEdgeSection(HEdge* hedge, SideDefSection section, float alpha; if(!Surface_IsDrawable(surface)) return false; - if(leftWallDivs->pos[0] >= rightWallDivs->pos[rightWallDivs->num-1]) return true; + if(leftWallDivs->nodes[0].height >= rightWallDivs->nodes[rightWallDivs->num-1].height) return true; alpha = (section == SS_MIDDLE? surface->rgba[3] : 1.0f); @@ -1582,8 +1583,8 @@ static boolean rendHEdgeSection(HEdge* hedge, SideDefSection section, * an opaque waterfall). */ - if(viewData->current.origin[VZ] > leftWallDivs->pos[0] && - viewData->current.origin[VZ] < rightWallDivs->pos[rightWallDivs->num-1]) + if(viewData->current.origin[VZ] > leftWallDivs->nodes[0].height && + viewData->current.origin[VZ] < rightWallDivs->nodes[rightWallDivs->num-1].height) { LineDef* lineDef = hedge->lineDef; vec2d_t result; @@ -1626,10 +1627,10 @@ static boolean rendHEdgeSection(HEdge* hedge, SideDefSection section, texScale[1] = ((surface->flags & DDSUF_MATERIAL_FLIPV)? -1 : 1); V2d_Copy(texTL, hedge->HE_v1origin); - texTL[VZ] = leftWallDivs->pos[leftWallDivs->num-1]; + texTL[VZ] = leftWallDivs->nodes[leftWallDivs->num-1].height; V2d_Copy(texBR, hedge->HE_v2origin); - texBR[VZ] = rightWallDivs->pos[0]; + texBR[VZ] = rightWallDivs->nodes[0].height; // Determine which Material to use. if(devRendSkyMode && HEDGE_BACK_SECTOR(hedge) && @@ -1801,7 +1802,7 @@ static boolean Rend_RenderHEdge(HEdge* hedge) // Only a "middle" section. if(frontSide->SW_middleinflags & SUIF_PVIS) { - walldiv_t leftWallDivs, rightWallDivs; + walldivs_t leftWallDivs, rightWallDivs; float matOffset[2]; boolean opaque = false; @@ -1979,7 +1980,7 @@ static boolean Rend_RenderHEdgeTwosided(HEdge* hedge) // Middle section. if(frontSide->SW_middleinflags & SUIF_PVIS) { - walldiv_t leftWallDivs, rightWallDivs; + walldivs_t leftWallDivs, rightWallDivs; float matOffset[2]; if(HEdge_PrepareWallDivs(hedge, SS_MIDDLE, leaf->sector, HEDGE_BACK_SECTOR(hedge), @@ -2013,8 +2014,8 @@ static boolean Rend_RenderHEdgeTwosided(HEdge* hedge) xtop += suf->visOffset[VY]; // Can we make this a solid segment? - if(!(rightWallDivs.pos[0] >= xtop && - leftWallDivs.pos[0] <= xbottom)) + if(!(rightWallDivs.nodes[rightWallDivs.num-1].height >= xtop && + leftWallDivs.nodes[0].height <= xbottom)) solidSeg = false; } } @@ -2023,7 +2024,7 @@ static boolean Rend_RenderHEdgeTwosided(HEdge* hedge) // Upper section. if(frontSide->SW_topinflags & SUIF_PVIS) { - walldiv_t leftWallDivs, rightWallDivs; + walldivs_t leftWallDivs, rightWallDivs; float matOffset[2]; if(HEdge_PrepareWallDivs(hedge, SS_TOP, leaf->sector, HEDGE_BACK_SECTOR(hedge), @@ -2039,7 +2040,7 @@ static boolean Rend_RenderHEdgeTwosided(HEdge* hedge) // Lower section. if(frontSide->SW_bottominflags & SUIF_PVIS) { - walldiv_t leftWallDivs, rightWallDivs; + walldivs_t leftWallDivs, rightWallDivs; float matOffset[2]; if(HEdge_PrepareWallDivs(hedge, SS_BOTTOM, leaf->sector, HEDGE_BACK_SECTOR(hedge),