Ticket #1075: 0001-Correct-colour-attributes-on-writing-out-rebalanced-.patch

File 0001-Correct-colour-attributes-on-writing-out-rebalanced-.patch, 1.3 KB (added by noz, 9 years ago)

[PATCH] Correct colour attributes on writing out rebalanced monster.txt

  • src/init1.c

    From 66c457670f19889fce5835ffb43368009ff5bbaa Mon Sep 17 00:00:00 2001
    From: Peter Denison <angband@marshadder.org>
    Date: Sat, 26 Jun 2010 23:24:48 +0100
    Subject: [PATCH] Correct colour attributes on writing out rebalanced monster.txt
    
    
    Signed-off-by: Peter Denison <angband@marshadder.org>
    ---
     src/init1.c |   23 +----------------------
     1 files changed, 1 insertions(+), 22 deletions(-)
    
    diff --git a/src/init1.c b/src/init1.c
    index 9fc8252..dbf8254 100644
    a b static errr emit_desc(ang_file *fp, cptr intro_text, cptr text) 
    43874387        return (0); 
    43884388} 
    43894389 
    4390  
    4391 static char color_attr_to_char[] = 
    4392 { 
    4393                 'd', 
    4394                 'w', 
    4395                 's', 
    4396                 'o', 
    4397                 'r', 
    4398                 'g', 
    4399                 'b', 
    4400                 'u', 
    4401                 'D', 
    4402                 'W', 
    4403                 'v', 
    4404                 'y', 
    4405                 'R', 
    4406                 'G', 
    4407                 'B', 
    4408                 'U' 
    4409 }; 
    4410  
    44114390/* 
    44124391 * Emit the "r_info" array into an ascii "template" file 
    44134392 */ 
    errr emit_r_info_index(ang_file *fp, header *head, int i) 
    44234402        file_putf(fp, "N:%d:%s\n", i,head->name_ptr + r_ptr->name); 
    44244403 
    44254404        /* Output 'G' for "Graphics" (one line only) */ 
    4426         file_putf(fp, "G:%c:%c\n",r_ptr->d_char,color_attr_to_char[r_ptr->d_attr]); 
     4405        file_putf(fp, "G:%c:%c\n",r_ptr->d_char,color_table[r_ptr->d_attr].index_char); 
    44274406 
    44284407        /* Output 'I' for "Info" (one line only) */ 
    44294408        file_putf(fp, "I:%d:%d:%d:%d:%d\n",r_ptr->speed,r_ptr->avg_hp,r_ptr->aaf,r_ptr->ac,r_ptr->sleep);