showimage.c
changeset 35 4b1f174486fa
parent 30 d3248d17a4a6
child 53 96b084473b47
     1.1 --- a/showimage.c	Fri Apr 06 03:27:14 2001 +0000
     1.2 +++ b/showimage.c	Sat Apr 28 18:24:37 2001 +0000
     1.3 @@ -29,6 +29,12 @@
     1.4  #include "SDL.h"
     1.5  #include "SDL_image.h"
     1.6  
     1.7 +/* #define XPM_INCLUDED and supply picture.xpm to test the XPM inclusion
     1.8 +   feature */
     1.9 +
    1.10 +#ifdef XPM_INCLUDED
    1.11 +#include "picture.xpm"
    1.12 +#endif
    1.13  
    1.14  /* Draw a Gimpish background pattern to show transparency in the image */
    1.15  void draw_background(SDL_Surface *screen)
    1.16 @@ -97,7 +103,11 @@
    1.17  			continue;
    1.18  		}
    1.19  		/* Open the image file */
    1.20 +#ifdef XPM_INCLUDED
    1.21 +		image = IMG_ReadXPMFromArray(picture_xpm);
    1.22 +#else
    1.23  		image = IMG_Load(argv[i]);
    1.24 +#endif
    1.25  		if ( image == NULL ) {
    1.26  			fprintf(stderr, "Couldn't load %s: %s\n",
    1.27  			        argv[i], SDL_GetError());