Bit better for changing res
sw=1680:sh=1050
set display mode sw,sh,32
sw=screen width()
sh=screen height()
rd=760
sw2=sw*0.5
sh2=sh*0.5
sync on :sync rate 60
autocam off
create bitmap 1,sw,sh
set current bitmap 0
dim a#(47)
dim b#(47)
dim aa#(47)
dim bb#(47)
dim cc#(47)
dim dd#(47)
for f=0 to 47:gosub ting:gosub trong:next f
get image 1,0,0,sw,sh,1
make object plain 1,sw,sh
position object 1,0,0,rd
set object transparency 1,5
texture object 1,1
make object plain 2,sw,sh
position object 2,0,0,rd
set object transparency 2,5
texture object 2,1
ink rgb(140,190,255)
box 0,0,1,1
get image 5,0,0,1,1,1
for f=4 to 500
make object plain f,1.5,1.5
texture object f,5:fade object f,124
position object f,-sw/2+rnd(sw),-sh/2+rnd(sh),560+rnd(300)
next f
color backdrop 0
backdrop off
fd#=0.97
`````````````````````````````````
do
position camera 0,0,-100
point camera 0,0,0
set current bitmap 1
cl=0
for f=0 to many
inc aa:if aa>15 then aa=0
``````````````````````````````````````
dec tp:if tp<0
tp=59
cc#(f)=aa#(f)+bb#(f)*0.12
dd#(f)=abs(aa#(f)-bb#(f))*0.1
gosub ting
endif
``````````````````````````````````````
if rnd(c)=1 then a#(f)=a#(f)+aa#(f) else a#(f)=a#(f)-cc#(f)
if rnd(c)=1 then b#(f)=b#(f)+bb#(f) else b#(f)=b#(f)-dd#(f)
inc c:if c>2 then c=1
st=4
st1#=360/st
r=1+rnd(1)+b#(f)*0.007
aaa#=a#(f)
bbb#=b#(f)
if r<3 then gosub dr2 else gosub dr1
fc=fc>>2
dec tro:if tro<0
tro=14
fc=0xf77f371f
endif
if a#(f)>957 or b#(f)>577
gosub trong
gosub ting
cl=1
endif
next f
if cl=1
get image 1,0,0,sw,sh,1
set current bitmap 1
gosub fader
paste image 1,0,0,1
get image 1,0,0,sw,sh,1
if rnd(100)=1 then cls
dec tom:if tom<0 then tom=59+rnd(365):cls
endif
dec trog
if trog<0
trog=3
get image 2,0,0,sw,sh,1
texture object 2,2
fade object 2,444
gosub fader
farp=7*sin(delay)
endif
set current bitmap 0
inc delay
dec trog2
if trog2<0
trog2=3+rnd(2)
fd#=0.93
gosub fader
fd#=0.97
endif
gosub starz
z#=760+200*sin(delay)
position object 1,0,0,z#
x#=70+70*sin(delay*0.3)
texture object 1,1
set object transparency 1,5
set alpha mapping on 1,x#
z#=farp*sin(delay*0.7)
zrotate object 1,z#
position object 2,0,0,750+z#*0.5
dec gj
if gj<0 then gj=7:inc many:if many>35 then many=0
`ink 0
`box 20,20,300,40
`ink rgb(0,200,0)
`text 20,20,str$(many)+" "+str$(gc)
dec dfg
if dfg<0
dfg=2:`gosub saver
endif
ttt:
if inkey$()=" " then goto ttt
sync
loop
`````````````````````````````````````
starz:
for f=4 to 500
x#=object position x(f)
y#=object position y(f)
z#=object position z(f)
if f<300
dec z#,0.5
if z#<400.0 then z#=760+rnd(100)
position object f,x#,y#,z#
else
if rnd(100)>3 then hide object f else show object f
endif
next f
return
`````````````````````````````````````
loader:
if f>203 then return
a$="000000"+str$(f):a$=right$(a$,5)
b$="H:\frames12\"+a$+".bmp"
load image b$,f,1
return
loader2:
a$="000000"+str$(fra):a$=right$(a$,5)
b$="H:\frames11\"+a$+".bmp"
load image b$,998,1
if fra>2161 then dec fra
return
loader3:
a$="000000"+str$(frap):a$=right$(a$,6)
b$="H:\frames16\"+a$+".bmp"
load image b$,997,1
inc frap
return
saver:
sv$="000000"
inc fra2 `:if fra2<0 then end
sv$=sv$+str$(fra2)
sv$=right$(sv$,5)
fil$="F:\frames13\"+sv$+".png"
`box 815,395,1105,685
get image 2000,0,0,sw,sh,1
save image fil$,2000
return
````````````````````````````````````````
trong:
a#(f)=-2+rnd(4)
b#(f)=-2+rnd(4)
return
ting:
t11#=(2+rnd(99))*0.001
t22#=(2+rnd(99))*0.0006
tt#=1+sin(delay) : tt#=tt#*t11#
aa#(f)=2+rnd(100)*tt#
tt#=1+sin(rnd(359)) : tt#=tt#*t22#
bb#(f)=2+rnd(100)*tt#
tt#=1+sin(rnd(359)) : tt#=tt#*0.0023
cc#(f)=2+rnd(100)*tt#
tt#=1+sin(rnd(359)) : tt#=tt#*0.003
dd#(f)=2+rnd(100)*tt#
return
`````````````````````````````````````````````````
dr1:
ink rnd(0xffffff) or gc
gc=gc<<8
xx=sw2+aaa#
yy=sh2+bbb#
box xx,yy,xx+r,yy+r
xx=sw2-aaa#
yy=sh2-bbb#
box xx,yy,xx+r,yy+r
xx=sw2+aaa#
yy=sh2-bbb#
box xx,yy,xx+r,yy+r
xx=sw2-aaa#
yy=sh2+bbb#
box xx,yy,xx+r,yy+r
return
``````````````````````````````````````````````````
dr2:
xx=sw2+aaa#
yy=sh2+bbb#
if gc=0 then gc=0x3070f010
ink rnd(0xffffff) or gc
gc=gc<<4
filledcircle(XX,YY,R)
xx=sw2-aaa#
yy=sh2-bbb#
filledcircle(XX,YY,R)
xx=sw2+aaa#
yy=sh2-bbb#
filledcircle(XX,YY,R)
xx=sw2-aaa#
yy=sh2+bbb#
filledcircle(XX,YY,R)
return
```````````````````````````````````````````````````````
fader:
get image 1111,0,0,sw,sh,1
make memblock from image 1,1111
a15=get memblock size(1)
for f=12 to a15-1 step 8
write memblock byte 1,f,memblock byte(1,f)*fd#
write memblock byte 1,f+1,memblock byte(1,f+1)*fd#
write memblock byte 1,f+2,memblock byte(1,f+2)*fd#
write memblock byte 1,f+4,memblock byte(1,f)*fd#
write memblock byte 1,f+5,memblock byte(1,f+1)*fd#
write memblock byte 1,f+6,memblock byte(1,f+2)*fd#
next f
make image from memblock 1222,1
paste image 1222,0,0
return
`````````````````````````````````````````
function FilledCircle( CX as integer, CY as integer, R as integer )
local x as integer
local y as integer
local i as integer
local s as integer
` Precalculate the square of the radius - this is the hypotenuse
i=R*R
` Calculate the size of the central square
s=R*0.70710678 : ` this number is sin(45)
` Draw it
box CX-s, CY-s, CX+s+1, CY+s+1
s=s+1
` Loop through the bit we have not yet drawn
for y=s to R
x=sqrt( i-(y*y) )
` Draw top and bottom
box CX-x, CY-y, CX+x+1, CY-y+1
box CX-x, CY+y, CX+x+1, CY+y+1
` Draw left and right
box CX-y, CY-x, CX-y+1, CY+x+1
box CX+y, CY-x, CX+y+1, CY+x+1
next y
endfunction