mouse_FX v1.02 (waterFX) von ???
Ein wenig verändert ......!! Werde die Function aber noch ausbauen ..
dann wird sie nicht mehr mausabhängig sein, mann kann mehrere Effecte
(denn auf der suche nach dem halbwegs optimalen Algorythmus habe ich tolle sachen gesehn ;) ).......
auswählen und ma schaun was mir noch so einfällt. Aber im moment will ich keine Kreise und fliegenden pixel mehr sehen,(ich seh sie schon wenn ich die augen zumache)....,,,,,

50 circles sind bei mir recht flüssig
>> AMD 1400 mHz / sis740 / 256 SDRAM <<

Auch wenn diese function auf speed
läuft zerrt sie dennoch an der leistung ... wenn jemand einen Tip hat
wie ich die Function noch schneller hinbekomme dann Antwortet mir
(!!THX!!), aber die Optik sollte nicht drunterleiden..

falls Fragen sind stellt sie einfach ..,,
,,Ok Tschaui und viel Spass,,,


[code:1:83526d2517]

;***************
;mouse_FX v1.02
;***************

Global omx,omy,mcrs_fx_count,amy,amx,mospd

mospd=1
Const mostp=5
Const maxcircles=50
Dim mcrs_FX(maxcircles,5)

Function moFX(fx)

amx=MouseX()
amy=MouseY()

If omx>amx Or omx<amx Or omy>amy Or omy<amy Or fx=1 Then mcrs_FX_count=mcrs_FX_count+1 :newFx=Rnd(0,1)
If mcrs_FX_count>maxcircles Then mcrs_FX_count=0
If newFX=1

mcrs_FX(mcrs_FX_count,0)=1
mcrs_FX(mcrs_FX_count,1)=omx-5+Rnd(1,10)
mcrs_FX(mcrs_FX_count,2)=omy-5+Rnd(1,10)
mcrs_fx(mcrs_fx_count,3)=Rnd(50,250)
newFX=0

EndIf

fxcount=0

While fxcount<maxcircles

If mcrs_fx(fxcount,0)>mcrs_fx(fxcount,3) Then mcrs_fx(fxcount,0)=0
If mcrs_FX(fxcount,0)>0
If fx=0 Then mcrs_fx(fxcount,0) = mcrs_fx(fxcount,0)+10

For c=1 To 360 Step mostp

For wave=1 To 3 Step 1

r1=mcrs_FX(fxcount,0)*.1
r2=-wave+mcrs_FX(fxcount,0)*.1

rx=mcrs_FX(fxcount,1)+Sin(c)*r1
ry=mcrs_fx(fxcount,2)+Cos(c)*r1

fxpx=mcrs_FX(fxcount,1)+Sin(c)*r2
fxpy=mcrs_fx(fxcount,2)+Cos(c)*r2

If rx>1 And ry>1 And rx<GraphicsWidth() And ry < GraphicsHeight() And fxpx>1 And fxpy > 1 And fxpx < GraphicsWidth() And fxpy< GraphicsHeight()

LockBuffer BackBuffer()

rgb=ReadPixelFast (rx,ry)
a=(rgb And $FF000000)/$1000000
r=(rgb And $FF0000)/$10000
g=(rgb And $FF00)/$100
b=rgb And $FF
r=r*.97:If r>250 Then r=250
g=g*.97:If g>250 Then g=250
b=b*1.05:If b>250 Then b=250
rgb=a*$1000000 + r*$10000 + g*$100 + b

CopyPixelFast rx,ry,BackBuffer(),fxpx,fxpy

If wave=2 Then WritePixelFast fxpx,fxpy,rgb:WritePixelFast fxpx+1,fxpy+1,rgb

UnlockBuffer BackBuffer()

EndIf
Next

Next
EndIf

fxcount=fxcount+1
Wend

omx=amx
omy=amy

Return True
End Function[/code:1:83526d2517]



Suche:
(unterstützt mySQL Wildcards ala %)
Titel:
Text:
Autor: