mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-11 18:42:46 +00:00
Change it back to const char
This commit is contained in:
parent
1624338f10
commit
2778068921
2 changed files with 12 additions and 12 deletions
|
|
@ -34,7 +34,7 @@
|
||||||
*
|
*
|
||||||
* Besides the standard API, also provides
|
* Besides the standard API, also provides
|
||||||
*
|
*
|
||||||
* SDL_Surface *IMG_ReadXPMFromArray(char **xpm)
|
* SDL_Surface *IMG_ReadXPMFromArray(const char **xpm)
|
||||||
*
|
*
|
||||||
* that reads the image data from an XPM file included in the C source.
|
* that reads the image data from an XPM file included in the C source.
|
||||||
*
|
*
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
// SDLCALL terms removed from original SDL_image declarations
|
// SDLCALL terms removed from original SDL_image declarations
|
||||||
int IMG_isXPM(SDL_RWops *src);
|
int IMG_isXPM(SDL_RWops *src);
|
||||||
SDL_Surface *IMG_LoadXPM_RW(SDL_RWops *src);
|
SDL_Surface *IMG_LoadXPM_RW(SDL_RWops *src);
|
||||||
SDL_Surface *IMG_ReadXPMFromArray(char **xpm);
|
SDL_Surface *IMG_ReadXPMFromArray(const char **xpm);
|
||||||
#define IMG_SetError SDL_SetError
|
#define IMG_SetError SDL_SetError
|
||||||
#define IMG_GetError SDL_GetError
|
#define IMG_GetError SDL_GetError
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -192,7 +192,7 @@ static void free_colorhash(struct color_hash *hash)
|
||||||
* convert colour spec to RGB (in 0xrrggbb format).
|
* convert colour spec to RGB (in 0xrrggbb format).
|
||||||
* return 1 if successful.
|
* return 1 if successful.
|
||||||
*/
|
*/
|
||||||
static int color_to_rgb(char *spec, int speclen, Uint32 *rgb)
|
static int color_to_rgb(const char *spec, int speclen, Uint32 *rgb)
|
||||||
{
|
{
|
||||||
/* poor man's rgb.txt */
|
/* poor man's rgb.txt */
|
||||||
static struct { char *name; Uint32 rgb; } known[] = {
|
static struct { char *name; Uint32 rgb; } known[] = {
|
||||||
|
|
@ -933,7 +933,7 @@ static char *error;
|
||||||
* If len > 0, it's assumed to be at least len chars (for efficiency).
|
* If len > 0, it's assumed to be at least len chars (for efficiency).
|
||||||
* Return NULL and set error upon EOF or parse error.
|
* Return NULL and set error upon EOF or parse error.
|
||||||
*/
|
*/
|
||||||
static char *get_next_line(char ***lines, SDL_RWops *src, int len)
|
static const char *get_next_line(const char ***lines, SDL_RWops *src, int len)
|
||||||
{
|
{
|
||||||
char *linebufnew;
|
char *linebufnew;
|
||||||
|
|
||||||
|
|
@ -1005,7 +1005,7 @@ do { \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* read XPM from either array or RWops */
|
/* read XPM from either array or RWops */
|
||||||
static SDL_Surface *load_xpm(char **xpm, SDL_RWops *src)
|
static SDL_Surface *load_xpm(const char **xpm, SDL_RWops *src)
|
||||||
{
|
{
|
||||||
Sint64 start = 0;
|
Sint64 start = 0;
|
||||||
SDL_Surface *image = NULL;
|
SDL_Surface *image = NULL;
|
||||||
|
|
@ -1017,8 +1017,8 @@ static SDL_Surface *load_xpm(char **xpm, SDL_RWops *src)
|
||||||
struct color_hash *colors = NULL;
|
struct color_hash *colors = NULL;
|
||||||
SDL_Color *im_colors = NULL;
|
SDL_Color *im_colors = NULL;
|
||||||
char *keystrings = NULL, *nextkey;
|
char *keystrings = NULL, *nextkey;
|
||||||
char *line;
|
const char *line;
|
||||||
char ***xpmlines = NULL;
|
const char ***xpmlines = NULL;
|
||||||
int pixels_len;
|
int pixels_len;
|
||||||
|
|
||||||
error = NULL;
|
error = NULL;
|
||||||
|
|
@ -1085,7 +1085,7 @@ static SDL_Surface *load_xpm(char **xpm, SDL_RWops *src)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
for (index = 0; index < ncolors; ++index ) {
|
for (index = 0; index < ncolors; ++index ) {
|
||||||
char *p;
|
const char *p;
|
||||||
line = get_next_line(xpmlines, src, 0);
|
line = get_next_line(xpmlines, src, 0);
|
||||||
if (!line)
|
if (!line)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
@ -1095,7 +1095,7 @@ static SDL_Surface *load_xpm(char **xpm, SDL_RWops *src)
|
||||||
/* parse a colour definition */
|
/* parse a colour definition */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char nametype;
|
char nametype;
|
||||||
char *colname;
|
const char *colname;
|
||||||
Uint32 rgb, pixel;
|
Uint32 rgb, pixel;
|
||||||
|
|
||||||
SKIPSPACE(p);
|
SKIPSPACE(p);
|
||||||
|
|
@ -1188,7 +1188,7 @@ SDL_Surface *IMG_LoadXPM_RW(SDL_RWops *src)
|
||||||
return load_xpm(NULL, src);
|
return load_xpm(NULL, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Surface *IMG_ReadXPMFromArray(char **xpm)
|
SDL_Surface *IMG_ReadXPMFromArray(const char **xpm)
|
||||||
{
|
{
|
||||||
if (!xpm) {
|
if (!xpm) {
|
||||||
IMG_SetError("array is NULL");
|
IMG_SetError("array is NULL");
|
||||||
|
|
@ -1212,7 +1212,7 @@ SDL_Surface *IMG_LoadXPM_RW(SDL_RWops *src)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Surface *IMG_ReadXPMFromArray(char **xpm)
|
SDL_Surface *IMG_ReadXPMFromArray(const char **xpm)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* XPM */
|
/* XPM */
|
||||||
static char * SDL_icon_xpm[] = {
|
static const char *SDL_icon_xpm[] = {
|
||||||
"64 64 32 1",
|
"64 64 32 1",
|
||||||
" c None",
|
" c None",
|
||||||
". c #000271",
|
". c #000271",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue