Issue: (1) on 45 degree slopes, and as far as I'm aware also 60 degree slopes, the behaviour when a tumbler/jumper encounters terrain is inconsistent.
(2) the tumbler code is a messy blob.
Simon is addressing (2) with a solution that cannot address (1). Thus I'd propose a slightly different solution, which is rather modular, and the modules are easy to comprehend in what they are doing. I think the proposed rewrite mixes moving and collision checks a lot more than my proposal, which should make the code clearer.
Subroutine (1):
Determine first point of impact via going along the trajectory 1 pixel vertically or horizontally at a time.
Subroutine (2) [takes coordinate as argument], or probably better even 3 separate subroutines.
Let's call the coordinate that we got as argument (0,0).
Is there space below at (0,-1) or (0,-2), if yes, we've hit a ceiling.
Is there space above at (0,+1) or (0,+2)? if yes, we've hit floor.
Is there space one pixel behind at (-1,0)? If yes, we've hit a wall.
Return those three booleans.
Remark: Notice that as (0,0) is the first point of impact by only going vertically and horizontally, at least one of the three will be true.
Subroutine (3):
Call (1)
Call (2)
If we've hit floor and ceiling, use y-speed to determine whether to call landing or bumping subroutine (this only happens if you have a 1-px layer of terrain).
Else If we've hit floor, call landing subroutine.
Else If we've hit a ceiling, call bumping subroutine.
Else we've hit a wall (and nothing else), call reflection subroutine.
Note: The reason I propose checking 2 pixels in the ceiling and floor check in (2) is to handle 60 degree slopes consistently. Inconsistent behaviour will now only happen at slopes going at least 3 pixels up/down per 1 pixel horizontally, which I don't believe exist as tiles.