1
Programming / Patch to fix crash issue on Mac OS X when using some weapon mods
« on: July 07, 2014, 05:51:19 am »
Hi folks,
Just wanted to post a patch I made to fix crashes (on Mac OS X) when enabling weapon mods that use gifs for the HANDOB images (e.g.: Combat Knife, Sniper Rifle, Minigun, GrenadeLauncher), in case anyone finds it useful.
Dev notes: Long story short, the problem is that SDL loads gifs as 32bpp surfaces on Mac OS X, and this patch adds a function to convert such surfaces back to 8bpp - note that the function requires a palette to do the conversion (for now, it uses the battlescape palette but it should probably do something smarter).
Cheers!
Just wanted to post a patch I made to fix crashes (on Mac OS X) when enabling weapon mods that use gifs for the HANDOB images (e.g.: Combat Knife, Sniper Rifle, Minigun, GrenadeLauncher), in case anyone finds it useful.
Dev notes: Long story short, the problem is that SDL loads gifs as 32bpp surfaces on Mac OS X, and this patch adds a function to convert such surfaces back to 8bpp - note that the function requires a palette to do the conversion (for now, it uses the battlescape palette but it should probably do something smarter).
Cheers!