Commit Graph

8414 Commits (master)

Author SHA1 Message Date
Alexei Kotov 745be2e91b Implement NifOsg::Fog::compare() 8 months ago
Alexei Kotov a513049129 Adjust drawable property state changes
Reset shininess and specular strength when specular lighting is supposed to be disabled
Don't add the material redundantly if a sorter is pushed
Don't discard non-default emissive and specular multipliers if there's no sorter or material
8 months ago
Alexei Kotov 713e741f9c Share fog state attributes 8 months ago
Alexei Kotov d7bd5e76ca Move wrapping flag handling to relevant properties 8 months ago
psi29a 02cdeb6252 Merge branch 'scalable_editor' into 'master'
Treat editor icons as scalable

See merge request OpenMW/openmw!4042
8 months ago
Alexei Kotov 78eda530ac Simplify material file pointer acrobatics 8 months ago
Andrei Kortunov 6390fdee7a Remove dead code 8 months ago
psi29a 023c0f7a46 Merge branch 'vfs_normalized_path_6' into 'master'
Use normalized path for music related functions

See merge request OpenMW/openmw!4038
8 months ago
Andrei Kortunov 1bb48bcef7 Treat editor icons as scalable 8 months ago
Alexei Kotov 884668927f BGSM Reader: include cleanup, adjust getFile return result 8 months ago
elsid a863899eb1
Use normalized path for SoundManager::streamMusic 8 months ago
Alexei Kotov 77c3cd4467 More BGSM cleanup 8 months ago
Alexei Kotov 6be2bb70c3 Remove unused remnants of NIFStream from BGSMStream 8 months ago
Alexei Kotov ea5e101821 Handle glow maps for BGSM files 8 months ago
Alexei Kotov 8325e100df More decal deduplication 8 months ago
Alexei Kotov 5789eb73b1 Deduplicate decal and alpha handling in NifLoader 8 months ago
Alexei Kotov 4ccf9c1917 Deduplicate NifLoader texture attachment
Handle non-existent shader materials more gracefully
Deduplicate shader material drawable property handling
8 months ago
Alexei Kotov e680123482 NifLoader: Make the image manager a member 8 months ago
Alexei Kotov 8997bd6854 Apply shader material transparency parameters, get rid of unwanted shiny 8 months ago
Alexei Kotov 1d65aaee71 Formatting 8 months ago
Alexei Kotov 96f5ae5a8d Handle BGSM decal flag, hide visibility editor markers 8 months ago
Alexei Kotov 1a961f3021 Extremely early handling for BGSM/BGEM files 8 months ago
Alexei Kotov fe1cb3a5ae Add a resource manager for BGSM files 8 months ago
Alexei Kotov cb77bcc4c8 Initial BGEM file parsing 8 months ago
Alexei Kotov 484a360792 Add a safety measure for string loading in BGSM 8 months ago
Alexei Kotov f9f8c1e591 Fix depth test reading in BGSM 8 months ago
Alexei Kotov 8ef6304dd9 BGSM colors are Vec3 8 months ago
Alexei Kotov 015aca2cfd Initial BGSM file parsing 8 months ago
Alexei Kotov 124df1be61 Parse shared part of material files 8 months ago
Alexei Kotov aea7b10986 Add dummy BGSM/BGEM file reader 8 months ago
AnyOldName3 04f1dc282b Merge branch 'fix-osga-rotate-wildly' into 'master'
Fix OSGAnimation issues

See merge request OpenMW/openmw!3989
8 months ago
elsid e11a5a4352
Use normalized path for SoundManager::playPlaylist 8 months ago
elsid 82931059fd
Make NormalizedView constructor from const char* explicit 8 months ago
Sam Hellawell b7aa3b9f47 Remove rename from RenameBonesVisitor, rename to RenameAnimCallbacksVisitor 8 months ago
psi29a e4c70b7861 Merge branch 'anyoldname3-and-the-amazing-technicolour-terminal-emulator' into 'master'
Support coloured terminal output on Windows

See merge request OpenMW/openmw!4027
9 months ago
psi29a 3600c6c7c7 Merge branch 'filterview' into 'master'
Validate INFO filters when loading the record

See merge request OpenMW/openmw!4003
9 months ago
psi29a b91ff634e4 Merge branch 'navmesh_queue' into 'master'
Optimize queue for navmesh async jobs

See merge request OpenMW/openmw!4025
9 months ago
Sam Hellawell 2653b76db9 getTranslation/getTransformForNode refactor, unit tests 9 months ago
AnyOldName3 83e3718bed . c l a n g - f o r m a t 9 months ago
AnyOldName3 61364c874f Warn future me off wasting their time again 9 months ago
AnyOldName3 a7021bf9cc Clear std stream errors when reopening
Prior errors are no longer relevant.

