- fixed vertex generation when splitting walls by planes on old hardware.

This commit is contained in:
Christoph Oelckers 2021-09-18 13:04:46 +02:00
parent 01e9d8e5e1
commit 0d4e0d72fb
2 changed files with 5 additions and 3 deletions

View file

@ -269,7 +269,7 @@ void HWDrawList::SortPlaneIntoPlane(SortNode * head,SortNode * sort)
//
//
//==========================================================================
void HWDrawList::SortWallIntoPlane(SortNode * head, SortNode * sort)
void HWDrawList::SortWallIntoPlane(HWDrawInfo* di, SortNode * head, SortNode * sort)
{
HWFlat * fh = flats[drawitems[head->itemindex].index];
HWWall * ws = walls[drawitems[sort->itemindex].index];
@ -302,6 +302,8 @@ void HWDrawList::SortWallIntoPlane(SortNode * head, SortNode * sort)
w->ztop[1] = ws->zbottom[1] = w->ztop[0] = ws->zbottom[0] = fh->z;
w->tcs[HWWall::UPLFT].v = ws->tcs[HWWall::LOLFT].v = w->tcs[HWWall::UPRGT].v = ws->tcs[HWWall::LORGT].v = newtexv;
}
w->MakeVertices(di, false);
ws->MakeVertices(di, false);
}
SortNode * sort2 = SortNodes.GetNew();
@ -651,7 +653,7 @@ SortNode * HWDrawList::DoSort(HWDrawInfo *di, SortNode * head)
break;
case DrawType_WALL:
SortWallIntoPlane(head,node);
SortWallIntoPlane(di,head,node);
break;
case DrawType_SPRITE:

View file

@ -101,7 +101,7 @@ public:
SortNode * FindSortPlane(SortNode * head);
SortNode * FindSortWall(SortNode * head);
void SortPlaneIntoPlane(SortNode * head,SortNode * sort);
void SortWallIntoPlane(SortNode * head,SortNode * sort);
void SortWallIntoPlane(HWDrawInfo* di, SortNode * head,SortNode * sort);
void SortSpriteIntoPlane(SortNode * head,SortNode * sort);
void SortWallIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort);
void SortSpriteIntoWall(HWDrawInfo *di, SortNode * head,SortNode * sort);