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

556 commits

Author SHA1 Message Date
elsid
2a49919b53
Move esm3terrain to esmterrain 2023-08-06 19:17:44 +02:00
Petr Mikheev
5d54ca6fdb Refactor components/esm4 2023-08-05 13:12:24 +02:00
psi29a
c290754077 Revert "Merge branch 'loadSSEAlchemyTable' into 'master'"
This reverts merge request !3267
2023-08-03 19:55:06 +00:00
psi29a
5160fbc2a0 Merge branch 'fixedtimestamp' into 'master'
Move TimeStamp to ESM3 and remove sized reads

See merge request OpenMW/openmw!3295
2023-08-02 08:11:33 +00:00
Evil Eye
79b3855c5b Move TimeStamp to ESM3 and remove sized reads 2023-07-30 11:37:32 +02:00
Petr Mikheev
2b601eea6d Fix crash related to async content loading (#7508) 2023-07-29 21:13:57 +02:00
psi29a
81deb3796b Merge branch 'loadSSEAlchemyTable' into 'master'
Load SSE alchemy table

See merge request OpenMW/openmw!3267
2023-07-28 07:46:20 +00:00
alekulyn
d2896945e8 Load SSE alchemy table 2023-07-28 07:46:20 +00:00
Petr Mikheev
9b511fdf7a Load ESM4 actors 2023-07-26 11:47:50 +02:00
AnyOldName3
34fcfb63cf Eliminate redundant version checks 2023-07-20 00:43:56 +01:00
AnyOldName3
1bdcb5d6d9 Share the dump directory for crash and freeze dumps
This means the shared memory struct is just 255 bytes longer than a few
commits ago instead of 32K.

Also introduce a function for putting path strings in the shared memory
as there was too much copied and pasted code and it was error-prone.

Also free some handles once we're done with them so they don't leak.
2023-07-11 22:22:26 +01:00
elsid
11204d35d6
Use zlib directly for ESM4
Fallback to decompression by block of fixed size when decompressing the
whole archive fails.
2023-06-10 00:12:57 +02:00
florent.teppe
e0fa15b727 Abstracted Land data that can be used by esm3 and esm4. 2023-05-29 11:31:37 +02:00
glassmancody.info
a7b7f99d72 Expose game object's bounding box in lua api 2023-05-18 11:10:10 -07:00
Bret Curtis
0db31207dc remove remaining boost::filesystem cruft 2023-04-25 16:15:04 +02:00
elsid
7a7c20d49e
Define single UpdateGuard type in a separate file 2023-04-22 13:22:07 +02:00
elsid
2cbbdc2879
Add missing files to components/detournavigator list 2023-04-21 15:36:54 +02:00
psi29a
ad25e9b154 Merge branch 'settings_storage' into 'master'
Typed settings storage (#6876)

See merge request OpenMW/openmw!2651
2023-04-10 10:36:15 +00:00
Petr Mikheev
f09a689a4f Merge ESM::RefNum and ESM4::FormId 2023-04-09 00:23:32 +02:00
psi29a
aad9ce53db Merge branch 'esm4_gmst' into 'master'
Support loading ESM4 GMST records

See merge request OpenMW/openmw!2892
2023-04-04 09:51:02 +00:00
elsid
dbed00842e
Split components/esm4/common.hpp header 2023-04-04 10:12:20 +02:00
elsid
87ac85223a
Support loading ESM4 GMST records 2023-04-04 09:59:35 +02:00
florent.teppe
21bd28542a Applies review advice
2d coord hash moved to hash.hpp file
format version adds suffix to be more coherent
don't use ESM::RefId::sEmpty
RefId equality with string_view, conversion to refId unecessary
action teleport remove test that mCellId is empty
removes some const references, when copy is enough
invalid refid => empty refid
removes useless change
2023-04-03 14:17:35 +02:00
florent.teppe
d782d37ee2 Make sure Vec2iRefId is trivially copyable on GCC 11.3
std::pair<int, int> isn't trivially copyable on some compilers
so a specific struct is defined, it's an int pair, but it should be recognised by GCC 11.3 as trivially copyable

Vec2iRefId => ESM3ExteriorCellRefId

more explcit name and use mX,mY instead of pair
renamed files and enum
2023-04-03 14:17:31 +02:00
florent.teppe
4c15064a83 Create new Vec2i RefId for ESM3 exterior cells.
Applies the necessary changes to use !2708 for the new Id type
2023-04-03 14:17:16 +02:00
elsid
db7d0adfe8
Define settings values based on documentation
Using docs/source/reference/modding/settings/*.rst and
files/settings-default.cfg files content.
2023-03-28 20:47:34 +02:00
elsid
3bad40153c
Define typed settings storage with single time initialization
To make sure loaded settings have valid values doing the check once per loading.
And to make access more efficient.
2023-03-28 20:47:34 +02:00
elsid
b7fdca0fe6
Use serialized ESM::RefId for Lua records 2023-03-25 18:19:46 +01:00
elsid
e6cf516e12
Support index RefId as pair of record type and std::uint32_t 2023-03-19 17:20:48 +01:00
elsid
86293af084
Support generated RefId as std::uint64_t 2023-03-19 17:20:48 +01:00
elsid
069d4255b9
Make ESM::RefId to be fixed size cheap to copy
Use std::variant. Store refId strings in unordered_set and use pointer to an
item there. Inserts to unordered_set do not invalidate pointers to values so the
pointer is always valid. Elements are not removed. Assume there is finite number
of string refIds.
2023-03-19 17:20:43 +01:00
elsid
e892c62b10
Fix loading, inserting and moving topic info records
Topic info records need to have specific order defined via mNext and mPrev
fields (next and previous records). When loading multiple files a record may be
inserted into middle of the topic but neighborhood records may not be aware of
it. Having the order it's possible to move the records within one topic.

Sort the record once after loading all content files but preserve the order for
all other operations. Use std::map to group info ids by topic to make sure the
topics order is stable. Keep order within a topic for info ids on loading new
records. Use this order later for sorting the records.
2023-03-13 21:57:38 +01:00
elsid
1cc4909144
Add --coverage to components_qt, benchmarks and openmw-cs 2023-03-10 21:36:12 +01:00
elsid
1857d8a68c
Use target_compile_options to add --coverage 2023-03-10 15:34:08 +01:00
elsid
cc066efa11
Fix identation in CMakeLists.txt 2023-03-10 15:28:06 +01:00
Cédric Mocquillon
24272d07bf Share generateHash used in ba2dx10file and ba2gnrlfile 2023-03-03 17:09:35 +01:00
Cédric Mocquillon
974799c011 Handle DX10 case of ba2 format 2023-03-02 18:40:44 +01:00
Cédric Mocquillon
c1fbe90953 Handle GNRL case of ba2 format 2023-03-02 18:19:58 +01:00
Petr Mikheev
71ba7b88e2 Move asyncpackage from apps/openmw/mwlua to components/lua 2023-02-14 20:03:32 +01:00
psi29a
944931c9bf Merge branch 'load_esm4_lights' into 'master'
Adds ESM4 light into ESM4 Cells

See merge request OpenMW/openmw!2692
2023-02-07 16:50:10 +00:00
florent.teppe
486d15b19e moved light common to its own file
moved esm4light to it's own file
2023-02-07 16:29:17 +01:00
psi29a
15b3af92df Merge branch 'macos_lua_fix' into 'master'
make sure lua works with macos packages

See merge request OpenMW/openmw!2687
2023-02-06 18:53:19 +00:00
psi29a
4f001d8736 Merge branch 'qt6' into 'master'
Add an initial Qt6 support

See merge request OpenMW/openmw!2684
2023-02-06 16:55:20 +00:00
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
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
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
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
uramer
bbbef96087 Switch to loadInternalLib 2023-01-31 19:50:33 +01:00
uramer
fc1430af95 Move implementation of UI Content to Lua 2023-01-29 17:07:38 +01:00
elsid
d541436b15
Support parent, type and value fields in esmtool for ESM4 2023-01-29 03:02:00 +01:00
florent.teppe
23614ae2ae Renamed esm3esm4bridge => esmbridge 2023-01-27 18:40:15 +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
c896a2ca48 Crashfix on launch 2023-01-26 22:37:32 +01:00
florent.teppe
562e129bd0 encapsulations of esm3 cell and esm4 cells. 2023-01-26 22:37:31 +01:00
Andrei Kortunov
8da93d4b12 Setup utf8qtextstream in the way consistent with other Qt components 2023-01-13 13:10:34 +04:00
Andrei Kortunov
bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2023-01-12 15:39:50 +04:00
florent.teppe
e9190bedc8 Reverts useless CmakeList formatting 2023-01-02 18:35: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
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
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
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
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
elsid
89884fae0b
Add link dependencies to libosgSim and collada-dom 2022-11-14 12:04:58 +01:00
Petr Mikheev
3697c9266b Separate l10n manager from lua 2022-10-07 17:19:04 +02:00
elsid
409f83a149
Use raw string literal for error marker definition 2022-09-12 21:00:45 +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
florent.teppe
2a980ecb50 cleaned some code and fixed some naming issues
Moved debug draw to components, fixed some whitespace issues, added include guard

fixed uniform name, removed old files

Fixes some more whitespace weirdness
2022-09-11 17:53:53 +02:00
psi29a
29f3de30c2 Merge branch 'master' into 'cellstore_refactor'
# Conflicts:
#   apps/openmw/mwworld/scene.cpp
2022-09-11 15:03:37 +00:00
Project579
ca14fc00dc Added dedicated functions for conversions between QString and std::filesystem::path. 2022-09-11 14:41:21 +02:00
Project579
a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2022-09-11 14:41:20 +02:00
Project579
4bb07282c9 Replace all remaining occurrences of boost::filesystem with std::filesystem. 2022-09-11 02:19:00 +02:00
florent.teppe
256d8a699a moves one function from tuplemeta.hpp to newly created tuplehelpers.hpp 2022-09-10 20:13:18 +02:00
elsid
ac1688f9c1
Remove ESM::Reader base class
This class does not serve any useful purpose now. It was added as a first step
in attempt to define common interface for ESM3 and ESM4 readers. But this is not
going to happen.
2022-09-10 15:17:49 +02:00
elsid
d15e1dca84
Use R-tree for objects to be used for navmesh generation
Instead of storing a set of objects per tile.
2022-09-07 22:51:56 +02:00
elsid
c15848932b
Separate reading navigator stats and reporting 2022-08-28 14:52:34 +02:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
elsid
8b8e4f78b6
Support cylinder and rotating box collision shape types for actors
Cylinder collision shape should give the best consistency between physics
simulation and pathfinding. Rotating box is already used by some actors, so
add it to have the same collision shape type for all actors.
2022-07-30 14:28:21 +02:00
elsid
0614b82452
Restore UnrefQueue to destruct animation asynchronously 2022-07-24 21:08:43 +02:00
ζeh Matt
ddf43ec42f
Move structs into separate headers, cleanup includes, cleanup forwarders 2022-07-18 19:15:03 +03:00
ζeh Matt
ce556ba0cc
Remove obsolete LowLevelFile 2022-07-18 16:41:43 +03:00
ζeh Matt
03302a8f5b
Conditionally build cpp for platform, remove obsolete header 2022-07-17 18:40:27 +03:00
ζeh Matt
1b70ff775d
Move platform specific file code into platform and cleanup LowLevelFile 2022-07-16 20:40:42 +03:00
elsid
7e6c13630a Use target_precompile_headers for the most expensive headers 2022-07-01 14:05:17 +00:00
glassmancody.info
b09411d396 allow soft particles on meshes and add extra data extensions 2022-06-29 18:15:12 -07:00
Nelsson Huotari
334c6dde0b custom class for osgAnimation::RigGeometry, Collada animated deforming body parts 2022-06-21 15:27:34 +00:00
ζeh Matt
d5ec959449
Create platform component for platform specific things 2022-06-06 20:45:51 +03:00
elsid
3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
2022-06-03 01:29:03 +02:00
elsid
ea295a2ac3
Fix build with lld linker
Boost.Filesystem started to depend on Boost.Atomic on 1.77.0 version but lld
can't find library on its own:

libboost_atomic.so.1.79.0 => not found
2022-05-22 15:27:48 +02:00
cody glassman
04843fed6d moddable post-processing pipeline 2022-05-15 10:03:58 -07:00
madsbuvi
dd5901d351 Initial commit
Multiview shaders.

Refactor Frustum management

Rewrite shared shadow map

cull mask should respect stereo

Stereo savegame screencap

LocalMap refactoring

use the vertex buffer hint instead of the display list patch to enable/disable display lists

Character preview fixes
2022-04-28 21:05:34 +02:00
elsid
d2510284ec
Support TES4 in esmtool dump 2022-04-25 17:35:26 +02:00
elsid
9d6d0c6ffb
Move ConstrainedStreamBuf into separate file 2022-04-22 18:27:17 +02:00
elsid
b09570692e
Use ifstream for ESMReader
ESMReader reads the whole file, there is no need in the ConstrainedFileStream.
2022-04-15 02:58:57 +02:00
Benjamin Winger
21ffbcc4b4 Lua i18n updates 2022-04-10 07:57:02 +00:00
psi29a
fc5605fc7f Merge branch 'navmeshtool_binary_log' into 'master'
Send status of navmeshtool to launcher using type binary messages

See merge request OpenMW/openmw!1630
2022-04-06 23:40:45 +00:00
uramer
788745e004 Make coordinate calculation more robust, implement Flex widget type 2022-04-04 23:10:03 +02:00
elsid
2d5ccc804b
Exchange binary messages between navmeshtool and launcher 2022-03-30 19:24:54 +02:00
Petr Mikheev
fa115418eb [Lua] Remove queries 2022-03-15 23:35:36 +01:00