|Sylvain PILLOT 2c6e923ea1
Simple AABB and Pixel Perfect collision detection routines for fxSDK/gint
This is an example of routines that can be used on some image_t formats used within gint/fxSDK:
- AABB works on all format and is based on overlapping surrounding boxes detection, which is really fast but not accurate in the case of partially transparent images,
- Pixel Perfect work on IMAGE_RGB565, IMAGE_RBG565A, IMAGE_P8_RGB565 and IMAGE_P8_RGB565A formats (P4 formats not supported yet) and is based on image data scanning and search for collision of two non transparent pixels (one in each image)
The DEBUG version of pixel perfect draws a lot of stuff on the screen to help debugging and understanding how it works.
Feel free to use in you own programs if needed.