Changeset 1457 for trunk

Show
Ignore:
Timestamp:
07/02/09 21:27:54 (14 months ago)
Author:
takkaria
Message:

Separate squelch birth init stuff into squelch.c. (Eddie Grove)

Location:
trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/birth.c

    r1433 r1457  
    12091209        } 
    12101210 
    1211         /* Reset squelch bits */ 
    1212         for (i = 0; i < z_info->k_max; i++) 
    1213                 k_info[i].squelch = FALSE; 
    1214  
    1215         /* Clear the squelch bytes */ 
    1216         for (i = 0; i < SQUELCH_BYTES; i++) 
    1217                 squelch_level[i] = 0; 
     1211        squelch_birth_init(); 
    12181212 
    12191213        /* Clear old messages, add new starting message */ 
  • trunk/src/externs.h

    r1436 r1457  
    546546 
    547547/* squelch.c */ 
     548void squelch_birth_init(void); 
    548549int get_autoinscription_index(s16b k_idx); 
    549550const char *get_autoinscription(s16b kind_idx); 
  • trunk/src/squelch.c

    r1410 r1457  
    107107 
    108108 
     109/* 
     110 * Reset the player's squelch choices for a new game. 
     111 */ 
     112void squelch_birth_init(void) 
     113{ 
     114        int i; 
     115 
     116        /* Reset squelch bits */ 
     117        for (i = 0; i < z_info->k_max; i++) 
     118                k_info[i].squelch = FALSE; 
     119 
     120        /* Clear the squelch bytes */ 
     121        for (i = 0; i < SQUELCH_BYTES; i++) 
     122                squelch_level[i] = 0; 
     123} 
     124 
     125 
     126 
    109127/* Structure to describe tval/description pairings. */ 
    110128typedef struct