constified the name arguments of Image_LoadImage() and Image_WriteTGA()

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@510 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2011-12-12 12:56:57 +00:00
parent 791d3e8d61
commit 42de3830cd
2 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h" #include "quakedef.h"
char loadfilename[MAX_OSPATH]; //file scope so that error messages can use it static char loadfilename[MAX_OSPATH]; //file scope so that error messages can use it
/* /*
============ ============
@ -33,7 +33,7 @@ returns a pointer to hunk allocated RGBA data
TODO: search order: tga png jpg pcx lmp TODO: search order: tga png jpg pcx lmp
============ ============
*/ */
byte *Image_LoadImage (char *name, int *width, int *height) byte *Image_LoadImage (const char *name, int *width, int *height)
{ {
FILE *f; FILE *f;
@ -99,7 +99,7 @@ returns true if successful
TODO: support BGRA and BGR formats (since opengl can return them, and we don't have to swap) TODO: support BGRA and BGR formats (since opengl can return them, and we don't have to swap)
============ ============
*/ */
qboolean Image_WriteTGA (char *name, byte *data, int width, int height, int bpp, qboolean upsidedown) qboolean Image_WriteTGA (const char *name, byte *data, int width, int height, int bpp, qboolean upsidedown)
{ {
int handle, i, size, temp, bytes; int handle, i, size, temp, bytes;
char pathname[MAX_OSPATH]; char pathname[MAX_OSPATH];

View file

@ -27,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//be sure to free the hunk after using these loading functions //be sure to free the hunk after using these loading functions
byte *Image_LoadTGA (FILE *f, int *width, int *height); byte *Image_LoadTGA (FILE *f, int *width, int *height);
byte *Image_LoadPCX (FILE *f, int *width, int *height); byte *Image_LoadPCX (FILE *f, int *width, int *height);
byte *Image_LoadImage (char *name, int *width, int *height); byte *Image_LoadImage (const char *name, int *width, int *height);
qboolean Image_WriteTGA (char *name, byte *data, int width, int height, int bpp, qboolean upsidedown); qboolean Image_WriteTGA (const char *name, byte *data, int width, int height, int bpp, qboolean upsidedown);
#endif /* __GL_IMAGE_H */ #endif /* __GL_IMAGE_H */