Ejemplo n.º 1
0
// 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));
}
Ejemplo n.º 2
0
// DECL: void drawDebug(unsigned int debugFlags);
void hx_Scene_drawDebug(value thisObj, value debugFlags)
{
    Scene *_thisObj;
    unsigned int _debugFlags = ValueToUint(debugFlags);
    ValueToObject(thisObj, _thisObj);
    _thisObj->drawDebug(_debugFlags);
}
Ejemplo n.º 3
0
// DECL: const char* getObjectId(unsigned int index) const;
value hx_Bundle_getObjectId(value thisObj, value index)
{
    Bundle *_thisObj;
    unsigned int _index = ValueToUint(index);
    ValueToObject(thisObj, _thisObj);
    return StringToValue(_thisObj->getObjectId(_index));
}
Ejemplo n.º 4
0
// 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));
}
Ejemplo n.º 5
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);
}
Ejemplo n.º 6
0
// DECL: inline Gamepad* getGamepad(unsigned int index) const;
value hx_Game_getGamepad(value thisObj, value index)
{
    Game *_thisObj;
    unsigned int _index = ValueToUint(index);
    ValueToObject(thisObj, _thisObj);
    return ObjectToValue(_thisObj->getGamepad(_index), false);
}
Ejemplo n.º 7
0
// DECL: ButtonState getButtonState(unsigned int buttonId) const;
value hx_Gamepad_getButtonState(value thisObj, value buttonId)
{
    Gamepad* _thisObj;
    int _buttonId = ValueToUint(buttonId);
    ValueToObject(thisObj, _thisObj);
    return EnumToValue(_thisObj->getButtonState(_buttonId));
}
Ejemplo n.º 8
0
// DECL: float getTriggerValue(unsigned int triggerId) const;
value hx_Gamepad_getTriggerValue(value thisObj, value triggerId)
{
    Gamepad *_thisObj;
    unsigned int _triggerId = ValueToUint(triggerId);
    ValueToObject(thisObj, _thisObj);
    return alloc_float(_thisObj->getTriggerValue(_triggerId));
}
Ejemplo n.º 9
0
// 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);
}
Ejemplo n.º 10
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);
}
Ejemplo n.º 11
0
// DECL: bool isJoystickActive(unsigned int joystickId) const;
value hx_Gamepad_isJoystickActive(value thisObj, value joystickId)
{
    Gamepad* _thisObj;
    unsigned int _joystickId = ValueToUint(joystickId);
    ValueToObject(thisObj, _thisObj);
    return alloc_bool(_thisObj->isJoystickActive(_joystickId));
}
Ejemplo n.º 12
0
// DECL: float getJoystickAxisY(unsigned int joystickId) const;
value hx_Gamepad_getJoystickAxisY(value thisObj, value joystickId)
{
    Gamepad* _thisObj;
    unsigned int _joystickId = ValueToUint(joystickId);
    ValueToObject(thisObj, _thisObj);
    return alloc_float(_thisObj->getJoystickAxisY(_joystickId));
}
Ejemplo n.º 13
0
// DECL: static SpriteBatch* create(const char* texturePath, Effect* effect = NULL, unsigned int initialCapacity = 0);
value hx_SpriteBatch_static_create_Str_Eff_Int(value texturePath, value effect, value initialCapacity)
{
    const char *_texturePath = ValueToString(texturePath);
    Effect *_effect;
    unsigned int _initialCapacity = ValueToUint(initialCapacity);
    ValueToObject(effect, _effect);
    return ObjectToValue(SpriteBatch::create(_texturePath, _effect, _initialCapacity));
}
Ejemplo n.º 14
0
// DECL: void getJoystickValues(unsigned int joystickId, Vector2* outValues) const;
void hx_Gamepad_getJoystickValues(value thisObj, value joystickId, value outValues)
{
    Gamepad *_thisObj;
    unsigned int _joystickId = ValueToUint(joystickId);
    Vector2 *_outValues;
    ValueToObject(thisObj, _thisObj);
    ValueToObject(outValues, _outValues);
    _thisObj->getJoystickValues(_joystickId, _outValues);
}
Ejemplo n.º 15
0
// DECL: void setRenderTarget(RenderTarget* target, unsigned int index = 0);
void hx_FrameBuffer_setRenderTarget(value thisObj, value target, value index)
{
    FrameBuffer *_thisObj;
    RenderTarget *_target;
    unsigned int _index = ValueToUint(index);
    ValueToObject(thisObj, _thisObj);
    ValueToObject(target, _target);
    _thisObj->setRenderTarget(_target, _index);
}
Ejemplo n.º 16
0
// DECL: static SpriteBatch* create(Texture* texture, Effect* effect = NULL, unsigned int initialCapacity = 0);
value hx_SpriteBatch_static_create_Tex_Eff_Int(value texture, value effect, value initialCapacity)
{
    Texture *_texture;
    Effect *_effect;
    unsigned int _initialCapacity = ValueToUint(initialCapacity);
    ValueToObject(texture, _texture);
    ValueToObject(effect, _effect);
    return ObjectToValue(SpriteBatch::create(_texture, _effect, _initialCapacity));
}
Ejemplo n.º 17
0
// DECL: static Vector3 fromColor(unsigned int color);
value hx_Vector3_static_fromColor(value color)
{
    unsigned int _color = ValueToUint(color);
    return ObjectToValue(new Vector3(Vector3::fromColor(_color)));
}