Hi All
Now this works ok with box command but with Circle and DOT and ELLIPSE they do not show up.
Rem Created: Wednesday, December 02, 2009
Rem ***** Main Source File *****
sync on
sync rate 60
autocam off
position camera 0,1.5,0
point camera 0,0,0
global done
global sw sh
global middlewidth
global middleheight
sw = screen width()
sh = screen height()
create bitmap 1,sw,sh
make camera 1
set camera to image 1,1,sw,sh
set current bitmap 0
set current camera 0
make object sphere 1,1,40,40
scale object 1,100,0,100
rotate object 1,0,0,0
global stars
stars = 1000
makestars()
do
make_color_map(xx,75,RGB(0,0,255),RGB(0,255,0),RGB(255,0,0),RGB(255,255,0))
texture object 1,1
set blend mapping on 1,1,1
sync
loop
function make_color_map(x,y,color_a,color_b,color_c,color_d)
set current bitmap -1
cls 0
for st=0 to stars
star_rad#(st)=star_rad#(st)-star_spd#(st)
if star_rad#(st)<0 then star_rad#(st)=star_rad#(st)+sw/2
px=sw/2+(sin(star_ang#(st))*star_rad#(st))
py=sh/2+(cos(star_ang#(st))*star_rad#(st))
pc=(star_rad#(st))+55
if pc>255 then pc=255
ink rgb(rnd(255),rnd(255),rnd(255))
dot px,py,rgb(pc,pc,pc)
circle px,py,rnd(100)
rem box works ok
` box px,py,rnd(px),rnd(py),rgb(255,255,255),rgb(255,0,0),rgb(255,0,255),rgb(255,255,0)
next st
center text sw-100,150,"Its full of rings"
set current bitmap 0
endfunction
function makestars()
Dim star_ang#(stars)
Dim star_rad#(stars)
Dim star_spd#(stars)
for st=0 to stars
star_ang#(st)=rnd(36000)/100.00
star_rad#(st)=rnd(sw/2)
star_spd#(st)=0.5+abs(sin(rnd(360)))
next st
endfunction
same code but using get image so that you can see what I was aiming for, but even that changes on the second pass, image gets bigger, or I'm grabbing it wrong.
Rem Created: Wednesday, December 02, 2009
Rem ***** Main Source File *****
sync on
sync rate 60
autocam off
position camera 0,1.5,0
point camera 0,0,0
global done
global sw sh
global middlewidth
global middleheight
sw = screen width()
sh = screen height()
create bitmap 1,sw,sh
make camera 1
set camera to image 1,1,sw,sh,0
set current bitmap 0
set current camera 0
make object sphere 1,1,40,40
scale object 1,100,0,100
rotate object 1,0,0,0
global stars
stars = 1000
makestars()
do
make_color_map(xx,75,RGB(0,0,255),RGB(0,255,0),RGB(255,0,0),RGB(255,255,0))
texture object 1,1
set blend mapping on 1,1,1
sync
loop
function make_color_map(x,y,color_a,color_b,color_c,color_d)
set current bitmap 1
cls 0
for st=0 to stars
star_rad#(st)=star_rad#(st)-star_spd#(st)
if star_rad#(st)<0 then star_rad#(st)=star_rad#(st)+sw/2
px=sw/2+(sin(star_ang#(st))*star_rad#(st))
py=sh/2+(cos(star_ang#(st))*star_rad#(st))
pc=(star_rad#(st))+55
if pc>255 then pc=255
ink rgb(rnd(255),rnd(255),rnd(255))
dot px,py,rgb(pc,pc,pc)
`circle px,py,rnd(100)
rem box works ok
`box px,py,rnd(px),rnd(py),rgb(255,255,255),rgb(255,0,0),rgb(255,0,255),rgb(255,255,0)
next st
center text sw/2,150,"Its full of rings"
get image 1,0,0,sw,sh
set current bitmap 0
endfunction
function makestars()
Dim star_ang#(stars)
Dim star_rad#(stars)
Dim star_spd#(stars)
for st=0 to stars
star_ang#(st)=rnd(36000)/100.00
star_rad#(st)=rnd(sw/2)
star_spd#(st)=0.5+abs(sin(rnd(360)))
next st
endfunction
edit
tile should say [DBP 7.5.4]
Dark Physics makes any hot drink go cold.