]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/bitmap.c
scroll.exe works again but the fps thingy dose not work because of MM zcroll breaks...
[16.git] / src / lib / bitmap.c
index ae750383b6ce54716648e47c27a4d763ce2c4f2a..7f9df1f0f836a65cd6454b05a4407e677ea9d755 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 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -25,8 +25,6 @@
 #include <malloc.h>\r
 #include "src/lib/bitmap.h"\r
 \r
-#ifndef PCXHEADER_H\r
-#define PCXHEADER_H\r
 static struct pcxHeader {\r
        byte id;\r
        byte version;\r
@@ -46,13 +44,12 @@ static struct pcxHeader {
        word vScreenSize;\r
        byte padding[54];\r
 } head;\r
-#endif /*PCXHEADER_H*/\r
 \r
 static void loadPcxStage1(FILE *file, bitmap_t *result) {\r
-       long bufSize;\r
-       int index;\r
-       byte count, val;\r
-       long int pos;\r
+       //long bufSize;\r
+       //int index;\r
+       //byte count, val;\r
+       //long int pos;\r
 \r
        /* read the header */\r
        fread(&head, sizeof(char), sizeof(struct pcxHeader), file);\r
@@ -149,6 +146,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
@@ -183,7 +181,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