25 lines
310 B
C++
25 lines
310 B
C++
#ifndef __FPSMANAGER_H
|
|
#define __FPSMANAGER_H
|
|
|
|
#include <SDL.h>
|
|
|
|
namespace segl {
|
|
|
|
class FPSManager {
|
|
private:
|
|
Uint32 lastticks;
|
|
int frames;
|
|
float tickrate;
|
|
float framerate;
|
|
public:
|
|
FPSManager(int _fps);
|
|
|
|
void setFPS(int _fps);
|
|
void delay();
|
|
float getFPS();
|
|
};
|
|
|
|
} // namespace segl
|
|
|
|
#endif
|