mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-12 02:13:06 +00:00
Adds support for just enough SDL3 to make `text_render_integration_test` work.
19 lines
296 B
C++
19 lines
296 B
C++
#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
|