Commit Graph

8150 Commits (master)

Author SHA1 Message Date
psi29a 43f2574406 Merge branch 'vaporeon' into 'master'
Make sunlight scattering and wobbly shores optional

See merge request OpenMW/openmw!3994
2 months ago
elsid 215404e126
Report more stats from caches 2 months ago
elsid ae41ebfc83
Report CellPreloader stats 2 months ago
elsid 9a24e77d3f
Show F4 stats in pages 2 months ago
Alexei Kotov 76105cc2d1 Make sunlight scattering and wobbly shores optional 2 months ago
Evil Eye 1d13f7db8f Simplify detachFromParent 2 months ago
Evil Eye 8cbcb82dd4 Prevent iterator invalidation when updating Lua UI and increase const correctness 2 months ago
psi29a 2497164b2b Merge branch 'optimize_font_loading' into 'master'
Optimize bitmap fonts loading

See merge request OpenMW/openmw!3988
2 months ago
psi29a 2056da358d Merge branch 'opencs-projectile-speed' into 'master'
OpenMW-CS: Editing and verifying of projectile speed for magic effects

See merge request OpenMW/openmw!3939
2 months ago
psi29a e8038d353f Merge branch 'esmstuff' into 'master'
Use more decomposition, string_view, and implicit sizes in ESM code

