2008-04-05 01:27:46 +02:00
|
|
|
#ifndef __FPSMANAGER_H
|
|
|
|
#define __FPSMANAGER_H
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
namespace segl {
|
|
|
|
|
2008-04-05 01:27:46 +02:00
|
|
|
class FPSManager {
|
|
|
|
private:
|
|
|
|
Uint32 lastticks;
|
|
|
|
int frames;
|
|
|
|
float tickrate;
|
|
|
|
float framerate;
|
|
|
|
public:
|
|
|
|
FPSManager(int _fps);
|
|
|
|
|
|
|
|
void setFPS(int _fps);
|
|
|
|
void delay();
|
|
|
|
float getFPS();
|
|
|
|
};
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
} // namespace segl
|
|
|
|
|
2008-04-05 01:27:46 +02:00
|
|
|
#endif
|