Commit Graph

169 Commits (master)

Author SHA1 Message Date
uramer 2107bbc01d Reuse input engine handlers in menu scripts 12 months ago
uramer 962ecc4329 Allow menu scripts to read global sections while a game is loaded 12 months ago
uramer d1268acf95 Merge branch 'master' into menuscripts 12 months ago
uramer e9b48e35c0 Coverity defects 1 year ago
uramer 1d8ee7984f Make input.triggers[] consistent with input.actions[] 1 year ago
uramer 0e2e386dc9 Lua actions take 3 1 year ago
Devin Alexander Torres 8161771969 Add sol::lib::jit to actually enable JIT 1 year ago
uramer c9eaeb47d5 Minor API inconsistencies 1 year ago
Petr Mikheev f5325e11e3 Rename mPermanentCallbacks -> mMenuScriptsCallbacks in LuaUtil::Storage 1 year ago
Petr Mikheev 1dd7a15255 Draft: add new type of Lua scripts - menu scripts 1 year ago
Kindi c77b88cd38 fix string format 1 year ago
Andrei Kortunov a849a053be Do not copy vector 1 year ago
psi29a 0b74146b05
Merge branch 'luautflib' into 'master'
Lua utf-8 support

Closes #6505

See merge request OpenMW/openmw!3327
1 year ago
Kindi 7eb456a169 refactoring for readability 1 year ago
Kindi 8798217b51 remove const keyword from all string_view 1 year ago
Kindi db287b2bc6 dont use pass by const reference for small types in func arguments 1 year ago
Kindi dd61caa96d using misc::stringutils::format and simplify relativeposition function 1 year ago
Kindi af58b531da change function names and add documentation in overview.rst 1 year ago
Kindi 532230254b add documentation 1 year ago
Kindi 92842cedf5 len,codepoint,offset 1 year ago
Petr Mikheev 87eacf774a Control GUI modes from Lua 1 year ago
Petr Mikheev f86a45d60a [Lua] add __len metafunction for readonly objects 1 year ago
Kindi 6d02c31720 utf8.codes 1 year ago
Kindi d9c102e14d utf8.char 1 year ago
Kindi 8622a6da3b luautf8lib 1 year ago
Andrei Kortunov f5b18d2d5d Do not copy objects twice where possible 1 year ago
elsid 5a0ad8cdd7
Add Morrowind specific tests 1 year ago
Petr Mikheev 3b43cc2aea Lua: change obj.rotation from Euler angles to Quaternion 2 years ago
glassmancody.info a7b7f99d72 Expose game object's bounding box in lua api 2 years ago
psi29a cdc753df70 Merge branch 'lua_refactoring' into 'master'
MWLua refactoring

See merge request OpenMW/openmw!2956
2 years ago
Petr Mikheev 4562b8c06b Add headers for all `.cpp` files in mwlua; move packages initilaization from LuaManager to luabindings.cpp 2 years ago
Petr Mikheev c362b2efa6 Use LuaUtil::cast for casting sol::object to prevent crashing on type mismatch in Lua scripts. 2 years ago
Petr Mikheev 61578ca39b Add function LuaUtil::cast 2 years ago
Petr Mikheev 7b3aa621a4 [Lua] Fix memory leak in sandboxed "require". 2 years ago
Petr Mikheev d0a82437a4 [Lua] Fix memory tracking 2 years ago
psi29a 0f331a4fc5 Merge branch 'lua_callback' into 'master'
Fix potential memory leak in LuaUtil::Callback

