qbsp: rename FreeAllPortals -> FreeTreePortals_r

This commit is contained in:
Eric Wasylishen 2022-06-15 23:27:39 -06:00
parent dfb8d7c9fc
commit b8dcc7535e
4 changed files with 10 additions and 9 deletions

View File

@ -42,5 +42,5 @@ struct tree_t
contentflags_t ClusterContents(const node_t *node); contentflags_t ClusterContents(const node_t *node);
void MakeTreePortals(tree_t *tree); void MakeTreePortals(tree_t *tree);
void FreeAllPortals(node_t *node); void FreeTreePortals_r(node_t *node);
void WritePortalFile(tree_t *tree); void WritePortalFile(tree_t *tree);

View File

@ -620,7 +620,7 @@ void MakeTreePortals(tree_t *tree)
state.iNodesDone = 0; state.iNodesDone = 0;
FreeAllPortals(tree->headnode); FreeTreePortals_r(tree->headnode);
AssertNoPortals(tree->headnode); AssertNoPortals(tree->headnode);
MakeHeadnodePortals(tree); MakeHeadnodePortals(tree);
@ -640,10 +640,11 @@ void WritePortalFile(tree_t *tree)
state.iNodesDone = 0; state.iNodesDone = 0;
FreeAllPortals(tree->headnode); FreeTreePortals_r(tree->headnode);
AssertNoPortals(tree->headnode); AssertNoPortals(tree->headnode);
MakeHeadnodePortals(tree); MakeHeadnodePortals(tree);
CutNodePortals_r(tree->headnode, &state); CutNodePortals_r(tree->headnode, &state);
/* save portal file for vis tracing */ /* save portal file for vis tracing */
@ -656,17 +657,17 @@ void WritePortalFile(tree_t *tree)
/* /*
================== ==================
FreeAllPortals FreeTreePortals_r
================== ==================
*/ */
void FreeAllPortals(node_t *node) void FreeTreePortals_r(node_t *node)
{ {
portal_t *p, *nextp; portal_t *p, *nextp;
if (node->planenum != PLANENUM_LEAF) { if (node->planenum != PLANENUM_LEAF) {
FreeAllPortals(node->children[0]); FreeTreePortals_r(node->children[0]);
FreeAllPortals(node->children[1]); FreeTreePortals_r(node->children[1]);
} }
for (p = node->portals; p; p = nextp) { for (p = node->portals; p; p = nextp) {

View File

@ -895,7 +895,7 @@ static void ProcessEntity(mapentity_t *entity, const int hullnum)
tree = BrushBSP(entity, false); tree = BrushBSP(entity, false);
} }
FreeAllPortals(tree->headnode); FreeTreePortals_r(tree->headnode);
PruneNodes(tree->headnode); PruneNodes(tree->headnode);

View File

@ -157,7 +157,7 @@ std::list<face_t *> SubdivideFace(face_t *f)
static void FreeNode(node_t *node) static void FreeNode(node_t *node)
{ {
FreeAllPortals(node); FreeTreePortals_r(node);
for (face_t *f : node->facelist) { for (face_t *f : node->facelist) {
delete f; delete f;
} }