Hey all,
I’ve got a curious problem. I’ve been trying to help someone getting
my game running and I’m stumped.
The problem occurs when reading images.
I am using SDL and SDL_image. The image data is in .png files.
My system is Redhat 6.{0,1,bitsofotherstuff} including libpng-1.0.3-4
(libpng.so.2.1.0.3) which works fine.
His is SuSE 6.2, with upgraded libs like imlib, etc.
I have a section of code like so:
for ( i=0; i<NUMBER_SPRITES; i++ )
{
sprintf(filename, “%s/%s”, g->data_dir, SPRITE_FILENAME[i] );
if ( (SPRITE[i] = IMG_Load(filename)) == NULL )
{
printf(“ERROR: reading game data %s\n”, SPRITE_FILENAME[i]);
perror(SPRITE_FILENAME[i]);
exit(-1);
}
}
He gets the following message from the above code:
ERROR: reading missilecommand.png
missilecommand.png: Success
The perror() message would be from the fopen() in IMG_Load() (so the
file is being found and opened successfully).
So why would IMG_Load() be failing? He has libpng.so.2, what else
should I ask him to check?
cheers,
Julian.