Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #include "SDL/SDL.h"
  2. #include "init_sdl.cpp"
  3.  
  4. int main(int argc,char* args[] ) {
  5. SDL_Surface* screen = NULL; //Normaler Screen
  6. SDL_Surface* startbg = NULL; //Startbildschirm
  7. SDL_Init(SDL_INIT_EVERYTHING); //Sdl Engine Intialisieren
  8. screen = SDL_SetVideoMode(0,0,32,SDL_FULLSCREEN); //Setzt Fenster höhe+breite
  9. SDL_WM_SetCaption("Cyc0des Demo Sdl Application",NULL); //Fenster-Titel setzen
  10. while(true){
  11. startbg = SDL_LoadBMP("./sprite/startbg.bmp"); //Hintergrundbild Laden
  12. SDL_BlitSurface(startbg,NULL,screen,0); //Kopiert starbg zu screen
  13. SDL_Flip(screen); //Reloadet Screen (macht änderungen im buffer "screen" sichtbar)
  14. //SDL_Delay(10000); //Pause Funktion - hält den vorhandenen thread an
  15. SDL_FreeSurface(startbg); //gibt das Surface "startbg" frei
  16. }
  17. SDL_Quit(); //Alle SDL-Subsysteme herrunterfahren (Anwendung beenden)
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement