Advertisement
snake5

engine entry point

Dec 22nd, 2015
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. // game launcher
  2. main()
  3. {
  4.     [Win32|OSX|Linux]PlatformResources resources(...); // engine.lib
  5.     Application app(resources.engine); // game.lib
  6. }
  7.  
  8. // mobile game launcher
  9. [Android|WP|iOS]PlatformResources* resources;
  10. Application* app;
  11. onCreate(){ resources = new [Android|WP|iOS]PlatformResources; app = new Application(resources->engine); }
  12. onDestroy(){ delete app; delete resources; }
  13. onKeyEvent(e){ resources.onKeyEvent(e); }
  14.  
  15. // editor launcher
  16. edmain()
  17. {
  18.     [Win32|OSX]PlatformEditorResources resources(...); // engine.lib
  19.     // .. editor init ..
  20.     Engine* e = resources.CreateEngine([HWND|View]);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement