Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Rotating Sprites: Mystery or Mirth?

Author
Message
skull driveshaft
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location:
Posted: 4th Jan 2008 07:16
Here's the code I came up with after smashing things.

Is there a better way? Why is it so slow?



why doesn't it work the way I want it to!
tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 4th Jan 2008 15:47
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:

Login to post a reply

Server time is: 2024-09-29 09:17:09
Your offset time is: 2024-09-29 09:17:09