DrawImageRect queryArchives Forums/BlitzPlus Programming/DrawImageRect query
| I'm using some code to plonk my scrolly background, like so;|
All this worked fine until recently when I upgraded from Blitz 2d to Blitz+. Now when I scroll off the top or left of them image (mapx or mapy<0) [which I want to be able to do!!], I see a clipped background image, but the top left of the full map image remains at (0,0) on the screen, rather than continuing to move down,right as I scroll up,left. Is this a known mod or error with B+?
| we would have to see a better example.|
Can you post more code?
Global use_key=28, up_key=200, down_key=208, left_key=203,right_key=205,fire_key=157, exit_key=1
While Not KeyDown(exit_key)
If KeyDown(right_key) x=x-5
If KeyDown(left_key) x=x+5
If KeyDown(up_key) y=y+5
If KeyDown(down_key) y=y-5
| So the problem is that in Blitz2d, DrawBlockRect allowed negative offsets quite happily, but Blitz+ clips any negative values to 0,0. Yet Blitz+ doesn't clip offsets if they're more than the size of the image! I'd say there's definitely a bug here - either DrawBlockRect should accept negatives like it used to, or it should clip <0 AND >SIZE. I think the former would be better! |