Thank you!
I got a bit worried when I saw it was windowed, but it still works when you change
to
Here is the proggie with the code that quits if the user moves the mouse so it can be a screen saver:
Thanks again!
I got a bit worried when I saw it was windowed, but it still works when you change
Code: (Select All)
_ScreenMove 0, 0
to
Code: (Select All)
_FullScreen
Here is the proggie with the code that quits if the user moves the mouse so it can be a screen saver:
Code: (Select All)
_Title " Eye Candy #9B Closer (fullscreen)" ' b+ 2022-03-09
'fullscreen mod by Steve. 2025-04-17
Option _Explicit
DefDbl A-Z
Const fps = 80
Dim xmax, ymax As Integer
ReDim colr(0 To 0) As _Unsigned Long
Dim p2 As Single
Dim xc, yc As Single
Dim diag As Single
Dim a As Single
Dim i As Single
Dim r As Single
Dim sx1, sy1, sx2, sy2, sx3, sy3, dx1, dy1, dx2, dy2, dx3, dy3 As Long
Dim toggle As Integer: toggle = 0
Dim source&
Dim Shared cN, pR, pG, pB As Long
Dim ro As Single
Dim s As Single
Dim OldMouseX, OldMouseY As Integer
Dim bFinished As Integer: bFinished = _FALSE
xmax = _DesktopWidth: ymax = _DesktopHeight
Screen _NewImage(xmax, ymax, 32)
'_ScreenMove 0, 0
_FullScreen
_Delay 2 ' wait a couple seconds before getting mouse coords
While _MouseInput: Wend: OldMouseX = _MouseX: OldMouseY = _MouseY ' initial mouse placement
xc = xmax / 2
yc = ymax / 2
diag = Sqr(xc * xc + yc * yc)
ReDim colr(-100 To diag + 1000) As _Unsigned Long
p2 = _Pi * 2
While 1
resetPlasma
For i = -100 To diag + 1000
colr(i) = Plasma~&
Next
ro = 950: s = 0
While ro > -50
Cls
For a = 0 To p2 / 64 Step p2 / (16 * 360)
i = 50 * Sin(s) ' 2 * s or just s
For r = 0 To diag
PSet (xc + r * Cos(a), yc + r * Sin(a)), colr(r + i + ro)
Next
s = s + p2 / 180
Next
sx1 = xc: sy1 = yc: sx2 = xc + diag * Cos(.002): sy2 = yc + diag * Sin(.002): sx3 = xc + diag * Cos(p2 / 64 - .002): sy3 = yc + diag * Sin(p2 / 64 - .002)
For a = p2 / 64 To p2 - p2 / 64 Step p2 / 64
dx1 = xc: dy1 = yc: dx2 = xc + diag * Cos(a): dy2 = yc + diag * Sin(a): dx3 = xc + diag * Cos(a + p2 / 64): dy3 = yc + diag * Sin(a + p2 / 64)
_MapTriangle (sx1, sy1)-(sx2, sy2)-(sx3, sy3), source& To(dx1, dy1)-(dx2, dy2)-(dx3, dy3), 0
Next
'Line (0, 0)-(xc - 1.5 * yc, _Height), &HFF000000, BF
'Line (xc + 1.5 * yc, 0)-(_Width, _Height), &HFF000000, BF
_PutImage (0, 0)-(_Width, _Height), , , (xc - 1.5 * yc, 0)-(xc + 1.5 * yc, _Height)
toggle = 1 - toggle
If toggle Then _Display
' If user moves mouse or presses Esc then quit
While _MouseInput: Wend: If _MouseX <> OldMouseX Or _MouseY <> OldMouseY Or _KeyDown(27) Then bFinished = _TRUE: Exit While
_Limit fps
ro = ro - 1
Wend
If bFinished = _TRUE Then Exit While
Wend
System
Function Plasma~& ()
cN = cN + .2
Plasma~& = _RGB32(127 + 127 * Sin(pR * cN), 127 + 127 * Sin(pG * cN), 127 + 127 * Sin(pB * cN))
End Function
Sub resetPlasma ()
pR = Rnd ^ 2: pG = Rnd ^ 2: pB = Rnd ^ 2
End Sub
Thanks again!