| 149 | #undef FORMAT_STRING |
| 150 | |
| 151 | static boolean |
| 152 | write_text_colormap(FILE *txtfile) |
| 153 | { |
| 154 | int i; |
| 155 | char c; |
| 156 | |
| 157 | num_colors = colorsinmainmap; |
| 158 | if (num_colors > 62) { |
| 159 | Fprintf(stderr, "too many colors (%d)\n", num_colors); |
| 160 | return FALSE; |
| 161 | } |
| 162 | for (i = 0; i < num_colors; i++) { |
| 163 | if (i < 26) |
| 164 | c = 'A' + i; |
| 165 | else if (i < 52) |
| 166 | c = 'a' + i - 26; |
| 167 | else |
| 168 | c = '0' + i - 52; |
| 169 | |
| 170 | charcolors[i] = c; |
| 171 | Fprintf( |
| 172 | txtfile, "%c = (%d, %d, %d)\n", c, (int) MainColorMap[CM_RED][i], |
| 173 | (int) MainColorMap[CM_GREEN][i], (int) MainColorMap[CM_BLUE][i]); |
| 174 | } |
| 175 | return TRUE; |
| 176 | } |
| 177 | |
| 178 | /* read one tile from win/share/{monsters,objects,other}.txt */ |
| 179 | static boolean |