1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 19:59:55 +00:00
Commit graph

33887 commits

Author SHA1 Message Date
elsid
ee2cc8aeb7
Fix build with MSVC 19.38
components\detournavigator\navigator.hpp(44): error C3861: 'assert': identifier not found
2024-03-16 13:09:16 +01:00
Sam Hellawell
a62da201e5 check for land index not -1, fix warning
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
2024-03-16 09:02:47 +00:00
Sam Hellawell
5fca45565c Feature: display different brush for land vs water 2024-03-16 07:48:40 +00:00
Sam Hellawell
aa0c9fb4cb Fix: cannot drag region into map, map columns are rectangular 2024-03-16 07:48:40 +00:00
elsid
9ae7b542c6
Fix warning: -Wmaybe-uninitialized
In file included from apps/opencs/model/world/pathgrid.hpp:7,
                 from apps/opencs/model/world/idcollection.hpp:15,
                 from apps/opencs/model/world/idcollection.cpp:1:
In constructor ‘constexpr ESM::Pathgrid::Pathgrid(ESM::Pathgrid&&)’,
    inlined from ‘constexpr CSMWorld::Pathgrid::Pathgrid(CSMWorld::Pathgrid&&)’ at apps/opencs/model/world/pathgrid.hpp:24:12,
    inlined from ‘constexpr CSMWorld::Record<CSMWorld::Pathgrid>::Record(CSMWorld::Record<CSMWorld::Pathgrid>&&)’ at apps/opencs/model/world/record.hpp:39:12,
    inlined from ‘std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = CSMWorld::Record<CSMWorld::Pathgrid>; _Args = {CSMWorld::Record<CSMWorld::Pathgrid>}]’ at /usr/include/c++/13.2.1/bits/unique_ptr.h:1070:30,
    inlined from ‘std::unique_ptr<CSMWorld::RecordBase> CSMWorld::Record<ESXRecordT>::modifiedCopy() const [with ESXRecordT = CSMWorld::Pathgrid]’ at apps/opencs/model/world/record.hpp:92:116:
components/esm3/loadpgrd.hpp:19:12: warning: ‘<unnamed>.CSMWorld::Record<CSMWorld::Pathgrid>::mBase.CSMWorld::Pathgrid::<unnamed>.ESM::Pathgrid::mData’ may be used uninitialized [-Wmaybe-uninitialized]
   19 |     struct Pathgrid
      |            ^~~~~~~~
In file included from apps/opencs/model/world/idcollection.hpp:8:
apps/opencs/model/world/record.hpp: In member function ‘std::unique_ptr<CSMWorld::RecordBase> CSMWorld::Record<ESXRecordT>::modifiedCopy() const [with ESXRecordT = CSMWorld::Pathgrid]’:
apps/opencs/model/world/record.hpp:92:53: note: ‘<anonymous>’ declared here
   92 |         return std::make_unique<Record<ESXRecordT>>(Record<ESXRecordT>(State_ModifiedOnly, nullptr, &(this->get())));
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-03-16 02:34:50 +01:00
elsid
9b412bc802
Fix benchmark warning: -Wdeprecated-declarations
Example:

apps/benchmarks/settings/access.cpp: In function ‘void {anonymous}::localStatic(benchmark::State&)’:
apps/benchmarks/settings/access.cpp:43:37: warning: ‘typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type benchmark::DoNotOptimize(const Tp&) [with Tp = float; typename std::enable_if<(std::is_trivially_copyable<_Tp>::value && (sizeof (Tp) <= sizeof (Tp*)))>::type = void]’ is deprecated: The const-ref version of this method can permit undesired compiler optimizations in benchmarks [-Wdeprecated-declarations]
   43 |             benchmark::DoNotOptimize(v);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~^~~
2024-03-16 01:58:12 +01:00
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.
2024-03-16 00:17:13 +01:00
elsid
2b53c2335f
Support printing stats table in json format 2024-03-15 21:26:03 +01:00
Alexei Kotov
2a41811c83 Merge branch 'buildifx' into 'master'
Fix GCC build

See merge request OpenMW/openmw!3953
2024-03-15 18:16:29 +00:00
AnyOldName3
ddb2c15bc9 Review 2024-03-15 16:31:02 +00:00
Andrei Kortunov
6da151cf77 Fix GCC build 2024-03-15 20:12:47 +04:00
Andrei Kortunov
009ccca978 Modify sound API permissions 2024-03-15 19:48:43 +04:00
AnyOldName3
b5f61a119a min 2024-03-15 13:42:28 +00:00
psi29a
5d669f0470 Merge branch 'fix_ui_crashes' into 'master'
Another day, another UI crash fix

See merge request OpenMW/openmw!3949
2024-03-15 11:03:21 +00:00
psi29a
090e57b27c Merge branch 'esm3structs' into 'master'
Replace fixed size writeHNT calls with decomposition

See merge request OpenMW/openmw!3914
2024-03-15 11:02:42 +00:00
psi29a
d746918563 Merge branch 'yaml_parse' into 'master'
Load YAML files via Lua

