More const-correctness in some functions.

This commit is contained in:
David Capello 2010-03-30 20:39:56 -03:00
parent cb5cb0f6b9
commit c299844f96
4 changed files with 9 additions and 8 deletions

View File

@ -94,7 +94,7 @@ Mask *load_msk_file(const char *filename)
} }
/* saves an Animator Pro MSK file (really a PIC file) */ /* saves an Animator Pro MSK file (really a PIC file) */
int save_msk_file(Mask *mask, const char *filename) int save_msk_file(const Mask *mask, const char *filename)
{ {
if (mask->bitmap) if (mask->bitmap)
return save_pic_file(filename, mask->x, mask->y, NULL, mask->bitmap); return save_pic_file(filename, mask->x, mask->y, NULL, mask->bitmap);

View File

@ -22,7 +22,7 @@
class Mask; class Mask;
Mask* load_msk_file(const char* filename); Mask* load_msk_file(const char* filename);
int save_msk_file(Mask* mask, const char* filename); int save_msk_file(const Mask* mask, const char* filename);
#endif #endif

View File

@ -173,10 +173,11 @@ Image *load_pic_file(const char *filename, int *x, int *y, RGB *palette)
} }
/* saves an Animator Pro PIC file */ /* saves an Animator Pro PIC file */
int save_pic_file(const char *filename, int x, int y, RGB *palette, Image *image) int save_pic_file(const char *filename, int x, int y,
const RGB* palette, const Image* image)
{ {
int c, u, v, bpp, size, byte; int c, u, v, bpp, size, byte;
PACKFILE *f; PACKFILE* f;
if (image->imgtype == IMAGE_INDEXED) if (image->imgtype == IMAGE_INDEXED)
bpp = 8; bpp = 8;

View File

@ -23,10 +23,10 @@
class Image; class Image;
Image* load_pic_file(const char *filename, int *x, int *y, Image* load_pic_file(const char* filename, int *x, int *y,
struct RGB *palette); RGB* palette);
int save_pic_file(const char *filename, int x, int y, int save_pic_file(const char* filename, int x, int y,
struct RGB *palette, Image* image); const RGB* palette, const Image* image);
#endif #endif