Skip to content

Commit

Permalink
Date: Tue, 24 Apr 2001 15:26:53 +0200 (MET DST)
Browse files Browse the repository at this point in the history
From: "Mattias Engdeg?rd" <f91-men@nada.kth.se>
Subject: XPM patch to SDL_image

A couple of people have requested an interface to SDL_image for loading
SDL images directly from #included XPM files in the C source.
Writing a separate loader for this would be silly as the code in SDL_image
already does the XPM parsing, so I added a new call to the SDL_image API:

	SDL_Surface *IMG_ReadXPMFromArray(char **xpm);

which does the obvious thing. As a bonus, the code got a little cleaner as
well. (We probably need to increase the minor .so-version number since the
interface got changed but I didn't do so in my patch.)

We should perhaps include the rgb.txt colour name database as well, since
it's quite small (~13K in binary form), but I haven't made up my mind

Cheers,

	Mattias
  • Loading branch information
Sam Lantinga committed Apr 28, 2001
1 parent 547b70e commit 4f5ba29
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 182 deletions.
2 changes: 1 addition & 1 deletion IMG.c
Expand Up @@ -68,7 +68,7 @@ SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc)
}

/* Portable case-insensitive string compare function */
int IMG_string_equals(const char *str1, const char *str2)
static int IMG_string_equals(const char *str1, const char *str2)
{
while ( *str1 && *str2 ) {
if ( toupper((unsigned char)*str1) !=
Expand Down

0 comments on commit 4f5ba29

Please sign in to comment.