IMG_xxx.c
author Sam Lantinga <slouken@libsdl.org>
Sat, 04 Feb 2006 20:37:17 +0000
changeset 117 e613cf987897
parent 98 9f94c4674cc9
child 118 c5e736a47ad2
permissions -rw-r--r--
Fixed image type functions so they seek back to where they started
     1 /*
     2     SDL_image:  An example image loading library for use with SDL
     3     Copyright (C) 1999-2004 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Library General Public
     7     License as published by the Free Software Foundation; either
     8     version 2 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Library General Public License for more details.
    14 
    15     You should have received a copy of the GNU Library General Public
    16     License along with this library; if not, write to the Free
    17     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 
    23 /* $Id$ */
    24 
    25 /* This is a generic "format not supported" image framework */
    26 
    27 #include <stdio.h>
    28 
    29 #include "SDL_image.h"
    30 
    31 #ifdef LOAD_XXX
    32 
    33 /* See if an image is contained in a data source */
    34 int IMG_isXXX(SDL_RWops *src)
    35 {
    36 	int start;
    37 	int is_XXX;
    38 
    39 	start = SDL_RWtell(src);
    40 	is_XXX = 0;
    41 	SDL_RWseek(src, start, SEEK_SET);
    42 	return(is_XXX);
    43 }
    44 
    45 /* Load a XXX type image from an SDL datasource */
    46 SDL_Surface *IMG_LoadXXX_RW(SDL_RWops *src)
    47 {
    48 	if ( !src ) {
    49 		/* The error message has been set in SDL_RWFromFile */
    50 		return NULL;
    51 	}
    52 	return(NULL);
    53 }
    54 
    55 #else
    56 
    57 /* See if an image is contained in a data source */
    58 int IMG_isXXX(SDL_RWops *src)
    59 {
    60 	return(0);
    61 }
    62 
    63 /* Load a XXX type image from an SDL datasource */
    64 SDL_Surface *IMG_LoadXXX_RW(SDL_RWops *src)
    65 {
    66 	return(NULL);
    67 }
    68 
    69 #endif /* LOAD_XXX */