summaryrefslogtreecommitdiff
path: root/meta/3rd
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-20 19:36:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-20 19:36:35 +0800
commit7801b00a804bcd68aacda265afdf4d774486b4e9 (patch)
treedc73791db11a7c49f2eb25f9141d1497b6e1e7e3 /meta/3rd
parentda6942640931afd8f39db0fc84e8e0394f95d9b1 (diff)
downloadlua-language-server-7801b00a804bcd68aacda265afdf4d774486b4e9.zip
update
Diffstat (limited to 'meta/3rd')
-rw-r--r--meta/3rd/love2d/library/love.audio.lua14
-rw-r--r--meta/3rd/love2d/library/love.data.lua9
-rw-r--r--meta/3rd/love2d/library/love.event.lua1
-rw-r--r--meta/3rd/love2d/library/love.filesystem.lua13
-rw-r--r--meta/3rd/love2d/library/love.font.lua10
-rw-r--r--meta/3rd/love2d/library/love.graphics.lua118
-rw-r--r--meta/3rd/love2d/library/love.image.lua11
-rw-r--r--meta/3rd/love2d/library/love.joystick.lua6
-rw-r--r--meta/3rd/love2d/library/love.keyboard.lua2
-rw-r--r--meta/3rd/love2d/library/love.math.lua25
-rw-r--r--meta/3rd/love2d/library/love.mouse.lua3
-rw-r--r--meta/3rd/love2d/library/love.physics.lua14
-rw-r--r--meta/3rd/love2d/library/love.sound.lua6
-rw-r--r--meta/3rd/love2d/library/love.thread.lua5
-rw-r--r--meta/3rd/love2d/library/love.video.lua1
-rw-r--r--meta/3rd/love2d/library/love.window.lua4
16 files changed, 242 insertions, 0 deletions
diff --git a/meta/3rd/love2d/library/love.audio.lua b/meta/3rd/love2d/library/love.audio.lua
index 5285ea50..b0ae195a 100644
--- a/meta/3rd/love2d/library/love.audio.lua
+++ b/meta/3rd/love2d/library/love.audio.lua
@@ -113,6 +113,10 @@ function love.audio.newQueueableSource(samplerate, bitdepth, channels, buffercou
---
---Sources created from SoundData are always static.
---
+---@overload fun(file: love.File, type: love.SourceType):love.Source
+---@overload fun(decoder: love.Decoder, type: love.SourceType):love.Source
+---@overload fun(data: love.FileData, type: love.SourceType):love.Source
+---@overload fun(data: love.SoundData):love.Source
---@param filename string # The filepath to the audio file.
---@param type love.SourceType # Streaming or static source.
---@return love.Source source # A new Source that can play the specified audio.
@@ -121,12 +125,16 @@ function love.audio.newSource(filename, type) end
---
---Pauses specific or all currently played Sources.
---
+---@overload fun(source: love.Source, ...: love.Source)
+---@overload fun(sources: table)
---@return table Sources # A table containing a list of Sources that were paused by this call.
function love.audio.pause() end
---
---Plays the specified Source.
---
+---@overload fun(sources: table)
+---@overload fun(source1: love.Source, source2: love.Source, ...: love.Source)
---@param source love.Source # The Source to play.
function love.audio.play(source) end
@@ -147,6 +155,7 @@ function love.audio.setDopplerScale(scale) end
---
---Not all system supports audio effects. Use love.audio.isEffectsSupported to check.
---
+---@overload fun(name: string, enabled: boolean):boolean
---@param name string # The name of the effect.
---@param settings table # The settings to use for this effect, with the following fields:
---@return boolean success # Whether the effect was successfully created.
@@ -189,6 +198,9 @@ function love.audio.setVolume(volume) end
---
---Stops currently played sources.
---
+---@overload fun(source: love.Source)
+---@overload fun(source1: love.Source, source2: love.Source, ...: love.Source)
+---@overload fun(sources: table)
function love.audio.stop() end
---
@@ -467,6 +479,7 @@ function Source:setDirection() end
---
---The effect must have been previously defined using love.audio.setEffect.
---
+---@overload fun(name: string, filtersettings: table):boolean
---@param name string # The name of the effect previously set up with love.audio.setEffect.
---@param enable boolean # If false and the given effect name was previously enabled on this Source, disables the effect.
---@return boolean success # Whether the effect was successfully applied to this Source.
@@ -475,6 +488,7 @@ function Source:setEffect(name, enable) end
---
---Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source.
---
+---@overload fun()
---@param settings table # The filter settings to use for this Source, with the following fields:
---@return boolean success # Whether the filter was successfully applied to the Source.
function Source:setFilter(settings) end
diff --git a/meta/3rd/love2d/library/love.data.lua b/meta/3rd/love2d/library/love.data.lua
index 37f8dbd0..c2139c8d 100644
--- a/meta/3rd/love2d/library/love.data.lua
+++ b/meta/3rd/love2d/library/love.data.lua
@@ -9,6 +9,7 @@ love.data = {}
---
---Compresses a string or data using a specific compression algorithm.
---
+---@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, data: love.Data, level: number):love.CompressedData|string
---@param container love.ContainerType # What type to return the compressed data as.
---@param format love.CompressedDataFormat # The format to use when compressing the string.
---@param rawstring string # The raw (un-compressed) string to compress.
@@ -19,6 +20,7 @@ function love.data.compress(container, format, rawstring, level) end
---
---Decode Data or a string from any of the EncodeFormats to Data or string.
---
+---@overload fun(container: love.ContainerType, format: love.EncodeFormat, sourceData: love.Data):love.ByteData|string
---@param container love.ContainerType # What type to return the decoded data as.
---@param format love.EncodeFormat # The format of the input data.
---@param sourceString string # The raw (encoded) data to decode.
@@ -28,6 +30,8 @@ function love.data.decode(container, format, sourceString) end
---
---Decompresses a CompressedData or previously compressed string or Data object.
---
+---@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, compressedString: string):love.Data|string
+---@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, data: love.Data):love.Data|string
---@param container love.ContainerType # What type to return the decompressed data as.
---@param compressedData love.CompressedData # The compressed data to decompress.
---@return love.Data|string decompressedData # Data/string containing the raw decompressed data.
@@ -36,6 +40,7 @@ function love.data.decompress(container, compressedData) end
---
---Encode Data or a string to a Data or string in one of the EncodeFormats.
---
+---@overload fun(container: love.ContainerType, format: love.EncodeFormat, sourceData: love.Data, linelength: number):love.ByteData|string
---@param container love.ContainerType # What type to return the encoded data as.
---@param format love.EncodeFormat # The format of the output data.
---@param sourceString string # The raw data to encode.
@@ -55,6 +60,7 @@ function love.data.getPackedSize(format) end
---
---Compute the message digest of a string using a specified hash algorithm.
---
+---@overload fun(hashFunction: love.HashFunction, data: love.Data):string
---@param hashFunction love.HashFunction # Hash algorithm to use.
---@param string string # String to hash.
---@return string rawdigest # Raw message digest string.
@@ -65,6 +71,8 @@ function love.data.hash(hashFunction, string) end
---
---Data:getPointer along with LuaJIT's FFI can be used to manipulate the contents of the ByteData object after it has been created.
---
+---@overload fun(Data: love.Data, offset: number, size: number):love.ByteData
+---@overload fun(size: number):love.ByteData
---@param datastring string # The byte string to copy.
---@return love.ByteData bytedata # The new Data object.
function love.data.newByteData(datastring) end
@@ -94,6 +102,7 @@ function love.data.pack(container, format, v1) end
---
---This function behaves the same as Lua 5.3's string.unpack.
---
+---@overload fun(format: string, data: love.Data, pos: number):number|boolean|string, number|boolean|string, number
---@param format string # A string determining how the values were packed. Follows the rules of Lua 5.3's string.pack format strings.
---@param datastring string # A string containing the packed (serialized) data.
---@param pos number # Where to start reading in the string. Negative values can be used to read relative from the end of the string.
diff --git a/meta/3rd/love2d/library/love.event.lua b/meta/3rd/love2d/library/love.event.lua
index 71d950fc..f0c02d2a 100644
--- a/meta/3rd/love2d/library/love.event.lua
+++ b/meta/3rd/love2d/library/love.event.lua
@@ -39,6 +39,7 @@ function love.event.push() end
---
---The quit event is a signal for the event handler to close LÖVE. It's possible to abort the exit process with the love.quit callback.
---
+---@overload fun('restart': string)
---@param exitstatus number # The program exit status to use when closing the application.
function love.event.quit(exitstatus) end
diff --git a/meta/3rd/love2d/library/love.filesystem.lua b/meta/3rd/love2d/library/love.filesystem.lua
index e46afe14..949d67e9 100644
--- a/meta/3rd/love2d/library/love.filesystem.lua
+++ b/meta/3rd/love2d/library/love.filesystem.lua
@@ -9,6 +9,7 @@ love.filesystem = {}
---
---Append data to an existing file.
---
+---@overload fun(name: string, data: love.Data, size: number):boolean, string
---@param name string # The name (and path) of the file.
---@param data string # The string data to append to the file.
---@param size number # How many bytes to write.
@@ -52,6 +53,7 @@ function love.filesystem.getCRequirePath() end
---
---If the path passed to the function exists in the game and the save directory, it will list the files and directories from both places.
---
+---@overload fun(dir: string, callback: function):table
---@param dir string # The directory.
---@return table files # A sequence with the names of all files and subdirectories as strings.
function love.filesystem.getDirectoryItems(dir) end
@@ -67,6 +69,8 @@ function love.filesystem.getIdentity() end
---
---Gets information about the specified file or directory.
---
+---@overload fun(path: string, info: table):table
+---@overload fun(path: string, filtertype: love.FileType, info: table):table
---@param path string # The file or directory path to check.
---@param filtertype love.FileType # If supplied, this parameter causes getInfo to only return the info table if the item at the given path matches the specified file type.
---@return table info # A table containing information about the specified path, or nil if nothing exists at the path. The table contains the following fields:
@@ -163,6 +167,8 @@ function love.filesystem.load(name) end
---
---It is also possible to mount love.filesystem.getSourceBaseDirectory if the game is in fused mode.
---
+---@overload fun(filedata: love.FileData, mountpoint: string, appendToPath: boolean):boolean
+---@overload fun(data: love.Data, archivename: string, mountpoint: string, appendToPath: boolean):boolean
---@param archive string # The folder or zip file in the game's save directory to mount.
---@param mountpoint string # The new path the archive will be mounted to.
---@param appendToPath boolean # Whether the archive will be searched when reading a filepath before or after already-mounted archives. This includes the game's source and save directories.
@@ -174,6 +180,7 @@ function love.filesystem.mount(archive, mountpoint, appendToPath) end
---
---It needs to be opened before it can be accessed.
---
+---@overload fun(filename: string, mode: love.FileMode):love.File, string
---@param filename string # The filename of the file.
---@return love.File file # The new File object.
function love.filesystem.newFile(filename) end
@@ -181,6 +188,7 @@ function love.filesystem.newFile(filename) end
---
---Creates a new FileData object.
---
+---@overload fun(filepath: string):love.FileData, string
---@param contents string # The contents of the file.
---@param name string # The name of the file.
---@return love.FileData data # Your new FileData.
@@ -189,6 +197,7 @@ function love.filesystem.newFileData(contents, name) end
---
---Read the contents of a file.
---
+---@overload fun(container: love.ContainerType, name: string, size: number):love.FileData|string, number, nil, string
---@param name string # The name (and path) of the file.
---@param size number # How many bytes to read.
---@return string contents # The file contents.
@@ -219,6 +228,7 @@ function love.filesystem.setCRequirePath(paths) end
---
---Note that you can only set the name of the folder to store your files in, not the location.
---
+---@overload fun(name: string)
---@param name string # The new identity that will be used as write directory.
function love.filesystem.setIdentity(name) end
@@ -254,6 +264,7 @@ function love.filesystem.unmount(archive) end
---
---Write data to a file in the save directory. If the file existed already, it will be completely replaced by the new contents.
---
+---@overload fun(name: string, data: love.Data, size: number):boolean, string
---@param name string # The name (and path) of the file.
---@param data string # The string data to write to the file.
---@param size number # How many bytes to write.
@@ -342,6 +353,7 @@ function File:open(mode) end
---
---Read a number of bytes from a file.
---
+---@overload fun(container: love.ContainerType, bytes: number):love.FileData|string, number
---@param bytes number # The number of bytes to read.
---@return string contents # The contents of the read bytes.
---@return number size # How many bytes have been read.
@@ -374,6 +386,7 @@ function File:tell() end
---
---Write data to a file.
---
+---@overload fun(data: love.Data, size: number):boolean, string
---@param data string # The string data to write.
---@param size number # How many bytes to write.
---@return boolean success # Whether the operation was successful.
diff --git a/meta/3rd/love2d/library/love.font.lua b/meta/3rd/love2d/library/love.font.lua
index 03229a57..1efbf057 100644
--- a/meta/3rd/love2d/library/love.font.lua
+++ b/meta/3rd/love2d/library/love.font.lua
@@ -9,6 +9,7 @@ love.font = {}
---
---Creates a new BMFont Rasterizer.
---
+---@overload fun(fileName: string, glyphs: string, dpiscale: number):love.Rasterizer
---@param imageData love.ImageData # The image data containing the drawable pictures of font glyphs.
---@param glyphs string # The sequence of glyphs in the ImageData.
---@param dpiscale number # DPI scale.
@@ -35,6 +36,12 @@ function love.font.newImageRasterizer(imageData, glyphs, extraSpacing, dpiscale)
---
---Creates a new Rasterizer.
---
+---@overload fun(data: love.FileData):love.Rasterizer
+---@overload fun(size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer
+---@overload fun(fileName: string, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer
+---@overload fun(fileData: love.FileData, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer
+---@overload fun(imageData: love.ImageData, glyphs: string, dpiscale: number):love.Rasterizer
+---@overload fun(fileName: string, glyphs: string, dpiscale: number):love.Rasterizer
---@param filename string # The font file.
---@return love.Rasterizer rasterizer # The rasterizer.
function love.font.newRasterizer(filename) end
@@ -42,6 +49,8 @@ function love.font.newRasterizer(filename) end
---
---Creates a new TrueType Rasterizer.
---
+---@overload fun(fileName: string, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer
+---@overload fun(fileData: love.FileData, size: number, hinting: love.HintingMode, dpiscale: number):love.Rasterizer
---@param size number # The font size.
---@param hinting love.HintingMode # True Type hinting mode.
---@param dpiscale number # The font DPI scale.
@@ -144,6 +153,7 @@ function Rasterizer:getGlyphCount() end
---
---Gets glyph data of a specified glyph.
---
+---@overload fun(glyphNumber: number):love.GlyphData
---@param glyph string # Glyph
---@return love.GlyphData glyphData # Glyph data
function Rasterizer:getGlyphData(glyph) end
diff --git a/meta/3rd/love2d/library/love.graphics.lua b/meta/3rd/love2d/library/love.graphics.lua
index 38a705a1..0c28d212 100644
--- a/meta/3rd/love2d/library/love.graphics.lua
+++ b/meta/3rd/love2d/library/love.graphics.lua
@@ -23,6 +23,7 @@ function love.graphics.applyTransform(transform) end
---
---Draws a filled or unfilled arc at position (x, y). The arc is drawn from angle1 to angle2 in radians. The segments parameter determines how many segments are used to draw the arc. The more segments, the smoother the edge.
---
+---@overload fun(drawmode: love.DrawMode, arctype: love.ArcType, x: number, y: number, radius: number, angle1: number, angle2: number, segments: number)
---@param drawmode love.DrawMode # How to draw the arc.
---@param radius number # Radius of the arc.
---@param angle1 number # The angle at which the arc begins.
@@ -35,12 +36,15 @@ function love.graphics.arc(drawmode, radius, angle1, angle2, segments) end
---
---Since this function enqueues a screenshot capture rather than executing it immediately, it can be called from an input callback or love.update and it will still capture all of what's drawn to the screen in that frame.
---
+---@overload fun(callback: function)
+---@overload fun(channel: love.Channel)
---@param filename string # The filename to save the screenshot to. The encoded image type is determined based on the extension of the filename, and must be one of the ImageFormats.
function love.graphics.captureScreenshot(filename) end
---
---Draws a circle.
---
+---@overload fun(mode: love.DrawMode, x: number, y: number, radius: number, segments: number)
---@param mode love.DrawMode # How to draw the circle.
---@param radius number # The radius of the circle.
function love.graphics.circle(mode, radius) end
@@ -56,6 +60,9 @@ function love.graphics.circle(mode, radius) end
---
---In versions prior to background color instead.
---
+---@overload fun(r: number, g: number, b: number, a: number, clearstencil: boolean, cleardepth: boolean)
+---@overload fun(color: table, ...: table, clearstencil: boolean, cleardepth: boolean)
+---@overload fun(clearcolor: boolean, clearstencil: boolean, cleardepth: boolean)
function love.graphics.clear() end
---
@@ -65,6 +72,7 @@ function love.graphics.clear() end
---
---On some desktop systems this function may do nothing.
---
+---@overload fun(discardcolors: table, discardstencil: boolean)
---@param discardcolor boolean # Whether to discard the texture(s) of the active Canvas(es) (the contents of the screen if no Canvas is active.)
---@param discardstencil boolean # Whether to discard the contents of the stencil buffer of the screen / active Canvas.
function love.graphics.discard(discardcolor, discardstencil) end
@@ -82,6 +90,9 @@ function love.graphics.discard(discardcolor, discardstencil) end
---
---When using the default shader anything drawn with this function will be tinted according to the currently selected color. Set it to pure white to preserve the object's original colors.
---
+---@overload fun(texture: love.Texture, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
+---@overload fun(drawable: love.Drawable, transform: love.Transform)
+---@overload fun(texture: love.Texture, quad: love.Quad, transform: love.Transform)
---@param drawable love.Drawable # A drawable object.
---@param sx number # Scale factor (x-axis).
---@param sy number # Scale factor (y-axis).
@@ -98,6 +109,7 @@ function love.graphics.draw(drawable, sx, sy, ox, oy, kx, ky) end
---
---Instancing is not supported by some older GPUs that are only capable of using OpenGL ES 2 or OpenGL 2. Use love.graphics.getSupported to check.
---
+---@overload fun(mesh: love.Mesh, instancecount: number, transform: love.Transform)
---@param mesh love.Mesh # The mesh to render.
---@param instancecount number # The number of instances to render.
---@param sx number # Scale factor (x-axis).
@@ -111,6 +123,9 @@ function love.graphics.drawInstanced(mesh, instancecount, sx, sy, ox, oy, kx, ky
---
---Draws a layer of an Array Texture.
---
+---@overload fun(texture: love.Texture, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
+---@overload fun(texture: love.Texture, layerindex: number, transform: love.Transform)
+---@overload fun(texture: love.Texture, layerindex: number, quad: love.Quad, transform: love.Transform)
---@param texture love.Texture # The Array Texture to draw.
---@param layerindex number # The index of the layer to use when drawing.
---@param sx number # Scale factor (x-axis).
@@ -124,6 +139,7 @@ function love.graphics.drawLayer(texture, layerindex, sx, sy, ox, oy, kx, ky) en
---
---Draws an ellipse.
---
+---@overload fun(mode: love.DrawMode, x: number, y: number, radiusx: number, radiusy: number, segments: number)
---@param mode love.DrawMode # How to draw the ellipse.
---@param radiusx number # The radius of the ellipse along the x-axis (half the ellipse's width).
---@param radiusy number # The radius of the ellipse along the y-axis (half the ellipse's height).
@@ -163,6 +179,7 @@ function love.graphics.getCanvas() end
---
---Gets the available Canvas formats, and whether each is supported.
---
+---@overload fun(readable: boolean):table
---@return table formats # A table containing CanvasFormats as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats.
function love.graphics.getCanvasFormats() end
@@ -330,6 +347,7 @@ function love.graphics.getStackDepth() end
---
---Gets performance-related rendering statistics.
---
+---@overload fun(stats: table):table
---@return table stats # A table with the following fields:
function love.graphics.getStats() end
@@ -416,6 +434,7 @@ function love.graphics.isWireframe() end
---
---Draws lines between points.
---
+---@overload fun(points: table)
---@param x1 number # The position of first point on the x-axis.
---@param y1 number # The position of first point on the y-axis.
---@param x2 number # The position of second point on the x-axis.
@@ -439,6 +458,9 @@ function love.graphics.newArrayImage(slices, settings) end
---
---Creates a new Canvas object for offscreen rendering.
---
+---@overload fun(width: number, height: number):love.Canvas
+---@overload fun(width: number, height: number, settings: table):love.Canvas
+---@overload fun(width: number, height: number, layers: number, settings: table):love.Canvas
---@return love.Canvas canvas # A new Canvas with dimensions equal to the window's size in pixels.
function love.graphics.newCanvas() end
@@ -487,6 +509,7 @@ function love.graphics.newCanvas() end
---
---+x -x +y -y +z -z
---
+---@overload fun(faces: table, settings: table):love.Image
---@param filename string # The filepath to a cubemap image file (or a File, FileData, or ImageData).
---@param settings table # Optional table of settings to configure the cubemap image, containing the following fields:
---@return love.Image image # An cubemap Image object.
@@ -497,6 +520,9 @@ function love.graphics.newCubeImage(filename, settings) end
---
---All variants which accept a filename can also accept a Data object instead.
---
+---@overload fun(filename: string, size: number, hinting: love.HintingMode, dpiscale: number):love.Font
+---@overload fun(filename: string, imagefilename: string):love.Font
+---@overload fun(size: number, hinting: love.HintingMode, dpiscale: number):love.Font
---@param filename string # The filepath to the BMFont or TrueType font file.
---@return love.Font font # A Font object which can be used to draw text on screen.
function love.graphics.newFont(filename) end
@@ -504,6 +530,9 @@ function love.graphics.newFont(filename) end
---
---Creates a new Image from a filepath, FileData, an ImageData, or a CompressedImageData, and optionally generates or specifies mipmaps for the image.
---
+---@overload fun(imageData: love.ImageData):love.Image
+---@overload fun(compressedImageData: love.CompressedImageData):love.Image
+---@overload fun(filename: string, flags: table):love.Image
---@param filename string # The filepath to the image file.
---@return love.Image image # An Image object which can be drawn on screen.
function love.graphics.newImage(filename) end
@@ -513,6 +542,8 @@ function love.graphics.newImage(filename) end
---
---In versions prior to 0.9.0, LÖVE expects ISO 8859-1 encoding for the glyphs string.
---
+---@overload fun(imageData: love.ImageData, glyphs: string):love.Font
+---@overload fun(filename: string, glyphs: string, extraspacing: number):love.Font
---@param filename string # The filepath to the image file.
---@param glyphs string # A string of the characters in the image in order from left to right.
---@return love.Font font # A Font object which can be used to draw text on screen.
@@ -525,6 +556,10 @@ function love.graphics.newImageFont(filename, glyphs) end
---
---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(vertexcount: number, mode: love.MeshDrawMode, usage: love.SpriteBatchUsage):love.Mesh
+---@overload fun(vertexformat: table, vertices: table, mode: love.MeshDrawMode, usage: love.SpriteBatchUsage):love.Mesh
+---@overload fun(vertexformat: table, vertexcount: number, mode: love.MeshDrawMode, usage: love.SpriteBatchUsage):love.Mesh
+---@overload fun(vertexcount: number, texture: love.Texture, mode: love.MeshDrawMode):love.Mesh
---@param vertices table # The table filled with vertex information tables for each vertex as follows:
---@param mode love.MeshDrawMode # How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons.
---@param usage love.SpriteBatchUsage # The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance.
@@ -534,6 +569,7 @@ function love.graphics.newMesh(vertices, mode, usage) end
---
---Creates a new ParticleSystem.
---
+---@overload fun(texture: love.Texture, buffer: number):love.ParticleSystem
---@param image love.Image # The image to use.
---@param buffer number # The max number of particles at the same time.
---@return love.ParticleSystem system # A new ParticleSystem.
@@ -556,6 +592,7 @@ function love.graphics.newQuad(width, height, sw, sh) end
---
---Shaders are small programs which are run on the graphics card when drawing. Vertex shaders are run once for each vertex (for example, an image has 4 vertices - one at each corner. A Mesh might have many more.) Pixel shaders are run once for each pixel on the screen which the drawn object touches. Pixel shader code is executed after all the object's vertices have been processed by the vertex shader.
---
+---@overload fun(pixelcode: string, vertexcode: string):love.Shader
---@param code string # The pixel shader or vertex shader code, or a filename pointing to a file with the code.
---@return love.Shader shader # A Shader object for use in drawing operations.
function love.graphics.newShader(code) end
@@ -563,6 +600,8 @@ function love.graphics.newShader(code) end
---
---Creates a new SpriteBatch object.
---
+---@overload fun(image: love.Image, maxsprites: number, usage: love.SpriteBatchUsage):love.SpriteBatch
+---@overload fun(texture: love.Texture, maxsprites: number, usage: love.SpriteBatchUsage):love.SpriteBatch
---@param image love.Image # The Image to use for the sprites.
---@param maxsprites number # The maximum number of sprites that the SpriteBatch can contain at any given time. Since version 11.0, additional sprites added past this number will automatically grow the spritebatch.
---@return love.SpriteBatch spriteBatch # The new SpriteBatch.
@@ -579,6 +618,10 @@ function love.graphics.newText(font, textstring) end
---
---Creates a new drawable Video. Currently only Ogg Theora video files are supported.
---
+---@overload fun(videostream: love.VideoStream):love.Video
+---@overload fun(filename: string, settings: table):love.Video
+---@overload fun(filename: string, loadaudio: boolean):love.Video
+---@overload fun(videostream: love.VideoStream, loadaudio: boolean):love.Video
---@param filename string # The file path to the Ogg Theora video file.
---@return love.Video video # A new Video.
function love.graphics.newVideo(filename) end
@@ -609,6 +652,8 @@ function love.graphics.origin() end
---
---Draws one or more points.
---
+---@overload fun(points: table)
+---@overload fun(points: table)
function love.graphics.points() end
---
@@ -616,6 +661,7 @@ function love.graphics.points() end
---
---Following the mode argument, this function can accept multiple numeric arguments or a single table of numeric arguments. In either case the arguments are interpreted as alternating x and y coordinates of the polygon's vertices.
---
+---@overload fun(mode: love.DrawMode, vertices: table)
---@param mode love.DrawMode # How to draw the polygon.
function love.graphics.polygon(mode) end
@@ -642,6 +688,11 @@ function love.graphics.present() end
---
---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(coloredtext: table, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
+---@overload fun(text: string, transform: love.Transform)
+---@overload fun(coloredtext: table, transform: love.Transform)
+---@overload fun(text: string, font: love.Font, transform: love.Transform)
+---@overload fun(coloredtext: table, font: love.Font, transform: love.Transform)
---@param text string # The text to draw.
---@param sx number # Scale factor (x-axis).
---@param sy number # Scale factor (y-axis).
@@ -662,6 +713,13 @@ function love.graphics.print(text, sx, sy, ox, oy, kx, ky) end
---
---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(text: string, font: love.Font, x: number, y: number, limit: number, align: love.AlignMode, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
+---@overload fun(text: string, transform: love.Transform, limit: number, align: love.AlignMode)
+---@overload fun(text: string, font: love.Font, transform: love.Transform, limit: number, align: love.AlignMode)
+---@overload fun(coloredtext: table, x: number, y: number, limit: number, align: love.AlignMode, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
+---@overload fun(coloredtext: table, font: love.Font, x: number, y: number, limit: number, align: love.AlignMode, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
+---@overload fun(coloredtext: table, transform: love.Transform, limit: number, align: love.AlignMode)
+---@overload fun(coloredtext: table, font: love.Font, transform: love.Transform, limit: number, align: love.AlignMode)
---@param text string # A text string.
---@param limit number # Wrap the line after this many horizontal pixels.
---@param align love.AlignMode # The alignment.
@@ -678,11 +736,13 @@ function love.graphics.printf(text, limit, align, sx, sy, ox, oy, kx, ky) end
---
---This function is always used to prepare for a corresponding pop operation later. It stores the current coordinate transformation state into the transformation stack and keeps it active. Later changes to the transformation can be undone by using the pop operation, which returns the coordinate transform to the state it was in before calling push.
---
+---@overload fun(stack: love.StackType)
function love.graphics.push() end
---
---Draws a rectangle.
---
+---@overload fun(mode: love.DrawMode, x: number, y: number, width: number, height: number, rx: number, ry: number, segments: number)
---@param mode love.DrawMode # How to draw the rectangle.
---@param width number # Width of the rectangle.
---@param height number # Height of the rectangle.
@@ -727,6 +787,8 @@ function love.graphics.scale(sx, sy) end
---
---Sets the background color.
---
+---@overload fun()
+---@overload fun()
---@param red number # The red component (0-1).
---@param green number # The green component (0-1).
---@param blue number # The blue component (0-1).
@@ -736,12 +798,17 @@ function love.graphics.setBackgroundColor(red, green, blue, alpha) end
---
---Sets the blending mode.
---
+---@overload fun(mode: love.BlendMode, alphamode: love.BlendAlphaMode)
---@param mode love.BlendMode # The blend mode to use.
function love.graphics.setBlendMode(mode) end
---
---Captures drawing operations to a Canvas.
---
+---@overload fun()
+---@overload fun(canvas1: love.Canvas, canvas2: love.Canvas, ...: love.Canvas)
+---@overload fun(canvas: love.Canvas, slice: number, mipmap: number)
+---@overload fun(setup: table)
---@param canvas love.Canvas # The new target.
---@param mipmap number # The mipmap level to render to, for Canvases with mipmaps.
function love.graphics.setCanvas(canvas, mipmap) end
@@ -751,6 +818,7 @@ function love.graphics.setCanvas(canvas, mipmap) end
---
---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(rgba: table)
---@param red number # The amount of red.
---@param green number # The amount of green.
---@param blue number # The amount of blue.
@@ -760,6 +828,7 @@ function love.graphics.setColor(red, green, blue, alpha) end
---
---Sets the color mask. Enables or disables specific color components when rendering and clearing the screen. For example, if '''red''' is set to '''false''', no further changes will be made to the red component of any pixels.
---
+---@overload fun()
---@param red boolean # Render red component.
---@param green boolean # Render green component.
---@param blue boolean # Render blue component.
@@ -779,6 +848,7 @@ function love.graphics.setDefaultFilter(min, mag, anisotropy) end
---
---This is low-level functionality designed for use with custom vertex shaders and Meshes with custom vertex attributes. No higher level APIs are provided to set the depth of 2D graphics such as shapes, lines, and Images.
---
+---@overload fun()
---@param comparemode love.CompareMode # Depth comparison mode used for depth testing.
---@param write boolean # Whether to write update / write values to the depth buffer when rendering.
function love.graphics.setDepthMode(comparemode, write) end
@@ -830,6 +900,10 @@ function love.graphics.setMeshCullMode(mode) end
---
---Creates and sets a new Font.
---
+---@overload fun(filename: string, size: number):love.Font
+---@overload fun(file: love.File, size: number):love.Font
+---@overload fun(data: love.Data, size: number):love.Font
+---@overload fun(rasterizer: love.Rasterizer):love.Font
---@param size number # The size of the font.
---@return love.Font font # The new font.
function love.graphics.setNewFont(size) end
@@ -847,6 +921,7 @@ function love.graphics.setPointSize(size) end
---
---The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...).
---
+---@overload fun()
---@param width number # width of clipping rectangle.
---@param height number # height of clipping rectangle.
function love.graphics.setScissor(width, height) end
@@ -854,6 +929,7 @@ function love.graphics.setScissor(width, height) end
---
---Sets or resets a Shader as the current pixel effect or vertex shaders. All drawing operations until the next ''love.graphics.setShader'' will be drawn using the Shader object specified.
---
+---@overload fun()
---@param shader love.Shader # The new shader.
function love.graphics.setShader(shader) end
@@ -862,6 +938,7 @@ function love.graphics.setShader(shader) end
---
---When stencil testing is enabled, the geometry of everything that is drawn afterward will be clipped / stencilled out based on a comparison between the arguments of this function and the stencil value of each pixel that the geometry touches. The stencil values of pixels are affected via love.graphics.stencil.
---
+---@overload fun()
---@param comparemode love.CompareMode # The type of comparison to make for each pixel.
---@param comparevalue number # The value to use when comparing with the stencil value of each pixel. Must be between 0 and 255.
function love.graphics.setStencilTest(comparemode, comparevalue) end
@@ -921,6 +998,7 @@ function love.graphics.translate(dx, dy) end
---
---Validates shader code. Check if specified shader code does not contain any errors.
---
+---@overload fun(gles: boolean, pixelcode: string, vertexcode: string):boolean, string
---@param gles boolean # Validate code as GLSL ES shader.
---@param code string # The pixel shader or vertex shader code, or a filename pointing to a file with the code.
---@return boolean status # true if specified shader code doesn't contain any errors. false otherwise.
@@ -963,6 +1041,7 @@ function Canvas:getMipmapMode() end
---
---Generates ImageData from the contents of the Canvas.
---
+---@overload fun(slice: number, mipmap: number, x: number, y: number, width: number, height: number):love.ImageData
---@return love.ImageData data # The new ImageData made from the Canvas' contents.
function Canvas:newImageData() end
@@ -1075,6 +1154,8 @@ function Font:getWrap(text, wraplimit) end
---
---Gets whether the Font can render a character or string.
---
+---@overload fun(character1: string, character2: string):boolean
+---@overload fun(codepoint1: number, codepoint2: number):boolean
---@param text string # A UTF-8 encoded unicode string.
---@return boolean hasglyph # Whether the font can render all the UTF-8 characters in the string.
function Font:hasGlyphs(text) end
@@ -1139,6 +1220,7 @@ local Mesh = {}
---
---Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes.
---
+---@overload fun(name: string, mesh: love.Mesh, step: love.VertexAttributeStep, attachname: string)
---@param name string # The name of the vertex attribute to attach.
---@param mesh love.Mesh # The Mesh to get the vertex attribute from.
function Mesh:attachAttribute(name, mesh) end
@@ -1174,6 +1256,7 @@ function Mesh:getTexture() end
---
---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(index: number):number, number, number, number, number, number, number, number
---@param index number # The one-based index of the vertex you want to retrieve the information for.
---@return number attributecomponent # The first component of the first vertex attribute in the specified vertex.
function Mesh:getVertex(index) end
@@ -1232,6 +1315,7 @@ function Mesh:setDrawMode(mode) end
---
---Restricts the drawn vertices of the Mesh to a subset of the total.
---
+---@overload fun()
---@param start number # The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh.
---@param count number # The number of vertices to use when drawing, or number of values in the vertex map to use if one is set for this Mesh.
function Mesh:setDrawRange(start, count) end
@@ -1239,6 +1323,7 @@ function Mesh:setDrawRange(start, count) end
---
---Sets the texture (Image or Canvas) used when drawing the Mesh.
---
+---@overload fun()
---@param texture love.Texture # The Image or Canvas to texture the Mesh with when drawing.
function Mesh:setTexture(texture) end
@@ -1247,6 +1332,9 @@ function Mesh:setTexture(texture) end
---
---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(index: number, vertex: table)
+---@overload fun(index: number, x: number, y: number, u: number, v: number, r: number, g: number, b: number, a: number)
+---@overload fun(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
@@ -1267,12 +1355,16 @@ function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2) en
---
---The vertex map allows you to re-order or reuse vertices when drawing without changing the actual vertex parameters or duplicating vertices. It is especially useful when combined with different Mesh Draw Modes.
---
+---@overload fun(vi1: number, vi2: number, vi3: number)
+---@overload fun(data: love.Data, datatype: love.IndexDataType)
---@param map table # A table containing a list of vertex indices to use when drawing. Values must be in the range of Mesh:getVertexCount().
function Mesh:setVertexMap(map) end
---
---Replaces a range of vertices in the Mesh with new ones. The total number of vertices in a Mesh cannot be changed after it has been created. This is often more efficient than calling Mesh:setVertex in a loop.
---
+---@overload fun(data: love.Data, startvertex: number)
+---@overload fun(vertices: table)
---@param vertices table # The table filled with vertex information tables for each vertex, in the form of {vertex, ...} where each vertex is a table in the form of {attributecomponent, ...}.
---@param startvertex number # The index of the first vertex to replace.
function Mesh:setVertices(vertices, startvertex) end
@@ -1615,6 +1707,7 @@ function ParticleSystem:setPosition() end
---
---Sets a series of Quads to use for the particle sprites. Particles will choose a Quad from the list based on the particle's current lifetime, allowing for the use of animated sprite sheets with ParticleSystems.
---
+---@overload fun(quads: table)
---@param quad1 love.Quad # The first Quad to use.
---@param quad2 love.Quad # The second Quad to use.
function ParticleSystem:setQuads(quad1, quad2) end
@@ -1781,6 +1874,13 @@ function Shader:hasUniform(name) end
---
---Uniform / extern variables are read-only in the shader code and remain constant until modified by a Shader:send call. Uniform variables can be accessed in both the Vertex and Pixel components of a shader, as long as the variable is declared in each.
---
+---@overload fun(name: string, vector: table, ...: table)
+---@overload fun(name: string, matrix: table, ...: table)
+---@overload fun(name: string, texture: love.Texture)
+---@overload fun(name: string, boolean: boolean, ...: boolean)
+---@overload fun(name: string, matrixlayout: love.MatrixLayout, matrix: table, ...: table)
+---@overload fun(name: string, data: love.Data, offset: number, size: number)
+---@overload fun(name: string, data: love.Data, matrixlayout: love.MatrixLayout, 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
@@ -1815,6 +1915,7 @@ local SpriteBatch = {}
---
---Adds a sprite to the batch. Sprites are drawn in the order they are added.
---
+---@overload fun(quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number
---@param sx number # Scale factor (x-axis).
---@param sy number # Scale factor (y-axis).
---@param ox number # Origin offset (x-axis).
@@ -1827,6 +1928,9 @@ function SpriteBatch:add(sx, sy, ox, oy, kx, ky) end
---
---Adds a sprite to a batch created with an Array Texture.
---
+---@overload fun(layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number
+---@overload fun(layerindex: number, transform: love.Transform):number
+---@overload fun(layerindex: number, quad: love.Quad, transform: love.Transform):number
---@param layerindex number # The index of the layer to use for this sprite.
---@param sx number # Scale factor (x-axis).
---@param sy number # Scale factor (y-axis).
@@ -1890,6 +1994,7 @@ function SpriteBatch:getTexture() end
---
---Changes a sprite in the batch. This requires the sprite index returned by SpriteBatch:add or SpriteBatch:addLayer.
---
+---@overload fun(spriteindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
---@param spriteindex number # The index of the sprite that will be changed.
---@param sx number # Scale factor (x-axis).
---@param sy number # Scale factor (y-axis).
@@ -1906,11 +2011,13 @@ function SpriteBatch:set(spriteindex, sx, sy, ox, oy, kx, ky) end
---
---In version 0.9.2 and older, the global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color.
---
+---@overload fun()
function SpriteBatch:setColor() end
---
---Restricts the drawn sprites in the SpriteBatch to a subset of the total.
---
+---@overload fun()
---@param start number # The index of the first sprite to draw. Index 1 corresponds to the first sprite added with SpriteBatch:add.
---@param count number # The number of sprites to draw.
function SpriteBatch:setDrawRange(start, count) end
@@ -1918,6 +2025,9 @@ function SpriteBatch:setDrawRange(start, count) end
---
---Changes a sprite previously added with add or addLayer, in a batch created with an Array Texture.
---
+---@overload fun(spriteindex: number, layerindex: number, quad: love.Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)
+---@overload fun(spriteindex: number, layerindex: number, transform: love.Transform)
+---@overload fun(spriteindex: number, layerindex: number, quad: love.Quad, transform: love.Transform)
---@param spriteindex number # The index of the existing sprite to replace.
---@param layerindex number # The index of the layer in the Array Texture to use for this sprite.
---@param sx number # Scale factor (x-axis).
@@ -1943,6 +2053,7 @@ local Text = {}
---
---Adds additional colored text to the Text object at the specified position.
---
+---@overload fun(coloredtext: table, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number
---@param textstring string # The text to add to the object.
---@param angle number # The orientation of the new text in radians.
---@param sx number # Scale factor on the x-axis.
@@ -1959,6 +2070,7 @@ function Text:add(textstring, angle, sx, sy, ox, oy, kx, ky) end
---
---The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change.
---
+---@overload fun(coloredtext: table, wraplimit: number, align: love.AlignMode, x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):number
---@param textstring string # The text to add to the object.
---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line.
---@param align love.AlignMode # The alignment of the text.
@@ -1980,6 +2092,7 @@ function Text:clear() end
---
---Gets the width and height of the text in pixels.
---
+---@overload fun(index: number):number, number
---@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned.
---@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned.
function Text:getDimensions() end
@@ -1993,18 +2106,21 @@ function Text:getFont() end
---
---Gets the height of the text in pixels.
---
+---@overload fun(index: number):number
---@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned.
function Text:getHeight() end
---
---Gets the width of the text in pixels.
---
+---@overload fun(index: number):number
---@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned.
function Text:getWidth() end
---
---Replaces the contents of the Text object with a new unformatted string.
---
+---@overload fun(coloredtext: table)
---@param textstring string # The new string of text to use.
function Text:set(textstring) end
@@ -2017,6 +2133,7 @@ function Text:setFont(font) end
---
---Replaces the contents of the Text object with a new formatted string.
---
+---@overload fun(coloredtext: table, wraplimit: number, align: love.AlignMode)
---@param textstring string # The new string of text to use.
---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line.
---@param align love.AlignMode # The alignment of the text.
@@ -2182,6 +2299,7 @@ function Texture:setFilter(min, mag, anisotropy) end
---
---Due to hardware restrictions and driver bugs, in versions prior to 0.10.0 images that weren't loaded from a CompressedData must have power-of-two dimensions (64x64, 512x256, etc.) to use mipmaps.
---
+---@overload fun()
---@param filtermode love.FilterMode # The filter mode to use in between mipmap levels. 'nearest' will often give better performance.
---@param sharpness number # A positive sharpness value makes the texture use a more detailed mipmap level when drawing, at the expense of performance. A negative value does the reverse.
function Texture:setMipmapFilter(filtermode, sharpness) end
diff --git a/meta/3rd/love2d/library/love.image.lua b/meta/3rd/love2d/library/love.image.lua
index 8fee22d4..85070b9c 100644
--- a/meta/3rd/love2d/library/love.image.lua
+++ b/meta/3rd/love2d/library/love.image.lua
@@ -9,6 +9,7 @@ love.image = {}
---
---Determines whether a file can be loaded as CompressedImageData.
---
+---@overload fun(fileData: love.FileData):boolean
---@param filename string # The filename of the potentially compressed image file.
---@return boolean compressed # Whether the file can be loaded as CompressedImageData or not.
function love.image.isCompressed(filename) end
@@ -16,6 +17,7 @@ function love.image.isCompressed(filename) end
---
---Create a new CompressedImageData object from a compressed image file. LÖVE supports several compressed texture formats, enumerated in the CompressedImageFormat page.
---
+---@overload fun(fileData: love.FileData):love.CompressedImageData
---@param filename string # The filename of the compressed image file.
---@return love.CompressedImageData compressedImageData # The new CompressedImageData object.
function love.image.newCompressedData(filename) end
@@ -23,6 +25,10 @@ function love.image.newCompressedData(filename) end
---
---Creates a new ImageData object.
---
+---@overload fun(width: number, height: number, format: love.PixelFormat, data: string):love.ImageData
+---@overload fun(width: number, height: number, data: string):love.ImageData
+---@overload fun(filename: string):love.ImageData
+---@overload fun(filedata: love.FileData):love.ImageData
---@param width number # The width of the ImageData.
---@param height number # The height of the ImageData.
---@return love.ImageData imageData # The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zero.
@@ -41,6 +47,7 @@ local CompressedImageData = {}
---
---Gets the width and height of the CompressedImageData.
---
+---@overload fun(level: number):number, number
---@return number width # The width of the CompressedImageData.
---@return number height # The height of the CompressedImageData.
function CompressedImageData:getDimensions() end
@@ -54,6 +61,7 @@ function CompressedImageData:getFormat() end
---
---Gets the height of the CompressedImageData.
---
+---@overload fun(level: number):number
---@return number height # The height of the CompressedImageData.
function CompressedImageData:getHeight() end
@@ -66,6 +74,7 @@ function CompressedImageData:getMipmapCount() end
---
---Gets the width of the CompressedImageData.
---
+---@overload fun(level: number):number
---@return number width # The width of the CompressedImageData.
function CompressedImageData:getWidth() end
@@ -80,6 +89,8 @@ local ImageData = {}
---
---Encodes the ImageData and optionally writes it to the save directory.
---
+---@overload fun(outFile: string)
+---@overload fun(outFile: string, format: love.ImageFormat)
---@param format love.ImageFormat # The format to encode the image as.
---@param filename string # The filename to write the file to. If nil, no file will be written but the FileData will still be returned.
---@return love.FileData filedata # The encoded image as a new FileData object.
diff --git a/meta/3rd/love2d/library/love.joystick.lua b/meta/3rd/love2d/library/love.joystick.lua
index 3fa5413e..39a5eeba 100644
--- a/meta/3rd/love2d/library/love.joystick.lua
+++ b/meta/3rd/love2d/library/love.joystick.lua
@@ -32,6 +32,7 @@ function love.joystick.getJoysticks() end
---
---It also recognizes any SDL gamecontroller mapping string, such as those created with Steam's Big Picture controller configure interface, or this nice database. If a new mapping is loaded for an already known controller GUID, the later version will overwrite the one currently loaded.
---
+---@overload fun(mappings: string)
---@param filename string # The filename to load the mappings string from.
function love.joystick.loadGamepadMappings(filename) end
@@ -40,6 +41,7 @@ function love.joystick.loadGamepadMappings(filename) end
---
---The mappings are stored as a string for use with love.joystick.loadGamepadMappings.
---
+---@overload fun():string
---@param filename string # The filename to save the mappings string to.
---@return string mappings # The mappings string that was written to the file.
function love.joystick.saveGamepadMappings(filename) end
@@ -51,6 +53,7 @@ function love.joystick.saveGamepadMappings(filename) end
---
---The virtual gamepad buttons and axes are designed around the Xbox 360 controller layout.
---
+---@overload fun(guid: string, axis: love.GamepadAxis, inputtype: love.JoystickInputType, inputindex: number, hatdir: love.JoystickHat):boolean
---@param guid string # The OS-dependent GUID for the type of Joystick the binding will affect.
---@param button love.GamepadButton # The virtual gamepad button to bind.
---@param inputtype love.JoystickInputType # The type of input to bind the virtual gamepad button to.
@@ -118,6 +121,7 @@ function Joystick:getGamepadAxis(axis) end
---
---Gets the button, axis or hat that a virtual gamepad input is bound to.
---
+---@overload fun(button: love.GamepadButton):love.JoystickInputType, number, love.JoystickHat
---@param axis love.GamepadAxis # The virtual gamepad axis to get the binding for.
---@return love.JoystickInputType inputtype # The type of input the virtual gamepad axis is bound to.
---@return number inputindex # The index of the Joystick's button, axis or hat that the virtual gamepad axis is bound to.
@@ -204,6 +208,8 @@ function Joystick:isVibrationSupported() end
---
---Sets the vibration motor speeds on a Joystick with rumble support. Most common gamepads have this functionality, although not all drivers give proper support. Use Joystick:isVibrationSupported to check.
---
+---@overload fun():boolean
+---@overload fun(left: number, right: number, duration: number):boolean
---@param left number # Strength of the left vibration motor on the Joystick. Must be in the range of 1.
---@param right number # Strength of the right vibration motor on the Joystick. Must be in the range of 1.
---@return boolean success # True if the vibration was successfully applied, false if not.
diff --git a/meta/3rd/love2d/library/love.keyboard.lua b/meta/3rd/love2d/library/love.keyboard.lua
index a7d7cb57..cbe7e137 100644
--- a/meta/3rd/love2d/library/love.keyboard.lua
+++ b/meta/3rd/love2d/library/love.keyboard.lua
@@ -49,6 +49,7 @@ function love.keyboard.hasTextInput() end
---
---Checks whether a certain key is down. Not to be confused with love.keypressed or love.keyreleased.
---
+---@overload fun(key: love.KeyConstant, ...: love.KeyConstant):boolean
---@param key love.KeyConstant # The key to check.
---@return boolean down # True if the key is down, false if not.
function love.keyboard.isDown(key) end
@@ -73,6 +74,7 @@ function love.keyboard.setKeyRepeat(enable) end
---
---On touch devices, this shows the system's native on-screen keyboard when it's enabled.
---
+---@overload fun(enable: boolean, x: number, y: number, w: number, h: number)
---@param enable boolean # Whether text input events should be enabled.
function love.keyboard.setTextInput(enable) end
diff --git a/meta/3rd/love2d/library/love.math.lua b/meta/3rd/love2d/library/love.math.lua
index be8fdf8a..2eafb9b7 100644
--- a/meta/3rd/love2d/library/love.math.lua
+++ b/meta/3rd/love2d/library/love.math.lua
@@ -27,6 +27,7 @@ function love.math.colorToBytes() end
---
---Compresses a string or data using a specific compression algorithm.
---
+---@overload fun(data: love.Data, format: love.CompressedDataFormat, level: number):love.CompressedData
---@param rawstring string # The raw (un-compressed) string to compress.
---@param format love.CompressedDataFormat # The format to use when compressing the string.
---@param level number # The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used.
@@ -36,6 +37,8 @@ function love.math.compress(rawstring, format, level) end
---
---Decompresses a CompressedData or previously compressed string or Data object.
---
+---@overload fun(compressedstring: string, format: love.CompressedDataFormat):string
+---@overload fun(data: love.Data, format: love.CompressedDataFormat):string
---@param compressedData love.CompressedData # The compressed data to decompress.
---@return string rawstring # A string containing the raw decompressed data.
function love.math.decompress(compressedData) end
@@ -47,6 +50,8 @@ function love.math.decompress(compressedData) end
---
---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(color: table):number, number, number
+---@overload fun(c: number):number
---@return number lr # The red channel of the converted color in linear RGB space.
---@return number lg # The green channel of the converted color in linear RGB space.
---@return number lb # The blue channel of the converted color in linear RGB space.
@@ -74,6 +79,7 @@ function love.math.getRandomState() end
---
---PolygonShapes in love.physics, some forms of Meshes, and polygons drawn with love.graphics.polygon must be simple convex polygons.
---
+---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):boolean
---@param vertices table # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}.
---@return boolean convex # Whether the given polygon is convex.
function love.math.isConvex(vertices) end
@@ -87,6 +93,8 @@ function love.math.isConvex(vertices) end
---
---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
---
+---@overload fun(color: table):number, number, number
+---@overload fun(lc: number):number
---@param lr number # The red channel of the linear RGB color to convert.
---@param lg number # The green channel of the linear RGB color to convert.
---@param lb number # The blue channel of the linear RGB color to convert.
@@ -100,6 +108,7 @@ function love.math.linearToGamma(lr, lg, lb) end
---
---The number of vertices in the control polygon determines the degree of the curve, e.g. three vertices define a quadratic (degree 2) Bézier curve, four vertices define a cubic (degree 3) Bézier curve, etc.
---
+---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):love.BezierCurve
---@param vertices table # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}.
---@return love.BezierCurve curve # A Bézier curve object.
function love.math.newBezierCurve(vertices) end
@@ -107,12 +116,15 @@ function love.math.newBezierCurve(vertices) end
---
---Creates a new RandomGenerator object which is completely independent of other RandomGenerator objects and random functions.
---
+---@overload fun(seed: number):love.RandomGenerator
+---@overload fun(low: number, high: number):love.RandomGenerator
---@return love.RandomGenerator rng # The new Random Number Generator object.
function love.math.newRandomGenerator() end
---
---Creates a new Transform object.
---
+---@overload fun(x: number, y: number, angle: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number):love.Transform
---@return love.Transform transform # The new Transform object.
function love.math.newTransform() end
@@ -123,12 +135,17 @@ function love.math.newTransform() end
---
---There are many webpages which discuss Perlin and Simplex noise in detail.
---
+---@overload fun(x: number, y: number):number
+---@overload fun(x: number, y: number, z: number):number
+---@overload fun(x: number, y: number, z: number, w: number):number
---@return number value # The noise value in the range of 1.
function love.math.noise() end
---
---Generates a pseudo-random number in a platform independent manner. The default love.run seeds this function at startup, so you generally don't need to seed it yourself.
---
+---@overload fun(max: number):number
+---@overload fun(min: number, max: number):number
---@return number number # The pseudo-random number.
function love.math.random() end
@@ -143,6 +160,7 @@ function love.math.randomNormal(stddev, mean) end
---
---Sets the seed of the random number generator using the specified integer number. This is called internally at startup, so you generally don't need to call it yourself.
---
+---@overload fun(low: number, high: number)
---@param seed number # The integer number with which you want to seed the randomization. Must be within the range of 2^53 - 1.
function love.math.setRandomSeed(seed) end
@@ -157,6 +175,7 @@ function love.math.setRandomState(state) end
---
---Decomposes a simple convex or concave polygon into triangles.
---
+---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):table
---@param polygon table # Polygon to triangulate. Must not intersect itself.
---@return table triangles # List of triangles the polygon is composed of, in the form of {{x1, y1, x2, y2, x3, y3}, {x1, y1, x2, y2, x3, y3}, ...}.
function love.math.triangulate(polygon) end
@@ -297,6 +316,8 @@ function RandomGenerator:getState() end
---
---Generates a pseudo-random number in a platform independent manner.
---
+---@overload fun(max: number):number
+---@overload fun(min: number, max: number):number
---@return number number # The pseudo-random number.
function RandomGenerator:random() end
@@ -311,6 +332,7 @@ function RandomGenerator:randomNormal(stddev, mean) end
---
---Sets the seed of the random number generator using the specified integer number.
---
+---@overload fun(low: number, high: number)
---@param seed number # The integer number with which you want to seed the randomization. Must be within the range of 2^53.
function RandomGenerator:setSeed(seed) end
@@ -402,6 +424,9 @@ function Transform:scale(sx, sy) end
---
---Directly sets the Transform's internal 4x4 transformation matrix.
---
+---@overload fun(layout: love.MatrixLayout, e1_1: number, e1_2: number, ...: number, e4_4: number):love.Transform
+---@overload fun(layout: love.MatrixLayout, matrix: table):love.Transform
+---@overload fun(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.
---@param e4_4 number # The fourth column of the fourth row of the matrix.
diff --git a/meta/3rd/love2d/library/love.mouse.lua b/meta/3rd/love2d/library/love.mouse.lua
index 76f85a74..d25808ba 100644
--- a/meta/3rd/love2d/library/love.mouse.lua
+++ b/meta/3rd/love2d/library/love.mouse.lua
@@ -82,6 +82,8 @@ function love.mouse.isVisible() end
---
---The hot spot is the point the operating system uses to determine what was clicked and at what position the mouse cursor is. For example, the normal arrow pointer normally has its hot spot at the top left of the image, but a crosshair cursor might have it in the middle.
---
+---@overload fun(filename: string, hotx: number, hoty: number):love.Cursor
+---@overload fun(fileData: love.FileData, hotx: number, hoty: number):love.Cursor
---@param imageData love.ImageData # The ImageData to use for the new Cursor.
---@param hotx number # The x-coordinate in the ImageData of the cursor's hot spot.
---@param hoty number # The y-coordinate in the ImageData of the cursor's hot spot.
@@ -91,6 +93,7 @@ function love.mouse.newCursor(imageData, hotx, hoty) end
---
---Sets the current mouse cursor.
---
+---@overload fun()
---@param cursor love.Cursor # The Cursor object to use as the current mouse cursor.
function love.mouse.setCursor(cursor) end
diff --git a/meta/3rd/love2d/library/love.physics.lua b/meta/3rd/love2d/library/love.physics.lua
index 21055ea0..5c382108 100644
--- a/meta/3rd/love2d/library/love.physics.lua
+++ b/meta/3rd/love2d/library/love.physics.lua
@@ -49,6 +49,7 @@ function love.physics.newBody(world, type) end
---
---Creates a new ChainShape.
---
+---@overload fun(loop: boolean, points: table):love.ChainShape
---@param loop boolean # If the chain should loop back to the first point.
---@param x1 number # The x position of the first point.
---@param y1 number # The y position of the first point.
@@ -60,6 +61,7 @@ function love.physics.newChainShape(loop, x1, y1, x2, y2) end
---
---Creates a new CircleShape.
---
+---@overload fun(x: number, y: number, radius: number):love.CircleShape
---@param radius number # The radius of the circle.
---@return love.CircleShape shape # The new shape.
function love.physics.newCircleShape(radius) end
@@ -103,6 +105,7 @@ function love.physics.newFixture(body, shape, density) end
---
---Create a friction joint between two bodies. A FrictionJoint applies friction to a body.
---
+---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean):love.FrictionJoint
---@param body1 love.Body # The first body to attach to the joint.
---@param body2 love.Body # The second body to attach to the joint.
---@param collideConnected boolean # Specifies whether the two bodies should collide with each other.
@@ -128,6 +131,7 @@ function love.physics.newGearJoint(joint1, joint2, ratio, collideConnected) end
---
---Position and rotation offsets can be specified once the MotorJoint has been created, as well as the maximum motor force and torque that will be be applied to reach the target offsets.
---
+---@overload fun(body1: love.Body, body2: love.Body, correctionFactor: number, collideConnected: boolean):love.MotorJoint
---@param body1 love.Body # The first body to attach to the joint.
---@param body2 love.Body # The second body to attach to the joint.
---@param correctionFactor number # The joint's initial position correction factor, in the range of 1.
@@ -150,6 +154,7 @@ function love.physics.newMouseJoint(body) end
---
---This shape can have 8 vertices at most, and must form a convex shape.
---
+---@overload fun(vertices: table):love.PolygonShape
---@param x1 number # The x position of the first point.
---@param y1 number # The y position of the first point.
---@param x2 number # The x position of the second point.
@@ -164,6 +169,8 @@ function love.physics.newPolygonShape(x1, y1, x2, y2, x3, y3) end
---
---A prismatic joint constrains two bodies to move relatively to each other on a specified axis. It does not allow for relative rotation. Its definition and operation are similar to a revolute joint, but with translation and force substituted for angle and torque.
---
+---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected: boolean):love.PrismaticJoint
+---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected: boolean, referenceAngle: number):love.PrismaticJoint
---@param body1 love.Body # The first body to connect with a prismatic joint.
---@param body2 love.Body # The second body to connect with a prismatic joint.
---@param ax number # The x coordinate of the axis vector.
@@ -199,6 +206,7 @@ function love.physics.newPulleyJoint(body1, body2, gx1, gy1, gx2, gy2, x1, y1, x
---
---By default, the local origin is located at the '''center''' of the rectangle as opposed to the top left for graphics.
---
+---@overload fun(x: number, y: number, width: number, height: number, angle: number):love.PolygonShape
---@param width number # The width of the rectangle.
---@param height number # The height of the rectangle.
---@return love.PolygonShape shape # A new PolygonShape.
@@ -209,6 +217,7 @@ function love.physics.newRectangleShape(width, height) end
---
---This joint connects two bodies to a point around which they can pivot.
---
+---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean, referenceAngle: number):love.RevoluteJoint
---@param body1 love.Body # The first body.
---@param body2 love.Body # The second body.
---@param collideConnected boolean # Specifies whether the two bodies should collide with each other.
@@ -232,6 +241,8 @@ function love.physics.newRopeJoint(body1, body2, x1, y1, x2, y2, maxLength, coll
---
---Creates a constraint joint between two bodies. A WeldJoint essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver.
---
+---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean):love.WeldJoint
+---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected: boolean, referenceAngle: number):love.WeldJoint
---@param body1 love.Body # The first body to attach to the joint.
---@param body2 love.Body # The second body to attach to the joint.
---@param collideConnected boolean # Specifies whether the two bodies should collide with each other.
@@ -241,6 +252,7 @@ function love.physics.newWeldJoint(body1, body2, collideConnected) end
---
---Creates a wheel joint.
---
+---@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected: boolean):love.WheelJoint
---@param body1 love.Body # The first body.
---@param body2 love.Body # The second body.
---@param ax number # The x position of the axis unit vector.
@@ -291,6 +303,7 @@ function Body:applyAngularImpulse(impulse) end
---
---Note that the force components and position must be given in world coordinates.
---
+---@overload fun(fx: number, fy: number, x: number, y: number)
---@param fx number # The x component of force to apply to the center of mass.
---@param fy number # The y component of force to apply to the center of mass.
function Body:applyForce(fx, fy) end
@@ -306,6 +319,7 @@ function Body:applyForce(fx, fy) end
---
---Note that the impulse components and position must be given in world coordinates.
---
+---@overload fun(ix: number, iy: number, x: number, y: number)
---@param ix number # The x component of the impulse applied to the center of mass.
---@param iy number # The y component of the impulse applied to the center of mass.
function Body:applyLinearImpulse(ix, iy) end
diff --git a/meta/3rd/love2d/library/love.sound.lua b/meta/3rd/love2d/library/love.sound.lua
index 9c51e28d..8e1786e8 100644
--- a/meta/3rd/love2d/library/love.sound.lua
+++ b/meta/3rd/love2d/library/love.sound.lua
@@ -9,6 +9,7 @@ love.sound = {}
---
---Attempts to find a decoder for the encoded sound data in the specified file.
---
+---@overload fun(filename: string, buffer: number):love.Decoder
---@param file love.File # The file with encoded sound data.
---@param buffer number # The size of each decoded chunk, in bytes.
---@return love.Decoder decoder # A new Decoder object.
@@ -19,6 +20,9 @@ function love.sound.newDecoder(file, buffer) end
---
---The sound data will be decoded to the memory in a raw format. It is recommended to create only short sounds like effects, as a 3 minute song uses 30 MB of memory this way.
---
+---@overload fun(file: love.File):love.SoundData
+---@overload fun(decoder: love.Decoder):love.SoundData
+---@overload fun(samples: number, rate: number, bits: number, channels: number):love.SoundData
---@param filename string # The file name of the file to load.
---@return love.SoundData soundData # A new SoundData object.
function love.sound.newSoundData(filename) end
@@ -90,6 +94,7 @@ function SoundData:getDuration() end
---
---Gets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order.
---
+---@overload fun(i: number, channel: number):number
---@return number sample # The normalized samplepoint (range -1.0 to 1.0).
function SoundData:getSample() end
@@ -108,5 +113,6 @@ function SoundData:getSampleRate() end
---
---Sets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order.
---
+---@overload fun(i: number, channel: number, sample: number)
---@param sample number # The normalized samplepoint (range -1.0 to 1.0).
function SoundData:setSample(sample) end
diff --git a/meta/3rd/love2d/library/love.thread.lua b/meta/3rd/love2d/library/love.thread.lua
index 3551559e..64769edb 100644
--- a/meta/3rd/love2d/library/love.thread.lua
+++ b/meta/3rd/love2d/library/love.thread.lua
@@ -30,6 +30,8 @@ function love.thread.newChannel() end
---
---Creates a new Thread from a filename, string or FileData object containing Lua code.
---
+---@overload fun(fileData: love.FileData):love.Thread
+---@overload fun(codestring: string):love.Thread
---@param filename string # The name of the Lua file to use as the source.
---@return love.Thread thread # A new Thread that has yet to be started.
function love.thread.newThread(filename) end
@@ -50,6 +52,7 @@ function Channel:clear() end
---
---It waits until a message is in the queue then returns the message value.
---
+---@overload fun(timeout: number):any
---@return any value # The contents of the message.
function Channel:demand() end
@@ -108,6 +111,7 @@ function Channel:push(value) end
---
---See Variant for the list of supported types.
---
+---@overload fun(value: any, timeout: number):boolean
---@param value any # The contents of the message.
---@return boolean success # Whether the message was successfully supplied (always true).
function Channel:supply(value) end
@@ -137,6 +141,7 @@ function Thread:isRunning() end
---
---Beginning with version 0.9.0, threads can be restarted after they have completed their execution.
---
+---@overload fun(arg1: any, arg2: any, ...: any)
function Thread:start() end
---
diff --git a/meta/3rd/love2d/library/love.video.lua b/meta/3rd/love2d/library/love.video.lua
index 3305ec77..501101fa 100644
--- a/meta/3rd/love2d/library/love.video.lua
+++ b/meta/3rd/love2d/library/love.video.lua
@@ -11,6 +11,7 @@ love.video = {}
---
---Creates a new VideoStream. Currently only Ogg Theora video files are supported. VideoStreams can't draw videos, see love.graphics.newVideo for that.
---
+---@overload fun(file: love.File):love.VideoStream
---@param filename string # The file path to the Ogg Theora video file.
---@return love.VideoStream videostream # A new VideoStream.
function love.video.newVideoStream(filename) end
diff --git a/meta/3rd/love2d/library/love.window.lua b/meta/3rd/love2d/library/love.window.lua
index dd219d79..dc45f1d7 100644
--- a/meta/3rd/love2d/library/love.window.lua
+++ b/meta/3rd/love2d/library/love.window.lua
@@ -20,6 +20,7 @@ function love.window.close() end
---
---Most LÖVE functions return values and expect arguments in terms of pixels rather than density-independent units.
---
+---@overload fun(px: number, py: number):number, number
---@param pixelvalue number # A number in pixels to convert to density-independent units.
---@return number value # The converted number, in density-independent units.
function love.window.fromPixels(pixelvalue) end
@@ -201,6 +202,7 @@ function love.window.setDisplaySleepEnabled(enable) end
---
---Enters or exits fullscreen. The display to use when entering fullscreen is chosen based on which display the window is currently in, if multiple monitors are connected.
---
+---@overload fun(fullscreen: boolean, fstype: love.FullscreenType):boolean
---@param fullscreen boolean # Whether to enter or exit fullscreen mode.
---@return boolean success # True if an attempt to enter fullscreen was successful, false otherwise.
function love.window.setFullscreen(fullscreen) end
@@ -248,6 +250,7 @@ function love.window.setVSync(vsync) end
---
---Displays a message box dialog above the love window. The message box contains a title, optional text, and buttons.
---
+---@overload fun(title: string, message: string, buttonlist: table, type: love.MessageBoxType, attachtowindow: boolean):number
---@param title string # The title of the message box.
---@param message string # The text inside the message box.
---@param type love.MessageBoxType # The type of the message box.
@@ -264,6 +267,7 @@ function love.window.showMessageBox(title, message, type, attachtowindow) end
---
---Most LÖVE functions return values and expect arguments in terms of pixels rather than density-independent units.
---
+---@overload fun(x: number, y: number):number, number
---@param value number # A number in density-independent units to convert to pixels.
---@return number pixelvalue # The converted number, in pixels.
function love.window.toPixels(value) end