]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/bitmap.c
==== animation fram walk ==== i polished the shit out of it and it works MUCH better...
[16.git] / src / lib / bitmap.c
index 6d7f72ed11ce81105f102799a6c2312528d8a556..e8ad461c2a22bcaef0cda0d30db469ec0040385e 100755 (executable)
@@ -105,7 +105,7 @@ bitmapLoadPcx(char *filename, global_game_variables_t *gv) {
        file = fopen(filename, "rb");\r
        if(!file) {\r
                printf("Could not open %s for reading.\n", filename);\r
-               exit(-2);\r
+               //exit(-2);\r
        }\r
 \r
        /* load the first part of the pcx file */\r
@@ -129,7 +129,7 @@ bitmapLoadPcx(char *filename, global_game_variables_t *gv) {
        if(!result.data) {\r
                fprintf(stderr, "Could not allocate memory for bitmap data.");\r
                fclose(file);\r
-               exit(-1);\r
+               //exit(-1);\r
        }\r
 \r
        /*  read the buffer in */\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 = malloc(sizeof(byte*) * ts.ntiles);\r
+       ts.data = _fmalloc(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