Exemple #1
0
Record &Model::addSub()
{
    Record *sub = new Record;

    sub->addText  ("filename", "");
    sub->addText  ("skinFilename", "");
    sub->addText  ("frame", "");
    sub->addNumber("frameRange", 0);
    sub->addNumber("flags", 0);
    sub->addNumber("skin", 0);
    sub->addNumber("skinRange", 0);
    sub->addArray ("offset", new ArrayValue(Vector3f()));
    sub->addNumber("alpha", 0);
    sub->addNumber("parm", 0);
    sub->addNumber("selSkinMask", 0);
    sub->addNumber("selSkinShift", 0);

    ArrayValue *skins = new ArrayValue;
    for(int i = 0; i < 8; ++i) *skins << NumberValue(0);
    sub->addArray ("selSkins", skins);

    sub->addText  ("shinySkin", "");
    sub->addNumber("shiny", 0);
    sub->addArray ("shinyColor", new ArrayValue(Vector3f(1, 1, 1)));
    sub->addNumber("shinyReact", 1);
    sub->addNumber("blendMode", BM_NORMAL);

    def()["sub"].value<ArrayValue>()
            .add(new RecordValue(sub, RecordValue::OwnsRecord));

    return *sub;
}
Exemple #2
0
Record &Sky::addModel()
{
    Record *model = new Record;

    model->addBoolean("custom", false);

    model->addText  (VAR_ID, "");
    model->addNumber("layer", -1);
    model->addNumber("frameInterval", 1);
    model->addNumber("yaw", 0);
    model->addNumber("yawSpeed", 0);
    model->addArray ("originOffset", new ArrayValue(Vector3f()));
    model->addArray ("rotate", new ArrayValue(Vector2f()));
    model->addText  ("execute", "");
    model->addArray ("color", new ArrayValue(Vector4f(1, 1, 1, 1)));

    def()["model"].array().add(new RecordValue(model, RecordValue::OwnsRecord));

    return *model;
}