| 501 | #define NULL_NAME "<none>" |
| 502 | |
| 503 | void CRoomKeypadDialog::UpdateDialog() { |
| 504 | int i; |
| 505 | |
| 506 | // Show the number of verts, faces, & portals in the current room |
| 507 | PrintToDlgItem(this, IDC_ROOM_NAME, "Name:\t%s", Curroomp->name ? Curroomp->name : "<none>"); |
| 508 | PrintToDlgItem(this, IDC_VERTEX_COUNT, "Vertices:\t%d", Curroomp->num_verts); |
| 509 | PrintToDlgItem(this, IDC_FACE_COUNT, "Faces:\t%d", Curroomp->num_faces); |
| 510 | PrintToDlgItem(this, IDC_PORTAL_COUNT, "Portals:\t%d", Curroomp->num_portals); |
| 511 | |
| 512 | // Show flags |
| 513 | ((CButton *)GetDlgItem(IDC_EXTERNAL_ROOM))->SetCheck(Curroomp->flags & RF_EXTERNAL); |
| 514 | ((CButton *)GetDlgItem(IDC_ROOM_SKIP_LIGHTING))->SetCheck((Curroomp->flags & RF_NO_LIGHT) ? 1 : 0); |
| 515 | ((CButton *)GetDlgItem(IDC_ROOMPAD_REFUELING_CENTER))->SetCheck(Curroomp->flags & RF_FUELCEN); |
| 516 | ((CButton *)GetDlgItem(IDC_ROOMPAD_GOAL1))->SetCheck(Curroomp->flags & RF_GOAL1); |
| 517 | ((CButton *)GetDlgItem(IDC_ROOMPAD_GOAL2))->SetCheck(Curroomp->flags & RF_GOAL2); |
| 518 | ((CButton *)GetDlgItem(IDC_ROOMPAD_GOAL3))->SetCheck(Curroomp->flags & RF_GOAL3); |
| 519 | ((CButton *)GetDlgItem(IDC_ROOMPAD_GOAL4))->SetCheck(Curroomp->flags & RF_GOAL4); |
| 520 | ((CButton *)GetDlgItem(IDC_SPECIAL_1))->SetCheck(Curroomp->flags & RF_SPECIAL1); |
| 521 | ((CButton *)GetDlgItem(IDC_SPECIAL_2))->SetCheck(Curroomp->flags & RF_SPECIAL2); |
| 522 | ((CButton *)GetDlgItem(IDC_SPECIAL_3))->SetCheck(Curroomp->flags & RF_SPECIAL3); |
| 523 | ((CButton *)GetDlgItem(IDC_SPECIAL_4))->SetCheck(Curroomp->flags & RF_SPECIAL4); |
| 524 | ((CButton *)GetDlgItem(IDC_SPECIAL_5))->SetCheck(Curroomp->flags & RF_SPECIAL5); |
| 525 | ((CButton *)GetDlgItem(IDC_SPECIAL_6))->SetCheck(Curroomp->flags & RF_SPECIAL6); |
| 526 | ((CButton *)GetDlgItem(IDC_TRIANGULATE))->SetCheck(Curroomp->flags & RF_TRIANGULATE); |
| 527 | ((CButton *)GetDlgItem(IDC_TOUCHES_OUTSIDE))->SetCheck(Curroomp->flags & RF_TOUCHES_TERRAIN); |
| 528 | |
| 529 | if (Curroomp->flags & RF_SECRET) |
| 530 | ((CButton *)GetDlgItem(IDC_SECRET_CHECK))->SetCheck(1); |
| 531 | else |
| 532 | ((CButton *)GetDlgItem(IDC_SECRET_CHECK))->SetCheck(0); |
| 533 | |
| 534 | // Show flags |
| 535 | ((CButton *)GetDlgItem(IDC_EXTERNAL_ROOM))->SetCheck(Curroomp->flags & RF_EXTERNAL); |
| 536 | ((CButton *)GetDlgItem(IDC_ROOMPAD_NO_DRAW_TERRAIN))->SetCheck(Render_inside_only); |
| 537 | ((CButton *)GetDlgItem(IDC_ROOMPAD_ONE_ROOM_ONLY))->SetCheck(Render_one_room_only); |
| 538 | ((CButton *)GetDlgItem(IDC_ROOM_SKIP_LIGHTING))->SetCheck((Curroomp->flags & RF_NO_LIGHT) ? 1 : 0); |
| 539 | |
| 540 | // set forcefield check |
| 541 | //@@((CButton *) GetDlgItem(IDC_FORCEFIELD_CHECK))->SetCheck(Curroomp->faces[Curface].flags & FF_FORCEFIELD); |
| 542 | ((CButton *)GetDlgItem(IDC_GOALFACE_CHECK))->SetCheck(Curroomp->faces[Curface].flags & FF_GOALFACE); |
| 543 | PrintToDlgItem(this, IDC_CURRENT_FACE, "Current face: %d", Curface); |
| 544 | |
| 545 | // Enable/disable the next portal button |
| 546 | ((CButton *)GetDlgItem(IDC_ROOMPAD_NEXT_PORTAL)) |
| 547 | ->EnableWindow(((Curportal == -1) && (Curroomp->num_portals > 0)) || (Curroomp->num_portals > 1)); |
| 548 | |
| 549 | // Enable/disable the portal items |
| 550 | ((CButton *)GetDlgItem(IDC_CURRENT_PORTAL))->EnableWindow(Curportal != -1); |
| 551 | ((CButton *)GetDlgItem(IDC_RENDER_PORTAL_FACES))->EnableWindow(Curportal != -1); |
| 552 | ((CButton *)GetDlgItem(IDC_PORTAL_BLOCKED_CHECK))->EnableWindow(Curportal != -1); |
| 553 | ((CButton *)GetDlgItem(IDC_PORTAL_BLOCKED_CAN_GO_AWAY_CHECK))->EnableWindow(Curportal != -1); |
| 554 | |
| 555 | // Set shell render checkboxes |
| 556 | ((CButton *)GetDlgItem(IDC_RENDER_SHELL))->SetCheck(!(Shell_render_flag & SRF_NO_SHELL)); |
| 557 | ((CButton *)GetDlgItem(IDC_RENDER_NON_SHELL))->SetCheck(!(Shell_render_flag & SRF_NO_NON_SHELL)); |
| 558 | |
| 559 | // Update the portal number & checkboxes |
| 560 | if (Curportal != -1) { |
nothing calls this directly
no test coverage detected