25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

57 lines
1.2 KiB

  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. // The Ticker class
  12. // ----------------
  13. // The Ticker is a static class that registers entities and ticks them.
  14. //
  15. #if !defined __LOL_TICKER_H__
  16. #define __LOL_TICKER_H__
  17. #include <stdint.h>
  18. #include "entity.h"
  19. namespace lol
  20. {
  21. class Ticker
  22. {
  23. public:
  24. static void Register(Entity *entity);
  25. static void Ref(Entity *entity);
  26. static int Unref(Entity *entity);
  27. static void Setup(float fps);
  28. static void TickDraw();
  29. static void StartBenchmark();
  30. static void StopBenchmark();
  31. static void StartRecording();
  32. static void StopRecording();
  33. static int GetFrameNum();
  34. static void SetState(Entity *entity, uint32_t state);
  35. static void SetStateWhenMatch(Entity *entity, uint32_t state,
  36. Entity *other_entity, uint32_t other_state);
  37. static void Shutdown();
  38. static int Finished();
  39. private:
  40. Ticker() {}
  41. };
  42. } /* namespace lol */
  43. #endif // __LOL_TICKER_H__