Sloppy, non transparent mouse
Posted: Tue Feb 21, 2006 10:31 pm
I decided to start with some game programming lately, and I quite manage to create a screen, and render images on it etc. but I noticed I had to create a mouse icon myself.
I created a nice sword, using Adobe photoshop elements with a transparent background, but no matter what extension I save it in, it always has a black or white background in my program. Furthermore the mouse is quite slow, so I'll post my 'mouse' code as well...
As you can clearly see, it's not all code, but it's all my code that concerns the mouse. I place my mouse on the screen after all other drawing. I really don't know how to make the square in which I made my mouse icon transparent, and the mouse is still quite slow. I hope to find some suggestions here 
I created a nice sword, using Adobe photoshop elements with a transparent background, but no matter what extension I save it in, it always has a black or white background in my program. Furthermore the mouse is quite slow, so I'll post my 'mouse' code as well...
Code: Select all
LoadSprite(#mouseSprite,"media\images\mouse_cursor.jpg",0)
InitMouse()
Repeat
FlipBuffers()
ClearScreen(0,0,0)
ExamineMouse()
MX = MouseX()
MY = MouseY()
DisplaySprite(#mouseSprite,MX,MY)
Until QuitGame = 1