Archived

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

netplayer

Help with DirectX sample code

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
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