Quote: "Is there a better way? Why is it so slow?"
It's so slow because you rotate/scale the image by a constant factor without regards to distance mouse has moved. You are checking only
if it moved, not how much. Moreove it's dependent on how often the while loop is performed (which depends on refresh rate and machine speed), which is wrong solution in most cases. Try to use this way and modify as you need:
int xPOS = dbMouseMoveX();
int yPOS = dbMouseMoveY();
if ( dbMouseClick() == 1)
{
scaler += 3 * xPOS;
}
if ( dbMouseClick() == 2)
{
angle = dbWrapValue(angle += 2 * yPOS);
}
if (scaler <= 0)
{
scaler = 1;
}
dbRotateSprite (1, angle);
dbScaleSprite (1, scaler);