MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ComputeAllRoomShells

Function ComputeAllRoomShells

editor/Erooms.cpp:3140–3163  ·  view source on GitHub ↗

Finds shells for all rooms. Returns the number of rooms with bad shells

Source from the content-addressed store, hash-verified

3138// Finds shells for all rooms.
3139// Returns the number of rooms with bad shells
3140int ComputeAllRoomShells() {
3141 int r, bad_shells = 0;
3142 room *rp;
3143
3144 error_buf_offset = 0;
3145
3146 mprintf(0, "Computing room shells...");
3147
3148 for (r = 0, rp = Rooms; r <= Highest_room_index; r++, rp++) {
3149 if (rp->used && (rp->num_portals > 0) && !(rp->flags & RF_EXTERNAL)) {
3150 int errors = ComputeRoomShell(rp);
3151 if (errors)
3152 bad_shells++;
3153 }
3154 }
3155
3156 mprintf(0, "Done\n");
3157
3158 mprintf(0, "Error buf size = %d\n", strlen(error_buf));
3159
3160 DumpTextToClipboard(error_buf);
3161
3162 return bad_shells;
3163}
3164
3165#include "objinfo.h"
3166#include "mission.h"

Callers 1

SaveLevelFunction · 0.85

Calls 2

ComputeRoomShellFunction · 0.85
DumpTextToClipboardFunction · 0.85

Tested by

no test coverage detected