コード例 #1
0
	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;
	}
コード例 #2
0
ファイル: wrap_World.cpp プロジェクト: CorvusUrro/TestRepo
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;
}
コード例 #3
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_setSleepingAllowed(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    bool b = luax_toboolean(L, 2);
    t->setSleepingAllowed(b);
    return 0;
}
コード例 #4
0
ファイル: wrap_World.cpp プロジェクト: Ghor/LoveEngineCore
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;
コード例 #5
0
ファイル: wrap_World.cpp プロジェクト: MikuAuahDark/livesim4
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;
}
コード例 #6
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_destroy(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    luax_catchexcept(L, [&]() {
        t->destroy();
    });
    return 0;
}
コード例 #7
0
ファイル: wrap_World.cpp プロジェクト: CorvusUrro/TestRepo
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;
}
コード例 #8
0
	int w_World_setMeter(lua_State * L)
	{
		World * t = luax_checkworld(L, 1);
		int arg1 = luaL_checkint(L, 2);
		t->setMeter(arg1);
		return 0;
		
	}
コード例 #9
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
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;
}
コード例 #10
0
ファイル: wrap_World.cpp プロジェクト: CorvusUrro/TestRepo
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;
}
コード例 #11
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
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;
}
コード例 #12
0
ファイル: wrap_World.cpp プロジェクト: ascetic85/love2d
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;
}
コード例 #13
0
ファイル: wrap_World.cpp プロジェクト: MikuAuahDark/livesim4
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;
}
コード例 #14
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_queryBoundingBox(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->queryBoundingBox(L);
}
コード例 #15
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_getContactCount(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_pushinteger(L, t->getContactCount());
    return 1;
}
コード例 #16
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_isLocked(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    luax_pushboolean(L, t->isLocked());
    return 1;
}
コード例 #17
0
ファイル: wrap_World.cpp プロジェクト: ascetic85/love2d
int w_World_rayCast(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	lua_remove(L, 1);
	ASSERT_GUARD(return t->rayCast(L);)
}
コード例 #18
0
	int w_World_getMeter(lua_State * L)
	{
		World * t = luax_checkworld(L, 1);
		lua_pushinteger(L, t->getMeter());
		return 1;
	}
コード例 #19
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_getCallbacks(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->getCallbacks(L);
}
コード例 #20
0
ファイル: wrap_World.cpp プロジェクト: ascetic85/love2d
int w_World_getJointList(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	lua_remove(L, 1);
	return t->getJointList(L);
}
コード例 #21
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_getContactFilter(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->getContactFilter(L);
}
コード例 #22
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_isSleepingAllowed(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    luax_pushboolean(L, t->isSleepingAllowed());
    return 1;
}
コード例 #23
0
ファイル: wrap_World.cpp プロジェクト: cyborgize/love
int w_World_getGravity(lua_State *L)
{
    World *t = luax_checkworld(L, 1);
    lua_remove(L, 1);
    return t->getGravity(L);
}
コード例 #24
0
ファイル: wrap_World.cpp プロジェクト: ascetic85/love2d
int w_World_getAllowSleeping(lua_State *L)
{
	World *t = luax_checkworld(L, 1);
	luax_pushboolean(L, t->getAllowSleeping());
	return 1;
}