X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fbitmap.c;h=7f9df1f0f836a65cd6454b05a4407e677ea9d755;hb=330b72f5c3a57ed0a17636059df12e0195a5c3cd;hp=19af31f5386846af026278b88df3d0ca94e697b6;hpb=29050ce6a22ce3d6c47183d6946e81ea25b6b5c7;p=16.git diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index 19af31f5..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,10 +24,7 @@ #include #include #include "src/lib/bitmap.h" -#include "src/lib/modex16.h" -#ifndef PCXHEADER_H -#define PCXHEADER_H static struct pcxHeader { byte id; byte version; @@ -47,14 +44,12 @@ static struct pcxHeader { word vScreenSize; byte padding[54]; } head; -#endif /*PCXHEADER_H*/ - 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); @@ -151,6 +146,7 @@ bitmapLoadPcx(char *filename) { result.data[index] = val; } } while(index < bufSize); + //printf("index=%d\n", index); loadPcxPalette(file, &result); @@ -185,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; }