Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/diasurgical/devilution
/ GetAnimationFrame
Function
GetAnimationFrame
SourceX/DiabloUI/art_draw.cpp:45–50 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
43
}
44
45
int GetAnimationFrame(int frames, int fps)
46
{
47
int frame = (SDL_GetTicks() / fps) % frames;
48
49
return frame > frames ? 0 : frame;
50
}
51
52
} // namespace dvl
Callers
3
DrawArtStr
Function · 0.85
DrawAnimatedArt
Function · 0.85
DrawSelector
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected