Commit Graph

20067 Commits (685f86f19e72263cf0785d371aab9daccaf552fe)

Author SHA1 Message Date
fteppe 808c7367c9 Fix compile 2 years ago
elsid d541436b15
Support parent, type and value fields in esmtool for ESM4 2 years ago
elsid e7acced5e9
Move metafunctions to check ESM4 field existence to a separate header 2 years ago
elsid 5bb088218e
Restore original formId
To make sure esmtool prints original value and not a result of conversion.
2 years ago
glassmancody.info 165013ddd6 remove redunant conditional checks when getting uniforms 2 years ago
florent.teppe 9054722f4a std::visit everywhere! 2 years ago
florent.teppe f9da66e9ee Greatly improved how the variant on MWWorld::CellRef works 2 years ago
florent.teppe 216ca71149 Applied review comments
getEditorName => getNameId
restored cosntructor in CoordinateConverter
2 years ago
florent.teppe e6e27413d9 gives MWWorld::CellRef the MWWorld::Cell treatment
MWWorld::CellRef now has a variant, and datas that are part of the intersection of both ESM4::Reference and ESM::CellRef are part of MWWorld::CellRef

For ESM4 most data isn't filled in, so it returns default values.
2 years ago
elsid 8be2fc9fd7
Stop updating navmeshtool progress on first bad message 2 years ago
florent.teppe 23614ae2ae Renamed esm3esm4bridge => esmbridge 2 years ago
florent.teppe 5037dcf9bc Fixes a crash on launch and some compile issue
also uses std::visit in cellstore comparison to avoid missing combinasion

split loadrefs in loadref of ESM4 and ESM3.
2 years ago
florent.teppe cb8cdd8831 ESM::CellVariant aans MWWorld:Cell now take reference in constructor: signals that nullptr isn't accepted.
also applied other review comments.
2 years ago
florent.teppe 531e55e04c Better handling of the esm3 vs esm4 cell problem
Common attribute are in one structure that has two constructors, one for ESM3 vs ESM4 Cell
Mood part of MWWorld::Cell
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 b1d0ee1f1b
Load only launcher.cfg from user folder
There is no other launcher.cfg.
2 years ago
elsid 0961720835
Join path components using path::operator/ instead of string::operator+ 2 years ago
florent.teppe 6d25d4bc13 It loads cells and palce sstatics in them
Many missing meshes, no lights etc... But can coc into interior cells and see them.
2 years ago
florent.teppe 3515c8e61a Static references are created as refcells, nothing displayed yet. 2 years ago
florent.teppe c896a2ca48 Crashfix on launch 2 years ago
florent.teppe 0018bcf7de Should make cellvariant safer to use.
Hopefully clang tidy agrees.
2 years ago
florent.teppe 562e129bd0 encapsulations of esm3 cell and esm4 cells. 2 years ago
florent.teppe 08b68fcd48 Cannot load a cell yet, but getting more necessary parts in 2 years ago
florent.teppe cddf6f29d6 Nothing can be loaded yet. Just foundations. 2 years ago
unelsson 9b808a495c Use std::variant and std::visit instead of function overloads, add float type search, fix QMetaType and Type conversion 2 years ago
Evil Eye 7ca25e6467 Fix more case issues with cells 2 years ago
psi29a 9f3025257a Merge branch 'local_nwah' into 'master'
Use worldspace coords in AiWanderStorage

