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

Function SelectObject

editor/ObjectDialog.cpp:779–802  ·  view source on GitHub ↗

Set the current object

Source from the content-addressed store, hash-verified

777
778// Set the current object
779void 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
804void CObjectDialog::OnObjpadNextobj() {
805 int next;

Callers 12

ddgr_gdi_surf_FlipVideoFunction · 0.85
ddgr_gdi_surf_ClearFunction · 0.85
ddgr_gdi_surf_BltFunction · 0.85
OnBtnSpeedDetectMethod · 0.85
OnLButtonDownMethod · 0.85
OnRButtonDownMethod · 0.85
OnObjpadNextobjMethod · 0.85
MyConProcFunction · 0.85
con_CreateFunction · 0.85
con_PaintFunction · 0.85
con_CharFunction · 0.85

Calls 1

EditorStatusFunction · 0.85

Tested by

no test coverage detected