Mudi
You're pushing your luck little man
Any one have any idea why in the function shown below
	
	
	
		
The parameter 'episode' suddenly gets changed to 0 between loadlatch() and loadsprites()? I've debugged just by logging the value of episode through each function, and it changes to 0 between those two... not that it should matter, because I'm passing a copy to the function, not a pointer! WTF?
This only happens in the GP2X compiled version, by the way. I compiled the same code in GCC/Cygwin and it worked perfectly.
ALSO, I agree goto is ugly, but this is ported code, and I'm too lazy to get rid of it for now.
				
			
		Code:
	
	char latch_loadgraphics(int episode)
{
int retval = 0;
   SpriteTable = NULL;
   if (latch_loadheader(episode)) { retval = 1; goto abort; }
   if (latch_loadlatch(episode)) { retval = 1; goto abort; }
   if (latch_loadsprites(episode)) { retval = 1; goto abort; }
abort:;
   if (SpriteTable) free(SpriteTable);
   if (BitmapTable) free(BitmapTable);
   return retval;
}
	The parameter 'episode' suddenly gets changed to 0 between loadlatch() and loadsprites()? I've debugged just by logging the value of episode through each function, and it changes to 0 between those two... not that it should matter, because I'm passing a copy to the function, not a pointer! WTF?
This only happens in the GP2X compiled version, by the way. I compiled the same code in GCC/Cygwin and it worked perfectly.
ALSO, I agree goto is ugly, but this is ported code, and I'm too lazy to get rid of it for now.
	