(svn r2512) Small cleanup

This commit is contained in:
tron
2005-07-03 10:22:20 +00:00
parent ae032390e2
commit 6c5df28d7c
2 changed files with 59 additions and 85 deletions

View File

@@ -330,14 +330,15 @@ static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *user
// write them to pcx
for (i = 0; i != n; i++) {
int runcount = 1;
byte *bufp = buff + i * w;
byte runchar = *bufp++;
uint left;
const byte* bufp = buff + i * w;
byte runchar = bufp[0];
uint runcount = 1;
uint j;
// for each pixel...
for (left = w - 1; left > 0; --left) {
byte ch = *bufp++;
for (j = 1; j < w; j++) {
byte ch = bufp[j];
if (ch != runchar || runcount >= 0x3f) {
if (runcount > 1 || (runchar & 0xC0) == 0xC0)
if (fputc(0xC0 | runcount, f) == EOF) {