Set the current object
| 777 | |
| 778 | // Set the current object |
| 779 | void SelectObject(int objnum) { |
| 780 | char *type_name, *obj_name; |
| 781 | char *id_name = NULL; |
| 782 | |
| 783 | ASSERT(objnum != -1); |
| 784 | |
| 785 | Cur_object_index = objnum; |
| 786 | |
| 787 | object *objp = &Objects[objnum]; |
| 788 | type_name = Object_type_names[objp->type]; |
| 789 | obj_name = objp->name ? objp->name : "<none>"; |
| 790 | |
| 791 | if (IS_GENERIC(objp->type)) |
| 792 | id_name = Object_info[objp->id].name; |
| 793 | else if (objp->type == OBJ_DOOR) |
| 794 | id_name = Doors[objp->id].name; |
| 795 | |
| 796 | if (id_name) |
| 797 | EditorStatus("Object %d selected. Type = %s:%s, Name = %s", objnum, type_name, id_name, obj_name); |
| 798 | else |
| 799 | EditorStatus("Object %d selected. Type = %s, Name = %s", objnum, type_name, obj_name); |
| 800 | |
| 801 | State_changed = 1; |
| 802 | } |
| 803 | |
| 804 | void CObjectDialog::OnObjpadNextobj() { |
| 805 | int next; |
no test coverage detected