- refactored the global lines array into a more VM friendly form, moved it to FLevelLocals and exported it to ZScript.
- disabled the Build map loader after finding out that it has been completely broken and nonfunctional for a long time. Since this has no real value it will probably removed entirely in an upcoming commit.
This commit is contained in:
parent
5ee52f159e
commit
71d1138376
39 changed files with 378 additions and 379 deletions
|
|
@ -121,10 +121,10 @@ void P_Attach3dMidtexLinesToSector(sector_t *sector, int lineid, int tag, bool c
|
|||
extsector_t::midtex::plane &scrollplane = ceiling? sector->e->Midtex.Ceiling : sector->e->Midtex.Floor;
|
||||
|
||||
// Bit arrays that mark whether a line or sector is to be attached.
|
||||
BYTE *found_lines = new BYTE[(numlines+7)/8];
|
||||
BYTE *found_lines = new BYTE[(level.lines.Size()+7)/8];
|
||||
BYTE *found_sectors = new BYTE[(level.sectors.Size()+7)/8];
|
||||
|
||||
memset(found_lines, 0, sizeof (BYTE) * ((numlines+7)/8));
|
||||
memset(found_lines, 0, sizeof (BYTE) * ((level.lines.Size()+7)/8));
|
||||
memset(found_sectors, 0, sizeof (BYTE) * ((level.sectors.Size()+7)/8));
|
||||
|
||||
// mark all lines and sectors that are already attached to this one
|
||||
|
|
@ -132,13 +132,13 @@ void P_Attach3dMidtexLinesToSector(sector_t *sector, int lineid, int tag, bool c
|
|||
// from the marker arrays.
|
||||
for (unsigned i=0; i < scrollplane.AttachedLines.Size(); i++)
|
||||
{
|
||||
int line = int(scrollplane.AttachedLines[i] - lines);
|
||||
int line = scrollplane.AttachedLines[i]->Index();
|
||||
found_lines[line>>3] |= 1 << (line&7);
|
||||
}
|
||||
|
||||
for (unsigned i=0; i < scrollplane.AttachedSectors.Size(); i++)
|
||||
{
|
||||
int sec = scrollplane.AttachedSectors[i]->sectornum;
|
||||
int sec = scrollplane.AttachedSectors[i]->Index();
|
||||
found_sectors[sec>>3] |= 1 << (sec&7);
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ void P_Attach3dMidtexLinesToSector(sector_t *sector, int lineid, int tag, bool c
|
|||
int line;
|
||||
while ((line = itr.Next()) >= 0)
|
||||
{
|
||||
line_t *ln = &lines[line];
|
||||
line_t *ln = &level.lines[line];
|
||||
|
||||
if (ln->frontsector == NULL || ln->backsector == NULL || !(ln->flags & ML_3DMIDTEX))
|
||||
{
|
||||
|
|
@ -176,24 +176,25 @@ void P_Attach3dMidtexLinesToSector(sector_t *sector, int lineid, int tag, bool c
|
|||
// Only consider two-sided lines with the 3DMIDTEX flag
|
||||
continue;
|
||||
}
|
||||
int lineno = int(ln-lines);
|
||||
found_lines[lineno>>3] |= 1 << (lineno&7);
|
||||
int lineno = ln->Index();
|
||||
found_lines[lineno >> 3] |= 1 << (lineno & 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(int i=0; i < numlines; i++)
|
||||
for(unsigned i=0; i < level.lines.Size(); i++)
|
||||
{
|
||||
if (found_lines[i>>3] & (1 << (i&7)))
|
||||
{
|
||||
scrollplane.AttachedLines.Push(&lines[i]);
|
||||
auto &line = level.lines[i];
|
||||
scrollplane.AttachedLines.Push(&line);
|
||||
|
||||
v = lines[i].frontsector->sectornum;
|
||||
v = line.frontsector->Index();
|
||||
assert(v < (int)level.sectors.Size());
|
||||
found_sectors[v>>3] |= 1 << (v&7);
|
||||
|
||||
v = lines[i].backsector->sectornum;
|
||||
v = line.backsector->Index();
|
||||
assert(v < (int)level.sectors.Size());
|
||||
found_sectors[v>>3] |= 1 << (v&7);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue