I recommend using debugger in following way to determine where is the problem:
1) put a breakpoint in DrawBitmap function, examine realX/realY variables - do they contain reasonable values? If yes, then the problem is DrawBitmap function because it draws bitmap in wrong place, if not move one step up in call stack, and go to point (2)
2) do playerGroundPointX, playerGroundPointY and z variables contain reasonable values (what you expect)?
3) then move step above - look at variables how playerGroundPointX/Y was calculated. Do they have reasonable/expected values.
And continue in similar manner until you'll pinpoint the issue. Using debugger this way make you find problem in no time. Programming is science, so apply
Scientific Method when using debugger. It really works.