CodeBase - Various functions

Return to the CodeBase listing

Category: Complete Applications

Version: 1.0

0
0

Information

Uploaded: 30th Dec 2004 15:56

Modified: 2nd Feb 2005 15:58

Author:  Anonymous Coder

Summary

rem color rgb backdrop function colciel(r,g,b) color backdrop rgb(r,g,b) endfunction function fog(r,g,b,dist) fog on fog color rgb(r,g,b) fog distance dist endfunction rem faire object 3d+col+pos+col100rot function box(nbr,x,y,z,r,g,b,x#,y#,z#,cx1#,cy1#,cz1#,cx2#,cy2#,cz2#,rot) make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x#,y#,z# make object collision box nbr,cx1#,cy1#,cz1#,cx2#,cy2#,cz2#,rot endfunction rem faire object 3d+col+pos+col100rot function boxrac(nbr,x,y,z,r,g,b,x#,y#,z#,text) make object box nbr,x,y,z color object nbr,rgb(r,g,b) texture object nbr,text position object nbr,x#,y#,z# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 endfunction rem faire object 3d+col+pos function box100col(nbr,x,y,z,r,g,b,x#,y#,z#) make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x#,y#,z# endfunction rem ciel spherique function sphere(nbr,rayon,r,g,b,x#,y#,z#,tr) make object sphere nbr,rayon set object nbr,1,1,0,1,1,0,1 color object nbr,rgb(r,g,b) position object nbr,x#,y#,z# if tr=1 ghost object on nbr endif endfunction function arbre(nbr,x,y,z,r,g,b,x1#,y1#,z1#,sbr,gd,sr,sg,sb,sx,sy,sz) if image exist(101)=0 then load image "troncAr.bmp",101 if image exist(102)=0 then load image "feuilleAr.bmp",102 make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x1#,y1#,z1# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 texture object nbr,101 make object sphere sbr,gd color object sbr,rgb(sr,sg,sb) position object sbr,x1#,y1#+y/2,z1# scale object sbr,sx,sy,sz texture object sbr,102 endfunction function immeuble(nbr,x,y,z,r,g,b,x1#,y1#,z1#,sbr,tt) if image exist(100)=0 then load image "immeuble.bmp",100 make object box nbr,x,y,z color object nbr,rgb(r,g,b) position object nbr,x1#,y1#,z1# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 texture object nbr,100 make object box sbr,x/4,tt,z/4 color object sbr,rgb(r,g,b) position object sbr,x1#,y1#+tt*2 -50,z1# make object collision box sbr,object size x(sbr)/2.0*-1,object size y(sbr)/2.0*-1,object size z(sbr)/2.0*-1,object size x(sbr)/2.0,object size y(sbr)/2.0,object size z(sbr)/2.0,0 endfunction function light(nbr,r,g,b,x#,y#,z#) make light nbr color light nbr,rgb(r,g,b) position light nbr,x#,y#,z# endfunction function im(im$,nbr) load image im$,nbr,2 endfunction function herbe(nbr,h,x#,y#,z#) if image exist(103)=0 then load image "herbe.bmp",103 make object box nbr,0.5,h,0.5 position object nbr,x#,y#,z# texture object nbr,103 endfunction function mod(nom$,nbr,x#,y#,z#) load object nom$,nbr position object nbr,x#,y#,z# make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0 endfunction function son(nom$,nbr) load sound nom$,nbr endfunction

Full Description

rem color rgb backdrop<br /> function colciel(r,g,b)<br /> color backdrop rgb(r,g,b)<br /> endfunction<br /> function fog(r,g,b,dist)<br /> fog on<br /> fog color rgb(r,g,b)<br /> fog distance dist<br /> endfunction<br /> rem faire object 3d+col+pos+col100rot<br /> function box(nbr,x,y,z,r,g,b,x#,y#,z#,cx1#,cy1#,cz1#,cx2#,cy2#,cz2#,rot)<br /> make object box nbr,x,y,z<br /> color object nbr,rgb(r,g,b)<br /> position object nbr,x#,y#,z#<br /> make object collision box nbr,cx1#,cy1#,cz1#,cx2#,cy2#,cz2#,rot<br /> endfunction <br /> <br /> <br /> rem faire object 3d+col+pos+col100rot<br /> function boxrac(nbr,x,y,z,r,g,b,x#,y#,z#,text)<br /> make object box nbr,x,y,z<br /> color object nbr,rgb(r,g,b)<br /> texture object nbr,text<br /> position object nbr,x#,y#,z#<br /> make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0<br /> endfunction <br /> <br /> rem faire object 3d+col+pos<br /> function box100col(nbr,x,y,z,r,g,b,x#,y#,z#)<br /> make object box nbr,x,y,z<br /> color object nbr,rgb(r,g,b)<br /> position object nbr,x#,y#,z#<br /> endfunction <br /> <br /> rem ciel spherique<br /> function sphere(nbr,rayon,r,g,b,x#,y#,z#,tr)<br /> make object sphere nbr,rayon<br /> set object nbr,1,1,0,1,1,0,1<br /> color object nbr,rgb(r,g,b)<br /> position object nbr,x#,y#,z#<br /> if tr=1<br /> ghost object on nbr<br /> endif<br /> endfunction <br /> <br /> function arbre(nbr,x,y,z,r,g,b,x1#,y1#,z1#,sbr,gd,sr,sg,sb,sx,sy,sz)<br /> if image exist(101)=0 then load image &quot;troncAr.bmp&quot;,101<br /> if image exist(102)=0 then load image &quot;feuilleAr.bmp&quot;,102<br /> <br /> make object box nbr,x,y,z<br /> color object nbr,rgb(r,g,b)<br /> position object nbr,x1#,y1#,z1#<br /> make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0<br /> texture object nbr,101<br /> <br /> make object sphere sbr,gd<br /> color object sbr,rgb(sr,sg,sb)<br /> position object sbr,x1#,y1#+y/2,z1#<br /> scale object sbr,sx,sy,sz<br /> texture object sbr,102<br /> <br /> endfunction <br /> <br /> <br /> function immeuble(nbr,x,y,z,r,g,b,x1#,y1#,z1#,sbr,tt)<br /> if image exist(100)=0 then load image &quot;immeuble.bmp&quot;,100<br /> make object box nbr,x,y,z<br /> color object nbr,rgb(r,g,b)<br /> position object nbr,x1#,y1#,z1#<br /> make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0<br /> texture object nbr,100<br /> <br /> make object box sbr,x/4,tt,z/4<br /> color object sbr,rgb(r,g,b)<br /> position object sbr,x1#,y1#+tt*2 -50,z1#<br /> make object collision box sbr,object size x(sbr)/2.0*-1,object size y(sbr)/2.0*-1,object size z(sbr)/2.0*-1,object size x(sbr)/2.0,object size y(sbr)/2.0,object size z(sbr)/2.0,0<br /> endfunction<br /> <br /> function light(nbr,r,g,b,x#,y#,z#)<br /> make light nbr<br /> color light nbr,rgb(r,g,b)<br /> position light nbr,x#,y#,z#<br /> endfunction<br /> <br /> function im(im$,nbr)<br /> load image im$,nbr,2<br /> endfunction<br /> <br /> function herbe(nbr,h,x#,y#,z#)<br /> if image exist(103)=0 then load image &quot;herbe.bmp&quot;,103<br /> make object box nbr,0.5,h,0.5<br /> position object nbr,x#,y#,z#<br /> texture object nbr,103<br /> endfunction<br /> <br /> function mod(nom$,nbr,x#,y#,z#)<br /> load object nom$,nbr<br /> position object nbr,x#,y#,z#<br /> make object collision box nbr,object size x(nbr)/2.0*-1,object size y(nbr)/2.0*-1,object size z(nbr)/2.0*-1,object size x(nbr)/2.0,object size y(nbr)/2.0,object size z(nbr)/2.0,0<br /> endfunction <br /> <br /> function son(nom$,nbr)<br /> load sound nom$,nbr<br /> endfunction<br />

Comments

No comments yet.