Skip to content

Commit

Permalink
Renamed the class for the blockmap of wall and edge portals
Browse files Browse the repository at this point in the history
It's no longer only used for rendering
  • Loading branch information
ioan-chera committed Oct 30, 2018
1 parent 977fa4d commit 8cc98f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions source/p_portalblockmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "r_state.h"

PortalBlockmap gPortalBlockmap;
LinePortalRenderBlockmap pLPortalMap;
LineEdgePortalBlockmap pLPortalMap;

//
// Initializes the portal blockmap at level start, when map blocks are set.
Expand Down Expand Up @@ -209,7 +209,7 @@ void PortalBlockmap::checkLinkSector(const sector_t &sector, const portal_t *por
//
// Initialization per map. Makes PU_LEVEL allocations
//
void LinePortalRenderBlockmap::mapInit()
void LineEdgePortalBlockmap::mapInit()
{
mMap.clear();
int numblocks = bmapwidth * bmapheight;
Expand Down Expand Up @@ -256,7 +256,7 @@ void LinePortalRenderBlockmap::mapInit()
//
// Does the iteration
//
bool LinePortalRenderBlockmap::iterator(int x, int y, void *data,
bool LineEdgePortalBlockmap::iterator(int x, int y, void *data,
bool(*func)(const line_t &, void *data)) const
{
if(x < 0 || x >= bmapwidth || y < 0 || y >= bmapheight)
Expand Down
9 changes: 4 additions & 5 deletions source/p_portalblockmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,12 @@ class PortalBlockmap final
};

//
// Line portal blockmap: stores just the portal linedefs on the blockmap.
// Only used by rendering facilities (e.g. sprite projections) right now.
// Line portal blockmap: stores just the portal linedefs (both wall and edge) on the blockmap.
//
class LinePortalRenderBlockmap
class LineEdgePortalBlockmap
{
public:
LinePortalRenderBlockmap() : mValidcount(0), mValids(nullptr)
LineEdgePortalBlockmap() : mValidcount(0), mValids(nullptr)
{
}

Expand All @@ -129,7 +128,7 @@ class LinePortalRenderBlockmap
bool P_BlockHasLinkedPortals(int index, bool includesectors);

extern PortalBlockmap gPortalBlockmap;
extern LinePortalRenderBlockmap pLPortalMap;
extern LineEdgePortalBlockmap pLPortalMap;

#endif

Expand Down

0 comments on commit 8cc98f9

Please sign in to comment.