See merge request OpenMW/openmw!3975
2 months ago
Sam Hellawell deb8894035 ESM::MagicEffect::blank() set the default to 1
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
2 months ago
Andrei Kortunov f2dc25e214 Optimize bitmap fonts loading 2 months ago
psi29a f7f7502d60 Merge branch 'i-said-it-was-unlocked-damn-you' into 'master'
Fix(CS): Actually allow unlocking doors ( #7899 )

Closes #7899

See merge request OpenMW/openmw!3982
2 months ago
Dave Corley 2e68786331 Fix(CS): Actually allow unlocking doors ( #7899 ) 2 months ago
psi29a b70f1d86c5 Merge branch 'fix-sheathing-non-nifs' into 'master'
Fix weapon and shield sheathing for non-nif meshes

See merge request OpenMW/openmw!3985
2 months ago
Mads Buvik Sandvei e0b11c14c2 Remove unused member mStackable 2 months ago
Sam Hellawell 7897ff7ac9 Fix weapon sheathing for non-nif meshes 2 months ago
psi29a 012d10703f Merge branch 'spellcast-refactor' into 'master'
Spellcast related Lua API + spellcasting/activespell refactor

See merge request OpenMW/openmw!3922
2 months ago
Mads Buvik Sandvei 320d8ef014 Spellcast related Lua API + spellcasting/activespell refactor 2 months ago
Alexei Kotov 6515fdd73f Handle zero length Lua storage files more gracefully (#7823) 2 months ago
jvoisin 79a62b3ad3 Merge branch 'enable_normals_for_all' into 'master'
Restructure colormasks at higher level

See merge request OpenMW/openmw!3970
2 months ago
Cody Glassman a4dd9224df Restructure colormasks at higher level 2 months ago
Evil Eye 5a0aed3a78 Use more decomposition, string_view, and implicit sizes in ESM code 2 months ago
Evil Eye bf708acfac Merge branch 'goddamnit-there-are-more' into 'master'
Even more MSVC-specific warnings that evaded detection in CI

See merge request OpenMW/openmw!3968
2 months ago
Alexei Kotov 63276e0f1f Merge branch 'avoid_copy' into 'master'
Follow-up for YAML API

See merge request OpenMW/openmw!3961
2 months ago
AnyOldName3 818a99a870 Review 2 months ago
AnyOldName3 da8150e2e4 Even more MSVC-specific warnings that evaded detection in CI 2 months ago
Alexei Kotov 3721a69747 ESM4: Make script local variable loading more reliable 2 months ago
psi29a af9f1b54da Merge branch 'lost-warnings' into 'master'
Fixes for a whole bunch of warnings

See merge request OpenMW/openmw!3950
2 months ago
Alexei Kotov 25414cd660 Merge branch 'rm_esm4_local_static' into 'master'
Remove static modifier from local variables used to store temporary loading results

See merge request OpenMW/openmw!3964
2 months ago
elsid 3358bc80bf Merge branch 'esm4fourcc' into 'master'
Get rid of ESM4::SubRecordTypes

See merge request OpenMW/openmw!3962
2 months ago
elsid 0da8b29a88
Remove static modifier from local variables used to store temporary loading results
They make the code thread unsafe because different threads will use the same
memory to write and read using different instances of the loaded objects.
2 months ago
Alexei Kotov 6b93479bd3 Get rid of ESM4::SubRecordTypes
All my homies hate ESM4::SubRecordTypes
2 months ago
Dave Corley fcff1a6739 Fix #7887, use actual instead of reported size for script data 2 months ago
Andrei Kortunov 2d3a8ca0fc Do not use an inner namespace 2 months ago
Andrei Kortunov cb831a5917 Add more includes just for sure 2 months ago
Andrei Kortunov 2523afe9c2 Use namespace instead of static class 2 months ago
Andrei Kortunov 8037ad7f00 Remove unused includes 2 months ago
psi29a 854b4f226b Merge branch 'fix_msvc_build' into 'master'
Fix build with MSVC 19.38

See merge request OpenMW/openmw!3960
2 months ago
Andrei Kortunov 4520ee465d Do not copy vector 2 months ago
elsid ee2cc8aeb7
Fix build with MSVC 19.38
components\detournavigator\navigator.hpp(44): error C3861: 'assert': identifier not found
2 months ago
elsid 16410d0960
Use std::string for ResourceManager cache key
Otherwise terrain textures cache has zero hits because it stores not normalized
paths. Due to implicit conversion it's possible to add entry with
addEntryToObjectCache passing a string that is converted into normalized path.
But then getRefFromObjectCache called with original value does not find this
entry because it's not converted and overloaded operators are used instead.
2 months ago
Andrei Kortunov 6da151cf77 Fix GCC build 2 months ago
psi29a 5d669f0470 Merge branch 'fix_ui_crashes' into 'master'
Another day, another UI crash fix

See merge request OpenMW/openmw!3949
2 months ago
psi29a 090e57b27c Merge branch 'esm3structs' into 'master'
Replace fixed size writeHNT calls with decomposition

See merge request OpenMW/openmw!3914
2 months ago
psi29a d746918563 Merge branch 'yaml_parse' into 'master'
Load YAML files via Lua

Closes #7590

See merge request OpenMW/openmw!3924
2 months ago
Alexei Kotov 6e2dbfbd74 Merge branch 'check-osg-plugins-but-better' into 'master'
Get OSG to tell us the plugin filenames it's going to use

See merge request OpenMW/openmw!3942
2 months ago
AnyOldName3 a06ab94a20 Canonicalise resolved representation of data directories 2 months ago
AnyOldName3 9638fbabb4 https://www.youtube.com/watch?v=2_6U9gkQeqY 2 months ago
AnyOldName3 ff3ffa13b6 Auto format 2 months ago
AnyOldName3 28131fd62b Fixes for a whole bunch of warnings
These warnings were always enabled, but we didn't see them due to https://gitlab.com/OpenMW/openmw/-/issues/7882.
I do not fully understand the cause of 7822 as I can't repro it in a minimal CMake project.

Some of these fixes are thought through.
Some are sensible best guesses.
Some are kind of a stab in the dark as I don't know whether there was a
possible bug the warning was telling me about that I've done nothing to
help by introducing a static_cast.

Nearly all of these warnings were about some kind of narrowing
conversion, so I'm not sure why they weren't firing with GCC and Clang,
which have -Wall -Wextra -pedantic set, which should imply -Wnarrowing,
and they can't have been affected by 7882.

There were also some warnings being triggered from Boost code.
The vast majority of library headers that do questionable things weren't
firing warnings off, but for some reason, /external:I wasn't putting
these Boost headers into external mode.

We need these warnings dealt with one way or another so we can switch
the default Windows CI from MSBuild (which doesn't do ccache) to Ninja
(which does).
I have the necessary magic for that on a branch, but the branch won't
build because of these warnings.
2 months ago
uramer 68ed771816 Fix element detachment logic 2 months ago
uramer 2f40491065 Fix crash when destroying UI element in the same frame as creating it 2 months ago
Evil Eye b52f721318 Use getSubComposite to read AMBI 2 months ago
Andrei Kortunov 715efe892f Load YAML files via Lua (feature 7590) 2 months ago
psi29a 2764d8ceff Merge branch 'fix_destroying_new_elements' into 'master'
Don't destroy root widget for new elements

See merge request OpenMW/openmw!3947
2 months ago
AnyOldName3 942eeb54c1 Yet another osgpluginchecker rewrite
It turns out that it's possible for OSG plugins to be spread across multiple directories, and OSG doesn't account for this in osgDB::listAllAvailablePlugins(), even though it works when actually loading the plugin.

Instead, use code that's much more similar to how OSG actually loads plugin, and therefore less likely to miss anything.

Incidentally make things much simpler as we don't need  awkwardness from working around osgDB::listAllAvailablePlugins()'s limitations.
2 months ago
uramer b12f98db98 Don't destroy root widget for new elements 2 months ago
elsid 859d765921
Use normalized path for NifFileManager::get 2 months ago
elsid 3ea3eeb613
Use string_view for canOptimize 2 months ago
elsid a98ce7f76a
Replace std::filesystem::path by std::string_view in Files::getHash argument 2 months ago
elsid 79b73e45a1
Replace std::filesystem::path by std::string and std::string_view in nif code
It's used only for error reporting.
2 months ago
elsid cd3c3ebadb
Use VFS::Path::Normalized for ResourceManager cache key 2 months ago
psi29a b5b6744321 Merge branch 'hotfix_ui_update' into 'master'
Fix Lua UI updates

See merge request OpenMW/openmw!3936
2 months ago
psi29a 3cb8d05fe5 Merge branch 'vfs_normalized_path_4' into 'master'
Use VFS::Path::Normalized in few more places

See merge request OpenMW/openmw!3934
2 months ago
AnyOldName3 0730dc2ebb Get OSG to tell us the plugin filenames it's going to use
That way, we don't have issues like the checker getting false positives when the right plugins are present for the wrong OSG version or build config, or false negatives when we've generated the wrong filenames.
2 months ago
uramer af8662daee Detach Lua Elements properly from their parent 2 months ago
uramer 0f60052bb8 Set Element state in Element::create 2 months ago
psi29a 6f9ceff3f3 Merge branch 'windows_build' into 'master'
Add option to disable precompiled headers

See merge request OpenMW/openmw!3933
2 months ago
elsid cc35df9409
Use VFS::Path::Normalized for fx::Technique file path 2 months ago
elsid ffbeb5ab98
Build localization path using VFS::Path::Normalized 2 months ago
elsid 84adb0a148
Make VFS::Path::Normalized constructor from std::string_view explicit 2 months ago
psi29a a926f4a5a9 Merge branch 'alt_tab_fix' into 'master'
Do not treat Alt-Tab as resolution change

Closes #7866

See merge request OpenMW/openmw!3931
2 months ago
psi29a f09f5c644c Merge branch 'update_setting_pages' into 'master'
Optimize setting group rendering

See merge request OpenMW/openmw!3929
2 months ago
AnyOldName3 e0b13f0858 Ensure default config values are present
Moving builtin.omwscripts out of the root openmw.cfg means we actually might need to use the defaults, so need to have some.
2 months ago
elsid 5859fd464c
Add option to disable precompiled headers
To be able to use ccache.

Also fix compilation errors appeared due to absence of precompiled
headers.
2 months ago
Andrei Kortunov 5dcac4c48f Do not treat Alt-Tab as resolution change (bug 7866) 2 months ago
AnyOldName3 36f5c819bb capitulate 2 months ago
AnyOldName3 243b5b6666 Hopefully convince the old MSVC version on GitLab CI to work
The old code was legal, and the things it did worked in other places, so should have worked here, too.

Hopefully just rearranging stuff convinces what I assume to be a compiler bug to not happen.
2 months ago
AnyOldName3 ed23f48754 Actually erase the things we're removing
Caused by bad copy and paste
2 months ago
uramer 9ae61f1932 Fix child UI Elements created in the same frame as parent 2 months ago
elsid 5acfb07850
Fix build with OSG_USE_UTF8_FILENAME 2 months ago
Evil Eye 1499dd2654 Add getCompositeSize and handle NPC data 2 months ago
AnyOldName3 bf24bb71b1 Explicitly use std::strong_ordering
Otherwise it's ambiguous how to build <=> from <, == and >
2 months ago
AnyOldName3 1ae2cc82a1 I do not know how this escaped formatting locally. 2 months ago
AnyOldName3 a130ca57a4 Track source of settings
This one's a biggie.

The basic idea's that GameSettings should know:
* what the interpreted value of a setting is, so it can actually be used.
* what the original value the user put in their config was, so it can be put back when the config's saved.
* which path it's processing the openmw.cfg from so relative paths can be resolved correctly.
* whether a setting's a user setting that can be modified, or from one of the other openmw.cfg files that can't necessarily be modified.

This had fairly wide-reaching implications.

The first is that paths are resolved properly in cases where they previously wouldn't have been.
Without this commit, if the launcher saw a relative path in an openmw.cfg, it'd be resolved relative to the process' working directory (which we always set to the binary directory for reasons I won't get into).
That's not what the engine does, so is bad.
It's also not something a user's likely to suspect.
This mess is no longer a problem as paths are resolved correctly when they're loaded instead of on demand when they're used by whatever uses them.

Another problem was that if paths used slugs like ?userconfig? would be written back to openmw.cfg with the slugs replaced, which defeats the object of using the slugs.
This is also fixed.

Tracking which settings are user settings and which are in a non-editable openmw.cfg allows the launcher to grey out rows so they can't be edited (which is sensible as they can't be edited on-disk) while still being aware of content files that are provided by non-user data directories etc.
This is done in a pretty straightforward way for the data directories and fallback-archives, as those bits of UI are basic, but it's more complicated for content files as that uses a nmodel/view approach and has a lot more moving parts.
Thankfully, I'd already implemented that when dealing with builtin.omwscripts, so it just needed wiring up.

One more thing of note is that I made the SettingValue struct storable as a QVariant so it could be attached to the UI widgets as userdata, and then I could just grab the original representation and use it instead of needing any complicated mapping from display value to on-disk value.
2 months ago
psi29a 231b5753e4 Merge branch 'launcher_help_version' into 'master'
Open matching version of documentation for Launcher Help

See merge request OpenMW/openmw!3909
2 months ago
psi29a e340b06411 Merge branch 'get-glextensions-properly' into 'master'
Get the GLExtensions instance when a context is created

Closes #7351

See merge request OpenMW/openmw!3022
2 months ago
psi29a 61f5a13c02 Merge branch 'check-osg-plugins' into 'master'
Check for dynamic OSG plugins on launch

Closes #7736

See merge request OpenMW/openmw!3748
2 months ago
Evil Eye cef59e8928 Replace fixed size writeHNT calls with decomposition 2 months ago
Evil Eye 958f70736f Implement auto calculated potion values 2 months ago
AnyOldName3 b8cb757ca4 Oopsie 3 months ago
AnyOldName3 9e1334cc09 Resync composing and path openmw.cfg settings with options.cpp 3 months ago
psi29a be1e77c282 Merge branch 'fix-git-commit-updating' into 'master'
Fix git commit updating

See merge request OpenMW/openmw!3911
3 months ago
psi29a 03d5872a55 Merge branch 'drop_on_exit' into 'master'
Add a storage mode to drop section on game exit

See merge request OpenMW/openmw!3905
3 months ago
AnyOldName3 d111b4bbd9 Handle built-in content files in content model
There's also handling for files declared as originating from a lower-priority openmw.cfg, e.g. anything in the local config or any intermediate ones, as they can't be disabled or reordered.
There's no way to mark such files yet, but the logic's the same as built-in files, so everything will be fine once that's set up.
3 months ago
Andrei Kortunov ddd0945645 Add a storage mode to drop section on game exit 3 months ago
Mads Buvik Sandvei c82c111ee1 Use correct index for Athletics_SwimOneSecond 3 months ago
AnyOldName3 f476301670 There's no such thing as the global data directory
That's what resources/vfs is for.
3 months ago
AnyOldName3 7d28788aee data-local is already unquoted when it's read 3 months ago
AnyOldName3 dbdecfe94b Use approved safety comment for path escaping explanation
I thought I'd got this one already
3 months ago
AnyOldName3 90966ecc47 Handle replace= lines properly in the launcher 3 months ago
AnyOldName3 626f438dcc Make builtin.omwscripts actually mandatory
Previously it was quasi-mandatory - lots of things would add it, e.g. when running openmw through the CS, but it could technically be disabled.

Now it's treated like the resources/vfs directory and implicitly added by the engine etc.
3 months ago
Alexei Kotov 46f863a32e Merge branch 'help-i-cant-swim' into 'master'
Fix(editor): Don't save dirty water height values

Closes #7841

See merge request OpenMW/openmw!3881
3 months ago
psi29a 619ccf7107 Merge branch 'decomposition' into 'master'
Use decompose to remove more instances of pragma pack

See merge request OpenMW/openmw!3906
3 months ago
psi29a f2039b35d0 Merge branch 'vfs_normalized_path_3' into 'master'
Use normalized path for correctSoundPath

See merge request OpenMW/openmw!3903
3 months ago
AnyOldName3 bcd54ab1ff Format osgpluginchecker.cpp.in
I formatted the generated file that's part of the VS solution, then diffed it against the input and changed it to match.
3 months ago
AnyOldName3 02ef7ae3cc Give up rearranging the CS 3 months ago
AnyOldName3 93a84b38ac Give git-version its name back 3 months ago
AnyOldName3 42c7fc8e92 Update 2 files
- /components/CMakeLists.txt
- /cmake/GitVersion.cmake
3 months ago
uramer 86a82ae3f1 Open matching version of documentation for Launcher Help 3 months ago
AnyOldName3 357bf3db61 Load all config files 3 months ago
Dave Corley 059191c840 Also apply hasWaterHeightSub for INTV 3 months ago
Alexei Kotov 357b190571 Merge branch 'oldsavessuck' into 'master'
Account for pre-0.46 saves storing a gold value of 0 for everything

See merge request OpenMW/openmw!3902
3 months ago
Alexei Kotov 01e0b25fd3 Merge branch 'coverity' into 'master'
Fix some Coverity complaints

See merge request OpenMW/openmw!3904
3 months ago
AnyOldName3 a761e417f1 Accept that it's too much work to defer light manager creation in the CS and instead use something akin to the old approach 3 months ago
Evil Eye 7d7e8939ab Use ESM::decompose to handle WPDTstruct 3 months ago
Evil Eye ec1c6ee171 Use ESM::decompose to handle ENAMstruct 3 months ago
elsid ec9c829021
Use normalized path for correctSoundPath 3 months ago
elsid 92d57d6e46
Make Normalized constructor from const char* explicit 3 months ago
Evil Eye 82c92a9a6c Merge branch 'bookart-is-textures-too' into 'master'
Consider bookart a valid prefix for regular textures and vice versa

Closes #7535

See merge request OpenMW/openmw!3342
3 months ago
AnyOldName3 dec8d32b3a FIx static destruction order chaos 3 months ago
Andrei Kortunov cf6b6020a0 Move local variables 3 months ago
Andrei Kortunov fc1f244627 Add missing initialization 3 months ago
AnyOldName3 3fbd97ffc8 Remove unused <vector> header 3 months ago
Alexei Kotov 6d35b626cf Merge branch 'fix_components_property' into 'master'
Set components property after it is defined

See merge request OpenMW/openmw!3899
3 months ago
Alexei Kotov 89d856d03e Merge branch 'use_is_directory_member' into 'master'
Use is_directory member function

See merge request OpenMW/openmw!3897
3 months ago
AnyOldName3 6406095bfb s p a n 3 months ago
AnyOldName3 2bc091fc05 Include missing header
I thought I'd seen this class defined in one of the existing headers
with a different name, but I was muddling its forward declaration and a
different class being in a non-obvious header.
3 months ago
AnyOldName3 ec4731d454 Cope with scene widgets being destroyed in a weird order
I can't actually test this as the CS still doesn't get far enough with this MR.
3 months ago
AnyOldName3 36a75cdb29 Get the GLExtensions instance when a context is created 3 months ago
AnyOldName3 1717e696b1 Format before clang notices and sends me an angry email 3 months ago
AnyOldName3 db5a43db30 Allow top-level prefix to be found in the middle of a path 3 months ago
Evil Eye 0bab37327c Account for pre-0.46 saves storing a gold value of 0 for everything 3 months ago
psi29a e4a9e83609 Merge branch 'disable-shadows-properly-properly' into 'master'
Affect correct texture units when disabling shadows for stateset

Closes #7838

See merge request OpenMW/openmw!3891
3 months ago
elsid 38990b1fd2
Set components property after it is defined 3 months ago
Dave Corley ce2787e15e Cleanup(loadcell): Rename setHasWater to setHasWaterHeightSub 3 months ago
Dave Corley d04572ac84 Cleanup(loadcell): Rename mHasWater to mHasWaterHeightSub for clarity. 3 months ago
Dave Corley f95cad07f2 Cleanup(loadcell): Remove unused integer water flag 3 months ago
Dave Corley bb35f0366a Fix(loadcell): Save water height regardless of value, if the user actually adjusted it 3 months ago
Dave Corley 1b431bf633 Fix(editor): Don't save dirty water height values 3 months ago
psi29a 35f547ad7c Merge branch 'fatstacks' into 'master'
Allow the NAM9 field to be used if COUN is omitted

Closes #7836

See merge request OpenMW/openmw!3889
3 months ago
psi29a 518f34c869 Merge branch 'bsa_archive' into 'master'
Cleanup and optimize BSA archives code

See merge request OpenMW/openmw!3876
3 months ago
AnyOldName3 2a5f8d5bab Skip the check on MacOS
It doesn't work, the workaround isn't enough to make it work, I can't be bothered making a more powerful workaround, and it's impossible to *package* a MacOS build missing the plugins we need anyway, even if you can build and attempt to run it.
3 months ago
elsid c2ac1ce046
Use is_directory member function
To reduce the number of syscalls.
3 months ago
AnyOldName3 3335ccbc32 Capitulate 3 months ago
AnyOldName3 8c92f6ee87 Make uniform a signed int again 3 months ago
AnyOldName3 d282fdb77a Eliminate unused uniform 3 months ago
AnyOldName3 132c43affa Fix warning
Also attempt to make an equivalent warning fire with MSVC, then have to fix other stuff because /WX wasn't working, then back out of enabling the warning because none of the ones I could find disliked the old code.
3 months ago
AnyOldName3 7391bf2814 Fix OpenGL errors
There's no reason to use the AndModes variant as we never (intentionally) attempt to sample from a shadow map via the FFP.
3 months ago