Original Post
Hi,
Anyone kkows why I dont get IntersectRect to work? Using it for rough collision detection:
bool Ghost::contains(RECT r, int xPos)
{
RECT now;
SetRect(&now,x+xPos,y,x+xPos+30,y+30);
if(IntersectRect(NULL, &r, &now))
return true;
return false;
}
I printed a debugstring and the cordinates is ok! The method works fine if I pass a point instead and checks if it''s inside a rect...
regards,
Mattias