source: trunk/src/ticker.h @ 2183

Last change on this file since 2183 was 2183, checked in by sam, 7 years ago

build: fix the WTFPL site URL in all code comments.

  • Property svn:keywords set to Id
File size: 1.2 KB
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://www.wtfpl.net/ 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 __LOL_TICKER_H__
18#define __LOL_TICKER_H__
19
20#include <stdint.h>
21
22#include "entity.h"
23
24namespace lol
25{
26
27class Ticker
28{
29public:
30    static void Register(Entity *entity);
31    static void Ref(Entity *entity);
32    static int Unref(Entity *entity);
33
34    static void Setup(float fps);
35    static void TickDraw();
36    static void StartBenchmark();
37    static void StopBenchmark();
38    static void StartRecording();
39    static void StopRecording();
40    static int GetFrameNum();
41
42    static void SetState(Entity *entity, uint32_t state);
43    static void SetStateWhenMatch(Entity *entity, uint32_t state,
44                                  Entity *other_entity, uint32_t other_state);
45
46    static void Shutdown();
47    static int Finished();
48};
49
50} /* namespace lol */
51
52#endif // __LOL_TICKER_H__
53
Note: See TracBrowser for help on using the repository browser.