Make love::Type handle type names

TODO: Fix undefined behaviour in luax_register_type, you can't use a va_list after a reference type

--HG--
branch : dynamiccore2
This commit is contained in:
Bart van Strien
2016-11-14 21:06:53 +01:00
parent 5d43c9601a
commit d967a755e5
110 changed files with 177 additions and 186 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace audio
{
love::Type Source::type(&Object::type);
love::Type Source::type("Source", &Object::type);
Source::Source(Type sourceType)
: sourceType(sourceType)
+1 -1
View File
@@ -450,7 +450,7 @@ static const luaL_Reg w_Source_functions[] =
extern "C" int luaopen_source(lua_State *L)
{
return luax_register_type(L, love::audio::Source::type, "Source", w_Source_functions, nullptr);
return luax_register_type(L, love::audio::Source::type, w_Source_functions, nullptr);
}
} // audio
+1 -1
View File
@@ -37,7 +37,7 @@ namespace love
namespace filesystem
{
love::Type DroppedFile::type(&File::type);
love::Type DroppedFile::type("DroppedFile", &File::type);
DroppedFile::DroppedFile(const std::string &filename)
: filename(filename)
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace filesystem
{
love::Type File::type(&Object::type);
love::Type File::type("File", &Object::type);
File::~File()
{
+1 -1
View File
@@ -29,7 +29,7 @@ namespace love
namespace filesystem
{
love::Type FileData::type(&Data::type);
love::Type FileData::type("FileData", &Data::type);
FileData::FileData(uint64 size, const std::string &filename)
: data(nullptr)
+1 -1
View File
@@ -33,7 +33,7 @@ DroppedFile *luax_checkdroppedfile(lua_State *L, int idx)
extern "C" int luaopen_droppedfile(lua_State *L)
{
return luax_register_type(L, DroppedFile::type, "DroppedFile", w_File_functions, nullptr);
return luax_register_type(L, DroppedFile::type, w_File_functions, nullptr);
}
} // filesystem
+1 -1
View File
@@ -435,7 +435,7 @@ const luaL_Reg w_File_functions[] =
extern "C" int luaopen_file(lua_State *L)
{
return luax_register_type(L, File::type, "File", w_File_functions, nullptr);
return luax_register_type(L, File::type, w_File_functions, nullptr);
}
} // filesystem
+1 -1
View File
@@ -56,7 +56,7 @@ static const luaL_Reg w_FileData_functions[] =
extern "C" int luaopen_filedata(lua_State *L)
{
return luax_register_type(L, FileData::type, "FileData", w_Data_functions, w_FileData_functions, nullptr);
return luax_register_type(L, FileData::type, w_Data_functions, w_FileData_functions, nullptr);
}
} // filesystem
+1 -1
View File
@@ -33,7 +33,7 @@ namespace love
namespace font
{
love::Type GlyphData::type(&Data::type);
love::Type GlyphData::type("GlyphData", &Data::type);
GlyphData::GlyphData(uint32 glyph, GlyphMetrics glyphMetrics, GlyphData::Format f)
: glyph(glyph)
+1 -1
View File
@@ -29,7 +29,7 @@ namespace love
namespace font
{
love::Type Rasterizer::type(&Object::type);
love::Type Rasterizer::type("Rasterizer", &Object::type);
Rasterizer::~Rasterizer()
{
+1 -1
View File
@@ -131,7 +131,7 @@ const luaL_Reg w_GlyphData_functions[] =
extern "C" int luaopen_glyphdata(lua_State *L)
{
return luax_register_type(L, GlyphData::type, "GlyphData", w_Data_functions, w_GlyphData_functions, nullptr);
return luax_register_type(L, GlyphData::type, w_Data_functions, w_GlyphData_functions, nullptr);
}
} // font
+1 -1
View File
@@ -139,7 +139,7 @@ const luaL_Reg w_Rasterizer_functions[] =
extern "C" int luaopen_rasterizer(lua_State *L)
{
return luax_register_type(L, Rasterizer::type, "Rasterizer", w_Rasterizer_functions, nullptr);
return luax_register_type(L, Rasterizer::type, w_Rasterizer_functions, nullptr);
}
} // font
+1 -1
View File
@@ -58,7 +58,7 @@ void unGammaCorrectColor(Colorf &c)
}
}
love::Type Graphics::type(&Module::type);
love::Type Graphics::type("graphics", &Module::type);
Graphics::~Graphics()
{
+1 -1
View File
@@ -50,7 +50,7 @@ float calculate_variation(float inner, float outer, float var)
} // anonymous namespace
love::Type ParticleSystem::type(&Drawable::type);
love::Type ParticleSystem::type("ParticleSystem", &Drawable::type);
ParticleSystem::ParticleSystem(Texture *texture, uint32 size)
: pMem(nullptr)
+1 -1
View File
@@ -29,7 +29,7 @@ namespace love
namespace graphics
{
love::Type Quad::type(&Object::type);
love::Type Quad::type("Quad", &Object::type);
Quad::Quad(const Quad::Viewport &v, double sw, double sh)
: sw(sw)
+1 -2
View File
@@ -25,8 +25,7 @@ namespace love
namespace graphics
{
love::Type Texture::type(&Drawable::type);
love::Type Texture::type("Texture", &Drawable::type);
Texture::Filter Texture::defaultFilter;
Texture::Texture()
+1 -1
View File
@@ -88,7 +88,7 @@ static GLenum createMSAABuffer(int width, int height, int &samples, GLenum iform
return status;
}
love::Type Canvas::type(&Texture::type);
love::Type Canvas::type("Canvas", &Texture::type);
Canvas *Canvas::current = nullptr;
OpenGL::Viewport Canvas::systemViewport = OpenGL::Viewport();
bool Canvas::screenHasSRGB = false;
+1 -2
View File
@@ -39,13 +39,12 @@ namespace graphics
namespace opengl
{
love::Type Font::type(&Object::type);
static inline uint16 normToUint16(double n)
{
return (uint16) (n * LOVE_UINT16_MAX);
}
love::Type Font::type("Font", &Object::type);
int Font::fontCount = 0;
Font::Font(love::font::Rasterizer *r, const Texture::Filter &filter)
+1 -1
View File
@@ -43,7 +43,7 @@ namespace graphics
namespace opengl
{
love::Type Image::type(&Texture::type);
love::Type Image::type("Image", &Texture::type);
int Image::imageCount = 0;
+1 -1
View File
@@ -58,7 +58,7 @@ static std::vector<Mesh::AttribFormat> getDefaultVertexFormat()
return vertexformat;
}
love::Type Mesh::type(&Drawable::type);
love::Type Mesh::type("Mesh", &Drawable::type);
Mesh::Mesh(const std::vector<AttribFormat> &vertexformat, const void *data, size_t datasize, DrawMode drawmode, Usage usage)
: vertexFormat(vertexformat)
+1 -1
View File
@@ -62,7 +62,7 @@ namespace
} // anonymous namespace
love::Type Shader::type(&Object::type);
love::Type Shader::type("Shader", &Object::type);
Shader *Shader::current = nullptr;
Shader *Shader::defaultShader = nullptr;
Shader *Shader::defaultVideoShader = nullptr;
+1 -1
View File
@@ -41,7 +41,7 @@ namespace graphics
namespace opengl
{
love::Type SpriteBatch::type(&Drawable::type);
love::Type SpriteBatch::type("SpriteBatch", &Drawable::type);
SpriteBatch::SpriteBatch(Texture *texture, int size, Mesh::Usage usage)
: texture(texture)
+1 -1
View File
@@ -30,7 +30,7 @@ namespace graphics
namespace opengl
{
love::Type Text::type(&Drawable::type);
love::Type Text::type("Text", &Drawable::type);
Text::Text(Font *font, const std::vector<Font::ColoredString> &text)
: font(font)
+1 -1
View File
@@ -30,7 +30,7 @@ namespace graphics
namespace opengl
{
love::Type Video::type(&Drawable::type);
love::Type Video::type("Video", &Drawable::type);
Video::Video(love::video::VideoStream *stream)
: stream(stream)
+1 -1
View File
@@ -112,7 +112,7 @@ static const luaL_Reg w_Canvas_functions[] =
extern "C" int luaopen_canvas(lua_State *L)
{
return luax_register_type(L, Canvas::type, "Canvas", w_Texture_functions, w_Canvas_functions, nullptr);
return luax_register_type(L, Canvas::type, w_Texture_functions, w_Canvas_functions, nullptr);
}
} // opengl
+1 -1
View File
@@ -207,7 +207,7 @@ static const luaL_Reg w_Font_functions[] =
extern "C" int luaopen_font(lua_State *L)
{
return luax_register_type(L, Font::type, "Font", w_Font_functions, nullptr);
return luax_register_type(L, Font::type, w_Font_functions, nullptr);
}
} // opengl
@@ -2090,7 +2090,7 @@ static const luaL_Reg functions[] =
static int luaopen_drawable(lua_State *L)
{
return luax_register_type(L, Drawable::type, "Drawable", nullptr);
return luax_register_type(L, Drawable::type, nullptr);
}
// Types for this module.
+1 -1
View File
@@ -150,7 +150,7 @@ static const luaL_Reg w_Image_functions[] =
extern "C" int luaopen_image(lua_State *L)
{
return luax_register_type(L, Image::type, "Image", w_Texture_functions, w_Image_functions, nullptr);
return luax_register_type(L, Image::type, w_Texture_functions, w_Image_functions, nullptr);
}
} // opengl
+1 -1
View File
@@ -528,7 +528,7 @@ static const luaL_Reg w_Mesh_functions[] =
extern "C" int luaopen_mesh(lua_State *L)
{
return luax_register_type(L, Mesh::type, "Mesh", w_Mesh_functions, nullptr);
return luax_register_type(L, Mesh::type, w_Mesh_functions, nullptr);
}
} // opengl
@@ -772,7 +772,7 @@ static const luaL_Reg w_ParticleSystem_functions[] =
extern "C" int luaopen_particlesystem(lua_State *L)
{
return luax_register_type(L, ParticleSystem::type, "ParticleSystem", w_ParticleSystem_functions, nullptr);
return luax_register_type(L, ParticleSystem::type, w_ParticleSystem_functions, nullptr);
}
} // opengl
+1 -1
View File
@@ -317,7 +317,7 @@ static const luaL_Reg w_Shader_functions[] =
extern "C" int luaopen_shader(lua_State *L)
{
return luax_register_type(L, Shader::type, "Shader", w_Shader_functions, nullptr);
return luax_register_type(L, Shader::type, w_Shader_functions, nullptr);
}
} // opengl
@@ -257,7 +257,7 @@ static const luaL_Reg w_SpriteBatch_functions[] =
extern "C" int luaopen_spritebatch(lua_State *L)
{
return luax_register_type(L, SpriteBatch::type, "SpriteBatch", w_SpriteBatch_functions, nullptr);
return luax_register_type(L, SpriteBatch::type, w_SpriteBatch_functions, nullptr);
}
} // opengl
+1 -1
View File
@@ -245,7 +245,7 @@ static const luaL_Reg w_Text_functions[] =
extern "C" int luaopen_text(lua_State *L)
{
return luax_register_type(L, Text::type, "Text", w_Text_functions, nullptr);
return luax_register_type(L, Text::type, w_Text_functions, nullptr);
}
} // opengl
+1 -1
View File
@@ -143,7 +143,7 @@ static const luaL_Reg functions[] =
int luaopen_video(lua_State *L)
{
int ret = luax_register_type(L, Video::type, "Video", functions, nullptr);
int ret = luax_register_type(L, Video::type, functions, nullptr);
luaL_loadbuffer(L, video_lua, sizeof(video_lua), "Video.lua");
luax_gettypemetatable(L, Video::type);
+1 -1
View File
@@ -84,7 +84,7 @@ static const luaL_Reg w_Quad_functions[] =
extern "C" int luaopen_quad(lua_State *L)
{
return luax_register_type(L, Quad::type, "Quad", w_Quad_functions, nullptr);
return luax_register_type(L, Quad::type, w_Quad_functions, nullptr);
}
} // graphics
+1 -1
View File
@@ -139,7 +139,7 @@ const luaL_Reg w_Texture_functions[] =
extern "C" int luaopen_texture(lua_State *L)
{
return luax_register_type(L, Texture::type, "Texture", w_Texture_functions, nullptr);
return luax_register_type(L, Texture::type, w_Texture_functions, nullptr);
}
} // graphics
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace image
{
love::Type CompressedImageData::type(&Data::type);
love::Type CompressedImageData::type("CompressedImageData", &Data::type);
CompressedImageData::CompressedImageData()
: format(FORMAT_UNKNOWN)
+1 -1
View File
@@ -27,7 +27,7 @@ namespace love
namespace image
{
love::Type ImageData::type(&Data::type);
love::Type ImageData::type("ImageData", &Data::type);
ImageData::ImageData()
: data(nullptr)
@@ -106,7 +106,7 @@ static const luaL_Reg w_CompressedImageData_functions[] =
extern "C" int luaopen_compressedimagedata(lua_State *L)
{
return luax_register_type(L, CompressedImageData::type, "CompressedImageData", w_Data_functions, w_CompressedImageData_functions, nullptr);
return luax_register_type(L, CompressedImageData::type, w_Data_functions, w_CompressedImageData_functions, nullptr);
}
} // image
+1 -1
View File
@@ -366,7 +366,7 @@ static const luaL_Reg w_ImageData_functions[] =
extern "C" int luaopen_imagedata(lua_State *L)
{
int ret = luax_register_type(L, ImageData::type, "ImageData", w_Data_functions, w_ImageData_functions, nullptr);
int ret = luax_register_type(L, ImageData::type, w_Data_functions, w_ImageData_functions, nullptr);
luax_gettypemetatable(L, ImageData::type);
+1 -1
View File
@@ -29,7 +29,7 @@ namespace love
namespace joystick
{
love::Type Joystick::type(&Object::type);
love::Type Joystick::type("Joystick", &Object::type);
float Joystick::clampval(float x)
{
+1 -1
View File
@@ -296,7 +296,7 @@ static const luaL_Reg w_Joystick_functions[] =
extern "C" int luaopen_joystick(lua_State *L)
{
return luax_register_type(L, Joystick::type, "Joystick", w_Joystick_functions, nullptr);
return luax_register_type(L, Joystick::type, w_Joystick_functions, nullptr);
}
} // joystick
+1 -1
View File
@@ -83,7 +83,7 @@ namespace love
namespace math
{
love::Type BezierCurve::type(&Object::type);
love::Type BezierCurve::type("BezierCurve", &Object::type);
BezierCurve::BezierCurve(const vector<Vector> &pts)
: controlPoints(pts)
+1 -1
View File
@@ -26,7 +26,7 @@ namespace love
namespace math
{
love::Type CompressedData::type(&Data::type);
love::Type CompressedData::type("CompressedData", &Data::type);
CompressedData::CompressedData(Compressor::Format format, char *cdata, size_t compressedsize, size_t rawsize, bool own)
: format(format)
+2 -2
View File
@@ -47,6 +47,8 @@ static uint64 wangHash64(uint64 key)
return key;
}
love::Type RandomGenerator::type("RandomGenerator", &Object::type);
// 64 bit Xorshift implementation taken from the end of Sec. 3 (page 4) in
// George Marsaglia, "Xorshift RNGs", Journal of Statistical Software, Vol.8 (Issue 14), 2003
// Use an 'Xorshift*' variant, as shown here: http://xorshift.di.unimi.it
@@ -62,8 +64,6 @@ RandomGenerator::RandomGenerator()
setSeed(newseed);
}
love::Type RandomGenerator::type(&Object::type);
uint64 RandomGenerator::rand()
{
rng_state.b64 ^= (rng_state.b64 >> 12);
+1 -1
View File
@@ -234,7 +234,7 @@ static const luaL_Reg w_BezierCurve_functions[] =
extern "C" int luaopen_beziercurve(lua_State *L)
{
return luax_register_type(L, BezierCurve::type, "BezierCurve", w_BezierCurve_functions, nullptr);
return luax_register_type(L, BezierCurve::type, w_BezierCurve_functions, nullptr);
}
} // math
+1 -1
View File
@@ -53,7 +53,7 @@ static const luaL_Reg w_CompressedData_functions[] =
extern "C" int luaopen_compresseddata(lua_State *L)
{
return luax_register_type(L, CompressedData::type, "CompressedData", w_Data_functions, w_CompressedData_functions, nullptr);
return luax_register_type(L, CompressedData::type, w_Data_functions, w_CompressedData_functions, nullptr);
}
} // math
+1 -1
View File
@@ -147,7 +147,7 @@ static const luaL_Reg w_RandomGenerator_functions[] =
extern "C" int luaopen_randomgenerator(lua_State *L)
{
int n = luax_register_type(L, RandomGenerator::type, "RandomGenerator", w_RandomGenerator_functions, nullptr);
int n = luax_register_type(L, RandomGenerator::type, w_RandomGenerator_functions, nullptr);
luax_gettypemetatable(L, RandomGenerator::type);
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace mouse
{
love::Type Cursor::type(&Object::type);
love::Type Cursor::type("Cursor", &Object::type);
Cursor::~Cursor()
{
+1 -1
View File
@@ -61,7 +61,7 @@ static const luaL_Reg w_Cursor_functions[] =
extern "C" int luaopen_cursor(lua_State *L)
{
return luax_register_type(L, Cursor::type, "Cursor", w_Cursor_functions, nullptr);
return luax_register_type(L, Cursor::type, w_Cursor_functions, nullptr);
}
} // mouse
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace physics
{
love::Type Body::type(&Object::type);
love::Type Body::type("Body", &Object::type);
Body::~Body()
{
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace physics
{
love::Type Joint::type(&Object::type);
love::Type Joint::type("Joint", &Object::type);
Joint::~Joint()
{
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace physics
{
love::Type Shape::type(&Object::type);
love::Type Shape::type("Shape", &Object::type);
Shape::~Shape()
{
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type ChainShape::type(&Shape::type);
love::Type ChainShape::type("ChainShape", &Shape::type);
ChainShape::ChainShape(b2ChainShape *c, bool loop, bool own)
: Shape(c, own), loop(loop)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type CircleShape::type(&Shape::type);
love::Type CircleShape::type("CircleShape", &Shape::type);
CircleShape::CircleShape(b2CircleShape *c, bool own)
: Shape(c, own)
+1 -1
View File
@@ -31,7 +31,7 @@ namespace physics
namespace box2d
{
love::Type Contact::type(&Object::type);
love::Type Contact::type("Contact", &Object::type);
Contact::Contact(b2Contact *contact)
: contact(contact)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type EdgeShape::type(&Shape::type);
love::Type EdgeShape::type("EdgeShape", &Shape::type);
EdgeShape::EdgeShape(b2EdgeShape *e, bool own)
: Shape(e, own)
+1 -1
View File
@@ -37,7 +37,7 @@ namespace physics
namespace box2d
{
love::Type Fixture::type(&Object::type);
love::Type Fixture::type("Fixture", &Object::type);
Fixture::Fixture(Body *body, Shape *shape, float density)
: body(body)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type FrictionJoint::type(&Joint::type);
love::Type FrictionJoint::type("FrictionJoint", &Joint::type);
FrictionJoint::FrictionJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected)
: Joint(body1, body2)
+1 -1
View File
@@ -32,7 +32,7 @@ namespace physics
namespace box2d
{
love::Type GearJoint::type(&Joint::type);
love::Type GearJoint::type("GearJoint", &Joint::type);
GearJoint::GearJoint(Joint *joint1, Joint *joint2, float ratio, bool collideConnected)
: Joint(joint1->body2, joint2->body2)
+1 -1
View File
@@ -32,7 +32,7 @@ namespace physics
namespace box2d
{
love::Type MotorJoint::type(&Joint::type);
love::Type MotorJoint::type("MotorJoint", &Joint::type);
MotorJoint::MotorJoint(Body *body1, Body *body2)
: Joint(body1, body2)
+1 -1
View File
@@ -32,7 +32,7 @@ namespace physics
namespace box2d
{
love::Type MouseJoint::type(&Joint::type);
love::Type MouseJoint::type("MouseJoint", &Joint::type);
MouseJoint::MouseJoint(Body *body1, float x, float y)
: Joint(body1)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type PolygonShape::type(&Shape::type);
love::Type PolygonShape::type("PolygonShape", &Shape::type);
PolygonShape::PolygonShape(b2PolygonShape *p, bool own)
: Shape(p, own)
+1 -1
View File
@@ -32,7 +32,7 @@ namespace physics
namespace box2d
{
love::Type PrismaticJoint::type(&Joint::type);
love::Type PrismaticJoint::type("PrismaticJoint", &Joint::type);
PrismaticJoint::PrismaticJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, float ax, float ay, bool collideConnected)
: Joint(body1, body2)
+1 -1
View File
@@ -32,7 +32,7 @@ namespace physics
namespace box2d
{
love::Type PulleyJoint::type(&Joint::type);
love::Type PulleyJoint::type("PulleyJoint", &Joint::type);
PulleyJoint::PulleyJoint(Body *bodyA, Body *bodyB, b2Vec2 groundAnchorA, b2Vec2 groundAnchorB, b2Vec2 anchorA, b2Vec2 anchorB, float ratio, bool collideConnected)
: Joint(bodyA, bodyB)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type RevoluteJoint::type(&Joint::type);
love::Type RevoluteJoint::type("RevoluteJoint", &Joint::type);
RevoluteJoint::RevoluteJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected)
: Joint(body1, body2)
+1 -1
View File
@@ -32,7 +32,7 @@ namespace physics
namespace box2d
{
love::Type RopeJoint::type(&Joint::type);
love::Type RopeJoint::type("RopeJoint", &Joint::type);
RopeJoint::RopeJoint(Body *body1, Body *body2, float x1, float y1, float x2, float y2, float maxLength, bool collideConnected)
: Joint(body1, body2)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type WeldJoint::type(&Joint::type);
love::Type WeldJoint::type("WeldJoint", &Joint::type);
WeldJoint::WeldJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, bool collideConnected)
: Joint(body1, body2)
+1 -1
View File
@@ -32,7 +32,7 @@ namespace physics
namespace box2d
{
love::Type WheelJoint::type(&Joint::type);
love::Type WheelJoint::type("WheelJoint", &Joint::type);
WheelJoint::WheelJoint(Body *body1, Body *body2, float xA, float yA, float xB, float yB, float ax, float ay, bool collideConnected)
: Joint(body1, body2)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace physics
namespace box2d
{
love::Type World::type(&Object::type);
love::Type World::type("World", &Object::type);
World::ContactCallback::ContactCallback()
: ref(nullptr)
+1 -1
View File
@@ -650,7 +650,7 @@ static const luaL_Reg w_Body_functions[] =
extern "C" int luaopen_body(lua_State *L)
{
return luax_register_type(L, Body::type, "Body", w_Body_functions, nullptr);
return luax_register_type(L, Body::type, w_Body_functions, nullptr);
}
} // box2d
@@ -149,7 +149,7 @@ static const luaL_Reg w_ChainShape_functions[] =
extern "C" int luaopen_chainshape(lua_State *L)
{
return luax_register_type(L, ChainShape::type, "ChainShape", w_Shape_functions, w_ChainShape_functions, nullptr);
return luax_register_type(L, ChainShape::type, w_Shape_functions, w_ChainShape_functions, nullptr);
}
} // box2d
@@ -75,7 +75,7 @@ static const luaL_Reg w_CircleShape_functions[] =
extern "C" int luaopen_circleshape(lua_State *L)
{
return luax_register_type(L, CircleShape::type, "CircleShape", w_Shape_functions, w_CircleShape_functions, nullptr);
return luax_register_type(L, CircleShape::type, w_Shape_functions, w_CircleShape_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -181,7 +181,7 @@ static const luaL_Reg w_Contact_functions[] =
extern "C" int luaopen_contact(lua_State *L)
{
return luax_register_type(L, Contact::type, "Contact", w_Contact_functions, nullptr);
return luax_register_type(L, Contact::type, w_Contact_functions, nullptr);
}
} // box2d
@@ -93,7 +93,7 @@ static const luaL_Reg w_DistanceJoint_functions[] =
extern "C" int luaopen_distancejoint(lua_State *L)
{
return luax_register_type(L, DistanceJoint::type, "DistanceJoint", w_Joint_functions, w_DistanceJoint_functions, nullptr);
return luax_register_type(L, DistanceJoint::type, w_Joint_functions, w_DistanceJoint_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -105,7 +105,7 @@ static const luaL_Reg w_EdgeShape_functions[] =
extern "C" int luaopen_edgeshape(lua_State *L)
{
return luax_register_type(L, EdgeShape::type, "EdgeShape", w_Shape_functions, w_EdgeShape_functions, nullptr);
return luax_register_type(L, EdgeShape::type, w_Shape_functions, w_EdgeShape_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -302,7 +302,7 @@ static const luaL_Reg w_Fixture_functions[] =
extern "C" int luaopen_fixture(lua_State *L)
{
return luax_register_type(L, Fixture::type, "Fixture", w_Fixture_functions, nullptr);
return luax_register_type(L, Fixture::type, w_Fixture_functions, nullptr);
}
} // box2d
@@ -77,7 +77,7 @@ static const luaL_Reg w_FrictionJoint_functions[] =
extern "C" int luaopen_frictionjoint(lua_State *L)
{
return luax_register_type(L, FrictionJoint::type, "FrictionJoint", w_Joint_functions, w_FrictionJoint_functions, nullptr);
return luax_register_type(L, FrictionJoint::type, w_Joint_functions, w_FrictionJoint_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -77,7 +77,7 @@ static const luaL_Reg w_GearJoint_functions[] =
extern "C" int luaopen_gearjoint(lua_State *L)
{
return luax_register_type(L, GearJoint::type, "GearJoint", w_Joint_functions, w_GearJoint_functions, nullptr);
return luax_register_type(L, GearJoint::type, w_Joint_functions, w_GearJoint_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -182,7 +182,7 @@ const luaL_Reg w_Joint_functions[] =
extern "C" int luaopen_joint(lua_State *L)
{
return luax_register_type(L, Joint::type, "Joint", w_Joint_functions, nullptr);
return luax_register_type(L, Joint::type, w_Joint_functions, nullptr);
}
} // box2d
@@ -127,7 +127,7 @@ static const luaL_Reg w_MotorJoint_functions[] =
extern "C" int luaopen_motorjoint(lua_State *L)
{
return luax_register_type(L, MotorJoint::type, "MotorJoint", w_Joint_functions, w_MotorJoint_functions, nullptr);
return luax_register_type(L, MotorJoint::type, w_Joint_functions, w_MotorJoint_functions, nullptr);
}
@@ -111,7 +111,7 @@ static const luaL_Reg w_MouseJoint_functions[] =
extern "C" int luaopen_mousejoint(lua_State *L)
{
return luax_register_type(L, MouseJoint::type, "MouseJoint", w_Joint_functions, w_MouseJoint_functions, nullptr);
return luax_register_type(L, MouseJoint::type, w_Joint_functions, w_MouseJoint_functions, nullptr);
}
} // box2d
@@ -55,7 +55,7 @@ static const luaL_Reg w_PolygonShape_functions[] =
extern "C" int luaopen_polygonshape(lua_State *L)
{
return luax_register_type(L, PolygonShape::type, "PolygonShape", w_Shape_functions, w_PolygonShape_functions, nullptr);
return luax_register_type(L, PolygonShape::type, w_Shape_functions, w_PolygonShape_functions, nullptr);
}
} // box2d
@@ -204,7 +204,7 @@ static const luaL_Reg w_PrismaticJoint_functions[] =
extern "C" int luaopen_prismaticjoint(lua_State *L)
{
return luax_register_type(L, PrismaticJoint::type, "PrismaticJoint", w_Joint_functions, w_PrismaticJoint_functions, nullptr);
return luax_register_type(L, PrismaticJoint::type, w_Joint_functions, w_PrismaticJoint_functions, nullptr);
}
} // box2d
@@ -74,7 +74,7 @@ static const luaL_Reg w_PulleyJoint_functions[] =
extern "C" int luaopen_pulleyjoint(lua_State *L)
{
return luax_register_type(L, PulleyJoint::type, "PulleyJoint", w_Joint_functions, w_PulleyJoint_functions, nullptr);
return luax_register_type(L, PulleyJoint::type, w_Joint_functions, w_PulleyJoint_functions, nullptr);
}
} // box2d
@@ -196,7 +196,7 @@ static const luaL_Reg w_RevoluteJoint_functions[] =
extern "C" int luaopen_revolutejoint(lua_State *L)
{
return luax_register_type(L, RevoluteJoint::type, "RevoluteJoint", w_Joint_functions, w_RevoluteJoint_functions, nullptr);
return luax_register_type(L, RevoluteJoint::type, w_Joint_functions, w_RevoluteJoint_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -50,7 +50,7 @@ static const luaL_Reg w_RopeJoint_functions[] =
extern "C" int luaopen_ropejoint(lua_State *L)
{
return luax_register_type(L, RopeJoint::type, "RopeJoint", w_Joint_functions, w_RopeJoint_functions, nullptr);
return luax_register_type(L, RopeJoint::type, w_Joint_functions, w_RopeJoint_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -108,7 +108,7 @@ const luaL_Reg w_Shape_functions[] =
extern "C" int luaopen_shape(lua_State *L)
{
return luax_register_type(L, Shape::type, "Shape", w_Shape_functions, nullptr);
return luax_register_type(L, Shape::type, w_Shape_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -84,7 +84,7 @@ static const luaL_Reg w_WeldJoint_functions[] =
extern "C" int luaopen_weldjoint(lua_State *L)
{
return luax_register_type(L, WeldJoint::type, "WeldJoint", w_Joint_functions, w_WeldJoint_functions, nullptr);
return luax_register_type(L, WeldJoint::type, w_Joint_functions, w_WeldJoint_functions, nullptr);
}
} // box2d
@@ -160,7 +160,7 @@ static const luaL_Reg w_WheelJoint_functions[] =
extern "C" int luaopen_wheeljoint(lua_State *L)
{
return luax_register_type(L, WheelJoint::type, "WheelJoint", w_Joint_functions, w_WheelJoint_functions, nullptr);
return luax_register_type(L, WheelJoint::type, w_Joint_functions, w_WheelJoint_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -237,7 +237,7 @@ static const luaL_Reg w_World_functions[] =
extern "C" int luaopen_world(lua_State *L)
{
return luax_register_type(L, World::type, "World", w_World_functions, nullptr);
return luax_register_type(L, World::type, w_World_functions, nullptr);
}
} // box2d
+1 -1
View File
@@ -27,7 +27,7 @@ namespace love
namespace sound
{
love::Type Decoder::type(&Object::type);
love::Type Decoder::type("Decoder", &Object::type);
Decoder::Decoder(Data *data, const std::string &ext, int bufferSize)
: data(data)
+1 -1
View File
@@ -25,7 +25,7 @@ namespace love
namespace sound
{
love::Type Sound::type(&Module::type);
love::Type Sound::type("Sound", &Module::type);
Sound::~Sound()
{
+1 -1
View File
@@ -34,7 +34,7 @@ namespace love
namespace sound
{
love::Type SoundData::type(&Data::type);
love::Type SoundData::type("SoundData", &Data::type);
SoundData::SoundData(Decoder *decoder)
: data(0)
+1 -1
View File
@@ -109,7 +109,7 @@ static const luaL_Reg w_Decoder_functions[] =
extern "C" int luaopen_decoder(lua_State *L)
{
return luax_register_type(L, Decoder::type, "Decoder", w_Decoder_functions, nullptr);
return luax_register_type(L, Decoder::type, w_Decoder_functions, nullptr);
}
} // sound
+1 -1
View File
@@ -110,7 +110,7 @@ static const luaL_Reg w_SoundData_functions[] =
extern "C" int luaopen_sounddata(lua_State *L)
{
int ret = luax_register_type(L, SoundData::type, "SoundData", w_Data_functions, w_SoundData_functions, nullptr);
int ret = luax_register_type(L, SoundData::type, w_Data_functions, w_SoundData_functions, nullptr);
luax_gettypemetatable(L, SoundData::type);
+1 -1
View File
@@ -27,7 +27,7 @@ namespace love
namespace thread
{
love::Type Channel::type(&Object::type);
love::Type Channel::type("Channel", &Object::type);
static std::map<std::string, Channel *> namedChannels;
static Mutex *namedChannelMutex;
+1 -1
View File
@@ -31,7 +31,7 @@ namespace love
namespace thread
{
love::Type LuaThread::type(&Threadable::type);
love::Type LuaThread::type("Thread", &Threadable::type);
LuaThread::LuaThread(const std::string &name, love::Data *code)
: code(code)
+1 -1
View File
@@ -74,7 +74,7 @@ void EmptyLock::setLock(Mutex &m)
mutex = &m;
}
love::Type Threadable::type(&Object::type);
love::Type Threadable::type("Threadable", &Object::type);
Threadable::Threadable()
{
+1 -1
View File
@@ -147,7 +147,7 @@ static const luaL_Reg w_Channel_functions[] =
extern "C" int luaopen_channel(lua_State *L)
{
return luax_register_type(L, Channel::type, "Channel", w_Channel_functions, nullptr);
return luax_register_type(L, Channel::type, w_Channel_functions, nullptr);
}
} // thread

Some files were not shown because too many files have changed in this diff Show More