Charles,
I'm not using Bass.
SUB PlaySound(sfn)
DLL("ms,l,winmm.dll,sndPlaySoundA,zl", sfn, 0)
END SUB
I think I have solved my Simple Windows issues.
' Julia set fractal
common R, I, X ,Y
setdisplay(1024, 768, 32, 0)
setautoback(0)
FOR iT = 0 TO 32
color(iT, rgb(iT * 8, it * 12, iT * 8))
NEXT
mousehide()
SUB _INVERSE_WORK
D = X * X + Y * Y
IF D = 0.0 THEN
R = 100000.0 : X = R : I = R : Y = R
ELSE
R = R / D : X = R : I = I / D : Y = I
End if
END SUB
SUB _INSIDE_STRUC_WORK(D, FAC, Z, IT)
I = ABS(Log(D)) * FAC
IF Z = IT THEN
Ink(color(I))
ELSE
Ink(color(0))
END IF
END SUB
SUB _JULIA_INIT(XSS, YSS, LT, RT, BM, TP, IT, BB, _INV, INS, FAC, DX, DY, CI, CR)
DXPP = (RT - LT) / XSS
DYPP = (TP - BM) / YSS
R=BM
FOR XR = 0 TO XSS
I = LT
FOR YR = 0 TO YSS
X = R : Y = I : B = X : M = Y
IF _INV = 1 THEN
_INVERSE_WORK
END IF
XS = X * X : YS = Y * Y
WHILE key(27) = 0
Y = X * Y : Y = Y + Y - CR : X = XS - YS - CI
XS = X * X : YS = Y * Y : D = XS + YS
IF (D < BB) AND (Z < IT) THEN
Z = Z + 1
ELSE
EXIT WHILE
END IF
END WHILE
IF key(27) THEN
END
END IF
IF INS = 0 THEN
Ink(color(Z))
ELSE
_INSIDE_STRUC_WORK(D, FAC, Z, IT)
END IF
dot(XR + DX, YR + DY)
Z = 0 : R = B : I = M : I = I + DYPP
NEXT
R = R + DXPP
screenunlock(0)
screenswap()
screenlock(0)
NEXT
END SUB
' MAIN
LT=-2.0 : RT=2.0
BM=-2.0 : TP=2.0
screenlock(0)
_JULIA_INIT(1024,768,LT,RT,BM,TP,20,30.0,1,1,5,1,1,-0.32,-0.043)
screenunlock(0)
waitkey
X