/* Project 16 Source Code~\r
- * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
*\r
* This file is part of Project 16.\r
*\r
#include <stdlib.h>\r
#include <malloc.h>\r
#include "src/lib/bitmap.h"\r
-#include "src/lib/modex16.h"\r
-\r
-#ifndef PCXHEADER_H\r
-#define PCXHEADER_H\r
-static struct pcxHeader {\r
- byte id;\r
- byte version;\r
- byte encoding;\r
- byte bpp;\r
- word xmin;\r
- word ymin;\r
- word xmax;\r
- word ymax;\r
- word hres;\r
- word vres;\r
- byte pal16[48];\r
- byte res1;\r
- word bpplane;\r
- word palType;\r
- word hScreenSize;\r
- word vScreenSize;\r
- byte padding[54];\r
-} head;\r
-#endif /*PCXHEADER_H*/\r
-\r
\r
static void loadPcxStage1(FILE *file, bitmap_t *result) {\r
long bufSize;\r
result.data[index] = val;\r
}\r
} while(index < bufSize);\r
+ printf("index=%d\n", index);\r
\r
loadPcxPalette(file, &result);\r
\r
\r
/* allocate the pixel storage for the tiles */\r
ts.data = malloc(sizeof(byte*) * ts.ntiles);\r
- ts.data[0] = malloc(sizeof(byte) * ts.ntiles * twidth * theight);\r
+ //ts.data[0] = malloc(sizeof(byte) * ts.ntiles * twidth * theight);\r
for(i=1; i < ts.ntiles; i++) {\r
ts.data[i] = ts.data[i-1] + twidth * theight;\r
}\r