sync on
 
gosub gethedgetex
gosub getbarktex
 
cls
 
autocam off
 
position camera 0,200,-1000
point camera 0,0,0
 
make object box 1,1000,500,100
texture object 1,1
scale object texture 1,5,5
 
direction=1
while mouseclick()=0 and scancode=0
 
   if direction=1 then speed#=speed#+0.1
   if direction=0 then speed#=speed#-0.1
 
   if speed#>5 then speed#=5
   if speed#<-5 then speed#=-5
 
   camy#=camy#+speed#
 
   if camy#>200 then direction=0
   if camy#<-200 then direction=1
 
   position camera 0,camy#,-1000
 
   yrotate object 1,wrapvalue(object angle y(1)+1)
 
   set cursor 0,0
   ink rgb(255,255,255),0
   print camy#
   print speed#
 
   sync
 
endwhile
 
delete object 1
 
print "1"
sync
 
position camera 0,0,-1000
 
make object cone 1,500
texture object 1,1
scale object texture 1,5,5
 
make mesh from object 1,1
add limb 1,1,1
offset limb 1,1,0,-300,0
hide limb 1,1
 
make object cylinder 2,200
texture object 2,2
scale object texture 1,5,5
glue object to limb 2,1,1
 
sleep 500
 
camy#=0
direction=1
while mouseclick()=0 and scancode=0
 
   if direction=1 then speed#=speed#+0.1
   if direction=0 then speed#=speed#-0.1
 
   if speed#>5 then speed#=5
   if speed#<-5 then speed#=-5
 
   camy#=camy#+speed#
 
   if camy#>200 then direction=0
   if camy#<-200 then direction=1
 
   position camera 0,camy#,-1000
 
   yrotate object 1,wrapvalue(object angle y(1)+1)
 
   set cursor 0,0
   ink rgb(255,255,255),0
   print camy#
   print speed#
 
   sync
 
endwhile
 
end
 
gethedgetex:
 
   texturexsize=64
   textureysize=64
 
   ink rgb(0,128,0),0
   box 1,1,texturexsize,textureysize
 
   ink rgb(0,100,25),0
   for i=1 to 500
      dot rnd(texturexsize),rnd(textureysize)
   next i
 
   for i=1 to 1000
      x1=rnd(texturexsize)
      y1=rnd(textureysize)
      x2=(rnd(10)-5)+x1
      y2=y1-rnd(5)+5
      ink rgb(0,rnd(150)+100,0),0
      line x1,y1,x2,y2
   next i
 
   get image 1,1,1,texturexsize,textureysize
 
return
 
getbarktex:
 
   texturexsize=64
   textureysize=64
 
   ink rgb(50,20,0),0
   box 1,1,texturexsize,textureysize
 
   ink rgb(90,50,0),0
   for i=1 to 500
      dot rnd(texturexsize),rnd(textureysize)
   next i
 
   for i=1 to 1000
      x1=rnd(texturexsize)
      y1=rnd(textureysize)
      x2=(rnd(10)-5)+x1
      y2=y1-rnd(5)+5
      r=rnd(40)+60
      g=rnd(r-30)
      ink rgb(r,g,0),0
      line x1,y1,x2,y2
   next i
 
   get image 2,1,1,texturexsize,textureysize
 
return