/* * Show artifact lore */ static void desc_art_fake(int a_idx) { object_type *o_ptr; object_type object_type_body = { 0 }; char header[120]; textblock *tb; region area = { 0, 0, 0, 0 }; o_ptr = find_artifact(a_idx); /* If it's been lost, make a fake artifact for it */ if (!o_ptr) { o_ptr = &object_type_body; make_fake_artifact(o_ptr, a_idx); /* Check the history entry, to see if it was fully known * before it was lost */ if (history_is_artifact_known(a_idx)) { o_ptr->ident |= IDENT_KNOWN; } } /* Hack -- Handle stuff */ handle_stuff(p_ptr); tb = object_info(o_ptr, OINFO_NONE); object_desc(header, sizeof(header), o_ptr, ODESC_PREFIX | ODESC_FULL | ODESC_CAPITAL); textui_textblock_show(tb, area, format("%s", header)); textblock_free(tb); }
/* * Show artifact lore */ static void desc_art_fake(int a_idx) { object_type *o_ptr; object_type object_type_body = { 0 }; char header[120]; textblock *tb; region area = { 0, 0, 0, 0 }; o_ptr = find_artifact(&a_info[a_idx]); /* If it's been lost, make a fake artifact for it */ if (!o_ptr) { o_ptr = &object_type_body; make_fake_artifact(o_ptr, &a_info[a_idx]); o_ptr->ident |= IDENT_NAME; /* Check the history entry, to see if it was fully known before it * was lost */ if (history_is_artifact_known(o_ptr->artifact)) object_notice_everything(o_ptr); } /* Hack -- Handle stuff */ handle_stuff(p_ptr); tb = object_info(o_ptr, OINFO_NONE); object_desc(header, sizeof(header), o_ptr, ODESC_PREFIX | ODESC_FULL); textui_textblock_show(tb, area, format("%^s", header)); textblock_free(tb); #if 0 /* XXX This should be in object_info */ if (lost) text_out("\nThis artifact has been lost."); #endif }