OneCypher
Anmeldungsdatum: 23.09.2007 Beiträge: 802
|
Verfasst am: 09.03.2009, 14:38 Titel: Sinnlos 0.1a |
|
|
Kurz und knapp:
Code: |
#INCLUDE "fbgfx.bi"
USING FB
dim shared as integer sx,sy,mx,my,lx,ly
dim as integer dx = 50,dy = 50
dim in as string
type block
x1 as integer
y1 as integer
dx as integer
dy as integer
c as uinteger
nx_block as block ptr
end type
sub drw(blk as block ptr)
dim as integer x1 =blk->x1,y1 =blk->y1,dx =blk->dx, dy =blk->dy
if lx > 0 and ly > 0 then
if mx > x1 and my > y1 and mx < x1+dx and my < y1 +dy then
x1 = x1 - (lx -mx)
y1 = y1 - (ly -my)
blk->x1 = x1
blk->y1 = y1
end if
end if
line (x1-16,y1-16)-(x1+dx+16,y1+dy+16),RGB(255,255,255),BF
line (x1-16,y1-16)-(x1+dx+16,y1+dy+16),RGB(0,0,0),B
line (x1,y1)-(x1+dx,y1+dy),blk->c,BF
end sub
dim startblock as block ptr
dim actblock as block ptr
screencontrol 3,sx,sy
SCREENRES sx, sy, 32,, GFX_SHAPED_WINDOW + GFX_ALWAYS_ON_TOP
line (0,0)-(sx,sy),RGB(255,0,255),BF
for i as integer = 1 to 10
if actblock = 0 then
actblock = new block
else
actblock->nx_block = new block
actblock = actblock->nx_block
end if
if startblock = 0 then startblock = actblock
actblock->x1 = int(rnd * (sx -dx))+1
actblock->y1 = int(rnd * (sy -dy))+1
actblock->dx = dx
actblock->dy = dy
actblock->c = rgb(int(rnd*255),int(rnd*255),int(rnd*255))
next
do
in = inkey
getmouse mx,my
screenlock
line (0,0)-(sx,sy),RGB(255,0,255),BF
actblock = startblock
while actblock <> 0
drw actblock
actblock = actblock->nx_block
wend
screenunlock
screensync
lx = mx:ly = my
loop until in <> ""
|
Absolut sinnlos, aber vielleicht für den einen oder anderen ganz lustig.. oder vielleicht fällt jemanden noch was ein was man noch als zusätzliches sinnlos-feature einbauen könnte...
die kästchen könnte man auch mit der maus "beschleunigen" bzw "anstupsen" oder so...
ich fands ganz lustig... |
|