#include <dos.h>
#include <math.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <graphics.h>
#include<string.h>
#define ESC 0x1b /* Define the escape key */
#define TRUE 1 /* Define some handy constants */
#define FALSE 0 /* Define some handy constants */
#define PI 3.14159 /* Define a value for PI */
#define ON 1 /* Define some handy constants */
#define OFF 0 /* Define some handy constants */
#define NFONTS 11
#define ON 1
#define OFF 0
cursor(int on)
{
int curx,oc;
char ub[2]={'_',0};
if(!(on))
{
oc=getcolor();
setcolor(getbkcolor());
}
curx=getx();
outtext(ub);
moveto(curx,gety());
if(!on)
setcolor(oc);
}
void getstring(char *input)
{
int std=0,oc;
char ch,out[2];
int xval[255];
out[1]=0;
xval[0]=getx();
do
{
cursor(ON);
ch=getch();
cursor(OFF);
if(ch==0)
getch();
else
{
if(ch==8)
{
oc=getcolor();
--std;
if(std<0)
std=0;
moveto(xval[std],gety());
setcolor(getbkcolor());
out[0]=input[std];
outtext(out);
moveto(xval[std],gety());
setcolor(oc);
}
else
{
input[std]=ch;
out[0]=ch;
outtext(out);
++std;
xval[std]=getx();
}
}
}while(ch!=13&&ch!=10);
input[std]=0;
}
void newline(void)
{
moveto(0,gety()+textheight("A"));
}
//delay(200);
//nosound();
void DebmediaDemo(void)
{
int seed = 1958;
int i, x, y, h, w, color,MaxColors;
struct viewporttype vp;
char msg[80];
// MainWindow( "PutPixel / GetPixel Demonstration" );
getviewsettings( &vp );
h = vp.bottom - vp.top;
w = vp.right - vp.left;
srand( seed ); /* Restart random # function */
for( i=0 ; i<600 ; ++i )
{ /* Put 5000 pixels on screen */
if(i==200)
{
settextstyle(TRIPLEX_FONT,HORIZ_DIR,7);
setcolor(RED);
sprintf(msg,"It's a");
outtextxy(220,25,msg);
}
if(i==300)
{
settextstyle(TRIPLEX_FONT,HORIZ_DIR,9);
setcolor(LIGHTBLUE);
sprintf(msg,"Debmedia");
outtextxy(95,100,msg);
}
if(i==400)
{
settextstyle(TRIPLEX_FONT,HORIZ_DIR,7);
setcolor(YELLOW);
sprintf(msg,"Presentation");
outtextxy(125,230,msg);
}
if(i==550)
{
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
setcolor(GREEN);
sprintf(msg,"Developed on 28th August 2003");
outtextxy(65,335,msg);
}
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
setbkcolor(BLUE);
color = random( MaxColors );
putpixel( x, y, color );
}
}
void PutPixelDemo(void)
{
int seed = 1958;
int i, x, y, h, w, color,MaxColors;
struct viewporttype vp;
// MainWindow( "PutPixel / GetPixel Demonstration" );
getviewsettings( &vp );
h = vp.bottom - vp.top;
w = vp.right - vp.left;
srand( seed ); /* Restart random # function */
for( i=0 ; i<5000 ; ++i ){ /* Put 5000 pixels on screen */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = random( MaxColors );
putpixel( x, y, color );
}
srand( seed ); /* Restart Random # at same # */
for( i=0 ; i<5000 ; ++i ){ /* Take the 5000 pixels off */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = getpixel( x, y ); /* Read the color pixel */
if( color == random( MaxColors ) ) /* Used to keep RANDOM in sync */
putpixel( x, y, 0 ); /* Write pixel to BLACK */
}
// Pause(); /* Wait for user's response */
}
void PixelDemo(void)
{
int seed = 1958;
int i, x, y, h, w, color,MaxColors;
struct viewporttype vp;
// MainWindow( "PutPixel / GetPixel Demonstration" );
getviewsettings( &vp );
h = vp.bottom - vp.top;
w = vp.right - vp.left;
srand( seed ); /* Restart random # function */
for( i=0 ; i<10000 ; ++i ){ /* Put 5000 pixels on screen */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = random( MaxColors );
putpixel( x, y, color );
}
srand( seed ); /* Restart Random # at same # */
for( i=0 ; i<10000 ; ++i ){ /* Take the 5000 pixels off */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = getpixel( x, y ); /* Read the color pixel */
if( color == random( MaxColors ) ) /* Used to keep RANDOM in sync */
putpixel( x, y, 0 ); /* Write pixel to BLACK */
}
// Pause(); /* Wait for user's response */
}
void Pixel2Demo(void)
{
int seed = 1958;
int i, x, y, h, w, color,MaxColors;
struct viewporttype vp;
// MainWindow( "PutPixel / GetPixel Demonstration" );
getviewsettings( &vp );
h = vp.bottom - vp.top;
w = vp.right - vp.left;
srand( seed ); /* Restart random # function */
for( i=0 ; i<7000 ; ++i ){ /* Put 5000 pixels on screen */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = random( MaxColors );
putpixel( x, y, color );
}
srand( seed ); /* Restart Random # at same # */
for( i=0 ; i<7000 ; ++i ){ /* Take the 5000 pixels off */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = getpixel( x, y ); /* Read the color pixel */
if( color == random( MaxColors ) ) /* Used to keep RANDOM in sync */
putpixel( x, y, 0 ); /* Write pixel to BLACK */
}
// Pause(); /* Wait for user's response */
}
void Pixel3Demo(void)
{
int seed = 1958;
int i, x, y, h, w, color,MaxColors;
struct viewporttype vp;
// MainWindow( "PutPixel / GetPixel Demonstration" );
getviewsettings( &vp );
h = vp.bottom - vp.top;
w = vp.right - vp.left;
srand( seed ); /* Restart random # function */
for( i=0 ; i<3000 ; ++i ){ /* Put 5000 pixels on screen */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = random( MaxColors );
putpixel( x, y, color );
}
srand( seed ); /* Restart Random # at same # */
for( i=0 ; i<25000 ; ++i ){ /* Take the 5000 pixels off */
x = 1 + random( w - 1 ); /* Generate a random location */
y = 1 + random( h - 1 );
color = getpixel( x, y ); /* Read the color pixel */
if( color == random( MaxColors ) ) /* Used to keep RANDOM in sync */
putpixel( x, y, 0 ); /* Write pixel to BLACK */
}
// Pause(); /* Wait for user's response */
}
void PutImageDemo(void)
{
static int r = 30;
static int StartX = 100;
static int StartY = 50;
struct viewporttype vp;
int PauseTime, x, y, ulx, uly, lrx, lry, size, i, width, height, step;
void *Saucer;
int MaxX,MaxY,MaxColors,count=0,cnt=0;
char msg[80];
//MainWindow("GetImage / PutImage Demonstration");
getviewsettings( &vp );
/* Draw Saucer */
setfillstyle( SOLID_FILL, RED);
fillellipse(StartX, StartY, r, (r/3)+2);
ellipse(StartX, StartY-4, 190, 357, r, r/3);
/*line(StartX+7, StartY-6, StartX+10, StartY-12);
circle(StartX+10, StartY-12, 2);
line(StartX-7, StartY-6, StartX-10, StartY-12);
circle(StartX-10, StartY-12, 2);
/* Read saucer image */
ulx = StartX-(r+1);
uly = StartY-14;
lrx = StartX+(r+1);
lry = StartY+(r/3)+3;
width = lrx - ulx + 1;
height = lry - uly + 1;
size = imagesize(ulx, uly, lrx, lry);
Saucer = malloc( size );
getimage(ulx, uly, lrx, lry, Saucer);
putimage(ulx, uly, Saucer, XOR_PUT);
/* Plot some "stars" */
/* for ( i=0 ; i<1000; ++i )
putpixel(random(MaxX), random(MaxY), random( MaxColors-1 )+1);*/
x = MaxX / 2;
y = MaxY / 2;
PauseTime = 100;
/* until a key is hit */
//while ( !kbhit() )
//{
while(1)
{
count++;
if(count>90)
break;
if(count<=90)
{
/* Draw the Saucer */
sound(50);
putimage(x, y, Saucer, XOR_PUT); /* draw image */
delay(PauseTime);
putimage(x, y, Saucer, XOR_PUT); /* erase image */
/* Move Saucer */
step = random( r );
if ((step/4) % 2 != 0 )
step = -1 * step;
x = x + step;
step = random( r );
if ((step/2) % 2 != 0 )
step = -1 * step;
y = y + step;
if (vp.left + x + width - 1 > vp.right)
x = vp.right-vp.left-width + 1;
else
if (x < 0)
x = 0;
if (vp.top + y + height - 1 > vp.bottom)
y = vp.bottom-vp.top-height + 1;
else
if (y < 0)
y = 0;
nosound();
} //closing of second if.
}//closing of indefinite while loop.
free( Saucer );
//Pause();
}
void PutImage2Demo(void)
{
static int r = 30;
static int StartX = 100;
static int StartY = 50;
struct viewporttype vp;
int PauseTime, x, y, ulx, uly, lrx, lry, size, i, width, height, step;
void *Saucer;
int MaxX,MaxY,MaxColors,count=0,cnt=0;
char msg[80];
//MainWindow("GetImage / PutImage Demonstration");
getviewsettings( &vp );
/* Draw Saucer */
setfillstyle( SOLID_FILL, RED);
fillellipse(StartX, StartY, r, (r/3)+2);
ellipse(StartX, StartY-4, 190, 357, r, r/3);
/*line(StartX+7, StartY-6, StartX+10, StartY-12);
circle(StartX+10, StartY-12, 2);
line(StartX-7, StartY-6, StartX-10, StartY-12);
circle(StartX-10, StartY-12, 2);
/* Read saucer image */
ulx = StartX-(r+1);
uly = StartY-14;
lrx = StartX+(r+1);
lry = StartY+(r/3)+3;
width = lrx - ulx + 1;
height = lry - uly + 1;
size = imagesize(ulx, uly, lrx, lry);
Saucer = malloc( size );
getimage(ulx, uly, lrx, lry, Saucer);
putimage(ulx, uly, Saucer, XOR_PUT);
/* Plot some "stars" */
/* for ( i=0 ; i<1000; ++i )
putpixel(random(MaxX), random(MaxY), random( MaxColors-1 )+1);*/
x = MaxX / 2;
y = MaxY / 2;
PauseTime = 100;
/* until a key is hit */
//while ( !kbhit() )
//{
while(1)
{
count++;
if(count>90)
break;
if(count<=90)
{
cnt++;
if(cnt==40)
{
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
setcolor(BLUE);
moveto(160,80);
outtext("Bye Bye my friend");
}
if(cnt==70)
{
settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);
setcolor(YELLOW);
moveto(90,170);
outtext("I am waiting for you");
}
/* Draw the Saucer */
sound(50);
putimage(x, y, Saucer, XOR_PUT); /* draw image */
delay(PauseTime);
putimage(x, y, Saucer, XOR_PUT); /* erase image */
/* Move Saucer */
step = random( r );
if ((step/4) % 2 != 0 )
step = -1 * step;
x = x + step;
step = random( r );
if ((step/2) % 2 != 0 )
step = -1 * step;
y = y + step;
if (vp.left + x + width - 1 > vp.right)
x = vp.right-vp.left-width + 1;
else
if (x < 0)
x = 0;
if (vp.top + y + height - 1 > vp.bottom)
y = vp.bottom-vp.top-height + 1;
else
if (y < 0)
y = 0;
nosound();
} //closing of second if.
}//closing of indefinite while loop.
free( Saucer );
//Pause();
}
void disconnect(void)
{
settextstyle(TRIPLEX_FONT,HORIZ_DIR,3);
setcolor(YELLOW);
moveto(40,100);
outtext("Your connection is disconnected by them");
}
void main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int bkcolor, midx=300, midy=300,xx=0,yy=30,count=0,j=0,d=0;
FILE *fp;
char as[]={"To,"};
char my[]={" My friend of Earth "};
char as2[]={"From,"};
char fro[]={" your friend of Mars "};
char w[]={"Hi.I am your friend from Mars."};
char e[]={"I promised you 2 give you a mail.So I am giving you this small mail."};
char l[]={"I wish that you enjoy your life happily and keep smiling.Again I am telling you that I am waiting for you.Bye Bye my friend."};
char mail1[]={"However,I am very pleased because you made a friendship with"};
char mail2[]={"me and also gave me such a nice name.So,I should also give you"};
char mail3[]={"something so that you feel that I am a great friend of you."};
char mail4[]={"So,I will send you a mail from me to you,only for you."};
char mail5[]={"This is a PROMISE of your friend of other world."};
char from[]={"However,do you want to know where I am living?"};
char yknow[]={"I live in your friendly planet 'Mars'.Yes my planet is Mars."};
char nknow[]={"But I want to inform you from where I contact you."};
char best[]={"Best of luck"};
char ready[]={"Now you are ready for a m em orable chatting."};
char eyes[]={"So you make your eyes still and get ready for this m agic"};
char response[]={"Fantastic.Your computer gets a response from other planet"};
char now[]={"So,You get ready for any unforgettable happening now"};
char ufo[]={"There is a UFO spinning round in the sky.Is it visible 2 U?"};
char sometime[]={"Don't get exited.You will also see this after some time."};
char seeufo[]={"Now.You can see this through your naked eyes.Can you imagine?"};
char power[]={"Oh ho.They sent some message and I am trying to receive it."};
char distance[]={"Yes.I can made a contact with them .The distance between"};
char decrease[]={"us has decreased.Now the countdown begins"};
char luky[]={"You are very lucky. Because they receive your m assege."};
char con[]={"Now they m ust m ake a contact w ith you. Can you handle it?"};
char welcome[]={"Welcome in our planet"},msg[80],yes[80];
char contact[]={"You have made a contact with us and we agree with it."},ms;
char continu[]={"Now You can continue talking with our representative.Thank You."};
char start[]={"Hello. If I am right then it is Earth.Right?"};
char yearth[]={"Then I am very lucky because I made a contact with Earth"};
char nearth[]={"But I know that it is Earth.My technology says to me that."};
char how[]={"However, How are you? I think You are well. Isn't it?"};
char ywell[]={"That's well.Then it is perfect time to gossip.yeah?"};
char nwell[]={"Ohhhh.That's very sad.But I will try to make your mood on."};
char frend[]={"Now, being a representative of our planet, I would like to make a"};
char frendship[]={"Friendship with you.If U agree,then I will continue.Are you want so?"};
char yfrend[]={"That's excellent.Then I have got a friend from Earth."};
char nfrend[]={"Ohhh.You don't want to make a friendship between two people of"};
char bad[]={"different worlds.Then I will inform our citizens that the people of"};
char thanks[]={"Earth don't want to make friendship with us.Thanks for contact.Bye."};
char yourname[]={"So, Now you tell me what's your name?"};
char goodname[]={"Oahh.That's a beautifull name.But I tell you a truth that"};
char newname[]={"it is totally new to me.However, would you like to know"};
char myname[]={"what's my name?"};
char yet[]={"Although you don't want to know my name, yet I will inform you"};
char inform[]={"what my name is."};
char cannot1[]={"Ha Ha.You can't understand,right?In your language,there"};
char cannot2[]={"are no character to write my name.Your computer have"};
char cannot3[]={"some of them.So,I displayed it on your computer screen."};
char cannot4[]={"But have you noticed that there are some spaces in my"};
char cannot5[]={"name?This is just B'coz your computer also have"};
char cannot6[]={"not all characters of our language.I think you'll understand."};
char givename[]={"However, If you want to give me a name then you can do so."};
char give[]={"A friend from other planet requests you,please give me a name"};
char nicename[]={"Thank you very much to give me such nice name.Thank you."};
char call[]={"Oh ho.Our planet is calling me.So,I have to go now.May I go?"};
char sad[]={"Although I also don't want to go, but I have to leave."};
char connection[]={"Because our spaceship is going out of range of signal"};
char moment[]={"This is a very sad moment of my life.Because this is the "};
char go[]={"time to end our conversation.But my dear friend, don't get"};
char feel[]={"upset, because we will meet again.Yes,this is my PROMISE 2 U."};
char tata[]={"Bye Bye m y dear.I hope that"};
char meeta[]={"we'll m eet again very soon"};
char elian[80],name[80];
int i,MaxX,MaxY,color,MaxColors,PauseTime,x,y,h;
int k,m,s;
// initialize graphics and local variables
initgraph(&gdriver, &gmode, "");
cleardevice();
delay(200);
moveto(10,30);
outtext("Connecting to another world");
sleep(2);
moveto(100,290);
outtext("Ready to connect..");
sound(100);
delay(1000);
nosound();
delay(1000);
sound(100);
delay(1000);
nosound();
delay(1000);
sound(100);
delay(1000);
nosound();
delay(1000);
sound(100);
delay(1000);
nosound();
sleep(2);
moveto(10,330);
outtext("And now You get ready because it would connect to the space");
sleep(4);
cleardevice();
PutPixelDemo();
for(i=0;i<=600;i++)
{
count++;
if(count==50)
Pixel2Demo();
if(count==100)
Pixel3Demo();
if(count==150)
Pixel2Demo();
if(count==200)
Pixel3Demo();
if(count==250)
Pixel2Demo();
if(count==300)
PutPixelDemo();
if(count==350)
Pixel2Demo();
if(count==400)
Pixel3Demo();
if(count==450)
Pixel2Demo();
if(count==500)
PutPixelDemo();
if(count==550)
Pixel2Demo();
delay(10);
sound(exp(i+50));
sound(exp(i+50));
sound(exp(i+50));
}
nosound();
count=0;
if( gdriver==EGA || gdriver==EGALO || gdriver==VGA )
sleep(1);
setcolor(WHITE);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,2);
xx=10;yy=80;
for(i=0;ready[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",ready[i]);
outtextxy(xx,yy,msg);
delay(200);
}
setcolor(RED);
xx=10;yy=110;
for(i=0;eyes[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",eyes[i]);
outtextxy(xx,yy,msg);
delay(200);
}
delay(500);
PutPixelDemo();
delay(300);
Pixel2Demo();
delay(200);
Pixel3Demo();
delay(300);
Pixel2Demo();
delay(200);
PutPixelDemo();
delay(300);
Pixel3Demo();
sleep(1);
cleardevice();
PutPixelDemo();
settextstyle(TRIPLEX_FONT,HORIZ_DIR,2);
setcolor(WHITE);
moveto(20,200);
outtext("Now,You wait for a reply from them.");
sleep(1);
moveto(20,230);
outtext("You remember that you are a representative of Earth.");
sleep(3);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
setcolor(YELLOW);
xx=150;yy=260;
for(i=0;best[i]!='\0';i++)
{
xx=xx+20;
sprintf(msg,"%c",best[i]);
outtextxy(xx,yy,msg);
delay(200);
}
sleep(3);
cleardevice();
Pixel2Demo();
settextstyle(SMALL_FONT,HORIZ_DIR,6);
setcolor(YELLOW);
moveto(250,67);
outtext("Waiting for response");
setfillstyle(SOLID_FILL,BLUE);
bar(453,60,480,82);
for(i=0;i<=80;i++)
{
count++;
if(count==20)
{
moveto(10,120);
outtext("If your computer could catch any response from any other planets");
moveto(10,135);
outtext("then it informs");
moveto(155,135);
outtext("you by beep sound");
}
gotoxy(59,5);
printf("%c",47);
delay(100);
gotoxy(59,5);
printf("\\");
delay(100);
gotoxy(59,5);
printf("%c",196);
delay(100);
}
delay(2000);
sound(500);
delay(500);
nosound();
delay(500);
sound(500);
delay(500);
nosound();
sleep(4);
setcolor(YELLOW);
xx=10;yy=200;
for(i=0;response[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",response[i]);
outtextxy(xx,yy,msg);
delay(300);
}
delay(800);
xx=10;yy=230;
for(i=0;now[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",now[i]);
outtextxy(xx,yy,msg);
delay(300);
}
delay(2000);
cleardevice();
Pixel3Demo();
xx=10;yy=200;
for(i=0;ufo[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",ufo[i]);
outtextxy(xx,yy,msg);
delay(200);
}
delay(500);
xx=10;yy=250;
for(i=0;sometime[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",sometime[i]);
outtextxy(xx,yy,msg);
delay(200);
}
sleep(2);
cleardevice();
PutPixelDemo();
PutImageDemo();
Pixel2Demo();
setcolor(WHITE);
xx=10;yy=250;
for(i=0;seeufo[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",seeufo[i]);
outtextxy(xx,yy,msg);
delay(300);
}
sleep(2);
setcolor(RED);
xx=2;yy=300;
for(i=0;power[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",power[i]);
outtextxy(xx,yy,msg);
delay(300);
}
delay(700);
setcolor(WHITE);
moveto(10,330);
outtext("Please wait for some time...");
sleep(4);
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=10;yy=10;
for(i=0;distance[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",distance[i]);
outtextxy(xx,yy,msg);
delay(200);
}
xx=10;yy=25;
for(i=0;decrease[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",decrease[i]);
outtextxy(xx,yy,msg);
delay(200);
}
sleep(2);
gotoxy(25,4);
printf("Distance:");
gotoxy(45,4);
printf("crore k.m.");
for(k=7;k>0;k--)
{
gotoxy(35,4);
printf("%d",k);
for(m=9;m>=1;m--)
{
gotoxy(38,4);
printf("%d",m);
for(s=100;s>=1;s--)
{
gotoxy(41,4);
printf("%d",s);
delay(1);
}
}
}
gotoxy(35,4);
printf("0 0 0 k.m. ");
delay(500);
sound(700);
delay(2000);
nosound();
sleep(1);
settextstyle(SMALL_FONT,HORIZ_DIR,6);
moveto(100,90);
outtext("Now we send a message to them for recieving");
sleep(3);
setfillstyle(SOLID_FILL,BLUE);
bar(40,120,130,170);
for(i=0;i<=10;i++)
{
delay(500);
setcolor(YELLOW);
moveto(50,130);
outtext("Sending");
delay(500);
setfillstyle(SOLID_FILL,BLUE);
bar(40,120,130,170);
}
sound(500);
delay(2000);
nosound();
setfillstyle(SOLID_FILL,YELLOW);
bar(495,120,590,170);
for(i=0;i<=10;i++)
{
delay(500);
setcolor(BLUE);
moveto(500,130);
outtext("Receiving");
delay(500);
setfillstyle(SOLID_FILL,YELLOW);
bar(495,120,590,170);
}
xx=0;yy=200;
setcolor(WHITE);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,2);
for(i=0;luky[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",luky[i]);
outtextxy(xx,yy,msg);
delay(200);
}
xx=0;yy=220;
setcolor(YELLOW);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,2);
for(i=0;con[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",con[i]);
outtextxy(xx,yy,msg);
delay(200);
}
sleep(3);
cleardevice();
PutPixelDemo();
//count=0;
for(i=0;i<=5;i++)
{
if(i==1)
Pixel2Demo();
if(i==2)
Pixel3Demo();
if(i==3)
Pixel2Demo();
if(i==4)
Pixel3Demo();
if(i==5)
Pixel2Demo();
sound(600);
delay(200);
sound(700);
delay(200);
sound(800);
delay(200);
sound(1000);
delay(200);
nosound();
}
delay(1000);
setfillstyle(SOLID_FILL,YELLOW);
bar(545,90,637,137);
for(i=0;i<=10;i++)
{
delay(500);
setcolor(BLUE);
moveto(550,100);
outtext("Sending");
delay(500);
setfillstyle(SOLID_FILL,YELLOW);
bar(545,90,637,137);
}
setfillstyle(SOLID_FILL,BLUE);
bar(40,90,138,137);
for(i=0;i<=10;i++)
{
delay(500);
setcolor(YELLOW);
moveto(45,100);
outtext("Receiving");
delay(500);
setfillstyle(SOLID_FILL,BLUE);
bar(40,90,138,137);
}
sleep(1);
cleardevice();
Pixel2Demo();
//***************************************************
xx=0;yy=40;
setcolor(BLUE);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
for(i=0;welcome[i]!='\0';i++)
{
xx=xx+30;
sprintf(msg,"%c",welcome[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
delay(1000);
// gotoxy(20,15);
setcolor(CYAN);
settextstyle(SMALL_FONT,HORIZ_DIR,7);
xx=0;yy=180;
for(i=0;contact[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",contact[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
delay(400);
setcolor(YELLOW);
settextstyle(SMALL_FONT,HORIZ_DIR,7);
xx=0;yy=220;
for(i=0;continu[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",continu[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
sleep(3);
cleardevice();
PutPixelDemo();
xx=0;yy=30;
setcolor(WHITE);
settextstyle(SMALL_FONT,HORIZ_DIR,5);
Pixel3Demo();
for(i=0;start[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",start[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,65);
setcolor(YELLOW);
getstring(yes);
newline();
if((yes[0]=='y')||(yes[0]=='Y'))
{
cleardevice();
Pixel3Demo();
xx=0;yy=40;
for(i=0;yearth[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",yearth[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
}
else
//if((yes[0]!='y')||(yes[0]!='Y'))
{
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;nearth[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",nearth[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
}
delay(500);
cleardevice();
Pixel3Demo();
setcolor(WHITE);
xx=0;yy=40;
for(i=0;how[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",how[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,65);
setcolor(YELLOW);
getstring(yes);
newline();
if((yes[0]=='y')||(yes[0]=='Y'))
{
cleardevice();
Pixel3Demo();
xx=0;yy=40;
setcolor(WHITE);
for(i=0;ywell[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",ywell[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
}
else
//if((yes[0]!='y')||(yes[0]!='Y'))
{
cleardevice();
Pixel3Demo();
setcolor(CYAN);
xx=0;yy=40;
for(i=0;nwell[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",nwell[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
}
delay(500);
cleardevice();
PutPixelDemo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;frend[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",frend[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;frendship[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",frendship[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,80);
setcolor(BLUE);
getstring(yes);
newline();
if((yes[0]=='y')||(yes[0]=='Y'))
{
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;yfrend[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",yfrend[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
}
else
{
cleardevice();
Pixel3Demo();
setcolor(RED);
xx=0;yy=40;
for(i=0;nfrend[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",nfrend[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;bad[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",bad[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=70;
for(i=0;thanks[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",thanks[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
sleep(1);
cleardevice();
disconnect();
sleep(1);
exit(1);
}
delay(400);
cleardevice();
Pixel3Demo();
setcolor(WHITE);
xx=0;yy=40;
for(i=0;from[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",from[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,70);
setcolor(YELLOW);
getstring(yes);
newline();
if((yes[0]=='y')||(yes[0]=='Y'))
{
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;yknow[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",yknow[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
}
else
{
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;nknow[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",nknow[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;yknow[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",yknow[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
}
delay(700);
cleardevice();
Pixel3Demo();
setcolor(WHITE);
xx=0;yy=40;
for(i=0;yourname[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",yourname[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,70);
setcolor(YELLOW);
getstring(name);
newline();
cleardevice();
Pixel3Demo();
setcolor(WHITE);
xx=0;yy=40;
for(i=0;goodname[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",goodname[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;newname[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",newname[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=70;
for(i=0;myname[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",myname[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,100);
setcolor(CYAN);
getstring(yes);
newline();
cleardevice();
Pixel3Demo();
setcolor(WHITE);
xx=0;yy=40;
for(i=0;yet[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",yet[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;inform[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",inform[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
delay(500);
sprintf(msg,"My name is %c %c%c%c %c%c",156,178,190,198,187,210);
outtextxy(20,80,msg);
sleep(3);
cleardevice();
Pixel3Demo();
settextstyle(SMALL_FONT,HORIZ_DIR,5);
setcolor(WHITE);
xx=0;yy=40;
for(i=0;cannot1[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",cannot1[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;cannot2[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",cannot2[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=70;
for(i=0;cannot3[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",cannot3[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=85;
for(i=0;cannot4[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",cannot4[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=100;
for(i=0;cannot5[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",cannot5[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=115;
for(i=0;cannot6[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",cannot6[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=135;
for(i=0;givename[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",givename[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=150;
for(i=0;give[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",give[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,180);
setcolor(YELLOW);
getstring(elian);
newline();
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;nicename[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",nicename[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
delay(500);
//**************************************************************End
for(i=0;i<=5;i++)
{
if(i==1)
Pixel2Demo();
if(i==2)
Pixel3Demo();
if(i==3)
Pixel2Demo();
if(i==4)
Pixel3Demo();
if(i==5)
Pixel2Demo();
sound(600);
delay(200);
sound(700);
delay(200);
sound(800);
delay(200);
sound(1000);
delay(200);
nosound();
}
cleardevice();
Pixel3Demo();
setcolor(RED);
xx=0;yy=40;
for(i=0;call[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",call[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
moveto(0,80);
setcolor(YELLOW);
getstring(yes);
newline();
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;sad[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",sad[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;connection[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",connection[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
sleep(1);
cleardevice();
Pixel3Demo();
setcolor(YELLOW);
xx=0;yy=40;
for(i=0;mail1[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",mail1[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;mail2[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",mail2[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=70;
for(i=0;mail3[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",mail3[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
delay(700);
cleardevice();
PutPixelDemo();
xx=0;yy=40;
for(i=0;mail4[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",mail4[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
xx=0;yy=55;
for(i=0;mail5[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",mail5[i]);
outtextxy(xx,yy,msg);
sound(100);
delay(200);
nosound();
}
delay(600);
cleardevice();
Pixel3Demo();
setcolor(RED);
xx=0;yy=80;
for(i=0;moment[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",moment[i]);
outtextxy(xx,yy,msg);
sound(50);
delay(300);
nosound();
}
xx=0;yy=95;
for(i=0;go[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",go[i]);
outtextxy(xx,yy,msg);
sound(50);
delay(300);
nosound();
}
xx=0;yy=110;
for(i=0;feel[i]!='\0';i++)
{
xx=xx+10;
sprintf(msg,"%c",feel[i]);
outtextxy(xx,yy,msg);
sound(50);
delay(200);
nosound();
}
sleep(1);
cleardevice();
Pixel3Demo();
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
setcolor(YELLOW);
xx=30;yy=80;
for(i=0;tata[i]!='\0';i++)
{
xx=xx+20;
sprintf(msg,"%c",tata[i]);
outtextxy(xx,yy,msg);
sound(50);
delay(200);
nosound();
}
xx=40;yy=120;
for(i=0;meeta[i]!='\0';i++)
{
xx=xx+20;
sprintf(msg,"%c",meeta[i]);
outtextxy(xx,yy,msg);
sound(50);
delay(200);
nosound();
}
sleep(3);
cleardevice();
PutPixelDemo();
PutImage2Demo();
sleep(2);
for(i=0;i<=600;i++)
{
count++;
if(count==50)
Pixel2Demo();
if(count==100)
Pixel3Demo();
if(count==150)
Pixel2Demo();
if(count==200)
Pixel3Demo();
if(count==250)
Pixel2Demo();
if(count==300)
{
cleardevice();
Pixel3Demo();
settextstyle(TRIPLEX_FONT,HORIZ_DIR,3);
setcolor(YELLOW);
moveto(10,100);
outtext("Now You are returning to your own world 'Earth'.");
}
if(count==350)
Pixel2Demo();
if(count==400)
PutPixelDemo();
if(count==450)
Pixel2Demo();
if(count==500)
Pixel3Demo();
if(count==550)
Pixel2Demo();
delay(10);
sound(exp(i+50));
sound(exp(i+50));
sound(exp(i+50));
}
nosound();
sleep(1);
cleardevice();
PutPixelDemo();
settextstyle(TRIPLEX_FONT,HORIZ_DIR,2);
setcolor(YELLOW);
moveto(0,100);
outtext("Your friend of Mars send you a mail named 'mars'.Thanks.");
sleep(5);
cleardevice();
sleep(2);
DebmediaDemo();
sleep(2);
fp=fopen("mars","w");
fputs(as,fp);
fputs("\n",fp);
fputs(my,fp);
fputs(name,fp);
fputs("\n\n\n",fp);
for(i=0;w[i]!='\0';i++)
fputc(w[i],fp);
fputs("\n",fp);
for(i=0;e[i]!='\0';i++)
fputc(e[i],fp);
fputs("\n",fp);
for(i=0;l[i]!='\0';i++)
fputc(l[i],fp);
fputs("\n\n\n",fp);
fputs(as2,fp);
fputs("\n",fp);
fputs(fro,fp);
fputs(elian,fp);
exit(2);
//getch();
closegraph();
}