mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
- moved most content of p_setup.cpp into a MapLoader class.
This commit is contained in:
parent
071347d7fb
commit
2e22c01d45
10 changed files with 511 additions and 451 deletions
|
@ -34,6 +34,7 @@
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include "doomdata.h"
|
#include "doomdata.h"
|
||||||
#include "tarray.h"
|
#include "tarray.h"
|
||||||
|
|
|
@ -73,7 +73,7 @@ struct FBlockmap
|
||||||
return blockmaplump + *(blockmap + offset) + 1;
|
return blockmaplump + *(blockmap + offset) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VerifyBlockMap(int count);
|
bool VerifyBlockMap(int count, unsigned numlines);
|
||||||
|
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,13 +63,9 @@
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
#include "i_time.h"
|
#include "i_time.h"
|
||||||
|
|
||||||
void P_GetPolySpots (MapData * lump, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors);
|
|
||||||
|
|
||||||
CVAR(Bool, gl_cachenodes, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR(Bool, gl_cachenodes, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
CVAR(Float, gl_cachetime, 0.6f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR(Float, gl_cachetime, 0.6f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
void P_LoadZNodes (FileReader &dalump, uint32_t id);
|
|
||||||
static bool CheckCachedNodes(MapData *map);
|
|
||||||
static void CreateCachedNodes(MapData *map);
|
static void CreateCachedNodes(MapData *map);
|
||||||
|
|
||||||
|
|
||||||
|
@ -775,7 +771,7 @@ static int FindGLNodesInFile(FResourceFile * f, const char * label)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
bool P_LoadGLNodes(MapData * map)
|
bool MapLoader::LoadGLNodes(MapData * map)
|
||||||
{
|
{
|
||||||
if (map->Size(ML_GLZNODES) != 0)
|
if (map->Size(ML_GLZNODES) != 0)
|
||||||
{
|
{
|
||||||
|
@ -794,17 +790,17 @@ bool P_LoadGLNodes(MapData * map)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
level.subsectors.Clear();
|
Level->subsectors.Clear();
|
||||||
level.segs.Clear();
|
Level->segs.Clear();
|
||||||
level.nodes.Clear();
|
Level->nodes.Clear();
|
||||||
P_LoadZNodes (file, id);
|
LoadExtendedNodes (file, id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (CRecoverableError &)
|
catch (CRecoverableError &)
|
||||||
{
|
{
|
||||||
level.subsectors.Clear();
|
Level->subsectors.Clear();
|
||||||
level.segs.Clear();
|
Level->segs.Clear();
|
||||||
level.nodes.Clear();
|
Level->nodes.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -883,7 +879,7 @@ bool P_LoadGLNodes(MapData * map)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime)
|
bool MapLoader::CheckNodes(MapData * map, bool rebuilt, int buildtime)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
|
@ -892,18 +888,18 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime)
|
||||||
if (!rebuilt && !P_CheckForGLNodes())
|
if (!rebuilt && !P_CheckForGLNodes())
|
||||||
{
|
{
|
||||||
ret = true; // we are not using the level's original nodes if we get here.
|
ret = true; // we are not using the level's original nodes if we get here.
|
||||||
for (auto &sub : level.subsectors)
|
for (auto &sub : Level->subsectors)
|
||||||
{
|
{
|
||||||
sub.sector = sub.firstline->sidedef->sector;
|
sub.sector = sub.firstline->sidedef->sector;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The nodes and subsectors need to be preserved for gameplay related purposes.
|
// The nodes and subsectors need to be preserved for gameplay related purposes.
|
||||||
level.gamenodes = std::move(level.nodes);
|
Level->gamenodes = std::move(Level->nodes);
|
||||||
level.gamesubsectors = std::move(level.subsectors);
|
Level->gamesubsectors = std::move(Level->subsectors);
|
||||||
level.segs.Clear();
|
Level->segs.Clear();
|
||||||
|
|
||||||
// Try to load GL nodes (cached or GWA)
|
// Try to load GL nodes (cached or GWA)
|
||||||
loaded = P_LoadGLNodes(map);
|
loaded = LoadGLNodes(map);
|
||||||
if (!loaded)
|
if (!loaded)
|
||||||
{
|
{
|
||||||
// none found - we have to build new ones!
|
// none found - we have to build new ones!
|
||||||
|
@ -911,20 +907,20 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime)
|
||||||
|
|
||||||
startTime = I_msTime ();
|
startTime = I_msTime ();
|
||||||
TArray<FNodeBuilder::FPolyStart> polyspots, anchors;
|
TArray<FNodeBuilder::FPolyStart> polyspots, anchors;
|
||||||
P_GetPolySpots (map, polyspots, anchors);
|
GetPolySpots (map, polyspots, anchors);
|
||||||
FNodeBuilder::FLevel leveldata =
|
FNodeBuilder::FLevel leveldata =
|
||||||
{
|
{
|
||||||
&level.vertexes[0], (int)level.vertexes.Size(),
|
&Level->vertexes[0], (int)Level->vertexes.Size(),
|
||||||
&level.sides[0], (int)level.sides.Size(),
|
&Level->sides[0], (int)Level->sides.Size(),
|
||||||
&level.lines[0], (int)level.lines.Size(),
|
&Level->lines[0], (int)Level->lines.Size(),
|
||||||
0, 0, 0, 0
|
0, 0, 0, 0
|
||||||
};
|
};
|
||||||
leveldata.FindMapBounds ();
|
leveldata.FindMapBounds ();
|
||||||
FNodeBuilder builder (leveldata, polyspots, anchors, true);
|
FNodeBuilder builder (leveldata, polyspots, anchors, true);
|
||||||
|
|
||||||
builder.Extract (level);
|
builder.Extract (*Level);
|
||||||
endTime = I_msTime ();
|
endTime = I_msTime ();
|
||||||
DPrintf (DMSG_NOTIFY, "BSP generation took %.3f sec (%u segs)\n", (endTime - startTime) * 0.001, level.segs.Size());
|
DPrintf (DMSG_NOTIFY, "BSP generation took %.3f sec (%u segs)\n", (endTime - startTime) * 0.001, Level->segs.Size());
|
||||||
buildtime = (int32_t)(endTime - startTime);
|
buildtime = (int32_t)(endTime - startTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -935,7 +931,7 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime)
|
||||||
// Building nodes in debug is much slower so let's cache them only if cachetime is 0
|
// Building nodes in debug is much slower so let's cache them only if cachetime is 0
|
||||||
buildtime = 0;
|
buildtime = 0;
|
||||||
#endif
|
#endif
|
||||||
if (level.maptype != MAPTYPE_BUILD && gl_cachenodes && buildtime/1000.f >= gl_cachetime)
|
if (Level->maptype != MAPTYPE_BUILD && gl_cachenodes && buildtime/1000.f >= gl_cachetime)
|
||||||
{
|
{
|
||||||
DPrintf(DMSG_NOTIFY, "Caching nodes\n");
|
DPrintf(DMSG_NOTIFY, "Caching nodes\n");
|
||||||
CreateCachedNodes(map);
|
CreateCachedNodes(map);
|
||||||
|
@ -1102,7 +1098,7 @@ static void CreateCachedNodes(MapData *map)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool CheckCachedNodes(MapData *map)
|
bool MapLoader::CheckCachedNodes(MapData *map)
|
||||||
{
|
{
|
||||||
char magic[4] = {0,0,0,0};
|
char magic[4] = {0,0,0,0};
|
||||||
uint8_t md5[16];
|
uint8_t md5[16];
|
||||||
|
@ -1120,7 +1116,7 @@ static bool CheckCachedNodes(MapData *map)
|
||||||
|
|
||||||
if (fr.Read(&numlin, 4) != 4) return false;
|
if (fr.Read(&numlin, 4) != 4) return false;
|
||||||
numlin = LittleLong(numlin);
|
numlin = LittleLong(numlin);
|
||||||
if (numlin != level.lines.Size()) return false;
|
if (numlin != Level->lines.Size()) return false;
|
||||||
|
|
||||||
if (fr.Read(md5, 16) != 16) return false;
|
if (fr.Read(md5, 16) != 16) return false;
|
||||||
map->GetChecksum(md5map);
|
map->GetChecksum(md5map);
|
||||||
|
@ -1135,23 +1131,23 @@ static bool CheckCachedNodes(MapData *map)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
P_LoadZNodes (fr, MAKE_ID(magic[0],magic[1],magic[2],magic[3]));
|
LoadExtendedNodes (fr, MAKE_ID(magic[0],magic[1],magic[2],magic[3]));
|
||||||
}
|
}
|
||||||
catch (CRecoverableError &error)
|
catch (CRecoverableError &error)
|
||||||
{
|
{
|
||||||
Printf ("Error loading nodes: %s\n", error.GetMessage());
|
Printf ("Error loading nodes: %s\n", error.GetMessage());
|
||||||
|
|
||||||
level.subsectors.Clear();
|
Level->subsectors.Clear();
|
||||||
level.segs.Clear();
|
Level->segs.Clear();
|
||||||
level.nodes.Clear();
|
Level->nodes.Clear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto &line : level.lines)
|
for(auto &line : Level->lines)
|
||||||
{
|
{
|
||||||
int i = line.Index();
|
int i = line.Index();
|
||||||
line.v1 = &level.vertexes[LittleLong(verts[i*2])];
|
line.v1 = &Level->vertexes[LittleLong(verts[i*2])];
|
||||||
line.v2 = &level.vertexes[LittleLong(verts[i*2+1])];
|
line.v2 = &Level->vertexes[LittleLong(verts[i*2+1])];
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,7 @@
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
#include "actorinlines.h"
|
#include "actorinlines.h"
|
||||||
#include "a_dynlight.h"
|
#include "a_dynlight.h"
|
||||||
|
#include "fragglescript/t_fs.h"
|
||||||
|
|
||||||
// MACROS ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -5577,6 +5578,26 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
return mobj;
|
return mobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// SpawnMapThing
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
CVAR(Bool, dumpspawnedthings, false, 0)
|
||||||
|
|
||||||
|
AActor *SpawnMapThing(int index, FMapThing *mt, int position)
|
||||||
|
{
|
||||||
|
AActor *spawned = P_SpawnMapThing(mt, position);
|
||||||
|
if (dumpspawnedthings)
|
||||||
|
{
|
||||||
|
Printf("%5d: (%5f, %5f, %5f), doomednum = %5d, flags = %04x, type = %s\n",
|
||||||
|
index, mt->pos.X, mt->pos.Y, mt->pos.Z, mt->EdNum, mt->flags,
|
||||||
|
spawned ? spawned->GetClass()->TypeName.GetChars() : "(none)");
|
||||||
|
}
|
||||||
|
T_AddSpawnedThing(spawned);
|
||||||
|
return spawned;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -1477,6 +1477,39 @@ CUSTOM_CVAR(Int, r_fakecontrast, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
else if (self > 2) self = 2;
|
else if (self > 2) self = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
|
void line_t::AdjustLine()
|
||||||
|
{
|
||||||
|
setDelta(v2->fX() - v1->fX(), v2->fY() - v1->fY());
|
||||||
|
|
||||||
|
if (v1->fX() < v2->fX())
|
||||||
|
{
|
||||||
|
bbox[BOXLEFT] = v1->fX();
|
||||||
|
bbox[BOXRIGHT] = v2->fX();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bbox[BOXLEFT] = v2->fX();
|
||||||
|
bbox[BOXRIGHT] = v1->fX();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (v1->fY() < v2->fY())
|
||||||
|
{
|
||||||
|
bbox[BOXBOTTOM] = v1->fY();
|
||||||
|
bbox[BOXTOP] = v2->fY();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bbox[BOXBOTTOM] = v2->fY();
|
||||||
|
bbox[BOXTOP] = v1->fY();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
741
src/p_setup.cpp
741
src/p_setup.cpp
File diff suppressed because it is too large
Load diff
|
@ -31,6 +31,7 @@
|
||||||
#include "resourcefiles/resourcefile.h"
|
#include "resourcefiles/resourcefile.h"
|
||||||
#include "doomdata.h"
|
#include "doomdata.h"
|
||||||
#include "r_defs.h"
|
#include "r_defs.h"
|
||||||
|
#include "nodebuild.h"
|
||||||
|
|
||||||
|
|
||||||
struct MapData
|
struct MapData
|
||||||
|
@ -131,7 +132,7 @@ public:
|
||||||
|
|
||||||
void GetChecksum(uint8_t cksum[16]);
|
void GetChecksum(uint8_t cksum[16]);
|
||||||
|
|
||||||
friend bool P_LoadGLNodes(MapData * map);
|
friend class MapLoader;
|
||||||
friend MapData *P_OpenMapData(const char * mapname, bool justcheck);
|
friend MapData *P_OpenMapData(const char * mapname, bool justcheck);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -164,8 +165,6 @@ int GetUDMFInt(int type, int index, FName key);
|
||||||
double GetUDMFFloat(int type, int index, FName key);
|
double GetUDMFFloat(int type, int index, FName key);
|
||||||
FString GetUDMFString(int type, int index, FName key);
|
FString GetUDMFString(int type, int index, FName key);
|
||||||
|
|
||||||
bool P_LoadGLNodes(MapData * map);
|
|
||||||
bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime);
|
|
||||||
bool P_CheckForGLNodes();
|
bool P_CheckForGLNodes();
|
||||||
void P_SetRenderSector();
|
void P_SetRenderSector();
|
||||||
void FixMinisegReferences();
|
void FixMinisegReferences();
|
||||||
|
@ -206,5 +205,70 @@ typedef TMap<FString,FMissingCount> FMissingTextureTracker;
|
||||||
extern TMap<unsigned,unsigned> MapThingsUserDataIndex; // from mapthing idx -> user data idx
|
extern TMap<unsigned,unsigned> MapThingsUserDataIndex; // from mapthing idx -> user data idx
|
||||||
extern TArray<FUDMFKey> MapThingsUserData;
|
extern TArray<FUDMFKey> MapThingsUserData;
|
||||||
|
|
||||||
|
struct FLevelLocals;
|
||||||
|
|
||||||
|
class MapLoader
|
||||||
|
{
|
||||||
|
friend class UDMFParser;
|
||||||
|
void *level; // this is to hide the global variable and produce an error for referencing it.
|
||||||
|
FLevelLocals *Level;
|
||||||
|
|
||||||
|
void SetTexture(side_t *side, int position, const char *name, FMissingTextureTracker &track);
|
||||||
|
void SetTexture(sector_t *sector, int index, int position, const char *name, FMissingTextureTracker &track, bool truncate);
|
||||||
|
void SetTexture(side_t *side, int position, uint32_t *blend, const char *name);
|
||||||
|
void SetTextureNoErr(side_t *side, int position, uint32_t *color, const char *name, bool *validcolor, bool isFog);
|
||||||
|
|
||||||
|
void FloodZone(sector_t *sec, int zonenum);
|
||||||
|
void LoadGLZSegs(FileReader &data, int type);
|
||||||
|
void LoadZSegs(FileReader &data);
|
||||||
|
void LoadZNodes(FileReader &data, int glnodes);
|
||||||
|
|
||||||
|
int DetermineTranslucency(int lumpnum);
|
||||||
|
void SetLineID(int i, line_t *ld);
|
||||||
|
void SaveLineSpecial(line_t *ld);
|
||||||
|
void FinishLoadingLineDef(line_t *ld, int alpha);
|
||||||
|
void SetSideNum(side_t **sidenum_p, uint16_t sidenum);
|
||||||
|
void AllocateSideDefs(MapData *map, int count);
|
||||||
|
void ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, intmapsidedef_t *msd, int special, int tag, short *alpha, FMissingTextureTracker &missingtex);
|
||||||
|
void CreateBlockMap();
|
||||||
|
|
||||||
|
void AddToList(uint8_t *hitlist, FTextureID texid, int bitmask);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void FloodZones();
|
||||||
|
void LoadVertexes(MapData * map);
|
||||||
|
void LoadExtendedNodes(FileReader &dalump, uint32_t id);
|
||||||
|
template<class segtype> void LoadSegs(MapData * map);
|
||||||
|
template<class subsectortype, class segtype> void LoadSubsectors(MapData * map);
|
||||||
|
template<class nodetype, class subsectortype> void LoadNodes(MapData * map);
|
||||||
|
bool LoadGLNodes(MapData * map);
|
||||||
|
bool CheckCachedNodes(MapData *map);
|
||||||
|
bool CheckNodes(MapData * map, bool rebuilt, int buildtime);
|
||||||
|
|
||||||
|
void LoadSectors(MapData *map, FMissingTextureTracker &missingtex);
|
||||||
|
void LoadThings(MapData * map);
|
||||||
|
void LoadThings2(MapData * map);
|
||||||
|
|
||||||
|
void SpawnThings(int position);
|
||||||
|
void FinishLoadingLineDefs();
|
||||||
|
void LoadLineDefs(MapData * map);
|
||||||
|
void LoadLineDefs2(MapData * map);
|
||||||
|
void LoopSidedefs(bool firstloop);
|
||||||
|
void LoadSideDefs2(MapData *map, FMissingTextureTracker &missingtex);
|
||||||
|
void LoadBlockMap(MapData * map);
|
||||||
|
void LoadReject(MapData * map, bool junk);
|
||||||
|
void LoadBehavior(MapData * map);
|
||||||
|
void GetPolySpots(MapData * map, TArray<FNodeBuilder::FPolyStart> &spots, TArray<FNodeBuilder::FPolyStart> &anchors);
|
||||||
|
void GroupLines(bool buildmap);
|
||||||
|
void PrecacheLevel();
|
||||||
|
void ParseTextMap(MapData *map, FMissingTextureTracker &missingtex);
|
||||||
|
void SummarizeMissingTextures(const FMissingTextureTracker &missing);
|
||||||
|
|
||||||
|
MapLoader(FLevelLocals *lev)
|
||||||
|
{
|
||||||
|
Level = lev;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -121,11 +121,6 @@ enum
|
||||||
// namespace for each game
|
// namespace for each game
|
||||||
};
|
};
|
||||||
|
|
||||||
void SetTexture (sector_t *sector, int index, int position, const char *name, FMissingTextureTracker &, bool truncate);
|
|
||||||
void P_ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, intmapsidedef_t *msd, int special, int tag, short *alpha, FMissingTextureTracker &);
|
|
||||||
void P_AdjustLine (line_t *ld);
|
|
||||||
void P_FinishLoadingLineDef(line_t *ld, int alpha);
|
|
||||||
void SpawnMapThing(int index, FMapThing *mt, int position);
|
|
||||||
extern bool ForceNodeBuild;
|
extern bool ForceNodeBuild;
|
||||||
extern TArray<FMapThing> MapThingsConverted;
|
extern TArray<FMapThing> MapThingsConverted;
|
||||||
extern TArray<int> linemap;
|
extern TArray<int> linemap;
|
||||||
|
@ -426,6 +421,7 @@ class UDMFParser : public UDMFParserBase
|
||||||
bool isTranslated;
|
bool isTranslated;
|
||||||
bool isExtended;
|
bool isExtended;
|
||||||
bool floordrop;
|
bool floordrop;
|
||||||
|
MapLoader *loader;
|
||||||
|
|
||||||
TArray<line_t> ParsedLines;
|
TArray<line_t> ParsedLines;
|
||||||
TArray<side_t> ParsedSides;
|
TArray<side_t> ParsedSides;
|
||||||
|
@ -438,8 +434,8 @@ class UDMFParser : public UDMFParserBase
|
||||||
FMissingTextureTracker &missingTex;
|
FMissingTextureTracker &missingTex;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UDMFParser(FMissingTextureTracker &missing)
|
UDMFParser(MapLoader *ld, FMissingTextureTracker &missing)
|
||||||
: missingTex(missing)
|
: loader(ld), missingTex(missing)
|
||||||
{
|
{
|
||||||
linemap.Clear();
|
linemap.Clear();
|
||||||
}
|
}
|
||||||
|
@ -1499,11 +1495,11 @@ public:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case NAME_Texturefloor:
|
case NAME_Texturefloor:
|
||||||
SetTexture(sec, index, sector_t::floor, CheckString(key), missingTex, false);
|
loader->SetTexture(sec, index, sector_t::floor, CheckString(key), missingTex, false);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case NAME_Textureceiling:
|
case NAME_Textureceiling:
|
||||||
SetTexture(sec, index, sector_t::ceiling, CheckString(key), missingTex, false);
|
loader->SetTexture(sec, index, sector_t::ceiling, CheckString(key), missingTex, false);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case NAME_Lightlevel:
|
case NAME_Lightlevel:
|
||||||
|
@ -2100,7 +2096,7 @@ public:
|
||||||
sides[side].sector = &level.sectors[intptr_t(sides[side].sector)];
|
sides[side].sector = &level.sectors[intptr_t(sides[side].sector)];
|
||||||
lines[line].sidedef[sd] = &sides[side];
|
lines[line].sidedef[sd] = &sides[side];
|
||||||
|
|
||||||
P_ProcessSideTextures(!isExtended, &sides[side], sides[side].sector, &ParsedSideTextures[mapside],
|
loader->ProcessSideTextures(!isExtended, &sides[side], sides[side].sector, &ParsedSideTextures[mapside],
|
||||||
lines[line].special, lines[line].args[0], &tempalpha[sd], missingTex);
|
lines[line].special, lines[line].args[0], &tempalpha[sd], missingTex);
|
||||||
|
|
||||||
side++;
|
side++;
|
||||||
|
@ -2112,8 +2108,8 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
P_AdjustLine(&lines[line]);
|
lines[line].AdjustLine();
|
||||||
P_FinishLoadingLineDef(&lines[line], tempalpha[0]);
|
loader->FinishLoadingLineDef(&lines[line], tempalpha[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int sideDelta = level.sides.Size() - side;
|
const int sideDelta = level.sides.Size() - side;
|
||||||
|
@ -2307,9 +2303,9 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void P_ParseTextMap(MapData *map, FMissingTextureTracker &missingtex)
|
void MapLoader::ParseTextMap(MapData *map, FMissingTextureTracker &missingtex)
|
||||||
{
|
{
|
||||||
UDMFParser parse(missingtex);
|
UDMFParser parse(this, missingtex);
|
||||||
|
|
||||||
parse.ParseTextMap(map);
|
parse.ParseTextMap(map);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,6 @@ public:
|
||||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||||
|
|
||||||
void PO_Init (void);
|
void PO_Init (void);
|
||||||
void P_AdjustLine(line_t *ld);
|
|
||||||
|
|
||||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||||
|
|
||||||
|
@ -912,7 +911,7 @@ void FPolyObj::UpdateBBox ()
|
||||||
{
|
{
|
||||||
for(unsigned i=0;i<Linedefs.Size(); i++)
|
for(unsigned i=0;i<Linedefs.Size(); i++)
|
||||||
{
|
{
|
||||||
P_AdjustLine(Linedefs[i]);
|
Linedefs[i]->AdjustLine();
|
||||||
}
|
}
|
||||||
CalcCenter();
|
CalcCenter();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1406,6 +1406,7 @@ struct line_t
|
||||||
}
|
}
|
||||||
|
|
||||||
FSectorPortal *GetTransferredPortal();
|
FSectorPortal *GetTransferredPortal();
|
||||||
|
void AdjustLine();
|
||||||
|
|
||||||
inline FLinePortal *getPortal() const;
|
inline FLinePortal *getPortal() const;
|
||||||
inline bool isLinePortal() const;
|
inline bool isLinePortal() const;
|
||||||
|
|
Loading…
Reference in a new issue