Ok so after reviewing your thread i noticed this code

1 2 3 4 5 6 7 8 9 10
| public static boolean intersectsByte(byte[][] a1, byte[][] a2, int x, int y) { for (int i = 0; i < a1.length; i++) { for (int j = 0; j < a1[0].length; j++) { if (a1[i][j] == 1) { for (int k = 0; k < a1.length; k++) { for (int l = 0; l < a1[0].length; l++) { if (((k - x) >= 0) && ((k - x) < a2.length) && ((l - y) >= 0) && ((l - y) < a2[0].length)) { if (a2[k - x][l - y] == 1) { return true; } } } } } } } return false; } |

I need some help understanding this however. If i already have two bitmaps setup how to I use this code to detect pixel perfect collision.?