See merge request OpenMW/openmw!2733
2 years ago
Petr Mikheev b71eac3e76 Fix #7210 2 years ago
Petr Mikheev 65885d994f Don't expose LuaUtil::Callback to lua 2 years ago
Petr Mikheev 71ba7b88e2 Move asyncpackage from apps/openmw/mwlua to components/lua 2 years ago
elsid c79c14da91
Fix -Wnon-virtual-dtor warnings 2 years ago
uramer c17eedd348 Documentation and API fixes (part of !2529) 2 years ago
Petr Mikheev 95999afefd Apply clang-format to the previous commit 2 years ago
Kindi 07da7eddea Add remap and round to lua utils 2 years ago
Petr Mikheev d9e9db0983 Additional information in Lua profiler 2 years ago
Petr Mikheev b248c3e173 Allow passing `initData` to the :addSript call (#7091) 2 years ago
fteppe 125b21de20 Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID

Slowly going through all the changes to make, still hundreds of errors

a lot of functions/structures use std::string or stringview to designate an ID. So it takes time

Continues slowly replacing ids. There are technically more and more compilation errors

I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type

Continue moving forward, changes to the stores

slowly moving along

Starting to see the fruit of those changes.

still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.

More replacements. Things are starting to get easier

I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.

Still moving forward, and for the first time error count is going down!

Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably

Cells are back to using string for the name, haven't fixed everything yet. Many other changes

Under the bar of 400 compilation errors.

more good progress <100 compile errors!

More progress

Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string

some more progress on other fronts

Mostly game settings clean

one error opened a lot of other errors. Down to 18, but more will prbably appear

only link errors left??

Fixed link errors

OpenMW compiles, and launches, with some issues, but still!
2 years ago
Petr Mikheev 55db95d4cf Update Lua profiler; add ability to run OpenMW with old LuaJit that doesn't allow custom allocator (Lua profiler will be disabled in this case) 2 years ago
Petr Mikheev 6fa65e4729 Track memory and CPU usage per script in LuaUtil::LuaState 2 years ago
uramer a2fa1fe0a5 Execute async callbacks on the main Lua stack 2 years ago
Petr Mikheev 3697c9266b Separate l10n manager from lua 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
psi29a ce90484898 Merge branch 'fix_lua_color' into 'openmw-48'
Make r, g, b, a read-only properties, rather than getters

See merge request OpenMW/openmw!2380

(cherry picked from commit 85f343e87a)

19d01f26 Make r, g, b, a read-only properties, rather than getters
2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
Andrei Kortunov e3ad30a517 Do not copy data when it is not needed 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
ζeh Matt 764d34362e
Type forward VFS::Manager in luastate.hpp and l10n.hpp 2 years ago
Andrei Kortunov ccbb5e03fb Use YAML files to translate MyGUI's localization tags 3 years ago
elsid 316f666e77
Avoid constructing icu::StringPiece from std::string directly
Otherwise it causes a crash on Windows when OpenMW is built in debug
mode but ICU not.
3 years ago
psi29a 9c1970dce4 Merge branch 'lua_esm' into 'master'
Advanced Lua scripts configuration in omwaddon

See merge request OpenMW/openmw!1947
3 years ago
Petr Mikheev 1240b60a24 Console command `reloadlua` also reloads l10n used by Lua scripts 3 years ago
Petr Mikheev a70d5831c5 Lua scripts configuration in omwaddon 3 years ago
Petr Mikheev a4b23aad05 Validate l10n context name 3 years ago
uramer 1fe794d935 Changing setting renderer arguments 3 years ago
psi29a d3f331793e Merge branch 'sol' into 'master'
Update sol. Replace combined sol.hpp with loose files.

See merge request OpenMW/openmw!1851
3 years ago
uramer 22994af728 Fix Lua pairs and ipairs 3 years ago
Petr Mikheev 7ccbf95503 [Lua] makeStrictReadOnly for enums 3 years ago
Petr Mikheev d16fa553c8 Fix LuaUtil::Callback 3 years ago
Petr Mikheev 70c7f1880d [Lua] pairs and ipairs for ObjectList (resolves #6732) 3 years ago
Petr Mikheev eae1e87081 [Lua] Update openmw.storage 3 years ago
Petr Mikheev 45c9635e94 Fix getmetatable, fix pairsForReadonly, add util.loadCode, _G 3 years ago
Benjamin Winger 21ffbcc4b4 Lua i18n updates 3 years ago
Petr Mikheev eca64b48e8 Bitwise operations in Lua 3 years ago
uramer 36c46ada6f Pass unhandled Lua UI events to the parent 3 years ago
uramer a1abc84f59 Implement pairs and ipairs for ui.content and ui.layers. Document all iterable types in a uniform way. 3 years ago
Petr Mikheev 6876851766 Allow `require` to return not a table in Lua 3 years ago
uramer ede9d27437 Element-wise multiplication and division of Lua vectors 3 years ago
Petr Mikheev a294adcdaf Proper support of `pairs` and `ipairs` in Lua; fix bug in `makeReadOnly`. 3 years ago
psi29a 6f7a067e0c Merge branch 'esmrename' into 'master'
esm refactor work

See merge request OpenMW/openmw!1575
3 years ago
Petr Mikheev 067d71f7eb Fix heap use after free in components/lua/storage.cpp 3 years ago
Bret Curtis d1fb854521 move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4
esm typo

esm typo
3 years ago
uramer d1d8f058ac Lua bindings for Colours 3 years ago
uramer c07fb75bf7 Merge branch 'lua_settings' into 'master'
Permanent storage for Lua

See merge request OpenMW/openmw!1489
3 years ago
Petr Mikheev 97d56e198f Use double precision for vectors serialization in Lua 3 years ago
Petr Mikheev a182fdeea1 Permanent storage for Lua data 3 years ago
Petr Mikheev 2d1b100239 Change terminology of gameSecond/gameHour to simulationTime/gameTime 3 years ago
Josquin Frei d9672f7d46 Add serialization for TransformM and TransformQ 3 years ago
Petr Mikheev 6a19a66ae5 Fix #6535 3 years ago
Petr Mikheev 5eca122f04 Avoid creating multiple i18n contexts with the same name. 3 years ago
Petr Mikheev 0f246e7365 Use a separate instance of Lua i18n for every context 3 years ago
Petr Mikheev 7549496162 A few small fixes + expose makeReadOnly to Lua + an option to apply makeReadOnly during deserialize 3 years ago
uramer c865114b9b Lua UI Layers 3 years ago
Petr Mikheev f9136d4392 Support multiple arguments in Lua callbacks. 3 years ago
Petr Mikheev d5ca091d6e Make util.rotateX, util.rotateY, rotate.Z consistent with morrowind rotation 3 years ago
Petr Mikheev c7d6620c35 Add error checking in MWLua::Action 3 years ago
psi29a bd694128b9 Merge branch 'lua_input' into 'master'
Update Lua package openmw.input

See merge request OpenMW/openmw!1356
3 years ago
Evil Eye 6daefe3ddc Cast to the unsigned char expected by cctype functions 3 years ago
Evil Eye f23bd51175 Don't check bounds when the type is unambiguously a char 3 years ago
Evil Eye 751e8cf76b Do a bounds check before calling functions defined in cctype 3 years ago
Petr Mikheev ed85393288 Replace sol::table::create_table_with with a more compiler-friendly implementation. It fixes MSVC error "compiler is out of heap space" and also slightly reduces binary size. 3 years ago