X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fbitmap.c;h=7f9df1f0f836a65cd6454b05a4407e677ea9d755;hb=8e974b9ed72a1521714ea3cf96a9b87c68db8025;hp=b7ba5d1486c9b9dd476ce84b72bcbc0b7ae554cc;hpb=b4b0b1050a3f3d2e2d9f71a42520bb84bff86a43;p=16.git diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index b7ba5d14..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. * @@ -24,7 +24,6 @@ #include #include #include "src/lib/bitmap.h" -#include "src/lib/modex16.h" static struct pcxHeader { byte id; @@ -46,12 +45,11 @@ static struct pcxHeader { 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); @@ -148,6 +146,7 @@ bitmapLoadPcx(char *filename) { result.data[index] = val; } } while(index < bufSize); + //printf("index=%d\n", index); loadPcxPalette(file, &result); @@ -182,7 +181,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; }