示例#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));
}
示例#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);
}
示例#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));
}
// 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));
}
示例#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);
}
示例#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);
}
示例#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));
}
示例#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));
}
示例#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);
}
示例#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);
}
示例#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));
}
示例#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));
}
示例#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));
}
示例#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);
}
示例#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);
}
示例#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));
}
示例#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)));
}