Changeset 968
- Timestamp:
- 06/28/08 06:52:33 (7 months ago)
- Files:
-
- trunk/src/files.c (modified) (2 diffs)
- trunk/src/obj-info.c (modified) (6 diffs)
- trunk/src/object.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/files.c
r966 r968 1971 1971 1972 1972 file_putf(fp, "%c) %s\n", index_to_label(i), o_name); 1973 if (inventory[i].k_idx && object_info_known(&inventory[i]))1974 file_putf(fp, "\n");1973 if (inventory[i].k_idx) 1974 object_info_chardump(&inventory[i]); 1975 1975 } 1976 1976 file_putf(fp, "\n\n"); … … 1986 1986 1987 1987 file_putf(fp, "%c) %s\n", index_to_label(i), o_name); 1988 object_info_ known(&inventory[i]);1988 object_info_chardump(&inventory[i]); 1989 1989 } 1990 1990 file_putf(fp, "\n\n"); trunk/src/obj-info.c
r945 r968 451 451 * Describe things that look like lights. 452 452 */ 453 static bool describe_light(const object_type *o_ptr, u32b f3 )453 static bool describe_light(const object_type *o_ptr, u32b f3, bool terse) 454 454 { 455 455 int rad = 0; … … 478 478 text_out("."); 479 479 480 if ( is_lite && !artifact)480 if (!terse && is_lite && !artifact) 481 481 { 482 482 const char *name = (o_ptr->sval == SV_LITE_TORCH) ? "torch" : "lantern"; … … 496 496 * Describe an object's activation, if any. 497 497 */ 498 static bool describe_activation(const object_type *o_ptr, u32b f3, bool full )498 static bool describe_activation(const object_type *o_ptr, u32b f3, bool full, bool all) 499 499 { 500 500 const object_kind *k_ptr = &k_info[o_ptr->k_idx]; … … 530 530 if (!desc) return FALSE; 531 531 532 if (all == FALSE && !(f3 & TR3_ACTIVATE)) return FALSE; 533 532 534 text_out("When "); 535 text_out(" (all = %d, %d) ", all, (f3 & TR3_ACTIVATE) ? 1 : 0); 533 536 534 537 if (f3 & TR3_ACTIVATE) … … 615 618 if (something) text_out("\n"); 616 619 617 if (describe_activation(o_ptr, f3, full )) something = TRUE;618 if (describe_light(o_ptr, f3 )) something = TRUE;620 if (describe_activation(o_ptr, f3, full, TRUE)) something = TRUE; 621 if (describe_light(o_ptr, f3, FALSE)) something = TRUE; 619 622 620 623 return something; … … 727 730 728 731 732 bool object_info_chardump(const object_type *o_ptr) 733 { 734 u32b f1, f2, f3; 735 bool something = FALSE; 736 737 /* Grab the object flags */ 738 object_flags_known(o_ptr, &f1, &f2, &f3); 739 740 741 if (cursed_p(o_ptr)) 742 { 743 if (f3 & TR3_PERMA_CURSE) 744 text_out_c(TERM_L_RED, "Permanently cursed.\n"); 745 else if (f3 & TR3_HEAVY_CURSE) 746 text_out_c(TERM_L_RED, "Heavily cursed.\n"); 747 else if (object_known_p(o_ptr)) 748 text_out_c(TERM_L_RED, "Cursed.\n"); 749 } 750 751 if (describe_stats(f1, o_ptr->pval)) something = TRUE; 752 if (describe_immune(f2)) something = TRUE; 753 if (describe_ignores(f3)) something = TRUE; 754 if (describe_sustains(f2)) something = TRUE; 755 if (describe_misc_magic(f3)) something = TRUE; 756 757 if (describe_activation(o_ptr, f3, FALSE, FALSE)) something = TRUE; 758 if (describe_light(o_ptr, f3, TRUE)) something = TRUE; 759 760 /* Describe combat bits */ 761 if (describe_combat(o_ptr, FALSE)) something = TRUE; 762 763 return something; 764 } 765 729 766 bool object_info_known(const object_type *o_ptr) 730 767 { trunk/src/object.h
r949 r968 57 57 void object_info_header(const object_type *o_ptr); 58 58 bool object_info_known(const object_type *o_ptr); 59 bool object_info_chardump(const object_type *o_ptr); 59 60 bool object_info_full(const object_type *o_ptr); 60 61 bool object_info_store(const object_type *o_ptr);
