Last change
on this file since 618 was
618,
checked in by sam, 10 years ago
|
Add a benchmark mode to the ticker.
|
-
Property svn:keywords set to
Id
|
File size:
1004 bytes
|
Line | |
---|
1 | // |
---|
2 | // Lol Engine |
---|
3 | // |
---|
4 | // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net> |
---|
5 | // This program is free software; you can redistribute it and/or |
---|
6 | // modify it under the terms of the Do What The Fuck You Want To |
---|
7 | // Public License, Version 2, as published by Sam Hocevar. See |
---|
8 | // http://sam.zoy.org/projects/COPYING.WTFPL for more details. |
---|
9 | // |
---|
10 | |
---|
11 | // |
---|
12 | // The Ticker class |
---|
13 | // ---------------- |
---|
14 | // The Ticker is a static class that registers entities and ticks them. |
---|
15 | // |
---|
16 | |
---|
17 | #if !defined __DH_TICKER_H__ |
---|
18 | #define __DH_TICKER_H__ |
---|
19 | |
---|
20 | #include <stdint.h> |
---|
21 | |
---|
22 | #include "entity.h" |
---|
23 | |
---|
24 | class Ticker |
---|
25 | { |
---|
26 | public: |
---|
27 | static void Register(Entity *entity); |
---|
28 | static void Ref(Entity *entity); |
---|
29 | static int Unref(Entity *entity); |
---|
30 | |
---|
31 | static void Setup(float fps); |
---|
32 | static void TickGame(); |
---|
33 | static void TickDraw(); |
---|
34 | static void ClampFps(); |
---|
35 | static void StartBenchmark(); |
---|
36 | static void StopBenchmark(); |
---|
37 | static int GetFrameNum(); |
---|
38 | |
---|
39 | static void Shutdown(); |
---|
40 | static int Finished(); |
---|
41 | }; |
---|
42 | |
---|
43 | #endif // __DH_TICKER_H__ |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.