Skip to content

Commit

Permalink
update olua to v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongfq committed Sep 22, 2024
1 parent 09f7402 commit de352a3
Show file tree
Hide file tree
Showing 1,090 changed files with 121,468 additions and 52,582 deletions.
30 changes: 30 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"diagnostics.disable": ["redundant-return-value"],
"workspace.library": ["addons"],
"workspace.ignoreDir": [
"tools/lua-bindings/olua/examples/lua",
"frameworks/3rd/",
"src/cclua/3rd"
],
"workspace.ignoreSubmodules": false,
"diagnostics.globals": [
"DEBUG",
"main",
"api_dir",
"autoconf",
"clang",
"codeblock",
"entry",
"exclude_type",
"headers",
"import",
"luacls",
"luaopen",
"macro",
"olua",
"output_dir",
"typeconf",
"typedef",
"typeonly"
]
}
30 changes: 14 additions & 16 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "lua",
"request": "launch",
"name": "build-binding",
"windows": {
"luaexe": "lua.exe"
},
"osx": {
"luaexe": "lua"
},
"stopOnEntry": false,
"cwd": "${workspaceFolder}/tools/lua-bindings",
"program": "build.lua"
},
{
"name": "LuaDebug",
"program": "",
Expand All @@ -22,20 +35,5 @@
]
]
},
{
"type": "LuaHelper-Debug",
"request": "launch",
"name": "LuaPanda",
"description": "通用模式,通常调试项目请选择此模式",
"cwd": "${workspaceFolder}/assets",
"luaFileExtension": "",
"connectionPort": 8818,
"stopOnEntry": true,
"useCHook": true,
"args": ["--workdir", "${workspaceFolder}/assets", "--lua-debug", "luapanda"],
"windows": {"program": "${workspaceFolder}/build/vs-build/bin/cocoslua/Debug/cocoslua.exe"},
"osx": {"program": "${workspaceFolder}/build/mac-build/bin/cocoslua/Debug/cocoslua.app/Contents/MacOS/cocoslua"},
"autoPathMode": true
}
]
}
6 changes: 6 additions & 0 deletions addons/cclua/box2d/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/addon_config.schema.json",
"words": ["%s+-box2d"],
"files": ["box2d"],
"settings": {}
}
50 changes: 50 additions & 0 deletions addons/cclua/box2d/library/b2/AABB.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---AUTO GENERATED, DO NOT MODIFY!
---@meta b2.AABB

---An axis aligned bounding box.
---@class b2.AABB
---@field center b2.Vec2 Get the center of the AABB.
---@field extents b2.Vec2 Get the extents of the AABB (half-widths).
---@field perimeter number Get the perimeter length
---@field valid boolean Verify that the bounds are sorted.
---@field lowerBound b2.Vec2
---@field upperBound b2.Vec2
local AABB = {}

---@return any
function AABB:__gc() end

---Combine an AABB into this one.
---@param aabb b2.AABB
---
---Combine two AABBs into this one.
---@overload fun(self: b2.AABB, aabb1: b2.AABB, aabb2: b2.AABB)
function AABB:combine(aabb) end

---Does this aabb contain the provided AABB.
---@param aabb b2.AABB
---@return boolean
function AABB:contains(aabb) end

---Get the center of the AABB.
---@return b2.Vec2
function AABB:getCenter() end

---Get the extents of the AABB (half-widths).
---@return b2.Vec2
function AABB:getExtents() end

---Get the perimeter length
---@return number
function AABB:getPerimeter() end

---Verify that the bounds are sorted.
---@return boolean
function AABB:isValid() end

---@param output b2.RayCastOutput
---@param input b2.RayCastInput
---@return boolean
function AABB:rayCast(output, input) end

return AABB
Loading

0 comments on commit de352a3

Please sign in to comment.