QCake verwendet die Sprache SPL von Clifford. Sie funktioniert unter Linux i386 und ppc, Mac-OSX und Windows.

Die SPL enthält einen just in time Compiler. Die Sprache nennt sich SPL.

QCake spl Globals:
-----------------

QCakeID   // the ID from this script file

QCake stdlib API:
-----------------

object Vector  // x,y,z Vector
{
    + oder +=     -> method operator_add(a, b)

    - oder -=     -> method operator_sub(a, b)

    method init(_x, _y, _z)
}

object QCO  // Object reference of a 3D Object
{
  method getattr(attribute)

  method setattr(attribute, newvalue)

  Vector method getpos()

  Vector method getrot()

  method setpos(Vector v)

  method setrot(Vector r)          // rotate global axis

  method rotate(Vector r)          // rotate relativ object axis

  method move(Vector v)            // move delta v
  
  method getpos_x()                // position
  method getpos_y()
  method getpos_z()

  method getrot_h()
  method getrot_p()
  method getrot_r()

  method setsequence(int s, int m) // s -> sequence, m -> mode

  method Ref() // read the reference
  
  method init(_id)   // get a reference of a 3D Object
}



QCake API:
----------

    int getRef(int id); // get a reference of a 3D Object

    int getParentID(int id); // get the Parent-ID of the Object id

    setPosition (int objref, float x, float y, float z, float h, float p, float r); // Set the position and angle of a 3D Object

    float getPositionX (int objref); // Get the position and angle of a 3D Object
    
    float getPositionY (int objref); // Get the position and angle of a 3D Object

    float getPositionZ (int objref); // Get the position and angle of a 3D Object

    float getPositionH (int objref); // Get the position and angle of a 3D Object

    float getPositionP (int objref); // Get the position and angle of a 3D Object

    float getPositionR (int objref); // Get the position and angle of a 3D Object

    Rotate (int objref, float h, float p, float r);  // Rotate relative Object Axis angel h,p,r

    string* getAttribute(int objref, char *string); // get the attribut of the object(ref)

    setAttribute(int objref, char *string, char *value); // set the attribute of the object(ref)

    int getMouse(int achse); // get the X(0) or Y(1) Coordinate from the Mouse

    int getMouseButton(); // get the Button value Bit0 = LelftButton Bit1 = MidButton Bit2 = RightButton

    int getMouse(int achse); // get the X(0) or Y(1) Coordinate from the mouse pointers

    int get3DMouse(int achse); // get the X(0) or Y(1) or Z(2 )Coordinate from the 3D-World behind the mouse pointers first 3D Object

    float getJoystick(int js,int achse); // get the value from js 0,1 and the achse 0,1,2,3,4,5,6,7,8

    int getJoyButton(int js); // get the Button value

    int getKey(); // get the last pressed key

    int keyPressed( int keycode); // return 1 if key is pressed 

    switchScene(int objref); // switch the Scene to the Display

    playSound(int objref); // play the Sound

    stopSound(int objref); // play the Sound

    switchCamera(int objref); // View from Camera to the Scene

    srand(int seed); // set start for rand

    float rand(void); // get random number 0 .. 1 float

    addRelTorque (int objref, float x, float y, float z);

    addRelForce (int objref, float x, float y, float z);

    setAngVel (int objref, float x, float y, float z);

    setLinVel (int objref, float x, float y, float z);

    setSequence (int objref, int seq, int mode);  // Set the Sequence of md2 Objects

    int astarFindPath (int pl, int sx, int sy, int tx, int ty); // find path for player from source to target
    
    int astarReadPathX (int pl, int numx); // read x coordinate path for player 

    int astarReadPathY (int pl, int numy); // read y coordinate path for player

    int astarReadMap (char file); // read map file "." walkabel or unwalkable

    int astarReadMapValue (int x, int y); // read map value[x][y]

    int astarInit (width, height, tileSize, people); // by default (40,40,1,8) it exist, but if you want to change the values

    int tmpobjInit (int objref, float x, float y, float z, float h, float p, float r, id); // make a temp. 3D-OBJ from objref.The tmp coordinate system is connected to the coordinate system of the Object with tempid=id. If id is zero the new object coordinates system is connected to the parent object (object[objref])


todo:

    deltmpobj(int id);  // delete the tmbobj from the scene and the qcake listview tree

