Advertisement
Vchavauty

CApp.cpp

Jul 26th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include "Capp.h"
  2.  
  3.  
  4. CApp::CApp()
  5. {
  6.     Surf_Display = NULL;
  7.     Running = true;
  8.     X = 1000;
  9.     Y = 700;
  10. }
  11.  
  12. int CApp::onExecute()
  13. {
  14.     if(OnInit() == false)
  15.         return -1;
  16.     SDL_Event Event;
  17.     while(Running)
  18.     {
  19.         while(SDL_PollEvent(&Event))
  20.         {
  21.             OnEvent(&Event);
  22.         }
  23.         OnLoop();
  24.         OnRender();
  25.     }
  26.     OnCleanUp();
  27.  
  28.     return 0;
  29. }
  30.  
  31. int CApp::RetrieveX()
  32. {
  33.     return X;
  34. }
  35. int CApp::RetrieveY()
  36. {
  37.     return Y;
  38. }
  39.  
  40. int main(int argc, char *argv[])
  41. {
  42.     CApp theApp;
  43.     return theApp.onExecute();
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement