X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fbitmap.c;h=c34e13d04bb83383d0e814e5c5e19f5f241db68c;hb=f02096268cea5a79cc6a32d2f67831ec50aabdbd;hp=cdec73bd85a11893ae1fd0cba43f6b6c5abeb086;hpb=f8aa708d074bbb922c6bdc481f9909c2ffd6274a;p=16.git diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index cdec73bd..c34e13d0 100644 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -75,7 +75,7 @@ bitmapLoadPcx(char *filename) { FILE *file; bitmap_t result; dword bufSize; - dword index; + int index; byte count, val; /* open the PCX file for reading */ @@ -91,16 +91,16 @@ bitmapLoadPcx(char *filename) { /* allocate the buffer */ //printf("%zu\n", _memmax()); bufSize = (/*(dword)*/result.width * result.height); -// result.data = malloc(bufSize); - result.data = (byte far *)_fmalloc(bufSize); + result.data = malloc(bufSize); +// result.data = (byte far *)_fmalloc(bufSize); // result.data = (byte __huge *)halloc(bufSize, sizeof(byte)); - printf("&bufSize=%p\n", &bufSize); + /*printf("&bufSize=%p\n", &bufSize); printf("&result.data=%p\n", result.data); - printf("Size of block is %zu bytes\n", _fmsize(result.data)); + printf("Size of block is %zu bytes\n", _msize(result.data)); printf("Size of bufSize is %zu bytes\n", bufSize); printf("Size of result.width is %zu \n", result.width); printf("Size of result.height is %zu \n", result.height); - printf("Dimensions of result is %lu\n", (dword)result.width*result.height); + printf("Dimensions of result is %lu\n", (dword)result.width*result.height);*/ //exit(0); if(!result.data) { fprintf(stderr, "Could not allocate memory for bitmap data.");