94 lines
1.3 KiB
C
94 lines
1.3 KiB
C
/* Fonction qui affiche l'écran principale du jeu
|
|
|
|
Written by Yann KERAUDREN and Titouan LERICHE */
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "ecran_lancement.h"
|
|
|
|
|
|
|
|
|
|
unsigned char ecran_lancement(void) {
|
|
|
|
couleur grey, green, yellow, red;
|
|
|
|
|
|
|
|
grey = CouleurParComposante(50,205,50);
|
|
ChoisirCouleurDessin(grey);
|
|
RemplirRectangle(0,0,1450,840);
|
|
|
|
|
|
yellow = CouleurParComposante(255,255,0);
|
|
ChoisirCouleurDessin(yellow);
|
|
RemplirRectangle(100,100,1200,6);
|
|
RemplirRectangle(1300,100,6,220);
|
|
RemplirRectangle(90,320,1216,6);
|
|
RemplirRectangle(90,320,6,165);
|
|
RemplirRectangle(90,485,200,6);
|
|
RemplirRectangle(250,465,50,46);
|
|
DessinerSegment(300, 470, 380, 440);
|
|
DessinerSegment(300, 469, 380, 439);
|
|
DessinerSegment(300, 468, 380, 438);
|
|
DessinerSegment(300, 467, 380, 437);
|
|
|
|
DessinerSegment(300, 507, 380, 537);
|
|
DessinerSegment(300, 506, 380, 536);
|
|
DessinerSegment(300, 505, 380, 535);
|
|
DessinerSegment(300, 504, 380, 534);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EcrireTexte(700,200, "SNAKE", 2);
|
|
|
|
|
|
red = CouleurParComposante(255,0,0);
|
|
ChoisirCouleurDessin(red);
|
|
|
|
|
|
|
|
|
|
EcrireTexte(400,500, "space = play", 2);
|
|
|
|
EcrireTexte(1000,500, "echap = quit", 2);
|
|
|
|
|
|
if (Touche() == XK_space ) {
|
|
|
|
return 1 ;
|
|
|
|
}
|
|
|
|
if (Touche() == XK_Escape) {
|
|
|
|
return 0 ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|