Closes #7590

See merge request OpenMW/openmw!3924
2024-03-15 11:02:05 +00:00
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
2024-03-15 08:36:02 +00:00
AnyOldName3
dd18e17c97 And now Clang's noticed questionable type conversions 2024-03-15 00:47:09 +00:00
AnyOldName3
a06ab94a20 Canonicalise resolved representation of data directories 2024-03-15 00:42:15 +00:00
AnyOldName3
9638fbabb4 https://www.youtube.com/watch?v=2_6U9gkQeqY 2024-03-15 00:11:19 +00:00
AnyOldName3
ff3ffa13b6 Auto format 2024-03-14 23:54:22 +00:00
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.
2024-03-14 23:39:33 +00:00
uramer
68ed771816 Fix element detachment logic 2024-03-14 20:28:12 +01:00
uramer
2f40491065 Fix crash when destroying UI element in the same frame as creating it 2024-03-14 18:08:18 +01:00
Evil Eye
b52f721318 Use getSubComposite to read AMBI 2024-03-14 17:08:23 +01:00
Andrei Kortunov
715efe892f Load YAML files via Lua (feature 7590) 2024-03-14 16:29:21 +04:00
psi29a
2764d8ceff Merge branch 'fix_destroying_new_elements' into 'master'
Don't destroy root widget for new elements

See merge request OpenMW/openmw!3947
2024-03-14 08:37:13 +00:00
Alexei Kotov
288a911ece Merge branch 'vfs_normalized_path_5' into 'master'
Use normalized path for NifFileManager::get

See merge request OpenMW/openmw!3944
2024-03-13 19:18:39 +00:00
Alexei Kotov
86a47acc39 Merge branch 'chancywind' into 'master'
Roll for each region sound

Closes #7872

See merge request OpenMW/openmw!3935
2024-03-13 19:16:14 +00:00
psi29a
f06b93d019 Merge branch '1.0milestone' into 'master'
Replace readme 1.0 label link with 1.0 milestone link (#7876)

Closes #7876

See merge request OpenMW/openmw!3946
2024-03-13 07:56:54 +00:00
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.
2024-03-12 23:30:11 +00:00
Evil Eye
0fdc432eb2 Format probability 2024-03-12 20:09:04 +01:00
Evil Eye
c0578613af Remove superfluous members 2024-03-12 20:09:04 +01:00
Evil Eye
1d69d38081 Add an actual probability column 2024-03-12 20:09:04 +01:00
Evil Eye
f9da2b6b26 Roll for each region sound 2024-03-12 20:09:02 +01:00
uramer
b12f98db98 Don't destroy root widget for new elements 2024-03-12 17:48:42 +01:00
Zackhasacat
59a25291f8 Fix errors 2024-03-12 07:29:48 -05:00
Zackhasacat
8b75932f50 Merge branch 'master' of gitlab.com:openmw/openmw into fix_global_iteration 2024-03-12 06:54:15 -05:00
psi29a
dce0a9e11e Merge branch 'sea-cache' into 'master'
MSVC CCache support

See merge request OpenMW/openmw!3938
2024-03-12 08:36:17 +00:00
psi29a
df1be7102f Merge branch 'resolution_follow_up' into 'master'
Partially revert 5dcac4c48f

See merge request OpenMW/openmw!3940
2024-03-12 08:17:18 +00:00
Alexei Kotov
75d4ea5d5d Replace readme 1.0 label link with 1.0 milestone link (#7876) 2024-03-12 04:03:04 +03:00
Alexei Kotov
cdbe6adfc3 Fix instance selection mode destruction (#7447) 2024-03-12 03:39:14 +03:00
elsid
859d765921
Use normalized path for NifFileManager::get 2024-03-11 22:07:37 +01:00
elsid
3ea3eeb613
Use string_view for canOptimize 2024-03-11 22:07:37 +01:00
elsid
a98ce7f76a
Replace std::filesystem::path by std::string_view in Files::getHash argument 2024-03-11 22:07:37 +01:00
elsid
79b73e45a1
Replace std::filesystem::path by std::string and std::string_view in nif code
It's used only for error reporting.
2024-03-11 22:07:37 +01:00
elsid
cd3c3ebadb
Use VFS::Path::Normalized for ResourceManager cache key 2024-03-11 22:07:36 +01:00
Alexei Kotov
6232b4f9e8 Reimplement the Settings window as a normal window (#7845, #7870) 2024-03-11 23:48:44 +03:00
psi29a
b5b6744321 Merge branch 'hotfix_ui_update' into 'master'
Fix Lua UI updates

See merge request OpenMW/openmw!3936
2024-03-11 11:14:26 +00:00
psi29a
0557a649ce Merge branch 'skill-used-rework' into 'master'
Rewrite SkillProgression.skillUsed to allow directly adding xp

See merge request OpenMW/openmw!3927
2024-03-11 09:48:14 +00:00