diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index d1dada9b5..4087ca2ee 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -6294,9 +6294,9 @@ function Color:purple() end ---Create a new color - defaults to black ---@return Color function Color:new() end ----@param r Colo +---@param other Color ---@return Color -function Color:new(r) end +function Color:new(other) end ---@param color Color ---@return Color function Color:new(color) end @@ -6335,9 +6335,9 @@ function CustomTheme:new() end Vec2 = nil ---@return Vec2 function Vec2:new() end ----@param 2 Vec +---@param other Vec2 ---@return Vec2 -function Vec2:new(2) end +function Vec2:new(other) end ---@param x_ number ---@param y_ number ---@return Vec2 @@ -6348,9 +6348,9 @@ AABB = nil ---@return AABB function AABB:new() end ---Copy an axis aligned bounding box ----@param B AAB +---@param other AABB ---@return AABB -function AABB:new(B) end +function AABB:new(other) end ---@param top_left Vec2 ---@param bottom_right Vec2 ---@return AABB @@ -6366,9 +6366,9 @@ function AABB:new(left_, top_, right_, bottom_) end Triangle = nil ---@return Triangle function Triangle:new() end ----@param e Triangl +---@param other Triangle ---@return Triangle -function Triangle:new(e) end +function Triangle:new(other) end ---@param _a Vec2 ---@param _b Vec2 ---@param _c Vec2 diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 182146534..1d1cd44a7 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -553,7 +553,7 @@ Axis-Aligned-Bounding-Box, represents for example a hitbox of an entity or the s Type | Name | Description ---- | ---- | ----------- [AABB](#AABB) | [new()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=AABB) | Create a new axis aligned bounding box - defaults to all zeroes -[AABB](#AABB) | [new(AABB)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=AABB) | Copy an axis aligned bounding box +[AABB](#AABB) | [new(AABB other)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=AABB) | Copy an axis aligned bounding box [AABB](#AABB) | [new(Vec2 top_left, Vec2 bottom_right)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=AABB) | [AABB](#AABB) | [new(float left_, float top_, float right_, float bottom_)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=AABB) | Create a new axis aligned bounding box by specifying its values float | [left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left) | @@ -613,7 +613,7 @@ prinspect(string.format("%x"), color:get_ucolor()) -- 800000ff Type | Name | Description ---- | ---- | ----------- [Color](#Color) | [new()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Color) | Create a new color - defaults to black -[Color](#Color) | [new(Color)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Color) | +[Color](#Color) | [new(Color other)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Color) | [Color](#Color) | [new(Color color)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Color) | [Color](#Color) | [new(float r_, float g_, float b_, float a_)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Color) | Create a new color by specifying its values float | [r](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=r) | @@ -909,7 +909,7 @@ int | [row](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=row) | Type | Name | Description ---- | ---- | ----------- [Triangle](#Triangle) | [new()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Triangle) | -[Triangle](#Triangle) | [new(Triangle)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Triangle) | +[Triangle](#Triangle) | [new(Triangle other)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Triangle) | [Triangle](#Triangle) | [new(Vec2 _a, Vec2 _b, Vec2 _c)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Triangle) | [Triangle](#Triangle) | [new(float ax, float ay, float bx, float by, float cx, float cy)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Triangle) | [Vec2](#Vec2) | [A](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=A) | @@ -933,7 +933,7 @@ Simple object to hold pair of coordinates Type | Name | Description ---- | ---- | ----------- [Vec2](#Vec2) | [new()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Vec2) | -[Vec2](#Vec2) | [new(Vec2)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Vec2) | +[Vec2](#Vec2) | [new(Vec2 other)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Vec2) | [Vec2](#Vec2) | [new(float x_, float y_)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=Vec2) | float | [x](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=x) | float | [y](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=y) | diff --git a/src/game_api/color.hpp b/src/game_api/color.hpp index c99ce38fb..5cb196d83 100644 --- a/src/game_api/color.hpp +++ b/src/game_api/color.hpp @@ -9,7 +9,7 @@ struct Color { /// Create a new color - defaults to black constexpr Color() = default; - constexpr Color(const Color&) = default; + constexpr Color(const Color& other) = default; constexpr Color(Color&&) = default; constexpr Color& operator=(const Color&) = default; constexpr Color& operator=(Color&&) = default; diff --git a/src/game_api/math.hpp b/src/game_api/math.hpp index 44300d1ff..f07c6cd22 100644 --- a/src/game_api/math.hpp +++ b/src/game_api/math.hpp @@ -9,7 +9,7 @@ struct Vec2 { Vec2() = default; - Vec2(const Vec2&) = default; + Vec2(const Vec2& other) = default; Vec2(float x_, float y_) : x(x_), y(y_){}; @@ -144,7 +144,7 @@ struct AABB AABB() = default; /// Copy an axis aligned bounding box - AABB(const AABB&) = default; + AABB(const AABB& other) = default; /// NoDoc AABB(const std::tuple tuple) { @@ -289,7 +289,7 @@ struct AABB struct Triangle { Triangle() = default; - Triangle(const Triangle&) = default; + Triangle(const Triangle& other) = default; Triangle(const Vec2& _a, const Vec2& _b, const Vec2& _c) : A(_a), B(_b), C(_c){}; Triangle(float ax, float ay, float bx, float by, float cx, float cy)