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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| #include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>
#include "main.h"
int main(int argc, char *argv[])
{
int i;
SDL_Surface *ecran = NULL, *imageDeFond = NULL, *viseur = NULL, *texte = NULL ;
SDL_Surface *personnage[13];
for ( i = 0 ; i <= 12 ; i++)
personnage[i] = NULL;
SDL_Rect positionFond, positionViseur;
SDL_Rect positionPersonnage[13] = {0};
SDL_Rect morceauImage[13] = {0};
SDL_Rect positionTexte, positionCompteurStart;
SDL_Event event;
TTF_Font *police = NULL;
SDL_Color couleurRouge = {190, 0, 0}, couleurBlanche = {255, 255, 255};
int continuer = 1, continuerStart = 1, continuer2 = 1;
int tempsDebutPartie = 0, tempsEnCoursPartie = 0;
int tempsStart = 0;
int tempsPrecedent[13] = {0}, tempsActuel = 0;
int tempsPrecedent2 = 0, tempsActuel2 = 0;
int tempsPrecedentStart = 0;
int tempsPrecedentClic = 0, tempsActuelClic = 0;
int versLeHaut[13] = {1,1,1,1,1,1,1,1,1,1,1,1,1};
int j[13] = {0};
int compteurStart = 5;
int score = 0;
int rand = 0;
int personnageClicked[13] = {0};
char tabCharStart[1] = "";
char tabCharScore[11] = "";
positionFond.x = 0;
positionFond.y = 0;
positionTexte.x = 30;
positionTexte.y = 10;
positionCompteurStart.x = 300;
positionCompteurStart.y = 150;
positionPersonnage[0].x = 97;
positionPersonnage[0].y = 197;
positionPersonnage[1].x = 219;
positionPersonnage[1].y = 197;
positionPersonnage[2].x = 342;
positionPersonnage[2].y = 197; |