Advertisement
Vchavauty

OnInit.cpp

Jul 26th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include "Capp.h"
  2.  
  3. bool CApp::OnInit()
  4. {
  5.     if((MainCharacter.Init("img/yoshi.bmp")) == false)
  6.     {
  7.         return false;
  8.     }
  9.     if(SDL_Init(SDL_INIT_EVERYTHING) < 0)
  10.     {
  11.         return false;
  12.     }
  13.  
  14.     if((Surf_Display = SDL_SetVideoMode(X, Y, 32, SDL_HWSURFACE | SDL_DOUBLEBUF)) == NULL)
  15.     {
  16.         return false;
  17.     }
  18.     if((Background = MySurface::OnLoad("img/Background.bmp")) == NULL)
  19.     {
  20.         return false;
  21.     }
  22.     return true;
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement