I had wonderful moments of pleasure associated with detecting two-dimensional collisions. What seems like a simple problem can easily become a nightmare if you don't plan it ahead of time.
The best way to do this in the OO sense is to make a common object, for example. classMapObject. It has a position coordinate and a slope. From this, you can expand it to include other shapes, etc.
From this, let it work with collisions with a Solid object. Assuming only a block, say 32x32, you can hit it on the left, right, top, and bottom . Or, depending on how you code, hit it top and left at the same time. So, how do you determine in which direction the character should go? For example, if a character falls into a block from above to stand incorrectly encoded, you may inadvertently bring the character to the side.
So what should you do? What I did for my 2D game, I looked at the person before positioning before deciding how to react to the collision. If the symbol is Y-position + Height above the block and moving west, then I would first check the first collision, and then the left collision. However, if the position of the Y + height symbol is below the top of the block, I would check the left collision.
Now let's say that you have a block with a slope. The block is 32 pixels wide, 32 pixels high with x = 32, 0 pixels high with x = 0. With this, you MUST assume that the character can hit and collide with this block from above to stand. With this block you can return a FALSE collision if it is a left / right / bottom collision, but if this collision is on top, you can indicate that if the character is at X = 0, return the collision point Y = 0. If X = 16 , Y = 16, etc.
Of course, this is all relative. You will check for multiple blocks, so what you need to do is save all possible changes in the direction of the characters to a temporary variable. So, if the symbol overlaps the block by 5 in the X direction, subtract 5 from this variable. Accumulate all possible changes in the X and Y direction, apply them to the current character position and reset to 0 for the next frame.
Good luck. I could provide more samples later, but I'm on my Mac (my code is on WinPC). This is the same type of collision detection used in the classic MRC Man IIRC games. Here is a video of this in action: http://www.youtube.com/watch?v=uKQM8vCNUTM