1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| SDL_Surface *monter = NULL, *descendre = NULL, *obstacle = NULL, *marche = NULL;
SDL_Rect positionMonter, positionDescendre, positionObstacle, positionMarche;
positionMonter.x = 400;
positionMonter.y = 100;
positionDescendre.x = 400;
positionDescendre.y = 200;
positionObstacle.x = 400;
positionObstacle.y = 300;
positionMarche.x = 400;
positionMarche.y = 400;
monter = SDL_LoadBMP("Monter.bmp");
SDL_BlitSurface(monter, NULL, ecran, &positionMonter);
descendre = SDL_LoadBMP("Descendre.bmp");
SDL_BlitSurface(descendre, NULL, ecran, &positionDescendre);
obstacle = SDL_LoadBMP("obstacle.bmp");
SDL_BlitSurface(obstacle, NULL, ecran, &positionObstacle);
marche = SDL_LoadBMP("marche.bmp");
SDL_BlitSurface(marche, NULL, ecran, &positionMarche);
SDL_Flip(ecran);
pause(); |
Partager