X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fbitmap.c;h=d43411699873b2fca5119cc26a7752b2466813fa;hb=515acf3e0e40fd4130a776c39e80f23548fa2319;hp=ae750383b6ce54716648e47c27a4d763ce2c4f2a;hpb=f084f970ed1e8f06dfffd67bd924918a18a9ce50;p=16.git diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index ae750383..d4341169 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -25,29 +25,6 @@ #include #include "src/lib/bitmap.h" -#ifndef PCXHEADER_H -#define PCXHEADER_H -static struct pcxHeader { - byte id; - byte version; - byte encoding; - byte bpp; - word xmin; - word ymin; - word xmax; - word ymax; - word hres; - word vres; - byte pal16[48]; - byte res1; - word bpplane; - word palType; - word hScreenSize; - word vScreenSize; - byte padding[54]; -} head; -#endif /*PCXHEADER_H*/ - static void loadPcxStage1(FILE *file, bitmap_t *result) { long bufSize; int index; @@ -149,6 +126,7 @@ bitmapLoadPcx(char *filename) { result.data[index] = val; } } while(index < bufSize); + printf("index=%d\n", index); loadPcxPalette(file, &result); @@ -183,7 +161,7 @@ bitmapLoadPcxTiles(char *filename, word twidth, word theight) { /* allocate the pixel storage for the tiles */ ts.data = malloc(sizeof(byte*) * ts.ntiles); - ts.data[0] = malloc(sizeof(byte) * ts.ntiles * twidth * theight); + //ts.data[0] = malloc(sizeof(byte) * ts.ntiles * twidth * theight); for(i=1; i < ts.ntiles; i++) { ts.data[i] = ts.data[i-1] + twidth * theight; }