]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/bitmap.c
updated copyright www
[16.git] / src / lib / bitmap.c
index b7ba5d1486c9b9dd476ce84b72bcbc0b7ae554cc..433217337db99d0ef0856bcb80037e54873a62e8 100755 (executable)
@@ -1,5 +1,5 @@
 /* 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
-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
-\r
 \r
 static void loadPcxStage1(FILE *file, bitmap_t *result) {\r
        long bufSize;\r
@@ -148,6 +126,7 @@ bitmapLoadPcx(char *filename) {
                result.data[index] = val;\r
        }\r
        } while(index < bufSize);\r
+       printf("index=%d\n", index);\r
 \r
        loadPcxPalette(file, &result);\r
 \r
@@ -182,7 +161,7 @@ bitmapLoadPcxTiles(char *filename, word twidth, word theight) {
 \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