Shouldn't make a difference unless you've tried printing something before the streams were set up.
9 months ago
Alexei Kotov 443e341ae7 Generalize unsized pixel format computation 9 months ago
Alexei Kotov 3c0c1717a9 Fix red-green normal map handling for terrain 9 months ago
Alexei Kotov 58afe1ba23 Support red-green normal maps 9 months ago
elsid 910c88325a
Add a setting to wait for all navmesh jobs on exit 9 months ago
elsid 50f4471750
Use R-tree for dynamic priority of navmesh async job 9 months ago
elsid 17bd571a65
Do not repost failed jobs
Failures should not happen except for some weird corner cases. Retrying is
unlikely to help in such situation.
9 months ago
elsid d6f3d34f2f
Remove tiles present on navmesh but outside desired area 9 months ago
elsid 61c69c5563
Use proper prefix for CollisionShapeType 9 months ago
elsid a1438f65fe
Set proper max tiles on initializing navmesh settings 9 months ago
AnyOldName3 1930bfeabb Support coloured terminal output on Windows
First try the modern Windowsy way, where we can directly query if escape sequences will be processed.
The function is available as far back as Windows 2000, but it just won't return the right flag until the Windows version is new enough.

If that fails, fall back to the Unixy way, as not all colour-supporting terminal emulators for Windows use the Win32 API to declare that capability.
The implementation isn't identical as isatty wasn't available without adding more headers, and we already have Windows.h in this file, so I might as well use the Win32 API instead of its POSIX-compatibility layer.
9 months ago
Evil Eye 6e79064a57 Fix editor oddities 9 months ago
psi29a f9e957ea0e Merge branch 'esm4scvr' into 'master'
ESM4: Make script local variable loading more reliable

