Guest User

Untitled

a guest
Jul 21st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. //-----------------------------------------------------------------------------
  2. // PlatBox Project
  3. // File: engine.h
  4. //
  5. // Desc: PlatBox Engine
  6. //
  7. //
  8. // Copyright (c) 2009 Damir Akhmetzyanov
  9. //-----------------------------------------------------------------------------
  10.  
  11. #ifndef __ENGINE_H__
  12. #define __ENGINE_H__
  13.  
  14. #include <windows.h>
  15.  
  16. #include "common.h"
  17. #include "input.h"
  18. #include "level.h"
  19. #include "filesystem.h"
  20. #include "visualizer.h"
  21.  
  22. namespace PlatBox {
  23.  
  24. class Engine
  25. {
  26. HWND hWnd;
  27. BOOL bFirstFrame;
  28. u32 uLastTime;
  29. f32 deltaTime;
  30.  
  31. // this is a private constructor. Use static CreateEngine method instead.
  32. Engine();
  33. BOOL InitInput();
  34.  
  35. Level* pLevel;
  36. ResourceManager *pResourceManager;
  37.  
  38. // backends
  39. InputProcessor* pInput;
  40. FileSystem* pFileSystem;
  41. Renderer* pRenderer;
  42. // + audio
  43. // + network
  44. public:
  45. InputProcessor* GetInput();
  46. FileSystem* GetFileSystem();
  47. Renderer* GetRenderer();
  48. DebugRenderer* GetDebugRenderer();
  49. ResourceManager* GetResourceManager();
  50.  
  51. // Creates an instance of the Engine. You need to provide a window handle.
  52. static Engine* CreateEngine(HWND hWnd);
  53. ~Engine();
  54. BOOL LoadLevel(char *fname);
  55. void UnloadLevel();
  56. // Advance to the next frame
  57. BOOL Process();
  58. };
  59.  
  60. }
  61.  
  62. #endif
Add Comment
Please, Sign In to add comment