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

Method OnClear

editor/ObjectListDialog.cpp:416–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416void CObjectListDialog::OnClear() {
417 // delete all items.
418 int i;
419
420 if (OutrageMessageBox(MBOX_YESNO, "Will delete ALL objects except doors. Are you sure?") != IDYES)
421 return;
422
423 for (i = 0; i <= Highest_object_index; i++) {
424 if (&Objects[i] == Player_object) {
425 continue;
426 }
427 if (&Objects[i] == Viewer_object) {
428 continue;
429 }
430 if (Objects[i].type == OBJ_DOOR) {
431 continue;
432 }
433 if (Objects[i].type != OBJ_NONE)
434 ObjDelete(i);
435 }
436 World_changed = 1;
437 Cur_object_index = -1;
438
439 Refresh();
440}
441
442/////////////////////////////////////////////////////////////////////////////
443// CObjectListDialog dialog

Callers

nothing calls this directly

Calls 2

OutrageMessageBoxFunction · 0.85
ObjDeleteFunction · 0.85

Tested by

no test coverage detected