From b11c8fef57e4475cfb69dc01e9909f3c546b793b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 6 Jan 2017 11:56:17 +0100 Subject: [PATCH] - renamed a few variables for clarity. --- src/actor.h | 4 ++-- src/gl/scene/gl_bsp.cpp | 2 +- src/gl/scene/gl_sprite.cpp | 2 +- src/p_map.cpp | 24 ++++++++++++------------ src/p_sectors.cpp | 2 +- src/p_setup.cpp | 2 +- src/p_udmf.cpp | 2 +- src/portal.h | 2 +- src/r_defs.h | 2 +- wadsrc/static/zscript/base.txt | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/actor.h b/src/actor.h index 5445c92be..ffe3cc1a4 100644 --- a/src/actor.h +++ b/src/actor.h @@ -1148,8 +1148,8 @@ public: // a linked list of sectors where this object appears struct msecnode_t *touching_sectorlist; // phares 3/14/98 - struct msecnode_t *render_sectorlist; // same for cross-sectorportal rendering - struct portnode_t *render_portallist; // and for cross-lineportal + struct msecnode_t *touching_sectorportallist; // same for cross-sectorportal rendering + struct portnode_t *touching_lineportallist; // and for cross-lineportal struct msecnode_t *touching_rendersectors; // this is the list of sectors that this thing interesects with it's max(radius, renderradius). int validcount; diff --git a/src/gl/scene/gl_bsp.cpp b/src/gl/scene/gl_bsp.cpp index 9e5ea258d..d646daa53 100644 --- a/src/gl/scene/gl_bsp.cpp +++ b/src/gl/scene/gl_bsp.cpp @@ -383,7 +383,7 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector) GLRenderer->ProcessSprite(thing, sector, false); } - for (msecnode_t *node = sec->render_thinglist; node; node = node->m_snext) + for (msecnode_t *node = sec->sectorportal_thinglist; node; node = node->m_snext) { AActor *thing = node->m_thing; FIntCVar *cvar = thing->GetClass()->distancecheck; diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 102337ecc..7ed4199a1 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -1189,7 +1189,7 @@ void gl_RenderActorsInPortal(FGLLinePortal *glport) if (port2 != nullptr && port->mDestination == port2->mOrigin && port->mOrigin == port2->mDestination) { - for (portnode_t *node = port->render_thinglist; node != nullptr; node = node->m_snext) + for (portnode_t *node = port->lineportal_thinglist; node != nullptr; node = node->m_snext) { AActor *th = node->m_thing; diff --git a/src/p_map.cpp b/src/p_map.cpp index 5bbb9c3f9..bb3f63f4e 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -6728,7 +6728,7 @@ portnode_t *P_DelPortalnode(portnode_t *node) if (sp) sp->m_snext = sn; else - node->m_portal->render_thinglist = sn; + node->m_portal->lineportal_thinglist = sn; if (sn) sn->m_sprev = sp; @@ -6770,10 +6770,10 @@ portnode_t *P_AddPortalnode(FLinePortal *s, AActor *thing, portnode_t *nextnode) // Add new node at head of portal thread starting at s->touching_thinglist node->m_sprev = NULL; // prev node on portal thread - node->m_snext = s->render_thinglist; // next node on portal thread - if (s->render_thinglist) + node->m_snext = s->lineportal_thinglist; // next node on portal thread + if (s->lineportal_thinglist) node->m_snext->m_sprev = node; - s->render_thinglist = node; + s->lineportal_thinglist = node; return node; } @@ -6805,7 +6805,7 @@ void AActor::UpdateRenderSectorList() if (p.mType == PORTT_VISUAL) continue; if (bb.inRange(p.mOrigin) && bb.BoxOnLineSide(p.mOrigin)) { - render_portallist = P_AddPortalnode(&p, this, render_portallist); + touching_lineportallist = P_AddPortalnode(&p, this, touching_lineportallist); } } } @@ -6821,7 +6821,7 @@ void AActor::UpdateRenderSectorList() lasth = planeh; DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::ceiling); sec = P_PointInSector(newpos); - render_sectorlist = P_AddSecnode(sec, this, render_sectorlist, sec->render_thinglist); + touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); } sec = Sector; lasth = FLT_MAX; @@ -6833,25 +6833,25 @@ void AActor::UpdateRenderSectorList() lasth = planeh; DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::floor); sec = P_PointInSector(newpos); - render_sectorlist = P_AddSecnode(sec, this, render_sectorlist, sec->render_thinglist); + touching_sectorportallist = P_AddSecnode(sec, this, touching_sectorportallist, sec->sectorportal_thinglist); } } } void AActor::ClearRenderSectorList() { - msecnode_t *node = render_sectorlist; + msecnode_t *node = touching_sectorportallist; while (node) - node = P_DelSecnode(node, §or_t::render_thinglist); - render_sectorlist = NULL; + node = P_DelSecnode(node, §or_t::sectorportal_thinglist); + touching_sectorportallist = NULL; } void AActor::ClearRenderLineList() { - portnode_t *node = render_portallist; + portnode_t *node = touching_lineportallist; while (node) node = P_DelPortalnode(node); - render_portallist = NULL; + touching_lineportallist = NULL; } diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index 2850f2264..c2488b998 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -1337,7 +1337,7 @@ DEFINE_FIELD_X(Sector, sector_t, bottommap) DEFINE_FIELD_X(Sector, sector_t, midmap) DEFINE_FIELD_X(Sector, sector_t, topmap) DEFINE_FIELD_X(Sector, sector_t, touching_thinglist) -DEFINE_FIELD_X(Sector, sector_t, render_thinglist) +DEFINE_FIELD_X(Sector, sector_t, sectorportal_thinglist) DEFINE_FIELD_X(Sector, sector_t, gravity) DEFINE_FIELD_X(Sector, sector_t, damagetype) DEFINE_FIELD_X(Sector, sector_t, damageamount) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index a1422236a..00e854c54 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1508,7 +1508,7 @@ void P_LoadSectors (MapData *map, FMissingTextureTracker &missingtex) tagManager.AddSectorTag(i, LittleShort(ms->tag)); ss->thinglist = nullptr; ss->touching_thinglist = nullptr; // phares 3/14/98 - ss->render_thinglist = nullptr; + ss->sectorportal_thinglist = nullptr; ss->touching_renderthings = nullptr; ss->seqType = defSeqType; ss->SeqName = NAME_None; diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 1650a33b7..256385c65 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -1297,7 +1297,7 @@ public: sec->SetAlpha(sector_t::ceiling, 1.); sec->thinglist = nullptr; sec->touching_thinglist = nullptr; // phares 3/14/98 - sec->render_thinglist = nullptr; + sec->sectorportal_thinglist = nullptr; sec->touching_renderthings = nullptr; sec->seqType = (level.flags & LEVEL_SNDSEQTOTALCTRL) ? 0 : -1; sec->nextsec = -1; //jff 2/26/98 add fields to support locking out diff --git a/src/portal.h b/src/portal.h index 44d636e4b..f5c8f8c88 100644 --- a/src/portal.h +++ b/src/portal.h @@ -191,7 +191,7 @@ struct FLinePortal DAngle mAngleDiff; double mSinRot; double mCosRot; - portnode_t *render_thinglist; + portnode_t *lineportal_thinglist; }; extern TArray linePortals; diff --git a/src/r_defs.h b/src/r_defs.h index c8a6cc96c..44f042820 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -1049,7 +1049,7 @@ public: // list of mobjs that are at least partially in the sector // thinglist is a subset of touching_thinglist struct msecnode_t *touching_thinglist; // phares 3/14/98 - struct msecnode_t *render_thinglist; // for cross-portal rendering. + struct msecnode_t *sectorportal_thinglist; // for cross-portal rendering. struct msecnode_t *touching_renderthings; // this is used to allow wide things to be rendered not only from their main sector. double gravity; // [RH] Sector gravity (1.0 is normal) diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 38fa79b76..23a830537 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -283,7 +283,7 @@ struct Sector native native uint bottommap, midmap, topmap; //struct msecnode_t *touching_thinglist; - //struct msecnode_t *render_thinglist; + //struct msecnode_t *sectorportal_thinglist; native double gravity; native Name damagetype;