| 414 | } |
| 415 | |
| 416 | void 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 |
nothing calls this directly
no test coverage detected