Voila le code que vs m'avez demandez elle fonctionne bien sur d'autre poste mais la mienne pas..............n'oublier pas d'utiliser le fichiers Egavga.Bgi........merci
code:
#include <graphics.h>
#include <time.h>
#include <stdlib.h>
#include <dos.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <conio.h>
// clock_t start, end;
time_t first, second;
char *scorec="0",str[2];
char *levelc,*bestpl;
int sortie,yes=0,mn1,sc1,pcw=0, ct=0,fsc=0,j, midx,midy,last=0, sc=0,mn=0;
char *scc="5";char *mnc;
char *fscc="7";
int score=0;
FILE *ali;
int txp[100];int typ[100];
int txo[100];int tyo[100];
int find,azerty=0;int w=0;
char *tempnom;
char *rien;
int level,sava=0;
int t[32]={-1,1,0,1,1,1,-1,0,1,1,0,1,1,0,1,1,-1,0,1,1,0,0,-1,0,1,-1,-1,-1,1,0,0,1};
char *bestsc;
int bestscor;
int i;
int echec=0;
int dirx=-12,diry=0,temp,tempx,tempy;
char *winner="TU AS ECHOUE !!!!!!!";
char ok[7];
char *pcpc="TU AS GAGNE !!!!!!!!!!";
char *fext[]={"0","1","2","3","4","5","6"};
void carre(int xx,int yy)
{
for (i=0;i<5;i++)
rectangle(xx-i,yy-i,xx+i,yy+i);
}
////////////////////////////////////////////////////////////////////////
void cercle(int xxxx,int yyyy)
{
int i;
for (i=0;i<9;i++)
{
circle(xxxx,yyyy,i);
}
}
///////////////////////////////*****************************///////////
void gagnant(char *ch1,char *ch2)
{
setbkcolor(1);
setcolor(9);
setfillstyle(1,4);
bar3d(5,5,getmaxx()-5,getmaxy()-5,10,5);
setcolor(14);
outtextxy(20,20," B R A V O ! ! ! !");
outtextxy(20,60," Y O U H A V E S U C C E E D I N T H E L E V E L N ");
outtextxy(490,60,ch1);
outtextxy(20,80," Y O U R S C O R E I S ");
outtextxy(240,80,ch2);
/*outtextxy (20,100, " T H E B E S T S C O R E I S ");
outtextxy(280,100,ch3);
outtextxy(20,120," F O R T H E B E S T P L A Y E R N A M E D");
outtextxy(420,120,ch4);*/
}
//////////////////generic=////////////////////
void generic()
{
cleardevice();
char ch[150];
for(i=0;i<151;i++)
ch [i]=-37;
i=20;
while((i<300)&&(!kbhit()))
{
i++;
setcolor(9);
outtextxy(5,getmaxy()/2, "I N S T R U C T I O N :");
setcolor(15);
outtextxy(midx-170,getmaxy()-5*i+100," I N F I R S T T I M E");
outtextxy(midx-170,getmaxy()-5*i+150," O N L Y O N E S T A G E ");
outtextxy(midx-170,getmaxy()-5*i+200," W A S O P E N ");
outtextxy(midx-170,getmaxy()-5*i+250," T O O P E N A N E W S T A G E ");
outtextxy(midx-170,getmaxy()-5*i+300," Y O U M U S T H A V E M O R E T H A N 1 0.0 0 0 $");
setcolor(14);
outtextxy(midx-170,getmaxy()-5*i+350," ");
outtextxy(midx-170,getmaxy()-5*i+400," W H E N Y O U S U C C E D");
outtextxy(midx-170,getmaxy()-5*i+450," I N T H E L A S T S T A G E - N ø 6 -");
outtextxy(midx-170,getmaxy()-5*i+500," Y O U B E A B L E T O R E C E V E I D ");
outtextxy(midx-170,getmaxy()-5*i+550," A 1 . 0 0 0 . 0 0 0 . 0 0 0 $ ");
outtextxy(midx-170,getmaxy()-5*i+600," F R O M A K W A Y C O R P O R A T I O N");
outtextxy(midx-170,getmaxy()-5*i+650," J U S T S E N D T O U S 1 0 $ T O:");
setcolor(4);
outtextxy(midx-170,getmaxy()-5*i+700," A K W A Y C O R P O R A T I O N ");
setcolor(14);
outtextxy(midx-170,getmaxy()-5*i+750," C A L I F O R N I A S T R E E T ");
outtextxy(midx-170,getmaxy()-5*i+800," W H A S H I N T O N D C");
outtextxy(midx-170,getmaxy()-5*i+850," U S A ");
setcolor(15);
outtextxy(midx-170,getmaxy()-5*i+1100," G O O D L U C K Y ");
if(i%55==0) delay(3000);
delay(100);
setcolor(0);
/* for (j=0;j<22;j++)
outtextxy(midx-200,getmaxy()-5*i+100+j*50,ch );
outtextxy(midx-200,getmaxy()-5*i,ch );*/
cleardevice();
}
cleardevice();
}
///////////////******************************////////////////////////
void attente(int pl,int yy)
{i=0;
while(!kbhit())
{
if((i%50)==0) setcolor(0);
if((i%100)==0) setcolor(14);
outtextxy(pl,yy,"_");
delay(1);
i++;
}
setcolor(15);
outtextxy(pl,yy,"_");
setcolor(4);
}
////////////////////////////////////////////////////////
void charg()
{
cleardevice();
outtextxy((getmaxx()/2)-150,(getmaxy()/2)-20,"C h a r g e m e n t E n C o u r s ...");
setcolor(9);
setbkcolor(0);
rectangle((getmaxx()/2)-150,(getmaxy()/2)-7,(getmaxx()/2)+180,(getmaxy()/2)+7);
floodfill((getmaxx()/2),(getmaxy()/2),9);
rectangle((getmaxx()/2)-152,(getmaxy()/2)-9,(getmaxx()/2)+182,(getmaxy()/2)+9);
setcolor(4);
for(i=0;i<330;i++)
{
if((i%15)==0) delay(10);
for(j=0;j<14;j++)
{
rectangle((getmaxx()/2)-150,(getmaxy()/2)-7,(getmaxx()/2)-150+i,(getmaxy()/2)-7+j);
}
}
cleardevice();
}
/////////////***********************************//////////////////
void sond(int snd)
{
setcolor(15);
setlinestyle(0,5,1);
rectangle(getmaxx()/2,15,(getmaxx()/2)+10,23);
line((getmaxx()/2)+10,15,(getmaxx()/2)+15,11);
line((getmaxx()/2)+10,23,(getmaxx()/2)+15,27);
line((getmaxx()/2)+15,11,(getmaxx()/2)+15,27);
line((getmaxx()/2)+15,11,(getmaxx()/2)+15,27);
if(snd==0)
{
setcolor(4);
setlinestyle(0,5,3);
line(getmaxx()/2,25,(getmaxx()/2)+17,11);
line(getmaxx()/2,14,(getmaxx()/2)+17,26);
}
}
void main()
{
char ch[150];
int k;
for(k=0;k<151;k++)
ch [k]=-37;
yes=0; pcw=0;ct=0;fsc=0;last=0;sc=0;mn=0;score=0;azerty=0;w=0; echec=0;dirx=-12;diry=0;
int style, x, y,sawt=1, userpat; char stylestr[40];
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, "");
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}
midx=getmaxx()/2;
i=20;
while((i<300)&&(k!=13))
{
i++;
setcolor(9);
outtextxy(0,getmaxy()/2, "I N S T R U C T I O N :");
setcolor(15);
outtextxy(midx-170,getmaxy()-5*i+100," I N F I R S T T I M E");
outtextxy(midx-170,getmaxy()-5*i+150," O N L Y O N E S T A G E ");
outtextxy(midx-170,getmaxy()-5*i+200," W A S O P E N ");
outtextxy(midx-170,getmaxy()-5*i+250," T O O P E N A N E W S T A G E ");
outtextxy(midx-170,getmaxy()-5*i+300," Y O U M U S T H A V E M O R E T H A N 1 0.0 0 0 $");
setcolor(14);
outtextxy(midx-170,getmaxy()-5*i+350," ");
outtextxy(midx-170,getmaxy()-5*i+400," W H E N Y O U S U C C E D");
outtextxy(midx-170,getmaxy()-5*i+450," I N T H E L A S T S T A G E - N ø 6 -");
outtextxy(midx-170,getmaxy()-5*i+500," Y O U B E A B L E T O R E C E V E I D ");
outtextxy(midx-170,getmaxy()-5*i+550," A 1 . 0 0 0 . 0 0 0 . 0 0 0 $ ");
outtextxy(midx-170,getmaxy()-5*i+600," F R O M A K W A Y C O R P O R A T I O N");
outtextxy(midx-170,getmaxy()-5*i+650," J U S T S E N D T O U S 1 0 $ T O :");
setcolor(4);
outtextxy(midx-170,getmaxy()-5*i+700," A K W A Y C O R P O R A T I O N ");
setcolor(14);
outtextxy(midx-170,getmaxy()-5*i+750," C A L I F O R N I A S T R E E T ");
outtextxy(midx-170,getmaxy()-5*i+800," W H A S H I N T O N D C");
outtextxy(midx-170,getmaxy()-5*i+850," U S A ");
setcolor(15);
outtextxy(midx-170,getmaxy()-5*i+1100," G O O D L U C K Y ");
if(i%55==0) delay(1700);
delay(50);
setcolor(0);
for (j=0;j<22;j++)
outtextxy(midx-200,getmaxy()-5*i+100+j*50,ch );
outtextxy(midx-200,getmaxy()-5*i,ch );
if(kbhit()!=0) k=getch();
}
// generic();
// exit(0);
cleardevice();
midx=getmaxx()/2;midy=getmaxy()/2;
setfillstyle(1,1);
setcolor(15);
outtextxy(midx-120, midy-50,"E N T E R Y O U R N A M E :");
bar3d(midx-150, midy-50, midx+150,midy+50, 10, 1);
setcolor(0);
setfillstyle(SOLID_FILL, getmaxcolor());
rectangle(midx-100, midy-10, midx+100,midy+10);
setcolor(14);
outtextxy(midx-135, midy-40,"E N T E R Y O U R N A M E : ");
floodfill(midx,midy,0);
attente(midx-90, midy);
str[1]=32;
str[0]=getch();
//if(isalpha(str[0]!=0))
setcolor(4);
ok[0]=str[0];
outtextxy(midx-90,midy,str);
attente(midx-75, midy);
str[0]=getch();
ok[1]=str[0];
outtextxy(midx-75, midy,str);
attente(midx-60, midy);
str[0]=getch();
ok[2]=str[0];
outtextxy(midx-60, midy,str);
attente(midx-45, midy);
str[0]=getch();
ok[3]=str[0];
outtextxy(midx-45, midy,str);
attente(midx-30, midy);
str[0]=getch();
ok[4]=str[0];
outtextxy(midx-30, midy,str);
attente(midx-15, midy);
str[0]=getch();
ok[5]=str[0];
outtextxy(midx-15, midy,str);
cleardevice();
outtextxy(midx/2,midy,"if you want to avoid sound animation press 0");
sawt=getch()-48;
// getch(); exit(0);
/*ali=fopen("liste","a+");
i=0; find=0; sava=0;
while(feof(ali)==0&&find==0)
{
if(fgetc(ali)==ok[i%6]) {sava++;}
i++;
if(sava==6) find=1;
else {if(i%6==0) sava=0;}
}
fclose(ali);
if(find==0) {level=0;ali=fopen("liste","a+");fputs(ok,ali);fclose(ali);
/*
strcpy(tempnom,nom);
strcat(tempnom,fext[0]);
ali=fopen(tempnom,"w+");fclose(ali);*/
//}
//else
{ level=0;
for(i=0;i<7;i++)
{
strcpy(tempnom,ok);
strcat(tempnom,fext[i]);
if((ali=fopen(tempnom,"r"))!=NULL) {level=i+1;}
}
}
okok:
if(level==7)
{
i=0;
cleardevice();
while(!kbhit())
{
i++;
delay(1);
setcolor(14);
if(i%150==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2-40," M r : ");
setcolor(4); if(i%100==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2-20,ok);if(i%100==0) {setcolor(0);yes=0;}
setcolor(14);if(i%100==0){setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2," C O N G R U A T I O N ");if(i%100==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2+20,"This game is under your Level ");if(i%100==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2+40,"Y o u A r e t h e b e s t "); if(i%100==0) {setcolor(0);yes=0;}
if(yes==0) {delay(1000);yes=1;}
}
exit(0);}
{ int vrai=1,okoko=0,b,x1,y1,cp,j,c,depx=1,speed,depy=0,pcy=300,pcx=200,k,a=0;
cleardevice();
//outtextxy(x/2-50,y/2,"si vous prefere avoir des animations sonores Press 1");
//sawt=getch()-48;
setbkcolor(0);
setcolor(15);
x= getmaxx();pcx=(x/2)+172;
y= getmaxy(); pcy=y/2;
setlinestyle(0, userpat, 3);
rectangle(0, 0, x,y);
rectangle(3, 3, x-3,y-3);
rectangle(7, 7, x-7,y-7);
rectangle(11,11, x-11,y-11);
outtextxy(x/2-150,y/2-100,"MR :");
setcolor(4);
outtextxy(x/2-100,y/2-100,ok);
setcolor(15);
outtextxy(x/2-20,y/2-100,"Choice a Level Please");
outtextxy(x/2-50,y/2,"LEVEL: ");
retour:
azerty=0;
a=0;
while(!kbhit())
{ a++;
setcolor(15);
if(azerty==0)
{ if(a%5==0) azerty=1;
setcolor(8);
if(level>=0) setcolor(14);
outtextxy(x/2-50,y/2+25,"0. Debutant");
setcolor(8);
if(level>=1) setcolor(14);
outtextxy(x/2-50,y/2+50,"1. Moins que le moyen");
setcolor(8);
if(level>=2) setcolor(14);
outtextxy(x/2-50,y/2+75,"2. Moyen");
setcolor(8);
if(level>=3) setcolor(14);
outtextxy(x/2-50,y/2+100,"3. Presque expert ");
setcolor(8);
if(level>=4) setcolor(14);
outtextxy(x/2-50,y/2+125,"4. Expert");
setcolor(8);
if(level>=5) setcolor(14);
outtextxy(x/2-50,y/2+150,"5. Expert+");
setcolor(8);
if(level>=6) setcolor(14);
outtextxy(x/2-50,y/2+175,"6. Expert++");
delay(100);
}
else {azerty=0;
setcolor(8);
outtextxy(x/2-50,y/2+25,"0. Debutant");
outtextxy(x/2-50,y/2+50,"1. Moins que le moyen");
outtextxy(x/2-50,y/2+75,"2. Moyen");
outtextxy(x/2-50,y/2+100,"3. Presque expert ");
outtextxy(x/2-50,y/2+125,"4. Expert");
outtextxy(x/2-50,y/2+150,"5. Expert+");
outtextxy(x/2-50,y/2+175,"6. Expert++");
delay(100);
} }
setcolor(15);
c=getch();
if(c==level+48) { if(c!=53) {speed=70-(c-48)*10;}
if(c==53) {speed=15;}
if(c==54) {speed=7;}}
else goto retour;
char *mn0;
itoa(speed,mn0,10);
//outtextxy(300,300,mn0);
cleardevice();
charg();
sond(sawt);
setcolor(15);
setlinestyle(0, userpat, 3);
rectangle(40, 40, x-40,y-40);
rectangle(43, 43, x-43,y-43);
rectangle(47, 47, x-47,y-47);
rectangle(51,51, x-51,y-51);
setcolor(3);
outtextxy(getmaxx()/2-100,2*midy-15," W E L C O M E ");
setcolor(5);
outtextxy(getmaxx()/2+40,2*midy-15,ok);
setcolor(2);
outtextxy(7,midy-150,"L");
outtextxy(7,midy-120,"E");
outtextxy(7,midy-90,"V");
outtextxy(7,midy-60,"E");
outtextxy(7,midy-30,"L");
itoa(level,levelc,10);
setcolor(15);
outtextxy(7,midy+10,levelc);
setcolor(15);
outtextxy(getmaxx()/2-50,y/2,"To start Press Any Key");
getch();
setcolor(0);
for(i=0;i<180;i++)
{
for(j=0;j<30;j++)
{
rectangle(getmaxx()/2-50,y/2-10,getmaxx()/2-50+i,y/2-10+j);
}}
x1=x/=2;x-=200;
y1=y/=2;
okoko=0; sc=0;
w=0;
if(level>4)
{
setcolor(14);
for(j=-7;j<8;j++)
{ carre(x1+4-12*j,y1-72);
carre(x1+4-12*j,y1+72);
}
for(j=-6;j<7;j++)
{
carre(x1+4,y1-12*j);}}
struct time temps;
gettime(&temps);
sc1=temps.ti_sec;
mn1=temps.ti_min;
first = time(NULL); /* Gets system*/
//////////////////////////////////////////////////////////////
while(vrai==1&&echec==0)
{
outtextxy(400,10,"press (Esc) for Pause");
if(okoko%100==0)
{ second = time(NULL);
sc=difftime(second,first);
setcolor(3);
if(sc==60) {mn++;sc=0; first = time(NULL);}
itoa(sc,scc,10);
itoa(mn,mnc,10);
setcolor(0);
setfillstyle(1,0);
fillellipse(170, 5,100,15);
setcolor(14);
outtextxy(0,5,"Compteur:");
outtextxy(125,5,scc);
outtextxy(115,5,":");
outtextxy(100,5,mnc);
}
// itoa(fsc,fscc,10);
// outtextxy(155,5,fscc);
delay(1);
if (ct==speed) {
if(getpixel(x+depx*5,y+depy*5)!=0) {vrai=0;pcw=1;}
setcolor(5); carre(x,y);ct=0;
txp[w]=x;
typ[w]=y;
x+=depx*12;
y+=depy*12;
for(i=0;i<5;i++)
{
if(getpixel(x+depx*5,y+depy*5)!=0) {vrai=0;pcw=1;}
} }
ct++;
if(kbhit())
{
c=getch();
if(c==77&&c!=last+2) {depx=1;depy=0;last=c;}
if(c==72&&c!=last-8) {depx=0;depy=-1;last=c;}
if(c==80&&c!=last+8) {depx=0;depy=1;last=c;}
if(c==75&&c!=last-2) {depx=-1;depy=0;last=c;}
if(c==27) getch();
}
setcolor(9);
okoko++;
if(ct==1) {
if(getpixel(pcx,pcy)!=0) goto end;
carre(pcx,pcy);
temp=getpixel(pcx+1*dirx,pcy+1*diry);
cp=0;
while(temp!=0&&echec==0)
{ cp++;
if(cp==150) goto end;
tempx=t[random(27)];
tempy=t[random(tempx*5+25)];
if(abs(tempx)!=abs(tempy))
{
temp=getpixel(pcx+tempx*12,pcy+tempy*12);
if(temp==0) {dirx=tempx*12;diry=tempy*12;goto ok;}
}
}
//echec=getpixel(pcx+dirx,pcy+diry);
ok:
if (level<5) {txo[w]=pcx;tyo[w]=pcy;w++;}
pcx+=dirx;
pcy+=diry;
}
}
end:if (level<5) {txo[w]=pcx;tyo[w]=pcy;w++;}; sleep(1);//cleardevice();
if(sawt!=0) {sound(20);}delay(500);nosound();
if(pcw==1) {if(echec==1) {setbkcolor(4);outtextxy(2,getmaxy()/2,"TAADEL");}
else {setbkcolor(4);outtextxy(getmaxx()/2,getmaxy()/2,winner);}}
else {
//setbkcolor(0);
setcolor(15);
for(i=0;i<100;i++)
{ outtextxy(getmaxx()/2-78,getmaxy()/2,pcpc);setcolor(1);
circle(x1,y1,i);
if(sawt!=0) {sound(10*i);}
delay(10);nosound();
setcolor(10);
}
setcolor(0);
for(i=100;i>-1;i--)
{circle(x1,y1,i);
if(sawt!=0) {sound(10*i);}
delay(10);nosound();
setcolor(0);
}
setfillstyle(1,1);
setlinestyle(0, 1, 1);
setcolor(9);
bar3d(getmaxx()/2-105, getmaxy()/2-50,getmaxx()/2+105,getmaxy()/2+50, 10,1);
score=(13000-okoko)+1000*level;
setcolor(14);
if(score>10000)
{
strcpy(tempnom,ok);
strcat(tempnom,fext[level]);
ali=fopen(tempnom,"w+");
fclose(ali);
if((ali=fopen(tempnom,"a+"))!=NULL) {if(sawt!=0) sound(220);delay(50);nosound();}
itoa(score,scorec,10);
outtextxy(x1-75,y1-25,"Your score Is ");
outtextxy(x1-50,y1,scorec);
i=0;while(i<800) {if(sawt!=0) sound(35*i);i++;delay(1);nosound();} nosound();
setcolor(15);
gagnant(levelc,scorec);
delay(500);
if(level==6)
{
cleardevice();
setbkcolor(0);
while(!kbhit())
{
i++;
delay(1);
setcolor(14);
if(i%150==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2-40," M r : ");
setcolor(4); if(i%100==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2-20,ok);if(i%100==0) {setcolor(0);yes=0;}
setcolor(14);if(i%100==0){setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2," C O N G R U A T I O N ");if(i%100==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2+20,"Y O U H A V E W I N N I N G A ");if(i%100==0) {setcolor(0);yes=0;}
outtextxy(getmaxx()/2-100,getmaxy()/2+40,"1 . 0 0 0 . 0 0 0 . 0 0 0 $ ");
outtextxy(midx-170,getmaxy()/2+60," F R O M A K W A Y C O R P O R A T I O N");
outtextxy(midx-170,getmaxy()/2+80," J U S T S E N D T O U S 1 0 $ T O :");
setcolor(4);
outtextxy(midx-170,getmaxy()/2+100," A K W A Y C O R P O R A T I O N ");
if(i%100==0) {setcolor(0);yes=0;}
if(yes==0) {delay(1000);yes=1;}
}
exit(0);}
if((level<5)&&(w<60)&&score>10000)
{
cleardevice();
setbkcolor(0);
setcolor(14);
outtextxy(100,midy,"T O S E E R E P L A Y P R E S S E N T E R");
j=0;
while(j!=13) j=getch();
cleardevice();
while(!kbhit())
{
setcolor(15);
replayy:
outtextxy(midx,getmaxy()-5,"REPLAY");
setcolor(0);delay(200);
// for(j=midx-90;j<midx+90;j++) cercle(j,10);
setfillstyle(1,15);
bar3d(midx-110,2,midx+90,18,1,1);//cercle(midx-90,10);cercle(midx+90,10);
int poly[6]={midx-95,7,midx-85,10,midx-95,13};
//int poly1[6]={midx-100,7,midx-90,10,midx-100,13};
setfillstyle(1,4);
fillpoly(3,poly);
//fillpoly(3,poly1);
j=-1;
int k=0,coef;
coef=160/w;
setcolor(14);
outtextxy(midx-25,23 ,"REPLAY");
outtextxy(midx-125,2*midy-23 ,"PRESS ANY KEY TO ABORD");
while(k<w-1||j<w+1)
{ int m;
j++;
//sound(220);
nosound();
//if(j==w+1) goto replayy;
setcolor(15);
setlinestyle(0,1,3);
setcolor(8);
line(midx-80,10,midx+80,10);
for(m=0;m<3;m++)
{ setcolor(8);circle(midx-80+k*coef,10,m);}
delay(100);
setcolor(15) ;circle(midx-80+k*coef,10,m);
setcolor(8);
line(midx-80,10,midx+80,10);
//printf("%d\n",txp[i]);
setcolor(5);
carre(txp[j],typ[j]);
setcolor(9);
carre(txo[j],tyo[j]);
k++;
}
setcolor(5);
carre(txp[w+1],typ[w+1]);
setcolor(9);
carre(txo[w+1],tyo[w+1]);
delay(400);
cleardevice();
setbkcolor(0);
}
}
}
else {
setcolor(14);
outtextxy(x1-75,y1-35,"Your score is under ");
outtextxy(x1-25,y1-10," 10 000 $");
outtextxy(x1-75,y1+15,"So You Can't Pass To");
outtextxy(x1-25,y1+35," Next Stage ");
sleep(4);
}
}setfillstyle(1,1);
setlinestyle(0, 1, 1);
setcolor(9);
bar3d(getmaxx()/2-105, getmaxy()/2-50,getmaxx()/2+105,getmaxy()/2+50, 10,1);
setcolor(14);
outtextxy(x1-70,y1-25," TO Quit Press");
outtextxy(x1-70,y1, " Any Key:)");
getch();
cleardevice();
setbkcolor(0);
}
i=30;
while(i<300&&!kbhit())
{
i++;
setcolor(15);
outtextxy(midx-270,getmaxy()-5*i+100," C E J E U X E S T R E A L I S E");
outtextxy(midx-270,getmaxy()-5*i+150," L E 1 8 M A R S 2 0 0 4");
outtextxy(midx-270,getmaxy()-5*i+200," D A N S ");
outtextxy(midx-270,getmaxy()-5*i+250," L E S L A B O R A T O I R E S D E : ");
outtextxy(midx-270,getmaxy()-5*i+300," A K W A Y C O R P O R A T I O N ");setcolor(14);
outtextxy(midx-270,getmaxy()-5*i+550," T O G O T H E R ");
outtextxy(midx-270,getmaxy()-5*i+600," D E V E L O P P I N G ");
outtextxy(midx-270,getmaxy()-5*i+650," O U R W E B S I T E ");setcolor(15); if(i%2==0) setcolor(2);
outtextxy(midx-270,getmaxy()-5*i+700," http://ensi.site.voila.fr ");setcolor(14);
outtextxy(midx-270,getmaxy()-5*i+750," P A R T I C I P I N G I N F O R U M ");
outtextxy(midx-260,getmaxy()-5*i+800," S E N D I N G Y O U R P R O J E T S");
outtextxy(midx-270,getmaxy()-5*i+850," W I T H C O D E S O U R S E ");
outtextxy(midx-270,getmaxy()-5*i+900," E-MAIL:bliml@wapda.com");
setcolor(15);
outtextxy(midx-70,getmaxy()-5*i+1100," G O O D L U C K Y ");
if(i%55==0) delay(3000);
delay(50);
setcolor(0);
/* for (j=0;j<22;j++)
outtextxy(midx-300,getmaxy()-5*i+100+j*50,ch);
outtextxy(midx-300,getmaxy()-5*i,ch);*/
cleardevice();
}
/*
cleardevice();
setcolor(15);
outtextxy(300,300,"REPLAY");
sleep(2);
cleardevice();
for(i=0;i<=w;i++)
{
printf("%d\n",txp[i]);
setcolor(5);
carre(txp[i],typ[i]);
//setcolor(9);
//carre(txo[i],tyo[i]);
delay(100);
}
/* clean up */
closegraph();
}