// DECL: Animation* getAnimation(const char* id = NULL) const;
value hx_AnimationTarget_getAnimation(value thisObj, value id)
{
    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getAnimation(_id), true, true);
}
Exemple #2
0
// DECL: Pass* getPassByIndex(unsigned int index) const;
value hx_Technique_getPassByIndex(value thisObj, value index)
{
    Technique *_thisObj;
    unsigned int _index = ValueToUint(index);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getPassByIndex(_index), true);
}
Exemple #3
0
// DECL: Scene* loadScene(const char* id = NULL);
value hx_Bundle_loadScene(value thisObj, value id)
{
    Bundle *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->loadScene(_id));
}
Exemple #4
0
// DECL: Node* addNode(const char* id = NULL);
value hx_Scene_addNode_Str(value thisObj, value id)
{
    Scene *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->addNode(_id), true);
}
// DECL: AIState* setState(const char* id);
value hx_AIStateMachine_setState_Str(value thisObj, value id)
{
    AIStateMachine *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->setState(_id), true);
}
Exemple #6
0
// DECL: Pass* getPass(const char* id) const;
value hx_Technique_getPass(value thisObj, value id)
{
    Technique *_thisObj;
    const char *_id = ValueToString(id);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getPass(_id), true);
}
// DECL: static FrameBuffer* create(const char* id, unsigned int width, unsigned int height);
value hx_FrameBuffer_static_create_Str_IntX2(value id, value width, value height)
{
    const char *_id = ValueToString(id);
    unsigned int _width = ValueToUint(width);
    unsigned int _height = ValueToUint(height);
    return ReferenceToValue(FrameBuffer::create(_id, _width, _height));
}
// DECL: AnimationClip* getClip(const char* clipId = NULL);
value hx_Animation_getClip_Str(value thisObj, value clipId)
{
    Animation *_thisObj;
    const char *_clipId = ValueToString(clipId);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getClip(_clipId), true, true);
}
// DECL: RenderTarget* getRenderTarget(unsigned int index = 0) const;
value hx_FrameBuffer_getRenderTarget(value thisObj, value index)
{
    FrameBuffer *_thisObj;
    unsigned int _index = ValueToUint(index);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getRenderTarget(_index), true, true);
}
Exemple #10
0
// DECL: static Joystick* create(const char* id, Theme::Style* style);
value hx_Joystick_static_create(value id, value style)
{
    const char *_id = ValueToString(id);
    Theme::Style *_style;
    ValueToObject(style, _style);
    return ReferenceToValue(Joystick::create(_id, _style));
}
// DECL: static RadioButton* create(const char* id, Theme::Style* style);
value hx_RadioButton_static_create(value id, value style)
{
    const char *_id = ValueToString(id);
    Theme::Style *_style;
    ValueToObject(style, _style);
    return ReferenceToValue(RadioButton::create(_id, _style));
}
// DECL: MaterialParameter* getParameter(const char* name) const;
value hx_RenderState_getParameter(value thisObj, value name)
{
    RenderState *_thisObj;
    const char *_name = ValueToString(name);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getParameter(_name), true, true);
}
Exemple #13
0
// DECL: AnimationClip* getClip(unsigned int index) const;
value hx_Animation_getClip_Int(value thisObj, value index)
{
    Animation *_thisObj;
    unsigned int _index = ValueToUint(index);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getClip(_index), true, true);
}
// DECL: Animation* createAnimation(const char* id, int propertyId, unsigned int keyCount, unsigned int* keyTimes, float* keyValues, float* keyInValue, float* keyOutValue, Curve::InterpolationType type);
value hx_AnimationTarget_createAnimation_Str_IntX2_DatX4_Int(value *args, int nargs)
{
    const value& thisObj = *args++;
    const value& id = *args++;
    const value& propertyId = *args++;
    const value& keyCount = *args++;
    const value& keyTimes = *args++;
    const value& keyValues = *args++;
    const value& keyInValue = *args++;
    const value& keyOutValue = *args++;
    const value& type = *args;

    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    int _propertyId = val_get_int(propertyId);
    unsigned int _keyCount = ValueToUint(keyCount);
    unsigned int *_keyTimes;
    float *_keyValues;
    float *_keyInValue;
    float *_keyOutValue;
    Curve::InterpolationType _type;
    ValueToObject(thisObj, _thisObj);
    ValueToBuffer(keyTimes, _keyTimes);
    ValueToBuffer(keyValues, _keyValues);
    ValueToBuffer(keyInValue, _keyInValue);
    ValueToBuffer(keyOutValue, _keyOutValue);
    ValueToEnum(type, _type);
    return ReferenceToValue(_thisObj->createAnimation(_id, _propertyId, _keyCount, _keyTimes, _keyValues, _keyInValue, _keyOutValue, _type));
}
 void controlEvent(Control *control, EventType type)
 {
     val_call2(
             clbkControlEvent.get(),
             ReferenceToValue(control, true),
             EnumToValue(type)
         );
 }
