mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- removed the hasglnodes variables.
Since the software renderer also requires GL nodes now this was always true.
This commit is contained in:
parent
d140d767a4
commit
e279214f5b
5 changed files with 33 additions and 48 deletions
|
@ -872,7 +872,7 @@ CCMD(am_togglegrid)
|
||||||
|
|
||||||
CCMD(am_toggletexture)
|
CCMD(am_toggletexture)
|
||||||
{
|
{
|
||||||
if (am_textured && hasglnodes)
|
if (am_textured)
|
||||||
{
|
{
|
||||||
textured = !textured;
|
textured = !textured;
|
||||||
Printf ("%s\n", GStrings(textured ? "AMSTR_TEXON" : "AMSTR_TEXOFF"));
|
Printf ("%s\n", GStrings(textured ? "AMSTR_TEXON" : "AMSTR_TEXOFF"));
|
||||||
|
@ -3212,11 +3212,7 @@ void AM_drawAuthorMarkers ()
|
||||||
|
|
||||||
while (marked != NULL)
|
while (marked != NULL)
|
||||||
{
|
{
|
||||||
// Use more correct info if we have GL nodes available
|
if (mark->args[1] == 0 || (mark->args[1] == 1 && (marked->subsector->flags & SSECMF_DRAWN)))
|
||||||
if (mark->args[1] == 0 ||
|
|
||||||
(mark->args[1] == 1 && (hasglnodes ?
|
|
||||||
marked->subsector->flags & SSECMF_DRAWN :
|
|
||||||
marked->Sector->MoreFlags & SECMF_DRAWN)))
|
|
||||||
{
|
{
|
||||||
DrawMarker (tex, marked->X(), marked->Y(), 0, flip, mark->Scale.X, mark->Scale.Y, mark->Translation,
|
DrawMarker (tex, marked->X(), marked->Y(), 0, flip, mark->Scale.X, mark->Scale.Y, mark->Translation,
|
||||||
mark->Alpha, mark->fillcolor, mark->RenderStyle);
|
mark->Alpha, mark->fillcolor, mark->RenderStyle);
|
||||||
|
@ -3280,7 +3276,7 @@ void AM_Drawer (int bottom)
|
||||||
}
|
}
|
||||||
AM_activateNewScale();
|
AM_activateNewScale();
|
||||||
|
|
||||||
if (am_textured && hasglnodes && textured && !viewactive)
|
if (am_textured && textured && !viewactive)
|
||||||
AM_drawSubsectors();
|
AM_drawSubsectors();
|
||||||
|
|
||||||
if (grid)
|
if (grid)
|
||||||
|
|
|
@ -356,37 +356,34 @@ FSerializer &SerializeSubsectors(FSerializer &arc, const char *key)
|
||||||
auto numsubsectors = level.subsectors.Size();
|
auto numsubsectors = level.subsectors.Size();
|
||||||
if (arc.isWriting())
|
if (arc.isWriting())
|
||||||
{
|
{
|
||||||
if (hasglnodes)
|
TArray<char> encoded(1 + (numsubsectors + 5) / 6);
|
||||||
|
int p = 0;
|
||||||
|
for (unsigned i = 0; i < numsubsectors; i += 6)
|
||||||
{
|
{
|
||||||
TArray<char> encoded(1 + (numsubsectors + 5) / 6);
|
by = 0;
|
||||||
int p = 0;
|
for (unsigned j = 0; j < 6; j++)
|
||||||
for (unsigned i = 0; i < numsubsectors; i += 6)
|
|
||||||
{
|
{
|
||||||
by = 0;
|
if (i + j < numsubsectors && (level.subsectors[i + j].flags & SSECMF_DRAWN))
|
||||||
for (unsigned j = 0; j < 6; j++)
|
|
||||||
{
|
{
|
||||||
if (i + j < numsubsectors && (level.subsectors[i + j].flags & SSECMF_DRAWN))
|
by |= (1 << j);
|
||||||
{
|
|
||||||
by |= (1 << j);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (by < 10) by += '0';
|
|
||||||
else if (by < 36) by += 'A' - 10;
|
|
||||||
else if (by < 62) by += 'a' - 36;
|
|
||||||
else if (by == 62) by = '-';
|
|
||||||
else if (by == 63) by = '+';
|
|
||||||
encoded[p++] = by;
|
|
||||||
}
|
|
||||||
encoded[p] = 0;
|
|
||||||
str = &encoded[0];
|
|
||||||
if (arc.BeginArray(key))
|
|
||||||
{
|
|
||||||
auto numvertexes = level.vertexes.Size();
|
|
||||||
arc(nullptr, numvertexes)
|
|
||||||
(nullptr, numsubsectors)
|
|
||||||
.StringPtr(nullptr, str)
|
|
||||||
.EndArray();
|
|
||||||
}
|
}
|
||||||
|
if (by < 10) by += '0';
|
||||||
|
else if (by < 36) by += 'A' - 10;
|
||||||
|
else if (by < 62) by += 'a' - 36;
|
||||||
|
else if (by == 62) by = '-';
|
||||||
|
else if (by == 63) by = '+';
|
||||||
|
encoded[p++] = by;
|
||||||
|
}
|
||||||
|
encoded[p] = 0;
|
||||||
|
str = &encoded[0];
|
||||||
|
if (arc.BeginArray(key))
|
||||||
|
{
|
||||||
|
auto numvertexes = level.vertexes.Size();
|
||||||
|
arc(nullptr, numvertexes)
|
||||||
|
(nullptr, numsubsectors)
|
||||||
|
.StringPtr(nullptr, str)
|
||||||
|
.EndArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -400,7 +397,7 @@ FSerializer &SerializeSubsectors(FSerializer &arc, const char *key)
|
||||||
.StringPtr(nullptr, str)
|
.StringPtr(nullptr, str)
|
||||||
.EndArray();
|
.EndArray();
|
||||||
|
|
||||||
if (num_verts == (int)level.vertexes.Size() && num_subs == (int)numsubsectors && hasglnodes)
|
if (num_verts == (int)level.vertexes.Size() && num_subs == (int)numsubsectors)
|
||||||
{
|
{
|
||||||
success = true;
|
success = true;
|
||||||
int sub = 0;
|
int sub = 0;
|
||||||
|
@ -427,7 +424,7 @@ FSerializer &SerializeSubsectors(FSerializer &arc, const char *key)
|
||||||
sub += 6;
|
sub += 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasglnodes && !success)
|
if (!success)
|
||||||
{
|
{
|
||||||
RecalculateDrawnSubsectors();
|
RecalculateDrawnSubsectors();
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,8 +148,6 @@ inline bool P_LoadBuildMap(uint8_t *mapdata, size_t len, FMapThing **things, int
|
||||||
//
|
//
|
||||||
TArray<vertexdata_t> vertexdatas;
|
TArray<vertexdata_t> vertexdatas;
|
||||||
|
|
||||||
bool hasglnodes;
|
|
||||||
|
|
||||||
TArray<FMapThing> MapThingsConverted;
|
TArray<FMapThing> MapThingsConverted;
|
||||||
TMap<unsigned,unsigned> MapThingsUserDataIndex; // from mapthing idx -> user data idx
|
TMap<unsigned,unsigned> MapThingsUserDataIndex; // from mapthing idx -> user data idx
|
||||||
TArray<FUDMFKey> MapThingsUserData;
|
TArray<FUDMFKey> MapThingsUserData;
|
||||||
|
@ -3371,7 +3369,6 @@ void P_SetupLevel(const char *lumpname, int position, bool newGame)
|
||||||
map->GetChecksum(level.md5);
|
map->GetChecksum(level.md5);
|
||||||
// find map num
|
// find map num
|
||||||
level.lumpnum = map->lumpnum;
|
level.lumpnum = map->lumpnum;
|
||||||
hasglnodes = false;
|
|
||||||
|
|
||||||
if (newGame)
|
if (newGame)
|
||||||
{
|
{
|
||||||
|
@ -3678,11 +3675,10 @@ void P_SetupLevel(const char *lumpname, int position, bool newGame)
|
||||||
// use in P_PointInSubsector to avoid problems with maps that depend on the specific
|
// use in P_PointInSubsector to avoid problems with maps that depend on the specific
|
||||||
// nodes they were built with (P:AR E1M3 is a good example for a map where this is the case.)
|
// nodes they were built with (P:AR E1M3 is a good example for a map where this is the case.)
|
||||||
reloop |= P_CheckNodes(map, BuildGLNodes, (uint32_t)(endTime - startTime));
|
reloop |= P_CheckNodes(map, BuildGLNodes, (uint32_t)(endTime - startTime));
|
||||||
hasglnodes = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hasglnodes = P_CheckForGLNodes();
|
P_CheckForGLNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the head node for gameplay purposes. If the separate gamenodes array is not empty, use that, otherwise use the render nodes.
|
// set the head node for gameplay purposes. If the separate gamenodes array is not empty, use that, otherwise use the render nodes.
|
||||||
|
@ -3704,12 +3700,9 @@ void P_SetupLevel(const char *lumpname, int position, bool newGame)
|
||||||
P_FloodZones();
|
P_FloodZones();
|
||||||
times[13].Unclock();
|
times[13].Unclock();
|
||||||
|
|
||||||
if (hasglnodes)
|
P_SetRenderSector();
|
||||||
{
|
FixMinisegReferences();
|
||||||
P_SetRenderSector();
|
FixHoles();
|
||||||
FixMinisegReferences();
|
|
||||||
FixHoles();
|
|
||||||
}
|
|
||||||
|
|
||||||
level.bodyqueslot = 0;
|
level.bodyqueslot = 0;
|
||||||
// phares 8/10/98: Clear body queue so the corpses from previous games are
|
// phares 8/10/98: Clear body queue so the corpses from previous games are
|
||||||
|
|
|
@ -195,7 +195,6 @@ struct sidei_t // [RH] Only keep BOOM sidedef init stuff around for init
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extern sidei_t *sidetemp;
|
extern sidei_t *sidetemp;
|
||||||
extern bool hasglnodes;
|
|
||||||
|
|
||||||
struct FMissingCount
|
struct FMissingCount
|
||||||
{
|
{
|
||||||
|
|
|
@ -171,7 +171,7 @@ namespace swrenderer
|
||||||
{
|
{
|
||||||
// When using GL nodes, do a clipping test for these lines so we can
|
// When using GL nodes, do a clipping test for these lines so we can
|
||||||
// mark their subsectors as visible for automap texturing.
|
// mark their subsectors as visible for automap texturing.
|
||||||
if (hasglnodes && !(mSubsector->flags & SSECMF_DRAWN))
|
if (!(mSubsector->flags & SSECMF_DRAWN))
|
||||||
{
|
{
|
||||||
if (Thread->ClipSegments->Check(WallC.sx1, WallC.sx2))
|
if (Thread->ClipSegments->Check(WallC.sx1, WallC.sx2))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue