Engine.pkg 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. $#include "Engine/Engine.h"
  2. class Engine : public Object
  3. {
  4. void RunFrame();
  5. Console* CreateConsole();
  6. DebugHud* CreateDebugHud();
  7. void SetMinFps(int fps);
  8. void SetMaxFps(int fps);
  9. void SetMaxInactiveFps(int fps);
  10. void SetTimeStepSmoothing(int frames);
  11. void SetPauseMinimized(bool enable);
  12. void SetAutoExit(bool enable);
  13. void Exit();
  14. void DumpProfiler();
  15. void DumpResources(bool dumpFileName = false);
  16. void DumpMemory();
  17. int GetMinFps() const;
  18. int GetMaxFps() const;
  19. int GetMaxInactiveFps() const;
  20. int GetTimeStepSmoothing() const;
  21. bool GetPauseMinimized() const;
  22. bool GetAutoExit() const;
  23. bool IsInitialized() const;
  24. bool IsExiting() const;
  25. bool IsHeadless() const;
  26. tolua_property__get_set int minFps;
  27. tolua_property__get_set int maxFps;
  28. tolua_property__get_set int maxInactiveFps;
  29. tolua_property__get_set int timeStepSmoothing;
  30. tolua_property__get_set bool pauseMinimized;
  31. tolua_property__get_set bool autoExit;
  32. tolua_readonly tolua_property__is_set bool initialized;
  33. tolua_readonly tolua_property__is_set bool exiting;
  34. tolua_readonly tolua_property__is_set bool headless;
  35. };
  36. Engine* GetEngine();
  37. tolua_readonly tolua_property__get_set Engine* engine;
  38. ${
  39. #define TOLUA_DISABLE_tolua_EngineLuaAPI_GetEngine00
  40. static int tolua_EngineLuaAPI_GetEngine00(lua_State* tolua_S)
  41. {
  42. return ToluaGetSubsystem<Engine>(tolua_S);
  43. }
  44. #define TOLUA_DISABLE_tolua_get_engine_ptr
  45. #define tolua_get_engine_ptr tolua_EngineLuaAPI_GetEngine00
  46. $}