Changeset 139 for libcaca/trunk/libee/sprite.c
- Timestamp:
- Nov 10, 2003, 10:17:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/libee/sprite.c
r135 r139 89 89 for(y = 0; y < h; y++) 90 90 { 91 memset(buf, ' ', w);92 buf[w] = '\0';93 91 if(!fgets(buf, BUFSIZ, fd)) 94 92 goto failed; 95 93 96 for(x = 0; x < w ; x++)94 for(x = 0; x < w && buf[x] && buf[x] != '\r' && buf[x] != '\n'; x++) 97 95 frame->chars[w * y + x] = buf[x]; 96 97 for(; x < w; x++) 98 frame->chars[w * y + x] = ' '; 98 99 } 99 100 100 101 for(y = 0; y < h; y++) 101 102 { 102 memset(buf, ' ', w);103 buf[w] = '\0';104 103 if(!fgets(buf, BUFSIZ, fd)) 105 104 goto failed; 106 105 107 for(x = 0; x < w ; x++)106 for(x = 0; x < w && buf[x] && buf[x] != '\r' && buf[x] != '\n'; x++) 108 107 frame->color[w * y + x] = buf[x] - 'a'; 108 109 for(; x < w; x++) 110 frame->color[w * y + x] = ' ' - 'a'; 109 111 } 110 112
Note: See TracChangeset
for help on using the changeset viewer.