mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- moved the sidetemp array into the map loader.
This commit is contained in:
parent
11e9cdae33
commit
e66e594dd0
4 changed files with 25 additions and 34 deletions
|
@ -103,7 +103,6 @@
|
|||
#include "fragglescript/t_fs.h"
|
||||
#include "maploader.h"
|
||||
|
||||
sidei_t *sidetemp;
|
||||
TArray<FMapThing> MapThingsConverted;
|
||||
bool ForceNodeBuild;
|
||||
|
||||
|
@ -1830,7 +1829,7 @@ void MapLoader::LoadLineDefs2 (MapData * map)
|
|||
Level->sides.Alloc(count);
|
||||
memset(&Level->sides[0], 0, count * sizeof(side_t));
|
||||
|
||||
sidetemp = new sidei_t[MAX<int>(count, Level->vertexes.Size())];
|
||||
sidetemp.Resize(MAX<int>(count, Level->vertexes.Size()));
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
sidetemp[i].a.special = sidetemp[i].a.tag = 0;
|
||||
|
@ -1857,12 +1856,8 @@ void MapLoader::LoopSidedefs (bool firstloop)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (sidetemp != nullptr)
|
||||
{
|
||||
delete[] sidetemp;
|
||||
}
|
||||
int numsides = Level->sides.Size();
|
||||
sidetemp = new sidei_t[MAX<int>(Level->vertexes.Size(), numsides)];
|
||||
sidetemp.Resize(MAX<int>(Level->vertexes.Size(), numsides));
|
||||
|
||||
for (i = 0; i < (int)Level->vertexes.Size(); ++i)
|
||||
{
|
||||
|
@ -3231,8 +3226,4 @@ void MapLoader::LoadLevel(MapData *map, const char *lumpname, int position)
|
|||
PO_Init(); // Initialize the polyobjs
|
||||
if (!Level->IsReentering())
|
||||
P_FinalizePortals(); // finalize line portals after polyobjects have been initialized. This info is needed for properly flagging them.
|
||||
|
||||
assert(sidetemp != nullptr);
|
||||
delete[] sidetemp;
|
||||
sidetemp = nullptr;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,27 @@ struct EDSector
|
|||
double Overlayalpha[2];
|
||||
};
|
||||
|
||||
struct sidei_t // [RH] Only keep BOOM sidedef init stuff around for init
|
||||
{
|
||||
union
|
||||
{
|
||||
// Used when unpacking sidedefs and assigning
|
||||
// properties based on linedefs.
|
||||
struct
|
||||
{
|
||||
short tag, special;
|
||||
short alpha;
|
||||
uint32_t map;
|
||||
} a;
|
||||
|
||||
// Used when grouping sidedefs into loops.
|
||||
struct
|
||||
{
|
||||
uint32_t first, next;
|
||||
char lineside;
|
||||
} b;
|
||||
};
|
||||
};
|
||||
|
||||
struct FMissingCount
|
||||
{
|
||||
|
@ -83,6 +104,7 @@ class MapLoader
|
|||
TArray<FUDMFKey> MapThingsUserData;
|
||||
int sidecount = 0;
|
||||
TArray<int> linemap;
|
||||
TArray<sidei_t> sidetemp;
|
||||
|
||||
// Extradata loader
|
||||
TMap<int, EDLinedef> EDLines;
|
||||
|
|
|
@ -117,7 +117,7 @@ void MapLoader::IterFindPolySides (FPolyObj *po, side_t *side)
|
|||
static TArray<uint32_t> vnum;
|
||||
unsigned int vnumat;
|
||||
|
||||
assert(sidetemp != NULL);
|
||||
assert(sidetemp.Size() > 0);
|
||||
|
||||
vnum.Clear();
|
||||
vnum.Push(uint32_t(side->V1()->Index()));
|
||||
|
|
|
@ -170,28 +170,6 @@ void ReportUnpairedMinisegs();
|
|||
|
||||
// To be moved to maploader later!
|
||||
|
||||
struct sidei_t // [RH] Only keep BOOM sidedef init stuff around for init
|
||||
{
|
||||
union
|
||||
{
|
||||
// Used when unpacking sidedefs and assigning
|
||||
// properties based on linedefs.
|
||||
struct
|
||||
{
|
||||
short tag, special;
|
||||
short alpha;
|
||||
uint32_t map;
|
||||
} a;
|
||||
|
||||
// Used when grouping sidedefs into loops.
|
||||
struct
|
||||
{
|
||||
uint32_t first, next;
|
||||
char lineside;
|
||||
} b;
|
||||
};
|
||||
};
|
||||
extern sidei_t *sidetemp;
|
||||
extern TArray<FMapThing> MapThingsConverted;
|
||||
extern bool ForceNodeBuild;
|
||||
|
||||
|
|
Loading…
Reference in a new issue