X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fbitmap.c;h=7f9df1f0f836a65cd6454b05a4407e677ea9d755;hb=8e974b9ed72a1521714ea3cf96a9b87c68db8025;hp=d43411699873b2fca5119cc26a7752b2466813fa;hpb=d4693f35f3fb3bec10b9e89860444420c1eb854b;p=16.git diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index d4341169..7f9df1f0 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -25,11 +25,31 @@ #include #include "src/lib/bitmap.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; + static void loadPcxStage1(FILE *file, bitmap_t *result) { - long bufSize; - int index; - byte count, val; - long int pos; + //long bufSize; + //int index; + //byte count, val; + //long int pos; /* read the header */ fread(&head, sizeof(char), sizeof(struct pcxHeader), file); @@ -126,7 +146,7 @@ bitmapLoadPcx(char *filename) { result.data[index] = val; } } while(index < bufSize); - printf("index=%d\n", index); + //printf("index=%d\n", index); loadPcxPalette(file, &result);