Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "SDL/SDL.h"
- #include "init_sdl.cpp"
- int main(int argc,char* args[] ) {
- SDL_Surface* screen = NULL; //Normaler Screen
- SDL_Surface* startbg = NULL; //Startbildschirm
- SDL_Init(SDL_INIT_EVERYTHING); //Sdl Engine Intialisieren
- screen = SDL_SetVideoMode(0,0,32,SDL_FULLSCREEN); //Setzt Fenster höhe+breite
- SDL_WM_SetCaption("Cyc0des Demo Sdl Application",NULL); //Fenster-Titel setzen
- while(true){
- startbg = SDL_LoadBMP("./sprite/startbg.bmp"); //Hintergrundbild Laden
- SDL_BlitSurface(startbg,NULL,screen,0); //Kopiert starbg zu screen
- SDL_Flip(screen); //Reloadet Screen (macht änderungen im buffer "screen" sichtbar)
- //SDL_Delay(10000); //Pause Funktion - hält den vorhandenen thread an
- SDL_FreeSurface(startbg); //gibt das Surface "startbg" frei
- }
- SDL_Quit(); //Alle SDL-Subsysteme herrunterfahren (Anwendung beenden)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement