Commit Graph

568 Commits (6090bfcdab36c7fd4a008c463782c11a10fedafb)

Author SHA1 Message Date
Petr Mikheev 71ba7b88e2 Move asyncpackage from apps/openmw/mwlua to components/lua 2 years ago
psi29a 944931c9bf Merge branch 'load_esm4_lights' into 'master'
Adds ESM4 light into ESM4 Cells

See merge request OpenMW/openmw!2692
2 years ago
florent.teppe 486d15b19e moved light common to its own file
moved esm4light to it's own file
2 years ago
psi29a 15b3af92df Merge branch 'macos_lua_fix' into 'master'
make sure lua works with macos packages

See merge request OpenMW/openmw!2687
2 years ago
psi29a 4f001d8736 Merge branch 'qt6' into 'master'
Add an initial Qt6 support

See merge request OpenMW/openmw!2684
2 years ago
Andrei Kortunov 7e2aedf637 Add an initial Qt6 support 2 years ago
Bret Curtis a708fb4a5c make sure lua works with macos packages 2 years ago
psi29a 4032c447e9 Merge branch 'load-ESM4-Cell' into 'master'
Can load and coc into an interrior oblivion cell

See merge request OpenMW/openmw!2647
2 years ago
psi29a aee7716c3a Merge branch 'launcher_typed_settings' into 'master'
Typed launcher settings

See merge request OpenMW/openmw!2650
2 years ago
psi29a 68b3b90255 Merge branch 'ui_content_leak' into 'master'
Move implementation of UI Content to Lua (#7155)

See merge request OpenMW/openmw!2661
2 years ago
uramer bbbef96087 Switch to loadInternalLib 2 years ago
uramer fc1430af95 Move implementation of UI Content to Lua 2 years ago
elsid d541436b15
Support parent, type and value fields in esmtool for ESM4 2 years ago
florent.teppe 23614ae2ae Renamed esm3esm4bridge => esmbridge 2 years ago
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.
2 years ago
elsid 0961720835
Join path components using path::operator/ instead of string::operator+ 2 years ago
florent.teppe c896a2ca48 Crashfix on launch 2 years ago
florent.teppe 562e129bd0 encapsulations of esm3 cell and esm4 cells. 2 years ago
Andrei Kortunov 8da93d4b12 Setup utf8qtextstream in the way consistent with other Qt components 2 years ago
Andrei Kortunov bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2 years ago
florent.teppe e9190bedc8 Reverts useless CmakeList formatting 2 years ago
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
2 years ago
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
2 years ago
fteppe 62d8fe3fc2 changed a few hardcoded refIds used in mutliple places to be defined only once in a variable 2 years ago
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!
2 years ago
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.
2 years ago
elsid 89884fae0b
Add link dependencies to libosgSim and collada-dom 2 years ago
Petr Mikheev 3697c9266b Separate l10n manager from lua 2 years ago
elsid 409f83a149
Use raw string literal for error marker definition 2 years ago
psi29a 435eacdaad Merge branch 'debug_draw_commands' into 'master'
API to draw primitives

See merge request OpenMW/openmw!2345
2 years ago
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
2 years ago
psi29a 29f3de30c2 Merge branch 'master' into 'cellstore_refactor'
# Conflicts:
#   apps/openmw/mwworld/scene.cpp
2 years ago
Project579 ca14fc00dc Added dedicated functions for conversions between QString and std::filesystem::path. 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 4bb07282c9 Replace all remaining occurrences of boost::filesystem with std::filesystem. 2 years ago
florent.teppe 256d8a699a moves one function from tuplemeta.hpp to newly created tuplehelpers.hpp 2 years ago
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.
2 years ago
elsid d15e1dca84
Use R-tree for objects to be used for navmesh generation
Instead of storing a set of objects per tile.
2 years ago
elsid c15848932b
Separate reading navigator stats and reporting 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
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.
2 years ago
elsid 0614b82452
Restore UnrefQueue to destruct animation asynchronously 2 years ago
ζeh Matt ddf43ec42f
Move structs into separate headers, cleanup includes, cleanup forwarders 2 years ago
ζeh Matt ce556ba0cc
Remove obsolete LowLevelFile 2 years ago
ζeh Matt 03302a8f5b
Conditionally build cpp for platform, remove obsolete header 2 years ago
ζeh Matt 1b70ff775d
Move platform specific file code into platform and cleanup LowLevelFile 2 years ago
elsid 7e6c13630a Use target_precompile_headers for the most expensive headers 3 years ago
glassmancody.info b09411d396 allow soft particles on meshes and add extra data extensions 3 years ago
Nelsson Huotari 334c6dde0b custom class for osgAnimation::RigGeometry, Collada animated deforming body parts 3 years ago
ζeh Matt d5ec959449
Create platform component for platform specific things 3 years ago
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.
3 years ago
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
3 years ago
cody glassman 04843fed6d moddable post-processing pipeline 3 years ago
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
3 years ago
elsid d2510284ec
Support TES4 in esmtool dump 3 years ago
elsid 9d6d0c6ffb
Move ConstrainedStreamBuf into separate file 3 years ago
elsid b09570692e
Use ifstream for ESMReader
ESMReader reads the whole file, there is no need in the ConstrainedFileStream.
3 years ago
Benjamin Winger 21ffbcc4b4 Lua i18n updates 3 years ago
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
3 years ago
uramer 788745e004 Make coordinate calculation more robust, implement Flex widget type 3 years ago
elsid 2d5ccc804b
Exchange binary messages between navmeshtool and launcher 3 years ago
Petr Mikheev fa115418eb [Lua] Remove queries 3 years ago
uramer e092ee2624 Document the Lua Image widget, add UI texture resources 3 years ago
jvoisin a55f1ad103 Merge branch 'bullet_object_tool' into 'master'
Add a tool to load and print information about all bullet objects in all cells

See merge request OpenMW/openmw!1627
3 years ago
elsid 57c1f2e231
Make sure everything compiles in ESM4 3 years ago
Bret Curtis 0f43455dc3 merge in master 3 years ago
uramer 581c3f4882 Update and document Lua Text and TextEdit widget types, fix some issues with Lua UI 3 years ago
elsid e7f3524924
Add a tool to load and print information about all bullet objects in all cells 3 years ago
uramer 67641dcdb7 Fix compile errors 3 years ago
uramer f07f05ddd3 Add Container widget type, use it to make Adapter code less hacky 3 years ago
uramer 086a7d9bc5 Wrap Lua settings widgets into an Adapter widget 3 years ago
uramer fba82eb1a7 Script settings tab 3 years ago
cc9cii ba3ae448d4 Initial import of esm4 by cc9cii 3 years ago
Petr Mikheev 53f2dfd1c0 Merge branch 'lua_ui_templates' into 'master'
Lua UI templates

See merge request OpenMW/openmw!1475
3 years ago
uramer 960dd1f708 Lua UI templates 3 years ago
psi29a 6f7a067e0c Merge branch 'esmrename' into 'master'
esm refactor work

See merge request OpenMW/openmw!1575
3 years ago
elsid ecc654a369 Limit and filter navmesh input (#5858) 3 years ago
Bret Curtis cdbab2325f rename esmterrain to esm3terrain 3 years ago
Bret Curtis d1fb854521 move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4
esm typo

esm typo
3 years ago
Petr Mikheev 9d0e427ec1 Merge branch 'dispose_lua_ui_correctly' into 'master'
Dispose Lua UI elements correctly

See merge request OpenMW/openmw!1561
3 years ago
uramer cc528d2e08 Dispose Lua UI elements correctly 3 years ago
uramer d1d8f058ac Lua bindings for Colours 3 years ago
Petr Mikheev a182fdeea1 Permanent storage for Lua data 3 years ago
Petr Mikheev 0f246e7365 Use a separate instance of Lua i18n for every context 3 years ago
uramer c865114b9b Lua UI Layers 3 years ago
elsid c9b8ba7b46
Read navmesh tile data from database
When tile is not found in memory cache try to find it in the database.
3 years ago
elsid 953a4c5550
Add a binary to generate navmesh from content files
Load content files based on the engine config files. Generate navmesh per cell
for all cells and store into SQLite database.
3 years ago
elsid 5a6b39f8e0
Store mesh source data in recast mesh 3 years ago
psi29a 4883cbf590 Merge branch 'detain-hash-selectively-reluctant' into 'master'
Get rid of EscapeHashX classes option 5 (attempt 2): Use boost::filesystem::path rules if the path starts with ", and consume the whole thing verbatim otherwise

Closes #5804

See merge request OpenMW/openmw!1436
3 years ago
AnyOldName3 8fc09f8c51 Merge remote-tracking branch 'upstream/master' into detain-hash-selectively-reluctant
Merge conflicts included:
* One setting being removed (branch had changed its type).
* One setting's description being changed (branch had changed its type).
* List of files in components/files was changed both upstream and on the
  branch.
* Upstream had changed something in a file the branch deletes.
3 years ago
AnyOldName3 221e425fe6 Only precompile headers with MSVC 3 years ago
Petr Mikheev c5e10dfa85 Merge branch 'refactor_sdlmappings' into 'master'
Move SDL-MyGUI input mappings to components, map both ways

See merge request OpenMW/openmw!1444
3 years ago
uramer 15c7bddd57 Move SDL-MyGUI input mappings to components, map both ways 3 years ago
Petr Mikheev d3df3efaf1 Precompile sol.hpp in order to reduce compilation time. 3 years ago
psi29a a15cc0959f Merge branch 'murmur_hash' into 'master'
Use MurmurHash3_x64_128 for Files::getHash

See merge request OpenMW/openmw!1404
3 years ago
uramer e9f8c34372 Correctly set UI properties to defaults when passed nil 3 years ago
elsid a665a38aca
Use MurmurHash3_x64_128 for file hash 3 years ago
Cody Glassman d85f772269 Depth refactor 3 years ago
psi29a adc3bab51e Merge branch 'Embedded-error-marker' into 'master'
Embed marker error

See merge request OpenMW/openmw!1383
3 years ago
Cédric Mocquillon eb75e394b3 Use Files::MemBuf for Bsa::MemoryInputStream base classe instead of making a duplicate (MemoryInputStreamBuf) 3 years ago
Cédric Mocquillon 40656b3135 Embed error marker in osgt format inside a string defined in misc/errorMarker.hpp.
Use the embed error marker we fail to load a mesh.
3 years ago
uramer 68963538ae Lua UI API 3 years ago
psi29a 41bd20e358 Merge branch 'bullet_shape_hash' into 'master'
Store BulletShape source file name and content hash

See merge request OpenMW/openmw!1379
3 years ago
elsid d7041613ef
Store BulletShape source file name and content hash 3 years ago
Alexei Dobrohotov 5571099147 Load NiCollisionObject and bhkCollisionObject 3 years ago
elsid 9f808fbe3a
Move findPath-like navigator functions into a separate header 3 years ago
Petr Mikheev 9adc190209 Redesign LuaUtil::ScriptsContainer to work with ScriptsConfiguration 3 years ago
Fanael Linithien 07d505563e Remove non-existent file from CMakeLists 3 years ago
elsid e5413c0664
Add functions to compress/decompress vector of bytes 3 years ago
AnyOldName3 9be606a40d Finish removing old Escape classes 3 years ago
elsid 046b5f83ee
Add ESM data loader
A component to load ESM content files with limited support for record types and
selection which of them to load. Supported record types are:
ACTI, CELL, CONT, DOOR, GMST, LAND, STAT.
3 years ago
elsid c88367b6a6
Add sqlite3 helpers 3 years ago
AnyOldName3 1b83b08d80 Merge remote-tracking branch 'upstream/master' into detain-hash
Tests which no longer work are commented out.
Some of these don't work because they're effectively testing for the
presence of bugs in the old implementation.
Others don't work because we're no longer accidentally disabling the
boost::program_options feature where it generates an error if only part
of a token gets consumed.
These will be fixed by later commits.
3 years ago
AnyOldName3 e382f71aea Add implementation of config file parser lifted from Boost 3 years ago
elsid b9825afb8a
Fix build with system static OpenSceneGraph
* Add dependency to libraries required by OSG but missing when linking with OSG
  system library.
* Use find_package for already defined dependencies.
3 years ago
pi03k e4eeb9cce9 Remove 'no relevant classes' moc warning 3 years ago
elsid 605cb8db7c
Make sync terrain preloading sleep free
This reduces average time spent on in. 5 milliseconds as a base precision is
quite a lot considering that for 60 FPS frame time is 1000/16 = ~16.67 ms
when it's a cell loading frame and there is more important work to do rather
than sleeping.
3 years ago
elsid b0f772af40
Define dependency to OSG plugins in one place
Each binary depending on components library requires OSG plugins to be linked.
Duplicating dependecies for each binary does not give benefits and brings
problems when new binary is added.
3 years ago
elsid e9b8933b2f
Do no link binaries with Qt where it's not used
Define components_qt static library with all qt dependent components that also
depends on other components. Link only cs, wizard and launcher with qt
dependent components.
3 years ago
madsbuvi 41c08b1c3b Stereo friendly StateSetUpdater
(cherry picked from commit 496b3aef88b8fd867dcdd23a6ca43144573b1b2f)

Stereo friendly water

(cherry picked from commit 0e22c55e48a7f965367d3d430c1bef5357b22748)

Option to disable per view mapping.

Include memory header

De-hardcode settings and buffers.

formatting error

Update water.cpp (whitespace)

Update water.cpp (more whitespace)

include render order

c array -> c++ array
3 years ago
elsid beeb882ea8
Do not use off mesh connections as a part of navmesh cache key
To reduce cache size and make it more flexible.

Adding off mesh connections to the navmesh is the last step of navmesh
generation and it's very fast comparing to other steps (microseconds vs
milliseconds). Having less cache size makes get and set operations almost 2x
times faster that also have an order of microseconds. So in total there is
no performance impact.
4 years ago
Petr Mikheev 702eb19271 Fixes and refactoring 4 years ago
Petr Mikheev b53667d555 Queries. Data structures and lua bindings. 4 years ago
Petr Mikheev 479856f812 Add components/lua/scriptscontainer and components/esm/luascripts 4 years ago
Petr Mikheev 8dbaf6022c Add components/lua/serilalization 4 years ago
Petr Mikheev 4b068b27ca Add components/lua/luastate and components/lua/utilpackage 4 years ago
elsid 33aa4d0822
Move WriteScreenshotToFileOperation to components 4 years ago
elsid 81e569c3d9
Move OffMeshConnectionsManager implementation into cpp 4 years ago
AnyOldName3 081650a2e5 Integrate Base64 library with build 4 years ago
elsid ec87b3f8f7
Remove redundant ChunkyTriMesh
This AABB tree required when need to filter out input mesh that has not
influence navmesh tile output. This filtering is already done before. Each
recast mesh corresponds to a single navmesh tile and has appropriate bounds.
4 years ago
Gleb Mazovetskiy e3a6cb1695 Remove OsIdentity.cmake
Removes the OsIdentity.cmake file and uses a cross-compilation friendly
and OS-independent method of detecting system double-precision bullet
instead.
4 years ago
fredzio 6fd04cb8f6 Remove support for single-precision Bullet, fail during configuration instead of during linking. 4 years ago
elsid 3e67f5ffa5
Detect and ignore updates for oscillating objects
To avoid triggering NavMesh update when RecastMesh change should not change
NavMesh.

Based on the following assumption:
Given a set of transformations and a bounding shape for all these
tranformations, a new object transformation that does not change this
bounding shape also should not change navmesh if for all of this object
transformations resulting navmesh tiles are equivalent

The idea is to report back to RecastMeshManager all changes of NavMesh if there
are any assiciated with RecastMesh version. So we know the last time when
RecastMesh change resulted into the NavMesh change. When later report shows
that there was no NavMesh change for a new RecastMesh version we can assume
that any object transformation within the same bounding box should not change
NavMesh.
4 years ago
elsid 62f32f4543
Do not replace equivalent navmesh tiles 4 years ago
elsid ab8d1c02d4
Set idle priority for navmesh generation thread
Support Linux, Windows, FreeBSD.
4 years ago
psi29a cc6f08930b Merge branch 'alpha-meddling' into 'master'
Replace deprecated alpha test in shader visitor

Closes #4899

See merge request OpenMW/openmw!473
4 years ago
AnyOldName3 450b971bb0 Merge branch 'gl4es-patch' into 'master'
gl4es: Delay feature detection until a context exists

See merge request OpenMW/openmw!626
4 years ago
Gleb Mazovetskiy 455be9dbbb Fix linking with `-DOPENMW_USE_SYSTEM_OSG=ON -DOSG_STATIC=ON`
1. CMake's built-in OSG finder does not use pkgconfig, so we have to
   manually ensure the order is correct for inter-library dependencies.

   https://gitlab.kitware.com/cmake/cmake/-/issues/21701

2. OSG plugin pkgconfig files are missing dependencies on the underlying
   libraries (e.g. freetype, png, jpeg), so we have to link them manually.

   https://github.com/openscenegraph/OpenSceneGraph/issues/1052
4 years ago
Gleb Mazovetskiy 044e784072 gl4es: Delay feature detection until a context exists
gl4es feature detection does not work reliably with EGL.

If a context already exists, gl4es can instead reliably detect
the underlying GLES features from the context itself.

This requires gl4es to be configured with:

    -DNOEGL=ON -DNO_LOADER=ON -DNO_INIT_CONSTRUCTOR=ON

This also requires gl4es to have this fix: https://github.com/ptitSeb/gl4es/pull/271
4 years ago
psi29a 937549c99e Merge branch 'fix_still_actors' into 'master'
Make actor flee from a combat when cannot reach a target (#5851)

See merge request OpenMW/openmw!601
4 years ago
AnyOldName3 4f510d85ba Merge remote-tracking branch 'upstream/master' into alpha-meddling 4 years ago
elsid 8dba61f7ae
Use navmesh raycast to find reachable position around target 4 years ago
Gleb Mazovetskiy 99ba45a308 Optional static builds of OSG, MyGUI, Bullet 4 years ago
wareya 18ef32ca82 values for this higher than sGroundOffset cause jittering on some surface; use safe-seeming value slightly less than sGroundOffset 4 years ago
AnyOldName3 5e004356a2 Merge remote-tracking branch 'upstream/master' into alpha-meddling 4 years ago
AnyOldName3 ce2bcba5d4 Replace deprecated alpha test in shader visitor 4 years ago
CedricMocquillon 73afc55462 Fork the current process to monitor exe, generate minidump on crash 4 years ago
Nelsson Huotari 6e77ad1f6a OSG-Collada animation support 4 years ago
AnyOldName3 f7dddb8857 Merge branch '3' of https://gitlab.com/bzzt/openmw into shadows-bin
This won't actually work.
4 years ago
Bret Curtis 82431b752d removed unnessary bits that cmake should be doing for us; replace Misc::gcd with std::gcd 4 years ago