"fog"
setVolumetricFog(TEXTURE,50,80);
setColorFog(100,10,10);
-> red volumetric fog from distance 50 to 80
"Glow"
setGlow(BLUR,INTENSITY);
-> function mapper available
setGlowFunction($Post$);
"Editor Parameters"
setParam(CAMERA,OFF);
setParam(SHOWINFOS,OFF);
setParam(OBJINFOS,OFF);
setParam(SHOWGRID,OFF);
setParam(SINGLE,OFF);
setParam(LIGHTS,OFF);
setParam(DRAWENV,OFF);
"Shadowing"
setShadows(ON);
setShadows(MULTIPLE);
setShadows(OFF);
"Basic internal renderer"
renderSkipDraw(ON/OFF);
"Parse Added Objects"
int n_objects;
int objects_index[128];
n_objects=0;
for (n=0;n
-> create a list of Added with the reference name
player=getWOAddedByName("PLAYER");
"Clones"
resetClones();
int pp=0;
for (y=0;y<16;y++)
{
for (x=0;x<16;x++)
{
pos=upleft + x*decalx + y*decaly;
setCloneWOAsAdditionnal(pp,num_obj[x][y]);
setClonePosition(pp,pos.x,pos.y,pos.z);
setCloneRotation(pp,0.0,0.0,0.0);
pp++;
}
}
-> set a 16x16 grid of Clones Added references by "num_obj"
"Renderer contexts"
setMachineState(ON/OFF);
-> enable or disable basic rendering commands
ex:
setZBuffer(ON);
setZBuffer(WRITEOFF);
setAlphaBlending(BLEND_HIGH);
setAlphaTest(ENABLE);
"Sound"
initSound(); (*)
loadSound(0,"fire.ogg");
playSound(0,1); # play the "fire" sound looping
Free:
stopSound(0);
freeSound(0);
killSound(); (*)
"Music"
loadMusic(0,"ace.mod");
initMusicPlayer();
playMusic(0);
setMusicVolume(0.5);
Free:
killMusicPlayer();
"Shaders"
Init:
createShader(0,"env.shd");
Play:
setQuadShader(0);
QuadNA(TEXTURE_0,0,0,W,H,0,0,1,1);
resetQuadShader();
Free:
freeShader(0);
"2D Texts"
createFont(0,"tahoma.ttf",255,255,255,0,0,0,32,8,10,128);
drawString(X,Y,"Hello world !",SCALE,R,G,B);
drawStringCenter(X,Y,"Hello world !",SCALE,R,G,B);
X+=drawCar(X,Y,'%c',SCALE,R,G,B);
"3D Texts"
Init:
setFont3DText("tahoma.ttf");
gen3DText("Hello!",0,1,1,120,100,800,3,12.0);
Or:
int add = gen3DTextToAdded("Hello!",0,1,1,120,100,800,3,12.0);
with:
restoreBaseAdded(); # on close
Play:
drawAddedSet3DText();
drawAddedSetPosition(0,0,0);
drawAddedSetRotation(90,ang,0);
drawAddedSetScale(1,1,1);
drawAddedCalculateMatrix();
drawAddedSetShader(1,$sm_proc$);
drawAddedDraw();