See merge request OpenMW/openmw!2645
2 years ago
fteppe 889de35b99 fix coc search extbyname 2 years ago
Evil Eye d40a9ec5bc Use worldspace coords in AiWanderStorage 2 years ago
psi29a a9dbb023d7 Merge branch 'lua_create' into 'master'
Lua commands to create/move/remove objects; consistent handling of disabled objects (#6726, #6893)

See merge request OpenMW/openmw!2627
2 years ago
Andrei Kortunov a774a51699 Improve duration tooltip 2 years ago
Petr Mikheev c294898246 Lua commands to create/move/remove objects; consistent handling of disabled objects (#6726, #6893) 2 years ago
psi29a 7be20301af Merge branch '24-7lofibeatstoachievechimto' into 'master'
Rework music playback (bug #7172)

Closes #7172

See merge request OpenMW/openmw!2640
2 years ago
Petr Mikheev e7120f189b Unset RefNums after copying containers (otherwise copies will have the same RefNums, but they should be unique) 2 years ago
Petr Mikheev 5983f22290 Remember actor in the actor's InventoryStore instead passing the actor in every call 2 years ago
psi29a 1422053fa9 Merge branch 'more_uniforms' into 'master'
[Postprocessing] Add sky and ambient colors

See merge request OpenMW/openmw!2638
2 years ago
florent.teppe a4137e941c std::string_view can be used in map and unordered map
This avoids some unecessary dynamic allocations.
Also applies some review advice.
2 years ago
florent.teppe 63e44eddc9 Navigator doesn't use RefId anymore 2 years ago
florent.teppe 150e2ba885 Revert "Use ESM::RefId for worldspace in detournavigator"
This reverts commit b4ab153418.

# Conflicts:
#	apps/navmeshtool/worldspacedata.cpp
2 years ago
florent.teppe 3780033837 Reverts Cell name to a string 2 years ago
psi29a 1390c7ed7c Merge branch 'wizard_encodings' into 'master'
Do not use Qt streams with legacy encodings in the Wizard code

Closes #7165

See merge request OpenMW/openmw!2634
2 years ago
psi29a 761aef61ae Merge branch 'normal_fix' into 'master'
Fix pass normals (#7146, #7145)

See merge request OpenMW/openmw!2635
2 years ago
psi29a 757cf7098d Merge branch 'minor-cleanup' into 'master'
Use dedicated function to convert QString to std::filesystem::path

See merge request OpenMW/openmw!2636
2 years ago
Alexei Kotov fd6e96576a Rework music playback (bug #7172) 2 years ago
glassmancody.info 564c408663 expose more uniforms to postprocessing 2 years ago
AnyOldName3 438b03908d Use dedicated function to convert QString to std::filesystem::path II
Some missed conversions identified in review.
2 years ago
Andrei Kortunov 9a7c57874d Do not use Qt streams with legacy encodings in the Wizard code 2 years ago
Alexei Kotov f0e58d1c59 Merge branch 'ensure_utf8_encoding' into 'master'
Move ensureUtf8Encoding to named namespace

See merge request OpenMW/openmw!2632
2 years ago
AnyOldName3 f757ac642a Use dedicated function to convert QString to std::filesystem::path
I noticed this while reviewing something else and trying to find the
function to recommend using it.
2 years ago
glassmancody.info 27fe8d42ae fix pass normals 2 years ago
elsid dd89403df0
Move ensureUtf8Encoding to named namespace
To follow https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#sf21-dont-use-an-unnamed-anonymous-namespace-in-a-header

Add QtGlobal include to define QT_VERSION and QT_VERSION_CHECK macroses before
they're used.
2 years ago
Evil Eye 08f998eeb1 Delay teleportation till the menu is closed 2 years ago
psi29a ee980721b8 Merge branch 'debug_lua_memory' into 'master'
Additional information in Lua profiler

See merge request OpenMW/openmw!2612
2 years ago
psi29a 3fea82c06c Merge branch 'remove_ptr_conversion' into 'master'
Remove implicit conversion MWWorld::Ptr -> bool

See merge request OpenMW/openmw!2626
2 years ago
elsid cf1d8544e3
Check agent bounds on adding agent to navigator
Do not add agent bounds which are not supported by recastnavigation with given
settings and log such events.

To avoid reaching navmesh tile generation to find out it can't be generated for
such agent bounds.
2 years ago
Petr Mikheev e9420b2b68 Remove implicit conversion MWWorld::Ptr -> bool 2 years ago
unelsson ba6c47bb07 Implement record filter search by value and QVariant type recognition 2 years ago
unelsson fc64ab0f5a Promise constness 2 years ago
unelsson 6a864cd9f6 Implement basic filter generation from the dragged table cell (cell content and column header) 2 years ago
unelsson bc1027ee95 First draft of getting the exact drag start location 2 years ago
Alexei Kotov b261f3bf65 Fix animated object physics 2 years ago
psi29a ee862fe825 Merge branch 'qt6_fixes' into 'master'
Do not use reprecated Qt API where we can avoid it

See merge request OpenMW/openmw!2621
2 years ago
psi29a ea91d861ef Merge branch 'safely_on_the_other_side_of_the_door' into 'master'
End combat when the target is outside the active grid

See merge request OpenMW/openmw!2619
2 years ago
elsid 1cbe295030
Extend navigator tests for update with big object
Check for the number of generated recast mesh tiles and navmesh tiles.
2 years ago
Andrei Kortunov cc1c8b2bb1 Do not use a deprecated way to get dimensions of screen where current widget is located 2 years ago
Andrei Kortunov 99a575b663 Init QVariant in Qt6-compatible way 2 years ago
Andrei Kortunov 0b3ba26d86 Init style in Qt6-compatible way 2 years ago
Andrei Kortunov 0de635dcdc Do not use deprecated init() method 2 years ago
Andrei Kortunov 0864d997d0 Add missing includes 2 years ago
Evil Eye 358fa98bd3 End combat when the target is outside the active grid 2 years ago
psi29a a7a89ba7c1 Merge branch 'launcher' into 'master'
Rework how OpenMW launcher looks

Closes #6922

See merge request OpenMW/openmw!2587
2 years ago
psi29a dc3ec1a0a0 Merge branch 'mwscript' into 'master'
Multiple mwscript optimizations and some refactoring

See merge request OpenMW/openmw!2600
2 years ago
psi29a 32733d23fa Merge branch 'xanim' into 'master'
X-file handling fixes (bug #5371)

Closes #5371

See merge request OpenMW/openmw!2614
2 years ago
psi29a 9198a4e46a Merge branch 'fix_navigator_update_for_big_object' into 'master'
Limit NavMeshManager update range by player tile and max tiles (#7149)

See merge request OpenMW/openmw!2618
2 years ago
Andrei Kortunov 902c48d1bb Rework launcher UI 2 years ago
elsid 44429f0393
Limit NavMeshManager update range by player tile and max tiles
Object AABB may be much larger than area currently covered by navmesh. In this
case all tiles beyond covered range should be ignored. Attempt to iterate over
them will not result in any new tile updates but can take quite a while. At
maximum this can be pow(INT_MAX - INT_MIN, 2) iterations.

Use arbitrary time limit to check for update call to finish in the test.
2 years ago
Alexei Kotov 6ff9b5d326 Make use of ends_with for KF 2 years ago
unelsson 50726636ba clang-format 2 years ago
unelsson 7fce4bc8c4 Issue command passing through QLineInput 2 years ago
unelsson 0310b1cddf Dragging Topics to TopicInfo window opens create TopicInfo BottomBox with the correct id 2 years ago
unelsson 7f8a84f2f2 Move Response column earlier 2 years ago
Alexei Kotov e24db874dc Correct xnif use for creatures 2 years ago
Alexei Kotov 434b4deda1 Don't use xkf if xnif is merely the base model (bug #5371) 2 years ago
elsid b88f0d2dbd
Replace mwscript program serialization into a vector with simple struct
Mostly to avoid string literal lookup by index with iteration over all preciding
literals and calling strlen. This is very inefficient. In genral this makes code
much more straightforward but also makes it portable since now int and float of
different sizes are properly supported.
2 years ago
Petr Mikheev d9e9db0983 Additional information in Lua profiler 2 years ago
psi29a 203eb80afd Merge branch 'qregexp' into 'master'
Simplify regex search in the editor

See merge request OpenMW/openmw!2610
2 years ago
psi29a 599f68029e Merge branch 'only_snow' into 'master'
Fix invisible weather effects

See merge request OpenMW/openmw!2601
2 years ago
psi29a b7e5759599 Merge branch 'noanchor' into 'master'
Replace usage of QRegularExpression::anchoredPattern with `^` and `$`

See merge request OpenMW/openmw!2607
2 years ago
Andrei Kortunov 7c8fb79745 Suppress a warnings spam when user entered an invalid regular expression 2 years ago
Andrei Kortunov 7c709167d9 Simplify regex search in the editor 2 years ago
jvoisin c90d22f3b2 Replace usage of QRegularExpression::anchoredPattern with `^` and `$`
Using `^` and `$` is shorter than `QRegularExpression::anchoredPattern`,
and even allows us in one case to get rid of a trailing `.*`.
2 years ago
jvoisin 853ca5827e Simplify a regex and fix a typo
- The usage of `|` is wrong
- It's `mWhiteListQuotes` and not `mWhiteListQoutes`
- Replace weird usage of `{}`-based quantifiers
2 years ago
Andrei Kortunov bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2 years ago
Andrei Kortunov 307a60e87c Migrate from QRegExp to more modern QRegularExpression 2 years ago
glassmancody.info 7ddf47908f only enable occlusion for snow 2 years ago
psi29a 7c078883d5 Merge branch 'default_ref_num' into 'master'
Use default initializers for ESM::RefNum members

See merge request OpenMW/openmw!2598
2 years ago
psi29a 0028127b42 Merge branch 'lua_mwscript' into 'master'
Access local mwscript variables in Lua scripts

See merge request OpenMW/openmw!2589
2 years ago
elsid c173348cbe
Use default initializers for ESM::RefNum members
Instead of unset function that is removed now and assignments all over the code.
2 years ago
glassmancody.info 23708b1ba6 correct shader name 2 years ago
psi29a b1571b92bf Merge branch 'fix_7135' into 'master'
Add missing initializer in mwworld/worldmodel.cpp (fixes #7135)

Closes #7135

See merge request OpenMW/openmw!2596
2 years ago
psi29a c24f43ec32 Merge branch 'occlusion_tweaks' into 'master'
Weather occlusion updates

See merge request OpenMW/openmw!2595
2 years ago
Petr Mikheev 2b4e613522 Add missing initializer in mwworld/worldmodel.cpp (fixes #7135) 2 years ago
psi29a 2754d63e45 Merge branch 'cleanup_actions' into 'master'
Cleanup unused actions

See merge request OpenMW/openmw!2591
2 years ago
glassmancody.info ee1acd6eb1 add sfc setting, only add to subgraph when enabled 2 years ago
florent.teppe 0de6b79966 Fixes issue with topic info edition.
Also future proofs reference on RefId's string.
2 years ago
Petr Mikheev 7a0b998d4f Cleanup unused actions 2 years ago
psi29a b6d0d09c5a Merge branch 'cell_hastag' into 'master'
[Lua] New function `cell.hasTag`

See merge request OpenMW/openmw!2567
2 years ago
psi29a 6a250c5900 Merge branch 'baby_it_is_occluded_outside' into 'master'
Weather Particle Occlusion (#5492)

Closes #5492

See merge request OpenMW/openmw!1328
2 years ago
psi29a 83718878b2 Merge branch 'Load_ESM4' into 'master'
Loading ESM4 data and storing them in the ESMStore

See merge request OpenMW/openmw!2557
2 years ago
psi29a a9d3186173 Merge branch 'fix_esm_fixed_string_warning' into 'master'
Fix gcc warning: array subscript n is outside array bounds of ‘const char [n]’

See merge request OpenMW/openmw!2585
2 years ago
Petr Mikheev 8c7cad024b Access local mwscript variables in Lua scripts 2 years ago
Alexei Kotov fa7991fcb3 For hit state, cancel non-biped idle if there is an active animation 2 years ago
Alexei Kotov 152bdb2f65 Prevent missing KO animations from cancelling KO 2 years ago
Andrei Kortunov 9630246cae Sort quests in journal by name (bug 7054) 2 years ago
glassmancody.info 9a4977d334 rain occlusion 2 years ago
elsid 2bbed8cc06
Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’
In function ‘bool ESM::operator==(const FixedString<capacity>&, const T* const&) [with long unsigned int capacity = 5; T = char; <template-parameter-1-3> = void]’,
    inlined from ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1358:11,
    inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1377:64,
    inlined from ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’ at apps/openmw_test_suite/esm/test_fixed_string.cpp:165:9:
components/esm/esmcommon.hpp:134:19: warning: array subscript 5 is outside array bounds of ‘const char [5]’ [-Warray-bounds]
  134 |         return rhs[capacity] == '\0';
      |                ~~~^
apps/openmw_test_suite/esm/test_fixed_string.cpp: In member function ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’:
apps/openmw_test_suite/esm/test_fixed_string.cpp:164:20: note: at offset 5 into object ‘other’ of size 5
  164 |         const char other[5] = { 'a', 'b', 'c', 'd', '\0' };
      |                    ^~~~~
2 years ago
elsid c80ba92ab7
Add more tests for ESM::FixedString 2 years ago
elsid 7c60905266
Put ESM::FixedString tests into unnamed namespace 2 years ago
psi29a c9d57788fb Merge branch 'save_fix' into 'master'
Clear character name in the loading menu when there are no saves left

See merge request OpenMW/openmw!2583
2 years ago
Andrei Kortunov 760135591b Clear character name in the loading menu when there are no saves left (bug 7088) 2 years ago
psi29a 452ea3d353 Merge branch 'skeleton_b_gone' into 'master'
Don't use a levelled creature's base pointer when spawning a new instance

See merge request OpenMW/openmw!2578
2 years ago
psi29a 0d8d15a732 Merge branch 'fixcolladaanimopbug' into 'master'
Fix Collada animated object bug #7051

Closes #7051

See merge request OpenMW/openmw!2565
2 years ago
unelsson bfa0e751dd Skip merging for only animated models (Collada) 2 years ago
psi29a c2b0c01ff2 Merge branch 'addScript' into 'master'
Raise an error if initData in obj:addScript has incorrect type

See merge request OpenMW/openmw!2577
2 years ago
psi29a 319aa11d84 Merge branch 'l10n_rename' into 'master'
Reorganize l10n files

See merge request OpenMW/openmw!2546
2 years ago
Evil Eye a08f37cfe8 Don't use a levelled creature's base pointer when spawning a new instance 2 years ago
Petr Mikheev 4b8b3a9187 Raise an error if initData in obj:addScript has incorrect type. 2 years ago
psi29a 1e62b84f9a Merge branch 'lua_initdata' into 'master'
Allow passing `initData` to the :addSript call (#7091)

Closes #7091

See merge request OpenMW/openmw!2568
2 years ago
unelsson d065dbbefa Add named-based Collada recognition 2 years ago
florent.teppe 400d51c099 Fix compile MSVC 2 years ago
florent.teppe b88eee08c2 Store display's the ESM4's RecnameInt when not found 2 years ago
florent.teppe 631fa26872 Applies review advice. 2 years ago
florent.teppe e80dbd7c95 Moved the test to test_store.cpp where it belongs 2 years ago
florent.teppe 64a9f742da Improves check: throws an error that says which RecName is used twice. 2 years ago
florent.teppe 9b1c405467 On store creation checks that each record has a different RecordId. 2 years ago
glassmancody.info 6b6c732a59 properly update postprocess uniform for sun position in interiors 2 years ago
psi29a a24fa3ea51 Merge branch 'collada_animation_layering' into 'master'
Collada animation layering

See merge request OpenMW/openmw!2475
2 years ago
psi29a 28dcde8909 Merge branch 'controls' into 'master'
Fix jumping (was broken by !2541)

See merge request OpenMW/openmw!2572
2 years ago
florent.teppe 1b66be9c70 Fix dangling reference. 2 years ago
florent.teppe 3b2d9161c4 Applied review advice
better deals with templated functions meant for esm3 used by esm4s.
simplified loading of esm4 and dealing with unhandled record types.
2 years ago
Petr Mikheev f0a06258fb [Lua] New function `cell:hasTag` 2 years ago
Petr Mikheev 18088e3e31 Fix jumping (was broken by !2541) 2 years ago
Petr Mikheev 8c7d347179 Reorganize l10n files 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 c721a6cafa Initial commit to load ESM4
Some data is actually loaded and store in ESM Store
Any new ESM4 will go through the same code path and be automatically sent to the right store
2 years ago
Petr Mikheev b248c3e173 Allow passing `initData` to the :addSript call (#7091) 2 years ago
Petr Mikheev aabd5a98c7 Fix 'toggle spell' control (was broken by !2541) 2 years ago
unelsson fe7660eec8 clang-format again 2 years ago
unelsson d60fd86719 clang format 2 years ago
unelsson 33afcbdc13 Use common function for blendmask detection, remove extra debug logs 2 years ago
unelsson ffc64205c5 Force collada animation layers, remove nif blend mask detection. 2 years ago
psi29a d5f5e53714 Merge branch 'playercontrols' into 'master'
Move some of player controls logic from C++ to Lua

See merge request OpenMW/openmw!2541
2 years ago
psi29a e6064645db Merge branch 'esm_ref_id_refactor' into 'master'
Simplify ESM::RefId

See merge request OpenMW/openmw!2563
2 years ago
psi29a 4b6fd63044 Merge branch 'detournavigator_ref_id' into 'master'
Use ESM::RefId for worldspace in detournavigator

See merge request OpenMW/openmw!2562
2 years ago
elsid 755067f0f3
Remove redundant ESM::RefId member functions 2 years ago
elsid b4ab153418
Use ESM::RefId for worldspace in detournavigator 2 years ago
Evil Eye 0a4f65c20b Prioritise Absorb Attribute and Skill similarly to Damage and Drain 2 years ago
Evil Eye dfca5d95c2 Don't apply spell multiplier to on hit enchantments 2 years ago
Petr Mikheev 103908ffc7 Move getNorthVector out of MWWorld::World (used only in one place) 2 years ago
Petr Mikheev 310acaeee9 Don't pass MWLua::WorldView to MWLua::Action 2 years ago
Petr Mikheev aef2e9d8de Replace World::getExterior with WorldModel::getCell 2 years ago
Petr Mikheev 1869aeae5c Move some of player controls logic from C++ to Lua 2 years ago
Petr Mikheev 0fef8f12d0 Remove functions `WorldModel::rest` and `WorldModel::recharge` 2 years ago
Petr Mikheev b8fb013edf Merge MWLua::ObjectRegistry and MWWorld::WorldModel 2 years ago
psi29a 80e2cd79ec Merge branch 'boat_closer_to_todd' into 'master'
Ignore special characters preceding script commands

Closes #6807

See merge request OpenMW/openmw!2555
2 years ago
psi29a ba2ececa93 Merge branch 'resolution' into 'master'
Improve window mode change

Closes #7087

See merge request OpenMW/openmw!2530
2 years ago
psi29a 7827d3ae8f Merge branch 'fix_hour_modulo' into 'master'
Fix hour modulo expression (#7121)

Closes #7121

See merge request OpenMW/openmw!2556
2 years ago
elsid 25ead80d8b
Fix hour modulo expression
Round result of std::fmod(hours, 24) to the nearest float below 24 on double to
float conversion when it is not. Add special type and conversion function along
with tests to be used in all places where such conversion happens.

To avoid producing hours equal to 24 due to double to float precision loss.
2 years ago
florent.teppe afed7e60ef Upgraded Filesave version for RefIDs
Fix logic issue
2 years ago
florent.teppe dc21df97c8 Fixed issue with getSummonedCreature( that returned a reference to a non const static value
Fix compile, and apply review comment

Fixed greater vs more typo.

getCellname is back to a string view.

Because in most cases was used as a strong not a refId.
and there was a fundamental issue with region names used as a cellname
2 years ago
florent.teppe 1ef1de974d script blacklist => RefId
Applies changes from review

Fixed clang format

Clang format + review.
2 years ago
florent.teppe 2c30575b3b CellName is now a RefId, makes more sense that way. 2 years ago
florent.teppe 6ff90b34a8 Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
Fixed multiple issues from the review.
2 years ago
florent.teppe 42e45723b7 Fixes issue in MW script compilation that would silently produce the wrong bytecode
Fixes issue when fetching MyGui values that were stored as RefId but fetched as String

Removed some uncessary copies, fixed issues with lowercase and uneeded changes
2 years ago
florent.teppe 0f3499f504 Renamed string => Id, makes more sense considering the new underlying type
Fixes unnecessary copies, and issues with case sensitive comparisons.

fixed modification that wasn't necessary

Fixed type mismatch, and unecessary copy
2 years ago
florent.teppe 30a020883e Avoids unecessary copies
Fixed issue with lowerCase

Oups fixed compialtion on openMW_test_suite
2 years ago
florent.teppe b61d5d8123 Some RefId == ESM::RefId::StringRefId('constString') still existed 2 years ago
florent.teppe a7d0a8d9d1 Replaced some RefId* => RefId&
Rebase fix commit
2 years ago
florent.teppe d49f60d2d6 To change fewer things with the master implementation, the Id isn't changed to lower case on creation
lower case utility functions used in comparison functions
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
florent.teppe 874ff88288 In the interpretter, the id is no longer passed by vallue, but as a const reference instead.
In getMembersLocal(, a reference to a reference wrapper is used, because the id can change, bu all we need to do is change a pointer.No need to change the value
2 years ago
fteppe 09d461a8cd fixed Topic selected event
Fix rebase
2 years ago
fteppe c283ea0ae8 string_view& => string_view
fixed ref to temp variable
2 years ago
fteppe 7da38113be Changed more hardcoded RefId to be static to avoid multiple runtime creations
adresses multiple review comments
2 years ago
fteppe b57dd6d083 Fixed search random, it is a prefix so not a refId
Fixed situation where we return a const reference to a static variable that may change if the same function is called multiple times
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 20da0892ef openMW_test_suite compiles and runs
Slowly moving through the open-cs errors

Good progress in openCS

Very good progress on openCS

Getting closer with openCS

OpenCS compiles and runs! Didn't have time to test it all though

ix openMW

everything compiles on windows??

Fix gcc

Fix Clang
2 years ago
fteppe 2f2e401559 is Hidden marker now takes a const RefId& instead of a string_view 2 years ago
fteppe c8bb733360 removed clear() function, the only way to change the Id from the outside is from the assignment operator
replaced ciEqual with == operator
2 years ago
fteppe ee941f9b09 RefId's mId can't be get as mutable from the outside
also removed useless operator= defintion
2 years ago
fteppe 69d70d64f6 Fixed GUI that used RefId when it should have used strings 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
Evil Eye b19ad079c2 Ignore special characters preceding script commands 2 years ago
psi29a 8b0eba8906 Merge branch 'blockofcoal' into 'master'
Play blocked hit sound on the victim, not the attacker

See merge request OpenMW/openmw!2551
2 years ago
Andrei Kortunov 9e77654ab4 Add a hint about disabled resolution list in the Windowed Fullscreen mode 2 years ago
Andrei Kortunov 08f7554e38 Improve window mode change (feature #7087) 2 years ago
Alexei Kotov cdd6a8c007 Merge branch 'models_for_the_model_god' into 'master'
Implement TestModels/T3D

Closes #7058

See merge request OpenMW/openmw!2506
2 years ago
Alexei Kotov 83d563e2ff Merge branch 'classless' into 'master'
Don't call getClass on an empty Ptr

See merge request OpenMW/openmw!2552
2 years ago
Alexei Kotov f11d4b76d1 Merge branch 'stay_mad' into 'master'
Update a reference's base record pointer on resurrection

Closes #7084

See merge request OpenMW/openmw!2527
2 years ago
Evil Eye 1cf0befd07 Don't call getClass on an empty Ptr 2 years ago
Alexei Kotov 74225991ca Play blocked hit sound on the victim, not the attacker 2 years ago
Cédric Mocquillon 76d77bf3c3 Connect zoom in/out only when the option is allowed 2 years ago
elsid 0b399a9d1a
Fix detournavigator tests
d40c09c18c changed the logic in parallel with
15e8f0b53c making this check invalid.
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
Petr Mikheev de57a95c9d Rename mCells -> mWorldModel 2 years ago
Petr Mikheev ac6303a83a Rename MWWorld::Cells -> WorldModel 2 years ago
AnyOldName3 66b8d4fb29 Add a setting to control coverage adjustment
With it on, which was always the case before this setting was added,
vanilla content and poorly-made mods will look acceptable, but well-made
mods will have alpha-tested meshes appear to grow and potentially gain a
weird outline as they get further away.

With it off, which replicates the 0.46 behaviour, well-made mods will
look really good, but vanilla content and poorly-made mods will have
alpha-tested meshes shrink as they get further away.

It's been bugging me that this was forced on since 0.47 released, and
I'd hoped to figure out a solution for automatic detection at some point
before 0.48 branched off, but I didn't, so now this is what we're
getting to have Tamriel Rebuilt look right.
2 years ago
psi29a 1d55be8214 Merge branch 'lua_profiler' into 'master'
Lua profiler

See merge request OpenMW/openmw!2523
2 years ago
psi29a eabb230de2 Merge branch 'keep_calm_and_get_hit' into 'master'
Add option to restore non-MCP Calm spell behaviour

Closes #7063

See merge request OpenMW/openmw!2522
2 years ago
Evil Eye 69fe4594fc Reset mCharGen along with the other MyGUI-holding members 2 years ago
psi29a 06a626452c Merge branch 'ptr2' into 'master'
Refactoring; slightly reduce amount of code in worldimp.cpp

See merge request OpenMW/openmw!2498
2 years ago
Petr Mikheev 7c36a7eb49 Run Lua GC in every frame 2 years ago
Petr Mikheev 55db95d4cf Update Lua profiler; add ability to run OpenMW with old LuaJit that doesn't allow custom allocator (Lua profiler will be disabled in this case) 2 years ago
Evil Eye 209a102061 Update a reference's base record pointer on resurrection 2 years ago
Petr Mikheev 02a9069a0e Lua Profiler 2 years ago
Petr Mikheev 6fa65e4729 Track memory and CPU usage per script in LuaUtil::LuaState 2 years ago
Evil Eye a648e4cc11 Add option to restore non-MCP Calm spell behaviour 2 years ago
Cédric Mocquillon dde8ee0611 Delay the deletion of esm versions after the deletion of the scene as it is used in one of its workers (the objectpaging one) 2 years ago
Petr Mikheev aa230698a8 Apply clang-format 2 years ago
Petr Mikheev 313df72be0 Remove raycasting functions from MWWorld::World 2 years ago
Petr Mikheev 7a354d8c78 Remove from MWWorld::World a few functions that already exist in MWWorld::Cells and MWWorld::Scene 2 years ago
Petr Mikheev 2df993004c Make MWWorld:Cells and MWWorld::Scene to be accessible via Environment 2 years ago
AnyOldName3 08361a6682 Merge branch 'LOD-support-to-Object-Paging' into 'master'
Add LOD support to Object Paging

See merge request OpenMW/openmw!2459
2 years ago
Cédric Mocquillon 7142bb4ce7 Select only one level of LOD outside the active grid
Do not create group when not needed
2 years ago
psi29a 518bd03547 Merge branch 'post_ui' into 'master'
Improve postprocess HUD layout

See merge request OpenMW/openmw!2505
2 years ago
Evil Eye b94818b24a Tweak message and temporarily set model ttl to 0 2 years ago
Andrei Kortunov da5b442fcf Improve postprocess HUD layout 2 years ago
Alexei Kotov 1d31c5eb6f Remove the correct bound item when the effect expires 2 years ago
psi29a d29d68f1ba Merge branch 'allycache' into 'master'
Always consider an actor their own ally (bug #6313)

Closes #4229 and #6313

See merge request OpenMW/openmw!2504
2 years ago
Cédric Mocquillon 4140e4ea05 Remove LOD which could never be displayed in a chunk 2 years ago
psi29a 577c9ad5fb Merge branch 'deprecated' into 'master'
Replace gmtime with safer equivalents

See merge request OpenMW/openmw!2503
2 years ago
Evil Eye 0ae5755abb Implement TestModels/T3D 2 years ago
Alexei Kotov 5d11238723 Always consider an actor their own ally (bug #6313) 2 years ago
psi29a 7669a43495 Merge branch 'dialogue_result_scripts' into 'master'
Reimplement --script-all-dialogue to be more useful to modders

See merge request OpenMW/openmw!2494
2 years ago
psi29a fa50890633 Merge branch 'sm-snap-to-reference' into 'master'
Open-CS: Snap to Reference

See merge request OpenMW/openmw!2484
2 years ago
Alexei Kotov 914fba229d Replace gmtime with safer equivalents 2 years ago
Alexei Kotov a5adb73900 Make idle emitters emit ripples every 1.5 seconds (bug #5883) 2 years ago
psi29a 3ca17e5183 Merge branch 'landofwindandshade' into 'master'
Handle landing in the frame the jump is over (bug #5849)

Closes #5849

See merge request OpenMW/openmw!2499
2 years ago
Alexei Kotov 1db9247c45 Restart player block animation during blocking if necessary 2 years ago
Alexei Kotov 180963488f Play shield hit sound when the hit is blocked (bug #6645) 2 years ago
Alexei Kotov 9b8399c353 Handle landing in the frame the jump is over (bug #5849) 2 years ago
Petr Mikheev 6025943fed Add missing content=builtin.omwscripts if openmw is started via openmw-cs (fixes #7056) 2 years ago
Max Henzerling 897cdc62d8 Add snap to reference 2 years ago
Evil Eye f61083d02c Replace switch statements 2 years ago
Evil Eye 29a46b0fc0 Reimplement --script-all-dialogue to be more useful to modders 2 years ago
psi29a 6960fc9304 Merge branch 'opencs_iwyu' into 'master'
Run IWYU on the opencs

See merge request OpenMW/openmw!2481
2 years ago
psi29a fd176d6faf Merge branch 'shutup_no_one_cares' into 'master'
Ignore 0 attributes on dead NPCs

See merge request OpenMW/openmw!2490
2 years ago
elsid 013f56088b
Support negative days in TimeStamp
As vanilla engine does.
2 years ago
Evil Eye 45cd5bdbd7 Ignore 0 attributes on dead NPCs 2 years ago
jvoisin 1a326294c0 Run IWYU on the opencs 2 years ago