// DECL: Animation* createAnimation(const char* id, const char* url);
value hx_AnimationTarget_createAnimation_StrX2(value thisObj, value id, value url)
{
    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    const char *_url = ValueToString(url);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->createAnimation(_id, _url));
}
Exemple #17
0
// DECL: Node* findNode(const char* id, bool recursive = true, bool exactMatch = true) const;
value hx_Scene_findNode(value thisObj, value id, value recursive, value exactMatch)
{
    Scene *_thisObj;
    const char *_id = ValueToString(id);
    bool _recursive = val_get_bool(recursive);
    bool _exactMatch = val_get_bool(exactMatch);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->findNode(_id, _recursive, _exactMatch), true);
}
// DECL: Animation* createAnimation(const char* id, Properties* animationProperties);
value hx_AnimationTarget_createAnimation_Str_Prop(value thisObj, value id, value animationProperties)
{
    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    Properties *_animationProperties;
    ValueToObject(thisObj, _thisObj);
    ValueToObject(animationProperties, _animationProperties);
    return ReferenceToValue(_thisObj->createAnimation(_id, _animationProperties));
}
Exemple #19
0
 bool visitWrapper(Node *node)
 {
     bool result =
             val_get_bool(val_call1(
                     clbkVisitMethod.get(),
                     ReferenceToValue(node, true)
                 ));
     return result;
 }
Exemple #20
0
// DECL: AnimationClip* createClip(const char* id, unsigned long start, unsigned long end);
value hx_Animation_createClip(value thisObj, value id, value start, value end)
{
    Animation *_thisObj;
    const char *_id = ValueToString(id);
    unsigned long _start = ValueToUlong(start);
    unsigned long _end = ValueToUlong(end);
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->createClip(_id, _start, _end));
}
Exemple #21
0
 bool visitWrapper(Node *node, long cookie)
 {
     bool result =
             val_get_bool(val_call2(
                     clbkVisitMethod.get(),
                     ReferenceToValue(node, true),
                     alloc_int(cookie)
                 ));
     return result;
 }
Exemple #22
0
// DECL: unsigned int findNodes(const char* id, std::vector<Node*>& nodes, bool recursive = true, bool exactMatch = true) const;
value hx_Scene_findNodes(value thisObj, value id, value nodes, value recursive, value exactMatch)
{
    Scene *_thisObj;
    const char *_id = ValueToString(id);
    std::vector<Node*> _nodes;
    bool _recursive = val_get_bool(recursive);
    bool _exactMatch = val_get_bool(exactMatch);
    ValueToObject(thisObj, _thisObj);

    _thisObj->findNodes(_id, _nodes, _recursive, _exactMatch);

    const value& result = alloc_array(_nodes.size());
    for (int index = 0; index < _nodes.size(); index++)
        val_array_set_i(result, index, ReferenceToValue(_nodes[index], true));

    SetOutParameterValue(nodes, result);

    return alloc_int(_nodes.size());
}
// DECL: Animation* createAnimationFromBy(const char* id, int propertyId, float* from, float* by, Curve::InterpolationType type, unsigned long duration);
value hx_AnimationTarget_createAnimationFromBy(value *args, int nargs)
{
    const value& thisObj = *args++;
    const value& id = *args++;
    const value& propertyId = *args++;
    const value& from = *args++;
    const value& by = *args++;
    const value& type = *args++;
    const value& duration = *args;

    AnimationTarget *_thisObj;
    const char *_id = ValueToString(id);
    int _propertyId = val_get_int(propertyId);
    float *_from;
    float *_by;
    Curve::InterpolationType _type;
    unsigned long _duration = ValueToUlong(duration);
    ValueToObject(thisObj, _thisObj);
    ValueToBuffer(from, _from);
    ValueToBuffer(by, _by);
    ValueToEnum(type, _type);
    return ReferenceToValue(_thisObj->createAnimationFromBy(_id, _propertyId, _from, _by, _type, _duration));
}
Exemple #24
0
// DECL: Form* getForm() const;
value hx_Gamepad_getForm(value thisObj)
{
    Gamepad *_thisObj;
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getForm(), true);
}
Exemple #25
0
// DECL: static Scene* load(const char* filePath);
value hx_Scene_static_load(value filePath)
{
    const char *_filePath = ValueToString(filePath);
    return ReferenceToValue(Scene::load(_filePath));
}
// DECL: static FrameBuffer* getFrameBuffer(const char* id);
value hx_FrameBuffer_static_getFrameBuffer(value id)
{
    const char *_id = ValueToString(id);
    return ReferenceToValue(FrameBuffer::getFrameBuffer(_id), true, true);
}
// DECL: DepthStencilTarget* getDepthStencilTarget() const;
value hx_FrameBuffer_getDepthStencilTarget(value thisObj)
{
    FrameBuffer *_thisObj;
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getDepthStencilTarget(), true, true);
}
// DECL: static FrameBuffer* create(const char* id);
value hx_FrameBuffer_static_create_Str(value id)
{
    const char *_id = ValueToString(id);
    return ReferenceToValue(FrameBuffer::create(_id));
}
// DECL: Node* getNode() const;
value hx_PhysicsCollisionObject_getNode(value thisObj)
{
    PhysicsCollisionObject *_thisObj;
    ValueToObject(thisObj, _thisObj);
    return ReferenceToValue(_thisObj->getNode(), true, true);
}
Exemple #30
0
// DECL: static Scene* create();
value hx_Scene_static_create()
{
    return ReferenceToValue(Scene::create());
}