Collisions does not take affect on the corners

This is a discussion on Collisions does not take affect on the corners within the C++ Programming forums, part of the General Programming Boards category; When the block contacts a corner it goes through the side (not the top or bottom) but everywhere else it ...

What happens when both x and y are negative (which would be the case when attempting to leave via a corner)? Or when x+32 and y+32 are bigger than their limits?

[SPOILER]
The function will only report one of the cases - in this case it will return 1 for (y==0) but it won't get to the check for (x==0) since it already returned, and so your program goes merrily on its way along in the negative x direction.
[/SPOILER]