Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

netplayer

Help with DirectX sample code

This topic is 6673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In the DirectX SDK sample DDEx4.cpp, what is GetTickCount() and how it use to decide which frame will be blitted next? thisTickCount = GetTickCount(); for (i = 0; i < 3; i++) { if ((thisTickCount - lastTickCount) > delay[i]) { // Move to next frame; lastTickCount[i] = thisTickCount; currentFrame[i]++; if (currentFrame[i] > 59) currentFrame[i] = 0; } } are there any others method to flip sprites timely like above?

Share this post


Link to post
Share on other sites
Advertisement
you can set up a timer
in wour winMain function
then in your wndProc function listen for it like this


[cource]
.
.
.
case WM_TIMER:
callTimerFunctionToIncreaseSpriteFrames();
break;
.
.
.
[/source]

cant remember what the function looks like to set up a timer......but i remember it only takes one quick function to set it up......nothing messy



"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!