Merge branch 'main' into 12.0-development

This commit is contained in:
Alex Szpakowski
2021-12-24 11:35:35 -04:00
37 changed files with 488 additions and 159 deletions
+4 -7
View File
@@ -901,14 +901,11 @@ void Font::getWrap(const ColoredCodepoints &codepoints, float wraplimit, std::ve
}
// Push the last line.
if (!wline.cps.empty())
{
lines.push_back(wline);
lines.push_back(wline);
// Ignore the width of any trailing spaces, for individual lines.
if (linewidths)
linewidths->push_back(width - widthoftrailingspace);
}
// Ignore the width of any trailing spaces, for individual lines.
if (linewidths)
linewidths->push_back(width - widthoftrailingspace);
}
void Font::getWrap(const std::vector<ColoredString> &text, float wraplimit, std::vector<std::string> &lines, std::vector<int> *linewidths)
+1 -1
View File
@@ -177,7 +177,7 @@ void ParticleSystem::resetOffset()
else
{
Quad::Viewport v = quads[0]->getViewport();
offset = love::Vector2(v.x*0.5f, v.y*0.5f);
offset = love::Vector2(v.w*0.5f, v.h*0.5f);
}
}
+1 -1
View File
@@ -3648,7 +3648,7 @@ extern "C" int luaopen_love_graphics(lua_State *L)
int n = luax_register_module(L, w);
if (luaL_loadbuffer(L, (const char *)graphics_lua, sizeof(graphics_lua), "wrap_Graphics.lua") == 0)
if (luaL_loadbuffer(L, (const char *)graphics_lua, sizeof(graphics_lua), "=[love \"wrap_Graphics.lua\"]") == 0)
lua_call(L, 0, 0);
else
lua_error(L);
+1 -1
View File
@@ -168,7 +168,7 @@ int luaopen_video(lua_State *L)
{
int ret = luax_register_type(L, &Video::type, functions, nullptr);
luaL_loadbuffer(L, video_lua, sizeof(video_lua), "Video.lua");
luaL_loadbuffer(L, video_lua, sizeof(video_lua), "=[love \"Video.lua\"]");
luax_gettypemetatable(L, Video::type);
lua_call(L, 1, 0);