46 lines
1 KiB
Text
46 lines
1 KiB
Text
#include <basico.h>
|
|
|
|
#proto desplegarmatrixrain(_X_,_Y_)
|
|
|
|
algoritmo
|
|
|
|
dimensionar con (80) matriz aleatoria entera ( -50, t )
|
|
matrices (ctexto, cfondo)
|
|
'232,22,22,22,22,28,28,28,34,34,40,40,46,232' enlistar en 'ctexto'
|
|
'232,232,232,232,232,232,232,232,232,232,232,232,232,40' enlistar en 'cfondo'
|
|
|
|
color(232,232)
|
|
borrar pantalla
|
|
|
|
enfatizado
|
|
|
|
iterar
|
|
|
|
iterar para(i=1, #(i<=80), ++i )
|
|
cuando ( #(t[i]>53) ){ #(t[i]=rand(-50)) }
|
|
#basic{
|
|
t[i] += 1
|
|
desplegar matrix rain(i,t[i])
|
|
}
|
|
siguiente
|
|
|
|
microsegundos(50000)
|
|
|
|
hasta que una tecla sea presionada
|
|
|
|
color(7,0)
|
|
borrar pantalla
|
|
terminar
|
|
|
|
subrutinas
|
|
|
|
desplegar matrix rain(x,y)
|
|
i=13, j=1
|
|
iterar
|
|
si ( #(y-i), está entre-excluyendo-(0,41) )
|
|
color ( #(ctexto[j]), #(cfondo[j]) )
|
|
imprimir en ( #(y-i),x, #(utf8(chr(33+((x*(y-i)) % 200)) )) )
|
|
fin si
|
|
--i, ++j
|
|
mientras ' no es negativo(i)'
|
|
retornar
|