Commit 75b24a624f1c1d5bfd43137a2fa2f3dfdb7abab4

Authored by mchauvel
1 parent 66b129e5

Useless

Showing 1 changed file with 0 additions and 40 deletions   Show diff stats
Collision/Collision.c deleted
@@ -1,40 +0,0 @@ @@ -1,40 +0,0 @@
1 -#include <stdio.h>  
2 -#include <stdlib.h>  
3 -#include "../Main/init.h"  
4 -#include "../ListeC/Liste.h"  
5 -  
6 -int CheckCollision(struct entite enti1,int L1,int H1,struct entite enti2 ,int L2, int H2)  
7 -{  
8 - //CheckX  
9 - int gauche1 = enti1.posx-L1;  
10 - int droite1 = enti1.posx+L1;  
11 - int gauche2 = enti2.posx-L2;  
12 - int droite2 = enti2.posx+L2;  
13 - int CheckX=0;  
14 - if(gauche1 >= gauche2 && gauche1 <= droite2)  
15 - {  
16 - CheckX=1;  
17 - }  
18 - else if(droite1 >= gauche2 && droite1 <= droite2)  
19 - {  
20 - CheckX=1;  
21 - }  
22 -  
23 - //CheckY  
24 - int haut1 = enti1.posy-H1;  
25 - int bas1 = enti1.posy+H1;  
26 - int haut2 = enti2.posy-H2;  
27 - int bas2 = enti2.posy+H2;  
28 - int CheckY=0;  
29 - if(haut1 >= bas2 && haut1 <= haut2)  
30 - {  
31 - CheckY=1;  
32 - }  
33 - else if(bas1 >= bas2 && bas1 <= haut2)  
34 - {  
35 - CheckY=1;  
36 - }  
37 -  
38 - if(CheckX+CheckY==2){return 1;}  
39 - return 0;  
40 -}