extern "C" int luaopen_contact(lua_State *L)
{
	static const luaL_Reg functions[] =
	{
		{ "getPositions", w_Contact_getPositions },
		{ "getNormal", w_Contact_getNormal },
		{ "getFriction", w_Contact_getFriction },
		{ "getRestitution", w_Contact_getRestitution },
		{ "isEnabled", w_Contact_isEnabled },
		{ "isTouching", w_Contact_isTouching },
		{ "setFriction", w_Contact_setFriction },
		{ "setRestitution", w_Contact_setRestitution },
		{ "setEnabled", w_Contact_setEnabled },
		{ "resetFriction", w_Contact_resetFriction },
		{ "resetRestitution", w_Contact_resetRestitution },
		{ "setTangentSpeed", w_Contact_setTangentSpeed },
		{ "getTangentSpeed", w_Contact_getTangentSpeed },
		{ "getChildren", w_Contact_getChildren },
		{ "getFixtures", w_Contact_getFixtures },
		{ "isDestroyed", w_Contact_isDestroyed },
		{ 0, 0 }
	};

	return luax_register_type(L, PHYSICS_CONTACT_ID, functions);
}
extern "C" int luaopen_sounddata(lua_State *L)
{
	int ret = luax_register_type(L, &SoundData::type, data::w_Data_functions, w_SoundData_functions, nullptr);

	luax_gettypemetatable(L, SoundData::type);

	// Load and execute SoundData.lua, sending the metatable as an argument.
	if (lua_istable(L, -1))
	{
		luaL_loadbuffer(L, sounddata_lua, sizeof(sounddata_lua), "SoundData.lua");
		lua_pushvalue(L, -2);
		lua_call(L, 1, 0);
	}

	// Pop the metatable.
	lua_pop(L, 1);

	return ret;
}
extern "C" int luaopen_weldjoint(lua_State *L)
{
	return luax_register_type(L, PHYSICS_WELD_JOINT_ID, "WeldJoint", w_Joint_functions, w_WeldJoint_functions, nullptr);
}
Exemple #4
0
	int luaopen_font(lua_State * L)
	{
		return luax_register_type(L, "Font", functions);
	}
Exemple #5
0
	int wrap_Music_open(lua_State * L)
	{
		luax_register_type(L, "Music", wrap_Music_functions);
		return 0;
	}
extern "C" int luaopen_droppedfile(lua_State *L)
{
	return luax_register_type(L, FILESYSTEM_DROPPED_FILE_ID, "DroppedFile", w_File_functions, nullptr);
}
Exemple #7
0
	int wrap_Contact_open(lua_State * L)
	{
		luax_register_type(L, "Contact", wrap_Contact_functions);
		return 0;
	}
extern "C" int luaopen_distancejoint(lua_State *L)
{
	return luax_register_type(L, "DistanceJoint", functions);
}
extern "C" int luaopen_glyphdata(lua_State *L)
{
	return luax_register_type(L, FONT_GLYPH_DATA_ID, "GlyphData", w_Data_functions, w_GlyphData_functions, nullptr);
}
Exemple #10
0
extern "C" int luaopen_thread(lua_State *L)
{
	return luax_register_type(L, THREAD_THREAD_ID, "Thread", w_Thread_functions, nullptr);
}
Exemple #11
0
extern "C" int luaopen_file(lua_State *L)
{
	return luax_register_type(L, FILESYSTEM_FILE_ID, "File", w_File_functions, nullptr);
}
	int wrap_RevoluteJoint_open(lua_State * L)
	{
		luax_register_type(L, "RevoluteJoint", wrap_RevoluteJoint_functions);
		return 0;
	}
Exemple #13
0
extern "C" int luaopen_image(lua_State *L)
{
	return luax_register_type(L, GRAPHICS_IMAGE_ID, functions);
}
extern "C" int luaopen_frictionjoint(lua_State *L)
{
	return luax_register_type(L, PHYSICS_FRICTION_JOINT_ID, "FrictionJoint", w_Joint_functions, w_FrictionJoint_functions, nullptr);
}
	int luaopen_prismaticjoint(lua_State * L)
	{
		return luax_register_type(L, "PrismaticJoint", functions);
	}
Exemple #16
0
extern "C" int luaopen_edgeshape(lua_State *L)
{
	return luax_register_type(L, "EdgeShape", functions);
}
Exemple #17
0
	int luaopen_encodedimagedata(lua_State * L)
	{
		return luax_register_type(L, "EncodedImageData", functions);
	}
Exemple #18
0
	int luaopen_body(lua_State * L)
	{
		return luax_register_type(L, "Body", functions);
	}
Exemple #19
0
extern "C" int luaopen_sounddata(lua_State *L)
{
	return luax_register_type(L, "SoundData", functions);
}
Exemple #20
0
extern "C" int luaopen_world(lua_State *L)
{
    return luax_register_type(L, PHYSICS_WORLD_ID, functions);
}
Exemple #21
0
	extern "C" int luaopen_canvas(lua_State * L)
	{
		return luax_register_type(L, "Canvas", functions);
	}
Exemple #22
0
extern "C" int luaopen_joint(lua_State *L)
{
	return luax_register_type(L, &Joint::type, w_Joint_functions, nullptr);
}
Exemple #23
0
	int luaopen_pulleyjoint(lua_State * L)
	{
		return luax_register_type(L, "PulleyJoint", functions);
	}
Exemple #24
0
	int luaopen_spritebatch(lua_State * L)
	{
		return luax_register_type(L, "SpriteBatch", functions);
	}
Exemple #25
0
extern "C" int luaopen_cursor(lua_State *L)
{
	return luax_register_type(L, &Cursor::type, w_Cursor_functions, nullptr);
}
extern "C" int luaopen_motorjoint(lua_State *L)
{
	return luax_register_type(L, "MotorJoint", functions);
}
extern "C" int luaopen_revolutejoint(lua_State *L)
{
	return luax_register_type(L, PHYSICS_REVOLUTE_JOINT_ID, functions);
}
Exemple #28
0
extern "C" int luaopen_decoder(lua_State *L)
{
	return luax_register_type(L, "Decoder", functions);
}
Exemple #29
0
extern "C" int luaopen_filedata(lua_State *L)
{
	return luax_register_type(L, "FileData", w_FileData_functions);
}
Exemple #30
0
extern "C" int luaopen_imagedata(lua_State *L)
{
	return luax_register_type(L, "ImageData", functions);
}