See merge request OpenMW/openmw!3967
9 months ago
Evil Eye a4625ea784 Deduplicate dialogue filter parsing 9 months ago
Evil Eye fb4edda45d Validate INFO filters when loading the record 9 months ago
Sam Hellawell 8c2c66d59e .nif check, matrix mult feedback, auto usage, reuse NodeMap typedef 9 months ago
psi29a 8037a6e765 Merge branch 'portable-launcher' into 'master'
Portable Launcher (plus a whole slew of bugs fixes for problems I found that I suspect aren't on the tracker)

Closes #6846

See merge request OpenMW/openmw!3925
9 months ago
AnyOldName3 48f1f08537 Hide things that depend on present-but-inactive game files
https://gitlab.com/OpenMW/openmw/-/merge_requests/3925#note_1843962919
9 months ago
Sam Hellawell d23c10622d Use dynamic cast to check for bone 9 months ago
Sam Hellawell a51d560174 Move bone rename logic to ColladaDescriptionVisitor, undo formatting/refactoring 9 months ago
Sam Hellawell 2288a691d2 Replace osgAnimation bone underscore naming at load time, map bone instances, reset root bone transform each frame 9 months ago
AnyOldName3 bb3c22e4a5 Add and register SettingValue stream operators 9 months ago
psi29a 3da6b4f529 Merge branch 'more_stats' into 'master'
Report more stats in F4

See merge request OpenMW/openmw!3956
9 months ago
psi29a 43f2574406 Merge branch 'vaporeon' into 'master'
Make sunlight scattering and wobbly shores optional

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

See merge request OpenMW/openmw!3988
9 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
9 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
9 months ago
Sam Hellawell deb8894035 ESM::MagicEffect::blank() set the default to 1
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
9 months ago
Andrei Kortunov f2dc25e214 Optimize bitmap fonts loading 9 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
9 months ago
Dave Corley 2e68786331 Fix(CS): Actually allow unlocking doors ( #7899 ) 9 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
9 months ago
Mads Buvik Sandvei e0b11c14c2 Remove unused member mStackable 9 months ago
Sam Hellawell 7897ff7ac9 Fix weapon sheathing for non-nif meshes 9 months ago
psi29a 012d10703f Merge branch 'spellcast-refactor' into 'master'
Spellcast related Lua API + spellcasting/activespell refactor

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

See merge request OpenMW/openmw!3970
9 months ago
Cody Glassman a4dd9224df Restructure colormasks at higher level 9 months ago
Evil Eye 5a0aed3a78 Use more decomposition, string_view, and implicit sizes in ESM code 9 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
9 months ago
Alexei Kotov 63276e0f1f Merge branch 'avoid_copy' into 'master'
Follow-up for YAML API

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

See merge request OpenMW/openmw!3950
9 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
9 months ago
elsid 3358bc80bf Merge branch 'esm4fourcc' into 'master'
Get rid of ESM4::SubRecordTypes

See merge request OpenMW/openmw!3962
9 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.
9 months ago
Alexei Kotov 6b93479bd3 Get rid of ESM4::SubRecordTypes
All my homies hate ESM4::SubRecordTypes
10 months ago
Dave Corley fcff1a6739 Fix #7887, use actual instead of reported size for script data 10 months ago
Andrei Kortunov 2d3a8ca0fc Do not use an inner namespace 10 months ago
Andrei Kortunov cb831a5917 Add more includes just for sure 10 months ago
Andrei Kortunov 2523afe9c2 Use namespace instead of static class 10 months ago
Andrei Kortunov 8037ad7f00 Remove unused includes 10 months ago
psi29a 854b4f226b Merge branch 'fix_msvc_build' into 'master'
Fix build with MSVC 19.38

See merge request OpenMW/openmw!3960
10 months ago
Andrei Kortunov 4520ee465d Do not copy vector 10 months ago
elsid ee2cc8aeb7
Fix build with MSVC 19.38
components\detournavigator\navigator.hpp(44): error C3861: 'assert': identifier not found
10 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.
10 months ago
Andrei Kortunov 6da151cf77 Fix GCC build 10 months ago
psi29a 5d669f0470 Merge branch 'fix_ui_crashes' into 'master'
Another day, another UI crash fix

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

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

Closes #7590

See merge request OpenMW/openmw!3924
10 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
10 months ago
AnyOldName3 a06ab94a20 Canonicalise resolved representation of data directories 10 months ago
AnyOldName3 9638fbabb4 https://www.youtube.com/watch?v=2_6U9gkQeqY 10 months ago
AnyOldName3 ff3ffa13b6 Auto format 10 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.
10 months ago
uramer 68ed771816 Fix element detachment logic 10 months ago
uramer 2f40491065 Fix crash when destroying UI element in the same frame as creating it 10 months ago
Evil Eye b52f721318 Use getSubComposite to read AMBI 10 months ago
Andrei Kortunov 715efe892f Load YAML files via Lua (feature 7590) 10 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
10 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.
10 months ago
uramer b12f98db98 Don't destroy root widget for new elements 10 months ago
elsid 859d765921
Use normalized path for NifFileManager::get 10 months ago
elsid 3ea3eeb613
Use string_view for canOptimize 10 months ago
elsid a98ce7f76a
Replace std::filesystem::path by std::string_view in Files::getHash argument 10 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.
10 months ago
elsid cd3c3ebadb
Use VFS::Path::Normalized for ResourceManager cache key 10 months ago
psi29a b5b6744321 Merge branch 'hotfix_ui_update' into 'master'
Fix Lua UI updates

See merge request OpenMW/openmw!3936
10 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
10 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.
10 months ago
uramer af8662daee Detach Lua Elements properly from their parent 10 months ago
uramer 0f60052bb8 Set Element state in Element::create 10 months ago
psi29a 6f9ceff3f3 Merge branch 'windows_build' into 'master'
Add option to disable precompiled headers

See merge request OpenMW/openmw!3933
10 months ago
elsid cc35df9409
Use VFS::Path::Normalized for fx::Technique file path 10 months ago
elsid ffbeb5ab98
Build localization path using VFS::Path::Normalized 10 months ago
elsid 84adb0a148
Make VFS::Path::Normalized constructor from std::string_view explicit 10 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
10 months ago
psi29a f09f5c644c Merge branch 'update_setting_pages' into 'master'
Optimize setting group rendering

See merge request OpenMW/openmw!3929
10 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.
10 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.
10 months ago
Andrei Kortunov 5dcac4c48f Do not treat Alt-Tab as resolution change (bug 7866) 10 months ago
AnyOldName3 36f5c819bb capitulate 10 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.
10 months ago
AnyOldName3 ed23f48754 Actually erase the things we're removing
Caused by bad copy and paste
10 months ago
uramer 9ae61f1932 Fix child UI Elements created in the same frame as parent 10 months ago
elsid 5acfb07850
Fix build with OSG_USE_UTF8_FILENAME 10 months ago
Evil Eye 1499dd2654 Add getCompositeSize and handle NPC data 10 months ago
AnyOldName3 bf24bb71b1 Explicitly use std::strong_ordering
Otherwise it's ambiguous how to build <=> from <, == and >
10 months ago
AnyOldName3 1ae2cc82a1 I do not know how this escaped formatting locally. 10 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.
10 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
10 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
10 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
10 months ago
Evil Eye cef59e8928 Replace fixed size writeHNT calls with decomposition 10 months ago
Evil Eye 958f70736f Implement auto calculated potion values 10 months ago
AnyOldName3 b8cb757ca4 Oopsie 10 months ago
AnyOldName3 9e1334cc09 Resync composing and path openmw.cfg settings with options.cpp 10 months ago
psi29a be1e77c282 Merge branch 'fix-git-commit-updating' into 'master'
Fix git commit updating

See merge request OpenMW/openmw!3911
10 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
10 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.
10 months ago
Andrei Kortunov ddd0945645 Add a storage mode to drop section on game exit 10 months ago
Mads Buvik Sandvei c82c111ee1 Use correct index for Athletics_SwimOneSecond 10 months ago
AnyOldName3 f476301670 There's no such thing as the global data directory
That's what resources/vfs is for.
10 months ago
AnyOldName3 7d28788aee data-local is already unquoted when it's read 10 months ago
AnyOldName3 dbdecfe94b Use approved safety comment for path escaping explanation
I thought I'd got this one already
10 months ago
AnyOldName3 90966ecc47 Handle replace= lines properly in the launcher 10 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.
10 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
10 months ago
psi29a 619ccf7107 Merge branch 'decomposition' into 'master'
Use decompose to remove more instances of pragma pack

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

See merge request OpenMW/openmw!3903
10 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.
10 months ago
AnyOldName3 02ef7ae3cc Give up rearranging the CS 10 months ago
AnyOldName3 93a84b38ac Give git-version its name back 10 months ago
AnyOldName3 42c7fc8e92 Update 2 files
- /components/CMakeLists.txt
- /cmake/GitVersion.cmake
10 months ago
uramer 86a82ae3f1 Open matching version of documentation for Launcher Help 10 months ago
AnyOldName3 357bf3db61 Load all config files 10 months ago
Dave Corley 059191c840 Also apply hasWaterHeightSub for INTV 10 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
10 months ago
Alexei Kotov 01e0b25fd3 Merge branch 'coverity' into 'master'
Fix some Coverity complaints

See merge request OpenMW/openmw!3904
10 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 10 months ago
Evil Eye 7d7e8939ab Use ESM::decompose to handle WPDTstruct 10 months ago
Evil Eye ec1c6ee171 Use ESM::decompose to handle ENAMstruct 10 months ago
elsid ec9c829021
Use normalized path for correctSoundPath 10 months ago
elsid 92d57d6e46
Make Normalized constructor from const char* explicit 10 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
10 months ago
AnyOldName3 dec8d32b3a FIx static destruction order chaos 10 months ago
Andrei Kortunov cf6b6020a0 Move local variables 10 months ago
Andrei Kortunov fc1f244627 Add missing initialization 10 months ago
AnyOldName3 3fbd97ffc8 Remove unused <vector> header 10 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
10 months ago
Alexei Kotov 89d856d03e Merge branch 'use_is_directory_member' into 'master'
Use is_directory member function

See merge request OpenMW/openmw!3897
10 months ago
AnyOldName3 6406095bfb s p a n 10 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.
10 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.
10 months ago
AnyOldName3 36a75cdb29 Get the GLExtensions instance when a context is created 10 months ago
AnyOldName3 1717e696b1 Format before clang notices and sends me an angry email 10 months ago
AnyOldName3 db5a43db30 Allow top-level prefix to be found in the middle of a path 10 months ago
Evil Eye 0bab37327c Account for pre-0.46 saves storing a gold value of 0 for everything 10 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
10 months ago
elsid 38990b1fd2
Set components property after it is defined 10 months ago
Dave Corley ce2787e15e Cleanup(loadcell): Rename setHasWater to setHasWaterHeightSub 10 months ago
Dave Corley d04572ac84 Cleanup(loadcell): Rename mHasWater to mHasWaterHeightSub for clarity. 10 months ago
Dave Corley f95cad07f2 Cleanup(loadcell): Remove unused integer water flag 10 months ago
Dave Corley bb35f0366a Fix(loadcell): Save water height regardless of value, if the user actually adjusted it 10 months ago
Dave Corley 1b431bf633 Fix(editor): Don't save dirty water height values 10 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
10 months ago
psi29a 518f34c869 Merge branch 'bsa_archive' into 'master'
Cleanup and optimize BSA archives code

See merge request OpenMW/openmw!3876
10 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.
10 months ago
elsid c2ac1ce046
Use is_directory member function
To reduce the number of syscalls.
10 months ago
AnyOldName3 3335ccbc32 Capitulate 10 months ago
AnyOldName3 8c92f6ee87 Make uniform a signed int again 10 months ago
AnyOldName3 d282fdb77a Eliminate unused uniform 10 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.
10 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.
10 months ago
AnyOldName3 535c5e328a Affect correct texture units when disabling shadows for stateset
Knowing which are right required making the function non-static, so the shadow manager had to become a singleton as the results of passing it around to where it's needed were hellish.

I'm seeing a bunch of OpenGL errors when actually using this, so I'll investigate whether they're happening on master.
I'm hesitant to look into it too much, though, as I'm affected by https://gitlab.com/OpenMW/openmw/-/issues/7811, and also have the Windows setting enabled that turns driver timeouts into a BSOD so a kernel dump is collected that I can send to AMD.
10 months ago
Evil Eye 254b533512 Allow the NAM9 field to be used if COUN is omitted 10 months ago
psi29a 8c8fffc2c6 Merge branch 'fix_shared_library_build' into 'master'
Build fixes related to shared libraries and position independent code

See merge request OpenMW/openmw!3878
10 months ago
AnyOldName3 2c1c8bc8de Work around for listAllAvailablePlugins 10 months ago
psi29a e88e92d3aa Merge branch 'recursive_directory_iteration_errors' into 'master'
Add context to the errors on recursive iteration over directory

See merge request OpenMW/openmw!3872
10 months ago
psi29a 3369184c19 Merge branch 'lesspragmaticpackages' into 'master'
Use decompose to handle AI packages and data

See merge request OpenMW/openmw!3856
10 months ago
elsid efbc37d22f
Build components with position independent code only for Android
openmw is build as shared library with position independent code enabled there
so linked static libraries need to have this too.
10 months ago
elsid e2e1d913af
Remove redundant destructor 10 months ago
elsid 8c6e0866e0
Avoid seek for detecting BSA type
Seek is pretty expensive operation. Try to read first 12 bytes instead.
10 months ago
elsid cc9f9b53ba
Convert BsaVersion to enum class 10 months ago
elsid df077a2524
Simplify and reduce code duplication for BSA archive creation 10 months ago
elsid 1b1ed55762
Add context to the errors on recursive iteration over directory
To avoid showing users errors like:
recursive_directory_iterator::operator++: Access is denied.

And show something like this:
Failed to recursively iterate over "/home/elsid/.local/share/openmw/test_data"
when incrementing to the next item from
"/home/elsid/.local/share/openmw/test_data/permission_denied": Permission denied
10 months ago
elsid a2345194c8
Optimize lookup for a file in the BSA archive
Use binary search in sorted vector or normalized paths instead of linear search
in the original file struct. With number of files from 1k to 10k in vanilla
archives this gives some benefits.
10 months ago
psi29a a297a0e742 Merge branch 'init_filesystem_archive' into 'master'
Initialize FileSystemArchive index in constructor

See merge request OpenMW/openmw!3870
10 months ago
psi29a f9820e2061 Merge branch 'debugdrawdebugged' into 'master'
Try to uncursify debug primitive drawer (#7767)

Closes #7767

See merge request OpenMW/openmw!3852
11 months ago
elsid d147d1d250
Initialize FileSystemArchive index in constructor
It should be initialize for each created archive anyway. There is no good reason
to have additional complexity for lazy initialization. And it helps to catch
problems with specific directory when it's added to the VFS not when all are
added and index is built.
11 months ago
Alexei Kotov d9ee54ae98 DebugCustomDraw: Correct PerContextProgram use, clean up drawImplementation 11 months ago
psi29a 1280345296 Merge branch 'copy_qtbase' into 'master'
Copy qtbase translations

See merge request OpenMW/openmw!3840
11 months ago
Andrei Kortunov 9a7b9572fd Deploy base Qt translations when needed 11 months ago
uramer 08b7ee8a44 Test LuaUtil::safeGet preventing crash 11 months ago
uramer 550659c2d9 Fix loadVFS error handling 11 months ago
uramer aa4303fc38 Fix crash when throwing in index meta methods 11 months ago
psi29a 29c2042432 Merge branch 'lua_callback_crash' into 'master'
Lua Fix crash when passing a non-callback table to a callback argument

Closes #7827

See merge request OpenMW/openmw!3861
11 months ago
Epoch 6486f3f2cf Add option to use camera as sound listener 11 months ago
uramer 851e291501 Simplify and fix the storage subscribe test 11 months ago
uramer 35448bf0fe Fix crash when passing a non-callback table to a callback argument 11 months ago
psi29a 8d0a670f94 Merge branch 'vfs_normalized_path_2' into 'master'
Use normalized path for file archives indices

See merge request OpenMW/openmw!3830
11 months ago
psi29a a060a7297c Merge branch 'dehardcode-skillprogression' into 'master'
Lua: Dehardcode skill and level progression

See merge request OpenMW/openmw!3779
11 months ago
Evil Eye 75d0b6e355 Use decompose to handle AI packages and data 11 months ago
elsid 1e07935366
Make crashCatcherInstall no-op for Android
The crashcatcher.cpp is not linked on Android because it's not supported but the
function need to have some definition. Make it empty to avoid link failures.
11 months ago
Alexei Kotov 3301ebb2cb Merge branch 'localize_screenshot' into 'master'
Localize screenshot messages

See merge request OpenMW/openmw!3843
11 months ago
Alexei Kotov 4df62d53db Fix OSG boilerplate macro for DebugCustomDraw 11 months ago
Alexei Kotov 6a96cdaa31 Make DebugDrawer a Node 11 months ago
Alexei Kotov 9531b6983a Don't reallocate debug line primitives 11 months ago
Alexei Kotov f9498e6ea4 Make DebugDrawer a LightManager child, don't use VAO for lines
Fixes terrain lighting but currently breaks non-line primitive rendering in exteriors
11 months ago
Alexei Kotov 38ab09a52e Try to uncursify DebugDrawer scene representation 11 months ago
elsid a6657c18cc
Use normalized path for file archives indices 11 months ago
elsid 062d3e9c00
Add NormalizedView for normalized paths 11 months ago
elsid 1689c59546
Add tests for VFS::Path::Normalized 11 months ago
Andrei Kortunov 6760fa4945 Localize screenshot messages 11 months ago
elsid a7da604332
Update next tile_id when there is a duplicate in navmeshdb
Disable writes on failure to update next tile_id to avoid further errors.
11 months ago
Andrei Kortunov 66b2d428c8 Merge branch 'qt_localization' into 'master'
Localize Launcher and Wizard

See merge request OpenMW/openmw!3571
11 months ago
psi29a 9fc71bb7df Merge branch 'crash_catcher' into 'master'
Cleanup crash catcher code and support lldb

See merge request OpenMW/openmw!3792
11 months ago
jvoisin cdd73a1a19 Merge branch 'fix_far_away_navmesh_crash' into 'master'
Limit navmesh vertices coordinates values (#6574)

Closes #6574

See merge request OpenMW/openmw!3825
11 months ago
elsid e6196c782d
Limit navmesh vertices coordinates values
Float values with more than 22 significant fraction bits may cause out of bounds
access in recastnavigation on triangles rasterization. Prevent passing such
values there.
11 months ago
Alexei Kotov 8b47381162 Merge branch 'more_move' into 'master'
Fix some Coverity Scan complaints

See merge request OpenMW/openmw!3829
11 months ago
Zackhasacat 1338e884a9 Merge branch 'menuscripts' into 'master'
Add new Lua context: menu scripts

Closes #7805 and #7648

See merge request OpenMW/openmw!3464
11 months ago
Andrei Kortunov 225e834b88 Fix some Coverity Scan complaints 11 months ago
uramer b988db9bda Merge branch 'master' into menuscripts 11 months ago
Andrei Kortunov 66d1e036d2 Pass some arguments by references 11 months ago
Andrei Kortunov 7e345436f4 Localize Launcher and Wizard 11 months ago
psi29a ee8eb9d36e Merge branch 'localizable_errors' into 'master'
Make ContentSelector errors localizable

See merge request OpenMW/openmw!3821
11 months ago
psi29a 5ca8f7a00e Merge branch 'normalizedsun' into 'master'
Actually normalize the sun position exposed to post-processing

See merge request OpenMW/openmw!3820
11 months ago
Mads Buvik Sandvei 011d9d6493 Dehardcode skill and level progression 11 months ago
elsid f9b69623d3
Remove stateless encoder from ReadersCache
It was added by https://gitlab.com/OpenMW/openmw/-/merge_requests/2804 without a
good reason. There is already encoder available in the used context.
11 months ago
psi29a be6d063b94 Merge branch 'pointlessinisettings' into 'master'
Support Timescale Clouds and MaxNumberRipples INI settings (#7792, #7795)

Closes #7792 and #7795

See merge request OpenMW/openmw!3812
11 months ago
psi29a 435a4cb9ec Merge branch 'minusputback' into 'master'
Parse special characters that have been put back as names too

See merge request OpenMW/openmw!3804
11 months ago
psi29a 7450b11402 Merge branch 'vfs_normalized_path_1' into 'master'
Use normalized path for VFS manager and RecursiveDirectoryIterator

See merge request OpenMW/openmw!3806
11 months ago
Andrei Kortunov 43307bee28 Make ContentSelector errors localizable 11 months ago
Alexei Kotov 422e455157 Actually normalize the sun position exposed to post-processing 11 months ago
uramer 9cce2e39ba Merge branch 'master' into menuscripts 11 months ago
Mads Buvik Sandvei a94add741e Lua: Animation bindings 11 months ago
Alexei Kotov ad64c71753 Correct MaxNumberRipples and Timescale Clouds validation categories 11 months ago
elsid 70061329a1
Return Path::Normalized from RecursiveDirectoryIterator 11 months ago
elsid 9279138fb0
Accept normalized path by VFS::Manager functions 11 months ago
elsid d549cfd66b
Check path for being normalized 11 months ago
elsid 199d97d32a
Use forward declaration for VFS::Manager 11 months ago
Evil Eye 54429cd23b Parse special characters that have been put back as names too 11 months ago
jvoisin 940856b774 Merge branch 'ba2ext' into 'master'
Make BA2 extension hash calculation safer (#7784)

Closes #7784

See merge request OpenMW/openmw!3799
11 months ago
jvoisin ec6ac8058b Merge branch 'vfs_normalized_path' into 'master'
Add type for normalized VFS path and use for VFS::Manager file map key

See merge request OpenMW/openmw!3781
11 months ago
Alexei Kotov 84ab7afd44 Make BA2 extension hash calculation safer (#7784) 11 months ago
Andrei Kortunov 251d01304f Use move semantics for osg::ref_ptr 11 months ago
psi29a 0ad5829e5d Merge branch 'move_components' into 'master'
Move local variables in components

See merge request OpenMW/openmw!3790
11 months ago
psi29a f7c819a118 Merge branch 'waterculling' into 'master'
Don't use height cull callback when there's no terrain

See merge request OpenMW/openmw!3787
11 months ago
psi29a c23cd8e544 Merge branch 'umlautontherocks' into 'master'
Convert strings in nif files to utf8

Closes #7780

See merge request OpenMW/openmw!3783
11 months ago
elsid b96e32144c
Support lldb in crash catcher 11 months ago
elsid 0095cb604f
Handle sysctl errors without assert 11 months ago
elsid 4efc0e20a3
Report errors on handling the crash 11 months ago
elsid acb246cbf2
Report errors on printing gdb info 11 months ago
elsid 140cc53b55
Report errors on installing crash handler 11 months ago
elsid 2ef286b27a
Make sure function handling crash does not return 11 months ago
elsid fffc6101b7
Remove unnecessary nesting 11 months ago
elsid 55501a02c0
Define only one crashCatcherInstall function 11 months ago
elsid fc12728d25
Move crash_switch variable to cpp file 11 months ago
elsid 8348557893
Move crash handling out of crash handler installation 11 months ago
elsid 7763fe73d8
Make it clear handled signals are always the same 11 months ago
elsid d54bb5cb5a
Declare variables closer to where they are used 11 months ago
elsid d6f1fbe2c9
Remove unused user info function 11 months ago
elsid 388a73376c
Use std::optional for siginfo 11 months ago
elsid c95c8fcc36
Add missing description for SIGABRT 11 months ago
elsid 48c3268bcb
Reduce code duplication for finding signal description 11 months ago
elsid 98844a692d
Regroup crash catcher includes 11 months ago
Andrei Kortunov 87c9f395f1 Move local variables in components 11 months ago
Alexei Kotov e997c44db6 Restore unwrapped Bullet triangle shape shallow copying 11 months ago
Alexei Kotov ffa52dfe7c Don't use height cull callback when there's no terrain 11 months ago
psi29a 7c14bac7c2 Merge branch 'load_save_composites' into 'master'
Write AiSequence and Script data field by field via decompose function

See merge request OpenMW/openmw!3770
11 months ago
psi29a c84386aa4b Merge branch 'fix_navigator_update' into 'master'
Fix navmesh update on player changing tile

See merge request OpenMW/openmw!3756
11 months ago
psi29a 6b9fd12ab7 Merge branch 'fix_ubsan_warnings' into 'master'
Fix ubsan warnings

See merge request OpenMW/openmw!3772
11 months ago
elsid 35d9b18b4c
Add type for normalized VFS path and use for VFS::Manager file map key
This will reduce the number of path normalizations while more places will use
this type. In some cases it also will reduce number of temporary allocations for
new strings.

For now make conversion from and to std::string_view implicit to allow gradual
migration to this type.
12 months ago
Evil Eye 48db113149 Address feedback 12 months ago
Evil Eye 27fa411f4f Convert strings in nif files to utf8 12 months ago
elsid a2147d70cc
Use forward declaration for some VFS types
This will allow to save on preprocessed code size in the future changes.
12 months ago
elsid 4d6350539c
Move FindLowestUnusedTexUnitVisitor to unnamed namespace
It's not used anywhere except this translation unit so no need to make the
symbol available everywhere else.
12 months ago
elsid 6451750890
Write AiSequence and Script data field by field via decompose function
Use the same function to load and save to have single place with field order
definition. Use concepts for overload over different types.
12 months ago
psi29a 4f21ea2eae Merge branch 'rm_redundant_ctors' into 'master'
Remove redundant SizeProxy and RenderTarget constructors

See merge request OpenMW/openmw!3769
12 months ago
psi29a 8dbadd660e Merge branch 'pregenerate_glow_textures' into 'master'
Pregenerate glow texture names

See merge request OpenMW/openmw!3768
12 months ago
uramer b9afd7245c Create separate UI api tables for menu and player contexts 12 months ago
elsid dd706aab0e
Add missing SubPass::mMinMap initialization 12 months ago
AnyOldName3 e0eb3feb89 Use OSG_PLUGIN_PREFIX instead of CMAKE_SHARED_MODULE_PREFIX
Logic to generate it copied from OSG's CMake instead of guessed.
12 months ago
uramer 7cc0eae461 Fix Menu Lua settings reset between states 12 months ago
AnyOldName3 62f5c46f25 Split list in CMake instead of C++
That avoids the need for constexpr work, and therefore the need for an MSVC-specific extension
12 months ago
AnyOldName3 de107c6a98 Add missing _view 12 months ago
AnyOldName3 ef65f0c70d Make OSG plugin checker barely functional
* Work out what module filenames should be in CMake, and give those to C++
* Compare just the module filenames instead of the full strings
* Deal with OSG trying to support both UTF-8 and system-eight-bit-code-page file paths on Windows.
* Add a comment complaining about the constexpr situation.
* Use a stub implementation when using static OSG - apparently we don't actually support mixing and matching static and dynamic OSG plugins even though OSG itself does.
12 months ago
AnyOldName3 c2d1a4c861 Initial stab at OSG plugin checker
It doesn't work yet due to osgDB::listAllAvailablePlugins returning a list of paths to dynamic libraries.
That means:
* the check fails when the required plugin is linked statically.
* we're going to have to do something to slice up the filenames.
* there'll probably be unicode errors when the OpenMW installation path isn't representable by the current eight-bit code page on Windows.

Alternatively, we can switch to listing the required file extension support, and use osgDB::Registry::instance()->getReaderWriterList() and each element's supportedExtensions() function, but I don't think we've actually got that list of extensions anywhere and it might get desynced with the existing list of plugins if we add more.
12 months ago
elsid 1bfcfaff34
Use proper naming for member variable 12 months ago
elsid 35da9f8c50
Remove redundant SizeProxy and RenderTarget constructors 12 months ago
elsid 3ad79e3b3e
Pregenerate glow texture names
To avoid strings generation and allocations every time model is added to a
scene.
12 months ago
Evil Eye 1880894f4a Use ciEqual to detect missing content files 12 months ago
Evil Eye 2fc87efa8f Merge branch 'cleanup_navmesh_updater' into 'master'
Cleanup navmesh updater

See merge request OpenMW/openmw!3763
12 months ago
Yury Stepovikov 52623ddd7d Set MacOS current_path before reading configuration files [#7706] 12 months ago
uramer dd6017e81e Avoid making engine handler methods public 12 months ago
uramer 4ed2af7666 Merge branch 'master' into menuscripts 12 months ago
uramer 1afc7ecd58 Test Lua widgets for text inputs correctly 12 months ago
uramer 79deb5f559 Remove settings pages in Lua 12 months ago
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
Andrei Kortunov 0e1bb45345 Cleanup navmesh updater 12 months ago
Alexei Kotov 78d8cf86c3 Merge branch 'pickme' into 'master'
Override launcher file info with higher priority info

Closes #7733 and #7103

See merge request OpenMW/openmw!3743
12 months ago
Evil Eye d05f5e84ff Merge branch 'missing_assert' into 'master'
Add missing assertion

See merge request OpenMW/openmw!3751
12 months ago
Evil Eye 0db8026356 Stop adding and deleting rows 12 months ago
Evil Eye 672cefd594 Track checked EsmFile pointers instead of full paths 12 months ago
Evil Eye 521394d67b Override launcher file info with higher priority info 12 months ago
elsid 69cf507db8
Fix navmesh update on player changing tile
In cases when objects are not present on the scene (e.g. generated exterior
cells) navmesh is not updated because area that suppose to be covered with it
was not updated. It was updated only during cell change. This is a regression
from d15e1dca84.

Set TileCachedRecastMeshManager range on NavMeshManager update to make sure it
always covers correct area around player.

Return a union of objects, heightfields and water ranges from
getLimitedObjectsRange intersected with range provided above.
12 months ago
Andrei Kortunov d1a7dfee87 Add missing assertion 12 months ago
jvoisin 57066bcac1 Merge branch 'more_cleanup' into 'master'
Code cleanup

See merge request OpenMW/openmw!3746
12 months ago
uramer a6e2ceebb8 Don't clear menu UI on game load 12 months ago