call screen ' I made this for a generic screen call
call sphere 500,500,220,225,240,250,1'sphere h,v,size,R,G,B,dimmer  --syntax
call block 100,50,20,200,200,200,8' block x,y,size,R,G,B,dimmer
call ellipse 100,500,250,100,225,240,250,2 ' ellipse x,y,width,height,R,G,B,dimmer
call circle 800,600,20,"green" 'circle x,y,size,"color"
call chip 700,700,100,"lightgray","black","blue"'chip x,y,size, color$ , topcolor$,midcolor$ 
call star 100,200,"starhalf"  'star h,v,"half or full star"
call star 200,120,"starfull"
wait
[quit]
  close #1
 end
'include tools.BAS
 
sub sphere h,v,size,x,c,a,dimmer ' dimmer cannot be more than 24
#1 "place ";h;" ";v
for y=1 to size
#1 "down"
#1 "color ";x;" ";c;" ";a
#1 "size 2"
#1 "circle ";y
#1 "flush"
x=x-dimmer
c=c-dimmer
a=a-dimmer
if x<2 then x=2
if c<2 then c=2
if a<2 then a=2
next y
end sub
'block h,v,size,R,G,B,dimmer
sub block h,v,size,x,c,a,dimmer ' dimmer cannot be more than 24
#1 "place ";h;" ";v
p=size/2
for y=1 to size
#1 "down"
#1 "color ";x;" ";c;" ";a
#1 "size 1"
print #1, "line ";h-y;" ";v-y;" ";h+y;" ";v-y
print #1, "line ";h+y;" ";v-y;" ";h+y;" ";v+y
print #1, "line ";h+y;" ";v+y;" ";h-y;" ";v+y
print #1, "line ";h-y;" ";v+y;" ";h-y;" ";v-y
x=x-dimmer
c=c-dimmer
a=a-dimmer
if x<2 then x=2
if c<2 then c=2
if a<2 then a=2
p=p-1
next y
end sub
'ellipse h,v,sizex,sizey,R,G,B,dimmer
sub ellipse h,v,sizex,sizey,x,c,a,dimmer ' dimmer cannot be more than 24
#1 "place ";h;" ";v
if sizex>sizey then limit=sizex
if sizey>sizex then limit=sizey
for y=1 to limit
#1 "down"
#1 "color ";x;" ";c;" ";a
#1 "size 2"
hi=hi+1:if sizex>sizey then hi=hi+1
wi=wi+1:if sizey>sizex then wi=wi+1
if hi>sizex then hi=sizex
if wi>sizey then wi=sizey
#1 "ellipse ";hi;" ";wi
x=x-dimmer
c=c-dimmer
a=a-dimmer
if x<2 then x=2
if c<2 then c=2
if a<2 then a=2
next y
end sub
'initialize generic screen
sub screen
   nomainwin
   open "Another way of doing graphics !!" for graphics_nsb_fs as #1
   print #1, "Down trapclose [quit]"
    print #1, "fill black ; home ; down ; north"
end sub
' generic circle   syntax -  circle horizontal, vertical, size, color$
sub circle x, y, size, color$
   print #1," place  "; x;" ";y
   print #1," color "; color$
   print #1," circle "; size
end sub
sub color c$
print #1, "color ";c$
end sub
'chip x,y,size, color$,topcolor$,midcolor$
sub chip x,y,size, color$ , topcolor$,midcolor$            '******** HERE IS THE CHIP SUB FOR THIS PROJECT
print #1, "down"
if size< 30 then size =30
print #1, "color ";color$
for nloc= 1 to size/10
print #1,"place "; x;" ";y-nloc
print #1, "ellipsefilled ";size;" ";size/2
next nloc
print #1, "flush"
print #1, "color ";topcolor$
print #1, "ellipsefilled ";size;" ";size/2
print #1, "flush"
print #1, "color ";midcolor$
m= size/4
print #1, "ellipsefilled ";size/2;" ";m
print #1, "flush"
end sub
' ****************** RATING STARS **************
sub star h, v, type$
    if type$ ="starhalf" then restore [starhalf]
    if type$ ="starfull" then restore [starfull]
    ost$ =""
    read x, y
    while nst$ <>"100000"
        read nst$, t
        if nst$ ="0" then r =  0: g=   0:  b=   0   'black         0   0   0
        if nst$ ="3" then r =128: g= 128:  b= 128   'dark grey   128 128 128
        if nst$ ="b" then r =224: g=  32:  b=  64   'light red   224  32  64
        if nst$ ="h" then r =255: g= 255:  b= 255   'white       255 255 255
        if nst$ ="i" then r =255: g= 255:  b=   0   'yellow      255 255   0
        #1 "color "; r; " "; g; " "; b
        for u =0 to t
            a =a +1
            #1 "set "; c +h; " "; a +v
            if a >x  then c =c +1: a =0
        next u
    wend
    #1 "flush"
  [starhalf]
    data 16,16
    data 0,5,b,0,0,15,b,1,0,14,b,0,h,0,b,0,0,13,b,0,i,0,b,0,0,4,b,1,0,6,b,0,i,1,b,0,0,0,b,3,0
    data 7,b,0,i,2,b,0,h,0,i,1,b,0,0,7,b,0,i,5,b,0,0,5,b,2,i,5,h,0,b,0,0,3,b,1,h,1,i,6,b,0
    data 100000,0
  [starfull]
    data 16,16
    data 0,5,b,0,0,15,b,1,0,14,b,0,h,0,b,0,0,13,b,0,i,0,b,0,0,4,b,1,0,6,b,0,i,1,b,0,0,0,b,3,0
    data 7,b,0,i,2,b,0,h,0,i,1,b,0,0,7,b,0,i,5,b,0,0,5,b,2,i,5,h,0,b,0,0,3,b,1,h,1,i,6,b,0
    data 0,6,b,2,h,0,i,5,b,0,0,8,b,0,i,2,h,1,i,0,b,0,0,8,b,0,i,1,h,0,b,0,h,2,b,0,0,7,b,0,i
    data 0,h,0,b,0,0,0,b,3,0,7,b,0,h,0,b,0,0,4,b,1,0,6,b,0,h,0,b,0,0,13,b,1,100000,0
end sub