IMG_pcx.c
changeset 236 cce1251de477
parent 216 7714c2bb6302
child 280 ec4ae96c100c
equal deleted inserted replaced
235:94dbd5b38765 236:cce1251de477
    80 		     (pcxh.Encoding == PCX_RunLength_Encoding ||
    80 		     (pcxh.Encoding == PCX_RunLength_Encoding ||
    81 		      pcxh.Encoding == PCX_Uncompressed_Encoding) ) {
    81 		      pcxh.Encoding == PCX_Uncompressed_Encoding) ) {
    82 			is_PCX = 1;
    82 			is_PCX = 1;
    83 		}
    83 		}
    84 	}
    84 	}
    85 	SDL_RWseek(src, start, SEEK_SET);
    85 	SDL_RWseek(src, start, RW_SEEK_SET);
    86 	return(is_PCX);
    86 	return(is_PCX);
    87 }
    87 }
    88 
    88 
    89 /* Load a PCX type image from an SDL datasource */
    89 /* Load a PCX type image from an SDL datasource */
    90 SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src)
    90 SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src)
   248 	}
   248 	}
   249 
   249 
   250 done:
   250 done:
   251 	free(buf);
   251 	free(buf);
   252 	if ( error ) {
   252 	if ( error ) {
   253 		SDL_RWseek(src, start, SEEK_SET);
   253 		SDL_RWseek(src, start, RW_SEEK_SET);
   254 		if ( surface ) {
   254 		if ( surface ) {
   255 			SDL_FreeSurface(surface);
   255 			SDL_FreeSurface(surface);
   256 			surface = NULL;
   256 			surface = NULL;
   257 		}
   257 		}
   258 		IMG_SetError(error);
   258 		IMG_SetError(error);