Guest User

Untitled

a guest
Apr 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include "CApp.h"
  2.  
  3. bool CApp::OnInit() {
  4. if(SDL_Init(SDL_INIT_EVERYTHING) < 0) {
  5. return false;
  6. }
  7.  
  8. if((Surf_Display = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE | SDL_DOUBLEBUF)) == NULL) {
  9. return false;
  10. }
  11.  
  12. if((Surf_Test = CSurface::OnLoad("duke.png")) == NULL) {
  13. return false;
  14. }
  15.  
  16. return true;
  17. }
  18.  
  19. #ifndef _CAPP_H_
  20. #define _CAPP_H_
  21.  
  22. #include <SDL.h>
  23.  
  24. class CApp {
  25.  
  26. public:
  27.  
  28. CApp();
  29.  
  30. int OnExecute();
  31.  
  32. };
  33.  
  34. #endif
Add Comment
Please, Sign In to add comment