Oh i just looked at your render function and it looks like your doing everything the way I'd suggest there. In that case a better solution(the results should be the same but this method just removes unnecessary code) would be this:
if(rings[n]->alive)
{
//find the center of the player
x = player->x + player->width/2;
y = player->y + player->height/2;
//get the rings bounding rectangle
x1 = rings[n]->x; //I removed the - mapxoff here
y1 = rings[n]->y; //and the - mapyoff here.
x2 = x1 + rings[n]->width;
y2 = y1 + rings[n]->height;
//now check for collision
if(inside(x, y, x1, y1, x2, y2)) //THIS IS THE ONLY LINE I CHANGED
{
rings[n]->alive = 0;
stop_sample(ringSound);
play_sample(ringSound, VOL+100, PAN, FREQ, FALSE);
ringCounter++;
score += 10;
}
}
x1 = rings[n]->x; //I removed the - mapxoff here
y1 = rings[n]->y; //and the - mapyoff here.
those are the only 2 lines i changed here, subtracting mapxoff and mapyoff only throws off your collision detection and is unnecessary unless you need it for something else besides collision detection