Gleb Mazovetskiy
cc0d2e2caf
lua.cpp: Use backslash directory separator
...
Paths going into `FindAsset` are expected to use backslashes
2 years ago
Gleb Mazovetskiy
165f95e38f
Require lua/init.lua to succeed
...
Previously we failed silently if something went wrong.
2 years ago
Gleb Mazovetskiy
3ea4996367
Add a basic Quake-style console
...
Enabled only in Debug mode.
Runs Lua similar to the `lua` CLI.
Supports multiline input with Shift+Enter.
Missing features:
1. Scrollback.
2. Input history on up/down.
Open with backtick, close with Esc.
2 years ago
Gleb Mazovetskiy
de6eac137b
Split up lua bindings a bit
...
```lua
local render = devilutionx.render
local function drawGreet ()
render.string("Hello from " .. _VERSION, 10, 40)
end
Events.OnGameDrawComplete.Add(drawGreet)
```
2 years ago
Gleb Mazovetskiy
ddc3a9e54e
lua: re-enable drawString
2 years ago
Gleb Mazovetskiy
64b94f9661
lua: add log{Verbose,Debug,Warn,Error}
2 years ago
Gleb Mazovetskiy
493aaf554e
Add a lua debug command
...
Ideally we should have a better UI for this in the future.
2 years ago
Gleb Mazovetskiy
5b62bf7eec
Lua improvements
...
1. A conformant `print`.
2. `drawString`.
3. `OnGameDrawComplete` event for drawing things on screen.
2 years ago
Gleb Mazovetskiy
60b12dcb2c
lua: Register globals in a more efficient way
2 years ago
Gleb Mazovetskiy
5c1ff18bd3
`LuaEvent`: Use `traverse_get`
2 years ago
Gleb Mazovetskiy
72b49abef4
Add sol2 for Lua <-> C++ bindings
2 years ago
Anders Jenbo
706010ee45
Add Lua support
2 years ago