MCPcopy 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
45int 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

DrawArtStrFunction · 0.85
DrawAnimatedArtFunction · 0.85
DrawSelectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected