| 1071 | // the Unix bmtoa command, and it can be converted into a bitmap with atobm. |
| 1072 | |
| 1073 | void WriteAscii(FILE *file) |
| 1074 | { |
| 1075 | int x, y, i; |
| 1076 | |
| 1077 | for (y = 0; y < gs.yWin; y++) { |
| 1078 | for (x = 0; x < gs.xWin; x++) { |
| 1079 | i = BmGetXY(x, y); |
| 1080 | if (gs.fColor) |
| 1081 | putc(ChHex(i), file); |
| 1082 | else |
| 1083 | putc(i ? '-' : '#', file); |
| 1084 | } |
| 1085 | putc('\n', file); |
| 1086 | } |
| 1087 | } |
| 1088 | |
| 1089 | |
| 1090 | // Write the bitmap array to a previously opened file in the bitmap format |