ROCKET(MAKE MOVEMENT ON SCREEN)
#include<stdio.h>
#include<conio.h>
#include<string.h>
#define ROW 24
#define COL 9
#define height 25
void main(void)
{
clrscr();
char str[ROW][COL] = {{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,'\x1E',0,0,0,0},
{0,0,0,'\x1E','\xDB','\x1E',0,0,0}};
char *ptr[ROW],*temp; //pointer pointing to array
for(int m=0;m<ROW;m++)
*(ptr+m)= *(str+m);
//repeating the whole process
for(int out=0;out<ROW-1;out++)
{
//print rocket
for(int i=0;i<ROW;i++)
{
for(int j=0;j<COL;j++)
printf("%c",*(*(ptr+i)+j));
printf("\n");
}
//starting line/ ground
for (int k=0;k<COL;k++)
printf("%c",'\xCB');
temp=*ptr;
for(int l=0;l<ROW-1;l++)
*(ptr+l)=*(ptr+l+1);
*(ptr+ROW-1)=temp;
char ch=getch();
if(ch==0)
getch();
clrscr();
}
}
Now i wanna make it a full screen program and also i want to make it move left,right and downwards can u guys help me by giving me some help full ideas plzthanks in advance:thumbup:
Edited by Roger, 11 August 2011 - 07:28 AM.


Sign In
Create Account


Back to top









