]> 4ch.mooo.com Git - 16.git/blobdiff - 16/src/lib/bitmap.c
16_ca needs huge amounts of work and I should remember what needs to be done soon...
[16.git] / 16 / src / lib / bitmap.c
index 6e496049a283030eadd80488a46d7ff27ec67c21..caeb0111a8e3fc86252e275605d33f903463c0ad 100755 (executable)
@@ -77,7 +77,7 @@ static void loadPcxPalette(FILE *file, bitmap_t *result) {
        /* handle the palette */\r
        fseek(file, -769, SEEK_END);\r
        val = fgetc(file);\r
-       result->palette = modexNewPal();\r
+       result->palette = omodexNewPal();\r
        if(head.version == 5 && val == 12) {\r
        /* use the vga palette */\r
        for(index=0; !feof(file) && index < PAL_SIZE; index++) {\r
@@ -184,7 +184,7 @@ bitmapLoadPcxTiles(char *filename, word twidth, word theight) {
        ts.palette = result.palette;\r
 \r
        /* allocate the pixel storage for the tiles */\r
-       ts.data = _fmalloc(sizeof(byte*) * ts.ntiles);\r
+       ts.data = malloc(sizeof(byte*) * ts.ntiles);\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
@@ -197,16 +197,3 @@ bitmapLoadPcxTiles(char *filename, word twidth, word theight) {
 \r
        return ts;\r
 }\r
-\r
-byte *\r
-modexNewPal() {\r
-       byte *ptr;\r
-       ptr = malloc(PAL_SIZE);\r
-\r
-       // handle errors\r
-       if(!ptr) {\r
-               printf("Could not allocate palette.\n");\r
-       }\r
-\r
-       return ptr;\r
-}\r