diff options
Diffstat (limited to 'meta/3rd/love2d')
-rw-r--r-- | meta/3rd/love2d/library/love.data.lua | 3 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.event.lua | 3 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.font.lua | 3 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.graphics.lua | 24 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.keyboard.lua | 3 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.math.lua | 3 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.mouse.lua | 3 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.physics.lua | 9 | ||||
-rw-r--r-- | meta/3rd/love2d/library/love.thread.lua | 3 |
9 files changed, 36 insertions, 18 deletions
diff --git a/meta/3rd/love2d/library/love.data.lua b/meta/3rd/love2d/library/love.data.lua index b502d42e..af67a9d1 100644 --- a/meta/3rd/love2d/library/love.data.lua +++ b/meta/3rd/love2d/library/love.data.lua @@ -94,8 +94,9 @@ function love.data.newDataView(data, offset, size) end ---@param container love.ContainerType # What type to return the encoded data as. ---@param format string # A string determining how the values are packed. Follows the rules of Lua 5.3's string.pack format strings. ---@param v1 number|boolean|string # The first value (number, boolean, or string) to serialize. +---@vararg number|boolean|string # Additional values to serialize. ---@return love.Data|string data # Data/string which contains the serialized data. -function love.data.pack(container, format, v1) end +function love.data.pack(container, format, v1, ...) end --- ---Unpacks (deserializes) a byte-string or Data into simple Lua values. diff --git a/meta/3rd/love2d/library/love.event.lua b/meta/3rd/love2d/library/love.event.lua index 44339d88..12212c0b 100644 --- a/meta/3rd/love2d/library/love.event.lua +++ b/meta/3rd/love2d/library/love.event.lua @@ -40,7 +40,8 @@ function love.event.pump() end ---@param d? any # Fourth event argument. ---@param e? any # Fifth event argument. ---@param f? any # Sixth event argument. -function love.event.push(n, a, b, c, d, e, f) end +---@vararg any # Further event arguments may follow. +function love.event.push(n, a, b, c, d, e, f, ...) end --- ---Adds the quit event to the queue. diff --git a/meta/3rd/love2d/library/love.font.lua b/meta/3rd/love2d/library/love.font.lua index 3d2e31a6..21666912 100644 --- a/meta/3rd/love2d/library/love.font.lua +++ b/meta/3rd/love2d/library/love.font.lua @@ -177,8 +177,9 @@ function Rasterizer:getLineHeight() end --- ---@param glyph1 string|number # Glyph ---@param glyph2 string|number # Glyph +---@vararg string|number # Additional glyphs ---@return boolean hasGlyphs # Whatever font contains specified glyphs. -function Rasterizer:hasGlyphs(glyph1, glyph2) end +function Rasterizer:hasGlyphs(glyph1, glyph2, ...) end --- ---True Type hinting mode. diff --git a/meta/3rd/love2d/library/love.graphics.lua b/meta/3rd/love2d/library/love.graphics.lua index 1528a181..8e7a2ab5 100644 --- a/meta/3rd/love2d/library/love.graphics.lua +++ b/meta/3rd/love2d/library/love.graphics.lua @@ -474,7 +474,8 @@ function love.graphics.isWireframe() end ---@param y1 number # The position of first point on the y-axis. ---@param x2 number # The position of second point on the x-axis. ---@param y2 number # The position of second point on the y-axis. -function love.graphics.line(x1, y1, x2, y2) end +---@vararg number # You can continue passing point positions to draw a polyline. +function love.graphics.line(x1, y1, x2, y2, ...) end --- ---Creates a new array Image. @@ -694,7 +695,8 @@ function love.graphics.origin() end ---@overload fun(points: table) ---@param x number # The position of the first point on the x-axis. ---@param y number # The position of the first point on the y-axis. -function love.graphics.points(x, y) end +---@vararg number # The x and y coordinates of additional points. +function love.graphics.points(x, y, ...) end --- ---Draw a polygon. @@ -703,7 +705,8 @@ function love.graphics.points(x, y) end --- ---@overload fun(mode: love.DrawMode, vertices: table) ---@param mode love.DrawMode # How to draw the polygon. -function love.graphics.polygon(mode) end +---@vararg number # The vertices of the polygon. +function love.graphics.polygon(mode, ...) end --- ---Pops the current coordinate transformation from the transformation stack. @@ -1227,7 +1230,8 @@ function Font:hasGlyphs(text) end ---Sets the fallback fonts. When the Font doesn't contain a glyph, it will substitute the glyph from the next subsequent fallback Fonts. This is akin to setting a 'font stack' in Cascading Style Sheets (CSS). --- ---@param fallbackfont1 love.Font # The first fallback Font to use. -function Font:setFallbacks(fallbackfont1) end +---@vararg love.Font # Additional fallback Fonts. +function Font:setFallbacks(fallbackfont1, ...) end --- ---Sets the filter mode for a font. @@ -1402,7 +1406,8 @@ function Mesh:setTexture(texture) end ---@overload fun(self: love.Mesh, index: number, vertex: table) ---@param index number # The index of the the vertex you want to modify (one-based). ---@param attributecomponent number # The first component of the first vertex attribute in the specified vertex. -function Mesh:setVertex(index, attributecomponent) end +---@vararg number # Additional components of all vertex attributes in the specified vertex. +function Mesh:setVertex(index, attributecomponent, ...) end --- ---Sets the properties of a specific attribute within a vertex in the Mesh. @@ -1413,7 +1418,8 @@ function Mesh:setVertex(index, attributecomponent) end ---@param attributeindex number # The index of the attribute within the vertex to be modified (one-based). ---@param value1 number # The new value for the first component of the attribute. ---@param value2 number # The new value for the second component of the attribute. -function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2) end +---@vararg number # Any additional vertex attribute components. +function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2, ...) end --- ---Sets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen. @@ -1965,7 +1971,8 @@ function Shader:hasUniform(name) end ---@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, data: love.Data, offset: number, size: number) ---@param name string # Name of the number to send to the shader. ---@param number number # Number to send to store in the uniform variable. -function Shader:send(name, number) end +---@vararg number # Additional numbers to send if the uniform variable is an array. +function Shader:send(name, number, ...) end --- ---Sends one or more colors to a special (''extern'' / ''uniform'') vec3 or vec4 variable inside the shader. The color components must be in the range of 1. The colors are gamma-corrected if global gamma-correction is enabled. @@ -1984,7 +1991,8 @@ function Shader:send(name, number) end --- ---@param name string # The name of the color extern variable to send to in the shader. ---@param color table # A table with red, green, blue, and optional alpha color components in the range of 1 to send to the extern as a vector. -function Shader:sendColor(name, color) end +---@vararg table # Additional colors to send in case the extern is an array. All colors need to be of the same size (e.g. only vec3's). +function Shader:sendColor(name, color, ...) end --- ---Using a single image, draw any number of identical copies of the image using a single call to love.graphics.draw(). This can be used, for example, to draw repeating copies of a single background image with high performance. diff --git a/meta/3rd/love2d/library/love.keyboard.lua b/meta/3rd/love2d/library/love.keyboard.lua index 1f1a2ef5..2f68c50f 100644 --- a/meta/3rd/love2d/library/love.keyboard.lua +++ b/meta/3rd/love2d/library/love.keyboard.lua @@ -60,8 +60,9 @@ function love.keyboard.isDown(key) end ---Unlike regular KeyConstants, Scancodes are keyboard layout-independent. The scancode 'w' is used if the key in the same place as the 'w' key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. --- ---@param scancode love.Scancode # A Scancode to check. +---@vararg love.Scancode # Additional Scancodes to check. ---@return boolean down # True if any supplied Scancode is down, false if not. -function love.keyboard.isScancodeDown(scancode) end +function love.keyboard.isScancodeDown(scancode, ...) end --- ---Enables or disables key repeat for love.keypressed. It is disabled by default. diff --git a/meta/3rd/love2d/library/love.math.lua b/meta/3rd/love2d/library/love.math.lua index a2510a2f..cd85b1bf 100644 --- a/meta/3rd/love2d/library/love.math.lua +++ b/meta/3rd/love2d/library/love.math.lua @@ -454,9 +454,10 @@ function Transform:scale(sx, sy) end ---@overload fun(self: love.Transform, layout: love.MatrixLayout, matrix: table):love.Transform ---@param e1_1 number # The first column of the first row of the matrix. ---@param e1_2 number # The second column of the first row of the matrix. +---@vararg number # Additional matrix elements. ---@param e4_4 number # The fourth column of the fourth row of the matrix. ---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:setMatrix(e1_1, e1_2, e4_4) end +function Transform:setMatrix(e1_1, e1_2, ..., e4_4) end --- ---Resets the Transform to the specified transformation parameters. diff --git a/meta/3rd/love2d/library/love.mouse.lua b/meta/3rd/love2d/library/love.mouse.lua index ac3e896e..e92a5859 100644 --- a/meta/3rd/love2d/library/love.mouse.lua +++ b/meta/3rd/love2d/library/love.mouse.lua @@ -64,8 +64,9 @@ function love.mouse.isCursorSupported() end ---This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. --- ---@param button number # The index of a button to check. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependant. +---@vararg number # Additional button numbers to check. ---@return boolean down # True if any specified button is down. -function love.mouse.isDown(button) end +function love.mouse.isDown(button, ...) end --- ---Checks if the mouse is grabbed. diff --git a/meta/3rd/love2d/library/love.physics.lua b/meta/3rd/love2d/library/love.physics.lua index e0300c06..fbc617a1 100644 --- a/meta/3rd/love2d/library/love.physics.lua +++ b/meta/3rd/love2d/library/love.physics.lua @@ -57,8 +57,9 @@ function love.physics.newBody(world, x, y, type) end ---@param y1 number # The y position of the first point. ---@param x2 number # The x position of the second point. ---@param y2 number # The y position of the second point. +---@vararg number # Additional point positions. ---@return love.ChainShape shape # The new shape. -function love.physics.newChainShape(loop, x1, y1, x2, y2) end +function love.physics.newChainShape(loop, x1, y1, x2, y2, ...) end --- ---Creates a new CircleShape. @@ -167,8 +168,9 @@ function love.physics.newMouseJoint(body, x, y) end ---@param y2 number # The y position of the second point. ---@param x3 number # The x position of the third point. ---@param y3 number # The y position of the third point. +---@vararg number # You can continue passing more point positions to create the PolygonShape. ---@return love.PolygonShape shape # A new PolygonShape. -function love.physics.newPolygonShape(x1, y1, x2, y2, x3, y3) end +function love.physics.newPolygonShape(x1, y1, x2, y2, x3, y3, ...) end --- ---Creates a PrismaticJoint between two bodies. @@ -499,11 +501,12 @@ function Body:getLocalPoint(worldX, worldY) end ---@param y1 number # (Argument) The y position of the first point. ---@param x2 number # (Argument) The x position of the second point. ---@param y2 number # (Argument) The y position of the second point. +---@vararg number # (Argument) You can continue passing x and y position of the points. ---@return number x1 # (Result) The transformed x position of the first point. ---@return number y1 # (Result) The transformed y position of the first point. ---@return number x2 # (Result) The transformed x position of the second point. ---@return number y2 # (Result) The transformed y position of the second point. -function Body:getLocalPoints(x1, y1, x2, y2) end +function Body:getLocalPoints(x1, y1, x2, y2, ...) end --- ---Transform a vector from world coordinates to local coordinates. diff --git a/meta/3rd/love2d/library/love.thread.lua b/meta/3rd/love2d/library/love.thread.lua index a0568580..cf37b411 100644 --- a/meta/3rd/love2d/library/love.thread.lua +++ b/meta/3rd/love2d/library/love.thread.lua @@ -86,8 +86,9 @@ function Channel:peek() end --- ---@param func function # The function to call, the form of function(channel, arg1, arg2, ...) end. The Channel is passed as the first argument to the function when it is called. ---@param arg1 any # Additional arguments that the given function will receive when it is called. +---@vararg any # Additional arguments that the given function will receive when it is called. ---@return any ret1 # The first return value of the given function (if any.) -function Channel:performAtomic(func, arg1) end +function Channel:performAtomic(func, arg1, ...) end --- ---Retrieves the value of a Channel message and removes it from the message queue. |