diff -w -c -x *.o -x *.exe -x *.bin test\src/cmd5.c mods\src/cmd5.c *** test\src/cmd5.c Sun Apr 14 17:09:42 1996 --- mods\src/cmd5.c Tue Aug 6 21:09:10 1996 *************** *** 224,229 **** --- 224,231 ---- char out_val[160]; + int attr; + /* Print column */ col = 20; *************** *** 246,251 **** --- 248,256 ---- if (s_ptr->slevel >= 99) { sprintf(out_val, " %c) %-30s", I2A(i), "(illegible)"); + if (color_spells) + c_prt(TERM_SLATE, out_val, 2 + i, col); + else prt(out_val, 2 + i, col); continue; } *************** *** 258,287 **** --- 263,311 ---- /* Use that info */ comment = info; + /* Default color */ + attr = TERM_WHITE; + /* Analyze the spell */ if ((j < 32) ? ((spell_forgotten1 & (1L << j))) : ((spell_forgotten2 & (1L << (j - 32))))) { comment = " forgotten"; + attr = TERM_YELLOW; } else if (!((j < 32) ? (spell_learned1 & (1L << j)) : (spell_learned2 & (1L << (j - 32))))) { comment = " unknown"; + if (s_ptr->slevel > p_ptr->lev) + attr = TERM_SLATE; + else + attr = TERM_L_WHITE; } else if (!((j < 32) ? (spell_worked1 & (1L << j)) : (spell_worked2 & (1L << (j - 32))))) { comment = " untried"; + if (s_ptr->smana > p_ptr->csp) + attr = TERM_VIOLET; + else + attr = TERM_BLUE; + } + else if (s_ptr->smana > p_ptr->csp) + { + attr = TERM_RED; } /* Dump the spell --(-- */ sprintf(out_val, " %c) %-30s%2d %4d %3d%%%s", I2A(i), spell_names[mp_ptr->spell_type][j], s_ptr->slevel, s_ptr->smana, spell_chance(j), comment); + if (color_spells) + c_prt(attr, out_val, 2 + i, col); + else prt(out_val, 2 + i, col); } Only in mods\src: externs.h~ diff -w -c -x *.o -x *.exe -x *.bin test\src/object1.c mods\src/object1.c *** test\src/object1.c Sat Apr 13 08:32:06 1996 --- mods\src/object1.c Wed Aug 7 17:10:20 1996 *************** *** 2683,2689 **** n = strlen(i_name); /* Get a color */ ! if (use_color) attr = tval_to_attr[i_ptr->tval % 128]; /* Display the entry itself */ Term_putstr(3, i, n, attr, i_name); --- 2683,2695 ---- n = strlen(i_name); /* Get a color */ ! if (use_color) ! { ! if (true_object_color) ! attr = object_attr(i_ptr); ! else ! attr = tval_to_attr[i_ptr->tval % 128]; ! } /* Display the entry itself */ Term_putstr(3, i, n, attr, i_name); *************** *** 2749,2755 **** n = strlen(i_name); /* Get the color */ ! if (use_color) attr = tval_to_attr[i_ptr->tval % 128]; /* Display the entry itself */ Term_putstr(3, i - INVEN_WIELD, n, attr, i_name); --- 2755,2767 ---- n = strlen(i_name); /* Get the color */ ! if (use_color) ! { ! if (true_object_color) ! attr = object_attr(i_ptr); ! else ! attr = tval_to_attr[i_ptr->tval % 128]; ! } /* Display the entry itself */ Term_putstr(3, i - INVEN_WIELD, n, attr, i_name); *************** *** 2842,2848 **** --- 2854,2866 ---- /* Save the object index, color, and description */ out_index[k] = i; + if (use_color) + { + if (true_object_color) + out_color[k] = object_attr(i_ptr); + else out_color[k] = tval_to_attr[i_ptr->tval % 128]; + } (void)strcpy(out_desc[k], i_name); /* Find the predicted "line length" */ *************** *** 2950,2956 **** --- 2968,2980 ---- /* Save the color */ out_index[k] = i; + if (use_color) + { + if (true_object_color) + out_color[k] = object_attr(i_ptr); + else out_color[k] = tval_to_attr[i_ptr->tval % 128]; + } (void)strcpy(out_desc[k], i_name); /* Extract the maximal length (see below) */ Only in mods\src: object1.c~ diff -w -c -x *.o -x *.exe -x *.bin test\src/store.c mods\src/store.c *** test\src/store.c Sat Apr 13 08:34:08 1996 --- mods\src/store.c Wed Aug 7 17:10:22 1996 *************** *** 1291,1296 **** --- 1291,1299 ---- /* Describe the object (fully) */ object_desc_store(i_name, i_ptr, TRUE, 3); i_name[maxwid] = '\0'; + if (true_object_color) + c_put_str(object_attr(i_ptr), i_name, i+6, 3); + else c_put_str(tval_to_attr[i_ptr->tval], i_name, i+6, 3); /* Show weights, if turned on -DRS- */ Only in mods\src: store.c~ diff -w -c -x *.o -x *.exe -x *.bin test\src/tables.c mods\src/tables.c *** test\src/tables.c Sat Apr 13 08:34:28 1996 --- mods\src/tables.c Wed Aug 7 17:10:24 1996 *************** *** 2565,2570 **** --- 2565,2575 ---- { &shuffle_owners, FALSE, 3, 3, 17, "shuffle_owners", "Shuffle store owners" }, + { &true_object_color, FALSE, 3, 4, 8, + "true_object_color", "Use true object color in inventory" }, + + { &color_spells, FALSE, 3, 4, 9, + "color_spells", "Color spell choices" }, /*** Game-Play ***/ Only in mods\src: tables.c~ diff -w -c -x *.o -x *.exe -x *.bin test\src/util.c mods\src/util.c *** test\src/util.c Mon Apr 22 16:40:06 1996 --- mods\src/util.c Tue Aug 6 20:51:58 1996 *************** *** 2476,2481 **** --- 2476,2492 ---- Term_addstr(-1, TERM_WHITE, str); } + /* + * Print a string to the screen in color, clearing to end of line + */ + void c_prt(byte attr, cptr str, int row, int col) + { + /* Clear the line, position the cursor */ + Term_erase(col, row, 80, 1); + + /* Dump the text (in White) */ + Term_addstr(-1, attr, str); + } Only in mods\src: variable.c~