Graphical Cursor Bug

BlitzPlus Forums/BlitzPlus Programming/Graphical Cursor Bug

Jimbob(Posted 2003) [#1]
Right, I made a custom cursor for use in my game. But during the game this bug happens:

The mouse cursor image pastes itself onto certain parts of the background image (which is refreshed each frame)
All the graphics are in png format and the game is in fullscreen mode. You'll see it only happens on the black outlines of the background.

Any ideas?


soja(Posted 2003) [#2]
Just a guess. When drawing the background, try using DrawBlock instead of DrawImage. Either that or use MaskImage to change the mask. Since the mask is set to 0, it may just not be re-drawing the black parts of the picture each frame, and so it leaves bits of the cursor.

Looks like you've got an interesting idea for a game there - fun! I'd like to give it a try when you get it playable.


Jimbob(Posted 2003) [#3]
im not masking any part of the background image at all tho. Does it automatically set it to black if you dont specify one?

Thanks for the comment, its playable at the mo, but I want everything in before i start giving out betas.


Jimbob(Posted 2003) [#4]
Just tried setting maskimage to a random colour and it worked. Strange that.


soja(Posted 2003) [#5]
Yes, when you use DrawImage, all black is automatically transparent. If you don't want that, you either have to change the masking color, or you have to use DrawBlock. DrawBlock does the same thing as DrawImage, except it doesn't mask anything.