/***************************
*Matrix Program by Catalyst*
*Modified Slightly by Void *
***************************/
const maxChar := 100
const maxStreak := 250
randomize
var l_r : int
var w : int := Window.Open ("fullscreen")
Window.Set (w, "nocursor,noecho")
var count : int := 0
var x, y, c : array 1 .. maxStreak of int
var matrix := "The matrix has you neo..."
var switch := 0
var ch : array 1 .. maxStreak of string
for i : 1 .. maxStreak
y (i) := maxy
ch (i) := " "
c (i) := 1
end for
var z : int := 1
var font : int := Font.New ("courier:12:bold")
var yspd : int := 10
var rc : int := 0
proc fillback (c : int)
drawfillbox ( - 10, - 10, maxx + 10, maxy + 10, c)
end fillback
proc Streak (num : int, highlight : boolean)
%% Turns a white sparkles effets on/off
for n : 1 .. num
randint (l_r, 0, 1)
if l_r = 0 then
randint (x (n), 0, (maxx div 2) - 55)
elsif l_r = 1 then
randint (x (n), (maxx div 2) + 55, maxx)
end if
randint (y (n), maxy, maxy * 2 + 140)
end for
loop
for n : 1 .. num
randint (z, 1, maxChar)
ch (n) += chr (z)
c (n) += 1
y (n) -= yspd
if y (n) < - 140 then
randint (y (n), maxy, maxy * 2 + 140)
randint (x (n), 0, maxx)
ch (n) := " "
c (n) := 1
end if
if c (n) > 16 then
if highlight = true then
Font.Draw (ch (n) (c (n) - 1), x (n), y (n), font,
white)
end if
Font.Draw (ch (n) (c (n) - 2), x (n), y (n) + 10, font,
10)
Font.Draw (ch (n) (c (n) - 3), x (n), y (n) + 20, font,
2)
Font.Draw (ch (n) (c (n) - 7), x (n), y (n) + 60, font,
120)
Font.Draw (ch (n) (c (n) - 11), x (n), y (n) + 100, font,
192)
Font.Draw (ch (n) (c (n) - 15), x (n), y (n) + 140, font,
black)
end if
if count = 100 then
Font.Draw ("T", (maxx div 2) - 50, 400, font, 10)
elsif count = 150 then
Font.Draw ("Th", (maxx div 2) - 50, 400, font, 10)
elsif count = 200 then
Font.Draw ("The", (maxx div 2) - 50, 400, font, 10)
elsif count = 250 then
Font.Draw ("The M", (maxx div 2) - 50, 400, font, 10)
elsif count = 300 then
Font.Draw ("The Ma", (maxx div 2) - 50, 400, font, 10)
elsif count = 350 then
Font.Draw ("The Mat", (maxx div 2) - 50, 400, font, 10)
elsif count = 400 then
Font.Draw ("The Matr", (maxx div 2) - 50, 400, font, 10)
elsif count = 450 then
Font.Draw ("The Matri", (maxx div 2) - 50, 400, font,
10)
elsif count = 500 then
Font.Draw ("The Matrix", (maxx div 2) - 50, 400, font,
10)
elsif count = 600 then
switch := 1
end if
end for
count += 1
exit when switch = 1
end loop
Font.Draw ("The Matrix", (maxx div 2) - 50, 400, font,
10)
delay (2000)
colorback (black)
cls
color (10)
for a : 1 .. length (matrix)
locate (3, a)
put matrix (a), "_"
delay (150)
end for
loop
locate (3, length (matrix) + 1)
put " "
delay (500)
locate (3, length (matrix) + 1)
put "_"
delay (500)
end loop
end Streak
fillback (black)
Streak (60, false)
|