Se sono oggetti in 2d basta che testi i 2 quadrilateri + piccoli che contegono le 2 immaggini e poi controllare se effettivamente ci sono pixels validi e non trasparenti, tipo il codice trovato in giro per la rete
codice:
int left1, left2;
int right1, right2;
int top1, top2;
int bottom1, bottom2;
left1 = object1.x;
left2 = object2.x;
right1 = object1.x + object1.width;
right2 = object2,x + object2.width;
top1 = object1.y;
top2 = object2.y;
bottom1 = object1.y + object1.height;
bottom2 = object2.y + object2.height;
if (bottom1 < top2) return(0);
if (top1 > bottom2) return(0);
if (right1 < left2) return(0);
if (left1 > right2) return(0);
return(1);