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

Function DeleteAllFacesWithTexture1

editor/MainFrm.cpp:2480–2500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2478 World_changed = 1;
2479}
2480
2481void DeleteAllFacesWithTexture1(room *rp) {
2482 int count = 0;
2483
2484 if (OutrageMessageBox(MBOX_YESNO, "Are you sure you want to delete all faces in room %d that have texture 1?",
2485 ROOMNUM(rp)) != IDYES)
2486 return;
2487
2488 for (int i = 0; i < rp->num_faces; i++) {
2489 if ((rp->faces[i].tmap == 1) && (rp->faces[i].portal_num == -1)) {
2490 DeleteRoomFace(rp, i);
2491 i--;
2492 count++;
2493 }
2494 }
2495
2496 OutrageMessageBox("%d faces deleted from room %d.", count, ROOMNUM(rp));
2497
2498 Curface = Curedge = Curvert = 0;
2499
2500 World_changed = 1;
2501}
2502
2503// Put test code here. Feel free to delete any old code.

Callers

nothing calls this directly

Calls 2

OutrageMessageBoxFunction · 0.85
DeleteRoomFaceFunction · 0.85

Tested by

no test coverage detected