File: fpshandler.cpp

package info (click to toggle)
amoeba 1.1-13
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 732 kB
  • ctags: 971
  • sloc: cpp: 8,315; makefile: 178
file content (31 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <string.h>

#include "main/fpshandler.h"
#include "../exception.h"
#include "../demolib_prefs.h"

#if DEMOLIB_MAINLOOP 

FPSHandler::FPSHandler(MainLoop *ml, const char *title, const char *elem, Hashtable *attr) :
	Event(ml, title, elem, attr, NULL)
{
	this->fps = new FPSCounter();
}

FPSHandler::~FPSHandler()
{
	delete this->fps;
	this->fps = NULL;
}

void FPSHandler::start_effect()
{
	this->fps->reset();
}

void FPSHandler::draw_scene(float progress) {
	fps->draw();
}
void FPSHandler::end_effect() {}

#endif