int w_World_update(lua_State * L)
	{
		World * t = luax_checkworld(L, 1);
		float dt = (float)luaL_checknumber(L, 2);
		t->update(dt);
		return 0;
	}
Esempio n. 2
0
int w_World_update(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	float dt = (float)luaL_checknumber(L, 2);
	luax_catchexcept(L, [&](){ t->update(dt); });
	return 0;
}
Esempio n. 3
0
int w_World_setSleepingAllowed(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    bool b = luax_toboolean(L, 2);
    t->setSleepingAllowed(b);
    return 0;
}
Esempio n. 4
0
int w_World_translateOrigin(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	float arg1 = (float)luaL_checknumber(L, 2);
	float arg2 = (float)luaL_checknumber(L, 3);
	EXCEPT_GUARD(t->translateOrigin(arg1, arg2);)
	return 0;
Esempio n. 5
0
int w_World_getContacts(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	lua_remove(L, 1);
	int ret = 0;
	luax_catchexcept(L, [&](){ ret = t->getContacts(L); });
	return ret;
}
Esempio n. 6
0
int w_World_destroy(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    luax_catchexcept(L, [&]() {
        t->destroy();
    });
    return 0;
}
Esempio n. 7
0
int w_World_rayCast(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	lua_remove(L, 1);
	int ret = 0;
	luax_catchexcept(L, [&](){ ret = t->rayCast(L); });
	return ret;
}
	int w_World_setMeter(lua_State * L)
	{
		World * t = luax_checkworld(L, 1);
		int arg1 = luaL_checkint(L, 2);
		t->setMeter(arg1);
		return 0;
		
	}
Esempio n. 9
0
int w_World_setGravity(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    float arg1 = (float)luaL_checknumber(L, 2);
    float arg2 = (float)luaL_checknumber(L, 3);
    t->setGravity(arg1, arg2);
    return 0;
}
Esempio n. 10
0
int w_World_translateOrigin(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	float arg1 = (float)luaL_checknumber(L, 2);
	float arg2 = (float)luaL_checknumber(L, 3);
	luax_catchexcept(L, [&](){ t->translateOrigin(arg1, arg2); });
	return 0;
}
Esempio n. 11
0
int w_World_update(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    float dt = (float)luaL_checknumber(L, 2);
    // Make sure the world callbacks are using the calling Lua thread.
    t->setCallbacksL(L);
    luax_catchexcept(L, [&]() {
        t->update(dt);
    });
    return 0;
}
Esempio n. 12
0
int w_World_destroy(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	try
	{
		t->destroy();
	}
	catch(love::Exception &e)
	{
		luaL_error(L, "%s", e.what());
	}
	return 0;
}
Esempio n. 13
0
int w_World_update(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	float dt = (float)luaL_checknumber(L, 2);

	// Make sure the world callbacks are using the calling Lua thread.
	t->setCallbacksL(L);

	if (lua_isnoneornil(L, 3))
		luax_catchexcept(L, [&](){ t->update(dt); });
	else
	{
		int velocityiterations = (int) luaL_checkinteger(L, 3);
		int positioniterations = (int) luaL_checkinteger(L, 4);
		luax_catchexcept(L, [&](){ t->update(dt, velocityiterations, positioniterations); });
	}

	return 0;
}
Esempio n. 14
0
int w_World_queryBoundingBox(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->queryBoundingBox(L);
}
Esempio n. 15
0
int w_World_getContactCount(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_pushinteger(L, t->getContactCount());
    return 1;
}
Esempio n. 16
0
int w_World_isLocked(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    luax_pushboolean(L, t->isLocked());
    return 1;
}
Esempio n. 17
0
int w_World_rayCast(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	lua_remove(L, 1);
	ASSERT_GUARD(return t->rayCast(L);)
}
Esempio n. 18
0
	int w_World_getMeter(lua_State * L)
	{
		World * t = luax_checkworld(L, 1);
		lua_pushinteger(L, t->getMeter());
		return 1;
	}
Esempio n. 19
0
int w_World_getCallbacks(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->getCallbacks(L);
}
Esempio n. 20
0
int w_World_getJointList(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	lua_remove(L, 1);
	return t->getJointList(L);
}
Esempio n. 21
0
int w_World_getContactFilter(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->getContactFilter(L);
}
Esempio n. 22
0
int w_World_isSleepingAllowed(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    luax_pushboolean(L, t->isSleepingAllowed());
    return 1;
}
Esempio n. 23
0
int w_World_getGravity(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->getGravity(L);
}
Esempio n. 24
0
int w_World_getAllowSleeping(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	luax_pushboolean(L, t->getAllowSleeping());
	return 1;
}