First commit 16/08/1996
This commit is contained in:
304
DAVID.CPP
Normal file
304
DAVID.CPP
Normal file
@ -0,0 +1,304 @@
|
||||
#include<stdio.h>
|
||||
#include<math.h>
|
||||
#include<graphics.h>
|
||||
#include<conio.h>
|
||||
#include<dos.h>
|
||||
#include<ctype.h>
|
||||
|
||||
#define k (2*3.14159/360)
|
||||
|
||||
void muevel(int letras[29][56],char texto[1][9]);
|
||||
void main()
|
||||
{
|
||||
int gdriver=DETECT,gmode;
|
||||
char texto[1][9]={"ES PRUEBA"};
|
||||
int letras[29][56]={
|
||||
//espacio en blanco
|
||||
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,
|
||||
// la A
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,1,1,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
// la B
|
||||
1,1,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
1,1,1,1,1,1,0,0,
|
||||
// la C
|
||||
0,0,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
1,1,0,0,0,0,0,0,
|
||||
1,1,0,0,0,0,0,0,
|
||||
1,1,0,0,0,0,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
// la D
|
||||
1,1,1,1,1,0,0,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
1,1,1,1,1,0,0,0,
|
||||
// la E
|
||||
1,1,1,1,1,1,1,0,
|
||||
0,1,1,0,0,0,1,0,
|
||||
0,1,1,0,1,0,0,0,
|
||||
0,1,1,1,1,0,0,0,
|
||||
0,1,1,0,1,0,0,0,
|
||||
0,1,1,0,0,0,1,0,
|
||||
1,1,1,1,1,1,1,0,
|
||||
// la F
|
||||
1,1,1,1,1,1,1,0,
|
||||
0,1,1,0,0,0,1,0,
|
||||
0,1,1,0,1,0,0,0,
|
||||
0,1,1,1,1,0,0,0,
|
||||
0,1,1,0,1,0,0,0,
|
||||
0,1,1,0,0,0,0,0,
|
||||
1,1,1,1,0,0,0,0,
|
||||
// la G
|
||||
0,0,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
1,1,0,0,0,0,0,0,
|
||||
1,1,0,0,0,0,0,0,
|
||||
1,1,0,0,1,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
0,1,1,1,1,1,1,0,
|
||||
// la H
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,1,1,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
// la I
|
||||
0,1,1,1,1,1,1,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,1,1,1,1,1,1,0,
|
||||
// la J
|
||||
0,0,0,1,1,1,1,0,
|
||||
0,0,0,0,1,1,0,0,
|
||||
0,0,0,0,1,1,0,0,
|
||||
0,0,0,0,1,1,0,0,
|
||||
1,1,0,0,1,1,0,0,
|
||||
1,1,0,0,1,1,0,0,
|
||||
0,1,1,1,1,0,0,0,
|
||||
// la K
|
||||
1,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
0,1,1,1,1,0,0,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
1,1,1,0,0,1,1,0,
|
||||
// la L
|
||||
1,1,1,1,0,0,0,0,
|
||||
0,1,1,0,0,0,0,0,
|
||||
0,1,1,0,0,0,0,0,
|
||||
0,1,1,0,0,0,0,0,
|
||||
0,1,1,0,0,0,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
1,1,1,1,1,1,1,0,
|
||||
// la M
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,1,0,1,1,1,0,
|
||||
1,1,1,1,1,1,1,0,
|
||||
1,1,1,1,1,1,1,0,
|
||||
1,1,0,1,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
// la N
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,1,0,0,1,1,0,
|
||||
1,1,1,1,0,1,1,0,
|
||||
1,1,0,1,1,1,1,0,
|
||||
1,1,0,0,1,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
// la <20>
|
||||
0,1,1,0,0,0,1,0,
|
||||
1,0,0,1,1,1,0,0,
|
||||
0,0,0,0,0,0,0,0,
|
||||
1,1,1,0,0,1,1,0,
|
||||
1,1,0,1,0,1,1,0,
|
||||
1,1,0,0,1,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
// la O
|
||||
0,0,1,1,1,0,0,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
0,0,1,1,1,0,0,0,
|
||||
// la P
|
||||
1,1,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,1,1,1,0,0,
|
||||
0,1,1,0,0,0,0,0,
|
||||
0,1,1,0,0,0,0,0,
|
||||
1,1,1,1,0,0,0,0,
|
||||
// la Q
|
||||
0,0,1,1,1,0,0,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,1,1,0,1,0,
|
||||
1,1,0,0,1,1,0,0,
|
||||
0,1,1,1,0,1,1,0,
|
||||
// la R
|
||||
1,1,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,1,1,1,0,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
1,1,1,1,0,1,1,0,
|
||||
// la S
|
||||
0,0,1,1,1,1,0,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,0,0,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
0,0,0,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
// la T
|
||||
0,1,1,1,1,1,1,0,
|
||||
0,1,0,1,1,0,1,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
// la U
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
// la V
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
// la W
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,1,0,1,1,0,
|
||||
1,1,1,1,1,1,1,0,
|
||||
1,1,1,0,1,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
// la X
|
||||
1,1,0,0,0,1,1,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
0,0,1,1,1,0,0,0,
|
||||
0,0,1,1,1,0,0,0,
|
||||
0,1,1,0,1,1,0,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
// la Y
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,1,1,1,1,0,0,
|
||||
// la Z
|
||||
1,1,1,1,1,1,1,0,
|
||||
1,1,0,0,0,1,1,0,
|
||||
0,0,0,0,1,1,0,0,
|
||||
0,0,0,1,1,0,0,0,
|
||||
0,0,1,1,0,0,1,0,
|
||||
0,1,1,0,0,1,1,0,
|
||||
1,1,1,1,1,1,1,0,
|
||||
};
|
||||
|
||||
initgraph(&gdriver,&gmode,"");
|
||||
muevel(letras,texto);
|
||||
getch();
|
||||
closegraph();
|
||||
}
|
||||
|
||||
//funcion que mueve letras
|
||||
void muevel(int letras[29][56],char texto[1][9])
|
||||
{
|
||||
|
||||
// a para los 360 y para vertical y matriz
|
||||
// x1 para posicion x
|
||||
// y1 para posicion y
|
||||
// v calcula seno
|
||||
// i1 incrementa x1
|
||||
// c1 vuelve a posicionar
|
||||
int x=0,y=0,c1=0/*longitud de palabra*/,c2=0,c3=0;//v
|
||||
int finali=8,n[9],c=0,i=0;
|
||||
//lee letras y las pone a numeros
|
||||
for(x=0;x<9;x++)
|
||||
{
|
||||
if(toascii(texto[0][x]-65)<14)
|
||||
n[x]=toascii(texto[0][x]-64);
|
||||
else if(texto[0][x]=='<EFBFBD>')
|
||||
n[x]=15;
|
||||
else if(texto[0][x]==' ')
|
||||
n[x]=0;
|
||||
else
|
||||
n[x]=toascii(texto[0][x]-63);
|
||||
}
|
||||
while(c2!=5)
|
||||
{
|
||||
//dibuja letras
|
||||
for(y=0;y<70;y=y+10)
|
||||
{
|
||||
for(x=0;x<640;x=x+10)
|
||||
{
|
||||
if(letras[n[c3]][i]==1) setcolor(10);
|
||||
else setcolor(5);
|
||||
outtextxy(x,y,"*");
|
||||
if(x>=c1-1) i++;
|
||||
if(i==finali) {i=finali-8;c3++;}
|
||||
if(c3==8) c3=0;
|
||||
}
|
||||
c3=0;
|
||||
c=c+8;
|
||||
i=c;
|
||||
finali=c+8;
|
||||
}
|
||||
//matriz i
|
||||
finali=7;
|
||||
//linea
|
||||
i=0;
|
||||
//cada linea
|
||||
c=0;
|
||||
//rota paleta
|
||||
getch();
|
||||
c1=c1+10;
|
||||
if(c1==640/*+630+longitud de palabra*/) {c1=0;c2++;}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user