| 739 | } |
| 740 | |
| 741 | void CObjectDialog::OnSelchangeComboObjID() { |
| 742 | CComboBox *box = (CComboBox *)GetDlgItem(IDC_COMBO_OBJID); |
| 743 | |
| 744 | switch (D3EditState.current_obj_type) { |
| 745 | case OBJ_ROBOT: |
| 746 | case OBJ_POWERUP: |
| 747 | case OBJ_BUILDING: |
| 748 | case OBJ_CLUTTER: { |
| 749 | int id = box->GetItemData(box->GetCurSel()); |
| 750 | ASSERT(Object_info[id].type == D3EditState.current_obj_type); |
| 751 | SetCurrentIndex(id); |
| 752 | break; |
| 753 | } |
| 754 | |
| 755 | case OBJ_PLAYER: { |
| 756 | char text[32]; |
| 757 | int i, j; |
| 758 | box->GetLBText(box->GetCurSel(), text); |
| 759 | j = 0; |
| 760 | for (i = 0; i < MAX_SHIPS; i++) |
| 761 | if (Ships[i].used && (stricmp(text, Ships[i].name) == 0)) { |
| 762 | j++; |
| 763 | break; |
| 764 | } |
| 765 | |
| 766 | ASSERT(i < MAX_SHIPS); |
| 767 | SetCurrentIndex(i); |
| 768 | break; |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | // Draw picture of current item |
| 773 | DrawPicture(GetDlgItem(IDC_OBJ_PALETTE)); |
| 774 | } |
| 775 | |
| 776 | void CObjectDialog::OnObjPadDelobj() { HObjectDelete(); } |
| 777 |
nothing calls this directly
no test coverage detected