Andrei Kortunov
7e2aedf637
Add an initial Qt6 support
2023-02-06 18:38:59 +04:00
Bret Curtis
a708fb4a5c
make sure lua works with macos packages
2023-02-06 14:35:22 +01:00
Andrei Kortunov
8925f854e7
Fix non-ASCII path logging
2023-02-06 15:12:24 +04:00
Andrei Kortunov
5836d27928
Fix ContentSelector usage with non-ASCII paths
2023-02-06 13:36:02 +04:00
psi29a
4032c447e9
Merge branch 'load-ESM4-Cell' into 'master'
...
Can load and coc into an interrior oblivion cell
See merge request OpenMW/openmw!2647
2023-02-06 08:56:23 +00:00
glassmancody.info
e778ffee9b
po2 scaling for average luminance
2023-02-05 12:30:38 -08:00
elsid
e92ada09af
Replace QRegExp by QRegularExpression
2023-02-05 13:30:26 +01:00
AnyOldName3
80d6f6bc97
Add line break that clang-format wanted
2023-02-05 02:07:00 +00:00
AnyOldName3
0edc8fc77d
Don't use FFP-friendly texture image units for shadow maps
...
This more-or-less gets rid of the shadow system's only depencency on FFP
stuff. All that remains is it using OSG cameras, which OSG provides a
uniform-based implementation of, too, which we can trivially migrate to.
This should mean we're not eating any of the ~8 FPP-friendly texture
units, which is good as Morrowind models can use all of those on their
(although they very rarely do), and instead use some of the ~160
shader-only texture image units. This just requires not calling
glEnable(GL_TEXTURE_2D), accomplished by changing
setTextureAttributeAndModes to setTextureAttribute.
Also changes from using glTexGen and its eye plane matrices to pass the
shadow space matrix for each light to explicit uniforms. Thankfully, the
maths was a simple combination of the valid region matrix and eye plane
matrix maths.
As of this commit, I believe this kills shadows in one eye for stereo
rendering.
2023-02-05 00:40:33 +00:00
psi29a
aee7716c3a
Merge branch 'launcher_typed_settings' into 'master'
...
Typed launcher settings
See merge request OpenMW/openmw!2650
2023-02-04 23:41:59 +00:00
florent.teppe
084207af64
Avoids a lot a special cases for ESM3 vs ESM4 cells.
2023-02-04 23:25:06 +01:00
florent.teppe
1caed2de2a
Applies some review comments.
...
Proper visit for ESM::CellVariant
Fixed MWWorldCell constructor
2023-02-04 17:09:54 +01:00
elsid
f1dbd9b959
Fix -Wduplicated-branches warnings
2023-02-04 00:10:30 +01:00
elsid
c79c14da91
Fix -Wnon-virtual-dtor warnings
2023-02-03 23:00:09 +01:00
psi29a
00978ed7a4
Merge branch 'wherefore_art_thou_horatius' into 'master'
...
Fix global variable replacement in dialogue
Closes #7197
See merge request OpenMW/openmw!2675
2023-02-01 23:38:32 +00:00
psi29a
68b3b90255
Merge branch 'ui_content_leak' into 'master'
...
Move implementation of UI Content to Lua (#7155 )
See merge request OpenMW/openmw!2661
2023-02-01 22:51:47 +00:00
Evil Eye
8d2b5ed8ee
Combine initializer_lists
2023-02-01 22:27:22 +01:00
Evil Eye
d3bc79e9b2
Reduce code duplication
2023-02-01 21:57:50 +01:00
Evil Eye
32ac7406ab
Fix global variable replacement in dialogue
2023-02-01 17:49:11 +01:00
Evil Eye
571e11cd42
Restore 0936d716d96cd45b3efc2d1a3697614f7f96952d
2023-02-01 17:26:39 +01:00
uramer
e96681151c
Get rid of the LuaUI::Content namespace
2023-02-01 17:18:50 +01:00
uramer
d24c506b0e
Move metatable protection asserts to tests
2023-02-01 16:34:32 +01:00
uramer
2a35bae655
Use range_error for invalid indexes
2023-02-01 16:24:58 +01:00
uramer
fb0646dda1
Remove Ui Content counter in Lua profiler
2023-01-31 19:52:28 +01:00
uramer
bbbef96087
Switch to loadInternalLib
2023-01-31 19:50:33 +01:00
uramer
c7b0c0a406
Protecd UI Content's metatable
2023-01-30 23:22:18 +01:00
florent.teppe
4e7cde5d72
applied some review changes.
...
crashfix tests
2023-01-30 20:49:34 +01:00
psi29a
92f88c16a9
Merge branch 'remove-strerror' into 'master'
...
Remove strerror usages
Closes #7151
See merge request OpenMW/openmw!2664
2023-01-30 17:09:39 +00:00
psi29a
bc90636316
Merge branch 'fix-7117' into 'master'
...
Replace boost::scoped_array with std::vector
Closes #7117
See merge request OpenMW/openmw!2662
2023-01-30 14:12:04 +00:00
psi29a
ef0a81e811
Merge branch 'integration_tests_crash_log' into 'master'
...
Use proper log paths and print crash log in integration tests CI job
See merge request OpenMW/openmw!2668
2023-01-30 12:12:21 +00:00
Petr Mikheev
3096111abb
Merge branch 'docs_fixes' into 'master'
...
Documentation and API fixes (part of !2529 )
See merge request OpenMW/openmw!2649
2023-01-30 10:13:26 +00:00
uramer
c17eedd348
Documentation and API fixes (part of !2529 )
2023-01-30 10:13:26 +00:00
elsid
c44bc5ade5
Setup logging with properly initialized configuration manager
...
Default constructed instance may provide different paths from initialized one.
2023-01-30 09:30:55 +01:00
elsid
007ad4e4d1
Write crash log to temporary directory
...
To make sure current user has rights to do so.
2023-01-30 09:30:55 +01:00
Andrzej Głuszak
9b0a499b58
Remove strerror usages
2023-01-29 22:41:59 +01:00
Andrzej Głuszak
c9e5f0208d
Replace boost::scoped_array with std::vector
2023-01-29 20:40:07 +01:00
uramer
259f104311
Clean up
2023-01-29 19:40:13 +01:00
uramer
749c89e26e
Add missing to_string
2023-01-29 19:28:54 +01:00
uramer
3618b3f409
Fix Content::View::remove
2023-01-29 18:52:18 +01:00
uramer
fc1430af95
Move implementation of UI Content to Lua
2023-01-29 17:07:38 +01:00
psi29a
3a9a60a453
Merge branch 'esmtool_esm4_globals' into 'master'
...
Support more fields in esmtool for ESM4
See merge request OpenMW/openmw!2659
2023-01-29 11:30:01 +00:00
florent.teppe
ebfee18e35
implements std::visit for CellVariant, fixes struct vs class forward decl
2023-01-29 11:28:39 +01:00
florent.teppe
aa29f86efe
fixed struct vs class.
2023-01-29 10:59:39 +01:00
elsid
d541436b15
Support parent, type and value fields in esmtool for ESM4
2023-01-29 03:02:00 +01:00
elsid
e7acced5e9
Move metafunctions to check ESM4 field existence to a separate header
2023-01-29 03:00:48 +01:00
elsid
5bb088218e
Restore original formId
...
To make sure esmtool prints original value and not a result of conversion.
2023-01-29 02:35:06 +01:00
florent.teppe
f9da66e9ee
Greatly improved how the variant on MWWorld::CellRef works
2023-01-28 18:57:55 +01:00
florent.teppe
216ca71149
Applied review comments
...
getEditorName => getNameId
restored cosntructor in CoordinateConverter
2023-01-28 12:14:00 +01:00
florent.teppe
e6e27413d9
gives MWWorld::CellRef the MWWorld::Cell treatment
...
MWWorld::CellRef now has a variant, and datas that are part of the intersection of both ESM4::Reference and ESM::CellRef are part of MWWorld::CellRef
For ESM4 most data isn't filled in, so it returns default values.
2023-01-27 19:40:45 +01:00
elsid
8be2fc9fd7
Stop updating navmeshtool progress on first bad message
2023-01-27 19:10:53 +01:00
florent.teppe
23614ae2ae
Renamed esm3esm4bridge => esmbridge
2023-01-27 18:40:15 +01:00
florent.teppe
5037dcf9bc
Fixes a crash on launch and some compile issue
...
also uses std::visit in cellstore comparison to avoid missing combinasion
split loadrefs in loadref of ESM4 and ESM3.
2023-01-27 16:41:00 +01:00
florent.teppe
cb8cdd8831
ESM::CellVariant aans MWWorld:Cell now take reference in constructor: signals that nullptr isn't accepted.
...
also applied other review comments.
2023-01-27 14:07:50 +01:00
florent.teppe
531e55e04c
Better handling of the esm3 vs esm4 cell problem
...
Common attribute are in one structure that has two constructors, one for ESM3 vs ESM4 Cell
Mood part of MWWorld::Cell
2023-01-27 13:39:39 +01:00
elsid
cf75363290
Typed launcher settings
...
QMultiMap is not clear about what settings exist and it's not efficient way to
access them after they are loaded.
2023-01-27 12:42:05 +01:00
elsid
0961720835
Join path components using path::operator/ instead of string::operator+
2023-01-27 01:07:15 +01:00
florent.teppe
3515c8e61a
Static references are created as refcells, nothing displayed yet.
2023-01-26 22:37:32 +01:00
florent.teppe
c896a2ca48
Crashfix on launch
2023-01-26 22:37:32 +01:00
florent.teppe
0018bcf7de
Should make cellvariant safer to use.
...
Hopefully clang tidy agrees.
2023-01-26 22:37:32 +01:00
florent.teppe
e81e278363
Implements some cell params + linux compile fix
2023-01-26 22:37:31 +01:00
florent.teppe
562e129bd0
encapsulations of esm3 cell and esm4 cells.
2023-01-26 22:37:31 +01:00
florent.teppe
08b68fcd48
Cannot load a cell yet, but getting more necessary parts in
2023-01-26 22:36:11 +01:00
Evil Eye
d40a9ec5bc
Use worldspace coords in AiWanderStorage
2023-01-23 21:06:50 +01:00
psi29a
1422053fa9
Merge branch 'more_uniforms' into 'master'
...
[Postprocessing] Add sky and ambient colors
See merge request OpenMW/openmw!2638
2023-01-21 22:42:21 +00:00
psi29a
eb853b1315
Merge branch 'ptmikheev-master-patch-34687' into 'master'
...
Fix constexprant
See merge request OpenMW/openmw!2643
2023-01-21 22:42:03 +00:00
Petr Mikheev
24ef6d29d4
Fix constexprant
2023-01-21 21:58:17 +00:00
florent.teppe
a4137e941c
std::string_view can be used in map and unordered map
...
This avoids some unecessary dynamic allocations.
Also applies some review advice.
2023-01-21 19:19:26 +01:00
florent.teppe
63e44eddc9
Navigator doesn't use RefId anymore
2023-01-21 18:39:57 +01:00
florent.teppe
150e2ba885
Revert "Use ESM::RefId for worldspace in detournavigator"
...
This reverts commit b4ab153418
.
# Conflicts:
# apps/navmeshtool/worldspacedata.cpp
2023-01-21 18:39:57 +01:00
florent.teppe
3780033837
Reverts Cell name to a string
2023-01-21 18:39:42 +01:00
glassmancody.info
564c408663
expose more uniforms to postprocessing
2023-01-20 17:43:54 -08:00
Petr Mikheev
95999afefd
Apply clang-format to the previous commit
2023-01-20 23:44:12 +01:00
Petr Mikheev
ca48b778c3
Merge branch 'addutils' into 'master'
...
Add remap and round to lua utils
See merge request OpenMW/openmw!2605
2023-01-20 22:28:34 +00:00
Kindi
07da7eddea
Add remap and round to lua utils
2023-01-20 22:28:34 +00:00
elsid
dd89403df0
Move ensureUtf8Encoding to named namespace
...
To follow https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#sf21-dont-use-an-unnamed-anonymous-namespace-in-a-header
Add QtGlobal include to define QT_VERSION and QT_VERSION_CHECK macroses before
they're used.
2023-01-18 22:58:35 +01:00
psi29a
ee980721b8
Merge branch 'debug_lua_memory' into 'master'
...
Additional information in Lua profiler
See merge request OpenMW/openmw!2612
2023-01-18 14:33:05 +00:00
psi29a
fbeacc1e0f
Merge branch 'navigator_check_agent_bounds' into 'master'
...
Check agent bounds on adding agent to navigator
See merge request OpenMW/openmw!2629
2023-01-18 14:31:22 +00:00
psi29a
54c18ea86d
Merge branch 'change-const-to-constexpr' into 'master'
...
change const to constexpr
Closes #6797
See merge request OpenMW/openmw!2630
2023-01-18 14:30:36 +00:00
elsid
cf1d8544e3
Check agent bounds on adding agent to navigator
...
Do not add agent bounds which are not supported by recastnavigation with given
settings and log such events.
To avoid reaching navmesh tile generation to find out it can't be generated for
such agent bounds.
2023-01-18 12:00:48 +01:00
James-Deciutiis
4e61fec14d
change const to constexpr
2023-01-17 19:31:52 -08:00
Andrei Kortunov
ee9ab8d393
Use STL-style iterators instead of Java-style ones
2023-01-15 20:23:18 +04:00
Andrei Kortunov
792feae39e
Do not use deprecated implicit conversion
2023-01-15 20:23:18 +04:00
Andrei Kortunov
0864d997d0
Add missing includes
2023-01-15 20:09:56 +04:00
psi29a
a7a89ba7c1
Merge branch 'launcher' into 'master'
...
Rework how OpenMW launcher looks
Closes #6922
See merge request OpenMW/openmw!2587
2023-01-15 16:00:59 +00:00
psi29a
dc3ec1a0a0
Merge branch 'mwscript' into 'master'
...
Multiple mwscript optimizations and some refactoring
See merge request OpenMW/openmw!2600
2023-01-15 15:59:30 +00:00
psi29a
32733d23fa
Merge branch 'xanim' into 'master'
...
X-file handling fixes (bug #5371 )
Closes #5371
See merge request OpenMW/openmw!2614
2023-01-15 15:57:27 +00:00
Andrei Kortunov
902c48d1bb
Rework launcher UI
2023-01-15 12:36:08 +04:00
elsid
44429f0393
Limit NavMeshManager update range by player tile and max tiles
...
Object AABB may be much larger than area currently covered by navmesh. In this
case all tiles beyond covered range should be ignored. Attempt to iterate over
them will not result in any new tile updates but can take quite a while. At
maximum this can be pow(INT_MAX - INT_MIN, 2) iterations.
Use arbitrary time limit to check for update call to finish in the test.
2023-01-15 04:46:29 +01:00
Alexei Kotov
6ff9b5d326
Make use of ends_with for KF
2023-01-15 01:48:06 +03:00
Alexei Kotov
434b4deda1
Don't use xkf if xnif is merely the base model (bug #5371 )
2023-01-14 04:55:12 +03:00
Alexei Kotov
4d0788e016
Use xnif if its xkf is present even if xnif isn't
2023-01-14 03:35:50 +03:00
elsid
d4ab1101eb
Change Interpreter type aliases to be fixed size types
...
Remove no longer relevant comment for float type.
2023-01-14 00:09:01 +01:00
elsid
b88f0d2dbd
Replace mwscript program serialization into a vector with simple struct
...
Mostly to avoid string literal lookup by index with iteration over all preciding
literals and calling strlen. This is very inefficient. In genral this makes code
much more straightforward but also makes it portable since now int and float of
different sizes are properly supported.
2023-01-14 00:07:37 +01:00
Petr Mikheev
d9e9db0983
Additional information in Lua profiler
2023-01-13 21:14:23 +01:00
psi29a
25d7ee7fdc
Merge branch 'streams' into 'master'
...
Setup utf8qtextstream in the way consistent with other Qt components
See merge request OpenMW/openmw!2611
2023-01-13 11:23:44 +00:00
Andrei Kortunov
8da93d4b12
Setup utf8qtextstream in the way consistent with other Qt components
2023-01-13 13:10:34 +04:00
jvoisin
c90d22f3b2
Replace usage of QRegularExpression::anchoredPattern with ^
and $
...
Using `^` and `$` is shorter than `QRegularExpression::anchoredPattern`,
and even allows us in one case to get rid of a trailing `.*`.
2023-01-12 22:52:00 +01:00
Andrei Kortunov
bfcbc2350d
Handle UTF-8 in Qt streams in the Qt6-compatible way
2023-01-12 15:39:50 +04:00
elsid
60eede6a1d
Fix variable naming styleguide
2023-01-11 23:47:42 +01:00
elsid
0ab3090385
Make Runtime::getPC and setPC inline
2023-01-11 23:47:42 +01:00
elsid
46b4427d2e
Remove user defined constructor for Runtime
2023-01-11 23:47:42 +01:00
elsid
9c8df09475
Remove user defined constructors for Interpreter
2023-01-11 23:47:42 +01:00
Andrei Kortunov
307a60e87c
Migrate from QRegExp to more modern QRegularExpression
2023-01-11 11:21:46 +04:00
elsid
c173348cbe
Use default initializers for ESM::RefNum members
...
Instead of unset function that is removed now and assignments all over the code.
2023-01-10 00:44:51 +01:00
psi29a
6a250c5900
Merge branch 'baby_it_is_occluded_outside' into 'master'
...
Weather Particle Occlusion (#5492 )
Closes #5492
See merge request OpenMW/openmw!1328
2023-01-07 22:18:45 +00:00
psi29a
83718878b2
Merge branch 'Load_ESM4' into 'master'
...
Loading ESM4 data and storing them in the ESMStore
See merge request OpenMW/openmw!2557
2023-01-07 22:17:17 +00:00
psi29a
a9d3186173
Merge branch 'fix_esm_fixed_string_warning' into 'master'
...
Fix gcc warning: array subscript n is outside array bounds of ‘const char [n]’
See merge request OpenMW/openmw!2585
2023-01-07 22:15:16 +00:00
Andrei Kortunov
9630246cae
Sort quests in journal by name (bug 7054)
2023-01-07 18:55:51 +04:00
glassmancody.info
9a4977d334
rain occlusion
2023-01-06 22:23:03 -08:00
elsid
2bbed8cc06
Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’
...
In function ‘bool ESM::operator==(const FixedString<capacity>&, const T* const&) [with long unsigned int capacity = 5; T = char; <template-parameter-1-3> = void]’,
inlined from ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1358:11,
inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1377:64,
inlined from ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’ at apps/openmw_test_suite/esm/test_fixed_string.cpp:165:9:
components/esm/esmcommon.hpp:134:19: warning: array subscript 5 is outside array bounds of ‘const char [5]’ [-Warray-bounds]
134 | return rhs[capacity] == '\0';
| ~~~^
apps/openmw_test_suite/esm/test_fixed_string.cpp: In member function ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’:
apps/openmw_test_suite/esm/test_fixed_string.cpp:164:20: note: at offset 5 into object ‘other’ of size 5
164 | const char other[5] = { 'a', 'b', 'c', 'd', '\0' };
| ^~~~~
2023-01-06 22:09:07 +01:00
psi29a
55ba5ed7ea
Merge branch 'mygui_log' into 'master'
...
Use OpenMW logging levels for MyGUI log
Closes #7130
See merge request OpenMW/openmw!2582
2023-01-06 15:09:46 +00:00
Andrei Kortunov
b217d1fc36
Use OpenMW logging levels for MyGUI log (feature 7130)
2023-01-06 16:01:30 +04:00
psi29a
0d8d15a732
Merge branch 'fixcolladaanimopbug' into 'master'
...
Fix Collada animated object bug #7051
Closes #7051
See merge request OpenMW/openmw!2565
2023-01-06 10:10:27 +00:00
unelsson
5b0713517a
Clang-format
2023-01-05 01:40:36 +02:00
psi29a
319aa11d84
Merge branch 'l10n_rename' into 'master'
...
Reorganize l10n files
See merge request OpenMW/openmw!2546
2023-01-04 21:48:00 +00:00
psi29a
1e62b84f9a
Merge branch 'lua_initdata' into 'master'
...
Allow passing `initData` to the :addSript call (#7091 )
Closes #7091
See merge request OpenMW/openmw!2568
2023-01-04 14:32:23 +00:00
florent.teppe
631fa26872
Applies review advice.
2023-01-04 12:22:16 +01:00
unelsson
ba9c2c9928
Add TemplateRef to animated Collada model
2023-01-03 22:51:46 +02:00
florent.teppe
3b2d9161c4
Applied review advice
...
better deals with templated functions meant for esm3 used by esm4s.
simplified loading of esm4 and dealing with unhandled record types.
2023-01-02 19:20:03 +01:00
florent.teppe
e9190bedc8
Reverts useless CmakeList formatting
2023-01-02 18:35:05 +01:00
Petr Mikheev
8c7d347179
Reorganize l10n files
2023-01-02 13:21:05 +01:00
florent.teppe
077cf97bc4
The esm4 reader logic is mutualised
...
to avoid copy pasting code, readerutils gives functions that take visitors as params to decide how a record must be handled
Check encoder exists, and get value of stateless encoder.
fixes code formatting conventions
Fixed output of record with RefId
also fixed readTypedRecord and readRecord to have the proper return types
Check if the type has a sRecordId
2023-01-01 19:22:27 +01:00
florent.teppe
c721a6cafa
Initial commit to load ESM4
...
Some data is actually loaded and store in ESM Store
Any new ESM4 will go through the same code path and be automatically sent to the right store
2023-01-01 16:22:57 +01:00
Petr Mikheev
b248c3e173
Allow passing initData
to the :addSript call ( #7091 )
2022-12-31 22:08:17 +01:00
unelsson
d60fd86719
clang format
2022-12-31 00:52:05 +02:00
unelsson
c71504eeb0
Better comments
2022-12-31 00:35:50 +02:00
unelsson
4676ac4ac9
Cleaner code part 2
2022-12-31 00:35:50 +02:00
unelsson
960019cf65
Cleaner code
2022-12-31 00:35:50 +02:00
unelsson
2efc691736
clang format
2022-12-31 00:35:50 +02:00
unelsson
7ef6b3cb62
automatic clang format
2022-12-31 00:35:50 +02:00
unelsson
d8de56e33c
Coding style improvements, add Torso animation layer
2022-12-31 00:35:50 +02:00
unelsson
ffc64205c5
Force collada animation layers, remove nif blend mask detection.
2022-12-31 00:35:50 +02:00
elsid
c71862a8df
Reset rcPolyMeshDetail members after rcFree
...
To avoid double free causing by later recastnavigation versions.
2022-12-30 19:26:48 +01:00
psi29a
e6064645db
Merge branch 'esm_ref_id_refactor' into 'master'
...
Simplify ESM::RefId
See merge request OpenMW/openmw!2563
2022-12-30 13:27:35 +00:00
elsid
755067f0f3
Remove redundant ESM::RefId member functions
2022-12-30 00:32:47 +01:00
elsid
fe57aec2a4
Move ESM::RefId comment to make sure IDEs recognize it and show in tooltips
2022-12-30 00:04:02 +01:00
elsid
b4ab153418
Use ESM::RefId for worldspace in detournavigator
2022-12-29 23:49:49 +01:00
Petr Mikheev
b8fb013edf
Merge MWLua::ObjectRegistry and MWWorld::WorldModel
2022-12-28 12:45:11 +01:00
psi29a
80e2cd79ec
Merge branch 'boat_closer_to_todd' into 'master'
...
Ignore special characters preceding script commands
Closes #6807
See merge request OpenMW/openmw!2555
2022-12-28 11:21:24 +00:00
florent.teppe
afed7e60ef
Upgraded Filesave version for RefIDs
...
Fix logic issue
2022-12-27 23:05:31 +01:00
florent.teppe
dc21df97c8
Fixed issue with getSummonedCreature( that returned a reference to a non const static value
...
Fix compile, and apply review comment
Fixed greater vs more typo.
getCellname is back to a string view.
Because in most cases was used as a strong not a refId.
and there was a fundamental issue with region names used as a cellname
2022-12-27 19:16:22 +01:00
florent.teppe
1ef1de974d
script blacklist => RefId
...
Applies changes from review
Fixed clang format
Clang format + review.
2022-12-27 19:16:21 +01:00
florent.teppe
2c30575b3b
CellName is now a RefId, makes more sense that way.
2022-12-27 19:16:21 +01:00
florent.teppe
6ff90b34a8
Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
...
Fixed multiple issues from the review.
2022-12-27 19:15:58 +01:00
florent.teppe
42e45723b7
Fixes issue in MW script compilation that would silently produce the wrong bytecode
...
Fixes issue when fetching MyGui values that were stored as RefId but fetched as String
Removed some uncessary copies, fixed issues with lowercase and uneeded changes
2022-12-27 19:15:57 +01:00
florent.teppe
e7deffb376
Adds comment that explains what RefIds are
2022-12-27 19:15:57 +01:00
florent.teppe
d49f60d2d6
To change fewer things with the master implementation, the Id isn't changed to lower case on creation
...
lower case utility functions used in comparison functions
2022-12-27 19:15:57 +01:00
florent.teppe
65cdd489fb
create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
...
Fixed some types
removed useless header
applied clang format
fixed compile tests
fixed clang tidy, and closer to logic before this MR
Removed hardcoded refids
unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string
Fix clang format
Fixed a few instances where std::string was used, when only const std::string& was needed
removed unused variable
2022-12-27 19:15:57 +01:00
florent.teppe
874ff88288
In the interpretter, the id is no longer passed by vallue, but as a const reference instead.
...
In getMembersLocal(, a reference to a reference wrapper is used, because the id can change, bu all we need to do is change a pointer.No need to change the value
2022-12-27 19:15:56 +01:00
fteppe
c283ea0ae8
string_view& => string_view
...
fixed ref to temp variable
2022-12-27 19:15:56 +01:00
fteppe
7da38113be
Changed more hardcoded RefId to be static to avoid multiple runtime creations
...
adresses multiple review comments
2022-12-27 19:15:56 +01:00
fteppe
62d8fe3fc2
changed a few hardcoded refIds used in mutliple places to be defined only once in a variable
2022-12-27 19:15:55 +01:00
fteppe
20da0892ef
openMW_test_suite compiles and runs
...
Slowly moving through the open-cs errors
Good progress in openCS
Very good progress on openCS
Getting closer with openCS
OpenCS compiles and runs! Didn't have time to test it all though
ix openMW
everything compiles on windows??
Fix gcc
Fix Clang
2022-12-27 19:15:55 +01:00
fteppe
2f2e401559
is Hidden marker now takes a const RefId& instead of a string_view
2022-12-27 19:15:55 +01:00
fteppe
0d68735e23
moved all code in CPP in ESM namespace since it was already necessary for << operator
...
in the equality operator, no longer need ciequal since the id is already always lowercase
2022-12-27 19:15:55 +01:00
fteppe
c8bb733360
removed clear() function, the only way to change the Id from the outside is from the assignment operator
...
replaced ciEqual with == operator
2022-12-27 19:15:55 +01:00
fteppe
ee941f9b09
RefId's mId can't be get as mutable from the outside
...
also removed useless operator= defintion
2022-12-27 19:15:55 +01:00
fteppe
d6d2a37d03
some clean and better comments
2022-12-27 19:15:54 +01:00
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!
2022-12-27 19:15:54 +01:00
Evil Eye
b19ad079c2
Ignore special characters preceding script commands
2022-12-27 14:59:56 +01:00
Alexei Kotov
cdd6a8c007
Merge branch 'models_for_the_model_god' into 'master'
...
Implement TestModels/T3D
Closes #7058
See merge request OpenMW/openmw!2506
2022-12-27 00:41:39 +00:00
psi29a
14afde4689
Merge branch 'recast_context' into 'master'
...
Check input and report errors via RecastContext (#7093 )
Closes #7093
See merge request OpenMW/openmw!2544
2022-12-20 09:31:31 +00:00
psi29a
df92d76536
Merge branch 'drippy' into 'master'
...
Ignore non-3D agents in the navigator
Closes #7093
See merge request OpenMW/openmw!2537
2022-12-19 21:51:38 +00:00
elsid
15e8f0b53c
Check input and report errors via RecastContext
...
Recast functions have preconditions for arguments they don't validate. This may
produce garbage data which may lead to crash. Check arguments and log when they
are invalid.
Do not throw exceptions when these function calls fail, capture Recast reported
errors via RecastContext inherited from rcContext and log them.
2022-12-19 19:46:45 +01:00
Cédric Mocquillon
7e77e69a3c
Use a wider type when converting to a signed type
2022-12-18 21:31:51 +01:00
Evil Eye
d40c09c18c
Ignore non-3D agents in the navigator
2022-12-09 16:43:15 +01:00
AnyOldName3
66b8d4fb29
Add a setting to control coverage adjustment
...
With it on, which was always the case before this setting was added,
vanilla content and poorly-made mods will look acceptable, but well-made
mods will have alpha-tested meshes appear to grow and potentially gain a
weird outline as they get further away.
With it off, which replicates the 0.46 behaviour, well-made mods will
look really good, but vanilla content and poorly-made mods will have
alpha-tested meshes shrink as they get further away.
It's been bugging me that this was forced on since 0.47 released, and
I'd hoped to figure out a solution for automatic detection at some point
before 0.48 branched off, but I didn't, so now this is what we're
getting to have Tamriel Rebuilt look right.
2022-12-09 00:22:08 +00:00
psi29a
1d55be8214
Merge branch 'lua_profiler' into 'master'
...
Lua profiler
See merge request OpenMW/openmw!2523
2022-12-07 10:53:47 +00:00
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)
2022-12-03 16:58:03 +01:00
Andrei Kortunov
b0d687964e
Make sure that local path has a trailing slash on Linux and Windows
2022-12-03 11:27:42 +04:00
Petr Mikheev
6fa65e4729
Track memory and CPU usage per script in LuaUtil::LuaState
2022-11-30 00:06:14 +01:00
Evil Eye
bbbcc5e4b7
Add an early out to dialogue loading to match Morrowind.exe behaviour
2022-11-27 22:23:35 +01:00
AnyOldName3
66e5415895
Log screenshot capture
2022-11-22 19:26:28 +00:00
elsid
89884fae0b
Add link dependencies to libosgSim and collada-dom
2022-11-14 12:04:58 +01:00
Evil Eye
b94818b24a
Tweak message and temporarily set model ttl to 0
2022-11-10 17:24:58 +01:00
Evil Eye
0ae5755abb
Implement TestModels/T3D
2022-11-08 22:36:15 +01:00
elsid
baa39c06bb
Move fourCC to a separate file
2022-11-06 15:35:16 +01:00
glassmancody.info
87c0a6e6dc
fix line numbers being off by one for each jump block
2022-10-24 08:40:33 -07:00
uramer
a2fa1fe0a5
Execute async callbacks on the main Lua stack
2022-10-18 22:12:11 +02:00
AnyOldName3
15c51dcbbc
Restore false-positive unused includes
...
They're needed on MacOS as SDL_opengl_gletx.h doesn't define them there.
They don't actually work on MacOS, so long-term, the code that uses
these defines should be changed to use #ifdef to check they're available
before using them.
2022-10-13 00:49:24 +01:00
AnyOldName3
77de37b1ed
Revert "Merge branch 'fix_macos_build' into 'master'"
...
As well as fixing the MacOS build, it meddled with a bunch of files that
already did the right thing.
This reverts commit 8162541a14
, reversing
changes made to e16c451d08
.
2022-10-12 22:48:34 +01:00
psi29a
8162541a14
Merge branch 'fix_macos_build' into 'master'
...
Use separate header to define missing GL constants
See merge request OpenMW/openmw!2464
2022-10-10 07:49:01 +00:00
psi29a
e16c451d08
Merge branch 'l10n' into 'master'
...
Separate l10n manager from lua
See merge request OpenMW/openmw!2451
2022-10-10 07:34:18 +00:00
psi29a
c164437d91
Merge branch 'classism' into 'master'
...
Use class service flags for autocalc NPCs
Closes #7044
See merge request OpenMW/openmw!2461
2022-10-10 07:32:46 +00:00
elsid
c324482338
Use separate header to define missing GL constants
2022-10-09 23:35:55 +02:00
elsid
843753da14
Remove unused includes
2022-10-09 16:44:18 +02:00
jvoisin
3cbf1dc042
First pass with include-what-you-use
2022-10-09 10:39:43 +00:00
Evil Eye
60c26832d2
Use class service flags for autocalc NPCs
2022-10-08 17:00:33 +02:00
Petr Mikheev
3697c9266b
Separate l10n manager from lua
2022-10-07 17:19:04 +02:00
elsid
bb8b5e2108
Add META_Node to clang-format StatementMacros
2022-10-06 21:11:52 +02:00
psi29a
66e14fa3bd
Merge branch 'fix_extra_semi_warning' into 'master'
...
Fix and prevent -Wextra-semi warning
See merge request OpenMW/openmw!2455
2022-10-06 11:10:06 +00:00
elsid
063fff7fa4
Fix and prevent -Wextra-semi warning
2022-10-06 00:26:43 +02:00
elsid
6b8ed4c64f
Use sorted vector for ViewData::contains implementation
2022-10-05 01:10:02 +02:00
elsid
624d8bc931
Support unsigned settings values
2022-10-04 01:34:53 +02:00
elsid
2388b21f63
Use std::from_chars to parse settings integral numbers and handle errors
2022-10-04 01:34:50 +02:00
psi29a
6e71804048
Merge branch 'keying_in' into 'master'
...
Add key flag on load
Closes #7034
See merge request OpenMW/openmw!2444
2022-09-30 13:16:14 +00:00
Evil Eye
e6592aa850
Add key flag on load
2022-09-30 12:16:45 +02:00
elsid
4de8ea30c8
Report used memory by Lua interpreter
2022-09-30 02:15:21 +02:00
elsid
1b9b61b60b
Format navmesh water vertices and indices
2022-09-27 00:46:34 +02:00
psi29a
b58c658b56
Merge branch 'localtime_errors' into 'master'
...
Handle localtime errors
See merge request OpenMW/openmw!2434
2022-09-26 07:59:41 +00:00
clang-format-bot
88ec8a9523
Apply clang-format
2022-09-25 18:23:43 +02:00
elsid
dd63a1602f
Handle localtime errors
2022-09-25 16:20:20 +02:00
psi29a
aed0ad6b83
Merge branch 'nifosg_tests' into 'master'
...
Add tests for NifOsg::Loader
See merge request OpenMW/openmw!2421
2022-09-25 13:37:14 +00:00
Andrei Kortunov
890be1b590
Fix crash in the editor
2022-09-25 12:31:56 +04:00
AnyOldName3
581b333386
Add missing include
2022-09-24 22:11:46 +00:00
Project579
6fe89ff22b
Fix dumb regression, initialize "std::filesystem::file_time_type" with "clock::now()".
2022-09-24 21:52:10 +02:00
Project579
5cf2a958eb
Make conversions between std::chrono time_point and string safer by not using "localtime" directly.
2022-09-24 21:47:27 +02:00
elsid
06f7e8088e
Check for negative record list length
2022-09-24 19:10:38 +02:00
elsid
0688b6de40
Separate record list reading from its state
...
To make it possible to set record list state independently from reading NIF
file.
2022-09-24 19:10:35 +02:00
elsid
c338c1e5d3
Add Nif::FileView as read only interface for Nif::NIFFile
...
To make sure interface is scoped to what users require.
2022-09-24 19:10:21 +02:00
elsid
f2fb3d6de8
Separate NIFFileReader from NIFFile
...
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.
Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2022-09-24 19:10:14 +02:00
elsid
b39ccbeeef
Remove NIFFile::warn and NIFFile::fail functions
...
These functions use NIFFile only as context, they are not really a part of
either reading nor state invariant. And they only confuse reader because it's
not immediatelly obvious that no code is executed after fail.
2022-09-24 19:10:05 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base
2022-09-22 21:35:26 +03:00
elsid
63b51ead84
Use nv_default shader prefix for unhandled types
2022-09-17 17:35:25 +02:00
Alexei Kotov
7aee22be91
Further controller updates
...
Correct NiMaterialColorController base class
Load everything in NiGeomMorpherController
Make a guess at how weighted interpolators might be supposed to work like
2022-09-16 23:45:54 +03:00
elsid
ac01fd5e75
Add missing non-prefixed reserved nodes
2022-09-16 12:36:00 +02:00
psi29a
86ff454ca2
Merge branch 'thirdtimesthecharm' into 'master'
...
Rehash the rehashing of rehashed morph loading
See merge request OpenMW/openmw!2413
2022-09-16 06:09:21 +00:00
psi29a
46935e9e97
Merge branch 'renormalise' into 'master'
...
Renormalise line endings
See merge request OpenMW/openmw!2412
2022-09-16 06:08:36 +00:00
Alexei Kotov
e2ed313389
Don't load keys for Gamebryo morphs
2022-09-16 05:55:37 +03:00
AnyOldName3
84f8a6848a
Renormalise line endings
...
This should replace accidental CRLF with LF
2022-09-16 00:53:24 +01:00
elsid
fd93b7186f
Add missing include
2022-09-16 01:39:59 +02:00
psi29a
16fd01a765
Merge branch 'fix_reserved_names_init' into 'master'
...
Initialize reserved names once to avoid race condition (#7008 )
Closes #7008
See merge request OpenMW/openmw!2409
2022-09-15 22:09:08 +00:00
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
2022-09-15 22:01:59 +00:00
elsid
8068d0153f
Initialize reserved names once to avoid race condition
...
CanOptimizeCallback::isReservedName function may be executed by multiple threads
simultaneously. One of them creates a static but both of them run if statement
and see it's empty because none of them added elements there yet. Both of them
go to the branch where new elements are added doing it without any
synchronization possibly causing SIGSEGV.
2022-09-15 23:37:57 +02:00
psi29a
d1c79fa8d1
Merge branch 'pre_clang_format_fixes_2' into 'master'
...
Fixes before applying clang-format 2
See merge request OpenMW/openmw!2401
2022-09-15 08:24:23 +00:00
psi29a
6f95154ca8
Merge branch 'esm4_zero_terminated_strings' into 'master'
...
Fix reading array of zero terminated strings (ESM4 NIFZ and KFFZ sub records)
See merge request OpenMW/openmw!2403
2022-09-15 07:44:35 +00:00
psi29a
ac2b6525e9
Merge branch 'interpcontrollers' into 'master'
...
Streamline NiInterpController handling
See merge request OpenMW/openmw!2404
2022-09-15 07:44:11 +00:00
elsid
6f00641c8a
Fix reading array of zero terminated strings
...
NIFZ and KFFZ subrecords store multiple strings separated by \0 character.
2022-09-15 00:01:19 +02:00
Alexei Kotov
482de23893
Streamline NiInterpController handling
2022-09-15 00:58:10 +03:00
elsid
ae812701ec
Merge branch 'crashfix_debugdraw' into 'master'
...
crashfix of debug draw on game exit
Closes #7004
See merge request OpenMW/openmw!2398
2022-09-14 20:56:03 +00:00
florent.teppe
943198e325
Small changes
2022-09-14 13:20:35 +02:00
elsid
410a2881fe
Add comma to the last array element to prevent putting multiple elements on a single line
2022-09-14 00:36:02 +02:00
florent.teppe
e811f7ed00
Simplified the data structures.
...
DebugCustomDraw owns the vector of drawcalls and the line geometry.
There are two DebugCustomDraw, so anything they own is double buffered.
Because DebugDrawer has a ref_ptr on the DebugCustomDraw, they live at least as long as DebugDrawer, making memory access from it safe.
removed redundent this
2022-09-13 18:26:33 +02:00
psi29a
675c0f9b31
Merge branch 'disable_clang_format_for_osg' into 'master'
...
Disable clang-format for files that should have minimal diff with OSG
See merge request OpenMW/openmw!2399
2022-09-13 08:53:30 +00:00
elsid
51314db2f1
Remove AI_CNDT from AI package types
...
AI_CNDT is a label of subrecord containing cell name. It's not AI package type.
2022-09-13 00:05:12 +02:00
elsid
50d8bd9cdd
Disable clang-format for files that should have minimal diff with OSG
2022-09-12 23:57:10 +02:00
elsid
219b9e7cbf
Revert "Use raw string literals for shaders"
...
This reverts commit 0e72055385
.
2022-09-12 23:54:13 +02:00
elsid
52b7b66e9f
Add comma to the last array element to prevent putting multiple elements on a single line
2022-09-12 21:00:51 +02:00
elsid
0e72055385
Use raw string literals for shaders
2022-09-12 21:00:51 +02:00
elsid
409f83a149
Use raw string literal for error marker definition
2022-09-12 21:00:45 +02:00
florent.teppe
565a08b95a
crashfix on game exit
2022-09-12 19:13:02 +02:00
elsid
6ae15f08e0
Avoid chained operator() calls to prevent formatting issues
2022-09-12 16:48:15 +02:00
unrelentingtech
1c8fd2ecdb
Implement system-scaled HiDPI support (SDL_WINDOW_ALLOW_HIGHDPI - Wayland, macOS, etc)
2022-09-12 08:18:08 +00:00
elsid
4f7dcd5ae5
Fix conversion to UTF8 for ESM4 Reader strings
...
toUtf8 returns a string view to the input when input string is ASCII and nothing
is written to the buffer which means output string of Reader::getStringImpl is
not modified.
Move input to the output string and resize it in this case.
2022-09-12 01:42:01 +02:00
psi29a
80d52e3da8
Merge branch 'cursor' into 'master'
...
Support high-resolution cursor textures
Closes #6933
See merge request OpenMW/openmw!2262
2022-09-11 18:32:18 +00:00
elsid
9f35f9b45b
Add missing include <array>
2022-09-11 19:55:53 +02:00
psi29a
435eacdaad
Merge branch 'debug_draw_commands' into 'master'
...
API to draw primitives
See merge request OpenMW/openmw!2345
2022-09-11 17:17:16 +00:00
Andrei Kortunov
a2c02d2999
Support high-resolution cursor textures (feature 6933)
2022-09-11 20:54:20 +04:00
florent.teppe
43b0ae1ce7
all debug renders now use the same shader and it works
...
remove debug draw shader, now that debug and debugdraw serve the same function
remove debug draw code from actors to clean
replaced int uniforms with bool for better readability
clang format
cleanup, remove unused func, and mistake whitespace
fix namespace
added more colors
fixed missing whitespace
2022-09-11 17:54:01 +02:00
florent.teppe
21971c08ba
debug draw shader uses the generic functions
...
renamed files
roundabout way to change case with windows noticing
fixed type
fix filename in cmakelist.txt
ported shader and c++ code so glsl 120 can be used instead of 330
new debug shader and old one are almost unified
for some reason, even though I get no compilation issue, old debug draws don't work, only the new one implemented by this MR
remove useless const cast
2022-09-11 17:53:59 +02:00