Code: Select all
randomize timer
#include "fbgfx.bi"
screenres 640,480
dim as integer x1,x2,y1,y2,c
dim as integer cix,ciy,drawloopflag
dim as string glitchstring
dim as fb.Image Ptr corrupt1 = imagecreate(64,64)
dim as fb.Image Ptr corrupt2 = imagecreate(64,64)
dim as fb.image ptr img
do
x1 = int(rnd*640)
x2 = int(rnd*640)
y1 = int(rnd*480)
y2 = int(rnd*480)
c = int(rnd*256)
screenlock
select case int(rnd*11)
case 0
line(x1,y1)-(x1+int(rnd*200),y1+int(rnd*200)),c,b
case 1
line(x1,y1)-(x2,y2),c,bf
case 2
locate int(rnd*100),int(rnd*100)
case 3
print glitchstring
case 4
color int(rnd*256)
case 5
if int(rnd * 100 ) = 1 then cls
case 6
select case int(rnd * 2)
case 1
img = corrupt1
case 0
img = corrupt2
end select
cix = int(rnd*640) + 1
ciy = int(rnd*480) + 1
if cix + 65 > 640 then cix - = 65
if ciy + 65 > 480 then ciy - = 65
print cix,ciy
get (cix,ciy)-(cix+63,ciy+63),img
case 7
select case int(rnd*2)
case 0
for cx as integer = 0 to 640 step 30
select case int(rnd * 2)
case 1
img = corrupt1
case 0
img = corrupt2
end select
for cy as integer = 0 to 480 step int(rnd*60) + 1
select case int(rnd*2)
case 0
put (cx,cy),img,and
case 1
put (cx,cy),img,xor
end select
next
next
case 1
for cy as integer = 0 to 480 step 64
select case int(rnd * 2)
case 1
img = corrupt1
case 0
img = corrupt2
end select
for cx as integer = 0 to 640 step int(rnd*60) + 1
select case int(rnd*2)
case 0
put (cx,cy),img,or
case 1
put (cx,cy),img,and
end select
next
next
end select
case 8
dim as ubyte char = int(rnd*256)
if char <> 7 then glitchstring + = chr(char)
case 9
if int(rnd*100) = 0 then glitchstring = ""
case 10
for x as integer = 0 to 640 step 64
for y as integer = 0 to 480 step (64 - int(rnd*10))
if int(rnd*2)=0 then img = corrupt1 else img = corrupt2
put(x,y),img,pset
next
next
end select
select case inkey
case chr(27)
exit do
end select
screenunlock
sleep 15
loop 'until inkey = chr(27)