Haven't done this for a while, but my rect collision code was something along the lines of:
Code:
if (Ball.top > Brick.bottom) // If this is false, you can pretty much skip the rest of the bricks in this row. The ball isn't as high as this row.
{
if (Ball.bottom < Brick.top) // Again, if this is false, the ball has gone beyond this row. No point checking anything else at the same level.
{
if (Ball.left < Brick.right && Ball.right > Brick.left)
{
CollideFunc(); // We've hit!
}
}
}
If I've remembered that right, CollideFunc() should be called when ever there's an overlap between the Ball and Brick rects.
For an array of bricks, just index through Brick rects checking each one against the Ball rect.
You can save a bunch of checks if you test for the vertical collision first and ignore the rest of the row if the ball isn't overlapping the Brick.top/Brick.bottom range of the first brick in the row.
Hope that's clear enough.