Nathan MONNIER
/
Projet_S3
Projet_S3
Diff: char.h
- Revision:
- 11:45d8d1f609a8
- Parent:
- 6:edb27e228558
- Child:
- 14:5b7129157c7b
--- a/char.h Tue Sep 14 13:45:11 2021 +0000 +++ b/char.h Sat Jan 08 18:57:55 2022 +0000 @@ -1,3 +1,86 @@ +void octahedron(int X, int Y, char qR, char qV, char qB){ + pix(X,Y-5,qR,qV,qB); + + pix(X,Y-4,qR,qV,qB); + pix(X+1,Y-4,qR,qV,qB); + pix(X-1,Y-4,qR,qV,qB); + + pix(X+1,Y-3,qR,qV,qB); + pix(X+2,Y-3,qR,qV,qB); + pix(X-1,Y-3,qR,qV,qB); + pix(X-2,Y-3,qR,qV,qB); + + pix(X-2,Y-2,qR,qV,qB); + pix(X-3,Y-2,qR,qV,qB); + pix(X+3,Y-2,qR,qV,qB); + pix(X+2,Y-2,qR,qV,qB); + + pix(X-3,Y-1,qR,qV,qB); + pix(X-4,Y-1,qR,qV,qB); + pix(X+3,Y-1,qR,qV,qB); + pix(X+4,Y-1,qR,qV,qB); + + pix(X,Y,qR,qV,qB); + pix(X-5,Y,qR,qV,qB); + pix(X-4,Y,qR,qV,qB); + pix(X-3,Y,qR,qV,qB); + pix(X-2,Y,qR,qV,qB); + pix(X-1,Y,qR,qV,qB); + pix(X+1,Y,qR,qV,qB); + pix(X+2,Y,qR,qV,qB); + pix(X+3,Y,qR,qV,qB); + pix(X+4,Y,qR,qV,qB); + pix(X+5,Y,qR,qV,qB); + + pix(X,Y+5,qR,qV,qB); + + pix(X,Y+4,qR,qV,qB); + pix(X+1,Y+4,qR,qV,qB); + pix(X-1,Y+4,qR,qV,qB); + + pix(X+1,Y+3,qR,qV,qB); + pix(X+2,Y+3,qR,qV,qB); + pix(X-1,Y+3,qR,qV,qB); + pix(X-2,Y+3,qR,qV,qB); + + pix(X-2,Y+2,qR,qV,qB); + pix(X-3,Y+2,qR,qV,qB); + pix(X+3,Y+2,qR,qV,qB); + pix(X+2,Y+2,qR,qV,qB); + + pix(X-3,Y+1,qR,qV,qB); + pix(X-4,Y+1,qR,qV,qB); + pix(X+3,Y+1,qR,qV,qB); + pix(X+4,Y+1,qR,qV,qB); +} + +void Extra_T(int X, int Y, char qr, char qv, char qb){ + pix(X+2,Y,qr,qv,qb); + pix(X+3,Y,qr,qv,qb); + + pix(X+1,Y+1,qr,qv,qb); + pix(X+2,Y+1,qr,qv,qb); + pix(X+3,Y+1,qr,qv,qb); + pix(X+4,Y+1,qr,qv,qb); + + pix(X,Y+2,qr,qv,qb); + pix(X+2,Y+2,qr,qv,qb); + pix(X+3,Y+2,qr,qv,qb); + pix(X+5,Y+2,qr,qv,qb); + + pix(X,Y+3,qr,qv,qb); + pix(X+1,Y+3,qr,qv,qb); + pix(X+2,Y+3,qr,qv,qb); + pix(X+3,Y+3,qr,qv,qb); + pix(X+4,Y+3,qr,qv,qb); + pix(X+5,Y+3,qr,qv,qb); + + pix(X,Y+4,qr,qv,qb); + pix(X+5,Y+4,qr,qv,qb); + + pix(X+1,Y+5,qr,qv,qb); + pix(X+4,Y+5,qr,qv,qb); +} void clown() // a éteindre { @@ -8,6 +91,20 @@ pix(14,18,2,0,2);pix(15,18,7,0,0);pix(16,18,7,0,0);pix(17,18,7,0,0);pix(18,18,2,0,2); pix(15,19,4,0,4);pix(16,19,4,0,4);pix(17,19,4,0,4); } + +void line_v( int X, char qr , char qv , char qb ){ + int i; + for(i=0;i<32;i++){ + pix(X,i,qr,qv,qb); + } +} + +void line_h( int Y, char qr , char qv , char qb ){ + int i; + for(i=0;i<32;i++){ + pix(i,Y,qr,qv,qb); + } +} void charr( int px , int py , char ch ) {