* I have only been using DarkGDK for ~3 days and only been using C++ for ~4 months as part of my university education ( am not in for a computer related major/minor). That being said I am a quick learner and am enjoying working with computer programming.
I am looking to use a sprite as a mouse cursor in my game. I figured out a piece of code that could take my .png or .tga file and display it at the cursor posiion:
// Code for loading the file into the game and create a sprite with
// with an initial offset from 0,0 to center the sprite about the
// cursor goes here (using -16, -16 for a 32x32 sprite image).
// Note, using Vsync rate of 60 with 4x4 AA (will be customizable
// in game).
// I use a sprite because it makes it easy to detect when someone
// is clicking on something such as a menu box.
dbOffsetSprite(200, dbMouseX(), dbMouseY());
dbShowSprite(200);
dbSync();
This worked, sort off. The problem I am having is that there is a noticeable time delay between the player moving his mouse and the sprite cursor being displayed at the new position on the screen. This is especially noticeable when the player is moving the mouse rapidly.
I tried the dbChangeMouse(#); command but I can't get it to display anything besides the standard Windows mouse/hour glass.
I was wondering if anyone could give me a detailed solution of how I can implement a proper custom cursor without it lagging behind the true position of the mouse.
Thank you for any input.
Thanks