MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / ForgetLevelData

Function ForgetLevelData

roomedit/source/load.cpp:515–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513*/
514
515void ForgetLevelData() /* SWAP! */
516{
517 /* forget the Things */
518 NumThings = 0;
519 if (Things)
520 FreeMemory (Things);
521 Things = NULL;
522
523 /* forget the Vertices */
524 NumVertexes = 0;
525 if (Vertexes)
526 FreeMemory (Vertexes);
527 Vertexes = NULL;
528
529 /* forget the LineDefs */
530 NumLineDefs = 0;
531 if (LineDefs)
532 FreeMemory (LineDefs);
533 LineDefs = NULL;
534
535 /* forget the SideDefs */
536 NumSideDefs = 0;
537 if (SideDefs)
538 FreeMemory (SideDefs);
539 SideDefs = NULL;
540
541 /* forget the Sectors */
542 NumSectors = 0;
543 if (Sectors)
544 FreeMemory (Sectors);
545 Sectors = NULL;
546
547 // Don't do this
548 //BUG: If we create a new level, ForgetLevelData is called, but
549 // we want the Level var. still to point to the level entry in the
550 // Master directory.
551 // Thanks to ??? for signaling the bug.
552 // Level = NULL;
553}
554
555/***************************************************************************/
556/*

Callers 3

CleanupWindeuFunction · 0.85
TEditorClientMethod · 0.85
~TEditorClientMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected