matrix sort of graphics in C -


i making program graphics.h in c.i trying implement matrix screen saver stuck here in code.the alphabets fall once.i want them keep on falling (removing text before).please guide me how clear old contents

void main_page(void) {     int  i,j,k,l,m,n,size;     setcolor(blue);     for(i=0;i<500;i+=50)     {             settextstyle(gothic_font,1,1);             outtextxy(50,50+i,"a b c");             outtextxy(100,150+i,"h j");             outtextxy(150,250+i,"x y z");             outtextxy(300,50+i,"d e f");             outtextxy(350,350+i,"d e f");             outtextxy(400,350+i,"d e f");             outtextxy(450,350+i,"d e f");             outtextxy(500,50+i,"d e f");             outtextxy(550,350+i,"d e f");             outtextxy(600,350+i,"d e f");              delay(100);     } 

alt text

don't have erase or over-write characters in old locations? might bottom-up rather top-down, and, last, print blanks?

added: well, here's brute-force way it, don't like. replace code inside loop this:

            settextstyle(gothic_font,1,1);             outtextxy( 50, 50+i,"a b c");             outtextxy(100,150+i,"h j");             outtextxy(150,250+i,"x y z");             outtextxy(300, 50+i,"d e f");             outtextxy(350,350+i,"d e f");             outtextxy(400,350+i,"d e f");             outtextxy(450,350+i,"d e f");             outtextxy(500, 50+i,"d e f");             outtextxy(550,350+i,"d e f");             outtextxy(600,350+i,"d e f");              delay(100);              outtextxy( 50, 50+i,"     ");             outtextxy(100,150+i,"     ");             outtextxy(150,250+i,"     ");             outtextxy(300, 50+i,"     ");             outtextxy(350,350+i,"     ");             outtextxy(400,350+i,"     ");             outtextxy(450,350+i,"     ");             outtextxy(500, 50+i,"     ");             outtextxy(550,350+i,"     ");             outtextxy(600,350+i,"     "); 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -