diff options
Diffstat (limited to 'source/blender/imbuf/intern/dds/dds_api.cpp')
-rw-r--r-- | source/blender/imbuf/intern/dds/dds_api.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index 9a106253397..16832ef9a47 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -22,6 +22,7 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include <stddef.h> #include <dds_api.h> #include <Stream.h> #include <DirectDrawSurface.h> @@ -36,7 +37,7 @@ extern "C" { #include "IMB_allocimbuf.h" -int imb_save_dds(struct ImBuf * ibuf, char *name, int flags) +int imb_save_dds(struct ImBuf * ibuf, const char *name, int flags) { return(0); /* todo: finish this function */ @@ -64,7 +65,7 @@ int imb_is_a_dds(unsigned char *mem) // note: use at most first 32 bytes return(1); } -struct ImBuf *imb_load_dds(unsigned char *mem, int size, int flags) +struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags) { struct ImBuf * ibuf = 0; DirectDrawSurface dds(mem, size); /* reads header */ @@ -103,7 +104,7 @@ struct ImBuf *imb_load_dds(unsigned char *mem, int size, int flags) // TODO use the image RGB or RGBA tag to determine the bits per pixel if (dds.hasAlpha()) bits_per_pixel = 32; else bits_per_pixel = 24; - ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0, 0); + ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0); if (ibuf == 0) return(0); /* memory allocation failed */ ibuf->ftype = DDS; |