You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
296 B

#include "engine/ticks.hpp"
#include <cstdint>
#ifdef USE_SDL3
#include <SDL3/SDL_timer.h>
#else
#include <SDL.h>
#endif
namespace devilution {
uint32_t GetAnimationFrame(uint32_t frames, uint32_t fps)
{
return (SDL_GetTicks() / fps) % frames;
}
} // namespace devilution