Change draw segment list to use TArray

This commit is contained in:
Magnus Norddahl 2017-02-03 21:11:55 +01:00
commit da346427d3
9 changed files with 65 additions and 78 deletions

View file

@ -266,9 +266,10 @@ namespace swrenderer
// Draw any masked textures behind this particle so that when the
// particle is drawn, it will be in front of them.
DrawSegmentList *segmentlist = DrawSegmentList::Instance();
for (unsigned int p = segmentlist->InterestingDrawsegs.Size(); p-- > segmentlist->FirstInterestingDrawseg; )
for (unsigned int index = segmentlist->BeginInterestingIndex(); index != segmentlist->EndInterestingIndex(); index++)
{
DrawSegment *ds = &segmentlist->drawsegs[segmentlist->InterestingDrawsegs[p]];
DrawSegment *ds = segmentlist->InterestingSegment(index);
// kg3D - no fake segs
if (ds->fake) continue;
if (ds->x1 >= x2 || ds->x2 <= x1)