Compare commits

...
2637 Commits
Author SHA1 Message Date
Alexei Kotov f4bec41444 Update the terms "Character", "NPC" and "Actor" in the Swedish translations
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Release / MacOS (map[image:macos-15-intel]) (push) Canceled after 0s
Release / MacOS (map[image:macos-15]) (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Build and test / Ubuntu (push) Failing after 1h6m26s
Build and test / MacOS (map[image:macos-15-intel]) (push) Canceled after 0s
Build and test / MacOS (map[image:macos-15]) (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
See merge request OpenMW/openmw!5329
2026-05-30 16:30:14 +03:00
Alexei Kotov 9393790919 Finalize 0.51.0 changelog
See merge request OpenMW/openmw!5317
2026-05-19 23:01:14 +03:00
Alexei Kotov e0efd3b114 Fix use of gamepad triggers as buttons in gamepad navigation
See merge request OpenMW/openmw!5290
2026-05-06 04:39:27 +03:00
DaisyhasacatandAlexei Kotov ea460076bd Don't claim types are available in Menu context, fix ModifyStat table index
See merge requests OpenMW/openmw!5313 and OpenMW/openmw!5314
2026-05-06 04:39:19 +03:00
Alexei Kotov fa58a7306f Don't queue redundant text input start/stop events
See merge request OpenMW/openmw!5298
2026-05-06 04:38:44 +03:00
Alexei Kotov 673981c7f5 Merge branch 'distanceto0' into 'master'
Build and test / Ubuntu (push) Failing after 30m3s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Build and test / MacOS (map[image:macos-15-intel]) (push) Canceled after 0s
Build and test / MacOS (map[image:macos-15]) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Release / MacOS (map[image:macos-15-intel]) (push) Canceled after 0s
Release / MacOS (map[image:macos-15]) (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Treat container iterators to stacks of count 0 like end iterators

Closes #9085

See merge request OpenMW/openmw!5299
2026-04-29 01:15:18 +03:00
Evil Eye 0bf0f61309 Treat container iterators to stacks of count 0 like end iterators 2026-04-27 10:13:56 +02:00
jvoisin 19e8ce3c8d Added NixOS nixpkg method to install-openmw doc 2026-04-26 12:44:54 +00:00
Lynn Landesandjvoisin 37771ae6f1 Added NixOS nixpkg method to install-openmw doc 2026-04-26 12:44:54 +00:00
Alexei Kotov 6e104940f9 Merge branch 'issue_9078_camera_fix' into 'master'
camera: restore primaryMode when disabling standingPreview while in Preview

Closes #9078

See merge request OpenMW/openmw!5296
2026-04-25 14:55:52 +03:00
Riley Munro dd9611c643 camera: restore primaryMode when disabling standingPreview while in Preview 2026-04-24 14:41:49 -06:00
jvoisin b7167d1de2 Merge branch 'dialogueoverflow' into 'master'
Fix dialogue window scroll position overflow (#9077)

Closes #9077

See merge request OpenMW/openmw!5293
2026-04-23 22:02:05 +00:00
Alexei Kotov bf41aaf337 Fix dialogue window scroll position overflow 2026-04-22 22:39:49 +03:00
Alexei Kotov 1605f0542b Merge branch 'notunused' into 'master'
Fix MGEF speed documentation

See merge request OpenMW/openmw!5291
2026-04-22 20:55:03 +03:00
Evil Eye 5866b57aac Fix MGEF speed documentation 2026-04-22 17:12:11 +02:00
jvoisin 0460abf8e5 Merge branch 'redundant_tests_job' into 'master'
Remove redundant tests job

See merge request OpenMW/openmw!5292
2026-04-22 13:41:03 +00:00
pi03k a1598b750f Remove redundant tests job
.Ubuntu_Clang_tests and Ubuntu_Clang_tests_Debug are almost the same and
former is not used anywhere.
2026-04-22 11:15:02 +02:00
jvoisin 6af8cdf622 Merge branch 'madsbuvi-master-patch-53515' into 'master'
Fix typo in actorcontroller.lua

See merge request OpenMW/openmw!5289
2026-04-19 20:51:53 +00:00
Mads Buvik Sandvei 3b5b84c9ee Fix typo in actorcontroller.lua
should probably also be picked into .51
2026-04-19 12:08:41 +00:00
jvoisin c42424762f Merge branch 'invalideffects' into 'master'
Allow loading invalid effects again (#9069)

Closes #9069

See merge request OpenMW/openmw!5284
2026-04-19 01:13:36 +00:00
Alexei Kotov acecbf0ac3 Merge branch 'luaapidocfix1842026' into 'master'
Fix core.regions documentation

See merge request OpenMW/openmw!5287
2026-04-18 17:55:23 +03:00
kuyondo b9f0f9339c region doc fix 2026-04-18 12:32:04 +08:00
Alexei Kotov fa0d59e52d Merge branch 'too-big-too-fast' into 'master'
Use slower, more effective compression level

Closes #9063

See merge request OpenMW/openmw!5285
2026-04-17 18:23:32 +03:00
AnyOldName3 eb2cba7e8f Use slower, more effective compression level 2026-04-17 14:14:08 +01:00
Alexei Kotov ecf00a170a Allow loading invalid effects again (#9069) 2026-04-16 14:31:05 +03:00
Alexei Kotov 61aa014975 Merge branch 'amd-macos-naming-fix' into 'master'
x86_64 MacOS naming fix on GitLab

See merge request OpenMW/openmw!5281
2026-04-15 11:00:27 +03:00
Sarah Sunday edbe764f61 [LINT] fix spacing 2026-04-14 19:36:58 -05:00
Sarah Sunday 405264915e [MAC] grammar tweak 2026-04-14 13:16:31 -05:00
Sarah Sunday b654d2040c [MAC] Allow arm64 as CMAKE_OSX_ARCHITECTURES 2026-04-14 08:44:03 -05:00
Sarah Sunday f5a8c877ed [MAC] remove ccache set by default 2026-04-13 13:43:30 -05:00
Sarah Sunday bb4127ca22 [MAC] Intel naming fix 2026-04-13 13:43:12 -05:00
Alexei Kotov b850d13e58 Merge branch 'changelog' into 'master'
Build and test / Ubuntu (push) Failing after 1h3m21s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Build and test / MacOS (map[image:macos-15]) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Release / MacOS (map[image:macos-15-intel]) (push) Canceled after 0s
Release / MacOS (map[image:macos-15]) (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Build and test / MacOS (map[image:macos-15-intel]) (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Sync the changelog for 0.51.0

See merge request OpenMW/openmw!5277
2026-04-13 12:16:16 +03:00
Alexei Kotov 31bd8c3cd7 Merge branch 'master' into 'master'
Fix: Editor search fixes and performance/threadfixes

See merge request OpenMW/openmw!5251
2026-04-13 12:15:50 +03:00
Alexei Kotov 7395a393a3 Sync the changelog for 0.51.0 2026-04-13 10:33:13 +03:00
sophielovesmorrowindandAlexei Kotov 823a7935d9 FIX: use delete mOperation instead of deleteLater and update related tools comment. 2026-04-13 09:49:45 +03:00
sophielovesmorrowindandAlexei Kotov dff38b6586 Fix: Add guard against threads already running/no-operation 2026-04-13 09:49:45 +03:00
sophielovesmorrowindandAlexei Kotov ffc012423e FIX: Remove mOrdered param and ordered constructor param since all it did was feed mOrdered. 2026-04-13 09:49:45 +03:00
sophielovesmorrowindandAlexei Kotov 1fe948622b FIX: Remove mRunning, use the threads own isRunning method 2026-04-13 09:49:45 +03:00
sophielovesmorrowindandAlexei Kotov 604f3a581e Fix: Attempt to refactor Zinis wacky operation ride entirely. :todd: 2026-04-13 09:49:43 +03:00
sophielovesmorrowindandAlexei Kotov 1a77ba85b2 FIX: Use Qt::DirectConnection instead since I guess it doesn't allow you to do the other for some reason. Seems to fix the warning during mid search abort. 2026-04-13 09:47:14 +03:00
sophielovesmorrowindandAlexei Kotov 4bc843ef32 Fix: Move operation from worker thread only to main before destruction. 2026-04-13 09:47:14 +03:00
sophielovesmorrowindandAlexei Kotov ec3f55ba42 Cleanup: Increase batchtimer to 33ms 2026-04-13 09:47:14 +03:00
sophielovesmorrowindandAlexei Kotov 40918965b6 FIX: Move search back to main thread added mThread.wait() after quit() in doneSlot to ensure thread is fully dead. 2026-04-13 09:47:14 +03:00
sophielovesmorrowindandAlexei Kotov b6d5eff343 Fix: Search fixes and performance/threadfixes 2026-04-13 09:47:14 +03:00
Alexei Kotov 3d4876a6a4 Merge branch 'refidqol' into 'master'
Allow nil to be assigned to refid properties

See merge request OpenMW/openmw!5273
2026-04-13 02:40:38 +03:00
Alexei Kotov cf1d470c4a Merge branch 'draftprobe' into 'master'
Implement createRecordDraft for probes

See merge request OpenMW/openmw!5264
2026-04-13 02:40:06 +03:00
Alexei Kotov 6c24a38229 Lua API revision bump
Custom probe records and nil RefId assignment
2026-04-13 02:38:17 +03:00
Evil EyeandAlexei Kotov 25cf419e9e Implement createRecordDraft for probes 2026-04-13 02:37:43 +03:00
Alexei Kotov b7d7118a9b Merge branch 'timingisnothing' into 'master'
Editor: Replace operation timers with queued execution (#8345)

See merge request OpenMW/openmw!5263
2026-04-12 17:55:03 +03:00
Alexei Kotov 42b186f1ab Merge branch 'cpack-name-reorg' into 'master'
Cpack config reorg + file naming change

See merge request OpenMW/openmw!5262
2026-04-12 17:54:47 +03:00
Alexei Kotov bd05b2ab76 Merge branch 'even-tighter-lispsm-bounds' into 'master'
Reshrink shadow bounds after asymmetric LiSPSM projection

See merge request OpenMW/openmw!5272
2026-04-12 04:47:35 +03:00
Alexei Kotov a436720d5a Merge branch 'no-indoor-shadow-singularity' into 'master'
Don't make LiSPSM consider parts of light space that have already been deemed superfluous.

See merge request OpenMW/openmw!5271
2026-04-12 01:25:50 +03:00
AnyOldName3 f516600295 Minor formatting tweak 2026-04-11 23:01:07 +01:00
Evil Eye f53c435a19 Allow nil to be assigned to refid properties 2026-04-11 21:19:13 +02:00
Evil Eye e6b9c27884 Merge branch 'youdidunequipthedaggerdummy' into 'master'
Explicitly reset the weapon type when the weapon is unequipped (#9062)

Closes #9062

See merge request OpenMW/openmw!5269
2026-04-11 08:58:42 +00:00
AnyOldName3 c249a459c4 Reshrink shadow bounds after asymmetric LiSPSM projection
The LiSPSM paper says any projection will be an improvement.
I found that to be untrue, so restricted it to keep the projection parallel to the view direction (or something along those lines), which helped avoid weird triangular projections that were happening sometimes.

That meant that there was a wasted strip at the one side of the shadow maps, which was an improvement over big triangle of wasted space, so I didn't immediately fix it.

However, I was reminded of it again with !5271, and found an easy way to start using that space using almost entirely copied and pasted code from other parts of the same function, so here it is.
2026-04-11 01:38:04 +01:00
AnyOldName3 60d5cb9bd7 Don't make LiSPSM consider parts of light space that have already been deemed superfluous. 2026-04-10 18:59:57 +01:00
jvoisin 75a59ae944 Merge branch 'rei' into 'master'
Avoid zero division in updateProjectionMatrix offset calculations

Closes #9056

See merge request OpenMW/openmw!5268
2026-04-10 14:23:44 +00:00
Alexei Kotov d6fd49cf63 Explicitly reset the weapon type when the weapon is unequipped (#9062) 2026-04-10 03:50:21 +03:00
Alexei Kotov 49165fe0c1 Merge branch 'theendingofthecontextisalmsivi' into 'master'
Add books to openmw.content

See merge request OpenMW/openmw!5256
2026-04-09 20:44:23 +03:00
Alexei Kotov c4c9c43556 Lua API revision bump
Load context books
2026-04-09 20:43:22 +03:00
Evil EyeandAlexei Kotov 5ddf8c5719 Add books to openmw.content 2026-04-09 20:42:57 +03:00
Sarah Sunday 218ddb091d [CMAKE] remove x64 override for x86_64 apple 2026-04-09 12:19:37 -05:00
Alexei Kotov 618dade837 Merge branch 'master' into 'master'
FIX: Editor Qt6 Regression properly use dynamicsortfilter/optimiations.

See merge request OpenMW/openmw!5244
2026-04-09 19:47:02 +03:00
Sophia PolflietandAlexei Kotov 6e98a9e4a8 Editor: properly use dynamicsortfilter/optimizations in IdTableProxyModel 2026-04-09 19:47:02 +03:00
Sarah Sunday 39ba4d3e6d [CMAKE] Update cpack package file name logic 2026-04-09 09:44:12 -05:00
Sarah Sunday 8dbff16920 [CI] Fix hypen typo 2026-04-09 09:43:58 -05:00
Alexei Kotov 6638ca0a19 Avoid zero division in updateProjectionMatrix offset calculations 2026-04-09 02:25:55 +03:00
Sarah Sunday 1d9d43b899 [CMAKE] Custom OS name fix 2026-04-08 15:58:40 -05:00
Sarah Sunday 86192132b7 [CI] Remove dmg rename 2026-04-08 08:47:22 -05:00
Sarah Sunday c057851188 [CMAKE] Cpack consolidation, naming overhaul 2026-04-08 08:47:22 -05:00
Alexei Kotov a6b708e8b5 Editor: Replace operation timers with queued execution (#8345) 2026-04-08 13:29:03 +03:00
Alexei Kotov 30031dce02 Merge branch 'conditional-cluster-culling' into 'master'
Possibly partially fix #8851

Closes #8851 and #123

See merge request OpenMW/openmw!5095
2026-04-08 10:02:55 +03:00
Alexei Kotov 05e5d5dbd7 Merge branch 'satellitedishnotincluded' into 'master'
Add probes to openmw.content

See merge request OpenMW/openmw!5249
2026-04-08 10:01:46 +03:00
Alexei Kotov 2cdbfe1b07 Lua API revision bump
Load context probes and lights
2026-04-08 10:00:26 +03:00
Evil EyeandAlexei Kotov ffabe3a39b Add probes to openmw.content 2026-04-08 10:00:00 +03:00
Daisyhasacat 903a3cb323 Merge branch 'contextoflightcontextofmagic' into 'master'
Add lights to openmw.content

See merge request OpenMW/openmw!5255
2026-04-08 05:05:17 +00:00
Alexei Kotov 5c72897e2d Merge branch 'windows-mac-github-cleanup' into 'master'
[GITHUB] Macos release job, windows deps update, various refreshing/updates

Closes #9039 and #9040

See merge request OpenMW/openmw!5235
2026-04-07 05:19:08 +03:00
Sarah Sunday a717613d36 [WINDOWS] tweak regex 2026-04-06 12:35:18 -05:00
Alexei Kotov 8a5726f0d5 Merge branch 'changelog' into 'master'
Sync changelog for 0.51.0

See merge request OpenMW/openmw!5261
2026-04-06 13:23:48 +03:00
Alexei Kotov 06f49f8413 Sync the changelog for 0.51.0 2026-04-06 12:33:38 +03:00
jvoisin 44172afedc Merge branch 'escortme' into 'master'
Fix missing argument in AI escort

Closes #9048

See merge request OpenMW/openmw!5247
2026-04-06 08:43:22 +00:00
Sarah Sunday 3d1eec2ac9 [GITHUB] add name for step 2026-04-05 20:18:13 -05:00
Sarah Sunday 94a0a5e5f6 [GITHUB] vibe sh env change (strip comments) 2026-04-05 20:15:15 -05:00
Alexei Kotov 9bc9428e16 Merge branch 'descriptive' into 'master'
Expose magic effect description

See merge request OpenMW/openmw!5257
2026-04-06 03:08:54 +03:00
Alexei Kotov 5009baeba3 Lua API revision bump
Magic effect record description
2026-04-06 03:07:38 +03:00
Alexei Kotov 7b210c9491 Merge branch 'bigiconmode' into 'master'
Use normalized paths to construct big icon paths

See merge request OpenMW/openmw!5259
2026-04-06 03:03:08 +03:00
jvoisin 8a9d316612 Merge branch 'inittheunknown' into 'master'
Initialize unused MGEF data

See merge request OpenMW/openmw!5258
2026-04-05 20:07:27 +00:00
jvoisin d94e614ade Merge branch 'navmeshtool_stats' into 'master'
Report more stats by navmeshtool

See merge request OpenMW/openmw!5260
2026-04-05 20:04:05 +00:00
Evil Eye 1f6251ec9b Merge branch 'navigator_tests' into 'master'
Add more unit tests for navigator and optimize tiles processing

See merge request OpenMW/openmw!5254
2026-04-05 08:04:33 +00:00
Sarah Sunday 777a967e7c [CI] MR Feedback 2026-04-04 20:56:07 -05:00
elsid 00252a6e4d Warn about changed max tiles number 2026-04-04 09:19:53 -07:00
elsid 8a6b07f230 Skip progress reporting on no navmesh tiles to generate 2026-04-04 09:19:53 -07:00
elsid 483210dfb2 Print total number of changed tiles for all processed worldspaces 2026-04-04 09:19:53 -07:00
elsid beb256d822 Remove redundant local variable 2026-04-04 09:19:53 -07:00
elsid 8c7e649de0 Report max polygons count per navmesh tile in navmeshtool
Useful to understand optimal values for Navigator settings:
* max polygons per tile
* max tiles number
2026-04-04 09:19:53 -07:00
elsid c39f0880a2 Use span for off mesh connections 2026-04-04 09:19:53 -07:00
elsid 0406ac535c Add TileCachedRecastMeshManager test for adding heightfields and water 2026-04-04 09:12:48 -07:00
elsid 256e185847 Add navigator test for lifted heightfield 2026-04-04 09:12:46 -07:00
elsid a1c9eeb9c2 Use real min max height when possible
To reduce AABB size by z axis.
2026-04-04 09:12:29 -07:00
elsid c5667e0815 Do not post empty and out of range tiles
If a tile has no geometry and is known to be empty navmesh tile there is
no need to process it again.

If a tile is too far from player it will not be processed anyway.
2026-04-04 09:12:27 -07:00
Evil Eye 2dca72bdb0 Use normalized paths to construct big icon paths 2026-04-04 17:43:57 +02:00
Evil Eye dfd53357ee Initialize unused MGEF data 2026-04-04 17:12:07 +02:00
Evil Eye 32610b0e11 Expose magic effect description 2026-04-04 14:58:35 +02:00
Evil Eye 02d9d90ec2 Add lights to openmw.content 2026-04-04 10:44:39 +02:00
Sarah Sunday d394bf1999 [MACOS] dmg name tweaks 2026-04-03 20:44:09 -05:00
Alexei Kotov 9e45f68a6c Merge branch 'into_the_bodge' into 'master'
Add ability to set camera projection offset from lua (#9030)

Closes #9030

See merge request OpenMW/openmw!5228
2026-04-04 02:27:00 +03:00
Alexei Kotov d0443a36d2 Unbork build, typo fix 2026-04-04 02:14:38 +03:00
Alexei Kotov 361495e777 Lua API revision bump
Camera projection offset
2026-04-04 02:09:14 +03:00
Cody GlassmanandAlexei Kotov 8368bfbcd9 fix docs and extra include 2026-04-04 02:08:45 +03:00
Cody GlassmanandAlexei Kotov 728f7318ca add fixme comment for postprocessing 2026-04-04 02:08:45 +03:00
Cody GlassmanandAlexei Kotov f9ed181145 ensure first person projection matrix is also offset 2026-04-04 02:08:45 +03:00
Cody GlassmanandAlexei Kotov a87f62c391 ensure the cameras projection matrix is offset for correct frustum culling 2026-04-04 02:08:45 +03:00
Cody GlassmanandAlexei Kotov e5f11151b2 don't use move 2026-04-04 02:08:44 +03:00
Cody GlassmanandAlexei Kotov 648a128c12 fix projection matrix assignment for reverse-z 2026-04-04 02:08:44 +03:00
Cody GlassmanandAlexei Kotov b4a322445d add ability to set camera projection offset from lua 2026-04-04 02:08:44 +03:00
Alexei Kotov d2fbd32a1b Merge branch 'profiler_be_gone' into 'master'
Disable Lua profiler by default

See merge request OpenMW/openmw!5097
2026-04-04 02:07:51 +03:00
Cody GlassmanandAlexei Kotov 2b3e24953b Disable Lua profiler by default 2026-04-04 02:07:47 +03:00
Alexei Kotov 80f53c861e Merge branch 'noitsnotdehardcoded' into 'master'
Add magic effects to openmw.content

Closes #8962

See merge request OpenMW/openmw!5248
2026-04-03 21:46:06 +03:00
Alexei Kotov 8f862b9d75 Lua API revision bump
New magic effect bindings, load context magic effect handling
2026-04-03 20:11:07 +03:00
Evil EyeandAlexei Kotov 9382b10372 Expose speed and fix color assignment 2026-04-03 20:10:29 +03:00
Evil EyeandAlexei Kotov 973386d939 Move effect name init to Lua 2026-04-03 20:10:29 +03:00
Evil EyeandAlexei Kotov b409c6701f Add magic effects to openmw.content 2026-04-03 20:10:29 +03:00
Alexei Kotov 0cfbd3b02d Merge branch 'mrtemplatetweaks' into 'master'
MR template adjustments

See merge request OpenMW/openmw!5252
2026-04-03 20:07:33 +03:00
Alexei Kotov e0b8a1dc1a MR template adjustments
Don't reference issue 123
Remind people CI exists
2026-04-03 17:51:44 +03:00
Alexei Kotov 53f14f113b Merge branch 'no-warn-unused-option' into 'master'
Option to suppress unused warnings

Closes #123

See merge request OpenMW/openmw!5243
2026-04-03 15:00:48 +03:00
Alexei Kotov d8d2123801 Lua API revision bump
Disable unused warnings UI element option
2026-04-03 14:59:01 +03:00
Mads Buvik SandveiandAlexei Kotov e804f754b9 Option to suppress unused warnings 2026-04-03 14:59:01 +03:00
elsid a8b13f22a8 Reduce chance of 2 test runs having the same output directory 2026-04-02 21:11:10 -07:00
Alexei Kotov 7bfec23576 Merge branch 'fix_navmeshtool_crash' into 'master'
Fix navmeshtool crash on reaching max navmeshdb size (#9046)

Closes #9046

See merge request OpenMW/openmw!5245
2026-04-03 05:29:25 +03:00
jvoisin 972ec781a4 Merge branch 'terrainterrors' into 'master'
Visual regression fixes

See merge request OpenMW/openmw!5246
2026-04-02 21:10:53 +00:00
Evil Eye 838f0f2ba1 Fix missing argument in AI escort 2026-04-02 17:09:18 +02:00
Alexei Kotov df32a61aa1 Merge branch 'yourmemoryisinanothercastle' into 'master'
Avoid tracking dangling LocalScripts

Closes #8699 and #8912

See merge request OpenMW/openmw!5094
2026-04-02 16:28:37 +03:00
Alexei Kotov 762b14a173 Reverse cloud direction
Another texture matrix I forgot to flip
2026-04-02 08:53:28 +03:00
Alexei Kotov 274b93b2d9 Fix ESM4 base terrain layer opacity overflow
std::max specializations cast the argument to the type, so the layer opacity subtraction result would turn positive and cause bright spots
2026-04-02 08:38:43 +03:00
Alexei Kotov 319d0cb534 Fix terrain blend map offset
Needs to be flipped vertically after the origin convention change
2026-04-02 07:42:44 +03:00
elsid e2faa614e5 Fix navmeshtool crash on reaching max navmeshdb size
Use shared_ptr for TileCachedRecastMeshManager and related objects to
make sure unfinished work items have valid object when WorldspaceData is
destructed due to a cancellation.

Make sure workQueue is destructed before final log message is printed to
avoid having log messages from unfinished work items.

Do not override NavMeshTileConsumer status on repetitive cancel.
2026-04-01 17:21:02 -07:00
Alexei Kotov aeb0522825 Merge branch 'ingred_load_01' into 'master'
Add ingredients to openmw.content

See merge request OpenMW/openmw!5227
2026-04-02 00:35:34 +03:00
Alexei Kotov 9ab33cbcc5 Merge branch 'sLoadGMST' into 'master'
Add GMSTs to openmw.content

See merge request OpenMW/openmw!5237
2026-04-02 00:35:10 +03:00
Alexei Kotov 253477ac2b Lua API revision bump
Introduction of GMSTs (and ingredients) into the load context and update of global variable API in the load context
2026-04-02 00:32:53 +03:00
Evil EyeandAlexei Kotov bbee64cfe5 Move Fallback->GMST to Lua 2026-04-02 00:32:41 +03:00
Evil EyeandAlexei Kotov 8c7946b945 Move default GMSTs to Lua 2026-04-02 00:32:41 +03:00
Evil EyeandAlexei Kotov bc1268d9aa Add GMSTs to openmw.content 2026-04-02 00:32:41 +03:00
Daisyhasacat 757d791fe7 Merge branch 'reduce_dyn_casts_lua' into 'master'
Fix: reduce dynamic_casts in mwlua

Closes #8058

See merge request OpenMW/openmw!5230
2026-03-31 15:25:20 +00:00
Jarryd WebbandDaisyhasacat 19264a0d09 Fix: reduce dynamic_casts in mwlua 2026-03-31 15:25:19 +00:00
Alexei Kotov a1bc94d8f8 Merge branch 'load.wav' into 'master'
Add sounds to openmw.content

See merge request OpenMW/openmw!5232
2026-03-31 05:42:27 +03:00
Sarah Sunday 800514d963 [MAC] rename dmgs to include dmg identifier 2026-03-30 20:51:37 -05:00
Sarah Sunday feecce8504 [WINDOWS] fix script 2026-03-30 19:42:54 -05:00
Sarah Sunday 7013c1fe4b [WINDOWS] QT_ver, deps change 2026-03-30 19:29:36 -05:00
jvoisin 9d556dc13e Merge branch 'warnings' into 'master'
Warnings

See merge request OpenMW/openmw!5236
2026-03-30 23:24:36 +00:00
Alexei Kotov b34e7ed068 Merge branch 'spelluamaking' into 'master'
Implement createRecordDraft for enchantments and spells

Closes #8342

See merge request OpenMW/openmw!5233
2026-03-30 23:58:38 +03:00
Alexei Kotov ec6c4855f0 Lua API revision bump
Custom spells/enchantments. It's probably a good idea to document the bump reason actually.
2026-03-30 23:57:06 +03:00
Sarah Sunday aff7d94460 [MAC] add prelease 2026-03-30 14:59:07 -05:00
Sarah Sunday 1e42261002 [MAC] update github ccache key 2026-03-30 14:57:07 -05:00
Sarah Sunday 4a9627b79c [GITHUB] Update to newer hendrikmuhs/ccache-action 2026-03-30 13:12:27 -05:00
Sarah Sunday 09548ae60b [GITHUB] Update to newer actions/ 2026-03-30 12:54:42 -05:00
Sarah Sunday 68b1d9a762 [GITHUB] Macos release job (+ intel), windows use deps version 2026-03-30 12:52:37 -05:00
Alexei Kotov 590eb08202 Adjust OSG Multiview warnings 2026-03-30 20:38:01 +03:00
Alexei Kotov 043548f3de Remove unconditional Windows FFmpeg version warning 2026-03-30 20:38:01 +03:00
Alexei Kotov 02b8749bfc Fix Coverity copy warnings 2026-03-30 20:38:01 +03:00
jvoisin b66b577f2a Merge branch 'fix-onhit-attack-type-docs-enum' into 'master'
Fix onhit attack type docs enum

Closes #123 and #8795

See merge request OpenMW/openmw!5234
2026-03-30 14:10:25 +00:00
Mads Buvik Sandveiandjvoisin 636ac1908d Fix onhit attack type docs enum 2026-03-30 14:10:24 +00:00
Evil Eye 895a629a90 Implement createRecordDraft for enchantments and spells 2026-03-29 22:06:59 +02:00
Evil Eye c0810929f4 Add sounds to openmw.content 2026-03-29 21:40:34 +02:00
Evil Eye 3adbe705db Ensure string properties don't incur copies 2026-03-29 20:48:20 +02:00
Evil Eye 9b237c9672 Add ingredients to openmw.content 2026-03-29 20:48:18 +02:00
Alexei Kotov 3ddd1a1371 Merge branch 'cmake_warnings' into 'master'
Use non deprecated dependency name for sqlite (#8639)

Closes #123 and #8639

See merge request OpenMW/openmw!5216
2026-03-29 19:39:54 +03:00
Alexei Kotov 70f6810c77 Merge branch 'unused-warning' into 'master'
Warn on unused properties

Closes #123 and #9002

See merge request OpenMW/openmw!5194
2026-03-29 18:46:55 +03:00
Alexei Kotov 0b0d8df04d Merge branch 'loadofmagic' into 'master'
Add enchantments and spells to openmw.content

See merge request OpenMW/openmw!5223
2026-03-29 17:52:45 +03:00
Mads Buvik Sandvei 9a508857b9 set -> vector. Other comments by Capo 2026-03-29 16:21:14 +02:00
pi03k afa631ab41 Use non deprecated dependency name for sqlite lib (#8639)
Works for both versions of lib - system found and fetched from git.
2026-03-28 22:14:46 +01:00
jvoisin 39c490eb47 Merge branch 'mcpnameforthissettingsucks' into 'master'
Remove dead code

See merge request OpenMW/openmw!5231
2026-03-28 20:42:42 +00:00
Mads Buvik Sandvei 26496837e7 remove redundant includes and checks 2026-03-28 20:44:52 +01:00
Mads Buvik Sandvei 3b878aae06 Actually don't short-circuit for real this time 2026-03-28 16:44:04 +01:00
Mads Buvik Sandvei 08558e8944 Fixes based on comments by Capo 2026-03-28 16:38:06 +01:00
Alexei Kotov 11dbfa3217 Merge branch 'validattack' into 'master'
Don't set use to an invalid attack type

Closes #9018

See merge request OpenMW/openmw!5217
2026-03-28 18:02:16 +03:00
Alexei Kotov 4535dcd670 Lua API revision bump
The API didn't actually change, but seeing as attack type 4 is now possible to use, better safe than sorry
2026-03-28 18:00:41 +03:00
Evil EyeandAlexei Kotov 317415ea94 Don't set use to an invalid attack type 2026-03-28 18:00:15 +03:00
Mads Buvik Sandvei a851dca7b9 Only generate warnings if lua debug = true. Otherwise stick to printing information about "lua debug" once. 2026-03-28 15:25:21 +01:00
Alexei Kotov 97d3608f36 Remove dead code 2026-03-28 04:05:06 +03:00
Alexei Kotov b161190b8c Merge branch 'saysubtitles' into 'master'
Fix: Say() function to adhere to menu subtitle settings

See merge request OpenMW/openmw!5226
2026-03-27 00:39:54 +03:00
Jarryd Webb 0a5c6b5652 Adhere to menu subtitle settings 2026-03-25 14:08:48 +01:00
Alexei Kotov eddba72f1b Merge branch 'clamplighting' into 'master'
In-game checkbox for Clamp Lighting

See merge request OpenMW/openmw!5218
2026-03-24 22:53:58 +03:00
Alexei Kotov b5e9553d60 Merge branch 'bounded-warning-count' into 'master'
Constrain the maximum number of a particular warning per file

Closes #123 and #9024

See merge request OpenMW/openmw!5224
2026-03-24 22:49:28 +03:00
Alexei Kotov da94c883ae Merge branch 'wdshaders' into 'master'
Make the shader path independent of the working directory

See merge request OpenMW/openmw!5219
2026-03-23 23:25:17 +03:00
AnyOldName3 0877c22458 Constrain the maximum number of a particular warning per file
A corrupt mesh file could cause the warning to be logged up to uint32_t max times.
We cannot log four billion warnings without a large performance cost.

According to https://gitlab.com/OpenMW/openmw/-/work_items/9024, a corrupt mesh in BCOM could trigger this at least four million times, which triggered the freeze catcher.

This is completely untested, but at least it compiles and I remembered to run the formatter.
2026-03-23 18:06:19 +00:00
Evil Eye ada679432e Add enchantments and spells to openmw.content 2026-03-23 16:50:59 +01:00
Alexei Kotov 2c4ef13642 Merge branch 'feat-openmw-cs-colour-paint' into 'master'
OpenMW-CS: Land color painting

See merge request OpenMW/openmw!4031
2026-03-23 16:35:25 +03:00
Alexei Kotov 954bfb7c69 Merge branch 'bg-translation' into 'master'
Adding Bulgarian Translation

See merge request OpenMW/openmw!5012
2026-03-23 16:31:13 +03:00
Alexei Kotov ec4dc1b418 Merge branch 'moarcontent' into 'master'
Add potions to openmw.content

See merge request OpenMW/openmw!5201
2026-03-23 16:16:49 +03:00
Alexei Kotov 7d59df2b58 Lua API revision bump 2026-03-23 16:15:54 +03:00
Evil EyeandAlexei Kotov dcb00220e1 Implement mutable effect lists 2026-03-23 16:15:31 +03:00
Evil EyeandAlexei Kotov f65de4cb5c Add potions to openmw.content 2026-03-23 16:15:30 +03:00
Evil EyeandAlexei Kotov 0682a83d8e Require record properties to be finite values 2026-03-23 16:15:30 +03:00
Evil EyeandAlexei Kotov b433dff629 Add addFlagProperty helper 2026-03-23 16:15:30 +03:00
Evil EyeandAlexei Kotov 3df9f92aee Combine addProperty overloads 2026-03-23 16:15:30 +03:00
Georgi GeorgievandAlexei Kotov ef4d7fb3a4 Bulgarian translation for Qt tools 2026-03-23 16:12:27 +03:00
Evil Eye 52e1f61d26 Make the shader path independent of the working directory 2026-03-22 21:59:02 +01:00
Alexei Kotov bcd5b636bb Fix more max light cutoff issues
Shortening the fixed caption width messed with French and Russian lines, revert
Might as well shorten the Russian caption, though
2026-03-22 23:43:34 +03:00
Alexei Kotov ff793637a4 Avoid referring to the original engine as MW in PPL description 2026-03-22 15:20:00 +03:00
Alexei Kotov 66f15114a9 In-game checkbox for Clamp Lighting and layout tweaks
Use autosizing and tweak the layout to Fit the fourth checkbox
Correct the documentation version of force PPL description
Shorten the German max lights translation
2026-03-22 15:19:14 +03:00
Alexei Kotov 26a7f2814b Merge branch 'documentationskillissue' into 'master'
Change copy-pasted documentation

See merge request OpenMW/openmw!5213
2026-03-21 15:55:54 +03:00
Alexei Kotov 22028818e0 Merge branch 'particleinteractionthing' into 'master'
Render object-bound VFX during the transparent post-pass (#8985)

Closes #8985

See merge request OpenMW/openmw!5184
2026-03-20 20:01:46 +03:00
Evil Eye b3d05c4b68 Change copy-pasted documentation 2026-03-20 16:34:23 +01:00
jvoisin f9e800e362 Merge branch 'ivecometomakeanannouncement' into 'master'
Fix moon blending (#6439)

Closes #6439

See merge request OpenMW/openmw!5211
2026-03-20 08:13:07 +00:00
Alexei Kotov dc5f9b45bf Clean up moon state 2026-03-20 03:37:44 +03:00
Alexei Kotov 68adb8dbec Fix moon blending (#6439) 2026-03-20 00:40:44 +03:00
Evil Eye eb15948b0e Account for nullptrs 2026-03-19 20:34:32 +01:00
Alexei Kotov 663ae0fd77 Merge branch 'reputation_stat' into 'master'
Reputation stat

Closes #123 and #9013

See merge request OpenMW/openmw!5197
2026-03-19 20:52:03 +03:00
gbtbandAlexei Kotov b5f9546ba0 Reputation binding (#9013) 2026-03-19 20:47:30 +03:00
jvoisin 61a8c6cd42 Merge branch 'tosaveafallingwizard' into 'master'
Wizard uncursifying (#8999)

Closes #8999

See merge request OpenMW/openmw!5210
2026-03-19 16:55:43 +00:00
Alexei Kotov 6e7babe95d Merge branch 'keep-more-stuff-on-actions' into 'master'
Make releases not three times the size of dev builds

See merge request OpenMW/openmw!5209
2026-03-18 22:26:30 +03:00
Alexei Kotov b370bce480 Restore data directory root Morrowind.ini detection
This turned out to be relevant for those data directories that were generated by the wizard from a retail disc.
Note the initial disc installation doesn't need to be registered as an installation because of the special case when the settings importer is run.
2026-03-18 03:12:19 +03:00
Alexei Kotov 427da3cb90 Wizard: Mostly uncursify data directory handling (#8999)
Avoid shoving every single directory in the config file
Avoid duplicates caused by mismatches between the canonical path with forward slash separator and the absolute path with native separators
Give up on the broken attempt to move the path to the end of the list and clean up the essentially dead code
2026-03-18 03:09:09 +03:00
Alexei Kotov a59985894c Wizard: Preserve comments when writing openmw.cfg 2026-03-18 02:29:39 +03:00
jvoisin 0029ee779b Merge branch 'deathaccumulation' into 'master'
Restore death animation movement accumulation

See merge request OpenMW/openmw!5202
2026-03-17 22:02:22 +00:00
Alexei Kotov d814914173 Merge branch 'vatnik' into 'master'
Fix import of werewolf kill count

See merge request OpenMW/openmw!5207
2026-03-17 22:27:48 +03:00
Alexei Kotov 59381db9d7 Merge branch 'nullpath' into 'master'
Don't build paths containing \0

See merge request OpenMW/openmw!5206
2026-03-17 22:27:27 +03:00
AnyOldName3 2562354ddc Make releases not three times the size of dev builds
Dev builds are RelWithDebInfo so we get slightly more intelligible stack traces.

Release builds are Release so we get better performance.
However, Release builds have no debug symbols by default, so we add the /DEBUG flag to CMAKE_EXE_LINKER_FLAGS_RELEASE to opt in.
We hadn't noticed that this switches the default value for some options, and that therefore we weren't just getting debug symbols.

/OPT:REF strips unused functions, typically ones that are inlined at all call sites.
Templatey code typically has lots of functions like that.
Not having this made the binary huge.

/OPT:ICF is Identical COMDAT Folding, i.e. deduplicating functions with identical machine code.
Not having this means extra instruction cache pressure, as simple things like getters typically end up being identical to something else, so there's a performance impact.
Also, duplicated stuff obviously makes the binary bigger.

On my machine, an MSBuild build is explicitly setting these for the Release configuration, even though I can't find anything in CMake, our CMake scripts, the generated .vcxproj files, or the merged vcxproj from msbuild /pp that does that.
This means that the 0.48 release and earlier weren't affected, as 0.49 was the first one build via Ninja.
2026-03-17 18:27:07 +00:00
jvoisin d52db6b0ae Merge branch 'evenmorewizardcleanup' into 'master'
Even more wizard cleanup

See merge request OpenMW/openmw!5204
2026-03-17 11:49:41 +00:00
AnyOldName3 c1e42fc89f Keep logs etc. like we do on GitLab 2026-03-17 00:16:32 +00:00
Evil Eye 5cc607c0c3 Use slightly fewer characters 2026-03-16 19:22:55 +01:00
AnyOldName3 f80dd10482 Fix import of werewolf kill count
For some reason the subrecord ID is reversed here.
2026-03-16 17:49:29 +00:00
Alexei Kotov fe3ea42955 Use the appropriate types for string literals and languages in the wizard 2026-03-16 19:13:49 +03:00
Evil Eye 833424cd4c Don't build paths containing \0 2026-03-16 16:34:34 +01:00
Alexei Kotov f7963efcda Realize QMessageBox::critical/question exist, convert MainWizard messages 2026-03-16 18:33:30 +03:00
Alexei Kotov 450a8c60ea Move "can't create user config directory" error to the constructor
If the standard library failed to create it, it's doubtful Qt will succeed, might as well fail early
2026-03-16 18:09:10 +03:00
Alexei Kotov aa43bd4522 Deduplicate MainWizard critical error messages 2026-03-16 18:09:10 +03:00
Alexei Kotov 7eef5d4efb Make MainWizard::findFiles static 2026-03-16 18:09:10 +03:00
Alexei Kotov c975a192dd More wizard cleanup I can't be bothered to categorize
This also fixes language repopulation when you return to the language selection page.
2026-03-16 18:09:10 +03:00
Alexei Kotov ab7324bd41 Don't use the autoconnected button slot in the install target page 2026-03-16 18:09:10 +03:00
Alexei Kotov 294d24c5ba Const-ify everything in the wizard 2026-03-16 18:09:10 +03:00
Alexei Kotov 14a454d5ca Parent wizard messages to the relevant widget when applicable
This improves positioning. Not the ones in the wizard constructor as that won't go too well.
2026-03-16 18:09:10 +03:00
Alexei Kotov d6e6827fd6 Merge branch 'startingcell' into 'master'
Lua startingCell to return the original cell

Closes #9010

See merge request OpenMW/openmw!4973
2026-03-16 17:18:28 +03:00
Alexei Kotov 8087165de7 Lua API revision bump 2026-03-16 17:14:52 +03:00
KuyondoandAlexei Kotov cc91146293 docfix 2026-03-16 17:14:19 +03:00
KuyondoandAlexei Kotov a4ff901572 add startingcell to core lua api 2026-03-16 17:14:19 +03:00
Alexei Kotov 3d0adb934d Merge branch 'rover' into 'master'
Support spheres in DebugDrawer

See merge request OpenMW/openmw!5199
2026-03-16 10:02:09 +03:00
Sam Hellawell 5a23fab81a Attempt QT widget dialog to prevent weird X11 composition errors 2026-03-15 23:40:20 +00:00
Sam Hellawell 25b06ebd86 Default land colours to white 2026-03-15 23:17:48 +00:00
Sam Hellawell 08a31bf876 Color input and label horizontal 2026-03-15 20:10:12 +00:00
Sam Hellawell 8138992f5e useTool check 2026-03-15 20:09:58 +00:00
Sarah Sunday ab779287d5 Merge branch 'sorry_ffp_you_smell' into 'master'
Remove exclusive FFP mode

Closes #7595 and #9001

See merge request OpenMW/openmw!4771
2026-03-15 14:13:19 -05:00
Cody GlassmanandSarah Sunday e53536a3ec Remove exclusive FFP mode 2026-03-15 14:13:19 -05:00
Sam Hellawell 91678ef5eb Drag hit checks, dont define ColorButtonWidget entirely in header 2026-03-15 15:05:52 +00:00
Sam Hellawell cf0fd8f86d Fix format 2026-03-14 22:20:21 +00:00
Sam Hellawell a33cd5b2a8 Fix format 2026-03-14 22:17:07 +00:00
Sam Hellawell 01c9336512 More cleanup feedback 2026-03-14 22:08:16 +00:00
Alexei Kotov 441f4e2362 Restore death animation movement accumulation 2026-03-14 22:51:31 +03:00
Alexei Kotov a035bcad2a Merge branch 'morewizardcleanup' into 'master'
Wizard: Clean up the existing installation page

See merge request OpenMW/openmw!5198
2026-03-14 18:43:43 +03:00
Mads Buvik Sandvei 216d767fa1 Add userData as a known layout field 2026-03-14 15:29:09 +01:00
Alexei Kotov a8c80a23e6 Merge branch 'changelog' into 'master'
Sync the changelog for 0.51.0

See merge request OpenMW/openmw!5200
2026-03-14 14:58:26 +03:00
Alexei Kotov 35864811bb Sync the changelog for 0.51.0 2026-03-14 00:33:03 +03:00
Alexei Kotov ebcdbb152e Merge branch 'miscme' into 'master'
Add misc items to openmw.content

See merge request OpenMW/openmw!5195
2026-03-13 22:04:04 +03:00
AnyOldName3 e1ad0de206 \n 2026-03-13 16:32:04 +00:00
AnyOldName3 2eeb6f7bb6 format 2026-03-13 16:25:50 +00:00
AnyOldName3 3ae1d2977e Support spheres in DebugDrawer 2026-03-13 16:18:22 +00:00
Evil Eye 264f56da3c Add misc items to openmw.content 2026-03-13 17:02:15 +01:00
Alexei Kotov 45db9ce156 Wizard: Clean up the existing installation page 2026-03-13 18:07:46 +03:00
jvoisin 1a4cd2600a Merge branch 'incude-symlinks' into 'master'
Include symlinks

See merge request OpenMW/openmw!5190
2026-03-13 14:18:17 +00:00
Alexei Kotov 460718e5d7 Merge branch 'wizardcleanup' into 'master'
Some Wizard cleanup

See merge request OpenMW/openmw!5196
2026-03-13 14:04:28 +03:00
Mads Buvik Sandvei fd9c11179f Use widget() to get name/typeName 2026-03-11 23:05:19 +01:00
Mads Buvik Sandvei d477189a87 Fix warning 2026-03-11 21:29:06 +01:00
Alexei Kotov c4a71f1f4c Wizard: Make IniSettings Unshield-specific
This Morrowind.ini reader-writer is not used anywhere outside the Unshield worker.
2026-03-11 20:08:15 +03:00
Alexei Kotov 7f18c3cfd5 Get rid of ComponentsListWidget
Why do we even have that widget?
2026-03-11 20:08:15 +03:00
Alexei Kotov cb7e1a55ae Wizard: Clean up language selection 2026-03-11 20:08:15 +03:00
Alexei Kotov 44db323019 Wizard: Simplify Morrowind.ini detection 2026-03-11 20:08:15 +03:00
Evil Eye 1bc58c420e Reduce code duplication 2026-03-11 17:18:21 +01:00
Evil Eye 622d27ec35 Simplify addModelProperty 2026-03-11 17:12:36 +01:00
Alexei Kotov 17df1f7669 Merge branch 'spellicontooltips' into 'master'
Fix spell icon tooltips when they're updated every frame

See merge request OpenMW/openmw!5180
2026-03-11 05:15:49 +03:00
Alexei Kotov 5ce00616a3 Merge branch 'moredoor' into 'master'
Implement createRecordDraft for doors

See merge request OpenMW/openmw!5191
2026-03-11 03:41:17 +03:00
Alexei Kotov ac18131ff1 Bump the Lua API revision 2026-03-11 03:40:18 +03:00
Alexei Kotov a192af0f7e Merge branch 'activeload' into 'master'
Add activators to openmw.content

See merge request OpenMW/openmw!5192
2026-03-11 03:34:02 +03:00
Mads Buvik Sandvei 558bbf8b48 Warn on unused properties 2026-03-11 00:07:08 +01:00
Evil Eye 940ceb3a38 Merge branch 'itemviewresize' into 'master'
Don't warp to widget if the left mouse button is held (#8833)

Closes #8833

See merge request OpenMW/openmw!5174
2026-03-10 16:29:39 +00:00
Alexei Kotov 218ee44fdc Merge branch 'coverity' into 'master'
Coverity fixes

See merge request OpenMW/openmw!5189
2026-03-10 04:33:36 +03:00
Evil Eye c87213c1b0 Log orphaned local scripts 2026-03-09 21:25:59 +01:00
Evil Eye 233fb4e7bd Address feedback 2026-03-09 21:25:59 +01:00
Evil Eye 1c93a110c6 Make ContainerStore::add const correct and trust the caller to delete the passed item 2026-03-09 21:25:58 +01:00
Evil Eye 814e51785f Avoid tracking dangling LocalScripts 2026-03-09 21:15:42 +01:00
Evil Eye 08d0749478 Add activators to openmw.content 2026-03-09 21:08:51 +01:00
Evil Eye 1ed114d9bf Implement createRecordDraft for doors 2026-03-09 20:37:48 +01:00
AnyOldName3 c1773a4b71 c a p i t u l a t e 2026-03-09 18:21:38 +00:00
AnyOldName3 e1e73b32c4 Include symlinks 2026-03-09 18:17:40 +00:00
Alexei Kotov 64b3498312 Initialize the shadow map index in MWShadowTechnique::ShadowData
Found by Coverity
2026-03-09 19:46:09 +03:00
Alexei Kotov 3387ff5f65 Generate TCB tangents in a less confusing way
This should silence a couple of Coverity false-positive warnings.
2026-03-09 19:46:09 +03:00
Alexei Kotov 7d236c5696 Initialize editor scene object snap target field
Found by Coverity. Move some initializations to the class.
2026-03-09 19:46:09 +03:00
Daisyhasacat ef2b21193e Merge branch 'loaddoor' into 'master'
Add doors to openmw.content

See merge request OpenMW/openmw!5179
2026-03-09 16:04:38 +00:00
Alexei Kotov a6737bdb73 Merge branch 'multirotate' into 'master'
CS: Implement multiselect group rotation

Closes #8392

See merge request OpenMW/openmw!5039
2026-03-09 16:47:10 +03:00
Alexei Kotov d657e735f5 Bump Lua API revision 2026-03-09 01:55:27 +03:00
Evil EyeandAlexei Kotov ce33c5825d Appease clang format 2026-03-09 01:54:53 +03:00
Evil EyeandAlexei Kotov a223c9e853 Document content.doors 2026-03-09 01:54:53 +03:00
Evil EyeandAlexei Kotov fb1b081fa6 Unify mutable and immutable static bindings 2026-03-09 01:54:53 +03:00
Evil EyeandAlexei Kotov da446f2388 Dehardcode door fallbacks 2026-03-09 01:54:53 +03:00
AnyOldName3 1c3a230045 Merge branch 'editorediteditedid' into 'master'
Editor: Validate IDs in the edit ID action (#4769)

Closes #4769

See merge request OpenMW/openmw!5176
2026-03-08 15:26:34 +00:00
Sam Hellawell 6d133ce11b Cleanup need for terrain selection, RMB restore to white feature 2026-03-07 23:02:37 +00:00
Sam Hellawell f478555db0 Const correctness 2026-03-07 22:46:06 +00:00
jvoisin d8e4b4b1f0 Merge branch 'patch-1' into 'master'
fixed documentation for asyncCastRenderingRay

Closes #123

See merge request OpenMW/openmw!5187
2026-03-07 21:48:50 +00:00
Alexei Kotov 607abd2312 Merge branch 'sixthhouseamulet' into 'master'
Allow all creatures to use enchanted items

Closes #7605

See merge request OpenMW/openmw!5151
2026-03-07 18:09:28 +03:00
Alexei Kotov 1c197590d9 Merge branch 'staticgeneration' into 'master'
Implement createRecordDraft for statics

Closes #8998

See merge request OpenMW/openmw!5178
2026-03-07 17:47:57 +03:00
Alexei Kotov 6f5d33a81e Bump Lua API revision 2026-03-07 17:47:05 +03:00
Evil EyeandAlexei Kotov da065d83dd Implement createRecordDraft for statics 2026-03-07 17:46:36 +03:00
AnyOldName3 4a3505ec70 Merge branch 'skinningvertexcrash' into 'master'
Simplify pre-FO4 skinning data assignments, validate vertex indices (#8996)

Closes #8996

See merge request OpenMW/openmw!5185
2026-03-06 17:16:04 +00:00
GoodBetter 8c6954c37a fixed documentation for asyncCastRenderingRay 2026-03-06 14:49:37 +00:00
Alexei Kotov faab986312 Merge branch 'revert-9262d555' into 'master'
Revert !5177

See merge request OpenMW/openmw!5186
2026-03-05 20:01:55 +03:00
Evil Eye 7de9a684ce Revert "Merge branch 'vararg' into 'master'"
This reverts merge request !5177
2026-03-05 16:57:53 +00:00
Alexei Kotov b53e0215b9 Simplify pre-FO4 skinning data assignments, validate vertex indices (#8996) 2026-03-05 18:14:09 +03:00
Alexei Kotov 9262d5557a Merge branch 'vararg' into 'master'
Replace redundant variant

See merge request OpenMW/openmw!5177
2026-03-05 15:07:57 +03:00
Alexei Kotov 4ac57d8e1b Render object-bound VFX during the transparent post-pass (#8985) 2026-03-05 14:54:31 +03:00
Sam Hellawell 6d5608be41 Remove createNewLandData for vertex paint 2026-03-05 01:47:24 +00:00
Sam Hellawell cdcc800ac1 Further cleanup 2026-03-05 01:41:19 +00:00
Sam Hellawell 45ecbfdece Cleanup unused methods/variables/parameters 2026-03-05 01:17:13 +00:00
Sam Hellawell bc9d686096 Remove from changelog 2026-03-05 01:15:47 +00:00
Alexei Kotov 02402b3ede Merge branch 'postprocessingrevision' into 'master'
Bump post-processing API revision

See merge request OpenMW/openmw!5183
2026-03-04 20:16:19 +03:00
wareya f92801962e Move local matrix math to only group rotation, and simplify it 2026-03-04 10:20:51 -05:00
Alexei Kotov 38c7646fa0 Bump post-processing API revision 2026-03-04 18:05:24 +03:00
jvoisin 0f2eaf49a4 Merge branch 'messageboxnewline' into 'master'
Fix parser confusion after button-less formatted messages (#8990)

Closes #8990

See merge request OpenMW/openmw!5181
2026-03-04 14:25:12 +00:00
Alexei Kotov f0127113e2 Merge branch 'bc7-terrain-fix' into 'master'
Fix terrain normal/displacement mapping

See merge request OpenMW/openmw!5182
2026-03-04 16:40:43 +03:00
unelsson 3f9f5edd3a Try to manually fix the clang-format CI issue 2026-03-04 14:09:30 +02:00
unelsson 33a0fc1a83 Changelog 2026-03-04 14:03:16 +02:00
unelsson f5f282a21a clang-format 2026-03-04 13:56:16 +02:00
unelsson 84114a7c40 check bool first (optimization) 2026-03-04 13:41:03 +02:00
unelsson d8446d3358 Clarify distance calculations 2026-03-04 13:32:19 +02:00
unelsson 9e4dca3f3c Code style updates 2026-03-04 13:01:18 +02:00
unelsson f416e2e06f Function rename, simplify logic 2026-03-04 12:40:14 +02:00
wareya 4d863f41c0 fix rotation non-1-scaled objects, and some nitpicks 2026-03-03 17:53:14 -05:00
wareya f4dde1d867 Fix terrain normal/displacement mapping 2026-03-03 14:32:13 +00:00
Alexei Kotov 6df72dc3a0 Fix parser confusion after button-less formatted messages (#8990)
Re-reset expect name and tolerant name settings in this situation:
- the newline was read
- the newline was handled by a parser that decided to put it back
- the parent parser re-enabled them, expecting a newline character to reset them
- the newline is about to be handled by that parser

This is to prevent the messagebox hacks from wrecking the next line's parsing
2026-03-03 04:46:58 +03:00
Alexei Kotov 9915cf2156 Fix spell icon tooltips when they're updated every frame 2026-03-03 02:15:08 +03:00
unelsson b875fd2ed1 Better includes 2026-03-03 00:43:39 +02:00
unelsson 6ff2687f59 Else if else paths. Small optimization. 2026-03-02 23:18:59 +02:00
Alexei Kotov f786ca95f2 ALSO don't warp to widget during an emulated mouse press 2026-03-03 00:17:34 +03:00
unelsson a2f7fc3758 Remove getPagedWorldspaceWidget() 2026-03-02 20:10:22 +02:00
unelsson 6cd574d9c0 Minor language fix 2026-03-02 20:05:50 +02:00
unelsson f29883aba2 Return if land allowing is not edited. Better checks. 2026-03-02 19:59:04 +02:00
wareya f6b3917902 fix typo + clang-format oddity 2026-03-02 12:31:23 -05:00
unelsson 4d06284ce6 Remove QMOC. Do nothing if land editing isn't allowed. 2026-03-02 19:14:48 +02:00
wareya aa26d965d1 fix comment formatting for clang-format 2026-03-02 10:35:28 -05:00
wareya b53a7875cc Change rotation center to average origin, address some nitpicks 2026-03-02 10:29:12 -05:00
wareya 0f3dd375c6 Merge branch 'master' of https://gitlab.com/OpenMW/openmw into multirotate 2026-03-02 09:29:21 -05:00
Alexei Kotov e7505c5027 Also don't warp to widget if it wasn't triggered by a gamepad action 2026-03-02 17:12:16 +03:00
Alexei Kotov 57bcef4768 Don't warp to widget if the left mouse button is held (#8833) 2026-03-02 16:53:28 +03:00
Evil Eye 75529ecd54 Replace redundant variant 2026-03-02 12:12:58 +01:00
unelsson c326ab1dce Fix merge conflict mistake 2026-03-02 12:10:55 +02:00
Sam Hellawellandunelsson 474cd6493c Cleanup 2026-03-02 11:46:58 +02:00
Sam Hellawellandunelsson d0189e80e6 Formatting fix 2026-03-02 11:46:58 +02:00
Sam Hellawellandunelsson d09848069d Fix undo to use macros (cykoder) + fix merge conflict (unelsson) 2026-03-02 11:46:24 +02:00
Sam Hellawellandunelsson 880235bf3c Changelog 2026-03-02 11:44:29 +02:00
Sam Hellawellandunelsson 8aa921cbc1 Hail clang 2026-03-02 11:44:29 +02:00
Sam Hellawellandunelsson 1917df386b Update icon 2026-03-02 11:44:29 +02:00
Sam Hellawellandunelsson 8738c6674c Fix build 2026-03-02 11:44:29 +02:00
Sam Hellawellandunelsson 3738f051ff Land color painting (cykoder) + fix merge conflict (unelsson)
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
2026-03-02 11:42:38 +02:00
Alexei Kotov 9a8386980a Editor: Validate IDs in the edit ID action (#4769) 2026-03-02 10:21:32 +03:00
Alexei Kotov 942315d332 Merge branch 'makeitcount' into 'master'
Restore the item stack's Ptr's count after dropping an item

See merge request OpenMW/openmw!5172
2026-03-02 01:01:25 +03:00
Evil Eye 00d3989b24 Merge branch 'loadlua' into 'master'
Allow Lua to mutate the ESM store on load

Closes #8987

See merge request OpenMW/openmw!5132
2026-03-01 21:52:53 +00:00
Evil Eye fb1b74e8b3 Bump API revision and lua documentor 2026-03-01 21:07:38 +01:00
Evil Eye 8ebb981bdb Add an integration test 2026-03-01 20:58:14 +01:00
Evil Eye 881bb10c6d Fix docs 2026-03-01 20:58:14 +01:00
Evil Eye 1c18197905 Address feedback 2026-03-01 20:58:14 +01:00
Evil Eye cb7c4a31d9 Use a less ambiguous function name 2026-03-01 20:58:14 +01:00
Evil Eye 1d583c2a37 Update luadocumentor 2026-03-01 20:58:14 +01:00
Evil Eye e39b867f11 Fix docs 2026-03-01 20:58:14 +01:00
Evil Eye 75772caa10 Add documentation 2026-03-01 20:58:14 +01:00
Evil Eye 43a9bd9256 Add a records prop to hold the store to leave room for utility functions 2026-03-01 20:58:14 +01:00
Evil Eye 95e580c2a1 Fix header 2026-03-01 20:58:14 +01:00
Evil Eye c58de24ceb Dehardcode default statics 2026-03-01 20:58:14 +01:00
Evil Eye 9be4687978 Add Static bindings 2026-03-01 20:58:14 +01:00
Evil Eye 07d61e4ca5 Add global bindings 2026-03-01 20:58:14 +01:00
Evil Eye 58e1ef098d Add onContentFilesLoaded 2026-03-01 20:58:13 +01:00
Evil Eye 7a581f359e Add LOAD scripts and split manager init 2026-03-01 20:58:13 +01:00
Alexei Kotov a8e96819dd Merge branch 'config-button-2026' into 'master'
Add list of config directories and ability to open them from the launcher

Closes #7493

See merge request OpenMW/openmw!5139
2026-03-01 22:41:32 +03:00
AnyOldName3 911bfc1205 French full stop 2026-03-01 18:52:44 +00:00
AnyOldName3 1738837c98 Use correct header 2026-03-01 18:52:04 +00:00
AnyOldName3 3216c84918 Fix badly-resolved merge conflict 2026-03-01 18:51:01 +00:00
Alexei Kotov ecb0cd1ff7 Merge branch 'lessoptionalsiliconmoreoptionalintel' into 'master'
Make MR Silicon jobs less optional and Intel jobs more optional

See merge request OpenMW/openmw!5173
2026-03-01 19:57:17 +03:00
Evil Eye b76bd14c2a Merge branch 'are-you-done-yet' into 'master'
[Lua] Handler for animations ending

Closes #123 and #8979

See merge request OpenMW/openmw!5158
2026-03-01 10:16:12 +00:00
AnyOldName3 4463f9e3eb The rest of Poland 2026-02-28 23:03:43 +00:00
Alexei Kotov 62802bb5fe Merge branch 'actionablestate' into 'master'
Don't change a UI element's state if we failed to add an action

See merge request OpenMW/openmw!5170
2026-02-28 23:26:47 +03:00
Alexei Kotov 87bca9249a Merge branch 'macos-remove-brew-installs' into 'master'
MacOS CI Scripts - remove brew installs

See merge request OpenMW/openmw!5171
2026-02-28 22:38:25 +03:00
Alexei Kotov 4d8c660584 Merge branch 'goglinux' into 'master'
Detect GOG Galaxy Morrowind Wine registry path

See merge request OpenMW/openmw!5169
2026-02-28 17:45:43 +03:00
Alexei Kotov 8eb7ff0bc9 Make MR Silicon jobs less optional and Intel jobs more optional
Silicon jobs are now cheap enough to be pocket change even when there are no cache hits and can often be useful
while the manual Intel jobs should not be blocking and are typically not useful unless the MR explicitly attempts CI changes
2026-02-28 17:33:53 +03:00
Alexei Kotov 787329978f Merge branch 'wizard-logging-refactor' into 'master'
Wizard logging uses Log class

See merge request OpenMW/openmw!5168
2026-02-28 16:08:32 +03:00
Alexei Kotov 2c4f5fb56f Merge branch 'noammonecessary' into 'master'
Don't interrupt ranged wind-up if there's no ammo (#8983)

Closes #8983

See merge request OpenMW/openmw!5167
2026-02-28 01:45:44 +03:00
Evil Eye 559b1cd33c Restore the item stack's Ptr's count after dropping an item 2026-02-27 22:13:48 +01:00
Nathan Conway d5d022bd96 type fix 2026-02-27 14:47:44 -05:00
Sarah Sunday a06e855bc3 [AUTHORS] add myself to it finally 2026-02-27 13:47:38 -06:00
Sarah Sunday 0e0c7e9c56 [CI] Do not install fontconfig yaml-cpp sqlite via brew 2026-02-27 13:09:13 -06:00
Alexei Kotov efff651879 Merge branch 'vcpkg-ci-overhaul' into 'master'
Vcpkg CI overhaul for Macs (arm, intel), update Windows vcpkg deps target

See merge request OpenMW/openmw!5162
2026-02-27 21:54:56 +03:00
AnyOldName3 6d44bfcf1a More French 2026-02-27 17:34:51 +00:00
AnyOldName3 aeb940b586 Some Polish fixes 2026-02-27 17:33:35 +00:00
Sarah Sunday 4206529599 [CI] Improve/make clear cache settings of macos job 2026-02-27 10:35:23 -06:00
Nathan Conway cd0f0c4f97 remove localized log messages, removed translations for those 2026-02-27 11:33:26 -05:00
AnyOldName3 2978a184e8 Partially fix French 2026-02-27 16:17:27 +00:00
Nathan Conway 91f361ffe3 Removed nonexistent message translation 2026-02-27 11:03:06 -05:00
Nathan Conway 2efb47c74d removed more dead code 2026-02-27 11:00:26 -05:00
Evil Eye c2381c724d Don't change a UI element's state if we failed to add an action 2026-02-27 16:47:51 +01:00
Alexei Kotov a481c608eb Merge branch 'coveritysadcat' into 'master'
Address Coverity complaints about KeywordSearch updates

See merge request OpenMW/openmw!5166
2026-02-27 18:39:36 +03:00
Alexei Kotov 53fd9bce93 Detect GOG Galaxy Wine registry Morrowind path 2026-02-27 17:36:45 +03:00
Alexei Kotov ec8ecfb1f2 Merge branch 'voicegmsts' into 'master'
Greeting tweaks (#8956)

Closes #8956

See merge request OpenMW/openmw!5147
2026-02-27 15:54:31 +03:00
Alexei Kotov 4f07d19fcb Merge branch 'nonpostprocessedglare' into 'master'
Don't disable the sunglare when post-processing is disabled (#8854)

Closes #8854

See merge request OpenMW/openmw!5115
2026-02-27 14:20:38 +03:00
Alexei Kotov 041bdad4c6 Merge branch 'extranothingplease' into 'master'
Allow null extra data links in Gamebryo meshes (#8930)

Closes #8930

See merge request OpenMW/openmw!5163
2026-02-27 14:06:09 +03:00
Alexei Kotov 6674c9b402 Merge branch 'removedoesntactuallyremovewhywouldyouthinkthat' into 'master'
Only use addItem instead of copyItem when the stack has actually been removed

Closes #8955

See merge request OpenMW/openmw!5149
2026-02-27 13:55:10 +03:00
Alexei Kotov 5fbac41c84 Merge branch 'overgrownweres' into 'master'
Reset modifiers before applying werewolf modifiers

Closes #8975

See merge request OpenMW/openmw!5161
2026-02-27 13:53:21 +03:00
Alexei Kotov d6332bbf10 Merge branch 'polishparens' into 'master'
Add additional word separators to support the Polish version

Closes #8978

See merge request OpenMW/openmw!5164
2026-02-27 13:43:44 +03:00
Nathan Conway e75c250c01 wizard logging uses Log class 2026-02-26 22:44:33 -05:00
AnyOldName3 1c77663f12 Clear configsList
We reuse the same SettingsPage instance after running the wizard.
2026-02-26 23:15:37 +00:00
Alexei Kotov 08c97e85b1 Don't interrupt ranged wind-up if there's no ammo (#8983) 2026-02-27 01:08:00 +03:00
Alexei Kotov 8d839d01aa Merge branch 'wolfiesfinehoney' into 'master'
Catch exceptions in Lua UI events

Closes #8980

See merge request OpenMW/openmw!5165
2026-02-27 00:22:31 +03:00
Mads Buvik Sandvei b6a4b2d61e Disable autodisable for equip animation. 2026-02-26 22:09:18 +01:00
Mads Buvik Sandvei 29dbe75944 Also reset on equip end 2026-02-26 20:47:19 +01:00
AnyOldName3 cf9ac8c169 Add missing line 2026-02-26 18:29:56 +00:00
AnyOldName3 6df6e10a4e Mark English 'translations' as finished 2026-02-26 18:08:39 +00:00
AnyOldName3 84e6be11c7 Make method private.
I hadn't noticed that it wasn't.
2026-02-26 18:06:45 +00:00
AnyOldName3 daa63e2a21 Use QDir to tolerate lack of trailing slash
QFileInfo absolutePath gives the parent path for paths that don't have a trailing slash.
Its absoluteFilePath method mostly does what we want, but adds a trailing slash whether or not you want one.

We've got away with this in testing as FixedPath adds a trailing slash to the application name and I guess I ended up with explicit trailing slashes in the paths I tested.
2026-02-26 18:05:25 +00:00
Alexei Kotov fd665bef06 Address Coverity complaints about KeywordSearch updates
Don't rely on integer overflow, use move semantics for match generation
2026-02-26 19:32:59 +03:00
AnyOldName3 c6b98ff362 Swedish translation from Lysol 2026-02-26 15:33:31 +00:00
Sarah Sunday de43e5ab14 [MAC] Bust mac cache keys 2026-02-25 20:26:13 -06:00
Sarah Sunday a3ffe77c24 [MAC] Adjust deploy targets for latest 13/14 2026-02-25 20:26:06 -06:00
Sarah Sunday 4102f0eda5 [MAC] Target 13.3 for amd64 2026-02-25 15:36:34 -06:00
Mads Buvik Sandvei 29421f38c8 Reset idle on attack end instead 2026-02-25 22:27:38 +01:00
Evil Eye 9034e3bc67 Catch exceptions in Lua UI events 2026-02-25 22:19:26 +01:00
Mads Buvik Sandvei 4d4f5f7352 getCompletion() helper function. fix doc typo 2026-02-25 21:57:55 +01:00
Sarah Sunday 3530df54f0 [MAC] Use main branch, deps key, osx target 2026-02-25 13:46:02 -06:00
Evil Eye db14d7bda4 Add additional word separators to support the Polish version 2026-02-25 20:00:03 +01:00
Evil Eye e022795585 Improve const correctness 2026-02-25 19:46:56 +01:00
AnyOldName3 59a2ccdf11 Merge branch 'mrkfiles' into 'master'
Rework dialogue hypertext parsing (#7297)

Closes #7297

See merge request OpenMW/openmw!5146
2026-02-25 17:27:49 +00:00
AnyOldName3 81962b8989 Merge branch 'giantmenuarms' into 'master'
Use iMaxInfoDist as the menu mode activation distance

Closes #8957

See merge request OpenMW/openmw!5160
2026-02-25 17:12:28 +00:00
Evil Eye ebb4ccdd95 Merge branch 'sciencecompelsustoflipthesun' into 'master'
Change the texture asset origin convention to top-left (#6885)

See merge request OpenMW/openmw!5135
2026-02-25 16:31:36 +00:00
Alexei Kotov 1d6057f93d Allow null extra data links in Gamebryo meshes (#8930) 2026-02-25 19:27:54 +03:00
jvoisin 62e6afb442 Merge branch 'needforspeed' into 'master'
Don't merge/add duplicate non-temporary effects

Closes #8959

See merge request OpenMW/openmw!5148
2026-02-25 11:35:32 +00:00
Sarah Sunday 7129be80c6 [WINDOWS] Update vcpkg tag 2026-02-24 20:45:06 -06:00
Sarah Sunday cb5a9b8714 [MAC] Use vcpkg flow for arm and intel 2026-02-24 20:45:06 -06:00
Alexei Kotov 376f664488 Some more cleanup
Avoid initialization 2x combo for the dialogue manager keyword search, shorten include, simplify asterisk appending
2026-02-25 04:42:59 +03:00
Alexei Kotov a158e7e164 Fix pseudoasterisk-only hyperlink handling broken in the previous commit 2026-02-25 04:07:14 +03:00
Alexei Kotov 6ee6c98453 Cleanup and address review 2026-02-25 04:07:13 +03:00
Alexei Kotov 422284f32d Maybe fix Windows jobs 2026-02-25 04:07:13 +03:00
Alexei Kotov 7f20165806 Add a bajillion hypertext parser and translation tests 2026-02-25 04:07:13 +03:00
Alexei Kotov c594a5e0fb Handle multiple topics with the same keyword "gracefully"
There isn't a reasonable approach to this. Pick "first seeded topic wins" as the rule.
This isn't really doing the same thing as whatever Morrowind does but whoever tries to invoke the behavior in practice is evil and should feel bad
2026-02-25 04:07:13 +03:00
Alexei Kotov dacafdae80 Formatting 2026-02-25 04:07:13 +03:00
Alexei Kotov e751e56599 Use MRK files
I guess now is the appropriate time.
2026-02-25 04:07:13 +03:00
Alexei Kotov c87b08e597 Streamline ID handling
All hypertext users want the processed IDs, so might as well process it during parsing
2026-02-25 04:07:13 +03:00
Alexei Kotov 12f50904d2 Move removePseudoAsterisks to the anonymous namespace
It's no longer used outside of the class.
2026-02-25 04:07:13 +03:00
Alexei Kotov 8a7cee4782 Simplify journal topic-link mapping 2026-02-25 04:07:12 +03:00
Alexei Kotov 9b61b099c3 Make hyperlink display name handling less confusing
Matches now cover the entire line and display name generation is unified
2026-02-25 04:07:12 +03:00
Alexei Kotov da3e2a14d3 Merge HyperTextParser namespace with keyword search
Parsing hypertext always requires the keyword search class and including it in the class adds no dependencies.

Also some cleanup in the relevant code
2026-02-25 04:07:12 +03:00
Alexei Kotov 78636d891a The Great Dialogue Highlighting De-template-ing
None of hypertext parser users need anything other than the ID to figure out what the actual value should be.
Also some simplification of standard form use
2026-02-25 04:07:12 +03:00
Alexei Kotov 997b1f4c0f Rewrite dialogue entry parsing in terms of the hypertext parser
This still duplicates some code from the journal. Note the link pointers are non-const because dereferencing a topic link unique_ptr from the main window's list gives us a non-const pointer
2026-02-25 04:07:12 +03:00
Alexei Kotov e1a6b5d27b Rewrite journal parsing in terms of hypertext parser
This makes sure the journal can highlight both explicit and implicit hyperlinks
and gets rid of containsKeyword as KeywordSearch will not be seeded with the original topic IDs when MRK files are implemented
2026-02-25 04:07:12 +03:00
Alexei Kotov aa0a460cc5 Further hypertext parser generalization 2026-02-25 04:07:12 +03:00
Alexei Kotov d99879a0ec Some journal view model exorcism 2026-02-25 04:07:12 +03:00
Alexei Kotov 732f1690dc Some code deduplication in dialogue entry writing
This changes asterisk handling behavior to be closer to the hypertext parser, but doesn't make the important changes yet. just makes the juicy changes easier to apply. It's a secret weapon that will help us later.
2026-02-25 04:07:12 +03:00
Alexei Kotov fdbe9cb69b First pass of hypertext parser generalization 2026-02-25 04:07:12 +03:00
Alexei Kotov 232a2571bb Adjust translation storage API for MRK files 2026-02-25 04:07:12 +03:00
AnyOldName3 6254779d06 Mark Russian translations as finished
Other translators did this for their languages, so if I change the source strings, I'm going to have to -no-obsolete them anyway.
2026-02-24 23:40:18 +00:00
AnyOldName3 c3a806adf3 Fixup French translation 2026-02-24 23:37:34 +00:00
AnyOldName3 bdda9f2ee9 French translation from jvoisin 2026-02-24 23:33:36 +00:00
AnyOldName3 9703e5cdac Polish translation from Igilq 2026-02-24 23:32:45 +00:00
Mads Buvik Sandvei 1ca8d470b4 Bump lua API revision 2026-02-24 21:52:37 +01:00
Mads Buvik Sandvei 672cfe1231 Reset idle on release 2026-02-24 21:52:10 +01:00
Mads Buvik Sandvei e2b4d16325 Handler for animations ending 2026-02-24 21:52:10 +01:00
AnyOldName3 9c86afcf1a Typo fixes (supposedly - I don't speak Russian) 2026-02-24 16:45:55 +00:00
AnyOldName3 b64f2a933c Add missing full stop, add Russian translation from Capo 2026-02-24 15:38:20 +00:00
Alexei Kotov 87b266c136 Merge branch 'countyourblessings' into 'master'
Use as many messagebox arguments as there are quoted arguments (#8129)

Closes #8129

See merge request OpenMW/openmw!5116
2026-02-24 03:19:31 +03:00
Evil Eye ccb1d10339 Reset modifiers before applying werewolf modifiers 2026-02-22 10:47:11 +01:00
Evil Eye 3a94108e0f Use iMaxInfoDist as the menu mode activation distance 2026-02-21 15:08:05 +01:00
Evil Eye 1409c532c8 Merge branch 'redirect-qt-debug' into 'master'
Qt Logging Redirected to Application's Logs

Closes #8852

See merge request OpenMW/openmw!5159
2026-02-21 12:00:07 +00:00
Nathan Conway 4b2012eb2b simple log 2026-02-20 16:47:57 -05:00
Nathan Conway 433d2109d2 finalize formatting 2026-02-19 22:08:14 -05:00
Nathan Conway 409990354f Qt logging redirected to application log 2026-02-19 20:35:45 -05:00
Alexei Kotov db7feb8245 Merge branch 'vfs_normalized_path_27' into 'master'
Use normalized path for esmterrain storage, font loader etc (#8138)

See merge request OpenMW/openmw!5154
2026-02-19 00:33:51 +03:00
elsid 80912280f4 Use normalized path for the font loader 2026-02-17 21:09:43 +01:00
Alexei Kotov e391b0c86f Merge branch 'thisishowkingcrimsonworksmaybe' into 'master'
Skip thrown weapon -> H2H idle transition at the end of an attack (#8924)

Closes #8924

See merge request OpenMW/openmw!5107
2026-02-17 14:53:22 +03:00
Alexei Kotov 9c3221e644 Merge branch 'changelog' into 'master'
Sync the 0.51 changelog

See merge request OpenMW/openmw!5156
2026-02-17 14:50:21 +03:00
Evil Eye 12d711168e Sync the 0.51 changelog 2026-02-16 16:47:34 +01:00
elsid 142acadce6 Use normalized path in Storage::getTextureSetLayerInfo 2026-02-15 22:43:32 +01:00
elsid 28b226740e Use normalized path in Storage::getLayerInfo 2026-02-15 22:43:32 +01:00
elsid dacf6cdc01 Add join function to create normalized path
To reduce the number of allocations.

Add append member function as /= implementation having naming consistent
with std::filsystem::path.

Make sure append for empty Normalized does not add leading separator
(consistent with std::filesystem::path).
2026-02-15 22:43:31 +01:00
elsid fb6406b77d Explicitly convert std::string to normalized path 2026-02-15 13:26:24 +01:00
elsid 982c2b1dc7 Use normalized path for nif loader 2026-02-15 13:24:50 +01:00
elsid 66cd9114b8 Fix return type for FileView::getFilename 2026-02-15 13:24:44 +01:00
elsid fb0f8fcd35 Throw exception on invalid NPC model path 2026-02-14 18:45:06 +01:00
elsid fa46595d5b Use normalized path for isDefaultActorSkeleton 2026-02-14 18:45:06 +01:00
Daisyhasacat a13f8f3394 Merge branch 'onInfoGetText' into 'master'
onDialogueResponse implementation

See merge request OpenMW/openmw!5142
2026-02-13 22:55:39 +00:00
MaarsandDaisyhasacat 731a0ee698 onDialogueResponse implementation 2026-02-13 22:55:38 +00:00
Evil Eye 7639d6f9ca Address feedback 2026-02-12 18:38:18 +01:00
Evil Eye 2575aed77f Rename members 2026-02-12 16:45:09 +01:00
Alexei Kotov 9f2426fb23 Use keywords and literals that start with ., - or numbers as buttons 2026-02-12 18:32:28 +03:00
Alexei Kotov 223107bf78 Don't use more than 10 message box buttons 2026-02-12 15:25:34 +03:00
Alexei Kotov d1ecd2037e Add some tests for #8129 2026-02-12 15:21:48 +03:00
Alexei Kotov a0df14855e Use as many messagebox arguments as there are quoted arguments (#8129) 2026-02-12 15:21:48 +03:00
Alexei Kotov ba0d7bc508 Skip Thrown->H2H idle transition (#8924) 2026-02-12 04:59:05 +03:00
Alexei Kotov 47e39e05a8 Purge voiceover and turning checks from greeting handling
Turning only happens during the greeting, while voiceover is irrelevant to its state
2026-02-12 01:32:25 +03:00
Alexei Kotov dcbbbdce7e Greeting tweaks (#8956)
Implement iGreetDuration and fGreetDistanceReset
Make forced idle handling more coherent
Distance reset is possible mid-greeting
Lowered the initial delay
2026-02-12 01:32:25 +03:00
Evil Eye 0552d912ed Allow all creatures to use enchanted items 2026-02-11 22:21:58 +01:00
Evil Eye e77ccded45 Move mSelectedEnchantItem to ContainerStore and follow the rule of five 2026-02-11 21:28:20 +01:00
Evil Eye d2e8cba967 Improve ContainerStore layout 2026-02-11 19:52:38 +01:00
Evil Eye 738e8a6ddb Only use addItem instead of copyItem when the stack has actually been removed 2026-02-11 17:59:23 +01:00
Evil Eye 381cd57a06 Don't merge/add duplicate non-temporary effects 2026-02-10 17:30:58 +01:00
Alexei Kotov 01bcd6a636 Merge branch 'even-if-youre-there' into 'master'
Fix #8952

Closes #8952

See merge request OpenMW/openmw!5144
2026-02-10 06:29:06 +03:00
Alexei Kotov bce4f40e5a Merge branch 'nokeyusealockpick' into 'master'
Change type of types.NPC.records to match the other types.X.records properties

See merge request OpenMW/openmw!5145
2026-02-09 13:53:54 +03:00
Alexei Kotov aecb07e159 Merge branch 'luascriptid' into 'master'
Save Lua script ids instead of paths

See merge request OpenMW/openmw!5092
2026-02-09 13:53:12 +03:00
Evil Eye 7105d653c5 Change type of types.NPC.records to match the other types.X.records properties 2026-02-08 10:55:38 +01:00
Evil Eye e4ffddb641 Replace getters and setters with direct member access 2026-02-08 10:35:22 +01:00
AnyOldName3 9fbe9a02aa Fix #8952
Regression from 2754d4264c !5047
2026-02-07 23:43:56 +00:00
AnyOldName3 6f2d024a72 Rework config directory tooltips 2026-02-07 01:13:51 +00:00
AnyOldName3 00fb8357ef Remove explicit QList<QAction*> 2026-02-06 17:43:29 +00:00
AnyOldName3 a12339660e Stack-allocate context menu 2026-02-06 17:37:22 +00:00
AnyOldName3 fc27025e09 More files, e.g. openmw.log
Also move more stuff to loops instead of copying and pasting.
2026-02-06 17:35:49 +00:00
Alexei Kotov 3be27b59bf Address review
Document some non-obvious UV shenanigans and remove a misleading hyphen
2026-02-05 22:03:43 +03:00
Alexei Kotov a357dcc1b1 Change the texture asset convention to top-left (#6885)
This is basically a MR description but this commit covers a lot of things so I'll include it so you don't have to look at the MR:

This allows us to use BC6H and BC7 textures as is, provided the used OSG revision and hardware support them
DDS images are unflipped by default, non-DDS bottom-left convention images are flipped (TGA, BMP, PNG, JPG)
3D DDS images always used top-left convention if they were used in post-processing

Numerous things flipped in this commit to guarantee the same visual results are:
- Terrain UV and blend maps
- Water UV, normal map and simple water ripple alignment

- NiTriShapeData and BSTriShape UV (unflipped), NiUVController vertical offset
- NIF particles are NOT flipped, they remain flipped for Morrowind compatibility

- GUI widget texture UV and convention
- Cursor
- Character preview inventory doll and race menu head UV and display
- Loading screen scene image UV
- Local and global map UVs (fog of war, unexplored and explored maps)
- Saved game screenshot UV
- Video widget UV

- Rain particle alignment
- Sun and moon UV

- Tangent space handedness (bitangent direction)
- Parallax vertical offset

Things where this is a breaking change
- Collada geometry UV (Example Suite and anything else affected must adopt the changes)
- Compressed non-S3TC images that should but can't be flipped (this is KTX which we don't technically support yet)
- Any forward pass shader replacements that currently still use the original tangent space handedness and parallax convention
2026-02-05 21:05:35 +03:00
Alexei Kotov a086ff3fb6 Merge branch 'Transform-effect-associated-skills-and-attributes-in-ENAM-and-IRDT-to-RefIds' into 'master'
Transform magic effect-associated skills and attributes in ENAM and IRDT structs to RefIds

See merge request OpenMW/openmw!5143
2026-02-05 18:27:45 +03:00
Alexei Kotov b6f633e866 Merge branch 'reorderofreorderedeffects' into 'master'
Rework spell icon update (#8946)

Closes #8946

See merge request OpenMW/openmw!5138
2026-02-05 18:08:19 +03:00
jvoisin cafc2c7382 Merge branch 'equipsounddeduplicate' into 'master'
Tweak drag-and-drop sounds for gamepad equip action (#8797)

Closes #8797

See merge request OpenMW/openmw!5117
2026-02-05 15:03:54 +00:00
jvoisin f152ac9161 Merge branch 'localtoplayer' into 'master'
Fix SkillProgression interface documented context (#8815)

Closes #8815

See merge request OpenMW/openmw!5112
2026-02-05 14:50:54 +00:00
jvoisin 0b6580e4c2 Merge branch 'shinejotaro' into 'master'
Re-enable rotation for thrown projectiles

See merge request OpenMW/openmw!5110
2026-02-05 14:50:28 +00:00
Alexei Kotov 680ae4d89f Merge branch 'healplz' into 'master'
Only ignore temporary effects based on their time left

See merge request OpenMW/openmw!5137
2026-02-05 14:28:57 +03:00
AnyOldName3 7333b09a81 Title case for labels 2026-02-05 00:10:02 +00:00
AnyOldName3 5792c2342c Prefix enum value names 2026-02-05 00:07:41 +00:00
AnyOldName3 b28e109702 Add and fix implicit this capture warning 2026-02-05 00:06:02 +00:00
Telvanni 4Life 4e828dd6ff Changed skills and attributes in IRDTstruct to use RefIds instead of indices 2026-02-04 11:59:20 -05:00
Telvanni 4Life 12dca7ecef Changed skills and attributes in ENAMstruct to use RefIds instead of indices. 2026-02-04 11:59:20 -05:00
Evil Eye a295acf19f Merge branch 'drop-msvc-2019' into 'master'
Drop MSVC 2019 support, support 2026 instead

See merge request OpenMW/openmw!5133
2026-02-04 15:54:30 +00:00
Evil Eye f93aca8166 Clear script index caches when (re)loading config 2026-02-04 16:36:53 +01:00
Evil Eye ee1cee1181 Reassign script id and test script order changes 2026-02-04 16:36:53 +01:00
Evil Eye fdc2e63152 Save Lua script ids instead of paths 2026-02-04 16:36:51 +01:00
Alexei Kotov a95543fec9 Merge branch 'Serialize-magic-effect-RefId-directly' into 'master'
Serialize active magic effects and dynamic ENAM-based record RefIds directly

See merge request OpenMW/openmw!5141
2026-02-04 15:51:42 +03:00
AnyOldName3 c7253fb418 Switch to QTreeWidget 2026-02-03 23:46:40 +00:00
Telvanni 4Life ce5e38a30b Serialized magic effect, skill, and attribute ENAM parameters as RefId in effectlist. 2026-02-03 18:34:22 -05:00
AnyOldName3 35f19d8fbd Update mention of compiler versions 2026-02-03 21:56:00 +00:00
AnyOldName3 56404258a9 Drop MSVC 2019 support, support 2026 instead 2026-02-02 16:49:41 +00:00
Telvanni 4Life e97a293d05 - Added save game version
- Serialized magic effect as RefId in activespells, creaturestats, and magiceffects
2026-02-02 10:47:03 -05:00
Alexei Kotov 6226836c39 Merge branch 'new-recast' into 'master'
Use new recast commit that works with CMake 4.x

See merge request OpenMW/openmw!5136
2026-02-02 16:59:43 +03:00
Alexei Kotov 4b1b99e52a Merge branch 'osg_stats_moving_average' into 'master'
Support moving average for timeseries in osg_stats.py

See merge request OpenMW/openmw!5090
2026-02-02 16:57:25 +03:00
AnyOldName3 7f1673f14f Set alternative widget 2026-02-01 23:37:27 +00:00
Evil Eye bc5c48b424 Merge branch '7340-guards-do-not-become-properly-aggressive' into 'master'
Check combat state in isAggressive for dialogue filters

Closes #7340

See merge request OpenMW/openmw!5123
2026-02-01 19:14:31 +00:00
AnyOldName3 b20b6edade I thought I'd formatted this 2026-02-01 18:18:16 +00:00
AnyOldName3 c9ca2310a4 And the translations again 2026-02-01 18:15:30 +00:00
AnyOldName3 058b2101d8 Grey out files that don't exist 2026-02-01 18:05:20 +00:00
AnyOldName3 0baab76435 Add context menu 2026-02-01 17:42:20 +00:00
Alexei Kotov 7ec362b96b Cleanup 2026-02-01 18:10:33 +03:00
Alexei Kotov 5ef5526f66 Merge branch 'update_windows_build_deps' into 'master'
Use 2026-01-20 vcpkg deps for windows

Closes #8918 and #8374

See merge request OpenMW/openmw!5120
2026-02-01 13:55:33 +03:00
AnyOldName3 dec169697f Connect signal once 2026-02-01 03:29:04 +00:00
Alexei Kotov 1241bf270c Rework spell icon update (#8946) 2026-02-01 00:32:09 +03:00
AnyOldName3 fe3080dafd General cleanup
* should be more localisable due to not concatenating strings
* prefer safe std::filesystem::path stuff over dodgy QString stuff
* tweaked text because this is a list of config direcotries not openmw.cfg files
2026-01-31 18:50:48 +00:00
AnyOldName3 535ad671ef Hoist constants out of loop 2026-01-31 18:21:18 +00:00
AnyOldName3 63ab9882dc Merge branch 'add_open_config_button' of https://gitlab.com/yury.stepovikov/openmw into config-button-2026 2026-01-31 18:15:15 +00:00
elsid 0fb97efa90 Support moving average for timeseries in osg_stats.py 2026-01-31 18:30:55 +01:00
elsid 7122c0b4f0 Use 2026-01-20 vcpkg deps for windows 2026-01-31 18:24:07 +01:00
Evil Eye e0f636d379 Only ignore temporary effects based on their time left 2026-01-31 11:46:18 +01:00
Alexei Kotov 3ac4a744a8 Merge branch 'throwingweaponswish' into 'master'
Re-enable swish sound for throwing weapons (#8926)

Closes #8926

See merge request OpenMW/openmw!5106
2026-01-30 12:06:19 +03:00
Alexei Kotov bbcae3a49b Merge branch 'gammacorrectionvalue' into 'master'
Show the gamma correction value (#8913)

Closes #8913

See merge request OpenMW/openmw!5111
2026-01-30 11:58:45 +03:00
AnyOldName3 faf45735c0 Slightly different recast commit
This one doesn't force-disable assertions
2026-01-30 00:01:29 +00:00
AnyOldName3 79f30853d1 Use CMake 4.x-compatible yaml-cpp 2026-01-29 18:56:06 +00:00
AnyOldName3 281e42dbe3 Use new recast commit that works with CMake 4.x
There's no upstream commit that passes our tests and works with CMake 4.x, so we have to get one with a fix merged from our fork (that I just made).
2026-01-29 17:13:37 +00:00
Alexei Kotov 7a2a9d9370 Merge branch 'testing123' into 'master'
Bump example suite revision to improve test coverage

See merge request OpenMW/openmw!5134
2026-01-29 11:45:21 +03:00
Alexei Kotov 2a337a34f0 Merge branch 'FixSpellviewNavigationInQuickkeys' into 'master'
Fix quick-keys' spell list's D-pad / controller navigation

Closes #8902

See merge request OpenMW/openmw!5080
2026-01-29 11:43:41 +03:00
AussiemonandAlexei Kotov 73f1f33ba1 Fix quick-keys' spell list's D-pad / controller navigation 2026-01-29 11:43:40 +03:00
Alexei Kotov e20d1407ae Merge branch 'Right-to-left-layout-direction' into 'master'
[OpenCS] Add subview open direction preference

Closes #721

See merge request OpenMW/openmw!5122
2026-01-29 11:42:45 +03:00
AussiemonandAlexei Kotov c620f058fd [OpenCS] Add subview open direction preference 2026-01-29 11:42:44 +03:00
Evil Eye 7cbfeb32fd Bump example suite revision to improve test coverage 2026-01-28 19:33:15 +01:00
AnyOldName3 6d3f9cacc3 Merge branch 'headandshoulders' into 'master'
Fix docs suggesting head and hair are paths

See merge request OpenMW/openmw!5105
2026-01-28 14:56:30 +00:00
AnyOldName3 1ea60f7b8f Merge branch 'Issue#8774' into 'master'
Closes #8774: The container/trade menu now automatically brings the focused menu to the front

Closes #8774

See merge request OpenMW/openmw!5099
2026-01-28 14:55:26 +00:00
jvoisin 65430c0a4d Merge branch 'gmstsshouldbereported' into 'master'
Properly report gmst.yaml loading again

See merge request OpenMW/openmw!5108
2026-01-28 13:51:54 +00:00
jvoisin f7812194ef Merge branch 'greatresponsibility' into 'master'
Move canUsePower docs to the right place (#8903)

Closes #8903

See merge request OpenMW/openmw!5088
2026-01-28 13:51:28 +00:00
Alexei Kotov fd91d03e48 Merge branch 'wide-debug-string' into 'master'
Fix DebugOutput

Closes #8944

See merge request OpenMW/openmw!5131
2026-01-28 02:51:31 +03:00
Evil Eye 74ed524114 Merge branch 'Move-magic-effect-GMST-to-effect-type' into 'master'
Move magic effect gmst to effect type

See merge request OpenMW/openmw!5129
2026-01-27 15:56:43 +00:00
Alexei Kotov a4b7d4a743 Merge branch 'new-documentor-version' into 'master'
Update CI to use Lua Documentor fix

Closes #8941

See merge request OpenMW/openmw!5130
2026-01-27 18:52:29 +03:00
AnyOldName3 c2069f5186 Fix stdout/stderr, too.
Although Windows as a whole got support for CP_UTF8 after Windows 10 (so some Enterprise IoT builds are non-EoL and don't support it for some functions), using it for SetConsoleOutputCP has been allowed since Windows 8, which is older than we support.
2026-01-27 14:31:31 +00:00
AnyOldName3 0520928a67 Undo something clang-format did because clang-format doesn't like it 2026-01-27 00:32:03 +00:00
AnyOldName3 c1f9bd2931 Fix DebugOutput
https://gitlab.com/OpenMW/openmw/-/issues/8944
2026-01-27 00:28:49 +00:00
Alexei Kotov 6b3a3418c2 Merge branch 'timingismagic' into 'master'
Address magic effect timing issues

Closes #8929

See merge request OpenMW/openmw!5128
2026-01-27 00:35:40 +03:00
Telvanni 4Life 6ac4de9cb5 Replaced ESM::MagicEffect::refIdToGmstString usage in sol::meta_function::to_string bindings to use effect id debug strings. 2026-01-26 15:26:47 -05:00
Telvanni 4Life b5c3da685a Refactored ESM::GameSettings searches for generic effect names to use mName parameter of MGEF. 2026-01-26 15:21:36 -05:00
Telvanni 4Life e873273a48 Added mName member to MGEF to hold effect GMST name. 2026-01-26 15:21:36 -05:00
Alexei Kotov f57884c424 Merge branch 'globalSearchRegexCheck' into 'master'
[OpenCS] Validate regex patterns and fix Replace in global search view

Closes #7152

See merge request OpenMW/openmw!5127
2026-01-26 22:59:03 +03:00
Aussiemon 510c52c339 Update Lua Documentor to use CI fix 2026-01-26 12:32:22 -07:00
AnyOldName3 7541206d7a Merge branch 'docurl' into 'master'
Fix launcher documentation link (#8934)

See merge request OpenMW/openmw!5113
2026-01-26 14:36:16 +00:00
Aussiemon 0ca93eb23e Move search result count persistence to tableSizeUpdate 2026-01-26 02:57:54 -07:00
Aussiemon 98f309d7f8 Update result count after replace 2026-01-26 01:47:12 -07:00
Aussiemon a969a7fc44 Set result count through operationDone instead 2026-01-26 01:35:41 -07:00
Aussiemon 8a769464fb Lock replace button when no search results 2026-01-25 13:35:15 -07:00
Aussiemon 294e62719b Group setter methods together 2026-01-25 12:52:43 -07:00
Alexei Kotov e7933da84e Pattern validation rewrite 2026-01-25 12:18:19 -07:00
Aussiemon b607a6a98a Call update instead of direct disable 2026-01-25 01:13:47 -07:00
Aussiemon 2770145272 We don't need so many negations 2026-01-25 00:23:12 -07:00
Aussiemon 5269688efc Minor comment consistency 2026-01-25 00:15:19 -07:00
Aussiemon 911d588d0a Cleaner condition handling and edit lock 2026-01-24 23:56:38 -07:00
Aussiemon 98c912f813 Don't tint replace text 2026-01-24 12:04:16 -07:00
Evil Eye 86f689b73f Remove duplicate effects naturally instead of immediately 2026-01-24 15:29:49 +01:00
Evil Eye ce76f7f938 Move spelleffects methods into an anonymous namespace 2026-01-24 15:29:47 +01:00
Evil Eye ae2635cb4e Merge branch 'Link-Effects-to-Skills-and-Attributes-via-Flags' into 'master'
Link magic effects to skills and attributes via flags

See merge request OpenMW/openmw!5114
2026-01-24 10:45:30 +00:00
Aussiemon 12ec0dd60d Fix bad dynamic cast in subview 2026-01-23 01:14:37 -07:00
Aussiemon 2b43186d0e More complex global search handling 2026-01-23 01:14:22 -07:00
Telvanni 4Life 7b85802957 - Removed SpellEffectParams equality operator.
- Improved logic for handling skill and attribute association.
2026-01-22 20:53:17 -05:00
AnyOldName3 3512054da7 Merge branch 'ci-tweaks-2022-rebased-2026-plus-msbuild' into 'master'
CI tweaks 2022

See merge request OpenMW/openmw!5085
2026-01-23 00:07:09 +00:00
Aussiemon ca1dbb7437 Validate regex patterns in global search 2026-01-22 16:49:46 -07:00
Telvanni 4Life 43c9424ebd Changed magicEffects parameter to be instantiated via constructor injection 2026-01-22 18:30:52 -05:00
Telvanni 4Life 51bf0074ad - Changed set and get methods in magic effect adapters to use MGEF context to determine skill and attribute associations.
- Changed SpellEffectParams equality operator in widgets to fetch skill and attribute associations via MGEF in ESM store.
2026-01-22 18:30:52 -05:00
Telvanni 4Life 8d23662cf2 Implemented setter injection to supply MGEF context to magic effect adapters 2026-01-22 18:30:52 -05:00
winklecrux 01292b8946 Check combat state in isAggressive for dialogue filters 2026-01-22 23:35:52 +13:00
jvoisin 851f69609f Merge branch 'sanitizeWidgetInputs' into 'master'
Clamp widget extension size and position calculation to prevent crashes, performance problems

See merge request OpenMW/openmw!5004
2026-01-21 22:02:02 +00:00
Aussiemonandjvoisin 1cb8965f27 Clamp widget extension size and position calculation to prevent crashes, performance problems 2026-01-21 22:02:02 +00:00
AnyOldName3 9a1107072b Add more files to naughty list
After a very tedious process, I got a log of the PeakPagedMemorySize64 of every TU (provided it lived long enough to do a query).

Everything that reported over a billion has been added to the list.
One file was removed because it didn't actually use that much.

This wasn't entirely foolproof - I can run it again single-threaded so cooperation over codegen threads won't throw the numbers off if this turns out not to fully solve the problem.
2026-01-21 19:16:27 +00:00
AnyOldName3 23a7df4f24 Array 2026-01-21 00:33:39 +00:00
AnyOldName3 17e184f103 Use deps versions in the key
Should be less prone to being forgotten.
2026-01-21 00:32:02 +00:00
AnyOldName3 3b7437170a Revamp cacheinit jobs
* build components so there's something in ccache
* clear the existing cache by using policy: push
* initialise ccache for both groups as components is part of both of them
2026-01-19 17:52:38 +00:00
AnyOldName3 9846ea2a49 Get rid of _symbols.zip
We don't use it for anything anymore now that the symbol server is reliable.
2026-01-19 15:12:07 +00:00
Alexei Kotov 05a4954b34 Tweak drag-and-drop sounds for gamepad equip action (#8797) 2026-01-19 13:31:18 +03:00
Alexei Kotov 513510fe1e Don't disable the sunglare when post-processing is disabled (#8854) 2026-01-19 01:26:04 +03:00
Alexei Kotov dc022d10d4 Merge branch 'Assign-RefIds-to-MagicEffects' into 'master'
Assign StringRefIds to magic effects

See merge request OpenMW/openmw!5064
2026-01-18 01:50:55 +03:00
Alexei Kotov d920e58cfe Fix launcher documentation link (#8934) 2026-01-17 17:48:35 +03:00
AnyOldName3 9bb5ef06ec Cache size can be smaller now there aren't several huge PCHs that need to be included
Sizes verified with https://gitlab.com/AnyOldName3/openmw/-/pipelines/2268240021

Ignore the build failures - Ananace's S3 storage was temporarily down.
2026-01-17 02:35:41 +00:00
AnyOldName3 ddf715f148 Accidental double space 2026-01-17 00:50:27 +00:00
AnyOldName3 3cf755266f Prefer add_compile_definitions
add_definitions is really add_any_compiler_flag_you_want
2026-01-17 00:50:12 +00:00
AnyOldName3 4ea6374a9e Ensure Win32 character set definitions are consistent
Qt 6 made it so anything that linked with it had the defines that put the Win32 API into UTF-16 mode.

That means that components (which we reuse the PCH for in multiple targets now) had incompatible defines, and the PCHs wouldn't work.

Before CMP0204, CMake wouldn't set these defines at all except with the Visual Studio generators, so this wasn't causing any problems that caused a compile error when I tested a Ninja-based build.
2026-01-17 00:46:54 +00:00
Alexei Kotov 74387b4694 Merge branch 'omegamap' into 'master'
Don't let alpha enable the local map

See merge request OpenMW/openmw!5109
2026-01-16 23:13:27 +03:00
Alexei Kotov 0fffd25141 Fix SkillProgression interface documented context (#8815) 2026-01-16 10:49:12 +03:00
Alexei Kotov 0902ea33c9 Merge branch 'trueflame' into 'master'
Don't use container listeners to effect UI updates

Closes #8820

See merge request OpenMW/openmw!5068
2026-01-16 09:48:51 +03:00
Alexei Kotov b7d905e806 Show the gamma correction value (#8913) 2026-01-15 21:44:42 +03:00
AnyOldName3 24d07da29c Rejig components defines
OPENMW_DOC_BASEURL is only used in a CMake-configured file, so it only needs to be a CMake variable, which it already is.
There's no benefit to making it visible to every TU in components.

MYGUI_DONT_USE_OBSOLETE should be visible in everything that transitively includes MyGUI just in case.
This should really be set up by MyGUI's CMake config or embedded in a generated MyGUI header rather than being our responsibility, but while we're forced to deal with it, it's closer to right to make it a PUBLIC define on components rather than a directory-scoped define in the components directory.
2026-01-15 18:35:12 +00:00
AnyOldName3 e68d4317c4 Get rid of unique PCHs from targets with three or fewer translation units
Precompiled headers avoid duplicate work.
If you've only got a single TU using a particular PCH, then there's no duplicate work, so it can only add overhead.

We don't need to totally abandon PCHs for these targets, though, as CMake lets us reuse the PCH from components.

If you've only got a few TUs in a target, it's *probably* faster to get components' PCH for free and eat the cost of it not being perfect than it is to make a perfect PCH from scratch.

Note that I don't know if there are drawbacks due to components having a couple of private precompiled headers that wouldn't have otherwise propagated or these targets having different build flags.
I can't test it locally right now as my linker's regained the deadlocking issue it had the other day.
If it turns out there are problems, then for the single-TU targets, simply avoiding using PCHs for them at all will still be an improvement over the status quo.
For the two-or-three TU targets, we'll have to actually measure things.
2026-01-15 17:44:32 +00:00
Alexei Kotov 23ad774480 Re-enable rotation for thrown projectiles
Reworked projectile rotation to avoid undesirable roll
2026-01-15 19:12:40 +03:00
Evil Eye 22b0386fb5 Don't let alpha enable the local map 2026-01-15 16:34:51 +01:00
Alexei Kotov aa544de3b4 Properly report gmst.yaml loading again 2026-01-15 14:12:22 +03:00
Alexei Kotov f3c1df883c Re-enable swish sound for throwing weapons (#8926) 2026-01-14 23:03:15 +03:00
Evil Eye e0b77196ba Fix docs suggesting head and hair are paths 2026-01-14 19:31:20 +01:00
jvoisin 3ac8eb0787 Merge branch 'changelog' into 'master'
Sync the changelog

See merge request OpenMW/openmw!5098
2026-01-13 22:18:12 +00:00
Noah Brie e18465bff0 Made it so the focused menu is now brought automatically to the front. 2026-01-12 20:21:52 -05:00
Alexei Kotov c4ab0d7e2f Sync the changelog for 0.51.0 2026-01-13 03:28:11 +03:00
Alexei Kotov 7daecbac66 Merge branch 'staaats' into 'master'
Deduplicate stats cache usage

Closes #8897

See merge request OpenMW/openmw!5093
2026-01-13 00:36:24 +03:00
AnyOldName3 8843ce2ec7 Keep CMakeCache.txt as an artefact
This might help diagnose some build problems in the future.

In fact, I need one for MacOS right now, and need to run a job on the upstream CI with this change to get one, so hijacking my existing CI MR seems like a great solution.
2026-01-12 15:19:17 +00:00
AnyOldName3 b67226b6d4 Possibly partially fix #8851
Possibly partially fixes #8851 by not doing cluster culling when it would be wildly inappropriate.
Cluster culling tries to skip draws that consist solely of back faces, so when we draw back faces, that's bad.

I don't remember whether it's clever enough to respect front face culling versus back face culling, so if that's a problem, this won't fix it.

It definitely does some very silly maths, half of which is only right for orthographic cameras, and half of which is only right for perspective cameras, and much of both parts is dumb even with the right camera type.
This does not fix that.
2026-01-11 19:43:16 +00:00
Evil Eye 998065618f Deduplicate stats cache usage 2026-01-11 13:34:21 +01:00
jvoisin 9233f82113 Merge branch 'maxlightsvalue' into 'master'
Display Max Lights value as an integer

See merge request OpenMW/openmw!5091
2026-01-11 00:12:24 +00:00
Alexei Kotov e3ad2d1a0f Display Max Lights value as an integer 2026-01-10 18:36:04 +03:00
Alexei Kotov 2b357fbb9d Move canUsePower docs to the right place (#8903) 2026-01-10 00:01:50 +03:00
Alexei Kotov acb36cb7c6 Merge branch 'allthatslazyaboutglittering' into 'master'
Copy refdata when copying gold

Closes #8917

See merge request OpenMW/openmw!5087
2026-01-09 19:04:13 +03:00
Alexei Kotov c0c7ec1c8f Merge branch 'macos_deprecation_fixes' into 'master'
Fix macos deprecation warnings

See merge request OpenMW/openmw!5082
2026-01-09 19:02:17 +03:00
AnyOldName3 bc45d17a56 Merge branch 'unused_var_really' into 'master'
heightfield not used

See merge request OpenMW/openmw!5084
2026-01-09 15:33:47 +00:00
Bret Curtis 5b45c9a56c do the thing to the thing, no only one place and let it propagate 2026-01-09 12:14:45 +01:00
Bret Curtis 0dad5dd4e9 do not do a explicit nullptr check per aon3 request 2026-01-09 12:02:46 +01:00
Telvanni 4Life c6cc1be347 - Fixed OpenMW-CS incorrectly passing magic effect ids
- Resolved merge conflicts with !4323
- Minor refactor of affectsSkill helper function
- Removed redundant class definition
2026-01-08 14:36:38 -05:00
Evil Eye 32f821a1a6 Copy refdata when copying gold 2026-01-08 16:47:20 +01:00
Telvanni 4Life 9159788c9b Address reviewer feedback and ran clang-format on modified files:
- Changed reverse lookup map constructor for gmsts, names, and ESM::MagicEffectIds to be more generic.
- Changed refIdToIndex to use map instead of array traversal.
- Removed redundant check from refIdToGmstString.
- Removed sMagicEffectNames and associated map. Removed dead code from loadmgef.cpp/hpp.
- Changed return types of magic effect bindings to RefId.
- Reverted ESMStore search to find.
- Changed std::map to std::unordered_map for faster lookups in resistance and weakness functions.
- Changed loadmgef To methods to pass RefId by value.
- Removed StringRefId alias MagicEffectId.
- Changed all effectId arguments in PR to pass-by-value.
- Removed ESM::MagicEffect::refIdToName function.
- Changed effect key type from long to ESM::RefId in OpGetEffect of mwscript.
- Removed superfluous MWWorld::Store<ESM::GameSettings> argument to MagicEffect store's setUp method.
- Removed transformation code from decompose for ENAM and IRDT structs.
- Changed resistance and weakness maps to initialization to use initialization instead of assignment.
- Changed sGmstEffectIds to constexpr array since all parameters are known at compile time.
- Changed getBoundItemsMap to use an unordered_map and have string_view values.
- MagicEffect store definition removed (uses standard template class TypedDynamicStore).
- Fixed bug in calculating sun damage that would have made vampires daywalkers in Mournhold.
- Removed polymorphic EffectKey constructor and added overload to getOrDefault.
- Placed ESM spec IRDT and ENAM structs in anonymous namespace.
- Added exception if attempting to serialize ENAM subrecords with out of bounds index.
- Added include format statements to satisfy Ubuntu CI linker.
2026-01-08 07:44:06 -05:00
Telvanni 4Life 8820c1b08b Cleaned up loadmgef and addressed potential memory corruption issues to string view lifetimes. 2026-01-08 07:40:43 -05:00
Telvanni 4Life 74ebb29dd0 - Used addRecordFunctionBinding in magic effect binding.
- Changed find to search.
- Restored Hyrum's Law use of effect system by Visible Rings.
2026-01-08 07:40:43 -05:00
Telvanni 4Life 495207e2a5 Triune Tests of Strength, Block, and Breathing Water. The ending of the words is ALMSIVI. 2026-01-08 07:40:39 -05:00
Telvanni 4Life 2c76043cf5 - Changed sol magic bindings to use RefIds instead of integer indexes for magic effects.
- Fixed silly namespace oversight causing linker errors.
- Fixed type mismatches occluded by linker errors.
- Fixed unit tests.
2026-01-08 07:40:02 -05:00
Telvanni 4Life e389a3b343 - Changed OpenMW-CS model to use RefIds and QStrings for magic effects.
- Changed esmtool records to used RefIds for magic effects.
2026-01-08 07:40:02 -05:00
Telvanni 4Life 6ca64fdddd Changed statsextensions internal representations of magic effects to RefId. Interfaces with mwscript remain index-based. 2026-01-08 07:40:02 -05:00
Telvanni 4Life 5839910eea Refactoring mwgui and mwmechanics in openmw-lib. Magic bindings done in a later commit. 2026-01-08 07:40:00 -05:00
Telvanni 4Life 3e586ed693 Changed IRDTstruct (alchemical ingredient magic effects) to use RefIds instead of int for effectId.
Changed various structs (ENAMstruct, EffectKey, SummonKey) to use RefId instead of strict StringRefId to account for null effects.
2026-01-08 07:33:38 -05:00
Telvanni 4Life c581ab3242 Changed magic effects to use RefIds in activespells, magiceffects, creaturestats, and summoning. 2026-01-08 07:27:11 -05:00
Telvanni 4Life 90fce49d17 Changed MagicEffect from IndexedStore to TypedDynamicStore in ESMStore. 2026-01-08 07:16:37 -05:00
Telvanni 4Life bf5e7ba3f6 Changed ActiveSpells and ENAM struct to use only RefIds. Serialization still uses indexes for backward compatibility. 2026-01-08 07:16:30 -05:00
Telvanni 4Life 85c15ff643 Changed magic effects to use RefIds in loadmgef 2026-01-08 07:07:52 -05:00
psi29a f0e31e69dd Merge branch 'refnumhitman' into 'master'
Replace ActorIds with RefNums

Closes #7602

See merge request OpenMW/openmw!4323
2026-01-08 09:23:20 +00:00
Alexei Kotov 4f72fd80cd Merge branch 'master' into 'master'
Yellow changed from `(1 1 0)` to `(1 0.729 0)` in `openmw_hud_energybar.skin.xml`

See merge request OpenMW/openmw!5086
2026-01-08 08:00:29 +03:00
AnyOldName3 8f2c9982ec Merge branch 'long-long-path' into 'master'
Support long paths on Windows

See merge request OpenMW/openmw!5054
2026-01-07 18:46:13 +00:00
AnyOldName3 115ee7a353 c a p i t u l a t e 2026-01-07 15:16:01 +00:00
AnyOldName3 18cc753517 Add comment highlighting known fragile code
We know we can't make the struct bigger as everything caught fire when we gave freeze dumps their own path, and was fixed when we switched to a common directory and just separate filenames.
Switching to wchar_t and stopping using UTF-8 here would cause a similar size increase, so similar problems are to be expected.
2026-01-07 15:12:22 +00:00
AnyOldName3 16efa6e5b5 Support long paths on Windows
Apparently we'd never bothered opting in, despite nearly everything in all out apps being entirely compatible and designed with long paths in mind.

GetModuleFileNameW is a bit awkward as it's just about the only Win32 function that returns the minimum of the buffer size and the string size - nearly everything else returns the full size even if it won't fit, so you can pass it a null pointer and a size of zero, and it'll tell you how much space you need to allocate.

I pretty much just copied the mostly-working long-path-friendly call site in the crash catcher to windowspath.cpp, but I also noticed that if the function failed and returned zero, the original implementation would loop forever, so I fixed that.

There was some code that could be ditched from the catch monitor as \\?\ is a prefix you can use to opt into long paths for a single API call instead of using the manifest to set it everywhere.
2026-01-07 15:12:22 +00:00
AnyOldName3 7d9eee3f33 Merge branch 'gogregistry' into 'master'
Detect the GOG Galaxy version of Morrowind on Windows

See merge request OpenMW/openmw!5041
2026-01-07 15:10:58 +00:00
psi29a f11b96a905 Merge branch 'registry' into 'master'
Detect Steam installations on Windows and Linux

See merge request OpenMW/openmw!4885
2026-01-07 09:03:16 +00:00
Bret Curtis b31248d871 only on openmw-lib 2026-01-07 09:10:24 +01:00
AnyOldName3 1d24a49dc1 Keep .ninja_log
It has per-node timings
2026-01-07 02:14:35 +00:00
AnyOldName3 5bbb0a5ea6 Unique binlog name per MSBuild invocation 2026-01-07 00:17:52 +00:00
AnyOldName3 bd653256a7 Correct licence path 2026-01-07 00:16:35 +00:00
AnyOldName3 f5b5a03a4d Add license to dev builds
We don't build the installer, so the step that installs the licence gets skipped.

We're legally required to make it clear what the licence is.
2026-01-06 23:06:39 +00:00
Safebox e5fcb88fd5 Yellow changed from (1 1 1) to (1 0.729 0) in openmw_hud_energybar.skin.xml 2026-01-06 20:53:32 +00:00
Alexei Kotov 67810b18f0 Merge branch 'new_cont_crea' into 'master'
Add record creation for containers, creatures

Closes #8911

See merge request OpenMW/openmw!4869
2026-01-06 23:45:43 +03:00
Bret Curtis cf9a5e9bad just nullptr check, no unused for you 2026-01-06 18:29:50 +01:00
Alexei Kotov a1d013794e Bump Lua API revision 2026-01-06 19:57:45 +03:00
SkyHasACatandAlexei Kotov d79dc925cc Add record creation for container, creature
(squashed)
2026-01-06 19:55:12 +03:00
Bret Curtis 4c0506777e maybe_unused_yes_it_is 2026-01-06 12:41:55 +01:00
Bret Curtis 37bd120075 add version check 2026-01-06 09:50:23 +01:00
Bret Curtis 52b129fe39 fix macos deprecation warnings 2026-01-06 09:50:23 +01:00
AnyOldName3 1ff20e52f7 Also run Ninja jobs if the CI script changes
It might affect the definition of the things it defines, which includes the Ninja jobs.
2026-01-06 01:24:49 +00:00
AnyOldName3 9267b8ecc8 Set cache size based on successful build
For some reason, the Group Two cache is a little bigger than for Ninja, despite having the same number of calls logged.
2026-01-06 01:22:57 +00:00
AnyOldName3 863077986d after_script is run from a fresh shell
We can't use the environment variable we set earlier.
2026-01-05 23:27:19 +00:00
Alexei Kotov 80a6d13be5 Merge branch 'patch-1' into 'master'
Adding to documentation that a condition of -1 makes a light source last forever

See merge request OpenMW/openmw!5081
2026-01-06 01:36:32 +03:00
AnyOldName3 de6fba9168 Empty commit 2026-01-05 20:13:17 +00:00
AnyOldName3 660347069e Too many colons 2026-01-05 17:37:01 +00:00
AnyOldName3 c7670ddf5d Move ccache out of TrackFileAccess' juristiction 2026-01-05 16:40:23 +00:00
Thunderforge d76234dbc3 Fixing typo 2026-01-04 22:38:51 +00:00
Thunderforge ed35a17db4 Adding -1 duration light effect to documentation 2026-01-04 21:21:32 +00:00
AnyOldName3 0214e70333 Save binary log for MSBuild
this should let us inspect things in more detail, and hopefully explain why things are being rebuilt.
2026-01-04 18:37:38 +00:00
AnyOldName3 dd11db2228 Give up, use CMD's rd
The prune command fails due to the error mentioned in the previous commit message.

Using PowerShell's Remove-Item is slow due to needing to create a .NET representation for each file before processing it.

Using [System.IO.Directory]::Delete throws an exception and gives up if any file can't be deleted.
Even though docker seems to be thoroughly killed, we don't have access to delete some of its files most of the time, which might be related to the original error that blocks the prune command.

CMD's rd should be as fast as anything else (except for the smallish overhead from creating a subprocess), and at least for Aussiemon, it seems to work.
2026-01-04 18:35:14 +00:00
AnyOldName3 530ee75857 Stop docker before stealing its files 2026-01-04 18:35:03 +00:00
AnyOldName3 c1087c7a13 Use more reliable Docker deleter
This should avoid this error:
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/prune": open //./pipe/docker_engine: The system cannot find the file specified.

We've mentioned that to GitLab here: https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/-/issues/63#note_2982154702
2026-01-04 18:34:50 +00:00
Alexei Kotov 9c221edd29 Merge branch 'fixGCCPreProcessScript' into 'master'
Fetch --unshallow in ubuntu_gcc_preprocess.sh

Closes #8900

See merge request OpenMW/openmw!5079
2026-01-04 03:53:08 +03:00
AnyOldName3 a208125906 Re-enable TrackFileAccess
Incremental builds don't work at all without it, which means every TU needs recompiling for every project.

This will break cleaning unless ccache data is within %APPDATA% or %TEMP%.
2026-01-03 16:31:39 +00:00
AnyOldName3 f17c8a23da Actually read variable
this path isn't taken, so didn't kill CI, but is intended to work if someone uses it.
2026-01-02 23:34:02 +00:00
AnyOldName3 d4da848f4b Don't set /MP when using ccache
This *should* make no difference as we already do things that mean ccache only gets told about one TU at once (e.g. using Ninja, or enabling UseMultiToolTask), but at the minimum, it's misleading to have this enabled when we know we're not using it.
2026-01-02 19:02:42 +00:00
Aussiemon b043f7267c Extra space 😩 2026-01-02 04:48:54 -07:00
Aussiemon c123bbad55 Just check both 2026-01-02 04:35:28 -07:00
Aussiemon 9c82709ab3 Check for shallowness before unshallow 2026-01-02 04:18:56 -07:00
Aussiemon 7553a3e89c Fetch --unshallow in ubuntu_gcc_preprocess.sh 2026-01-02 03:07:09 -07:00
AnyOldName3 fc4e288742 don't prompt for confirmation 2026-01-02 04:16:25 +00:00
AnyOldName3 f11b2a3d7d See how much space an aggressive Docker prune gets us
Hopefully it's lots.
2026-01-02 02:17:45 +00:00
AnyOldName3 fef5f60828 Set ccache size limits per group
A successful run for the Ninja jobs showed that 1G and 2G were fine for groups one and two.

I'm leaving some leeway for the MSBuild jobs as they've not succeeded yet and there might be some kind of madness that means they need more.
We won't be able to see until at least one build gets far enough.
2026-01-02 02:14:09 +00:00
AnyOldName3 580a10ef73 Add PCH sloppiness for Ninja build 2026-01-01 23:22:26 +00:00
jvoisin 2f703ecd3f Merge branch 'weatherreport' into 'master'
Improve high wind speed rain/snow behavior (#8864)

Closes #8864

See merge request OpenMW/openmw!5069
2026-01-01 20:57:53 +00:00
AnyOldName3 777ac2aaa6 Make MSBuild the default again
The ccache branches only made Ninja the default when ccache couldn't work with MSBuild.
2026-01-01 19:07:08 +00:00
AnyOldName3 3e016709b4 Adapt to split jobs 2026-01-01 18:59:56 +00:00
AnyOldName3 618d221f37 CMAKE_AUTOGEN_PARALLEL=1 2026-01-01 18:45:53 +00:00
AnyOldName3 240e2486ed CCache with MSBuild 2026-01-01 18:45:53 +00:00
AnyOldName3 39ec9f32a1 Don't use CCACHE_BASEDIR with MSVC
The build directory path is consistent within a fork anyway, and we can't share cache outside that scope.
2026-01-01 18:44:34 +00:00
AnyOldName3 fb6ad44ca8 Extra anti-WSL protection
On a machine with Windows Subsystem for Linux installed, the first bash in the path will typically be the WSL launcher that gives Linux bash.

We must therefore ensure we recursively call into the MSYS2 shell we're already using.
2026-01-01 18:44:34 +00:00
AnyOldName3 dda54c1154 Precompiled headers are fine with ccache in 2025 2026-01-01 18:44:33 +00:00
AnyOldName3andAnyOldName3 f7c015d5dd One value per varibles key 2026-01-01 18:44:33 +00:00
AnyOldName3andAnyOldName3 d65e76e855 Try quoting 2026-01-01 18:43:37 +00:00
AnyOldName3andAnyOldName3 51c30cd4e3 Try inode cache now ccache 4.10 is out 2026-01-01 18:43:37 +00:00
AnyOldName3 c8b52581e3 Try ignoring dependency headers 2026-01-01 18:43:37 +00:00
AnyOldName3 39c69dfbcd Try disabling preprocessed cache lookup 2026-01-01 18:43:37 +00:00
AnyOldName3 d094de5fc5 Quote string
YAML doesn't like the double colon
2026-01-01 18:43:37 +00:00
AnyOldName3 a1e5cec437 Print time and percentage for Ninja builds 2026-01-01 18:42:54 +00:00
AnyOldName3 4ffe94d3ec Reset CCache stats, set cache size 2026-01-01 18:41:56 +00:00
AnyOldName3 3f49e8db8a And the dot 2026-01-01 18:41:56 +00:00
AnyOldName3 f8496e4f67 Re-enable MSBuild job when things might have killed it 2026-01-01 18:41:55 +00:00
AnyOldName3andAnyOldName3 795bb0bb98 Switch from MSBuild to Ninja for default Windows job
It should be way faster now CCache is working
2026-01-01 18:41:55 +00:00
AnyOldName3andAnyOldName3 3c66c2cbd3 Continue running master and release branch pipelines when we do back-to-back merges 2026-01-01 18:41:55 +00:00
AnyOldName3 76eff59c2c Merge branch 'esmtoolrotation' into 'master'
Improve esmtool destination position/rotation formatting

See merge request OpenMW/openmw!5075
2026-01-01 18:10:25 +00:00
Alexei Kotov a207b45101 Merge branch 'splitting-headache' into 'master'
Split the Windows build into two, like it was when the time limit was an hour before mid 2022

See merge request OpenMW/openmw!5070
2026-01-01 18:43:16 +03:00
Alexei Kotov 9efef817dc Merge branch 'navmeshtool_worldspaces' into 'master'
Somewhat reduce navmeshtool peak memory usage

See merge request OpenMW/openmw!5076
2025-12-31 00:37:51 +03:00
AnyOldName3 25543090af Get rid of TODO that doesn't need doing 2025-12-30 17:44:44 +00:00
Alexei Kotov 48ee222cac Merge branch 'FixPlayerQuestName' into 'master'
Fix bad document keyword

See merge request OpenMW/openmw!5077
2025-12-29 00:00:22 +03:00
elsid dff8fa1cd1 Detect disconnected tile groups and report cell refs from there
Cell refs placed at cooridnates far from the rest are potential content
issues.
2025-12-28 13:10:42 +01:00
Evil Eye d3b4ea0ba7 Only mark valid actor ids for conversion 2025-12-28 11:21:30 +01:00
Evil Eye 72de0c06ba Use getBaseNode to detect if the actor is active 2025-12-27 22:29:32 +01:00
Daisyhasacat b3bdb3b620 Add change to core 2025-12-27 21:14:43 +00:00
Daisyhasacat 9212b3ddbb Fix bad word 2025-12-27 20:49:00 +00:00
Alexei Kotov efbdd0cd5e Merge branch 'vfs_normalized_path_26' into 'master'
Use normalized path in SoundManager (#8138)

See merge request OpenMW/openmw!5048
2025-12-27 23:18:02 +03:00
Evil Eye 48b0d48e9a Merge branch 'string_ref_id_count' into 'master'
Report number of StringRefIds to osg stats

See merge request OpenMW/openmw!5072
2025-12-27 16:50:30 +00:00
elsid 1763928548 Use tile coordinates from TileCachedRecastMeshManager to schedule tile generation by navmeshtool
Using a 2D range may consume a lot of memory if there is an object far
from the rest.
2025-12-27 16:18:01 +01:00
elsid e9468267fc Process worldspaces sequentially by navmeshtool
Gathering all cells data for all worldspaces may consume a lot memory if
interior cells processing is enabled.
2025-12-27 16:18:01 +01:00
Alexei Kotov 24821b8e85 Improve esmtool destination position/rotation formatting 2025-12-27 01:13:20 +03:00
elsid adcec8fded Add flag to filter worldspaces processed by navmeshtool 2025-12-26 13:46:46 +01:00
Alexei Kotov 88e15e7246 Merge branch 'fix-lod-bugs' into 'master'
Fix lod bugs

Closes #8884

See merge request OpenMW/openmw!5071
2025-12-26 13:41:41 +03:00
Evil Eye dbeaa25985 Fix mistakes 2025-12-26 11:40:35 +01:00
Evil Eye 63f5c9777e Fix rebase induced issues 2025-12-26 11:07:31 +01:00
Evil Eye 20ddb848d4 Stop using actor ids in the essimporter and tests 2025-12-26 11:07:31 +01:00
Evil Eye 9cb437c9d3 Remove actor ids 2025-12-26 11:07:30 +01:00
Evil Eye c4bc040b4b Replace actor ids in magic effects with refnums 2025-12-26 11:07:30 +01:00
Evil Eye 8020bfcafd Track projectile casters using RefNum 2025-12-26 11:07:30 +01:00
Evil Eye 42b9f1ec2b Optimize HUD memory layout and replace actor id with a RefNum 2025-12-26 11:07:30 +01:00
Evil Eye 1d24ad54d9 Replace actor ids with RefNums in ai packages 2025-12-26 11:07:30 +01:00
Evil Eye 1bcc403544 Use a RefMum to track spawned levelled creatures 2025-12-26 11:07:29 +01:00
Evil Eye b3d984a9b1 Replace HitAttemptActorId with a RefNum 2025-12-26 11:07:29 +01:00
psi29a 666f8de08a Merge branch 'rotationesmtool' into 'master'
Print cell reference rotation and destination rotation in esmtool (#8874)

Closes #8874

See merge request OpenMW/openmw!5060
2025-12-26 09:21:34 +00:00
elsid 07621574d0 Report number of StringRefIds 2025-12-25 13:26:23 +01:00
elsid fc297f741a Remove redundant includes 2025-12-25 13:05:16 +01:00
elsid 64c24800c6 Simplify initialization 2025-12-25 13:04:45 +01:00
Cédric Mocquillon 3f630e397f Proactively copy the range mode, even though we only use the default one at the moment 2025-12-25 10:34:15 +01:00
Cédric Mocquillon b14057506a Do not forget the settings of the original lod node 2025-12-25 10:32:53 +01:00
AnyOldName3 a783431df7 Balance build times between jobs
Before this, there was a difference of about nineteen minutes.

All the things that aren't the engine (except its dependencies) that were in group one take less than nineteen minutes to build in total, so moving everything isn't enough to give total balance.

openmw-tests depends on openmw-lib, so you have to build basically the whole engine to build it, so it should stay in the same group.
2025-12-25 00:50:49 +00:00
Alexei Kotov dec8a284aa Improve high wind speed rain/snow behavior (#8864)
Enable water ripples and wrap-around
Remove rain particle angle random element
Simplify disabling rain ripples
2025-12-25 01:44:18 +03:00
Alexei Kotov 87da40e6d2 Merge branch 'iliketomoveitmoveitprovideditisacell' into 'master'
Insert exterior cells created by moved refs into mSharedExt

Closes #8875

See merge request OpenMW/openmw!5067
2025-12-25 00:54:49 +03:00
jvoisin dbcedf614d Merge branch 'recindex' into 'master'
Rename all remaining recIndex variations to recordIndex

See merge request OpenMW/openmw!5059
2025-12-24 20:31:05 +00:00
AnyOldName3 04443191a1 Sync MSBuild and Ninja jobs 2025-12-24 20:12:09 +00:00
AnyOldName3 6478e8c3e8 Fix log timestamps
Don't call the block variables because that hides the default variables block we set at the top.
2025-12-24 20:05:44 +00:00
AnyOldName3 1932258db9 Don't mix line endings
This doesn't fix the BOM in the middle of the merged CI-ID.txt, but that shouldn't be happening in the first place.
GitLab's docs say the default is pwsh rather than powershell (i.e. PowerShell >= 6, not 5.1), which defaults to non-BOM UTF-8, so there should be no BOM to contend with.
2025-12-24 17:42:04 +00:00
AnyOldName3 3849f36b46 Don't run while loop in subshell
We need the variable writes to stick around.

Also switch to an associative array so duplicates are removed.
2025-12-24 17:32:34 +00:00
Daisyhasacat fc2e1b5b82 Merge branch 'this-macro-annoys-people' into 'master'
Get rid of overengineered macro

See merge request OpenMW/openmw!5058
2025-12-24 16:02:19 +00:00
Alexei Kotov deea996a74 Merge branch 'lesscontentmoreengagement' into 'master'
Remove dead code

See merge request OpenMW/openmw!5062
2025-12-24 17:59:44 +03:00
AnyOldName3 87dfcf302f Fix artifact merging 2025-12-24 14:35:40 +00:00
AnyOldName3 fe9f0bbb46 Skip duplicates without prompting
Any file we want to keep has a unique name based on its contents.
2025-12-24 11:53:40 +00:00
Evil Eye 7cc7d41b33 Don't use container listeners to effect UI updates 2025-12-24 11:12:23 +01:00
AnyOldName3 c23d8f64bc Disable multithreaded codegen for hungry TUs 2025-12-24 01:34:56 +00:00
Evil Eye 189e4a6f6d Insert exterior cells created by moved refs into mSharedExt 2025-12-23 23:24:28 +01:00
Evil Eye 71b394b88d Reimplement tests in Lua 2025-12-23 17:47:29 +01:00
AnyOldName3 f9f29c7a57 unzip handles wildcards itself
Otherwise, multiple paths are treated as one zip and several zip-relative paths to extract from it.
2025-12-22 20:32:19 +00:00
AnyOldName3 136a4d02fc Missing $ operator 2025-12-22 20:28:40 +00:00
AnyOldName3 f884c26631 Maybe an anonymous namespace reduces RAM requirements
This file is the most likely to make the compiler run out of heap space
2025-12-22 17:42:50 +00:00
Evil Eye 8107fc451f Remove dead code 2025-12-22 17:24:29 +01:00
AnyOldName3 93c3618121 Stop docker
Maybe this will give us more memory to work with.
2025-12-22 01:54:38 +00:00
AnyOldName3 a79e5fcee6 Missing targets 2025-12-21 16:30:43 +00:00
Alexei Kotov f5371518c3 Print angles in degrees in esmtool 2025-12-21 15:21:22 +03:00
Evil Eye 699abf7858 Detect the GOG Galaxy version of Morrowind on Windows 2025-12-21 12:14:19 +01:00
Evil Eye fa315a9f64 Adopt long path changes from !5054 2025-12-21 12:13:14 +01:00
Alexei Kotov cd97bc66c3 Print cell reference rotation and destination rotation in esmtool (#8874) 2025-12-21 11:11:36 +03:00
AnyOldName3 bff53fb37c Can't splat, as it's a string, not an array
Go back to the approach we used before https://gitlab.com/OpenMW/openmw/-/merge_requests/2012 was merged.
We know that worked.
2025-12-21 02:41:03 +00:00
AnyOldName3 b1bc22d24a --targets needs splat operator 2025-12-21 02:15:29 +00:00
AnyOldName3 c07304bccb See what happens if we split the Windows job again 2025-12-21 01:51:13 +00:00
Alexei Kotov a6195698ae recIndex => recordIndex 2025-12-21 00:40:12 +03:00
AnyOldName3 90eb090072 Get rid of overengineered macro
While the macro's implementation was fine based on the documentation for CMake 3.16, which we (currently) use, later versions of CMake recommend against this approach.

https://gitlab.com/OpenMW/openmw/-/merge_requests/4777 has an implementation that picks between a native feature added later that does the same job if it's available, but uses the one we already had if it isn't.
That's not ideal as the implementation ends up complicated and we'd have two code paths to support.

There's a simpler approach where we just temporarily set the directory property and call the real function, which would probably be the best approach in the general case.

However, as we want to set the directory property for everything in the directory, we can just set it on the `extern` directory, and then we don't need the macro at all.
2025-12-20 18:55:21 +00:00
Alexei Kotov 4a062c09a4 Merge branch 'can-everyone-please-stop-trying-to-change-this' into 'master'
Make it clear that we do not control the timeout for Windows jobs.

See merge request OpenMW/openmw!5057
2025-12-20 19:39:41 +03:00
Alexei Kotov 2d5752d9e6 Merge branch 'changelog' into 'master'
Sync the 0.51 changelog

See merge request OpenMW/openmw!5056
2025-12-19 20:04:59 +03:00
AnyOldName3 22b0f7cbcf Make it clear that we do not control the timeout for Windows jobs. 2025-12-19 16:58:31 +00:00
Evil Eye ebb8555771 Sync the 0.51 changelog 2025-12-19 11:36:57 +01:00
Alexei Kotov af7bf4e2b4 Merge branch 'stemfile' into 'master'
Don't use path helpers in the settings window

See merge request OpenMW/openmw!5043
2025-12-19 04:58:18 +03:00
Alexei Kotov 7ca6fbb952 Merge branch 'dialoguefilters' into 'master'
Expose info conditions to Lua

Closes #8076

See merge request OpenMW/openmw!5045
2025-12-19 04:33:39 +03:00
Alexei Kotov 8f2d38de1d Bump Lua API revision 2025-12-19 04:32:19 +03:00
Evil EyeandAlexei Kotov 5a177417d3 Polish docs 2025-12-19 04:30:51 +03:00
Evil EyeandAlexei Kotov 60e6b94498 Fix the spelling of mercantile 2025-12-19 04:30:51 +03:00
Evil EyeandAlexei Kotov 277a84ed94 Bind dialogue conditions 2025-12-19 04:30:51 +03:00
Alexei Kotov bca843fd23 Merge branch 'rotatingtouhouplush' into 'master'
Use horizontal extent ratio to detect stretched bounding boxes (#8847)

Closes #8847

See merge request OpenMW/openmw!5052
2025-12-19 04:26:35 +03:00
AnyOldName3 f9bc7691e0 Merge branch 'recordrenaming' into 'master'
Make NIF base record members conform to the naming conventions

See merge request OpenMW/openmw!5051
2025-12-18 14:20:19 +00:00
jvoisin 77beed0a6c Merge branch 'bgsm' into 'master'
Don't read terrain parameters for BGSM v1/v2

See merge request OpenMW/openmw!5050
2025-12-18 12:43:01 +00:00
psi29a 7281f3e3f6 Merge branch 'near-far-wherever-you-are' into 'master'
Ensure near plane doesn't go past far plane when there are no shadow receivers

See merge request OpenMW/openmw!5047
2025-12-18 10:43:53 +00:00
Alexei Kotov 3dedc5e735 Merge branch 'explicitly-no-alpha' into 'master'
Ask for zero alpha bits for the CS

Closes #8270

See merge request OpenMW/openmw!4842
2025-12-18 12:56:57 +03:00
psi29a 538ad520bd Merge branch 'scaland' into 'master'
Improve Wayland fractional scaling

See merge request OpenMW/openmw!5040
2025-12-17 08:11:35 +00:00
Alexei Kotov f83a09b93e Use horizontal extent ratio to detect stretched bounding boxes (#8847) 2025-12-16 15:08:33 +03:00
Alexei Kotov a0b73d5e62 Make NIF base record members conform to the naming conventions 2025-12-16 13:23:30 +03:00
Alexei Kotov 1e5979b80f Merge branch 'nifresizepurge' into 'master'
Reserve capacity for the remaining NIF collections

See merge request OpenMW/openmw!5049
2025-12-16 12:11:19 +03:00
Alexei Kotov 8b92f68537 Merge branch 'characterguide' into 'master'
Compare saves passed on the command line using file equivalence

Closes #8842

See merge request OpenMW/openmw!5034
2025-12-16 12:07:30 +03:00
Alexei Kotov 76ce47a890 Merge branch 'l10nformat' into 'master'
Replace format args with icu in engine messages

See merge request OpenMW/openmw!5032
2025-12-16 12:07:06 +03:00
Alexei Kotov dba8b21c75 Merge branch 'creeperbutitslua' into 'master'
Add barter gold bindings

Closes #2903

See merge request OpenMW/openmw!5046
2025-12-15 15:32:34 +03:00
Alexei Kotov 898d23e2f1 Bump Lua API revision 2025-12-15 15:30:55 +03:00
Evil EyeandAlexei Kotov e133b2a09d Clarify 2025-12-15 15:30:33 +03:00
Evil EyeandAlexei Kotov 903cb6878a Allow setBarterGold in global scripts 2025-12-15 15:30:33 +03:00
Evil EyeandAlexei Kotov 25d1b18b75 Add barter gold bindings 2025-12-15 15:30:33 +03:00
Alexei Kotov 3927eaef66 Reserve capacity for controller NIF collections 2025-12-15 15:20:59 +03:00
Alexei Kotov 02d9c26289 Reserve capacity for node NIF collections 2025-12-15 15:20:59 +03:00
Alexei Kotov 17e279cf0d Don't read terrain parameters for BGSM v1/v2
This fixes parsing of most BGSM files from Fallout 4.
2025-12-15 14:50:47 +03:00
Alexei Kotov 7332b4e232 Reserve capacity for extra data NIF collections 2025-12-15 10:44:45 +03:00
Alexei Kotov ea506019dc Reserve capacity for data NIF collections 2025-12-15 10:44:37 +03:00
Alexei Kotov 137382b424 Reserve capacity for physics NIF collections 2025-12-15 10:44:27 +03:00
elsid 0859d18279 Use normalized path in SoundManager 2025-12-14 19:27:39 +01:00
elsid 5af72ba2c4 Remove unused vfs path symbols 2025-12-14 19:27:39 +01:00
Alexei Kotov 5a022532fd Merge branch 'livefactionreaction' into 'master'
Rename faction rank reaction to reputation

Closes #8789

See merge request OpenMW/openmw!5037
2025-12-14 18:18:40 +03:00
Alexei Kotov 29e43a0d80 Merge branch 'stem' into 'master'
Fix NormalizedView::stem to include dots

See merge request OpenMW/openmw!5044
2025-12-14 18:17:04 +03:00
AnyOldName3 2754d4264c Ensure near plane doesn't go past far plane when there are no shadow receivers 2025-12-14 00:21:42 +00:00
Evil Eye f620790e1c Don't tolerate complex strings in the wine registry 2025-12-13 21:38:14 +01:00
Evil Eye 9e703f0fbf Unescape wine path 2025-12-13 12:22:20 +01:00
Evil Eye 3506480790 Properly escape apostrophes 2025-12-13 11:52:19 +01:00
Alexei Kotov 6801ebec0d Merge branch 'coverity.ba2' into 'master'
Address Coverity issues in BSA code

See merge request OpenMW/openmw!5042
2025-12-13 02:42:55 +03:00
Evil Eye 9735ce1d41 Merge branch 'mr-template' into 'master'
[DOC] Add MR default template

See merge request OpenMW/openmw!5024
2025-12-12 22:36:10 +00:00
Evil Eye 9cac246337 Use ranges::replace 2025-12-12 23:25:29 +01:00
Evil Eye 2d33ead98d Fix NormalizedView::stem to include dots 2025-12-12 23:14:57 +01:00
Alexei Kotov 2c22f74bcb Don't use path helpers in the settings window 2025-12-13 00:13:32 +03:00
Sarah Sunday 1cc07aa4d0 [DOC] Clarify to comment if open MR 2025-12-12 14:22:39 -06:00
Evil Eye 9c8edcc43b Increase max ext length to 4 2025-12-12 11:37:02 +01:00
Evil Eye c9d5d6813d Address Coverity issues in BSA code 2025-12-11 13:03:53 +01:00
Chris Djali (AnyOldName3) 2f002b885e Use devicePixelRatio directly 2025-12-11 00:02:39 +00:00
Evil Eye 853a6d1922 Rename wine header 2025-12-10 22:32:49 +01:00
Chris Djali (AnyOldName3) 759734beb4 Improve Wayland fractional scaling 2025-12-10 18:56:45 +00:00
Alexei Kotov d5c7a6c6db Merge branch 'tovfsornottovfs' into 'master'
Address incorrect std::filesystem::path usage

Closes #8738

See merge request OpenMW/openmw!5033
2025-12-10 21:20:26 +03:00
Alexei Kotov 51e5328596 Merge branch 'verysafeget' into 'master'
Don't accept table like objects in getFieldOrNil

Closes #8840

See merge request OpenMW/openmw!5035
2025-12-10 21:19:22 +03:00
Alexei Kotov e68eb90348 Merge branch 'savetheelements' into 'master'
Detach elements from child before destroying it

Closes #8802

See merge request OpenMW/openmw!5036
2025-12-10 21:18:34 +03:00
wareya 5a6e491dc3 Implement multiselect group rotation in CS 2025-12-09 14:14:17 -05:00
AnyOldName3 e91f5a5b0a Reformat comment to appease fascist Clang tool 2025-12-09 17:32:22 +00:00
AnyOldName3 bd685d672d Set RTT FBO format, too. 2025-12-09 17:25:59 +00:00
Evil Eye ea79cd7678 Use namespace alias 2025-12-09 18:22:24 +01:00
Evil Eye 5fde484997 Rename faction rank reaction to reputation 2025-12-09 17:54:13 +01:00
Evil Eye b32b98d9f5 Detach elements from child before destroying it 2025-12-09 15:41:02 +01:00
Evil Eye fdbcada044 Don't accept table like objects in getFieldOrNil 2025-12-09 11:48:02 +01:00
Evil Eye 09a6876d6b Don't use single argument loadGame outside OMW::Engine 2025-12-09 10:54:37 +01:00
Evil Eye 1bdc01120f Compare saves passed on the command line using file equivalence 2025-12-09 10:21:58 +01:00
Evil Eye 44c97786e5 Fix interior brightness key 2025-12-09 09:56:27 +01:00
Alexei Kotov cd4901245e Merge branch 'vfs_normalized_path_25' into 'master'
Use normalized path for correctResourcePath and related functions (#8138)

See merge request OpenMW/openmw!5031
2025-12-09 09:44:50 +03:00
elsid 878f9f8433 Add extension path type 2025-12-08 20:38:23 +01:00
elsid b5196b2fd1 Use normalized path for correctResourcePath and related functions 2025-12-08 20:38:15 +01:00
Evil Eye 82914be8b2 Treat TES4+ BSA paths as VFS paths 2025-12-08 17:44:15 +01:00
Evil Eye d45f252f69 Use vfs paths in MyGUI data manager 2025-12-08 16:40:39 +01:00
Evil Eye 6e8b6ef48e Don't use filesystem::path while looking for vfs files 2025-12-08 16:06:15 +01:00
Evil Eye 570e0feed5 Use l10n for setting label captions 2025-12-08 12:38:37 +01:00
Evil Eye 8fcad02f5d Don't use external formatting for l10n strings 2025-12-08 11:25:23 +01:00
Alexei Kotov a6097d06b6 Merge branch 'exteriorcoc' into 'master'
Improve COC exterior destination choice consistency

See merge request OpenMW/openmw!5026
2025-12-08 06:35:17 +03:00
Sarah Sunday b59f174175 [DOC] Feedback 2025-12-07 13:36:54 -06:00
Sarah Sunday 66e8d8e01e [DOC] Update with Capo-LLM suggestions 2025-12-07 13:11:44 -06:00
Alexei Kotov b917b146c5 Merge branch 'androidproof' into 'master'
Prevent UB when reading global variables

Closes #6494

See merge request OpenMW/openmw!5022
2025-12-07 21:38:18 +03:00
Alexei Kotov ee9d7db3c1 Merge branch 'gmstl10n' into 'master'
Allow composition of GMST l10n values

See merge request OpenMW/openmw!4873
2025-12-07 14:02:12 +03:00
Evil Eye e422c09820 Merge branch 'vfs_normalized_path_24' into 'master'
Use normalized path in LuaUi::TextureData and to implement correctResourcePath (#8138)

See merge request OpenMW/openmw!4920
2025-12-07 08:07:49 +00:00
Alexei Kotov 24b969f156 Merge branch 'search' into 'master'
Reimplement weightedSearch to prevent crashing with large menus

Closes #8601

See merge request OpenMW/openmw!5001
2025-12-07 01:29:10 +03:00
Alexei Kotov 1223ca0228 Merge branch 'fix_std_23' into 'master'
Fix compilation with -std=23

See merge request OpenMW/openmw!5019
2025-12-06 04:10:49 +03:00
elsid 66923870da Use normalized path to implement correctResourcePath 2025-12-06 00:12:43 +01:00
elsid 1b362140ae Remove duplicated and leading slashes in normalizeFilenameInPlace
To be consistent with correctResourcePath.
2025-12-06 00:12:43 +01:00
elsid 96869fd9b9 Add namespace prefix to all VFS::Path related tests 2025-12-06 00:12:42 +01:00
elsid 60c7b3aa14 Move code from components/lua_ui/resources.cpp to header 2025-12-06 00:12:42 +01:00
elsid 2c142faaa9 Use normalized path in LuaUi::TextureData 2025-12-06 00:12:42 +01:00
elsid 538e5d5502 Use normalizeFilename in correctResourcePath 2025-12-06 00:12:42 +01:00
elsid cd03de2577 Cleanup resource helpers tests 2025-12-06 00:12:42 +01:00
Alexei Kotov 3d1b8d1a4d Merge branch 'captureandrelease' into 'master'
Don't extend the lifetime of ScreenCapture objects beyond that of the objects using them

See merge request OpenMW/openmw!5028
2025-12-05 21:57:14 +03:00
Alexei Kotov cb74919303 Merge branch 'localmap' into 'master'
Local map fixes

Closes #8786 and #8787

See merge request OpenMW/openmw!4919
2025-12-05 17:43:40 +03:00
AnyOldName3 7ad68c6e37 Merge branch 'fix-readme-typos' into 'master'
Fix grammar and consistency issues in README

See merge request OpenMW/openmw!4994
2025-12-05 14:18:59 +00:00
Alexei Kotov e7b954a7b6 Merge branch 'feature/support-extra-gamepad-buttons' into 'master'
Add support for modern SDL controller buttons (Touchpad, Misc1, Paddles)

See merge request OpenMW/openmw!5017
2025-12-05 06:12:35 +03:00
Dima KatashovandAlexei Kotov d7ad994fb6 Add support for modern SDL controller buttons (Touchpad, Misc1, Paddles) 2025-12-05 06:12:35 +03:00
Alexei Kotov 8550ac44a0 Merge branch 'add_loop_and_vfx_id_to_world_vfx_spawn' into 'master'
add loop + vfxId params to world.vfx.spawn and add world.vfx.remove

See merge request OpenMW/openmw!4503
2025-12-05 06:03:58 +03:00
Alexei Kotov 0d68fb2d25 One more stylistic adjustment for the docs 2025-12-05 06:00:52 +03:00
Alexei Kotov 65949b17b7 Increment Lua API revision
Note the rebase process of the MR associated with this commit included some minor doc adjustments.
2025-12-05 05:56:05 +03:00
Sebastian FieberandAlexei Kotov ce67a028a1 fix link 2025-12-05 05:54:48 +03:00
Sebastian FieberandAlexei Kotov 567f5aa150 remove unecessary mutex 2025-12-05 05:54:48 +03:00
Sebastian FieberandAlexei Kotov 8ea0338a50 update docs 2025-12-05 05:54:46 +03:00
Sebastian FieberandAlexei Kotov 1b36f757ed format 2025-12-05 05:54:06 +03:00
Sebastian FieberandAlexei Kotov 647d655f2e make it possible to remove anonymous vfx 2025-12-05 05:54:03 +03:00
Sebastian FieberandAlexei Kotov 9524906768 don't unecessarily copy vfxId 2025-12-05 05:52:56 +03:00
Sebastian FieberandAlexei Kotov 4636a35867 throw if vfxId is empty 2025-12-05 05:52:56 +03:00
Sebastian FieberandAlexei Kotov 9621a2c8cf remove world vfx only if vfxId is not empty 2025-12-05 05:52:56 +03:00
Sebastian FieberandAlexei Kotov e8c917d35e add loop + vfxId params to world.vfx.spawn and add world.vfx.remove 2025-12-05 05:52:54 +03:00
Alexei Kotov 6d461c4198 Bring README.md up to speed with the actual openmw --help output 2025-12-05 05:26:42 +03:00
Alexei Kotov 3ef9237f51 Merge branch 'im-really-in-a-hurry-here' into 'master'
FEAT: Add a binding for passing time in `world`

See merge request OpenMW/openmw!4942
2025-12-05 01:30:59 +03:00
ddbb07 b621d09b58 Remove unecessary sort in test 2025-12-04 23:03:39 +01:00
ddbb07 079ccd92b1 Use std::string instead of UString 2025-12-04 22:56:35 +01:00
Alexei Kotov 72d6cd4aff Bump Lua API revision, doc grammar fix 2025-12-04 23:50:23 +03:00
Dave CorleyandAlexei Kotov 6897f5aefb ALL HAIL C L A N G 2025-12-04 23:48:55 +03:00
Dave CorleyandAlexei Kotov c775153c21 CLEANUP: Remove fastForwardAI method in World 2025-12-04 23:48:55 +03:00
Dave CorleyandAlexei Kotov e3af2db511 CLEANUP: Make advanceTime a delayedAction, include mechanicsmanager 2025-12-04 23:48:55 +03:00
Dave CorleyandAlexei Kotov 386c28d98e CLEANUP: Fix docs, remove unused lambda capture 2025-12-04 23:48:55 +03:00
Dave CorleyandAlexei Kotov 209b7fd5c6 FEAT: Add a binding for passing time in world 2025-12-04 23:48:55 +03:00
Sarah Sunday 5a4e191325 [DOC] add issue template 2025-12-04 14:29:16 -06:00
Sarah Sunday 658f2f4898 [DOC] Second pass of MR template 2025-12-04 14:29:16 -06:00
Evil Eye e097a15627 Don't extend the lifetime of ScreenCapture objects beyond that of the objects using them 2025-12-04 19:18:44 +01:00
ddbb07 243b087845 Fix imports in test 2025-12-04 16:35:29 +01:00
ddbb07 120c7adddb Add more tests 2025-12-04 07:40:26 +01:00
ddbb07 dd0bce2406 Mark function definitions as inline 2025-12-04 07:40:26 +01:00
ddbb07 aec63843f7 Move function definition to header file 2025-12-04 07:40:26 +01:00
ddbb07 3dec065dff Add another test 2025-12-04 07:40:26 +01:00
ddbb07 8349c09170 Add unit tests 2025-12-04 07:40:26 +01:00
ddbb07 db0c7350b8 Don't make copies of variables unless absolutely necessary. 2025-12-04 07:40:26 +01:00
ddbb07 63166aaa10 Change type of search weight from double to size_t, and revise sorting logic 2025-12-04 07:40:26 +01:00
ddbb07 336a9e7da1 Explicitly check if inputString is empty or only contains spaces in generatePatternArray to improve performance 2025-12-04 07:40:26 +01:00
ddbb07 225d8f0b90 Define patternArray only once for every search 2025-12-04 07:40:26 +01:00
ddbb07 c027d2d927 Rename splitString to generatePatternArray as it no longer only splits the string 2025-12-04 07:40:26 +01:00
ddbb07 b3111a466e Offload lower casing of the patternString to splitString 2025-12-04 07:40:26 +01:00
ddbb07 39832a3e71 Reimplement weightedSearch 2025-12-04 07:40:26 +01:00
elsid 402e1b3096 Fix compilation with -std=23
/usr/include/c++/15.2.1/bits/unique_ptr.h: In instantiation of ‘constexpr std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = Shader::HotReloadManager; _Args = {}; __detail::__unique_ptr_t<_Tp> = __detail::__unique_ptr_t<Shader::HotReloadManager>]’:
/home/elsid/dev/openmw/components/shader/shadermanager.cpp:83:63:   required from here
   83 |         mHotReloadManager = std::make_unique<HotReloadManager>();
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/15.2.1/bits/unique_ptr.h:1085:30: error: invalid use of incomplete type ‘struct Shader::HotReloadManager’
 1085 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/shader/shadermanager.hpp:24:12: note: forward declaration of ‘struct Shader::HotReloadManager’
   24 |     struct HotReloadManager;
      |            ^~~~~~~~~~~~~~~~
2025-12-03 23:21:11 +01:00
elsid cef1bb1219 Log file stream errors 2025-12-03 23:21:11 +01:00
elsid c7b0f99079 Do not read failed to open shader file 2025-12-03 23:20:52 +01:00
Evil Eye 8b79e5d459 Simplify fallback 2025-12-03 16:40:25 +01:00
Alexei Kotov ebfe91a108 Merge branch 'changelog' into 'master'
Sync changelog

See merge request OpenMW/openmw!5025
2025-12-03 02:10:20 +03:00
Alexei Kotov 9cecc92d5c Preserve static cell insertion order 2025-12-03 00:17:46 +03:00
Evil Eye 2c4559e507 Match x86 for every possible float value 2025-12-02 22:01:58 +01:00
Alexei Kotov ebad87bffb Properly resolve exterior cell names during name-based search 2025-12-02 18:41:15 +03:00
Alexei Kotov 46f24c275f Sync changelog for 0.51.0 2025-12-02 06:42:38 +03:00
Alexei Kotov 2b5d7c9d7d Merge branch 'spellviewcursor' into 'master'
Hide the cursor in spell lists when controller tooltips are on (#8770)

Closes #8770

See merge request OpenMW/openmw!4979
2025-12-02 06:39:20 +03:00
Sarah Sunday 1cf23fc092 [DOC] Add MR default template 2025-12-01 19:13:29 -06:00
Evil Eye be73f2b019 Prevent UB when reading global variables 2025-12-01 20:58:25 +01:00
Evil Eye f21fdaf4fa Convert number of bytes to number of wchar_t 2025-12-01 17:33:06 +01:00
Evil Eye dafefc2e88 Address feedback 2025-12-01 17:08:51 +01:00
Evil Eye 844a19e647 Account for older(?) versions of Steam 2025-12-01 17:08:51 +01:00
Evil Eye 1fdd8978a4 Detect more Steam versions 2025-12-01 17:08:51 +01:00
Evil Eye f619fab7aa Don't build a list of installations outside the wizard 2025-12-01 17:08:51 +01:00
Evil Eye 7efb31ae3e Detect Steam installations on Windows and Linux 2025-12-01 17:08:51 +01:00
Evil Eye cdb89422d4 Allow for more than a single installation 2025-12-01 17:08:50 +01:00
Evil Eye de36fbe2a5 Account for registry values not needing to be null terminated and the path constructor being allowed to throw 2025-12-01 17:08:50 +01:00
Evil Eye a0bef61c06 Deduplicate getting the install path from Wine 2025-12-01 17:08:50 +01:00
Evil Eye b424929fce Address feedback 2025-12-01 17:02:28 +01:00
Alexei Kotov 3c3fdda8a0 Merge branch 'sunlightpos' into 'master'
Expose sunlight direction to post-processing (#8826)

Closes #8826

See merge request OpenMW/openmw!5020
2025-12-01 01:45:28 +03:00
Alexei Kotov 20d14b57c1 Expose sunlight direction to post-processing (#8826) 2025-11-29 20:27:34 +03:00
Alexei Kotov 35e27504ee Merge branch 'teal-link-fix' into 'master'
Fix dead links to Teal documentation

See merge request OpenMW/openmw!5016
2025-11-29 03:34:18 +03:00
Alexei Kotov 96565e9afb Merge branch 'fix_clang_tidy_warnings' into 'master'
Fix clang tidy warnings (version 21.1.6)

See merge request OpenMW/openmw!5015
2025-11-27 01:16:51 +03:00
Alexei Kotov c31b4efc01 Merge branch 'globaltargetnumberone' into 'master'
Improve support for global script targets

Closes #2316, #7830, and #2311

See merge request OpenMW/openmw!4812
2025-11-27 01:16:25 +03:00
uramer 47721e7939 Fix dead links to Teal documentation 2025-11-26 14:54:11 +00:00
Alexei Kotov a00ede3595 Merge branch 'master' into 'master'
Fix 'Show Controller Tooltips By Default' option being ignored

Closes #8799

See merge request OpenMW/openmw!5003
2025-11-26 16:41:45 +03:00
Andy LanzoneandAlexei Kotov 94caf98ece Fix 'Show Controller Tooltips By Default' option being ignored 2025-11-26 16:41:45 +03:00
Evil Eye 0c95e5c7b8 Ensure thread safety 2025-11-25 22:20:27 +01:00
elsid feb9cc004c Fix portability-avoid-pragma-once warnings
components/misc/helpviewer.hpp:1:1: error: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once,-warnings-as-errors]
    1 | #pragma once
      | ^

apps/opencs/view/world/tableheadermouseeventhandler.hpp:1:1: error: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once,-warnings-as-errors]
    1 | #pragma once
      | ^
2025-11-25 21:16:50 +01:00
elsid 4186ca6ceb Fix clang-analyzer-security.ArrayBound warning
Size of an array is not a valid index.

components/esm4/reader.cpp:925:15: error: Out of bound access to memory after the end of 'sGroupType' [clang-analyzer-security.ArrayBound,-warnings-as-errors]
  925 |         ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
      |               ^
components/esm4/reader.cpp:627:13: note: Assuming field 'groupSize' is equal to field 'recHeaderSize'
  627 |         if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:627:9: note: Taking true branch
  627 |         if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
      |         ^
components/esm4/reader.cpp:634:17: note: Assuming the condition is true
  634 |             if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:634:13: note: Taking true branch
  634 |             if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
      |             ^
components/esm4/reader.cpp:638:17: note: Calling 'Reader::exitGroupCheck'
  638 |                 exitGroupCheck();
      |                 ^~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:13: note: Assuming the condition is false
  650 |         if (mCtx.groupStack.empty())
      |             ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:9: note: Taking false branch
  650 |         if (mCtx.groupStack.empty())
      |         ^
components/esm4/reader.cpp:655:16: note: Assuming 'lastGroupSize' is <= field 'second'
  655 |         while (mCtx.groupStack.back().second >= lastGroupSize)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:655:9: note: Loop condition is true.  Entering loop body
  655 |         while (mCtx.groupStack.back().second >= lastGroupSize)
      |         ^
components/esm4/reader.cpp:663:17: note: Assuming 'overshoot' is <= 0
  663 |             if (overshoot > 0)
      |                 ^~~~~~~~~~~~~
components/esm4/reader.cpp:663:13: note: Taking false branch
  663 |             if (overshoot > 0)
      |             ^
components/esm4/reader.cpp:676:17: note: Assuming the condition is false
  676 |             if (mCtx.groupStack.empty())
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:676:13: note: Taking false branch
  676 |             if (mCtx.groupStack.empty())
      |             ^
components/esm4/reader.cpp:682:17: note: Assuming 'lastGroupSize' is >= field 'second'
  682 |             if (lastGroupSize < mCtx.groupStack.back().second)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:682:13: note: Taking false branch
  682 |             if (lastGroupSize < mCtx.groupStack.back().second)
      |             ^
components/esm4/reader.cpp:686:17: note: Assuming 'lastGroupSize' is < field 'second'
  686 |             if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:686:13: note: Taking true branch
  686 |             if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
      |             ^
components/esm4/reader.cpp:687:30: note: Calling 'printLabel'
  687 |                 std::cerr << printLabel(mCtx.groupStack.back().first.label, mCtx.groupStack.back().first.type)
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:925:15: note: Access of 'sGroupType' at index 12, while it holds only 12 'class std::basic_string_view<char>' elements
  925 |         ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-11-25 00:03:39 +01:00
jvoisin 472240526d Merge branch 'fix_niftest_afl_findings' into 'master'
Fix AFL findings in niftest

See merge request OpenMW/openmw!4988
2025-11-24 21:41:46 +00:00
Alexei Kotov 93c4424f91 Merge branch 'werewolf-lua-api' into 'master'
Add Lua API for werewolf state management

See merge request OpenMW/openmw!4940
2025-11-24 23:48:23 +03:00
Alexei Kotov 1918c81e4d Bump Lua API revision 2025-11-24 23:46:48 +03:00
NovaandAlexei Kotov 87dc3cd0e8 Enforced local scripts can only modify self.
Updated documentation to use self and player in examples.
2025-11-24 23:45:53 +03:00
NovaandAlexei Kotov 5a76783616 Added documentation. 2025-11-24 23:45:53 +03:00
NovaandAlexei Kotov dcbda0cbaa Forgot the luamanagerimp.hpp include. 2025-11-24 23:45:53 +03:00
NovaandAlexei Kotov 96ab0752db Add Lua API for werewolf state management
Adds a new function to force the player or NPCS to turn into a werewolf.
- setWerewolf(bool): Transform a PC or NPC into/out of werewolf form

This enables modders to control werewolf transformations

Useage Example:

-- Turn player into werewolf
types.NPC.setWerewolf(self, true)
2025-11-24 23:45:52 +03:00
Evil Eye f7ad7a8263 Replace string.format with l10n in playerskillhandlers 2025-11-24 20:11:07 +01:00
Evil Eye 0a04bfa46d Fix rebase 2025-11-24 19:43:39 +01:00
Evil Eye bb4937f827 Allow composition of GMST l10n values 2025-11-24 19:33:28 +01:00
Alexei Kotov 0d4bff8ad6 Merge branch 'data-mw' into 'master'
Move Morrowind mechanics to data-mw

See merge request OpenMW/openmw!4937
2025-11-24 21:24:10 +03:00
Alexei Kotov f0b7fec7bb Bump Lua API revision 2025-11-24 21:22:40 +03:00
Evil Eye b4018b1962 Absorb changes from !4996 2025-11-24 17:59:50 +01:00
Evil Eye dcde01dee9 Note that getArmorSkill can return nil 2025-11-24 17:45:07 +01:00
Evil Eye f8ef80c522 Rename builtin template 2025-11-24 17:45:07 +01:00
Evil Eye a501e1ad1c Workaround a cmake/ninja issue 2025-11-24 17:45:07 +01:00
Evil Eye e66d43c083 Reduce the diff 2025-11-24 17:45:07 +01:00
Evil Eye 10c96ff68d Use configure_file substitution 2025-11-24 17:45:07 +01:00
Evil Eye c6c515f770 Make ATTACK_SOURCE_TYPES read only 2025-11-24 17:45:07 +01:00
Evil Eye 189eff7a49 Use cmake to create vfs-mw/builtin.omwscripts 2025-11-24 17:45:07 +01:00
Evil Eye e978c230dc Override functions by shallow copying the interface instead of overriding files 2025-11-24 17:45:07 +01:00
Evil Eye 7928930435 Move Morrowind mechanics to data-mw 2025-11-24 17:45:05 +01:00
Evil Eye 2a63ec6af6 Merge branch 'lua-docs-grammar-fixes' into 'master'
Lua docs: minor grammar fixes (mostly missing articles)

See merge request OpenMW/openmw!4996
2025-11-24 16:40:28 +00:00
Johannes DickensonandEvil Eye dfc1345a63 Lua docs: minor grammar fixes (mostly missing articles) 2025-11-24 16:40:27 +00:00
Alexei Kotov 422e1135e9 Merge branch 'master' into 'master'
Update file events.rst

See merge request OpenMW/openmw!5014
2025-11-24 13:27:16 +03:00
Evil Eye f8374f2ff0 Merge branch 'fix-8705' into 'master'
Feature #8705: Use texture-based LUT for moddable global map colors

See merge request OpenMW/openmw!4932
2025-11-23 20:54:11 +00:00
Andrzej GłuszakandEvil Eye 1bc95605ce Feature #8705: Use texture-based LUT for moddable global map colors 2025-11-23 20:54:11 +00:00
Alexei Kotov c687a21ccb Merge branch 'enum_naming' into 'master'
Fix and enforce enum naming (#8424)

See merge request OpenMW/openmw!4986
2025-11-23 22:36:23 +03:00
Alexei Kotov b571835695 Merge branch 'fix_nif_bhk_ragdoll_template' into 'master'
Use proper type for bhkRagdollTemplate::mBones

See merge request OpenMW/openmw!5013
2025-11-23 22:17:12 +03:00
ComeBESNIER ec81e3b4a6 Edit events.rst
Add a space between `amount` and `=` for stylistical reasons.
2025-11-23 13:42:05 +00:00
Evil Eye ba2130b35d Properly update the map when changing the view distance 2025-11-23 14:31:02 +01:00
Evil Eye 99dfd746f4 Account for view distance changes 2025-11-23 14:30:25 +01:00
Evil Eye a7a99145cf Remove rendered segments outside the map grid again 2025-11-23 14:30:24 +01:00
Evil Eye cd60d0e8c5 Properly account for map tile visibility 2025-11-23 14:28:13 +01:00
Evil Eye 839520b9a4 Draw and recycle door markers consistently 2025-11-23 14:28:12 +01:00
Evil Eye 6eb005ff3e Only count rendered neighbours 2025-11-23 14:27:01 +01:00
Evil Eye 97a34c63ed Prevent door markers from being rendered when they shouldn't be 2025-11-23 14:27:01 +01:00
Evil Eye 4457c1e47a Remove the need to cast door marker widgets 2025-11-23 14:26:59 +01:00
Evil Eye d148ccbb93 Remove logically redundant code 2025-11-23 14:20:54 +01:00
Evil Eye e7fbb3e33c Make LocalMap methods const 2025-11-23 14:20:53 +01:00
Alexei Kotov d1d598adc7 Hide the cursor in spell lists when controller tooltips are on (#8770) 2025-11-23 15:27:08 +03:00
elsid 7e1c1e8625 Use proper type for bhkRagdollTemplate::mBones 2025-11-23 13:21:41 +01:00
elsid 246759ecd2 Only reserve capacity when reading collections
But do not initialize. If the meta information is invalid and has a big
value, initialization will take significant amount of time but there
might be no actual data in the file because it's too small.
2025-11-23 13:17:00 +01:00
elsid 434f450778 Check Nif::RecordPtrT in debug builds
To verify class invariant.
2025-11-23 13:17:00 +01:00
elsid 0c2164330b Use at instead of operator[] to access nif record types
To fix crash on out of bounds access.
2025-11-23 13:17:00 +01:00
elsid 20c388a410 Replace asserts by exceptions in RecordPtrT
It's possible to fail when reading nif file.
2025-11-23 13:17:00 +01:00
elsid aa4caae2bf Use proper naming for Nif::RecordPtrT index 2025-11-23 13:16:59 +01:00
elsid e882c1c722 Check if nif stream has requested amount of data
Memory allocation with initialization may take significat amount of time
if meta information does not match actual content.
2025-11-23 13:16:59 +01:00
elsid 1ae0aadfed Use fail function to verify nif stream state
If there is a failure to read the file like incomplete read, bad returns
false, but fail returns true. This is important for reading number of
items more than the file actually has.
2025-11-23 13:16:59 +01:00
Alexei Kotov b49b048f72 Merge branch 'warn-baby-warn-warning-inferno' into 'master'
Warning inferno - fix warnings, then fix warnings

Closes #8674

See merge request OpenMW/openmw!4927
2025-11-23 15:01:53 +03:00
Alexei Kotov 46e0369fee Merge branch 'fix_benchmark_distribution' into 'master'
Use uniform_real_distribution for agent half extents

See merge request OpenMW/openmw!5005
2025-11-23 15:00:08 +03:00
Alexei Kotov 3abc719aa6 Merge branch 'fix_msvc_warnings' into 'master'
Fix C4244 in navmeshtilescache benchmark

See merge request OpenMW/openmw!5011
2025-11-23 14:48:19 +03:00
ComeBESNIER ac7cc4c9ea Update file events.rst 2025-11-23 09:16:55 +00:00
elsid d4ce5a2ac6 Fix and enforce enum naming 2025-11-22 11:19:18 +01:00
elsidandAnyOldName3 cde34d8041 Fix C4244 in navmeshtilescache benchmark
apps\benchmarks\detournavigator\navmeshtilescache.cpp(97): warning C4244: 'argument': conversion from 'double' to 'size_t', possible loss of data
apps\benchmarks\detournavigator\navmeshtilescache.cpp(97): note: the template instantiation context (the oldest one first) is
apps\benchmarks\detournavigator\navmeshtilescache.cpp(192): note: see reference to function template instantiation 'void `anonymous-namespace'::getFromFilledCache<1048576,100>(benchmark::State &)' being compiled
apps\benchmarks\detournavigator\navmeshtilescache.cpp(179): note: see reference to function template instantiation 'void `anonymous-namespace'::generateKeys<std::back_insert_iterator<std::vector<`anonymous-namespace'::Key,std::allocator<`anonymous-namespace'::Key>>>,std::linear_congruential_engine<unsigned int,48271,0,2147483647>>(_T0,size_t,_T1 &)' being compiled
        with
        [
            _T0=std::back_insert_iterator<std::vector<`anonymous-namespace'::Key,std::allocator<`anonymous-namespace'::Key>>>,
            _T1=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
apps\benchmarks\detournavigator\navmeshtilescache.cpp(153): note: see reference to function template instantiation '`anonymous-namespace'::Key `anonymous-namespace'::generateKey<_T1>(size_t,_T0 &)' being compiled
        with
        [
            _T1=std::linear_congruential_engine<unsigned int,48271,0,2147483647>,
            _T0=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
apps\benchmarks\detournavigator\navmeshtilescache.cpp(141): note: see reference to function template instantiation 'DetourNavigator::Mesh `anonymous-namespace'::generateMesh<_T0>(size_t,_T0 &)' being compiled
        with
        [
            _T0=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
apps\benchmarks\detournavigator\navmeshtilescache.cpp(99): warning C4244: 'argument': conversion from 'double' to 'size_t', possible loss of data
apps\benchmarks\detournavigator\navmeshtilescache.cpp(112): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
apps\benchmarks\detournavigator\navmeshtilescache.cpp(112): note: the template instantiation context (the oldest one first) is
apps\benchmarks\detournavigator\navmeshtilescache.cpp(144): note: see reference to function template instantiation 'DetourNavigator::Heightfield `anonymous-namespace'::generateHeightfield<_T0>(_T0 &)' being compiled
        with
        [
            _T0=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
2025-11-21 15:37:40 +00:00
elsidandAnyOldName3 c844e93f82 Use uniform_real_distribution for agent half extents
They have float type.
2025-11-21 15:37:01 +00:00
elsid 0a2234ad3e Fix C4244 in navmeshtilescache benchmark
apps\benchmarks\detournavigator\navmeshtilescache.cpp(97): warning C4244: 'argument': conversion from 'double' to 'size_t', possible loss of data
apps\benchmarks\detournavigator\navmeshtilescache.cpp(97): note: the template instantiation context (the oldest one first) is
apps\benchmarks\detournavigator\navmeshtilescache.cpp(192): note: see reference to function template instantiation 'void `anonymous-namespace'::getFromFilledCache<1048576,100>(benchmark::State &)' being compiled
apps\benchmarks\detournavigator\navmeshtilescache.cpp(179): note: see reference to function template instantiation 'void `anonymous-namespace'::generateKeys<std::back_insert_iterator<std::vector<`anonymous-namespace'::Key,std::allocator<`anonymous-namespace'::Key>>>,std::linear_congruential_engine<unsigned int,48271,0,2147483647>>(_T0,size_t,_T1 &)' being compiled
        with
        [
            _T0=std::back_insert_iterator<std::vector<`anonymous-namespace'::Key,std::allocator<`anonymous-namespace'::Key>>>,
            _T1=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
apps\benchmarks\detournavigator\navmeshtilescache.cpp(153): note: see reference to function template instantiation '`anonymous-namespace'::Key `anonymous-namespace'::generateKey<_T1>(size_t,_T0 &)' being compiled
        with
        [
            _T1=std::linear_congruential_engine<unsigned int,48271,0,2147483647>,
            _T0=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
apps\benchmarks\detournavigator\navmeshtilescache.cpp(141): note: see reference to function template instantiation 'DetourNavigator::Mesh `anonymous-namespace'::generateMesh<_T0>(size_t,_T0 &)' being compiled
        with
        [
            _T0=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
apps\benchmarks\detournavigator\navmeshtilescache.cpp(99): warning C4244: 'argument': conversion from 'double' to 'size_t', possible loss of data
apps\benchmarks\detournavigator\navmeshtilescache.cpp(112): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
apps\benchmarks\detournavigator\navmeshtilescache.cpp(112): note: the template instantiation context (the oldest one first) is
apps\benchmarks\detournavigator\navmeshtilescache.cpp(144): note: see reference to function template instantiation 'DetourNavigator::Heightfield `anonymous-namespace'::generateHeightfield<_T0>(_T0 &)' being compiled
        with
        [
            _T0=std::linear_congruential_engine<unsigned int,48271,0,2147483647>
        ]
2025-11-21 13:57:51 +01:00
elsid d7db0d3d46 Use uniform_real_distribution for agent half extents
They have float type.
2025-11-19 20:17:22 +01:00
Evil Eye c06f94fee8 Merge branch 'fix_esmtool_afl_findings' into 'master'
Check index for ESM4 race parts

See merge request OpenMW/openmw!4987
2025-11-16 13:18:27 +00:00
Alexei Kotov dcedbfdb26 Merge branch 'feat/potion-autocalc' into 'master'
FEAT: Add & document autocalc flag on potions

See merge request OpenMW/openmw!5000
2025-11-16 12:56:41 +03:00
Dave CorleyandAlexei Kotov f773da37ee FEAT: Add & document autocalc flag on potions (#8796) 2025-11-16 12:56:41 +03:00
Evil Eye 2386c9d1dc Move 0 check to the top 2025-11-15 11:03:56 +01:00
Evil Eye f2dd080c14 Clamp index before subtracting 2025-11-14 16:45:32 +01:00
Alexei Kotov ececf031a4 Merge branch 'changelogsync' into 'master'
Sync changelog

See merge request OpenMW/openmw!4998
2025-11-13 19:55:24 +03:00
Alexei Kotov 9ff4c8c060 Sync changelog for 0.51.0 2025-11-13 12:27:14 +03:00
Alexei Kotov bb3b3eb5e4 Merge branch 'lua-scripts-doc-remove' into 'master'
fixed obsolete ref to lua-scripts in docs

See merge request OpenMW/openmw!4993
2025-11-12 19:52:10 +03:00
Alexei Kotov 063b233d12 Merge branch 'were-blazin-too-hard' into 'master'
FIX: Correct compile error on newest clang

See merge request OpenMW/openmw!4992
2025-11-12 19:50:34 +03:00
daniil.mitrofanov b228473929 Fix grammar and plural consistency issues
Fixed grammar issue:
- Added missing comma after 'however' on line 23 in README.md

Fixed plural consistency in script-warn option:
- Source (options.cpp lines 63-64): 'warning' → 'warnings'
- Documentation (README.md lines 73-74): Updated to match corrected output

The README help text is meant to mirror 'openmw --help' output, so both
the source and documentation are updated for consistency.

All three script-warn options now consistently use plural 'warnings':
- 0 - ignore warnings
- 1 - show warnings but consider script as correctly compiled anyway
- 2 - treat warnings as errors
2025-11-11 23:55:42 +04:00
gbtb 3178276f06 fixed obsolete ref to lua-scripts in docs 2025-11-12 03:31:06 +10:00
Dave Corley 307a131ca0 FIX: Correct compile error on newest clang 2025-11-11 11:25:52 -06:00
AnyOldName3 447e01504e Another capitalisation warning 2025-11-10 21:34:46 +00:00
jvoisin 429305401e Merge branch 'keywordsoup' into 'master'
Fix KeywordSearch

Closes #8760

See merge request OpenMW/openmw!4960
2025-11-10 21:20:09 +00:00
jvoisin c09cb5c0de Merge branch 'fileview' into 'master'
Use std::string_view in file collections

See merge request OpenMW/openmw!4909
2025-11-10 21:08:05 +00:00
AnyOldName3 9d0a8eb8c4 New warning from !4980
It didn't like snake case, and then MSVC wasn't happened that it shadowed the constexpr value with the same name
2025-11-10 19:08:09 +00:00
AnyOldName3 f8553f2e8a Resolve new warning from !4798 2025-11-10 16:03:02 +00:00
AnyOldName3 43fecf48c7 Fix new warnings from !4925
I don't understand why this needed doing now, as this was merged weeks ago and I thought I'd absorbed conflicts since then.
2025-11-10 16:02:36 +00:00
AnyOldName3 ef8e7d97cb Resolve merge conflicts from !4971 2025-11-10 16:01:47 +00:00
AnyOldName3 f31ec2b3a5 Merge branch 'printf' into 'master'
Bring messagebox format parsing more in line with printf/vanilla

Closes #8732

See merge request OpenMW/openmw!4878
2025-11-10 15:23:48 +00:00
AnyOldName3 1fadb167c9 Merge branch 'patient0' into 'master'
Allow non-player actors to catch diseases

Closes #8765

See merge request OpenMW/openmw!4968
2025-11-10 14:39:08 +00:00
uramer 1315d29684 Merge branch 'skills_fix' into 'master'
Validate skill level before changing the progress

Closes #8779

See merge request OpenMW/openmw!4981
2025-11-10 09:50:53 +00:00
uramer 3be1010d03 Merge branch 'protectthecall' into 'master'
Ensure LuaUtil::call is invoked from a safe context

Closes #8769

See merge request OpenMW/openmw!4971
2025-11-10 09:50:10 +00:00
Alexei Kotov ba72415369 Merge branch 'itemviewfocus' into 'master'
Don't reset item view focus during realignment (#8771)

Closes #8771

See merge request OpenMW/openmw!4985
2025-11-10 06:33:56 +03:00
Alexei Kotov 757c325a4d Merge branch 'whats-a-taret' into 'master'
FIX: Correct typo in unlock events

See merge request OpenMW/openmw!4991
2025-11-10 06:31:57 +03:00
Alexei Kotov 8b6a552f5a Merge branch 'handtwohand' into 'master'
Use Hand To Hand Hit 2 sound (#8731)

Closes #8731

See merge request OpenMW/openmw!4978
2025-11-10 06:30:18 +03:00
elsid c7830d9ee5 Check index for ESM4 race parts
To avoid out of bounds access. Index is a part of the file contents so
it can be invalid.
2025-11-09 21:49:41 +01:00
Alexei Kotov 2e4020a244 Merge branch 'mwui' into 'master'
Dehardcode script settings window font and colors

See merge request OpenMW/openmw!4798
2025-11-09 06:55:38 +03:00
Alexei Kotov 206c3135bc Merge branch 'bhkListShape-fix' into 'master'
Add post-processing for bhkListShape subshapes

See merge request OpenMW/openmw!4983
2025-11-09 06:21:54 +03:00
Dave Corley 42fa037195 FIX: Correct typo in unlock events 2025-11-08 15:52:02 -06:00
Andrei Kortunov 6d3f5cf70c Dehardcode script settings window font and colors 2025-11-08 20:31:24 +04:00
Alexei Kotov ba197863cf Don't reset item view focus during realignment (#8771) 2025-11-08 02:26:17 +03:00
rapidsamphire a3d99ce636 Add post-processing for bhkListShape subshapes
bhkListShape contains a list of subshape references that need to be
resolved after initial parsing. Without calling postRecordList(), the
mSubshapes list would contain unresolved RecordPtrs.

This adds the missing post() override to properly load subshape data,
consistent with other NIF record types that contain RecordPtr lists.
2025-11-07 14:56:05 -06:00
Evil Eye 39d117e362 Merge branch 'fix_clang_tidy' into 'master'
Fix clang-tidy checks

See merge request OpenMW/openmw!4980
2025-11-06 16:31:44 +00:00
Evil Eye baefea94e8 Capture this explicitly 2025-11-05 22:09:23 +01:00
Andrei Kortunov 0977499139 Validate skill level before changing the progress (bug 8779) 2025-11-04 22:11:44 +04:00
Alexei Kotov 7c0702a71c Merge branch 'cecinestpasunetable' into 'master'
Don't attempt to parse table-like objects as ignore lists

Closes #8775

See merge request OpenMW/openmw!4974
2025-11-03 07:11:06 +03:00
Alexei Kotov 342a4415d0 Increment Lua API revision 2025-11-03 07:09:45 +03:00
Evil EyeandAlexei Kotov 492716ee6b Type check the ignore list 2025-11-03 07:07:08 +03:00
Evil EyeandAlexei Kotov 3558f9c48b Don't attempt to parse table-like objects as ignore lists 2025-11-03 07:07:08 +03:00
AnyOldName3 0a9f5a3c66 Resolve merge conflicts from !4938 and !4956 2025-11-02 18:05:38 +00:00
elsid e4b28ebdce Fix clang-tidy checks
Placing .clang-tidy into build/ folder hides some checks defined in the
root file. Place them into more specific folders to not check generated
files.
2025-11-02 18:40:02 +01:00
Alexei Kotov d0a533bf02 Use Hand To Hand Hit 2 sound (#8731) 2025-11-02 08:20:40 +03:00
Alexei Kotov 851fd91d3c Merge branch 'nil_refid' into 'master'
Lua: Return nil instead of empty strings for optional RefId fields

Closes #8718

See merge request OpenMW/openmw!4956
2025-11-02 05:37:27 +03:00
Alexei Kotov 0202594163 Increment Lua API revision 2025-11-02 05:10:55 +03:00
Andrzej GłuszakandAlexei Kotov c4b28a39c3 Lua: Return nil instead of empty strings for optional RefId fields
Implement sol_lua_push for ESM::RefId to automatically convert empty
RefIds to nil in Lua. This fixes cell.region and cell.worldSpaceId
returning empty strings, and applies the same pattern consistently
across all Lua bindings.

Removes LuaUtil::serializeRefId as it's no longer needed.

Fixes #8718
2025-11-02 05:08:25 +03:00
Alexei Kotov b516770a04 Merge branch 'localize_cell_names' into 'master'
Localize cell names in the Lua API

Closes #8725

See merge request OpenMW/openmw!4938
2025-11-02 04:23:52 +03:00
Alexei Kotov 3687f1fe55 Increment Lua API revision 2025-11-02 04:22:47 +03:00
Andrei KortunovandAlexei Kotov 2fe63177b7 Translate cell name directly 2025-11-02 04:22:47 +03:00
Andrei KortunovandAlexei Kotov d6cc205b86 Localize cell names in the Lua API (feature 8725) 2025-11-02 04:22:46 +03:00
Evil Eye 4f8b418c23 Ensure LuaUtil::call is invoked from a safe context 2025-10-30 22:24:53 +01:00
uramer 8b2be21eea Merge branch 'almanac' into 'master'
Improve weather documentation and prevent division by 0

See merge request OpenMW/openmw!4966
2025-10-28 17:10:48 +00:00
jvoisin 4aa0edf895 Merge branch 'customrecorddocs' into 'master'
Mention NpcRecord in createRecord docs

See merge request OpenMW/openmw!4967
2025-10-28 17:06:45 +00:00
jvoisin 25b2a8c82f Merge branch 'finitehit' into 'master'
Require finite values in Actor._onHit

See merge request OpenMW/openmw!4965
2025-10-28 17:06:05 +00:00
Alexei Kotov e1cd9bf86b Merge branch 'changelog' into 'master'
Add recent crash fixes into 0.50.0 changelog

See merge request OpenMW/openmw!4970
2025-10-28 19:46:02 +03:00
Alexei Kotov e92745feb0 Add recent crash fixes into 0.50.0 changelog 2025-10-28 12:26:30 +03:00
Alexei Kotov 23f843c552 Merge branch 'objectifyyourtype' into 'master'
Return type as a sol::object instead of a table proxy

Closes #8757

See merge request OpenMW/openmw!4963
2025-10-28 12:13:03 +03:00
Evil Eye 1ae5adba78 Allow non-player actors to catch diseases 2025-10-27 19:49:51 +01:00
Evil Eye 83fe65cff7 Improve weather documentation and prevent division by 0 2025-10-27 19:22:37 +01:00
Alexei Kotov a6d128c58a Mention NpcRecord in createRecord docs
Also alphabetize the list and adjust capitalization
2025-10-27 20:31:26 +03:00
AnyOldName3 f372dc1006 Merge branch 'boostsystemfix' into 'master'
Don't link to stub Boost.System library (#8754)

Closes #8754

See merge request OpenMW/openmw!4964
2025-10-27 17:23:31 +00:00
Evil Eye c0ac3388df Require finite values in Actor._onHit 2025-10-27 16:58:04 +01:00
Alexei Kotov fea807821d Don't link to stub Boost.System library (#8754) 2025-10-26 05:16:26 +03:00
Evil Eye 801b8b567e Use ptrdiff_t 2025-10-25 12:33:56 +02:00
Evil Eye e3b293c4b7 Merge branch 'gamepaddb' into 'master'
Update SDL controller mappings

See merge request OpenMW/openmw!4961
2025-10-25 09:53:10 +00:00
Evil Eye b24732728c Address potential UB reported by котverity 2025-10-25 11:40:12 +02:00
Evil Eye d147006c64 Add integration test 2025-10-25 11:10:45 +02:00
Alexei Kotov 2708bfab9f Merge branch 'erasethechildren' into 'master'
Erase the widget we want to attach rather than the widget we're attaching to

Closes #8758

See merge request OpenMW/openmw!4962
2025-10-24 19:17:50 +03:00
Evil Eye 823dc6a896 Return type as a sol::object instead of a table proxy 2025-10-23 20:51:01 +02:00
Evil Eye a665980d5e Erase the widget we want to attach rather than the widget we're attaching to 2025-10-23 17:23:37 +02:00
Alexei Kotov 232f963436 Update SDL controller DB 2025-10-23 00:23:45 +03:00
Evil Eye e59f3327ef Fix KeywordSearch 2025-10-22 18:28:48 +02:00
Evil Eye cc10352def Address comments 2025-10-22 17:27:51 +02:00
Alexei Kotov 2e67c8b47f Merge branch 'patch-1' into 'master'
fix typo in record-filters.rst

See merge request OpenMW/openmw!4959
2025-10-19 13:40:29 +03:00
Alexei Kotov ce4606705f Merge branch 'permanentlyinvalid' into 'master'
Remove invalid permanent effects

Closes #8737

See merge request OpenMW/openmw!4950
2025-10-19 00:21:01 +03:00
Alexei Kotov 081cf2cf25 Merge branch 'noitemview' into 'master'
Fix UB in item view controller refocusing during redraw

Closes #8724

See merge request OpenMW/openmw!4948
2025-10-18 18:55:03 +03:00
Alexei Kotov 9caafb4033 Merge branch 'gcovr' into 'master'
Downgrade gcovr to 8.3

See merge request OpenMW/openmw!4957
2025-10-18 18:47:07 +03:00
Alexei Kotov 1f839d264d Merge branch 'fix_qt_build' into 'master'
Do not implicitly convert QByteArray to const char*

See merge request OpenMW/openmw!4941
2025-10-18 18:41:24 +03:00
hbschr a08ffb7ad7 fix typo in record-filters.rst 2025-10-18 11:21:03 +00:00
Alexei Kotov b7ddc8304b Cleverer filesystem path conversion for QString/QStringView 2025-10-18 13:28:30 +03:00
Evil Eye b9096410c3 Partially revert 91b1346761 2025-10-17 17:24:19 +02:00
Evil Eye 03a46650af Merge branch 'stast_handler' into 'master'
Use abbreviation for GUI stat name

See merge request OpenMW/openmw!4952
2025-10-16 17:46:28 +00:00
Evil Eye eb04049268 Downgrade gcovr to 8.3 2025-10-16 18:44:07 +02:00
Alexei Kotov 2c0205db79 Merge branch 'fix_msvc_tests' into 'master'
Fix tests for MSVC

See merge request OpenMW/openmw!4951
2025-10-15 21:02:06 +03:00
Evil Eye 5242610366 Differentiate between invalid and unapplied effects and stop marking unapplied revertable effects as applied in godmode 2025-10-14 21:26:06 +02:00
Evil Eye 34ff702212 Allow skills to be fortified by absorbing from a creature 2025-10-14 20:33:00 +02:00
Andrei Kortunov ed15542d8b Use abbreviation for GUI stat name 2025-10-14 11:14:00 +04:00
Alexei Kotov 6e8322c466 Merge branch 'focus_unify' into 'master'
Unify focus object terminology

See merge request OpenMW/openmw!4949
2025-10-13 23:19:52 +03:00
Alexei Kotov 85e35cbf58 Merge branch 'i-could-be-further-away' into 'master'
CLEANUP: Always use squared distance in types.Actor.isInActorsProcessingRange

See merge request OpenMW/openmw!4945
2025-10-13 23:18:31 +03:00
Dave CorleyandAlexei Kotov 7e41d81c9e Always use squared distance in types.Actor.isInActorsProcessingRange 2025-10-13 23:18:31 +03:00
elsid 7bf1ea32b0 Disable not working tests for MSVC
std::streambuf in MSVC does not support buffers larger than 2**31 - 1:
https://developercommunity.visualstudio.com/t/stdbasic-stringbuf-is-broken/290124

Simple test to check if it works:

TEST(IMemStreamTest, shouldRead)
{
    std::string src(std::numeric_limits<uint32_t>::max() / 2 + 1, '\0');
    Files::IMemStream stream(src.data(), src.size());
    std::string dst(src.size(), '\0');
    stream.read(dst.data(), src.size());
    EXPECT_FALSE(stream.fail()) << std::generic_category().message(errno);
}
2025-10-12 11:11:24 +02:00
elsid ab4637f6c7 Do not rely on std::string::reserve
Passing an object with capacity through std::ostringstream may change
its capacity. Use malloc instead to make sure the memory is allocated.
2025-10-12 11:11:22 +02:00
Evil Eye f783993c56 Don't mark skill affecting effects as invalid if the target is a creature 2025-10-11 14:47:45 +02:00
Evil Eye b905836f45 Remove invalid permanent effects 2025-10-11 13:21:22 +02:00
Andrei Kortunov 48e1ee3ac7 Unify focus object terminology 2025-10-11 13:01:26 +04:00
Alexei Kotov c75aed5175 Merge branch 'solidlyrooted' into 'master'
Don't break LuaUi::Element's invariant

Closes #8720

See merge request OpenMW/openmw!4930
2025-10-11 11:59:17 +03:00
Alexei Kotov 1afbc6ba63 Fix UB in item view controller refocusing during redraw (#8724)
std::clamp's upper bound goes negative when there are no items
2025-10-11 10:26:41 +03:00
Alexei Kotov 3f6ecc4de1 Merge branch 'shield_sheath' into 'master'
Fix shield equip and unequip animations, add docs for shield sheathing feature

See merge request OpenMW/openmw!4936
2025-10-11 09:13:30 +03:00
Alexei Kotov afe4edc3c3 Merge branch 'fix_bsatool_afl_findings' into 'master'
Fix AFL findings in bsatool

See merge request OpenMW/openmw!4925
2025-10-11 08:57:48 +03:00
Alexei Kotov 39b22cbcdf Merge branch 'fix_copy_column_warning' into 'master'
Fix C4244 MSVC warning in Sqlite3::copyColumn

See merge request OpenMW/openmw!4939
2025-10-11 07:11:29 +03:00
elsid 16abb436e2 Fix potential overflows on reading BSA header 2025-10-06 00:03:12 +02:00
elsid c87cc643d1 Add tests for BSAFile 2025-10-06 00:02:32 +02:00
elsid d7f6d7c13c Add unit tests for CompressedBSAFile 2025-10-06 00:02:32 +02:00
elsid a111391992 Check for failures after reading from stream in BSA 2025-10-06 00:02:32 +02:00
elsid 801224749f Handle errors when computing stream size for BSA 2025-10-06 00:02:32 +02:00
elsid 796202f435 Use fail function to verify stream state in BSA
If there is a failure to read the file like unexpected EOF, bad returns
false, but fail returns true. Important for reading number of items more
than the file actually has.
2025-10-06 00:02:32 +02:00
elsid 9a449ed506 Only reserve capacity when reading collections
But do not initialize. If the meta information is invalid and has a big
value, initialization will take significant amount of time but there
might be no actual data in the file because it's too small.
2025-10-06 00:02:31 +02:00
elsid 38f6c5a68b Properly handle duplicated BSA folders
Deduplicate folders first and then add their files to mFiles.
2025-10-06 00:02:31 +02:00
elsid c92e321a08 Use std::string_view for BSA file name 2025-10-06 00:02:31 +02:00
elsid c388fda5e4 Handle empty file name in BSA 2025-10-06 00:02:28 +02:00
elsid 0bae2b14b1 Do not implicitly convert QByteArray to const char*
Operators supporting this conversion can be disabled via
QT_NO_CAST_FROM_BYTEARRAY breaking the build. For example:

https://koschei.fedoraproject.org//package/openmw
https://kojipkgs.fedoraproject.org/work/tasks/5096/137735096/build.log
2025-10-05 23:52:25 +02:00
AnyOldName3 44eb972770 Merge branch 'fix_copy_column_warning' of https://gitlab.com/elsid/openmw into warn-baby-warn-warning-inferno 2025-10-05 18:07:34 +01:00
AnyOldName3 91b1346761 Revert "Support wrapped arthimetic types"
elsid provided an alternative.

This reverts commit b0cf148393.
2025-10-05 18:06:41 +01:00
elsid d171915b6a Fix error message 2025-10-05 14:46:40 +02:00
elsid cfd7f52a2f Fix C4244 MSVC warning in Sqlite3::copyColumn
Make sure sqlite3_column_double is not called for int64_t and other
integral types and sqlite3_column_int64 is not called for floating point
types.

[363/1189] Building CXX object components\CMakeFiles\components.dir\RelWithDebInfo\detournavigator\navmeshdb.cpp.obj
D:\dev\openmw\components/sqlite3/request.hpp(109): warning C4244: 'argument': conversion from 'double' to 'T', possible loss of data
        with
        [
            T=int64_t
        ]
D:\dev\openmw\components/sqlite3/request.hpp(109): note: the template instantiation context (the oldest one first) is
D:\dev\openmw\components\detournavigator\navmeshdb.cpp(198): note: see reference to function template instantiation 'I Sqlite3::request<DetourNavigator::DbQueries::GetMaxTileId,DetourNavigator::TileId*,>(sqlite3 &,Sqlite3::Statement<DetourNavigator::DbQueries::GetMaxTileId> &,I,size_t)' being compiled
        with
        [
            I=DetourNavigator::TileId *
        ]
D:\dev\openmw\components/sqlite3/request.hpp(262): note: see reference to function template instantiation 'void Sqlite3::getRow<DetourNavigator::TileId>(sqlite3 &,sqlite3_stmt &,T &)' being compiled
        with
        [
            T=DetourNavigator::TileId
        ]
D:\dev\openmw\components/sqlite3/request.hpp(210): note: see reference to function template instantiation 'void Sqlite3::getColumns<std::tuple<T &>>(sqlite3 &,sqlite3_stmt &,std::tuple<T &> &)' being compiled
        with
        [
            T=DetourNavigator::TileId
        ]
D:\dev\openmw\components/sqlite3/request.hpp(203): note: see reference to function template instantiation 'void Sqlite3::getColumnsImpl<1,T>(sqlite3 &,sqlite3_stmt &,T &)' being compiled
        with
        [
            T=std::tuple<DetourNavigator::TileId &>
        ]
D:\dev\openmw\components/sqlite3/request.hpp(190): note: see reference to function template instantiation 'void Sqlite3::copyColumn<T>(sqlite3 &,sqlite3_stmt &,int,int,T &)' being compiled
        with
        [
            T=DetourNavigator::TileId
        ]
2025-10-05 14:39:51 +02:00
Evil Eye 23e9d1ac0c Remove redundant std::floor 2025-10-05 14:19:49 +02:00
AnyOldName3 06cb00bb0b Resolve merge conflicts from !4924 and !4928
luamanagerimp still needs float frameDuration, and reordering a bunch of fields in the scene manager conflicted with changing the type of maxanisotropy.
2025-10-04 23:08:20 +01:00
Alexei Kotov d8ef4fcde2 Changelog for #8734 2025-10-04 23:13:04 +03:00
Andrei Kortunov d9b441ccaa Fix shield equip and unequip animations, add docs for shield sheathing feature (bug 8734) 2025-10-04 16:07:15 +04:00
Alexei Kotov ef05e089ab Merge branch 'encucumberance' into 'master'
Update encumbrance unconditionally (#8729)

Closes #8729

See merge request OpenMW/openmw!4934
2025-10-04 11:14:35 +03:00
Alexei Kotov d9bcc3dc4f Merge branch 'kelapasawit8123' into 'master'
Make weapon usage less restrictive

See merge request OpenMW/openmw!4906
2025-10-03 21:03:14 +03:00
Evil Eye 50ffc908e8 Use vformat_to and add more tests 2025-10-03 17:21:52 +02:00
Alexei Kotov 5c4821bed7 Merge branch 'override-all-the-things' into 'master'
DOC: Document data-local

See merge request OpenMW/openmw!4929
2025-10-03 00:28:27 +03:00
Dave CorleyandAlexei Kotov fd7e6b6bcb DOC: Document data-local 2025-10-03 00:28:26 +03:00
Evil Eye 5dcb0e19fb Use static_cast for consistency 2025-10-02 18:15:33 +02:00
Alexei Kotov 0eb1a79b00 Update encumbrance unconditionally (#8729)
The flag is only set when items are physically added/removed, which doesn't happen during barter
2025-10-02 08:29:24 +03:00
Alexei Kotov 9b76739489 Merge branch 'handlers' into 'master'
Deduplicate event handling code

See merge request OpenMW/openmw!4914
2025-10-02 00:55:23 +03:00
Alexei Kotov f60875dd8f Merge branch 'soontm' into 'master'
Bump us up to 0.51

See merge request OpenMW/openmw!4900
2025-10-02 00:01:10 +03:00
psi29a 52d2f2a6ed Merge branch 'triggered' into 'master'
Make sure gamepad triggers can be bound (#8721)

Closes #8721

See merge request OpenMW/openmw!4931
2025-10-01 07:12:08 +00:00
AnyOldName3 5b94502c7f Use float directly 2025-09-30 16:49:53 +01:00
AnyOldName3 f5889ba067 Tidying based on review
1.1 was changed to 1.f instead of 1.1f, so that's been fixed.

Reduce the number of casts in RenderingManager::updateProjectionMatrix()
2025-09-29 14:12:29 +01:00
Alexei Kotov ae0886ae36 Make sure gamepad triggers can be bound (#8721) 2025-09-29 02:19:06 +03:00
Evil Eye b2beb4a8f8 Don't break LuaUi::Element's invariant 2025-09-28 21:20:40 +02:00
psi29a 98973426a4 Merge branch 'dremoraspearsarepointy' into 'master'
Make Absorb Skill safe for creatures

Closes #8710

See merge request OpenMW/openmw!4926
2025-09-28 16:16:40 +00:00
Alexei Kotov 73d818da8c Merge branch 'dontcrashonerror' into 'master'
Ensure error marker assignment is thread safe

Closes #8176

See merge request OpenMW/openmw!4928
2025-09-27 03:18:38 +03:00
Evil Eye 000c5d2a08 Ensure error marker assignment is thread safe 2025-09-25 20:47:10 +02:00
AnyOldName3 4eb69427dd One last pair of rule-of-three warnings for Clang 2025-09-25 00:05:35 +01:00
AnyOldName3 7ebb0cf577 Some warnings for Clang 2025-09-24 00:38:36 +01:00
AnyOldName3 536e7b8881 I think MSVC was right and GCC was wrong 2025-09-24 00:37:21 +01:00
AnyOldName3 372e5aa5f8 Format 2025-09-24 00:01:52 +01:00
AnyOldName3 eb81cc7908 More GCC Ubuntu warnings 2025-09-23 23:47:27 +01:00
AnyOldName3 f39ba9783a Mark extern library includes as SYSTEM
With CMake 3.25, there's a target property we could use to deal with this with a little less mess, but we use 3.16 right now.
2025-09-23 01:13:47 +01:00
AnyOldName3 a433114937 Rearrange extern so includes don't need to start with extern/ 2025-09-23 01:04:45 +01:00
AnyOldName3 b6f699d513 First batch of GCC/Ubuntu 24.04 warnings 2025-09-23 00:14:53 +01:00
Evil Eye d2958a17fa Make Absorb Skill safe for creatures 2025-09-22 22:13:03 +02:00
Evil Eye 4847995861 Bump cache keys 2025-09-22 21:28:52 +02:00
Evil Eye b15ae08a07 Reduce type conversions in books 2025-09-22 20:59:13 +02:00
Evil Eye 5308e22f6d Address more conversion warnings in the engine 2025-09-22 18:10:34 +02:00
Evil Eye e77ce5a507 Fix KeywordSearch 2025-09-22 17:12:24 +02:00
Evil Eye 478df08433 Address more engine conversion warnings 2025-09-22 13:33:27 +02:00
Evil Eye bcad4a7fd5 Address more conversion warnings in the engine 2025-09-21 17:45:38 +02:00
Evil Eye fc700c61fd Resolve various conversion warnings in mwgui 2025-09-21 15:58:38 +02:00
Evil Eye 39f17f5651 Remove scaled GlyphInfo copy 2025-09-21 12:32:31 +02:00
Evil Eye 1caac90e93 Add btVector3 -> osg::Vec3f helper 2025-09-21 12:14:50 +02:00
Evil Eye b845e07ad6 Address various conversion warnings in openmw 2025-09-21 12:00:59 +02:00
Evil Eye 9523f46409 Address conversion warnings in opencs 2025-09-21 10:45:21 +02:00
elsid 91ccb0fe8d Use proper naming for BSA File and Hash members 2025-09-20 19:21:17 +02:00
Evil Eye 712ea46537 Fix include order 2025-09-20 17:19:54 +02:00
Evil Eye f181420cce Address conversion warning in the launcher 2025-09-20 16:22:18 +02:00
Evil Eye ddd614f815 Address conversion warnings in essimporter 2025-09-20 16:20:47 +02:00
Evil Eye ea2ff63bf6 Address conversion warnings in esmtool 2025-09-20 16:16:01 +02:00
Evil Eye 3ba702690c Require SOL_PROPAGATE_EXCEPTIONS to be off 2025-09-20 16:07:59 +02:00
Evil Eye b0cf148393 Support wrapped arthimetic types 2025-09-20 12:58:37 +02:00
Petr Mikheev bed84e209b Merge branch 'saveaction' into 'master'
Build and test / Read .env file and expose it as output (push) Successful in 1m5s
Release / Read .env file and expose it as output (push) Successful in 1m6s
Build and test / Ubuntu (push) Failing after 31m25s
Build and test / MacOS (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Turn menu.saveGame into a delayed action

See merge request OpenMW/openmw!4924
2025-09-20 10:39:43 +00:00
Evil EyeandPetr Mikheev ff79c2d826 Turn menu.saveGame into a delayed action 2025-09-20 10:39:43 +00:00
Evil Eye 71fa8c9f7d Fix conversion warnings in components_tests 2025-09-20 12:12:31 +02:00
Evil Eye cb82d37992 Address remaining conversion warnings in components 2025-09-20 11:39:31 +02:00
Alexei Kotov 7d4d3e3c73 Merge branch 'notnpcdating' into 'master'
Translate gamepad actions, part 4

See merge request OpenMW/openmw!4922
2025-09-20 00:17:05 +03:00
Alexei Kotov e5b5869a21 Merge branch 'kampfpanzer' into 'master'
Add German translations for OMWCombat

See merge request OpenMW/openmw!4921
2025-09-20 00:15:54 +03:00
Evil Eye a8831651bb Swap arguments 2025-09-18 22:01:24 +02:00
Evil Eye f7292680d6 Fix most conversion warnings in components 2025-09-18 22:00:55 +02:00
AnyOldName3 98291f1377 First batch of warning fixes 2025-09-18 00:38:08 +01:00
AnyOldName3 7520e86ab3 Don't treat the repo root as a system include directory
This is a regression from https://gitlab.com/OpenMW/openmw/-/commit/99ba45a308c09f01976da483160dba93007413d1#9a2aa4db38d3115ed60da621e012c0efc0172aae_322_319, and caused many of our headers not to generate warnings.

It also combined with MSVC bug https://developercommunity.visualstudio.com/t/Including-a-header-with-pragma-system_h/10968424?port=1025&fsid=327e3050-e79a-41b0-8237-b262a60103e3 to prevent warnings in any TU that includes a CMake-generated precompiled header.
2025-09-17 19:02:51 +01:00
Alexei Kotov 2ea14570c8 Merge branch 'you-were-supposed-to-tell-me-about-this' into 'master'
CLEANUP: Document addTopic

See merge request OpenMW/openmw!4923
2025-09-15 22:54:43 +03:00
Dave Corley 9a4db2d65f CLEANUP: Document addTopic 2025-09-14 15:32:38 -05:00
Alexei Kotov 1182004937 Use l10n for inventory gamepad actions 2025-09-14 15:46:02 +03:00
Alexei Kotov b0055ec8e7 Use l10n for map gamepad actions 2025-09-14 03:23:48 +03:00
Alexei Kotov baf575e594 Add Sex into OpenMW
...as well as the other lines required to expose the race menu gamepad actions to l10n and use them
2025-09-14 01:41:11 +03:00
Alexei Kotov fbb726cee0 Merge branch 'shooting-at-macs-without-looking' into 'master'
Some MacOS tidying

See merge request OpenMW/openmw!4905
2025-09-14 01:18:50 +03:00
Alexei Kotov 0d260b3c8a Add German translations for OMWCombat 2025-09-14 00:44:05 +03:00
psi29a 28a540d5fd Merge branch 'googleenpassant' into 'master'
Add some missing French translations

See merge request OpenMW/openmw!4918
2025-09-13 13:22:16 +00:00
AnyOldName3 fe97e3c888 Move brew repair and update to architecture-independent script
It installs things now, so these commands are useful.
2025-09-12 18:09:12 +01:00
Alexei Kotov 0471b98436 Add French translations for Doppler factor lines 2025-09-12 12:59:20 +03:00
Alexei Kotov e70eb1e2e1 Add French lines for OMWCombat 2025-09-12 12:59:20 +03:00
Kuyondo 4168b6d02e less restrictive probes and lockpicks equipping too 2025-09-11 22:08:58 +08:00
psi29a 9257beea4e Merge branch 'bmdhacks-controller-deslect-bug' into 'master'
Controller tooltip display preferences survive mouse movement

See merge request OpenMW/openmw!4858
2025-09-09 21:00:56 +00:00
Alexei KotovandGitLab 8074331637 Merge branch 'gamepadactionl10n' into 'master'
Translate gamepad actions, part 3

See merge request OpenMW/openmw!4916
2025-09-08 19:40:20 +03:00
Alexei Kotov b3f4287bca Update Swedish Interface lines 2025-09-06 22:15:08 +03:00
AnyOldName3 aa5510fb46 Use CCache in GitHub Actions build again 2025-09-06 17:55:09 +01:00
bmdhacks 072504d3b7 fixed a tooltip bug in spell creation and made controller tooltip toggling a helper function in the window manager 2025-09-06 09:50:27 -07:00
Evil EyeandGitLab 1403fbce1b Merge branch 'flatpak-paths' into 'master'
Document Flatpak paths

See merge request OpenMW/openmw!4884
2025-09-06 09:39:42 +00:00
AnyOldName3 998c738ed0 Add some options from the Windows script to the MacOS script
Hopefully, they might even work, too.

Also move ccache installation to the CI script as it's not mandatory to use ccache for local builds.
2025-09-06 01:29:44 +01:00
AnyOldName3 98bb4af0cb Use correct shebang
[[ doesn't work in real sh, only in more advanced shells pretending to be sh.
2025-09-06 01:07:02 +01:00
AnyOldName3 0a2c929a76 Don't meddle with people's git settings
I can't see any reason for this to have been necessary in CI in the first place as we do CI runs for commits on a branch, not for a detached head.
Despite that, I've left it in the Linux and Android scripts as we don't suggest anyone runs those on their own machines.
2025-09-06 00:56:46 +01:00
AnyOldName3 ff60b741a7 Move architecture-independent tool installation to common script 2025-09-06 00:51:52 +01:00
Alexei Kotov 9a92904f11 Use l10n for inventory offer action 2025-09-05 10:11:10 +03:00
Alexei Kotov 1740e6bac4 Use l10n for stats window scroll down action 2025-09-05 10:00:15 +03:00
Alexei Kotov 3159c363a1 Use l10n for trading menu offer action 2025-09-05 09:49:05 +03:00
Alexei Kotov bd4d844b87 Use l10n for repair gamepad actions 2025-09-05 09:33:22 +03:00
Alexei Kotov b7d9d01cc8 Use l10n for wait dialog gamepad actions 2025-09-05 09:29:34 +03:00
Alexei Kotov 1ab32749ee Use l10n for travel travel window action 2025-09-05 09:20:16 +03:00
Alexei Kotov 43617286fb Use l10n for scroll down scroll gamepad action 2025-09-05 09:16:21 +03:00
bmdhacks 81fc72a5b8 clang-format 2025-09-04 18:30:35 -07:00
bmdhacks cf51812a6f Controller cursor highlight fixes
This resolves two issues:
1) Ensure that cursor tooltips stay displayed when buying spells or selling or consuming items and any other place where actions can highlight new items.
2) Ignore small mouse movements if we've just warped the mouse pointer a long distance.  This resolves an issue where slight cursor wiggle will trigger after changing the dpad highlight.
2025-09-04 18:12:58 -07:00
bmdhacks 12aef44fe1 Controller tooltip display preferences survive mouse movement 2025-09-04 18:12:58 -07:00
AnyOldName3 c70a7cd15b Eliminate single-line ccache scripts
They used to be necessary because they selected CMake of the same architecture as the build target, but now we use native ccache, they don't do anything meaningful.

Make things consistent with other platforms and just call ccache directly in the CI script.
2025-09-05 01:01:41 +01:00
AnyOldName3 6cdcbd957a And the same with CMake 2025-09-05 00:56:36 +01:00
AnyOldName3 a4be773e9c Native ccache won't work if we insist on an architecture 2025-09-05 00:56:36 +01:00
AnyOldName3 3bf68d44b7 Try using native CMake and CCache
In principle, CMake should be able to cross-compile just fine and CCache shouldn't care.
Maybe homebrew meddles with the default configuration and this will break things, though.
We shall see.
2025-09-05 00:55:52 +01:00
AnyOldName3 9fe8f3b03c Attempt to use Qt not necessarily from brew
The homebrew package should add qmake to the path, and qmake knows where Qt is.
If this works for brew, it should work for not-brew, too.

This *might* give a trailing /lib on the path CMake sees, but CMake implicitly tries adding a /lib suffix to paths in CMAKE_PREFIX_PATH, so this shouldn't make a difference to anything.
2025-09-05 00:55:52 +01:00
AnyOldName3 f155b0199e Undo part of !4759
https://gitlab.com/OpenMW/openmw/-/merge_requests/4759#note_2606465930 was marked as resolved without really being resolved, so bypassed normal review and was merged prematurely.

We tell developers to run these scripts on their machines, so it's rude to install things we don't have to over the top of an existing installation.
If the existing installation was via brew via the default sources, then it's clever enough not to break things, but if it's using custom sources or the install is outside of brew, it'll either break or overwrite what's there.

The three tools we've historically checked before overwriting all have an upstream MacOS distribution that isn't through brew, so it's decently likely that they exist, and we've never agreed to drop support for them.

I went a little further than the original code:
* I added a check before overwriting brew itself.
  I don't know whether the install script would notice this anyway.
* I added a check to ensure it's specifically Qt 6.x that's already installed as we dropped support for Qt 5.
* I added the checks back to both scripts even though !4759 only removed them from one.
  There only used to be one script, and when it was split, the checks only made it to one copy.

I could have gone further by adding checks for other tools before we install them, but we didn't have these in the past and I couldn't be bothered.

Try ARCHPREFERENCE environment variable

Go back to using subshell

ARCHPREFERENCE won't retroactively relaunch the current shell.

Also use /usr/local/bin/brew as the x86_64 version we just installed isn't added to the path by default.

Fresh shell for brew installer?

escape things better

This commit message was very nearly just emoji or a rant about sh-compatible shells.

what is going on?

Nested quotes?
2025-09-05 00:55:52 +01:00
Alexei Kotov cac8d59db9 Use l10n for journal gamepad actions 2025-09-05 00:44:58 +03:00
Alexei KotovandGitLab 1dbd5fd571 Merge branch 'macos-ci-fixes' into 'master'
MacOS CI fixes and cleanup

See merge request OpenMW/openmw!4913
2025-09-04 23:44:13 +03:00
Alexei KotovandGitLab 4252098919 Merge branch 'gamepadactionl10n' into 'master'
Translate gamepad actions, part 2

See merge request OpenMW/openmw!4907
2025-09-04 23:41:28 +03:00
Evil Eye 0df0ad9c1c Deduplicate event handling code 2025-09-03 22:17:22 +02:00
Alexei Kotov 9af71e9575 Merge branch 'unpublished' into 'master'
Don't publish release tag prereleases automatically

See merge request OpenMW/openmw!4911
2025-09-03 19:13:55 +03:00
Alexei Kotov 975e8d7412 Merge branch 'derefkarstaag' into 'master'
Don't dereference a potential end iterator

See merge request OpenMW/openmw!4912
2025-09-03 19:13:23 +03:00
Kuyondo d78480120d readable if statement 2025-09-03 16:30:36 +08:00
Sarah Sunday 68d0dff890 [CI] Check for cmake for arm, move s3cmd out of arch specific flow 2025-09-02 19:54:38 -05:00
Sarah Sunday 180287dd80 [CI] Do not use ccache executable path, just ref directly 2025-09-02 19:54:38 -05:00
Sarah Sunday 5dfb4994b0 [CI] Rename/fix mac ccache file 2025-09-02 19:54:38 -05:00
Evil Eye 55287a6efe Merge branch 'clang_tidy_19' into 'master'
Use clang-tidy 19

See merge request OpenMW/openmw!4901
2025-09-02 18:46:48 +00:00
Evil Eye 63eebac784 Merge branch 'castStatic' into 'master'
Fix Lua example

See merge request OpenMW/openmw!4910
2025-09-02 18:46:44 +00:00
Evil Eye 3ec0812b91 Don't reference a potential end iterator 2025-09-02 17:39:35 +02:00
Alexei Kotov a36fbc93b2 Don't publish release tag prereleases automatically 2025-09-02 09:40:59 +03:00
Evil Eye d0f7152839 Fix Lua example 2025-09-01 22:28:13 +02:00
Alexei Kotov 2e18809ed9 Merge branch 'apply_xtra_data_after_drawable_properties' into 'master'
Distortion effect related fixes

See merge request OpenMW/openmw!4904
2025-09-01 21:57:31 +03:00
Evil Eye 14e1ec6d87 Use pathhelpers to populate Collections 2025-09-01 17:57:44 +02:00
Evil Eye 2105e98d0a Use std::string_view in collections 2025-09-01 17:08:33 +02:00
Alexei Kotov 253ac42520 Use newly exposed UI action lines in more menus 2025-09-01 18:00:54 +03:00
Alexei Kotov ea3240ce03 Merge branch 'vfs_normalized_path_23' into 'master'
Use normalized path in Lua vfs bindings (#8138)

See merge request OpenMW/openmw!4903
2025-09-01 15:06:27 +03:00
Alexei Kotov 77f36dcdac Merge branch 'gamepadactionl10n' into 'master'
Translate gamepad actions, part 1

See merge request OpenMW/openmw!4888
2025-09-01 15:06:02 +03:00
Cody Glassman f9f61b8189 make sure distortion respects alpha correctly 2025-08-31 12:02:11 -07:00
Cody Glassman f2a82701b4 make sure we apply extra data statesets at right time 2025-08-31 11:16:54 -07:00
psi29a 92b7ed5964 Merge branch 'waste-of-time' into 'master'
Disable expensive post-cull bounds calculations that never help very much

See merge request OpenMW/openmw!4894
2025-08-31 18:01:51 +00:00
psi29a 0abbc9060d Merge branch 'parallax' into 'master'
Don't overcorrect parallax Y

See merge request OpenMW/openmw!4892
2025-08-31 18:00:42 +00:00
psi29a 1d08d3b900 Merge branch 'itemusage' into 'master'
Drop objects that cannot be equipped after Lua lets us equip them (#8675)

Closes #8675

See merge request OpenMW/openmw!4870
2025-08-31 18:00:29 +00:00
psi29a 0ab79c4370 Merge branch 'formatcomponents' into 'master'
Remove StringUtils::format from components

See merge request OpenMW/openmw!4880
2025-08-31 17:59:35 +00:00
psi29a b0a27fd041 Merge branch 'encumbrance' into 'master'
Properly detect overencumbrance for zero capacity again

See merge request OpenMW/openmw!4883
2025-08-31 17:59:24 +00:00
Kuyondo ff40de89aa less restrictive ammo usage 2025-08-31 18:14:49 +08:00
Alexei Kotov c8eb28331a Merge branch 'changelogsync' into 'master'
Sync changelog

See merge request OpenMW/openmw!4897
2025-08-31 05:54:13 +03:00
elsid f9907058e2 Use clang-tidy 19 2025-08-30 15:23:23 +02:00
Evil Eye 5d4fc96062 Bump us up to 0.51 2025-08-30 14:21:31 +02:00
Evil Eye e520f5f4d0 Sync changelog for 0.50.0 2025-08-30 11:04:27 +02:00
Evil Eye a0863290be Merge branch 'rm_small_tu' into 'master'
Remove small translation units

See merge request OpenMW/openmw!4895
2025-08-30 07:45:30 +00:00
elsid 1348065be3 Use normalized path in Lua vfs bindings 2025-08-29 22:47:00 +02:00
Nelsson Huotari 5b01ca99f8 Merge branch 'smoothheightcrashesagain' into 'master'
Editor: Fix crash if the smoothed terrain vertex belongs to an unloaded cell (#8686)

Closes #8686

See merge request OpenMW/openmw!4891
2025-08-29 20:06:34 +00:00
Alexei Kotov 4c1fdb8dec Update Swedish Interface lines again 2025-08-29 12:50:14 +03:00
elsid dea69b229c Remove small translation units
Remove .cpp files with small amount of code which don't have additional
includes compared to corresponding .hpp files. This reduces the total
size of preprocessed code of the project and should reduce compilation
time.
2025-08-29 00:41:47 +02:00
Alexei Kotov 641e1fa3a2 Update Polish Interface lines 2025-08-28 16:41:33 +03:00
Alexei Kotov a89a6cfd5c Update Swedish Interface lines 2025-08-28 16:41:33 +03:00
Alexei Kotov 60d31e978a Merge branch 'parameter_naming' into 'master'
Fix and enforce parameter naming (#8424)

See merge request OpenMW/openmw!4890
2025-08-28 14:10:44 +03:00
Alexei Kotov 15b9d70cbe Merge branch 'fargoths_lost_weather_ring' into 'master'
Make most weather bindings read/write

See merge request OpenMW/openmw!4866
2025-08-28 03:22:34 +03:00
Cody GlassmanandAlexei Kotov bfc25a3194 Make most weather bindings read/write 2025-08-28 03:22:33 +03:00
AnyOldName3 48e5358587 Disable expensive post-cull bounds calculations that never help very much 2025-08-27 23:57:07 +01:00
Alexei Kotov 35cc6e6daf Editor: Fix crash if the smoothed terrain vertex belongs to an unloaded cell (#8686) 2025-08-27 16:30:56 +03:00
elsid 0f36b7fc97 Fix and enforce parameter naming 2025-08-27 12:45:09 +02:00
Alexei Kotov f339998a78 Update German Interface translations 2025-08-27 04:40:15 +03:00
Alexei Kotov 12b2887e58 Fix build 2025-08-27 04:22:17 +03:00
Alexei Kotov 49d769cb7e Update English/French/Russian Interface translations
Rename Soul line to be more generic and appropriate to the contents
2025-08-27 03:36:07 +03:00
Alexei Kotov d3f2607d34 Expose dialogue and enchanting actions to l10n 2025-08-27 03:36:07 +03:00
Alexei Kotov 0b99fafd01 Expose class dialog, companion and container actions to l10n 2025-08-27 03:36:07 +03:00
Alexei Kotov cc541ec0eb Expose alchemy, birthsign and book actions to l10n 2025-08-27 03:36:07 +03:00
Evil Eye e88e60f475 Check length before dereferencing 2025-08-26 18:08:38 +02:00
psi29a 0c95d62e89 Merge branch 'necromanticnightmare' into 'master'
Don't add magic effects to dead actors

Closes #8680

See merge request OpenMW/openmw!4882
2025-08-26 06:55:47 +00:00
AnyOldName3 44a14f9a88 Fix #8681, too 2025-08-25 16:37:03 +01:00
Evil Eye 79a1f1c3d2 Address feedback 2025-08-25 16:46:04 +02:00
psi29a 5fa6325695 Merge branch 'iternomore' into 'master'
Remove journal iterator methods

See merge request OpenMW/openmw!4865
2025-08-25 07:24:36 +00:00
Alexei Kotov b011b81d77 Don't overcorrect parallax Y 2025-08-25 10:22:42 +03:00
Alexei Kotov 944925663d Merge branch 'dontreplacedepth' into 'master'
Don't run osg::Depth replacement visitor for NIF templates

See merge request OpenMW/openmw!4876
2025-08-25 09:15:20 +03:00
Alexei Kotov b590cd3421 Merge branch 'shuriken' into 'master'
Pass ammo to Hit handler by record id

Closes #8664

See merge request OpenMW/openmw!4879
2025-08-25 09:14:51 +03:00
AnyOldName3 8dc93e8e55 Document Flatpak paths 2025-08-25 01:04:20 +01:00
Alexei Kotov 23ef33b08f Properly detect overencumbrance for zero capacity again 2025-08-24 23:18:32 +03:00
Alexei Kotov bb1b1b08b9 Merge branch 'no_xtra_fries' into 'master'
Remove unnecessary visitor for extra effects

See merge request OpenMW/openmw!4877
2025-08-24 21:57:40 +03:00
Evil Eye 49de215112 Don't add magic effects to dead actors 2025-08-24 19:03:53 +02:00
Evil Eye e97542a487 Fix include 2025-08-24 16:11:34 +02:00
Evil Eye 44fe703827 Use correct string types in SettingsWindow 2025-08-24 16:05:41 +02:00
Evil Eye 2321086876 Replace StringUtils::format in components/misc 2025-08-24 16:01:17 +02:00
Evil Eye 9cce6bad68 Replace StringUtils::format in components/shader 2025-08-24 15:43:11 +02:00
Evil Eye ecbc3a7b9e Reduce string usage in ShaderManager 2025-08-24 15:40:55 +02:00
Evil Eye 924d591158 Replace StringUtils::format in components/sceneutil 2025-08-24 14:35:44 +02:00
Evil Eye 26e562490f Replace StringUtils::format in components/lua 2025-08-24 14:28:17 +02:00
Evil Eye 58a232d6c7 Replace StringUtils::format in components/interpreter 2025-08-24 14:07:41 +02:00
Evil Eye a0d081adb9 Replace StringUtils::format in components/detournavigator 2025-08-24 13:55:33 +02:00
Evil Eye a4375cfd8d Remove unused include 2025-08-24 10:02:22 +02:00
Evil Eye 52adca2291 Change Class::onHit to take a weapon id 2025-08-24 09:45:20 +02:00
Evil Eye 592b648c3e Pass ammo to Hit handler by record id 2025-08-23 21:56:38 +02:00
Evil Eye 0ab0e9abd7 Add format tests 2025-08-23 19:51:31 +02:00
Cody Glassman d72451da62 remove unecassary visitor for soft particles 2025-08-23 09:09:18 -07:00
Alexei Kotov 2b7f775ffe Merge branch 'weatherrecord' into 'master'
Fix weather type in docs

See merge request OpenMW/openmw!4875
2025-08-23 18:50:42 +03:00
Evil Eye 06ef34cbdf Bring messagebox format parsing more in line with printf/vanilla 2025-08-23 17:26:18 +02:00
psi29a 14d9be7885 Merge branch 'thegaidenshinjieffect' into 'master'
Use std::string_view and std::format in components/fx

See merge request OpenMW/openmw!4857
2025-08-23 09:54:09 +00:00
psi29a c687a7fd79 Merge branch 'parseconv' into 'master'
Use std::from_chars in MessageFormatParser

See merge request OpenMW/openmw!4867
2025-08-23 09:53:51 +00:00
Evil Eye 9d63c34c47 Reuse quest name 2025-08-23 11:00:49 +02:00
Alexei Kotov 47130e2155 Don't run osg::Depth replacement visitor for NIF templates 2025-08-23 09:19:42 +03:00
Evil Eye 23460f59c9 Merge branch 'newnamehail' into 'master'
Amend Authors.MD to reflect

See merge request OpenMW/openmw!4874
2025-08-22 15:16:27 +00:00
Evil Eye 567ceccd8f Fix weather type in docs 2025-08-22 17:13:48 +02:00
SkyHasACat b90e19b242 New name 2025-08-22 07:54:38 -07:00
SkyHasACat 13711a631e New name 2025-08-22 07:54:00 -07:00
Alexei Kotov 601b4cb6b1 Merge branch 'thewayisshut' into 'master'
Check for nullptr before dereferencing pathgrids

Closes #8663

See merge request OpenMW/openmw!4849
2025-08-22 07:57:14 +03:00
Alexei Kotov e0d51d42e8 Correct some weapon equipment discrepancies
Use the right message and don't disable sound for forced equipment
2025-08-22 07:27:39 +03:00
Alexei Kotov 8232c473d0 Drop objects that cannot be equipped *after* Lua lets us equip them (#8675)
Ensure broken weapons/armor are dropped
2025-08-22 05:41:25 +03:00
Evil Eye d66b86f2c9 Implement missing hex float format options 2025-08-21 22:00:00 +02:00
Evil Eye 59753d8b8e Leave from_chars to figure out the length 2025-08-21 09:42:02 +02:00
Evil Eye 86605f3531 Make 0-width precision be 0 2025-08-21 08:57:00 +02:00
Evil Eye 8caf68ad30 Count pathgrids with 0-1 nodes as non-existent 2025-08-20 21:47:57 +02:00
Evil Eye 6453d3e201 Use std::from_chars in MessageFormatParser 2025-08-20 19:51:02 +02:00
Evil Eye 15eecec196 Remove journal iterator methods 2025-08-20 17:39:12 +02:00
Alexei Kotov 4fd9e5b2bb Merge branch 'fix_shadow_warning' into 'master'
Add and fix -Wshadow

See merge request OpenMW/openmw!4859
2025-08-20 18:31:37 +03:00
Alexei Kotov ecd039ac63 Merge branch 'lambdasareapathwaytomanyabilitiessomeconsidertobeunnatural' into 'master'
Require cell arguments for Lua weather functions

Closes #8666

See merge request OpenMW/openmw!4853
2025-08-20 11:00:31 +03:00
Evil Eye 9f583dd830 Merge branch 'teal_update' into 'master'
Resolve type name conflicts for the Teal update

See merge request OpenMW/openmw!4863
2025-08-19 15:58:38 +00:00
psi29a 3124e978ab Merge branch 'sv-fixes-aug-25' into 'master'
Small fixes to sv in the launcher

See merge request OpenMW/openmw!4856
2025-08-19 11:57:43 +00:00
psi29a 792e494335 Merge branch 'theimpossibletrap' into 'master'
Don't use ESM::Spell::mData::mCost directly

See merge request OpenMW/openmw!4854
2025-08-18 19:26:33 +00:00
psi29a 54b130c5aa Merge branch 'formattedtooltips' into 'master'
Use std::string_view and std::format in MWGui::ToolTips

See merge request OpenMW/openmw!4855
2025-08-18 19:26:16 +00:00
psi29a 80ac098e28 Merge branch 'magicfiltering' into 'master'
Apply filtering settings to overriding textures (#8560)

Closes #8560

See merge request OpenMW/openmw!4860
2025-08-18 19:26:01 +00:00
elsid 3067294f0d Add and fix -Wshadow 2025-08-18 21:09:06 +02:00
Evil Eye a6c942b33a Account for numeric precision and infinities. Also pretend to be more like GLSL 2025-08-18 19:52:28 +02:00
Alexei Kotov 4f22f24420 Merge branch 'fix_cv_handling' into 'master'
Check if reload cells aborted before cv wait

See merge request OpenMW/openmw!4862
2025-08-18 15:44:58 +03:00
Alexei Kotov f1d60ed427 Merge branch 'master' into 'master'
added polish translation

See merge request OpenMW/openmw!4703
2025-08-18 12:54:02 +03:00
uramer c11ff30b0a Switch to OpenMW's group luadocumentor repo 2025-08-18 09:32:15 +00:00
Igilq 5c75e9a123 fix 2025-08-18 11:00:49 +02:00
Alexei Kotov 16ea2a13cd Merge branch 'mynullptrui' into 'master'
Remove MyGUI define that hasn't existed since 3.4.1

See merge request OpenMW/openmw!4861
2025-08-18 10:49:23 +03:00
Igilq 403ca346d7 fix 2025-08-18 08:43:38 +02:00
uramer 676047a9e3 Switch to openmwluadocumentor with Teal interfaces 2025-08-17 18:08:19 +02:00
uramer 7560229f1f Fix type and name conflicts 2025-08-17 14:11:39 +02:00
elsid d84c81a85d Check if reload cells aborted before cv wait
If mAbortReloadCells is set to true before the first mReloadCellsMutex
lock the loop can become infinite. Unlikely to happen in practice but
theoretically possible.
2025-08-17 12:44:15 +02:00
Evil Eye 6ff2a007fd Fix parameter names 2025-08-17 11:55:05 +02:00
Evil Eye 3f2fd06514 Work around Apple Clang 2025-08-17 11:26:30 +02:00
Evil Eye 92b9d27515 Remove MyGUI define that hasn't existed since 3.4.1 2025-08-17 10:06:07 +02:00
Igilq 47fbd801aa fix 2025-08-17 09:19:37 +02:00
Evil Eye 5f3f3a7e1d Address feedback 2025-08-17 08:48:04 +02:00
Evil Eye aa9978d720 Expose getCurrentSunLightDirection in interiors and use perfect forwarding 2025-08-17 08:25:05 +02:00
Alexei Kotov f369a2ff85 Apply filtering settings to overriding textures (#8560) 2025-08-17 07:16:06 +03:00
Joakim Berg 1f97172662 tried changing from " to ” 2025-08-16 21:42:00 +02:00
Evil Eye 86e40f5b6b Remove potential sources of UB 2025-08-16 14:01:21 +02:00
Evil Eye 55c72ecb29 Use string_view in components/fx 2025-08-16 13:49:07 +02:00
Evil Eye cf3d0b7dd3 Use std::format in components/fx 2025-08-16 13:46:34 +02:00
Igilq 95619f87a3 lupdate fix 2025-08-16 12:34:10 +02:00
Igilq a67d681b0b 2/2 of translation 2025-08-16 11:48:31 +02:00
Evil Eye b7997a5e88 Use a simpler way of formatting floats 2025-08-16 11:33:58 +02:00
Joakim Berg f073d021b7 Update file launcher_sv.ts 2025-08-16 10:43:29 +02:00
Joakim Berg d5b9e26182 small fixes to be consisten 2025-08-16 10:33:51 +02:00
Evil Eye eb01a302f1 Use a custom formatter to limit float precision 2025-08-16 09:22:54 +02:00
Evil Eye d4a1061354 Use std::string_view in MWGui::ToolTips 2025-08-16 09:05:54 +02:00
Evil Eye 6150fe81c7 Use std::format in MWGui::ToolTips 2025-08-16 09:02:03 +02:00
Evil Eye e4adf9e064 Don't use ESM::Spell::mData::mCost directly 2025-08-15 16:29:13 +02:00
Alexei Kotov 9610be7c8a Merge branch 'coveritymovesme' into 'master'
Address more simple Coverity defects

See merge request OpenMW/openmw!4851
2025-08-15 16:14:31 +03:00
Alexei Kotov 2b403b38be Merge branch 'changelog' into 'master'
Sync changelog

See merge request OpenMW/openmw!4852
2025-08-15 16:13:58 +03:00
Evil Eye ead19d099a Require cell arguments for Lua weather functions 2025-08-15 13:17:17 +02:00
Igilq 175f3a6562 part 1/2, needed to switch pc 2025-08-15 11:51:13 +02:00
psi29a ac2627a7b7 Merge branch 'regions_lua' into 'master'
Add regions record store in lua

Closes #7879

See merge request OpenMW/openmw!4743
2025-08-15 07:12:17 +00:00
psi29a 8622dacaea Merge branch '8551-orang-kk' into 'master'
Fix loss of quick key bindings for temporary or missing items

See merge request OpenMW/openmw!4780
2025-08-15 06:49:51 +00:00
Alexei Kotov 8c18c8460f Sync changelog for 0.50.0 2025-08-14 21:42:01 +03:00
psi29a 72bf7673f4 Merge branch 'formattool' into 'master'
Use std::format in esmtool

See merge request OpenMW/openmw!4841
2025-08-14 16:25:09 +00:00
Alexei Kotov 488f73c5da Merge branch 'bmdhacks-skill-controller-crash' into 'master'
fix a crash in skill selection dialog due to uninitialized controller data

See merge request OpenMW/openmw!4843
2025-08-14 16:37:57 +03:00
Alexei Kotov a049f3c3a8 Merge branch 'bmdhacks-lua-doublepress' into 'master'
Controller Input: Fix Lua dialogs from causing a double-press

See merge request OpenMW/openmw!4844
2025-08-14 15:45:43 +03:00
Evil Eye 8073c59898 Add integration tests 2025-08-14 14:19:20 +02:00
Evil Eye 450f907166 Adjust documentation and bump API revision 2025-08-14 14:01:15 +02:00
Kuyondo bc2f948abe add warning if id of quickkey is non-existent 2025-08-14 19:47:21 +08:00
SkyHasACatandEvil Eye 111d6620a6 Remove index weather 2025-08-14 13:42:52 +02:00
SkyHasACatandEvil Eye 50ebf304c7 Formatting 2025-08-14 13:42:52 +02:00
SkyHasACatandEvil Eye 1b5450557e Don't hardcode weather ids 2025-08-14 13:42:52 +02:00
SkyHasACatandEvil Eye fe48e2c9ae Fixed properly 2025-08-14 13:42:52 +02:00
SkyHasACatandEvil Eye a418e05869 foward declare? 2025-08-14 13:42:52 +02:00
SkyHasACatandEvil Eye 3a9a83b107 Fix sound desc, remove removed field 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 9f2ad18549 Fix formatting 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 475e5522ed Make read only 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 943966d59a Fix more things 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 3d954ed720 Fix review issues 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 046c0a64f2 Revert ID change 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 548fb5fecb Add region sound binding 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 40f26a9495 Use luautil id 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 944985e1ce Fix color 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 0acde006a0 Remove unneeded includes? 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye 5e30e45700 formatting 2025-08-14 13:42:51 +02:00
SkyHasACatandEvil Eye d58545ca39 Add region bindings 2025-08-14 13:42:49 +02:00
Evil Eye cae36d6eec Add remaining default initialisations flagged by Coverity 2025-08-14 13:33:20 +02:00
Kuyondo e226963d0d clear temporary items 2025-08-14 19:28:03 +08:00
Alexei Kotov 32e463945e Merge branch 'settingscrash' into 'master'
Fix some dangling window pointer use on exit

See merge request OpenMW/openmw!4846
2025-08-14 13:52:56 +03:00
Alexei Kotov 37c4277b92 Also don't process controller menu axis navigation events for hidden menus 2025-08-14 13:47:18 +03:00
Alexei Kotov 30bd014bd7 Some controller focus initialization cleanup 2025-08-14 13:43:46 +03:00
Evil Eye 9db9df95e2 Address more simple Coverity defects 2025-08-14 11:19:13 +02:00
Kuyondo 4749ddf586 save lifetime of temporary quickkey items 2025-08-14 15:32:36 +08:00
Igilq d13b9d7f6b Merge branch openmw:master into master 2025-08-13 14:46:34 +00:00
Alexei Kotov cb0316e6be Merge branch 'journal-lua-api' into 'master'
Add Lua API for the player journal text data

Closes #7966

See merge request OpenMW/openmw!4203
2025-08-13 14:58:48 +03:00
Igilq e2c84123b8 fixed some stuff 2025-08-13 12:01:04 +02:00
Igilq 3fc51e254c Merge branch openmw:master into master 2025-08-13 09:59:41 +00:00
Evil Eye 1ffcd3f213 Replace usage of std::distance and std::advance 2025-08-13 11:43:51 +02:00
trav5andEvil Eye cffb045767 Lua journal read access post-review formatting corrected 2025-08-13 11:09:10 +02:00
trav5andEvil Eye 6d0f05e97b Lua journal read access post-review class debug names aligned 2025-08-13 11:09:10 +02:00
trav5andEvil Eye 87819b3e0d Lua journal read access post-review documentation fixes 2025-08-13 11:09:10 +02:00
trav5andEvil Eye 596ee3e8fa Lua journal read access post-review std::distance 2025-08-13 11:09:10 +02:00
trav5andEvil Eye 7f3bc4884e Add Lua API for the player journal text data
This implements #7966 - adds the Lua API read-only access to the player's stored journal text entries (quest & topics data). See the issue ticket for some details on the proposal.
2025-08-13 11:08:10 +02:00
Evil Eye d4bc9696e9 Combine format strings 2025-08-13 09:50:13 +02:00
Evil Eye ace1f7f3d0 Merge branch 'fixkaramunsing' into 'master'
Ensure draganddrop finishes when item is used from it

Closes #8659

See merge request OpenMW/openmw!4847
2025-08-12 21:52:41 +00:00
Evil Eye 33ea16655b Add missing paren and remove unnecessary flushes 2025-08-12 23:38:47 +02:00
Kuyondo 8ea5448112 use find() 2025-08-12 21:24:09 +08:00
Kuyondo 9426a36f5a maintain missing item info in quickkey menu 2025-08-12 21:24:09 +08:00
Evil Eye 4707d7602d Check for nullptr before dereferencing pathgrids 2025-08-12 11:02:10 +02:00
Igilq 930ea09ce1 Merge branch openmw:master into master 2025-08-12 08:14:35 +00:00
psi29a f5d866894e Merge branch 'coverityspam' into 'master'
Resolve a number of Coverity defects

See merge request OpenMW/openmw!4835
2025-08-12 07:59:19 +00:00
psi29a a1d9cbd47c Merge branch 'sounds-page-engoodening' into 'master'
Clean up launcher audio tab formatting

See merge request OpenMW/openmw!4833
2025-08-12 07:50:06 +00:00
psi29a 8f8723e2fc Merge branch 'topurgeornottopurge' into 'master'
Improve parity around spell store based effects

Closes #8309

See merge request OpenMW/openmw!4827
2025-08-12 07:48:41 +00:00
bmdhacks 80a29ab57b bulk initialize controller focus to zero 2025-08-11 17:08:17 -07:00
Kuyondo 41e2282501 fix #8659 2025-08-11 22:16:10 +08:00
Alexei Kotov 2bb1c4810d Fix some dangling window pointer use on exit 2025-08-11 13:52:51 +03:00
epochwonandAlexei Kotov 363a6e0aa0 clean up audio page formatting 2025-08-11 08:13:02 +03:00
bmdhacks d05bb877fe fix a double-press bug where controller input on Lua dialog boxes was being broadcast down into whatever the last open dialog box was. 2025-08-10 17:27:36 -07:00
bmdhacks 1b34248ef6 fix a crash in skill selection dialog due to uninitialized controller data 2025-08-10 17:05:37 -07:00
AnyOldName3 d4f18c6478 Ask for zero alpha bits for the CS
This *might* fix https://gitlab.com/OpenMW/openmw/-/issues/8270, but I couldn't repro it.

When I debugged it, the default value was 0xFFFFFFFF, which hopefully is a magic *don't care* value and asking for zero gives us exactly zero rather than at least zero.
However, it might just mean *as much as possible*, in which case zero might still mean *at least zero* and sometimes end up not being zero.
2025-08-10 18:33:56 +01:00
Evil Eye a7ba54c361 Use std::format in esmtool 2025-08-10 12:03:34 +02:00
Igilq e53394903b Merge branch openmw:master into master 2025-08-07 20:26:58 +00:00
Evil Eye a30b4ad615 Undo changes to nifkey.hpp 2025-08-07 20:57:40 +02:00
Alexei Kotov b5f87a9d50 Merge branch 'fix_ppa_build_failure_ButtonDefinition' into 'master'
Fix PPA GCC-15 build failure with ButtonDefinition

See merge request OpenMW/openmw!4837
2025-08-07 21:13:27 +03:00
Bret Curtis 23fb414fd4 use std::string_view instead 2025-08-07 17:18:53 +02:00
Bret Curtis 7ff139e7b1 Fix PPA GCC-15 build failure with ButtonDefinition 2025-08-07 15:45:41 +02:00
Igilq 6bfb8f39be Merge branch openmw:master into master 2025-08-07 11:46:51 +00:00
psi29a d46e68a4d5 Merge branch 'unawarenesstraining' into 'master'
Cache awareness rolls for 5 seconds to make sneaking easier

See merge request OpenMW/openmw!4434
2025-08-07 08:13:50 +00:00
psi29a dd654e62f8 Merge branch 'scheduledinterruption' into 'master'
Don't auto cancel jobs that only run when scheduled

See merge request OpenMW/openmw!4834
2025-08-07 07:07:45 +00:00
psi29a 25adab1526 Merge branch 'fix_build' into 'master'
Fix build with msvc

See merge request OpenMW/openmw!4836
2025-08-07 07:06:29 +00:00
elsid 2b88a620f5 Fix build with msvc
openmw\apps\openmw\mwgui\controllerbuttonsoverlay.hpp(75): error C2079: 'MWGui::ControllerButtonsOverlay::mButtons' uses undefined class 'std::array<MWGui::ControllerButtonsOverlay::ButtonWidgets,15>'
2025-08-06 22:19:49 +02:00
Igilq 50388bdba6 Merge branch openmw:master into master 2025-08-06 19:08:09 +00:00
Evil Eye a085036a92 Resolve a number of Coverity defects 2025-08-06 19:52:09 +02:00
Evil Eye 60d5e4d30b Merge branch 'local_variable_naming' into 'master'
Fix and enforce local variable naming (#8424)

See merge request OpenMW/openmw!4832
2025-08-06 17:50:33 +00:00
Evil Eye 8c3757a324 Don't auto cancel jobs that only run when scheduled 2025-08-06 16:36:07 +02:00
Igilq f2a0804207 small patch 2025-08-06 16:28:39 +02:00
Igilq af47d8bf7d added new translation stuff 2025-08-06 13:03:30 +02:00
Igilq cf5eb9cd63 Merge branch openmw:master into master 2025-08-06 08:56:12 +00:00
Alexei Kotov 5ad9010e07 Merge branch 'dont-take-away-my-individuality' into 'master'
FIX: Track the highest local refNum during plugin loading and increment it for each cloned/created reference

Closes #8620

See merge request OpenMW/openmw!4781
2025-08-06 09:53:06 +03:00
Alexei Kotov 34d297969e Merge branch 'master' into 'master'
Gamepad GUI Mode: add (optional) native controller support to all menus [round 2]

See merge request OpenMW/openmw!4741
2025-08-06 09:34:35 +03:00
Andrew Lanzone e4cc3adc98 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-08-05 17:32:50 -07:00
Andrew Lanzone dd801a55e2 Bump OPENMW_LUA_API_REVISION version 2025-08-05 17:31:36 -07:00
Dave Corley d68b774c10 CLEANUP: Don't handle refnums during saving at all 2025-08-05 14:16:44 -07:00
elsid d121b606b6 Fix and enforce local variable naming 2025-08-05 21:27:48 +02:00
Alexei Kotov a69b67a2b1 Merge branch 'nomushroomdataforyou' into 'master'
Don't init custom data when checking container resolution

Closes #8650

See merge request OpenMW/openmw!4831
2025-08-05 21:06:56 +03:00
Evil Eye 4344dc6e00 Don't init custom data when checking container resolution 2025-08-05 19:10:48 +02:00
psi29a aca6532044 Merge branch 'createnewpeople' into 'master'
Allow creating new NPC records via lua

See merge request OpenMW/openmw!4825
2025-08-05 07:25:07 +00:00
Igilq 0eabdd05ab Merge branch openmw:master into master 2025-08-05 06:22:40 +00:00
Andrew Lanzone c293c76bd7 Remove hardcoded row/column values in some controller menus 2025-08-04 19:10:07 -07:00
Andrew Lanzone 8e76a0ab06 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-08-04 16:44:12 -07:00
SkyHasACat ef2332eb37 Update API, feature 2025-08-04 11:30:47 -07:00
SkyHasACat 493f70a661 Formatting 2025-08-04 11:10:06 -07:00
SkyHasACat e74167c7b7 Revert bad change, do actual fix 2025-08-04 11:09:26 -07:00
SkyHasACat 1a886db951 Merge namespace, remove redundant 2025-08-04 10:41:31 -07:00
Evil Eye 4337ed7683 Use new example suite tests 2025-08-04 19:22:49 +02:00
SkyHasACat 7a5fe778bc Add validation 2025-08-04 10:04:34 -07:00
SkyHasACat aa545467fd Remove unused 2025-08-04 09:56:58 -07:00
SkyHasACat 4c5118a24b Fix rank 2025-08-04 08:43:37 -07:00
SkyHasACat 2ab87f2d22 Use namespace for servicesoffered 2025-08-04 08:35:13 -07:00
SkyHasACat b2746a7b4b Fix autocalc, remove thing 2025-08-04 08:27:26 -07:00
Evil Eye 0c4da49c74 Merge branch 'fix_msvc_warnings' into 'master'
Fix msvc warnings

See merge request OpenMW/openmw!4829
2025-08-04 14:56:59 +00:00
psi29a ef3f52d6a4 Merge branch 'coverity' into 'master'
Fix coverity builds

See merge request OpenMW/openmw!4826
2025-08-04 06:55:06 +00:00
Alexei Kotov aae81264a2 Merge branch 'skibidi-dop-doppler' into 'master'
Doppler, take two

See merge request OpenMW/openmw!4660
2025-08-04 09:24:50 +03:00
SkyHasACat afb7f1da54 Fix formatting 2025-08-03 21:39:44 -07:00
Skyhasacat c71448359b Merge branch '32bitfixes' into 'master'
fix 32bit builds. closes #8625

Closes #8625

See merge request OpenMW/openmw!4791
2025-08-03 21:00:52 +00:00
SkyHasACat 99ae52e94c Add fields to record 2025-08-03 13:42:04 -07:00
psi29a cc2ec85244 Merge branch 'tex' into 'master'
ESM4 landscape texturing

See merge request OpenMW/openmw!4799
2025-08-03 19:56:34 +00:00
SkyHasACat a0585949a9 Remove dead code, fix grammer 2025-08-03 12:50:57 -07:00
SkyHasACat 4a2f85cfde Merge remote-tracking branch 'origin/master' into createnewpeople 2025-08-03 12:14:10 -07:00
Evil Eye c77a849e9e Merge branch 'cleanup_includes' into 'master'
Cleanup includes

See merge request OpenMW/openmw!4828
2025-08-03 19:11:55 +00:00
Evil Eye 485517cf64 Use std::hash 2025-08-03 20:52:22 +02:00
zliceandEvil Eye 0d7efaa2e3 fix 32bit builds 2025-08-03 20:52:22 +02:00
SkyHasACat d7a411cc72 Suggested fixes 2025-08-03 11:44:45 -07:00
unknown 3bf62235ba Restore rules 2025-08-03 20:05:36 +02:00
unknown b6b4e4f102 Use a URL that doesn't require the pipeline to succeed 2025-08-03 18:36:30 +02:00
unknown 7569273b33 Expose cov-int.tar.gz as an artifact and upload its URL 2025-08-03 17:06:47 +02:00
elsid 555a10f50c Fix msvc warnings
openmw\apps\opencs\model\world\idcollection.cpp(65): warning C4457: declaration of 'index' hides function parameter

openmw\apps\openmw\mwscript\miscextensions.cpp(627): warning C4456: declaration of 'effect' hides previous local declaration
2025-08-03 14:22:38 +02:00
psi29a b9a28dab3e Merge branch 'thread_safe_static_init' into 'master'
Do thread safe local static based initialization

See merge request OpenMW/openmw!4822
2025-08-03 10:55:50 +00:00
psi29a fa290956c8 Merge branch 'spellgc' into 'master'
Add Player Gold Counter to Spell Creation Window(Updated)

See merge request OpenMW/openmw!4737
2025-08-03 10:51:25 +00:00
Evil Eye ccb4ca49ca Merge branch 'fix_lua_examples' into 'master'
Fix lua doc example errors and typos

See merge request OpenMW/openmw!4823
2025-08-03 08:56:50 +00:00
SkyHasACat c276f850dc One more fix 2025-08-02 22:49:58 -07:00
SkyHasACat 286c4d9101 a word 2025-08-02 21:40:09 -07:00
SkyHasACat 2abed374f9 Fix missing link 2025-08-02 19:00:12 -07:00
SkyHasACat 7c4ed3c11d Fixing XML? 2025-08-02 15:19:49 -07:00
SkyHasACat ae9c42e0a0 Merge remote-tracking branch 'origin/master' into spellgc 2025-08-02 15:08:25 -07:00
Igilqandm c 8d9b755fbe Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: m c <mc001@protonmail.ch>
2025-08-02 20:45:00 +00:00
Igilqandm c a51f6d1e20 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: m c <mc001@protonmail.ch>
2025-08-02 20:44:48 +00:00
Igilqandm c 6cd765f9bb Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: m c <mc001@protonmail.ch>
2025-08-02 20:44:18 +00:00
Igilqandm c 6e14a16747 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: m c <mc001@protonmail.ch>
2025-08-02 16:56:35 +00:00
Andrew Lanzone 7e9d4795ba Fix range check in journal window 2025-08-02 09:11:30 -07:00
Andrew Lanzone 3147aea0ed Better dead zone handling 2025-08-02 09:00:59 -07:00
SkyHasACat d40a78e8ac Player shennanigans 2025-08-02 06:32:46 -07:00
SkyHasACat 31abd366ff no const 2025-08-02 06:25:14 -07:00
SkyHasACat 7c665643ad Use overload 2025-08-02 06:08:29 -07:00
SkyHasACat 5203f300e2 Requested changes 2025-08-02 05:33:27 -07:00
elsid e87b95f642 Use forward declaration for context and sol 2025-08-02 12:45:03 +02:00
elsid eeca0b13b0 Add missing files to components/detournavigator list 2025-08-02 12:45:03 +02:00
elsid a2bc1569e0 Remove unused includes 2025-08-02 12:45:03 +02:00
Evil Eye 5ea3cca83b Remove spell effects on RemoveSpell 2025-08-02 12:16:46 +02:00
Evil Eye c89f88c4e6 Allow removed abilities to be detected 2025-08-02 12:01:37 +02:00
Evil Eye 550b0c985f Include file 2025-08-02 10:56:50 +02:00
Evil Eye 05f0b4cdbd Use the default clang version in Coverity 2025-08-02 10:50:43 +02:00
psi29a cc68316f72 Merge branch 'lua-jail-skills' into 'master'
Bring jail time skill changes over to lua

Closes #8399

See merge request OpenMW/openmw!4593
2025-08-02 08:39:14 +00:00
Mads Buvik Sandveiandpsi29a 978d8668f4 Bring jail time skill changes over to lua 2025-08-02 08:39:13 +00:00
Evil Eye dbd92e6844 Merge branch 'spacetraining' into 'master'
Training menu fixes (#8584)

Closes #8584

See merge request OpenMW/openmw!4758
2025-08-02 07:04:02 +00:00
Alexei Kotov 4c4d6078d8 Training menu fixes (#8584)
Rework the layout
Use "OK" instead of "Cancel" for the OK button
Add gp to the price
Use entry spacing consistent with other service menus
2025-08-02 03:47:22 +03:00
SkyHasACat 1986891e79 different empty line? 2025-08-01 16:51:10 -07:00
SkyHasACat c139680ce3 Add line 2025-08-01 16:49:19 -07:00
SkyHasACat f2cfaac4b8 Fix clang 2025-08-01 16:46:25 -07:00
SkyHasACat 1fbbaefb47 Remove unrelated change, doc 2025-08-01 16:45:24 -07:00
SkyHasACat 5209685783 revert some changes 2025-08-01 16:40:30 -07:00
SkyHasACat 64a45f8aeb Change world store insert 2025-08-01 16:30:16 -07:00
SkyHasACat 6464e2a11b remove N 2025-08-01 16:11:32 -07:00
SkyHasACat abb381a163 Fix issues 2025-08-01 16:10:49 -07:00
SkyHasACat 5e64015aa9 Fix typo, remove change 2025-08-01 15:57:31 -07:00
SkyHasACat 2cd4b643d0 npc stuff 2025-08-01 15:18:55 -07:00
epochwon 05d67ef412 swedish lines 2025-08-01 14:47:54 -04:00
Petr Mikheev 0b5c8271e0 ESM4 landscape textures 2025-08-01 18:45:24 +02:00
SkyHasACat 929a65126a Fix docs 2025-08-01 08:25:02 -07:00
elsid 0801e0512d Do thread safe local static based initialization 2025-08-01 11:48:35 +02:00
Igilq 65b9cea9ba Merge branch openmw:master into master 2025-08-01 09:09:34 +00:00
psi29a b160cee0b7 Merge branch 'sonarview' into 'master'
Address string_view conversions flagged by SonarQube

See merge request OpenMW/openmw!4693
2025-08-01 08:06:36 +00:00
psi29a 2a8dc56619 Merge branch 'pedanticmsvc' into 'master'
Resolve unused code warnings when compiling in Debug mode using MSVC

See merge request OpenMW/openmw!4820
2025-08-01 08:06:11 +00:00
Andrew Lanzone 2e5836a748 Remove hardcoded map size 2025-07-31 23:58:00 -07:00
Igilq 26b508b11f Merge branch openmw:master into master 2025-08-01 06:03:07 +00:00
Igilq 2d8fdcfa7b updated translations and fixed some mistakes 2025-08-01 08:01:12 +02:00
Andrew Lanzone d49a6a119b Fix clang warnings 2025-07-31 22:27:31 -07:00
Andrew Lanzone f453ce27a0 Remove uses of std::variant and std::holds_alternative because they're not supported on Ubuntu 2025-07-31 22:22:21 -07:00
Andrew Lanzone 666f154082 Fix clang warnings in Ubuntu 2025-07-31 22:13:56 -07:00
Skyhasacat 04f42f12e1 Merge branch 'onUpdate' into 'master'
Run onUpdate when the game is paused

Closes #8012

See merge request OpenMW/openmw!4487
2025-08-01 02:11:21 +00:00
Andrei KortunovandAlexei Kotov 645eb81133 Run onUpdate when the game is paused 2025-08-01 04:18:03 +03:00
Andy Lanzone 59aba3ae7e Merge branch openmw:master into master 2025-07-31 18:02:10 -07:00
Andrew Lanzone a134f8d882 Fix clang warning 2025-07-31 18:01:08 -07:00
Andrew Lanzone 5de1ae7b24 Simplify controller button overlay even more 2025-07-31 17:52:35 -07:00
Andrew Lanzone 23e3d0b49a Initialize inventory tabs in a loop 2025-07-31 17:50:14 -07:00
epochwon b792bc0ee2 fixes + russian line 2025-07-31 11:14:08 -04:00
psi29a 405388b89f Merge branch 'scripteditorplz' into 'master'
Improve multiline script editing

Closes #8579

See merge request OpenMW/openmw!4728
2025-07-31 07:21:06 +00:00
Igilq d3332e1def updated broken stuff 2025-07-31 07:00:29 +02:00
Igilq e5b5c2254d Merge branch 'master' of https://gitlab.com/Igilq/openmw-pl 2025-07-31 06:49:58 +02:00
Igilq e3f09b869e finished translation 2025-07-31 06:45:43 +02:00
Igilq 4351eb02f8 Merge branch 'master' into 'master'
# Conflicts:
#   files/data/CMakeLists.txt
2025-07-31 04:28:37 +00:00
Skyhasacat 27e1a842a0 Merge branch 'partially-dehardcode-onhit' into 'master'
[Lua] Partially dehardcode onHit

See merge request OpenMW/openmw!4334
2025-07-30 20:21:15 +00:00
Mads Buvik SandveiandSkyhasacat 34eb3d485d [Lua] Partially dehardcode onHit 2025-07-30 20:21:15 +00:00
Evil Eye 2efa76052f Merge branch 'master' into 'master'
Update Installation Instructions to include Fedora installation

See merge request OpenMW/openmw!4819
2025-07-30 19:22:56 +00:00
epochwon aae21c6f53 Get physics fps delta time from physics system 2025-07-30 14:51:18 -04:00
Evil Eye bc05628fa8 Resolve unused code warnings when compiling in Debug mode using MSVC 2025-07-30 20:44:59 +02:00
Evil Eye 75845bf863 Work around compiler versions that haven't addressed defect 3865 2025-07-30 19:41:14 +02:00
Evil Eye ee540039a1 Address string_view conversions flagged by SonarQube 2025-07-30 19:37:37 +02:00
Igilq 516280e0b4 Merge branch openmw:master into master 2025-07-30 16:59:34 +00:00
Claire 24c7d2f075 Edit install-openmw.rst 2025-07-30 09:54:54 -07:00
Claire 62492c7738 Edit install-openmw.rst 2025-07-30 09:11:00 -07:00
Claire 442e8796b4 Edit install-openmw.rst 2025-07-30 09:08:56 -07:00
Evil Eye 27ee192354 Set default hotkeys for (un)commenting script lines 2025-07-30 16:58:32 +02:00
Evil Eye aefa0ec1c4 Add multiline (un)indent behaviour to the script editor 2025-07-30 16:58:32 +02:00
epochwon 57280eaf9d Update Doppler description + Russian line 2025-07-30 10:28:41 -04:00
Alexei Kotov 399ec4eccc Merge branch 'qt6' into 'master'
Drop support for Qt5

Closes #8578

See merge request OpenMW/openmw!4742
2025-07-30 13:26:46 +03:00
Andrew Lanzone 582b409f7f Fix right stick from causing mouse to appear in controller mode 2025-07-29 19:29:20 -07:00
Andrew Lanzone 5d5d14a5a6 Fix spurious button presses causing controller tooltip to wiggle 2025-07-29 17:28:52 -07:00
Alexei Kotov b0e8544d58 Merge branch 'addthoseactivespells' into 'master'
Remove minimum duration from continuous effects and add clarification to the docs

Closes #8641

See merge request OpenMW/openmw!4817
2025-07-29 23:36:39 +03:00
Alexei Kotov 0e8ca0cf19 Merge branch 'changelog' into 'master'
Sync changelog

See merge request OpenMW/openmw!4816
2025-07-29 23:36:05 +03:00
Claire b7fe1a6eb2 Edit install-openmw.rst 2025-07-29 11:59:42 -07:00
psi29a b937b0271f Merge branch 'fightthechameleon' into 'master'
Prevent witnesses from ending combat because they didn't get hit

See merge request OpenMW/openmw!4814
2025-07-29 07:43:59 +00:00
Alexei Kotov 45a7040bc7 Merge branch 'fix_tests' into 'master'
Make tests more stable

See merge request OpenMW/openmw!4818
2025-07-29 08:05:58 +03:00
AnyOldName3 7c3fa3c89f Merge branch 'classheader' into 'master'
Some include cleanup

See merge request OpenMW/openmw!4815
2025-07-28 22:35:24 +00:00
Alexei Kotov ebcacf04bc Sync changelog for 0.50.0 2025-07-28 23:12:52 +03:00
elsid 70207750f2 Make tests more stable 2025-07-28 20:23:45 +02:00
Evil Eye 395f6811c9 Remove minimum duration from continuous effects and add clarification to the docs 2025-07-28 18:59:23 +02:00
Igilq 873607af5f place holder files, will be translated 2025-07-28 18:56:53 +02:00
Igilq 3275b357ac Merge branch openmw:master into master 2025-07-28 16:34:40 +00:00
psi29a 176dab5b3d Merge branch 'nomagnitudeforyou' into 'master'
Don't multiply magnitudes for effects that don't have magnitudes

Closes #8540

See merge request OpenMW/openmw!4810
2025-07-28 15:59:13 +00:00
psi29a e304ceb449 Merge branch 'fix_init' into 'master'
Do not copy cell store to count refs

See merge request OpenMW/openmw!4813
2025-07-28 15:58:46 +00:00
psi29a 4efc8bf99d Merge branch 'fix_clang_tidy' into 'master'
Fix clang tidy warnings

See merge request OpenMW/openmw!4811
2025-07-28 15:55:53 +00:00
Alexei Kotov 0a8373987d Merge branch 'aiwander' into 'master'
Build checkpoints based path for wandering actors (#8433)

Closes #8433

See merge request OpenMW/openmw!4652
2025-07-28 00:48:17 +03:00
Andrew Lanzone 7b9958247a Null ControllerButtons pointers are supported; they hide the button overlay 2025-07-27 14:08:13 -07:00
Andy Lanzone 31580ffb71 Merge branch openmw:master into master 2025-07-27 13:21:40 -07:00
Andrew Lanzone dc2ff4bfa2 Rename ControllerButtonStr struct and its internal fields 2025-07-27 13:14:31 -07:00
Alexei Kotov 272e6fabf9 Turn GreetingState into enum class and cut some mechanics manager includes 2025-07-27 23:02:06 +03:00
Andrew Lanzone 9870605aab Update enum defintion for ControllerAction 2025-07-27 12:57:56 -07:00
Andrew Lanzone 2d5ec48892 Fix default return type for getControllerAxisIcon 2025-07-27 12:56:56 -07:00
Evil Eye f6a6a33c59 Prevent witnesses from ending combat because they didn't get hit 2025-07-27 21:12:52 +02:00
Alexei Kotov ee501d8d0d Remove some redundant class header includes 2025-07-27 22:02:02 +03:00
elsid e77ee5c20f Do not copy cell store to count refs 2025-07-27 18:40:39 +02:00
psi29a 2051d5cbef Merge branch 'master' into 'master'
Fixed Unit Test in `apps/openmw_tests/mwworld/testptr.cpp`

See merge request OpenMW/openmw!4807
2025-07-27 16:33:39 +00:00
Claireandpsi29a af58da58fd Fixed Unit Test in apps/openmw_tests/mwworld/testptr.cpp 2025-07-27 16:33:38 +00:00
psi29a d3309e0a8d Merge branch 'vfxdocs' into 'master'
Fix useAmbientLight references in docs

See merge request OpenMW/openmw!4803
2025-07-27 16:33:22 +00:00
psi29a 7637ca536b Merge branch 'turnedwerewolf' into 'master'
Remove completion threshold-based turning for the player (#8447)

Closes #8447

See merge request OpenMW/openmw!4628
2025-07-27 16:32:43 +00:00
psi29a 7aeff7e473 Merge branch 'combatparalysis' into 'master'
Put combat actions on hold when the actor is incapacitated (#7979)

Closes #7979

See merge request OpenMW/openmw!4597
2025-07-27 16:32:22 +00:00
psi29a 02102eeeca Merge branch 'instantmagicjustaddwater' into 'master'
Update effects upon applying them

Closes #7996

See merge request OpenMW/openmw!4124
2025-07-27 16:30:56 +00:00
psi29a c8aa644111 Merge branch 'collisionprediction' into 'master'
Avoid recomputing collision prediction things an extra N times (#8548)

Closes #8548

See merge request OpenMW/openmw!4801
2025-07-27 16:30:11 +00:00
Evil Eye cc6145bc0f Retain global script targets without content files 2025-07-27 17:12:14 +02:00
Evil Eye 35a9a47eac Convert global script targets 2025-07-27 17:04:14 +02:00
Igilq 4abee33a8e Merge branch openmw:master into master 2025-07-27 13:20:15 +00:00
Evil Eye aae954643c Don't multiply magnitudes for effects that don't have magnitudes 2025-07-27 12:47:35 +02:00
elsid c6f381f1c4 Ignore readability-identifier-naming for boost::program_options namespace alias 2025-07-27 12:21:13 +02:00
elsid 8682ea522f Remove unused namespace alias 2025-07-27 12:20:10 +02:00
elsid ec0c76d2f3 Ignore false positive warning
cellSize > 1 so the result of the division cannot be undefined.

/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:18:35: error: The result of the '/' expression is undefined [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
   18 |         std::size_t cell = global / (cellSize - 1);
      |                                   ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:13: note: Assuming 'lodLevel' is >= 0
  244 |         if (lodLevel < 0 || 63 < lodLevel)
      |             ^~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:29: note: Assuming 'lodLevel' is <= 63
  244 |         if (lodLevel < 0 || 63 < lodLevel)
      |                             ^~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:244:9: note: Taking false branch
  244 |         if (lodLevel < 0 || 63 < lodLevel)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:247:13: note: Assuming 'size' is > 0
  247 |         if (size <= 0)
      |             ^~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:247:9: note: Taking false branch
  247 |         if (size <= 0)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:272:13: note: Assuming the condition is false
  272 |         if (land != nullptr)
      |             ^~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:272:9: note: Taking false branch
  272 |         if (land != nullptr)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/storage.cpp:363:9: note: Calling 'sampleCellGrid<const (lambda at /home/elsid/dev/openmw/components/esmterrain/storage.cpp:280:35) &>'
  363 |         sampleCellGrid(cellSize, sampleSize, beginX, beginY, distance, handleSample);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:72:13: note: Assuming 'cellSize' is >= 2
   72 |         if (cellSize < 2 || !Misc::isPowerOfTwo(cellSize - 1))
      |             ^~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:72:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:72:9: note: Taking false branch
   72 |         if (cellSize < 2 || !Misc::isPowerOfTwo(cellSize - 1))
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:75:13: note: Assuming 'sampleSize' is not equal to 0
   75 |         if (sampleSize == 0 || !Misc::isPowerOfTwo(sampleSize))
      |             ^~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:75:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:75:9: note: Taking false branch
   75 |         if (sampleSize == 0 || !Misc::isPowerOfTwo(sampleSize))
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:78:13: note: Assuming 'distance' is >= 2
   78 |         if (distance < 2 || !Misc::isPowerOfTwo(distance - 1))
      |             ^~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:78:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:78:9: note: Taking false branch
   78 |         if (distance < 2 || !Misc::isPowerOfTwo(distance - 1))
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:13: note: Assuming 'distance' is >= 'cellSize'
   84 |         if (distance < cellSize || sampleSize > cellSize - 1)
      |             ^~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:13: note: Left side of '||' is false
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:36: note: Assuming the condition is true
   84 |         if (distance < cellSize || sampleSize > cellSize - 1)
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:84:9: note: Taking true branch
   84 |         if (distance < cellSize || sampleSize > cellSize - 1)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:85:20: note: Calling 'sampleCellGridSimple<const (lambda at /home/elsid/dev/openmw/components/esmterrain/storage.cpp:280:35) &>'
   85 |             return sampleCellGridSimple(cellSize, sampleSize, beginX, beginY, endX, endY, f);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:56:16: note: 'cellSize' is > 1
   56 |         assert(cellSize > 1);
      |                ^
/usr/include/assert.h:100:27: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |                           ^~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:56:9: note: '?' condition is true
   56 |         assert(cellSize > 1);
      |         ^
/usr/include/assert.h:100:7: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |       ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:57:9: note: '?' condition is true
   57 |         assert(Misc::isPowerOfTwo(cellSize - 1));
      |         ^
/usr/include/assert.h:100:7: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |       ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:58:16: note: 'sampleSize' is not equal to 0
   58 |         assert(sampleSize != 0);
      |                ^
/usr/include/assert.h:100:27: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |                           ^~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:58:9: note: '?' condition is true
   58 |         assert(sampleSize != 0);
      |         ^
/usr/include/assert.h:100:7: note: expanded from macro 'assert'
  100 |      (static_cast <bool> (expr)                                         \
      |       ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:60:9: note: Calling 'sampleGrid<(lambda at /home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:61:13)>'
   60 |         sampleGrid(sampleSize, beginX, beginY, endX, endY,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   61 |             [&](std::size_t globalX, std::size_t globalY, std::size_t vertX, std::size_t vertY) {
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   62 |                 const auto [cellX, x] = toCellAndLocal(beginX, globalX, cellSize);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   63 |                 const auto [cellY, y] = toCellAndLocal(beginY, globalY, cellSize);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   64 |                 f(cellX, cellY, x, y, vertX, vertY);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   65 |             });
      |             ~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:33:38: note: Assuming 'y' is < 'endY'
   33 |         for (std::size_t y = beginY; y < endY; y += sampleSize)
      |                                      ^~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:33:9: note: Loop condition is true.  Entering loop body
   33 |         for (std::size_t y = beginY; y < endY; y += sampleSize)
      |         ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:42: note: Assuming 'x' is < 'endX'
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |                                          ^~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:13: note: Loop condition is true.  Entering loop body
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |             ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:42: note: Assuming 'x' is < 'endX'
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |                                          ^~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:36:13: note: Loop condition is true.  Entering loop body
   36 |             for (std::size_t x = beginX; x < endX; x += sampleSize)
      |             ^
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:37:17: note: Calling 'operator()'
   37 |                 f(x, y, vertX++, vertY);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:62:41: note: Calling 'toCellAndLocal'
   62 |                 const auto [cellX, x] = toCellAndLocal(beginX, globalX, cellSize);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/elsid/dev/openmw/components/esmterrain/gridsampling.hpp:18:35: note: The result of the '/' expression is undefined
   18 |         std::size_t cell = global / (cellSize - 1);
      |                            ~~~~~~~^~~~~~~~~~~~~~~~
2025-07-27 12:11:24 +02:00
elsid c5d74818eb Disable portability-template-virtual-member-function clang tidy warning
There is no compatibility problem in practice.

/home/elsid/dev/openmw/components/settings/sanitizer.hpp:11:19: error: unspecified virtual member function instantiation; the virtual member function is not instantiated but it might be with a different compiler [portability-template-virtual-member-function,-warnings-as-errors]
   11 |         virtual T apply(const T& value) const = 0;
      |                   ^
/home/elsid/dev/openmw/components/settings/sanitizerimpl.cpp:20:28: note: template instantiated here
   20 |         struct Max final : Sanitizer<T>
      |                            ^
2025-07-27 11:30:07 +02:00
elsid 4433e3c2de Build path over navmesh for wandering actors
Using a path over pathgrid as checkpoints.

This allows to avoid having paths going through obstacles if they are
placed over pathgrid points.
2025-07-27 11:17:17 +02:00
elsid 5dfda0090b Remove redundant cell argument from build path functions
Actor can provide a cell.
2025-07-27 11:17:17 +02:00
elsid 3f1ac1848c Move getClosestPoint to a separate file 2025-07-27 11:17:17 +02:00
elsid 927b2bcceb Replace PathFinder::makeOsgVec3 by Misc::Convert::makeOsgVec3f 2025-07-27 11:17:16 +02:00
elsid 50f5bc51c6 Store allowed positions as osg::Vec3f
There is no need to store pathgrid points.
2025-07-27 11:16:47 +02:00
Evil Eye de68310992 Ignore time travel 2025-07-27 10:47:34 +02:00
Evil Eye 7f6fe15b10 Use local gcovr 2025-07-27 10:47:34 +02:00
Evil Eye bdb3387bff Install gcovr via pipx and disable Werror when building Benchmarks 2025-07-27 10:47:34 +02:00
Evil Eye 2bce45260c Drop support for Qt5 2025-07-27 10:47:34 +02:00
Alexei Kotov 8deb050ea2 Merge branch 'ghversion' into 'master'
Use the new Windows deps on GitHub

See merge request OpenMW/openmw!4808
2025-07-27 11:41:01 +03:00
Alexei Kotov 1896375380 Merge branch 'solarpowered' into 'master'
Update sol

Closes #8591 and #8614

See merge request OpenMW/openmw!4745
2025-07-27 11:38:16 +03:00
Andrew Lanzone 3c3f36679e Re-add ESM include 2025-07-27 00:45:54 -07:00
Andrew Lanzone de057cc030 Update includes on controllermanager 2025-07-27 00:33:57 -07:00
Andrew Lanzone 984582b586 Cleanup includes for itemchargeview 2025-07-27 00:06:05 -07:00
Andrew Lanzone 360c801b73 Remove local wrapper of MyGUI::Scrollbar 2025-07-26 23:54:25 -07:00
Andrew Lanzone 24c7a3f1ce Remove duplicate class declarations 2025-07-26 23:53:57 -07:00
Andrew Lanzone 2a0ff5626c Remove extra include that was inadvertently added 2025-07-26 22:56:47 -07:00
Andrew Lanzone 80dd2ea6da Merge branch 'master' of https://gitlab.com/enoznal/openmw 2025-07-26 22:53:23 -07:00
Andrew Lanzone 8a2888fa00 Replace many includes with forward declarations 2025-07-26 22:53:03 -07:00
Andrew Lanzone 94b460389b Replace many includes with forward declarations 2025-07-26 22:48:35 -07:00
Alexei Kotov d3328552e8 Avoid recomputing collision prediction things an extra N times (#8548) 2025-07-27 07:36:43 +03:00
Alexei Kotov ed32e4405a Merge branch 'optionalglobalism' into 'master'
Remove global config on Windows

Closes #8434

See merge request OpenMW/openmw!4762
2025-07-26 23:25:55 +03:00
Andrew Lanzone b961007345 Fix unsigned type warning/error on Windows 2025-07-26 09:41:26 -07:00
Skyhasacat 9f10269ecc Merge branch 'lua_weather_bindings' into 'master'
lua - add weatherbindings to openmw.core (#6976)

See merge request OpenMW/openmw!4526
2025-07-26 15:01:32 +00:00
Evil Eye e692025579 Use the new Windows deps on GitHub 2025-07-26 16:36:50 +02:00
Sebastian Fieber 534d6b3ae9 typo 2025-07-26 13:39:37 +02:00
elsid 7c46635a5a Make trimAllowedNodes a free function 2025-07-26 11:48:36 +02:00
elsid ae909d7685 Remove isAreaOccupiedByOtherActor from obstacle.*
It uses functions only from World anyway.
2025-07-26 11:48:36 +02:00
elsid c79b39cf0d Remove unused arguments from isAreaOccupiedByOtherActor 2025-07-26 11:48:36 +02:00
elsid 20bd1491a7 Make sure distance and duration are not negative 2025-07-26 11:48:36 +02:00
elsid 4a3ffb2073 Use camel case for variables 2025-07-26 11:48:35 +02:00
Igilq 26b0795c52 small language patch 2025-07-26 09:11:26 +00:00
Evil Eye 4ca9cac784 Don't use cached awareness in combat 2025-07-26 11:05:40 +02:00
Igilq b9ec633bfc Update 2 files
- /files/data/l10n/OMWCamera/pl.yaml
- /files/data/l10n/OMWEngine/pl.yaml
2025-07-26 09:04:10 +00:00
Igilq d10e6dab92 translation updates 2025-07-26 08:58:00 +00:00
Evil Eye b3fe84a560 Cache awareness rolls for 5 seconds to make sneaking easier 2025-07-26 10:55:20 +02:00
Andrew Lanzone ab03e01127 Remove dedicated 'Unequip' button and just us 'A' 2025-07-26 01:35:25 -07:00
Evil Eye b4a753812e Use empty paths instead of optionals 2025-07-26 10:23:19 +02:00
Igilq 0d6c9c2303 Merge branch openmw:master into master 2025-07-26 08:02:24 +00:00
Andrew Lanzone defd1edb6f Fix clang error and unsigned bug 2025-07-26 00:59:43 -07:00
Evil Eye c0b230b742 Remove global config on Windows 2025-07-26 09:45:35 +02:00
Andy Lanzone c015599356 Merge branch openmw:master into master 2025-07-26 00:17:39 -07:00
Andrew Lanzone fb19a0da91 Fix inventory menu getting messed up when resizing game window 2025-07-26 00:16:41 -07:00
Andrew Lanzone 5b5ed21f20 Split journal's onControllerButtonEvent into a few functions 2025-07-25 22:53:39 -07:00
Andrew Lanzone b9ae89e032 Split onControllerButtonEvent into two; loop through ingredient slots 2025-07-25 21:46:00 -07:00
Sebastian Fieber 95fc66bccd adjusments to weatherbindings
- return nil for not existing effects
- also use currectTexturePath for cloud texture
- corrections for docs
2025-07-25 23:22:33 +02:00
Sebastian Fieber 855b236ee8 direction of the sun light != direction to the sun 2025-07-25 21:00:09 +02:00
Alexei Kotov 730a62effc Merge branch 'warn-baby-warn' into 'master'
Fix MSVC warnings

Closes #7882

See merge request OpenMW/openmw!4804
2025-07-25 21:45:34 +03:00
Sebastian Fieber a560aceb2a correct sunDiscSunsetColor type 2025-07-25 20:37:05 +02:00
Sebastian Fieber cbb96e0fc2 colors should use Misc::Color 2025-07-25 20:10:21 +02:00
psi29a a599825bf8 Merge branch 'everyonelikeschameleons' into 'master'
Prevent hostile actors from engaging combat against actors with 75 chameleon

See merge request OpenMW/openmw!4806
2025-07-25 08:02:32 +00:00
psi29a 714c128947 Merge branch 'compositemipmaps' into 'master'
Apply filtering settings to composite maps

See merge request OpenMW/openmw!4805
2025-07-25 07:12:07 +00:00
psi29a 45e08f62a1 Merge branch 'smolpiranha' into 'master'
Take skin transform and skeleton root into account

Closes #4437

See merge request OpenMW/openmw!4471
2025-07-25 07:09:55 +00:00
Sebastian Fieber b8fec360c3 typo 2025-07-25 02:20:26 +02:00
Sebastian Fieber f1447207b2 more less preprocessed code lines 2025-07-25 01:13:43 +02:00
Sebastian Fieber 3f54d3e569 update lua api revision 2025-07-25 00:53:04 +02:00
Sebastian Fieber 27adbf0cde less preprocessed code lines 2025-07-25 00:53:04 +02:00
Sebastian Fieber d20a56517b add getCurrentSunLightDirection 2025-07-25 00:52:56 +02:00
Sebastian Fieber 6be96da6a4 lua - add weatherbindings to core 2025-07-25 00:43:39 +02:00
Alexei Kotov d595d9f3b8 Merge branch 'maccitest' into 'master'
Mac CI updates

See merge request OpenMW/openmw!4789
2025-07-24 18:58:49 +03:00
Evil Eye f52d9ad977 Prevent hostile actors from engaging combat against actors with 75 chameleon 2025-07-24 17:02:42 +02:00
Evil Eye e3c9e6fe2b Set a root for BS skins as well 2025-07-24 08:46:21 +02:00
Evil Eye 8d7218c118 Take skin transform and skeleton root into account 2025-07-24 08:40:20 +02:00
Alexei Kotov ad996393f1 Apply filtering settings to composite maps 2025-07-24 08:41:43 +03:00
AnyOldName3 437f22ed72 Typo fix 2025-07-24 00:37:28 +01:00
AnyOldName3 092d9a4c62 Remove dumb comment 2025-07-24 00:35:22 +01:00
AnyOldName3 f8a96fae24 Some formatting changes I missed 2025-07-24 00:26:47 +01:00
AnyOldName3 be54521cfa Fix loads of warnings
These weren't detected due to https://gitlab.com/OpenMW/openmw/-/issues/7882, but now they are, so they can be fixed.
2025-07-24 00:20:05 +01:00
AnyOldName3 52b785f726 Use updated Windows dependencies
The main changes are changing an OSG option that was disabling most of our warnings, and MSVC2019 switching to a custom vcpkg triplet.
2025-07-23 23:18:03 +01:00
Alexei Kotov 5dddf9153d Fix useAmbientLight references in docs 2025-07-24 00:25:26 +03:00
Evil Eye acfe9b6785 Merge branch 'karamunsing' into 'master'
Don't deselect item when usage is denied

Closes #7693

See merge request OpenMW/openmw!4788
2025-07-23 18:43:41 +00:00
Evil Eye 362c1a7ebe Update sol 2025-07-23 17:35:35 +02:00
psi29a d1b03734b3 Merge branch 'master' into 'master'
Save user settings when closing windows

Closes #8077

See merge request OpenMW/openmw!4367
2025-07-23 09:32:04 +00:00
Jared Davenportandpsi29a 324bdf8f7a Save user settings when closing windows 2025-07-23 09:32:04 +00:00
psi29a d401dd2441 Merge branch 'ContainerCapacityCheck' into 'master'
Fix precision issue with container capacity check

Closes #8606

See merge request OpenMW/openmw!4776
2025-07-23 09:31:38 +00:00
Aussiemonandpsi29a 044c556f0e Fix precision issue with container capacity check 2025-07-23 09:31:38 +00:00
AnyOldName3 125bbdc118 Merge branch 'long-specular' into 'master'
Elongated specular highlight for water

See merge request OpenMW/openmw!4726
2025-07-22 13:04:03 +00:00
Alexei Kotov 896d6fd01e Put combat actions on hold when the actor is incapacitated (#7979) 2025-07-22 15:38:04 +03:00
Alexei Kotov d899454f36 Remove completion threshold-based turning for the player (#8447) 2025-07-22 15:35:57 +03:00
psi29a b2cc549585 Merge branch 'theemperorwantedyoutohavethisinvaliditerator' into 'master'
Prevent iterator invalidation during actor traversal

Closes #4885

See merge request OpenMW/openmw!4445
2025-07-22 07:38:20 +00:00
psi29a 2b1cd1deb8 Merge branch 'getpcrunning' into 'master'
Deduplicate GetPCRunning logic

See merge request OpenMW/openmw!4800
2025-07-22 07:37:35 +00:00
Alexei Kotov 93cde36b09 Deduplicate GetPCRunning logic 2025-07-21 19:09:24 +03:00
Evil Eye 30cfb42ed1 Fix rebase fallout 2025-07-21 17:57:51 +02:00
psi29a c30964feb2 Merge branch 'namespace_naming' into 'master'
Fix and enforce namespace naming (#8424)

See merge request OpenMW/openmw!4648
2025-07-21 10:30:47 +00:00
elsid 28851411a3 Fix and enforce namespace naming 2025-07-20 21:19:16 +02:00
AnyOldName3 9845f76583 Merge branch 'nonessentialjobs' into 'master'
Don't run some non-essential jobs on upstream branch pushes

See merge request OpenMW/openmw!4797
2025-07-20 16:59:04 +00:00
Alexei Kotov 2b4b532745 Merge branch 'charmdispofix' into 'master'
Fix permanent disposition loss on exit conversation

Closes #8557

See merge request OpenMW/openmw!4796
2025-07-20 19:05:24 +03:00
AussiemonandAlexei Kotov 01fa3cc4e6 Subtract Charm from permanent disposition clamp range 2025-07-20 19:05:24 +03:00
Dave Corley 0f0a402ead Local content file index is actually -1 2025-07-20 08:53:14 +00:00
Andy Lanzone 6114a01ad4 Merge branch openmw:master into master 2025-07-19 18:10:08 -07:00
Andrew Lanzone ef50578a62 Move controller button overlay padding into layout file 2025-07-19 18:09:00 -07:00
Andrew Lanzone b0bdd68e7c Update a comment 2025-07-19 17:12:33 -07:00
Andrew Lanzone 29f1c7c68f Remove some hardcoded menu sizes for inventory mode 2025-07-19 17:12:09 -07:00
Andrew Lanzone f8d9149e4f Use enum and array for cleaner management of controller button overlay 2025-07-19 16:31:25 -07:00
Andrew Lanzone c2ad1df030 Update Swedish translation for controller tooltips option 2025-07-19 14:03:26 -07:00
Dave Corley dcac39aefd FIX: never serialize MVRF for refferences from the local plugin 2025-07-19 09:44:01 -07:00
Alexei Kotov 10602a0412 Don't run some non-essential jobs on upstream branch pushes 2025-07-19 12:08:48 +03:00
Evil Eye 8bf9b205b7 Merge branch 'supporteddirections' into 'master'
Cache computed supported movement directions

See merge request OpenMW/openmw!4709
2025-07-19 08:59:18 +00:00
Evil Eye 39cc893639 Unbreak swimdeath fallback 2025-07-19 09:38:44 +02:00
Evil Eye 1dfa2629f0 Remove more redundant checks 2025-07-19 09:24:24 +02:00
Evil Eye 35eed68269 Move null checks to address feedback 2025-07-19 09:24:23 +02:00
Evil Eye d34aee6257 Allow unsetting a character controller's animation 2025-07-19 09:23:43 +02:00
Evil Eye b2bb12cd19 Run ~CharacterController when invalidating an Actor 2025-07-19 09:22:44 +02:00
Evil Eye c098f2ccde Prevent iterator invalidation during actor traversal 2025-07-19 09:22:44 +02:00
Kuyondo 614062d387 prevent item flickering on drag use and dont stop drag on denied lua itemusage 2025-07-19 15:02:32 +08:00
Andrew Lanzone bf327adc93 Bump OPENMW_LUA_API_REVISION and gamepad controls versions 2025-07-18 17:53:29 -07:00
Alexei Kotov 152d87a6b3 Merge branch 'esm4paging' into 'master'
Object paging in ESM4 worldspaces

See merge request OpenMW/openmw!4770
2025-07-18 23:41:18 +03:00
Petr Mikheev 7f28b33cf1 Object paging in ESM4 worldspaces 2025-07-18 22:12:24 +02:00
psi29a 82b1d1b78e Merge branch 'corpsecollector' into 'master'
Ensure corpses of actors that have moved cells are cleaned up

See merge request OpenMW/openmw!4793
2025-07-18 19:57:58 +00:00
psi29a 412134da99 Merge branch 'bsazoomies' into 'master'
Use zlib directly for BSA file decompression (#8569)

Closes #8569

See merge request OpenMW/openmw!4795
2025-07-18 19:56:15 +00:00
Evil Eye 22232e8710 Merge branch 'sortedanimations' into 'master'
Assume NIF controller data is already sorted (#8545)

Closes #8545

See merge request OpenMW/openmw!4794
2025-07-18 19:29:24 +00:00
Alexei Kotov f7238cd043 Merge branch 'document_object_cache' into 'master'
Add documentation for update function of Generic Object Cache

See merge request OpenMW/openmw!4164
2025-07-18 21:51:16 +03:00
Alexei Kotov 9370b41636 Merge branch 'convertthis' into 'master'
Remove int conversions from pathfinding

See merge request OpenMW/openmw!4755
2025-07-18 16:13:20 +03:00
Andy Lanzone bef2948062 Merge branch openmw:master into master 2025-07-18 01:23:05 -07:00
Andrew Lanzone c53b1bf2c0 Replace more C-style casts with C++ variants 2025-07-18 01:06:25 -07:00
Andrew Lanzone a73b803592 Fix crash when spell buying window is empty 2025-07-18 01:05:48 -07:00
Andrew Lanzone 0abbf91477 Disable double-clicking on window titles in the inventory menu 2025-07-17 23:07:54 -07:00
Alexei Kotov 4a0c998f53 Avoid zero division during animation interpolation 2025-07-18 00:13:01 +03:00
Alexei Kotov 93cb69b012 Assume NIF controller data is already sorted (#8545) 2025-07-18 00:09:28 +03:00
Alexei Kotov 6796121305 Use zlib directly for BSA file decompression (#8569) 2025-07-17 22:25:18 +03:00
Dave Corley 7d5a9a2e2f CLEANUP: Only increment highest refNum for ones which are actually higher 2025-07-17 11:26:36 -07:00
Skyhasacat c90ae89381 Merge branch 'luapaths' into 'master'
Expose path grids to Lua

See merge request OpenMW/openmw!4792
2025-07-17 16:13:09 +00:00
Andrew Lanzone eba063ac23 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-07-17 08:14:28 -07:00
Evil Eye b61d8fb585 Use Context::initializeOnce 2025-07-17 16:42:24 +02:00
psi29a 3b42874797 Merge branch 'defendingthelight' into 'master'
Only autoequip the shield in updateEquippedLight (#8404)

Closes #8404

See merge request OpenMW/openmw!4763
2025-07-17 14:23:57 +00:00
psi29a 0006cb22e2 Merge branch 'FillJournalConsoleCommand' into 'master'
Implement FillJournal script instruction

Closes #8509

See merge request OpenMW/openmw!4676
2025-07-17 14:22:53 +00:00
psi29a eb67d1a1fb Merge branch 'activescripts' into 'master'
Mark scripts on newly scripted, active objects as active

See merge request OpenMW/openmw!4785
2025-07-17 14:21:45 +00:00
psi29a e1847d2670 Merge branch 'master' into 'master'
Bump libsdl to 2.0.20

See merge request OpenMW/openmw!4779
2025-07-17 14:20:13 +00:00
Andy Lanzoneandpsi29a f45053ad25 Bump libsdl to 2.0.20 2025-07-17 14:20:13 +00:00
Evil Eye bd6254b6df Ensure corpses of actors that have moved cells are cleaned up 2025-07-17 08:22:26 +02:00
Alexei Kotov 446a4452d3 Merge branch 'changelog' into 'master'
Sync changelog

See merge request OpenMW/openmw!4790
2025-07-16 21:53:06 +03:00
Evil Eye 183652e51d Expose path grids to Lua 2025-07-16 20:18:17 +02:00
Evil Eye 6dadf5de75 Merge branch 'quittingpeacefully' into 'master'
Move Quitting peacefully message to a more appropriate place

See merge request OpenMW/openmw!4769
2025-07-16 14:40:29 +00:00
psi29a 418879bada Merge branch 'tcbtakethree' into 'master'
Re-reimplement TCB interpolation for scalars and vectors (#2379)

See merge request OpenMW/openmw!4784
2025-07-16 14:12:48 +00:00
Alexei Kotov f9c7dc0b20 Sync changelog for 0.50.0 2025-07-16 13:43:59 +03:00
Alexei Kotov 281dea527f Merge branch 'clangtidy' into 'master'
Don't build the engine, the editor and editor tests multiple times in Clang Tidy jobs

See merge request OpenMW/openmw!4787
2025-07-16 12:30:32 +03:00
psi29a 3899260eea Merge branch 'herbalismsound' into 'master'
Don't harvest if player activation is blocked (#8612)

Closes #8612

See merge request OpenMW/openmw!4773
2025-07-16 09:05:32 +00:00
psi29a a7a47f3ea9 Merge branch 'silencekey' into 'master'
Don't play down sound while loading quick keys

See merge request OpenMW/openmw!4783
2025-07-16 09:04:49 +00:00
psi29a ab8e17196f Merge branch 'mac-brew-tweaks' into 'master'
[CI] Mac - Brew cleanup/simplify

See merge request OpenMW/openmw!4759
2025-07-16 08:44:31 +00:00
Alexei Kotov 4f827b6336 Rename mac jobs, test caching 2025-07-16 11:30:21 +03:00
Andrew Lanzone f50c275133 Ensure mouse really moved before unhiding cursor in controller menu 2025-07-16 00:25:45 -07:00
Alexei Kotov 400c5a6dba Bump mac CI image to macos-15-xcode-16 and tweak trigger rules 2025-07-16 01:09:57 +03:00
Evil Eye 931555c7ff Remove int conversions from pathfinding 2025-07-15 21:57:12 +02:00
Alexei Kotov d602e9ff7a Don't build the engine, the editor and editor tests multiple times in Clang Tidy jobs 2025-07-15 18:05:57 +03:00
Skyhasacat 3b7b97c58c Merge branch 'coup' into 'master'
Update project leader history

See merge request OpenMW/openmw!4786
2025-07-15 14:25:01 +00:00
Alexei Kotov 8826d5cb0e Update project leader history 2025-07-15 15:04:39 +03:00
Andrew Lanzone 4adb9bd8ac Unhide the cursor if it was hidden to show a controller tooltip 2025-07-15 02:02:49 -07:00
Andrew Lanzone cf24063226 Replace more C-style casts with C++ style 2025-07-15 01:33:52 -07:00
Andy Lanzone a3a1b6d11f Merge branch openmw:master into master 2025-07-14 17:48:36 -07:00
Andrew Lanzone 9e2927f734 Use the localized strings from Interface l10n module where possible 2025-07-14 17:45:03 -07:00
Andrew Lanzone af6634ee57 Remove spurious debug log line 2025-07-14 17:27:20 -07:00
Andrew Lanzone b8381f6e62 Replace C-style cast with C++ cast. 2025-07-14 17:25:57 -07:00
Andrew Lanzone a296fa2b40 Add more details to "controller menus" setting. 2025-07-14 17:24:28 -07:00
Evil Eye 6f9b813bd1 Mark scripts on newly scripted, active objects as active 2025-07-14 22:39:19 +02:00
Alexei Kotov a12a0916ed Merge branch 'too-many-markers' into 'master'
FEAT(CS): Replace selection markers with a real one (#8139)

Closes #8139

See merge request OpenMW/openmw!4349
2025-07-14 23:18:46 +03:00
Dave CorleyandAlexei Kotov 9dd028b260 FEAT(CS): Replace selection markers with a real one (#8139) 2025-07-14 23:18:45 +03:00
Alexei Kotov 64fef724a6 Merge branch 'ccache-status-verbose' into 'master'
Use verbose status for ccache so we can see what caused hit failures

See merge request OpenMW/openmw!4756
2025-07-14 21:01:28 +03:00
AnyOldName3 4f60284a35 Merge branch 'first' into 'master'
Prepend new characters so they're first on the list

See merge request OpenMW/openmw!4778
2025-07-14 17:49:59 +00:00
Alexei Kotov a03a2a5ff2 Re-reimplement TCB interpolation for scalars and vectors (#2379) 2025-07-14 13:09:23 +03:00
Andrew Lanzone 1b240c7dd6 Clean up controller logic to match item transfer logic 2025-07-13 15:24:16 -07:00
Andrew Lanzone a894481fd7 Clean up controller logic to match item transfer logic 2025-07-13 15:12:33 -07:00
Andrew Lanzone 6a02e6a4bc Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-07-13 14:55:27 -07:00
Evil Eye 682f00bcff Don't play down sound while loading quick keys 2025-07-13 18:36:30 +02:00
Aussiemon 445cf1742d ptr.getCellRef().getRefId() 2025-07-13 10:20:58 -06:00
Alexei Kotov b53cb085c9 Merge branch 'revert-9347fe5c' into 'master'
Unimplement TCB interpolation (!4539)

Closes #8621

See merge request OpenMW/openmw!4782
2025-07-13 18:28:32 +03:00
Alexei Kotov 119a87b7f4 Revert "Merge branch 'tbcornottbcwaititstcbactually' into 'master'"
This reverts merge request !4539
2025-07-13 18:02:15 +03:00
Dave Corley 79d86bf2bd FIX: Track the highest local refNum during plugin loading and increment it for each cloned/created reference 2025-07-13 05:12:42 -07:00
Dave Corley 2cb7d6c392 CLEANUP: Remove commented code & use the builtin getNewId function when cloning 2025-07-13 05:11:38 -07:00
Dave Corley 85fdf2011a FIX: Do not attempt to bump refNums during savingStages 2025-07-13 05:10:43 -07:00
Dave Corley 42109fc811 CLEANUP: Remove dead code in cloneRecordImp 2025-07-13 05:10:14 -07:00
Alexei Kotov 4f95ca4196 Merge branch 'talk-to-me-about-something-else' into 'master'
FEAT: AddTopic in Lua, close #8334

Closes #8334

See merge request OpenMW/openmw!4529
2025-07-13 12:35:41 +03:00
Alexei Kotov 79c689784b Merge branch 'quick_item_transfer' into 'master'
Support quick item transfer (#2522)

Closes #2522

See merge request OpenMW/openmw!4659
2025-07-13 12:33:56 +03:00
Evil Eye c80b3d26b9 Only check for spelllist/equipment changes in the update loop 2025-07-13 11:18:15 +02:00
Evil Eye 2dbe30ed5c Update effects upon applying them 2025-07-13 10:53:34 +02:00
Aussiemon bb1214ed69 factionId instead of faction->mName 2025-07-13 02:48:37 -06:00
Aussiemon 11947286d9 Reuse factionId 2025-07-13 02:36:59 -06:00
Aussiemon 87e41425bb Unnecessary ptrClass 2025-07-13 02:36:16 -06:00
Aussiemon cef1807536 Use RefId instead of name 2025-07-13 02:30:55 -06:00
Aussiemon 61ebb4b259 Redo debug warnings in interpreter 2025-07-13 02:07:49 -06:00
Dave Corley 1abaf706c8 CLEANUP: Bump api revision 2025-07-12 19:37:36 -07:00
Dave Corley ced135bc87 CLEANUP: No, record ids should totally be quoted 2025-07-12 19:37:15 -07:00
Dave Corley 943cd765e7 CLEANUP: Update for MR Comments 2025-07-12 19:37:15 -07:00
Dave CorleyandDave Corley 8ec4fcbf30 CLEANUP: Actually check the record in question is a topic when using addTopic 2025-07-12 19:37:15 -07:00
Dave CorleyandDave Corley 05b12ac879 CLEANUP: Use more appropriate object types & functions in addTopic binding 2025-07-12 19:37:15 -07:00
Dave CorleyandDave Corley 4150f5fad6 FEAT: AddTopic in Lua, close #8334 2025-07-12 19:37:15 -07:00
Andrew Lanzone 843a6487cc Fix clang warning 2025-07-12 19:04:14 -07:00
Andrew Lanzone 6629a186b1 Controller mode uses LB/RB in journal and spell list to scroll faster 2025-07-12 15:37:48 -07:00
Andrew Lanzone 084e4a3155 Change type of mControllerFocus to size_t when applicable 2025-07-12 15:13:33 -07:00
Andrew Lanzone 622cbd5288 Remove SDL_VERSION_ATLEAST references 2025-07-12 14:17:23 -07:00
Andy Lanzone 3600a5c716 Merge branch openmw:master into master 2025-07-12 14:13:10 -07:00
Alexei Kotov 2504550c6f Merge branch 'fasterwait' into 'master'
More closely match rest/wait progress speed to vanilla

See merge request OpenMW/openmw!4772
2025-07-12 21:55:58 +03:00
Evil Eye 6dd10f1666 Prepend new characters so they're first on the list 2025-07-12 19:32:32 +02:00
Kuyondo def31cfb05 cleanup 2025-07-12 22:44:28 +08:00
Kuyondo d2c78ee88c move member var to implementation 2025-07-12 22:14:47 +08:00
Alexei Kotov 403b5d19e0 Merge branch 'KwarmaQueenCombat' into 'master'
Prevent immobile creatures' combat actions, but allow combat

Closes #7871

See merge request OpenMW/openmw!4632
2025-07-12 15:29:32 +03:00
elsid 463de2d791 Instantly transfer items if alt key is pressed
Support player's inventory, container and companion windows with
dropping and picking up items from the world.

Add ItemTransfer class to handle transfers similar to DragAndDrop. When
a container window is opened the view is added to the set of targets and
removed when closed. If ALT is pressed instead of starting dragging an
item perform a transfer. If there is 1 target which is not a source move
item there. If there is no target drop item into the world using
WorldItemModel.

Special case is picking up an item. Don't start dragging, just update
the player's inventory view because the item is already there.
2025-07-12 13:34:59 +02:00
elsid f5e66f3e24 Remove unused includes 2025-07-12 12:31:15 +02:00
elsid eb7af832e4 Remove trailing spaces 2025-07-12 12:31:15 +02:00
elsid a4af037293 Remove ContainerWindow::onTakeItem 2025-07-12 12:31:15 +02:00
elsid bcfe06d85a Use std::size_t for items count 2025-07-12 12:31:14 +02:00
Alexei Kotov 4e5e8e7889 Merge branch '1kiawayan-7649' into 'master'
Don't play vfx and sound on resisted magic

Closes #7649

See merge request OpenMW/openmw!4766
2025-07-12 12:38:51 +03:00
Alexei Kotov e9081fec9f Merge branch 'refactorshowvars' into 'master'
Improve showVars

See merge request OpenMW/openmw!4747
2025-07-12 12:37:05 +03:00
Alexei Kotov 3e711c30db Merge branch 'maluu-apa-bosku' into 'master'
Play down sound when equip fails

Closes #7371

See merge request OpenMW/openmw!4248
2025-07-12 11:52:26 +03:00
Alexei Kotov f4ff683905 Merge branch 'terrain_normals_fix' into 'master'
Fix terrain normal map handedness

Closes #8610

See merge request OpenMW/openmw!4775
2025-07-12 11:50:00 +03:00
Kuyondo 77c30a68c9 more similar to vanilla 2025-07-12 12:04:38 +08:00
wareya 869881d227 fix terrain normal map handedness 2025-07-11 12:23:22 -04:00
Alexei Kotov fe7970421f Don't harvest if player activation is blocked (#8612) 2025-07-11 11:47:20 +03:00
psi29a f5de0d1c40 Merge branch 'quickkeysmenu' into 'master'
Quick keys menu fixes (#8359)

Closes #8359

See merge request OpenMW/openmw!4546
2025-07-11 07:41:55 +00:00
Kuyondo 25d9c80067 Don't play vfx and sound on fully resisted debuffs 2025-07-11 03:10:49 +08:00
Alexei Kotov 1ce7110a9e Merge branch 'less-strict-dialogues' into 'master'
FIX: Skip only the current subrecord when reading quest status (Close #8333)

Closes #8333

See merge request OpenMW/openmw!4528
2025-07-10 20:14:53 +03:00
Andrew Lanzone 73ffe7f62b Fix clang formatting issue 2025-07-10 08:56:24 -07:00
Andrew Lanzone b075428513 Minor fixes based on code review feedback. 2025-07-10 08:46:01 -07:00
Andrew Lanzone e04f0a8bd6 Move logic for determining Russian index page count to a shared place 2025-07-10 08:45:51 -07:00
Andrew Lanzone d100867bce Add ReST documentation for controller menu options 2025-07-10 08:44:58 -07:00
Alexei Kotov 6d74a4607c Restore some omitted object cache remarks that seemed useful 2025-07-10 17:25:27 +03:00
Florian HebererandAlexei Kotov a00e5ec828 Add documentation for update function of Generic Object Cache 2025-07-10 17:18:18 +03:00
Dave CorleyandAlexei Kotov 7bc507eb58 FIX: Skip only the current subrecord when reading quest status 2025-07-10 17:08:47 +03:00
Alexei Kotov b958dc7297 Merge branch 'launcher_resolutions' into 'master'
Do not allow to select a screen resolution in the Windowed Fullscreen mode in the launcher

See merge request OpenMW/openmw!4765
2025-07-10 15:44:35 +03:00
Alexei Kotov f64f53341b Merge branch 'gen_mipmaps_after_draw' into 'master'
Generate mipmaps after we draw fullscreen geometry

See merge request OpenMW/openmw!4768
2025-07-10 10:06:07 +03:00
Andrei Kortunov dca83c2500 Add resolution hints to launcher 2025-07-10 10:24:39 +04:00
Alexei Kotov 3789070ea2 Merge branch 'docs_less_padding' into 'master'
Tighten table padding and luadoc anchors

See merge request OpenMW/openmw!4767
2025-07-10 00:55:36 +03:00
Cody Glassman 064b8d3f9b use more explicit null check 2025-07-09 11:49:38 -07:00
Alexei Kotov f3420bd1bd Move Quitting peacefully message to a more appropriate place 2025-07-09 10:55:17 +03:00
Andy Lanzone d46f034e5d Merge branch openmw:master into master 2025-07-08 19:46:37 -07:00
Andrew Lanzone 9a637563cd Fix getIndexSelected typing 2025-07-08 19:46:24 -07:00
Cody Glassman 759739ecca generate mipmaps after we draw, not before 2025-07-08 15:53:18 -07:00
Cody Glassman 3ec04f4ba7 docs - improve link contrast in dark mode 2025-07-08 14:15:37 -07:00
Andrei Kortunov a68107712c Do not allow to select a screen resolution in the Windowed Fullscreen mode in the launcher 2025-07-08 22:33:35 +04:00
Cody Glassman 8b44b95830 docs - fix table padding and luadoc scroll padding 2025-07-08 11:26:16 -07:00
Alexei Kotov 0892357230 Only autoequip the shield in updateEquippedLight (#8404) 2025-07-08 20:32:20 +03:00
psi29a e9a9659abc Merge branch 'autoequip' into 'master'
Unify creature/NPC armor autoequip

See merge request OpenMW/openmw!4753
2025-07-08 10:35:17 +00:00
psi29a 3135e2e479 Merge branch 'smexypants' into 'master'
Make ExtraSpell undress less

See merge request OpenMW/openmw!4752
2025-07-08 10:34:32 +00:00
psi29a c691c72cec Merge branch 'esm4sound' into 'master'
Initial support of ESM4 sounds

See merge request OpenMW/openmw!3784
2025-07-08 10:32:24 +00:00
Alexei Kotov c0276b6890 Merge branch 'cpputil2lua' into 'master'
Move some util to lua

See merge request OpenMW/openmw!4750
2025-07-08 12:45:14 +03:00
Petr Mikheev 10dba7cda7 Initial support of ESM4 sounds; play opening sound of ESM4 doors. 2025-07-08 11:14:13 +02:00
Kuyondo f87d6818b7 pressing enter for newline 2025-07-08 05:02:53 +08:00
Kuyondo ede768532c cleanup 2 2025-07-08 03:48:40 +08:00
Alexei Kotov f56d6e4c1e Merge branch 'changelog' into 'master'
Changelog sync

See merge request OpenMW/openmw!4761
2025-07-07 19:08:13 +03:00
Andrew Lanzone c61d4783e6 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-07-07 08:59:58 -07:00
Andrew Lanzone 21367a6127 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-07-07 08:58:21 -07:00
AnyOldName3 1331318002 Add another v 2025-07-07 16:28:52 +01:00
Evil Eye 0c4af81a69 Fix tests 2025-07-07 16:48:24 +02:00
Kuyondo 36604777f2 tests 2 2025-07-07 20:14:38 +08:00
Kuyondo 3f352b2470 tests 2025-07-07 19:28:12 +08:00
Alexei Kotov d5e3703aa8 Changelog sync for 0.50.0 2025-07-07 12:51:49 +03:00
psi29a 83a37fecea Merge branch 'l10n_format' into 'master'
Treat formatting string arguments as UTF-8 string

Closes #8385

See merge request OpenMW/openmw!4751
2025-07-07 09:28:43 +00:00
Kuyondo e4f0723a90 cleanup 2025-07-07 17:01:18 +08:00
Kuyondo 40e9b2d707 play down sound when equip fails 2025-07-07 17:01:18 +08:00
Alexei Kotov 2ce697a366 Merge branch 'errno' into 'master'
Print a more verbose message when we failed to write savegame

See merge request OpenMW/openmw!4749
2025-07-07 10:35:12 +03:00
Andrew Lanzone 3a05ddb982 Fix issues caused by incomplete merge 2025-07-06 23:17:00 -07:00
Andrew Lanzone b170500183 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-07-06 23:00:28 -07:00
Andrew Lanzone 952abf5557 Support either two- or three- column layouts for cyrillic journal indices 2025-07-06 22:51:31 -07:00
Andrew Lanzone fdc392435f Fix controller tooltip temporarily disappearing when dealing with stacks of items 2025-07-06 22:42:08 -07:00
Andrew Lanzone e349fa248a Tweak how scroll offsets are calculated for smoother scrolling 2025-07-06 22:42:08 -07:00
Andrew Lanzone abe0467915 Show count dialog when dropping stacks (cleans up the logic too) 2025-07-06 22:42:08 -07:00
epochwon db22706e8e I'm sorry clang, forgive me 2025-07-07 01:40:25 -04:00
epochwon ba361302a1 cache physics framerate at start instead of checking every update 2025-07-07 01:40:25 -04:00
epochwon ce666db34f don't use EFX doppler, set doppler factor globally instead of per-sound 2025-07-07 01:40:25 -04:00
epochwon f0e9df4de2 fix launcher ui and lang mess 2025-07-07 01:40:25 -04:00
epochwon 1206688494 language files maybe? 2025-07-07 01:40:25 -04:00
epochwon d29c01be26 appease clang + docs 2025-07-07 01:40:24 -04:00
epochwon c541cb96cc doppler take 2 2025-07-07 01:37:18 -04:00
Aussiemon 67795543a2 Revert "Fix unneeded runtime errors"
This reverts commit d207c2251f.
2025-07-06 20:51:53 -06:00
Sarah Sunday 6a9b2d3302 [CI] Brew cleanup/simplify 2025-07-06 17:28:23 -05:00
Kindi c4a4c435f1 refactor opshowvars 2025-07-07 04:38:25 +08:00
Alexei Kotov abbbeefdbd Merge branch 'harvest' into 'master'
Do not recreate animation object when harvesting a plant

See merge request OpenMW/openmw!4744
2025-07-06 22:24:20 +03:00
Alexei Kotov eb9096baf4 Merge branch 'eventful' into 'master'
[Lua] Some event handlers.

See merge request OpenMW/openmw!4738
2025-07-06 22:20:27 +03:00
Alexei Kotov 0b192c4485 Merge branch 'tidy-up-warnings' into 'master'
Apply warning flags consistently for all compilers

Closes #7882

See merge request OpenMW/openmw!4748
2025-07-06 22:18:22 +03:00
Alexei Kotov a109052296 Merge branch 'no_water_blend' into 'master'
Fix disappearing normals with refraction disabled (#8490)

Closes #8490

See merge request OpenMW/openmw!4746
2025-07-06 22:12:59 +03:00
AussiemonandAussiemon 555721141d Skip quest names (vanilla improvement) 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon d207c2251f Fix unneeded runtime errors 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 0e1ed078e9 Clang format 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 73a3033e0f Get the dialogue manager once 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 30140d9548 Get the journal only once 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 565b199380 Clang format 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 83903455f9 Address review comments 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 4b98520266 Revert shared addJournalEntry 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 34194f9c08 Add topics as known topics in addition to journal topics 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 2e1f3d5d2c Clang format 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 6c70c403be Implement FillJournal console command 2025-07-06 12:16:17 -06:00
AussiemonandAussiemon 2db36c49b5 Move early out to better place 2025-07-06 11:51:44 -06:00
AussiemonandAussiemon 09ed5bb234 Allow immobile actors to initiate combat when attacked 2025-07-06 11:51:44 -06:00
AussiemonandAussiemon 3df695df4a Found better place for early return 2025-07-06 11:51:44 -06:00
AussiemonandAussiemon 23dc226dff Revert autoformat changes 2025-07-06 11:51:44 -06:00
AussiemonandAussiemon a77a8904e5 Immobile creatures should enter combat, but not act 2025-07-06 11:51:44 -06:00
AussiemonandAussiemon 266702e729 Remove obsolete combat block for immobile creatures and autoformat 2025-07-06 11:51:44 -06:00
AnyOldName3 89d6f59388 Use verbose status for ccache so we can see what caused hit failures 2025-07-06 15:58:12 +01:00
Mads Buvik Sandvei 45c187028f Bump 2025-07-06 14:23:39 +02:00
Alexei Kotov df5625a1e3 Unify creature/NPC armor autoequip 2025-07-06 13:58:25 +03:00
psi29a c232ad55b4 Merge branch 'updateinventory' into 'master'
Update inventory window when item is added or removed into container by script

Closes #8431

See merge request OpenMW/openmw!4609
2025-07-06 10:20:52 +00:00
psi29a 86d81af199 Merge branch 'hairwidthcrosshair' into 'master'
Make the crosshair smaller

See merge request OpenMW/openmw!4608
2025-07-06 10:20:16 +00:00
psi29a 3405d5017e Merge branch 'birthsigntooltip' into 'master'
Revise birthsign tooltip layout (#6792)

Closes #6792

See merge request OpenMW/openmw!4558
2025-07-06 10:18:52 +00:00
psi29a a5e23f5fd3 Merge branch 'portedesetoiles' into 'master'
Fix path handling for files in BSAs

Closes #8598 and #8599

See merge request OpenMW/openmw!4655
2025-07-06 10:17:55 +00:00
Evil Eye 3574cd552c Make ExtraSpell undress less 2025-07-06 12:10:49 +02:00
Andrei Kortunov d455ff5f5e Treat formatting string arguments as UTF-8 string 2025-07-06 13:35:27 +04:00
Andrei Kortunov 779840deea Print a more verbose message when we failed to write savegame 2025-07-06 11:27:03 +04:00
Alexei Kotov 9b8a383e8d Merge branch 'sinalau-bakas' into 'master'
Respawning npc respawns in origin cell

See merge request OpenMW/openmw!4695
2025-07-06 07:06:47 +03:00
AnyOldName3 c253590338 Restore previous interpretation of OPENMW_CXX_FLAGS
It used to be copied as-is into the command-line options for the compiler, whereas add_compile_options expects a list of arguments.
separate_arguments can be used to split a string how the system would split a command line.
2025-07-05 22:56:42 +01:00
Mads Buvik Sandvei 7143115e57 Doc update 2025-07-05 21:30:51 +02:00
Mads Buvik Sandvei 1b9802472d Doc updates 2025-07-05 21:30:51 +02:00
Mads Buvik Sandvei c7e3f9b0cf Add some events from the dehardcode spellcasting MR, that do not need to be specific to that MR. 2025-07-05 21:30:51 +02:00
AnyOldName3 da32ccee50 Apply warning flags consistently for all compilers
This avoids a problem where a bunch of our targets weren't having the right warning flags set up with MSVC.
It shouldn't make any difference for other compilers, except Clang in clang-cl mode, which wants MSVC warning flags, and will now get them.

It doesn't seem to resolve https://gitlab.com/OpenMW/openmw/-/issues/7882, so you still have to disable precompiled headers to see warnings with MSVC.
2025-07-05 19:49:08 +01:00
Andrew Lanzone b6f3b2760a Use a new string for 'Select Character' controller button label 2025-07-05 10:27:45 -07:00
AnyOldName3 bf92e551a7 Eliminate reference to vestigial MT_BUILD variable 2025-07-05 18:09:36 +01:00
Alexei Kotov a51afbeaa8 Merge branch 'gen_mipmaps_for_rendertargets' into 'master'
Generate mipmaps for rendertargets (#8593)

See merge request OpenMW/openmw!4734
2025-07-05 19:25:37 +03:00
Alexei Kotov 0655e7988e Merge branch 'docs_openmw_cfg' into 'master'
Improve docs styling for code blocks and headers

See merge request OpenMW/openmw!4733
2025-07-05 19:22:18 +03:00
Cody Glassman da71ec6e49 postprocessing - bump revision 2025-07-05 08:55:06 -07:00
Cody Glassman 390589795c postprocessing - set mipmaps levels for rendertargets when requested 2025-07-05 08:53:54 -07:00
Cody Glassman 30a852bb88 disable blending in second color attachment on water node 2025-07-05 08:32:21 -07:00
Andrei Kortunov 2db9b91c10 Do not recreate animation object when harvesting a plant 2025-07-05 17:11:17 +04:00
Alexei Kotov a6503233a6 Merge branch 'windowvisiblelua' into 'master'
lua - add binding to check window visibility

Closes #8355

See merge request OpenMW/openmw!4543
2025-07-05 09:57:50 +03:00
Andrew Lanzone dfa3b5f7ed Add Russian translation for controller menu launcher checkboxes 2025-07-04 23:09:31 -07:00
Andrew Lanzone e577257ec4 Make topic padding a const and use it when scrolling dialog topics 2025-07-04 23:06:05 -07:00
Andrew Lanzone 0f26270f66 Sync to master tree but keep changes 2025-07-04 16:17:27 -07:00
Skyhasacat e4a6db1b84 Merge branch 'revert-b29850f4' into 'master'
Revert !4710

See merge request OpenMW/openmw!4740
2025-07-04 22:15:37 +00:00
Alexei Kotov 38efdd2fd8 Revert "Merge branch 'master' into 'master'"
This reverts merge request !4710
2025-07-05 01:00:26 +03:00
Andy Lanzone fdcf9f773c Merge branch 'xbox_buttons' into 'master'
Xbox buttons

See merge request enoznal/openmw!1
2025-07-04 14:38:55 -07:00
Andy Lanzone ffec2e8d74 Automatically show Xbox, PS, or Switch button icons 2025-07-04 14:38:55 -07:00
Skyhasacat b29850f4c6 Merge branch 'master' into 'master'
Gamepad GUI Mode: add (optional) native controller support to all menus

See merge request OpenMW/openmw!4710
2025-07-04 21:29:55 +00:00
Alexei KotovandSkyhasacat 4bf43665c4 Revise birthsign tooltip layout (#6792)
Make all description bits distinct widgets to allow proper padding
Use spaces instead of line breaks to separate spells
Enable word-wrapping for description text
Make the tooltip wider and increase padding
2025-07-04 20:03:55 +00:00
Andrew Lanzone 28f3b4a530 Remove unused argument from lambda to fix compiler warning 2025-07-04 12:49:54 -07:00
SkyHasACat 3504e85051 More whitespace 2025-07-04 14:33:15 -05:00
SkyHasACat 424a62187a whitespace? 2025-07-04 14:26:16 -05:00
SkyHasACat ed8b9742ae Add name 2025-07-04 14:22:01 -05:00
SkyHasACat b3105e9382 Fix other changes 2025-07-04 14:22:01 -05:00
SkyHasACat 30e5e17e4c Remove enchanting dialog, missing empty lines 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat fce73395e5 Update file openmw_enchanting_dialog.layout 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 7f11579d39 Update file enchantingdialog.cpp 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 57f8355bac Update file enchantingdialog.hpp 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 30dae411d0 Update file spellcreationdialog.cpp 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 57bb6f2e2f Update file spellcreationdialog.cpp 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 284be88b95 Update file openmw_spellcreation_dialog.layout 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 937c020e58 Update file openmw_spellcreation_dialog.layout 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 190a1266a1 Update 2 files
- /apps/openmw/mwgui/spellcreationdialog.cpp
- /apps/openmw/mwgui/spellcreationdialog.hpp
2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 2d2df30f80 Update file spellcreationdialog.cpp 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat bcb27fff6a Update 2 files
- /apps/openmw/mwgui/spellcreationdialog.cpp
- /apps/openmw/mwgui/spellcreationdialog.hpp
2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat f8c8b9b433 Replace spellcreationdialog.hpp to add player gold to spell creation window. 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 15a525676c Replace spellcreationdialog.cpp to add gold counter for player 2025-07-04 14:22:01 -05:00
GarrettandSkyHasACat 0ac0c62091 Replace openmw_spellcreation_dialog.layout 2025-07-04 14:22:01 -05:00
Andrew Lanzone 04d73cf195 Revert clang formatting suggestion because it breaks the pipeline 2025-07-04 12:02:17 -07:00
Andrew Lanzone ce0ae47478 Expose controller menus setting to Lua 2025-07-04 11:53:36 -07:00
Andrew Lanzone 64284063b3 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-07-04 11:52:31 -07:00
Mads Buvik Sandvei ec3357ff3f Bump UI interface version number 2025-07-04 20:30:31 +02:00
Cody Glassman 28de55df6a docs - use default pygment style in light mode 2025-07-04 11:19:04 -07:00
Cody Glassman bc78aa4198 docs - add semicolons before examples 2025-07-04 11:03:29 -07:00
Cody Glassman a5b8db70a4 docs - improve styling in headers and code blocks 2025-07-04 06:59:05 -07:00
psi29a 1a08565a20 Merge branch 'destinationunknown' into 'master'
Don't add non-existent cell travel destinations (#8349)

Closes #8349

See merge request OpenMW/openmw!4540
2025-07-04 11:06:33 +00:00
psi29a d0af16c5db Merge branch 'travelprice' into 'master'
Rescale the base travel cost by the number of followers (#8446)

Closes #8446

See merge request OpenMW/openmw!4626
2025-07-04 11:05:56 +00:00
psi29a b2228de0b7 Merge branch 'pinnedinventory' into 'master'
Restore 0.45.0 pin button visibility conditions (#8437)

Closes #8437

See merge request OpenMW/openmw!4612
2025-07-04 11:05:40 +00:00
psi29a 3d75dec73d Merge branch 'waterwalkingtcl' into 'master'
Don't enable water collision when collision is disabled (#8414)

Closes #8414

See merge request OpenMW/openmw!4600
2025-07-04 11:04:12 +00:00
psi29a 94507567da Merge branch 'conspiracyofsilence' into 'master'
Make powers immune to silence (#8371)

Closes #8371

See merge request OpenMW/openmw!4557
2025-07-04 11:03:40 +00:00
psi29a 9013ed16f0 Merge branch 'reststates' into 'master'
Inform the player about both resting hindrances (#8408)

Closes #8408

See merge request OpenMW/openmw!4598
2025-07-04 11:03:28 +00:00
psi29a 99a6a04c70 Merge branch 'massselect' into 'master'
Support extended selection in the directory picker (#8113)

Closes #8113

See merge request OpenMW/openmw!4669
2025-07-04 11:02:55 +00:00
Andrew Lanzone 8379c31f13 Add option to show controller tooltips by default 2025-07-04 02:40:52 -07:00
Andrew Lanzone 088b2d1bbc Fix GCC warning 2025-07-03 14:47:34 -07:00
Andrew Lanzone ee33424c20 Prevent controller from dismissing dialog window when there is a choice active 2025-07-03 14:32:13 -07:00
Andrew Lanzone ffac1cdf3c Remove int casts by using size_t in a few places 2025-07-03 14:20:24 -07:00
Mads Buvik Sandvei b1f32c8cee isWindowVisible must handle replaced windows' visibility 2025-07-03 22:11:21 +02:00
Mads Buvik Sandvei 9fe420e562 improve error report when windowId is invalid. 2025-07-03 22:11:21 +02:00
Mads Buvik Sandvei 593988e82b bump lua revision 2025-07-03 22:11:19 +02:00
Mads Buvik Sandvei 7f34e52a11 lua interface for window visibility 2025-07-03 22:10:56 +02:00
Andrew Lanzone 6a1f8b3f69 Merge branch openmw:master into master 2025-07-03 19:03:08 +00:00
Andrew Lanzone 5d8c349899 Fix issues with setControllerFocus 2025-07-03 12:01:24 -07:00
Andrew Lanzone 44fb923d7b Keep active quest focused in same journal session 2025-07-03 12:00:55 -07:00
Evil Eye dbc732231f Allow non-existent techniques to exist 2025-07-03 17:21:50 +02:00
psi29a 0aca34c02b Merge branch 'magicalintegrationtests' into 'master'
Add integration tests for mwscript-magic interactions

See merge request OpenMW/openmw!4511
2025-07-03 13:04:46 +00:00
Kuyondo 32f59c16aa move some util to lua 2025-07-03 19:38:02 +08:00
KuyondoandKuyondo a6cf359820 update offer player side, next frame update view 2025-07-03 15:13:21 +08:00
psi29a d40c4855b1 Merge branch 'showVars' into 'master'
Show global script variables in showVars

See merge request OpenMW/openmw!4614
2025-07-03 07:11:23 +00:00
psi29a ea147d78ed Merge branch 'sortedsaves' into 'master'
Order characters by last save

Closes #8580

See merge request OpenMW/openmw!4730
2025-07-03 07:06:27 +00:00
Evil Eye 206d38f3d7 Fix path handling for files in BSAs 2025-07-03 08:46:23 +02:00
Evil Eye 66b5623bc9 Actually run the new test 2025-07-03 07:37:58 +02:00
Evil Eye 18ad2db59c Remove unused variable 2025-07-03 07:33:03 +02:00
Alexei Kotov a0e0b3c65b Some quick key menu layout fixes 2025-07-03 08:30:50 +03:00
Alexei Kotov 733dfbb89d Don't assume any scripted item is usable 2025-07-03 08:10:59 +03:00
Alexei Kotov 982962c608 Don't center quick keys menu instructions 2025-07-03 08:10:59 +03:00
Alexei Kotov 29177bccb8 Play the item's down sound when an item quick key is assigned 2025-07-03 08:10:59 +03:00
Andrew Lanzone 7cc25d8916 Dialog window improvements: use LB/RB to move up/down by 5; if only one dialog choice, autoselect it. 2025-07-02 22:00:40 -07:00
Alexei Kotov 7cf74c570e Properly disable named exterior destination interior flag 2025-07-03 07:46:09 +03:00
Andrew Lanzone 3767b60512 Fix L1 and R1 buttons not disappearing 2025-07-02 21:35:26 -07:00
Alexei Kotov 00e6e855f1 Don't add non-existent cell travel destinations (#8349) 2025-07-03 07:25:44 +03:00
psi29a 53feb29a5b Merge branch 'landscape-data-bindings' into 'master'
Landscape height and texture bindings for Lua (Revised and Reopened)

See merge request OpenMW/openmw!4724
2025-07-02 21:53:05 +00:00
psi29a 75b4682cd7 Merge branch 'no_null_shader' into 'master'
Fix invalid deletion of shaders during iteration (#7587)

See merge request OpenMW/openmw!4731
2025-07-02 21:45:02 +00:00
psi29a 66befc67d9 Merge branch 'topiclist' into 'master'
Improve topic and magic effect list padding accuracy (#8585)

Closes #8585

See merge request OpenMW/openmw!4580
2025-07-02 21:44:00 +00:00
psi29a b5b5aa4331 Merge branch 'winserver2025' into 'master'
Replace Windows Server 2019 with 2025

Closes #8586

See merge request OpenMW/openmw!4732
2025-07-02 21:43:06 +00:00
psi29a 2309aeec70 Merge branch 'suijutsu' into 'master'
Underwater projectile fixes (#7622, #8303)

Closes #7622 and #8303

See merge request OpenMW/openmw!4567
2025-07-02 21:42:00 +00:00
psi29a 6f48a6f1bf Merge branch 'docs_me_not_v2' into 'master'
Docs - begin restructuring docs

See merge request OpenMW/openmw!4720
2025-07-02 21:37:30 +00:00
Sebastian Fieber f5e24804ce fix format 2025-07-02 20:45:55 +02:00
Evil Eye 7c1dbdd191 Select a fallback character if possible 2025-07-02 20:42:02 +02:00
Evil Eye c3a5ad4328 Declare operator in MWState namespace 2025-07-02 20:29:38 +02:00
Evil Eye d756b02d68 Order characters by last save 2025-07-02 20:29:38 +02:00
Evil Eye acb554faac Only build on one image 2025-07-02 17:56:46 +02:00
Kuyondo 2dc0d8abca use << 2025-07-02 23:51:15 +08:00
Evil Eye 00e7439533 Replace Windows Server 2019 with 2025 2025-07-02 17:13:44 +02:00
Evil Eye dca8c7c163 Add integration tests for mwscript-magic interactions 2025-07-02 17:03:33 +02:00
epochwon 0027a5bcab make the specular terms easier to read, turn the magic number into a const 2025-07-02 10:49:27 -04:00
Sebastian Fieber e4439806ed land bindings afterwork
- fix include order + style
- cellOrName -> cellOrId
- bump lua api revision to 78
- cellOrId is not optional anymore for getHeightAt
2025-07-02 16:14:03 +02:00
Sebastian Fieber eb4d3b7224 Reapply "Merge branch 'landscape-data-bindings' into 'master'"
This reverts commit 3ff7dedfd1.
2025-07-02 16:09:06 +02:00
Cody Glassman 10f86c67fe docs - fix spacing in example lua 2025-07-02 06:04:39 -07:00
psi29a 4520eb077d Merge branch 'lua_pp_order' into 'master'
lua - add ability to query the currently active shaders

Closes #8285

See merge request OpenMW/openmw!4506
2025-07-02 09:45:00 +00:00
psi29a cb0b44e0b2 Merge branch 'bounditems' into 'master'
Interrupt bound item effect if equipment failed (#8383)

Closes #8383

See merge request OpenMW/openmw!4572
2025-07-02 09:43:21 +00:00
psi29a 5a292624a5 Merge branch 'add_scripText_to_mwscriptbindings' into 'master'
lua - add mwscript bindings to core (#8320)

Closes #8320

See merge request OpenMW/openmw!4517
2025-07-02 09:42:25 +00:00
psi29a 5c60168b16 Merge branch 'ini-importer-tidying' into 'master'
INI importer tidying

See merge request OpenMW/openmw!4519
2025-07-02 09:40:58 +00:00
Evil Eye 681a95b89f Merge branch 'fix_keyword_highlighting' into 'master'
FIX keyword substring highlighting regression

Closes #8265 and #1047

See merge request OpenMW/openmw!4685
2025-07-02 06:13:26 +00:00
Charles HornandEvil Eye c948171d5f FIX keyword substring highlighting regression 2025-07-02 06:13:25 +00:00
Alexei Kotov 612411e492 Allow non-actor spell projectiles to fire underwater (#8303) 2025-07-02 08:54:30 +03:00
Alexei Kotov be13b1d085 Handle instant projectile impact before underwater logic (#7622) 2025-07-02 08:54:30 +03:00
Sebastian Fieber fa8ba57ab3 add mwscript bindings to core 2025-07-02 00:57:40 +02:00
Andrew Lanzone e2e8a02a26 Merge branch 'master' of https://gitlab.com/OpenMW/openmw 2025-07-01 12:22:35 -10:00
psi29a 9228f90f46 Merge branch 'RecalcSpellBuyCost' into 'master'
Calculate spell cost when building spell-buying window

Closes #8459

See merge request OpenMW/openmw!4640
2025-07-01 21:38:01 +00:00
psi29a aa652a20f0 Merge branch 'StackValueAffectsFightTerm' into 'master'
Make item value affect theft observer's fight willingness

Closes #8500

See merge request OpenMW/openmw!4673
2025-07-01 21:37:28 +00:00
Aussiemonandpsi29a 5ba0b3ab52 Make item value affect theft observer's fight willingness 2025-07-01 21:37:27 +00:00
psi29a 149587dda4 Merge branch 'scaledselection' into 'master'
Editor: Account for pixel ratio in instance mode mouse coordinates conversion (#6573)

Closes #6573

See merge request OpenMW/openmw!4587
2025-07-01 21:34:40 +00:00
psi29a 583af381a6 Merge branch 'baseresistance' into 'master'
Ignore resistances for base diseases

Closes #8485

See merge request OpenMW/openmw!4662
2025-07-01 21:32:55 +00:00
psi29a 32f13816f8 Merge branch 'equippedSpellIterationFix' into 'master'
Skip duplicate enchantments on Spell Cycle action

Closes #6039

See merge request OpenMW/openmw!4668
2025-07-01 21:32:20 +00:00
Aussiemonandpsi29a 0a9c3ce96f Skip duplicate enchantments on Spell Cycle action 2025-07-01 21:32:20 +00:00
psi29a 48bc9e5dd2 Merge branch 'updatespellwindowquickkey' into 'master'
Update spell window after selecting spell using quickkey #8436

See merge request OpenMW/openmw!4611
2025-07-01 21:29:30 +00:00
psi29a 47aa0b27ff Merge branch 'FixDoublePickpocketBounty' into 'master'
Prevent second bounty for "closed pickpocket window" when steal is already detected

Closes #8519

See merge request OpenMW/openmw!4694
2025-07-01 21:29:06 +00:00
psi29a ceac11d6df Merge branch 'sillyphysics' into 'master'
Stop postponing physics for objects that _don't_ have physics

Closes #8432

See merge request OpenMW/openmw!4658
2025-07-01 21:28:48 +00:00
psi29a aa3e991352 Merge branch 'showmap' into 'master'
Require a non-empty argument in ShowMap (#8466)

Closes #8466

See merge request OpenMW/openmw!4649
2025-07-01 21:28:02 +00:00
psi29a f6bff53398 Merge branch 'idempotent-parallax' into 'master'
Don't forget parallax when reapplying shader visitor

Closes #8341

See merge request OpenMW/openmw!4634
2025-07-01 21:27:01 +00:00
psi29a 917b08e05d Merge branch 'MoonPhaseAndVisibilityFixes' into 'master'
Match vanilla moon phases and visibility times

Closes #8375

See merge request OpenMW/openmw!4616
2025-07-01 21:25:36 +00:00
Aussiemonandpsi29a 5ef947e14f Match vanilla moon phases and visibility times 2025-07-01 21:25:36 +00:00
psi29a a29f4b3ba0 Merge branch 'enchantmentprice' into 'master'
Use the final effect cost to calculate enchantment price (#8340)

Closes #8340

See merge request OpenMW/openmw!4530
2025-07-01 21:23:58 +00:00
psi29a 59eb7b9888 Merge branch 'cattlethief' into 'master'
Fix AI issues with Command spells

Closes #5331

See merge request OpenMW/openmw!4599
2025-07-01 21:18:09 +00:00
psi29a 0a44112dcc Merge branch 'charactername' into 'master'
Revise saved game dialog save info layout (#8313)

Closes #8313

See merge request OpenMW/openmw!4545
2025-07-01 21:17:21 +00:00
psi29a 0d308eae3e Merge branch 'spell____prices' into 'master'
Spell buying window layout tweaks

See merge request OpenMW/openmw!4571
2025-07-01 21:07:03 +00:00
psi29a 48e386bf90 Merge branch 'merchantrepairrepaired' into 'master'
Merchant repair menu layout tweaks

See merge request OpenMW/openmw!4588
2025-07-01 21:06:00 +00:00
psi29a c9f6bdb6e0 Merge branch '__travel_____' into 'master'
Fix Travel window header alignment

See merge request OpenMW/openmw!4569
2025-07-01 21:04:20 +00:00
Cody Glassman 514174ffc4 allow handles to be fetched for non-dynamic shaders 2025-07-01 14:03:41 -07:00
Cody Glassman feeb15d1ff use table instead of vector in return type 2025-07-01 14:03:41 -07:00
Cody Glassman 179341b221 add changelog entry 2025-07-01 14:03:40 -07:00
Cody Glassman 450f587844 lua - add ability to query the currently active shaders 2025-07-01 14:02:48 -07:00
psi29a 33ca7da731 Merge branch 'balmora__________-__________-69gp' into 'master'
Remove excessive spacing between travel destination and price

See merge request OpenMW/openmw!4568
2025-07-01 21:01:26 +00:00
Cody Glassman 2619859786 fix invalid deletion for shaders 2025-07-01 13:58:28 -07:00
psi29a 50f8bc721d Merge branch 'stupidfilters' into 'master'
Bring dialogue filters in line with Morrowind.exe

Closes #8318

See merge request OpenMW/openmw!4525
2025-07-01 20:52:37 +00:00
psi29a d31ac93c69 Merge branch 'itemwidgetbg' into 'master'
Clip HUD item widgets to not overlap the borders (#7740)

Closes #7740

See merge request OpenMW/openmw!4586
2025-07-01 20:50:24 +00:00
psi29a 9347fe5c4a Merge branch 'tbcornottbcwaititstcbactually' into 'master'
Implement TCB interpolation for vectors and scalars (#2379)

See merge request OpenMW/openmw!4539
2025-07-01 20:46:47 +00:00
psi29a 2ffc44c31f Merge branch 'filenameexceptions' into 'master'
Remove file name naming convention check exceptions (#7249)

Closes #7249

See merge request OpenMW/openmw!4551
2025-07-01 20:45:33 +00:00
psi29a 2b0e5c3cc1 Merge branch 'enchantment_exclamationmark' into 'master'
Allow GetSpellEffects to detect enchantments by id

Closes #3769

See merge request OpenMW/openmw!4521
2025-07-01 20:40:08 +00:00
AnyOldName3 5ab73f5ecb t t t t t t t typo fix 2025-07-01 21:24:45 +01:00
psi29a ac7b3e9de9 Merge branch 'itshappening' into 'master'
Bump us up to 0.50.0

See merge request OpenMW/openmw!4502
2025-07-01 20:23:24 +00:00
epochwon c89b2b0c60 fix indenting 2025-07-01 10:42:42 -04:00
psi29a 675146bd8b Merge branch 'sellmesweetlittlecrashes' into 'master'
Release / Read .env file and expose it as output (push) Successful in 1m6s
Build and test / Read .env file and expose it as output (push) Successful in 1m6s
Build and test / Ubuntu (push) Failing after 27m36s
Build and test / MacOS (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Build and test / Windows (2019) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Clear the window manager before destroying singletons

Closes #8576

See merge request OpenMW/openmw!4727
2025-07-01 11:41:15 +00:00
psi29a eca9b84f39 Merge branch 'shortcutsv' into 'master'
Use string_view in CSMPrefs::ShortcutManager

See merge request OpenMW/openmw!4729
2025-07-01 11:40:21 +00:00
Evil Eye 2ff497c3e5 Use string_view in CSMPrefs::ShortcutManager 2025-06-29 12:49:22 +02:00
Evil Eye cbb50c001b Destroy the script manager after the window manager 2025-06-28 11:25:19 +02:00
Cody Glassman 8ed5d84ff7 docs - update theme in requirements.txt 2025-06-27 07:11:45 -07:00
Cody Glassman c4506d2d67 docs - add missing inherited fields and events to widgets 2025-06-26 18:37:46 -07:00
epochwon 13f1b76a25 tabs to spaces 2025-06-25 17:23:04 -04:00
epochwon fdc878d766 elongate specular highlight 2025-06-25 17:04:21 -04:00
Cody Glassman 759cea3051 docs - advanced settings 2025-06-23 17:39:01 -07:00
psi29a 164563f522 Merge branch 'intel-mac-builds' into 'master'
Build and test / Read .env file and expose it as output (push) Successful in 9s
Release / Read .env file and expose it as output (push) Successful in 5s
Build and test / Ubuntu (push) Failing after 31m39s
Build and test / MacOS (push) Canceled after 0s
Build and test / Windows (2019) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
[CI] Add intel mac build with separate build step

See merge request OpenMW/openmw!4718
2025-06-23 08:59:11 +00:00
psi29a d49a42037a Merge branch 'fix_docs' into 'master'
Fix some errors in Lua docs

See merge request OpenMW/openmw!4725
2025-06-23 06:52:12 +00:00
Cody Glassman 937f2bd441 docs - sphinx card colors 2025-06-22 15:56:16 -07:00
Andrew Lanzone 88b43cabec Reset controller focus when reopening container and quest menus 2025-06-22 14:47:54 -07:00
Andrew Lanzone 5777a3cc3f Update controller buttons shown for companion window 2025-06-22 14:44:32 -07:00
Sarah Sunday 493827285b [CI] Fix path and big env goof 2025-06-22 13:35:23 -05:00
Cody Glassman ce8f81a6a7 docs - less blue dark 2025-06-22 09:54:11 -07:00
Cody Glassman 8301dafad1 docs - remove ugly blue in dark mode links 2025-06-22 09:31:55 -07:00
Sarah Sunday 50e3c9d500 [CI] Ccache flow tweak, use forked commands, cd build 2025-06-22 10:35:16 -05:00
Andrei Kortunov 4bbc5710fb Fix some errors in Lua docs 2025-06-22 15:11:49 +04:00
Evil Eye a524b3c9b0 Merge branch 'clangcast' into 'master'
Export symbols for openmw binary under Clang (#8039)

Closes #8039

See merge request OpenMW/openmw!4722
2025-06-22 06:17:25 +00:00
Andrew Lanzone fb5fa6ce18 Fix controller tooltip disappearing because of spurious controller input 2025-06-21 22:04:35 -07:00
Andrew Lanzone c41f034a23 Scroll the list of topics in controller mode 2025-06-21 21:34:11 -07:00
Sarah Sunday adc4698c44 [CI] Revert ccache script forking, rename try, cleanup 2025-06-21 21:19:07 -05:00
Sarah Sunday faa9af4428 [CI] Overhaul mac CI flow 2025-06-21 19:54:42 -05:00
Sarah Sunday 12f3596220 [CI] Specify intel brew location 2025-06-21 14:19:43 -05:00
Sarah Sunday 139bde6420 [CI] Fork before install mac arm/intel steps, prefix with arch command 2025-06-21 13:53:40 -05:00
Sarah Sunday 0f551c8233 [CI] Always use arm deps 2025-06-21 13:41:51 -05:00
Sarah Sunday 608831265c [CI] Attempt to add intel mac builds with separate build step 2025-06-21 13:41:51 -05:00
Alexei Kotov acd4e77a85 Merge branch 'revert-0589b57a' into 'master'
Revert "Merge branch 'landscape-data-bindings' into 'master'"

See merge request OpenMW/openmw!4723
2025-06-21 20:25:37 +03:00
Alexei Kotov 3ff7dedfd1 Revert "Merge branch 'landscape-data-bindings' into 'master'"
This reverts merge request !4500
2025-06-21 19:03:11 +03:00
Cody Glassman 0589b57a47 Merge branch 'landscape-data-bindings' into 'master'
Landscape height and texture bindings for Lua (Revised)

See merge request OpenMW/openmw!4500
2025-06-21 08:49:38 -07:00
psi29a 8367604331 Merge branch 'path-delousing' into 'master'
Handle paths passed on the command line properly

Closes #8567

See merge request OpenMW/openmw!4721
2025-06-21 10:00:23 +00:00
Andrew Lanzone 9380233ab7 Merge branch 'master' of https://gitlab.com/enoznal/openmw 2025-06-20 23:39:03 -07:00
Andrew Lanzone 143c14c556 Merge branch openmw:master into master 2025-06-21 06:38:19 +00:00
Andrew Lanzone 190680a3a9 Replace semi-janky rstick controller bindings with dpad 2025-06-20 23:37:53 -07:00
Andrew Lanzone 2905ed5fb1 Fix controller selection of nested dialog choices 2025-06-20 22:41:39 -07:00
Cody Glassman 74c9da78d3 docs - dropdown toc 2025-06-20 17:23:03 -07:00
Cody Glassman ac400f0ebc docs - dropdown toc 2025-06-20 17:17:13 -07:00
Cody Glassman 3abc86be73 docs - fix interfaces 2025-06-20 13:05:15 -07:00
Cody Glassman 320b2cf55e docs - adjust more ordering and add interfaces to package table 2025-06-20 13:00:30 -07:00
Sebastian Fieber b1326e4554 update doc for getTextureAt 2025-06-20 22:00:02 +02:00
Cody Glassman 3bdf57f7c1 docs - support prism and reorder some TOC 2025-06-20 10:42:35 -07:00
Cody Glassman 79f18effdd docs - unhide a TOC 2025-06-20 06:23:54 -07:00
Cody Glassman 39917f1ebe docs - address more naming consistency with hyphens 2025-06-20 06:12:55 -07:00
Cody Glassman 8b56415597 docs - remove ligature usage in code blocks 2025-06-19 20:32:15 -07:00
Cody Glassman cc5540039e docs - better contrast for luadoc 2025-06-19 19:32:57 -07:00
Sebastian Fieber 1ac407f32b fix rebase error 2025-06-19 22:17:26 +02:00
Sebastian Fieber 0e68e36aa7 that shouldn't have been touched 2025-06-19 22:17:26 +02:00
Sebastian Fieber 3207f3a387 clang-format 2025-06-19 22:17:26 +02:00
Sebastian Fieber 732fb4affe inline fillLandData and return empty table instead of throwing 2025-06-19 22:17:26 +02:00
Sebastian Fieber 03e4735b19 add #8112 to changelog 2025-06-19 22:17:26 +02:00
Sebastian Fieber 3e0685e4a6 don't double sample + only allow default worldspace 2025-06-19 22:17:26 +02:00
Sebastian Fieber effb3de2a7 const 2025-06-19 22:17:26 +02:00
Sebastian Fieber 76e2c77517 check for lcell also 2025-06-19 22:17:26 +02:00
Sebastian Fieber 4ede868ed2 fix typo 2025-06-19 22:17:26 +02:00
Sebastian Fieber 8de0ccc82c remove redundant code 2025-06-19 22:17:26 +02:00
Sebastian Fieber 7c76387ffe no interior cell + make cellOrName mandatory 2025-06-19 22:17:26 +02:00
Sebastian Fieber 5d0986e812 Misc::NotNullPtr<MWWorld::ESMStore> to MWWorld::ESMStore& store 2025-06-19 22:17:26 +02:00
Sebastian Fieber 6671c12ad2 reorder of documentation for landbindings in core.lua 2025-06-19 22:17:26 +02:00
Sebastian Fieber 47453b307a no auto in landbindings.cpp 2025-06-19 22:17:26 +02:00
Sebastian Fieber f3128f9c7b remove unused include 2025-06-19 22:17:26 +02:00
Sebastian Fieber 8954f45867 fixes for landbindings.cpp 2025-06-19 22:17:26 +02:00
Sebastian Fieber fc772744d2 don't touch ESMTerrain::Storage 2025-06-19 22:17:26 +02:00
Sebastian Fieber 3d07b63ad8 don't copy store 2025-06-19 22:17:26 +02:00
Sebastian Fieber 940e73a356 landbindings - static to anonymous namespace + use references 2025-06-19 22:17:26 +02:00
Sebastian Fieber ea02c69186 fix index check + cast to size_t 2025-06-19 22:17:26 +02:00
Sebastian Fieber 4182279f72 deduplication for landbindings.cpp + slight api changes
- remove textureId from return
- return plugin name instead of plugin id
2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber dcf0c6e314 simplify texture retrieval for land bindings 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber 901c6b94a6 remove unnecessary land loading 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber c711179b8f apply changes requested in the code review 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber 378093791b update the docs for land functions 2025-06-19 22:17:26 +02:00
Sebastian Fieber 8917103bf3 put land bindings in a table in openmw.core 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber 336275292e reorder includes 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber 3b962e3fd4 reorder includes 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber 22a0dce4a6 reorder includes 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber fe68a098ea reorder includes 2025-06-19 22:17:26 +02:00
Sebastian Fieber 1521d5195a add bindings for land textures 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber 283be9f4f0 add docs for the new binding 2025-06-19 22:17:26 +02:00
CalandielandSebastian Fieber 910690c7e5 expose a terrain height getter 2025-06-19 22:17:26 +02:00
AnyOldName3 71d334fe79 Fix MacOS even more 2025-06-19 19:55:26 +01:00
Cody Glassman d500f801cc docs - support flyout selector addon 2025-06-19 10:12:59 -07:00
AnyOldName3 bee9716262 Fix getLocalPath for MacOS 2025-06-19 16:32:21 +01:00
Alexei Kotov 5938ba528f Export symbols for openmw binary under Clang (#8039) 2025-06-19 14:43:10 +03:00
Andrew Lanzone 50e5863749 Use shoulder buttons on wait menu, similar to other slider menus 2025-06-18 19:46:22 -07:00
Cody Glassman b0fb0024bc docs - fix padding to accomodate hidden element 2025-06-18 17:58:38 -07:00
Cody Glassman 37e0566745 docs - upgrade theme 2025-06-18 17:48:09 -07:00
AnyOldName3 323ee5f79d Remove a line break that clang-format was fussing about 2025-06-19 00:27:08 +01:00
AnyOldName3 f7b8091117 Add missing semicolon 2025-06-19 00:23:52 +01:00
AnyOldName3 276e0e6765 Remove vestigial include 2025-06-19 00:22:58 +01:00
AnyOldName3 9a28216cda Update changelog 2025-06-19 00:19:22 +01:00
AnyOldName3 acbc0a9b8f Fix launching other binaries when the CWD is not the binary directory 2025-06-19 00:19:14 +01:00
Cody Glassman fa0b3a04df docs - change theme for luadoc monospace to match theme 2025-06-18 10:29:05 -07:00
psi29a efbef1ec96 Merge branch 'nonusercontent' into 'master'
Handle implicitly checked files more consistently (#8563)

See merge request OpenMW/openmw!4716
2025-06-18 15:53:34 +00:00
Cody Glassman dab2538e0c docs - unify usage of code blocks in install openmw 2025-06-18 06:33:14 -07:00
Cody Glassman 638ceb73b7 docs - fix layout shift when expanding TOC 2025-06-18 06:16:09 -07:00
Cody Glassman 23a6208537 Revert "docs - chevron 7 locked"
This reverts commit 4e32e9f127.
2025-06-17 21:05:41 -07:00
Cody Glassman 4e32e9f127 docs - chevron 7 locked 2025-06-17 21:01:03 -07:00
Cody Glassman b7a1f76f4d docs - make table headers real headers 2025-06-17 18:22:26 -07:00
Cody Glassman cd1bd0eeaf docs - enable scroll to top widget 2025-06-17 18:01:49 -07:00
Cody Glassman d81c666a2c docs - increase width of left TOC on large screens 2025-06-17 17:59:30 -07:00
Cody Glassman 45d73957c1 docs - style left TOC scroll 2025-06-17 17:55:52 -07:00
Cody Glassman 733631a771 docs - more styling 2025-06-17 17:39:10 -07:00
Cody Glassman 36941bf4e9 docs - add table hover highlight and increase max width 2025-06-17 16:31:18 -07:00
Cody Glassman 49a651761f docs - clean up styles and add comments for each override 2025-06-17 16:14:19 -07:00
Cody Glassman e649498f06 docs - adjust styling for em 2025-06-17 15:54:04 -07:00
Cody Glassman 4032f4e06c docs - more restructuring 2025-06-17 11:42:13 -07:00
Cody Glassman 8439ac1b4e docs - revert bump in sphinx version 2025-06-17 11:05:08 -07:00
Cody Glassman 766b8f3145 docs - more restructuring 2025-06-17 11:03:55 -07:00
Alexei Kotov 5cc5307c10 Merge branch 'upgrade-mac-qt6' into 'master'
[CI] Mac - use qt@6

See merge request OpenMW/openmw!4719
2025-06-17 19:12:37 +03:00
Alexei Kotov 4a6d2465b4 Remove Qt PATH adjustment (Qt6 is symlinked) 2025-06-17 19:11:39 +03:00
Cody Glassman 30b27c966f docs - switch to awesome sphinx theme 2025-06-17 08:44:15 -07:00
psi29a 323e83784f Merge branch 'master' into 'master'
Changed desktop files to appropriately use StartupWMClass. What this does is...

See merge request OpenMW/openmw!4714
2025-06-17 07:52:32 +00:00
Claireandpsi29a f84983a5d4 Changed desktop files to appropriately use StartupWMClass. What this does is... 2025-06-17 07:52:31 +00:00
Cody Glassman 1de86f95ac docs - slightly less ugly dark mode code blocks 2025-06-16 16:41:37 -07:00
Cody Glassman f9af61f096 docs - use shortened context for player 2025-06-16 16:35:24 -07:00
Cody Glassman 21cf7bb397 docs - add context tags to interfaces and aux packages 2025-06-16 16:32:51 -07:00
AnyOldName3 2ce4571c3a Handle paths passed on the command line properly
Fixes https://gitlab.com/OpenMW/openmw/-/issues/8567.

Also maybe horribly breaks lots of things because it removes some insanity from https://gitlab.com/OpenMW/openmw/-/merge_requests/86, which would set the CWD to the local directory just in case any local-relative paths were expressed relatively without the explicit base being the local path.
2025-06-17 00:26:06 +01:00
Cody Glassman 132ff5294c docs - bump documentor commit 2025-06-16 16:19:20 -07:00
Cody Glassman 522a572032 docs - clean up styling for dark mode 2025-06-16 16:05:43 -07:00
Cody Glassman 49865b1aa1 docs - fix package version and logo 2025-06-16 15:55:59 -07:00
Cody Glassman 8d7bdc2e61 docs - remove unused sphinx theme from requirements.txt 2025-06-16 15:39:49 -07:00
Cody Glassman 302d92561d docs - begin restructing docs 2025-06-16 15:36:43 -07:00
Igilq 28f8b40d9d Merge branch openmw:master into master 2025-06-16 17:47:52 +00:00
Sarah Sunday 6d89ae1a75 [CI] Mac - use qt@6 2025-06-14 16:09:07 -05:00
Andrew Lanzone 0a03403277 Fix closing dialogue when a choice is active; improve scrolling 2025-06-14 13:42:51 -07:00
Andrew Lanzone 8d545a43d5 Scrolll the list of quests in controller mode 2025-06-14 13:14:32 -07:00
Andrew Lanzone ef651ee187 Update swedish translation for putting an item in a container 2025-06-14 13:13:36 -07:00
Alexei Kotov e7305e7c97 Merge branch 'colorfullights' into 'master'
Use the Color type for Light colours in Lua

Closes #8558

See merge request OpenMW/openmw!4715
2025-06-14 00:36:45 +03:00
Alexei Kotov 780a4904bd Handle implicitly checked files more consistently (#8563) 2025-06-13 22:14:08 +03:00
Andrew Lanzone 0502366be9 Merge branch openmw:master into master 2025-06-13 04:44:05 +00:00
Andrew Lanzone b4ede02cce Move hardcoded strings to i10n 2025-06-12 21:43:01 -07:00
Alexei Kotov 019af35278 Merge branch 'ESSImportRegression' into 'master'
Import ESS kill count / selected spell as RefIDs, handle old INFO records

Closes #8559

See merge request OpenMW/openmw!4712
2025-06-12 23:28:15 +03:00
AussiemonandAlexei Kotov f085717aef Import ESS kill count / selected spell as RefIDs, handle old INFO records 2025-06-12 23:28:14 +03:00
Evil Eye 45a51bceb2 Implement equal_to for Color 2025-06-12 17:48:11 +02:00
Evil Eye be0cbb7277 Use the Color type for Light colours in Lua 2025-06-12 17:17:28 +02:00
Andrew Lanzone e01b8d372c In controller mode, make focused spell blue to match other menus 2025-06-11 23:16:08 -07:00
Alexei Kotov b988190fba Merge branch 'add-missing-line-break' into 'master'
Add missing line break

See merge request OpenMW/openmw!4713
2025-06-11 16:22:55 +03:00
AnyOldName3 d8c764ba5a Add missing line break
The bullet points don't render correctly without it.
2025-06-11 14:02:58 +01:00
psi29a 5163214878 Merge branch 'readfileqlists' into 'master'
Optimize value deduping in Qt openmw.cfg loading

See merge request OpenMW/openmw!4708
2025-06-11 09:37:56 +00:00
psi29a d2e7da0c19 Merge branch 'crash-catcher-errors' into 'master'
Emit visible errors when crash dump creation fails

See merge request OpenMW/openmw!4711
2025-06-11 07:26:11 +00:00
Andrew Lanzone 1e3ddee291 Remove default string when creating a potion that won't work 2025-06-10 21:42:51 -07:00
AnyOldName3 a179001052 Empty commit 2025-06-10 14:48:24 +01:00
Alexei Kotov 0df8869f59 Cache computed supported directions
Invalidated when animation sources are cleared or added
2025-06-10 12:09:59 +03:00
Andrew Lanzone 47b3674bac Update controller focus to use a message box's default focus if available 2025-06-09 22:03:12 -07:00
Andrew Lanzone 57ae097257 Add controller support to the companion window; also fix giving stacks 2025-06-09 19:23:49 -07:00
Andrew LanzoneandJoakim Berg 4e2e8d1a81 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Joakim Berg <zapp90@gmail.com>
2025-06-10 01:08:04 +00:00
AnyOldName3 7347f4f4e3 Some review stuff 2025-06-09 14:13:50 +01:00
AnyOldName3 9010a5bb32 Emit visible errors when crash dump creation fails
Also possibly fix the errors, as I was getting them when I started testing, and then wasn't by the time I'd got the code how I wanted it.
However, nothing in this commit looks like it *should* fix any errors.
2025-06-09 00:20:58 +01:00
Andrew Lanzone f6b06057fa Fix clang warning 2025-06-08 13:51:09 -07:00
Evil Eye d1724c062a Format Polish translations and add type attribute to untranslated values 2025-06-08 21:19:24 +02:00
Igilq ff03e9ee46 updated translation 2025-06-08 20:35:36 +02:00
Andrew Lanzone 8094761c3e Fix sign-compare warnings 2025-06-08 02:28:42 -07:00
Igilq 4cae8c0c1c Merge branch openmw:master into master 2025-06-08 07:27:37 +00:00
Igilq 941798397e Edit components_pl.ts 2025-06-08 07:27:12 +00:00
Andrew Lanzone 81720892f9 Fix compiler warnings 2025-06-08 00:10:47 -07:00
Andrew Lanzone ba9d85dc30 Run lupdate and add translations 2025-06-07 23:18:48 -07:00
Andrew Lanzone be32cbb413 Fix clang format issues 2025-06-07 22:51:29 -07:00
Andy LanzoneandGitHub 0ca6bc012c Merge branch 'OpenMW:master' into master 2025-06-07 20:39:57 -07:00
Alexei Kotov de158a476c Optimize value deduping in Qt openmw.cfg parsing 2025-06-07 11:37:57 +03:00
Andrew Lanzone ea70f2b5c2 Show tooltips in controller mode on spell menus 2025-06-07 00:35:46 -07:00
Igilq cf2460ca59 Edit AUTHORS.md 2025-06-07 06:17:02 +00:00
psi29a 1c242425b0 Merge branch 'finite_number' into 'master'
Release / Read .env file and expose it as output (push) Successful in 1m7s
Build and test / Read .env file and expose it as output (push) Successful in 1m7s
Build and test / Ubuntu (push) Failing after 1h6m8s
Build and test / MacOS (push) Canceled after 0s
Build and test / Windows (2019) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Reduce code duplication for finite number and add tests

See merge request OpenMW/openmw!4707
2025-06-06 22:14:32 +00:00
Igilq 4478b1be8f updated translation 2025-06-06 15:27:25 +00:00
Igilq 451d3b0b9a Merge branch openmw:master into master 2025-06-06 15:06:56 +00:00
Igilq 7f1018a184 added more translation 2025-06-06 16:59:50 +02:00
psi29a 85742a190a Merge branch 'animatedmenus' into 'master'
Render openmw.animation inaccessible in menu and global scripts

See merge request OpenMW/openmw!4674
2025-06-06 12:21:01 +00:00
Andrew Lanzone b1989ffdf7 Limit size of inventory menu in controller mode 2025-06-06 00:34:42 -07:00
Andrew Lanzone b2a5ded929 Fix scrolling list of items to repair or recharge 2025-06-06 00:34:23 -07:00
Andrew Lanzone dc68f28a40 Disable right stick from panning map if zooming maps is enabled 2025-06-06 00:34:01 -07:00
elsid 267ce1ec9b Reduce code duplication for finite number 2025-06-06 00:05:07 +02:00
elsid 178f216317 Add Lua test for passing a NaN value 2025-06-05 23:58:41 +02:00
Evil Eye c05d2d1d38 Restrict openmw.animation to local scripts 2025-06-05 20:15:40 +02:00
Evil Eye 360abd9b90 Render openmw.animation inaccessible in menu scripts 2025-06-05 20:13:36 +02:00
psi29a 093b562f58 Merge branch 'moreFiniteFreezes' into 'master'
Protect more bindings from non-finite numbers

See merge request OpenMW/openmw!4704
2025-06-05 11:31:39 +00:00
Aussiemon 0d96d71be6 Change World.setGameTimeScale to float 2025-06-04 11:40:53 -06:00
Andrew Lanzone c35e0d7336 Add menu click sounds to some menus when activated by the controller 2025-06-03 21:57:43 -07:00
Andrew Lanzone 2dfe1ef7b1 Show L1 and R1 buttons next to tabs 2025-06-03 21:23:21 -07:00
Andrew Lanzone ae676e1d70 Fix not checking bounds in some controller menus 2025-06-03 20:17:53 -07:00
Aussiemon e2cf80e3a6 Protect more bindings from non-finite numbers 2025-06-03 19:34:10 -06:00
Andrew Lanzone a824993a60 Fix controller tooltips in magic menu appearing for wrong spell 2025-06-03 08:56:39 -07:00
Andrew Lanzone a6d03717cb Hide cursor icon when showing controller tooltips 2025-06-03 00:44:45 -07:00
psi29a cf258821b4 Merge branch 'hexplusone' into 'master'
Correctly format single digit hex values

Closes #8541

See merge request OpenMW/openmw!4700
2025-06-03 06:41:04 +00:00
psi29a a74b6690a7 Merge branch 'linearbloom' into 'master'
Avoid negative base pow UB in linear bloom

See merge request OpenMW/openmw!4702
2025-06-03 06:40:40 +00:00
Igilq 62c1167620 added polish translation 2025-06-03 08:06:45 +02:00
Andy LanzoneandGitHub 43b5176367 Merge branch 'OpenMW:master' into master 2025-06-02 00:47:04 -07:00
Andrew Lanzone e50822d1d2 Remember the selected dialog topic when new topics are added to the list 2025-06-02 00:41:09 -07:00
Andrew Lanzone 6da6b9b98f Update controller support for scroll window to use the keybaord for smoother scrolling 2025-06-02 00:17:10 -07:00
Andrew Lanzone 8ae193abe8 Fix issue when selecting an inventory item with the tooltip visible 2025-06-02 00:11:01 -07:00
psi29a 1fff2f0199 Merge branch 'setnew' into 'master'
Don't use item(QString) while marking new content files

See merge request OpenMW/openmw!4701
2025-06-02 07:08:05 +00:00
Andrew Lanzone 21286aa376 Change 'Back' to 'Cancel' in button prompts to match windows 2025-06-01 23:27:49 -07:00
Andy LanzoneandGitHub 51f9ce890e Merge branch 'OpenMW:master' into master 2025-06-01 22:57:37 -07:00
Andrew Lanzone 6bb92c0589 Clean up logs 2025-06-01 22:55:21 -07:00
Andrew Lanzone ea71a0bb4f Make controller selection wrap in inventory or containers 2025-06-01 22:13:58 -07:00
Andrew Lanzone df237b5f9b Add controller support to quick key menu 2025-06-01 21:34:20 -07:00
Andrew Lanzone 2aa9847b24 Update controller buttons for character creation and level up 2025-06-01 16:27:49 -07:00
Andrew Lanzone 263863f3f2 Fix modals opening above inventory causing it to change size 2025-06-01 16:22:22 -07:00
Alexei Kotov 7113cef501 Avoid negative x pow UB in linear bloom 2025-06-02 00:59:32 +03:00
Alexei Kotov ecc9e8f5cd Merge branch 'silencedcode' into 'master'
Remove dead code

See merge request OpenMW/openmw!4699
2025-06-01 23:23:35 +03:00
psi29a 79a2735e19 Merge branch 'datachanged' into 'master'
Launcher: Reload cells after a short delay (#8478)

See merge request OpenMW/openmw!4664
2025-06-01 10:47:23 +00:00
psi29a 65155a6e6a Merge branch 'datachangedcalls' into 'master'
Content selector: Cut down on unnecessary dataChanged calls (#8478)

See merge request OpenMW/openmw!4671
2025-06-01 10:46:45 +00:00
Andrew Lanzone 95ed6b51da Allow navigating journal indices with a controller 2025-06-01 01:49:57 -07:00
Andrew Lanzone 63a533cd51 Add controller support to the level up dialog 2025-05-31 20:23:29 -07:00
Andrew Lanzone e3a9b71bb9 Add helper function for toggling controller focus on lists 2025-05-31 19:43:28 -07:00
Andrew Lanzone 2dc1d8fed7 Add controller support to merchant repair window 2025-05-31 19:24:27 -07:00
Andrew Lanzone cbe74cdab4 Add controller support to repair and recharge menus 2025-05-31 18:58:30 -07:00
Alexei Kotov 3dfc3d7022 Don't use item(QString) while marking new content files 2025-06-01 03:22:18 +03:00
Andrew Lanzone d3c7904e64 Rename controller help function in item view 2025-05-31 16:34:07 -07:00
Andrew Lanzone 5276d7bab2 Several tweaks to the inventory menu 2025-05-31 16:02:13 -07:00
Andy LanzoneandGitHub 6185683ca3 Merge branch 'OpenMW:master' into master 2025-05-31 15:29:25 -07:00
Andrew Lanzone 2d532100eb Add controller supoprt to enchanting menu 2025-05-31 15:28:13 -07:00
Andrew Lanzone 40441a065a Add controller support to alcmhemy menu 2025-05-31 11:58:35 -07:00
Evil Eye 9929c35021 Correctly format single digit hex values 2025-05-31 15:43:50 +02:00
Evil Eye 4e8a713819 Remove dead code 2025-05-31 15:26:11 +02:00
Andrew Lanzone d18413f63a Add controller support to spell making window 2025-05-30 01:10:57 -07:00
psi29a 0c6c71f6cb Merge branch 'qprogressbar' into 'master'
Increment some new Qt progress bars the canonical way

See merge request OpenMW/openmw!4698
2025-05-30 07:22:35 +00:00
psi29a ed03babb08 Merge branch 'consolesearch' into 'master'
Uncursify forward/reverse console search (#8532)

Closes #8532

See merge request OpenMW/openmw!4697
2025-05-30 07:21:26 +00:00
Alexei Kotov e7976a544a Increment some new Qt progress bars the canonical way 2025-05-29 03:33:03 +03:00
Alexei Kotov f7a33d24e2 Uncursify forward/reverse console search (#8532)
Correct search start/end calculation, give normal search the memo that the end iterator's meaning changed and fix broken invalid range guards.
2025-05-28 22:11:22 +03:00
Andrew Lanzone af27e9e5d6 Allow shoulder buttons to jump count slider to either extreme 2025-05-27 22:51:03 -07:00
Andrew Lanzone 451d68461c Add controller support to skill and attribute menus 2025-05-27 22:40:00 -07:00
Alexei Kotov b0d389319c Merge branch 'layer_desync' into 'master'
Prevent conflicts between UI layer insertions

See merge request OpenMW/openmw!4696
2025-05-27 17:45:11 +03:00
uramer 32169155bb Fix before insert index 2025-05-27 11:56:16 +00:00
Andrew Lanzone f67aae086a Improve scrolling in list windows and fix a crash in a few menus when no items are selectable 2025-05-26 23:07:20 -07:00
Andrew Lanzone 274434e0d6 Add controller support to travel window 2025-05-26 22:52:10 -07:00
Andrew Lanzone 14b0c9afbe Add controller support to barter window 2025-05-26 21:08:05 -07:00
psi29a 8060a89bf6 Merge branch 'CameraSetYawCrash' into 'master'
Prevent hard freeze when camera receives invalid inputs from Lua

Closes #8503

See merge request OpenMW/openmw!4681
2025-05-26 07:22:11 +00:00
Aussiemonandpsi29a d2f1eeff98 Prevent hard freeze when camera receives invalid inputs from Lua 2025-05-26 07:22:10 +00:00
Andrew Lanzone 71fd8b8840 Add controller support to spell buying and training windows 2025-05-25 23:14:13 -07:00
Andrew Lanzone cd745c7df3 Swap some controller button assignments 2025-05-25 22:51:43 -07:00
Andrew Lanzone 25fa9484d3 Add a default save game name in controller mode 2025-05-25 22:08:43 -07:00
Andrew Lanzone d6ed416402 Allow pinning map window in controller mode 2025-05-25 16:12:19 -07:00
uramer b7b6a41aec Bump API revision 2025-05-25 12:32:31 +02:00
uramer fa3e8ea74d Prevent conflicts between UI layer insertions 2025-05-25 12:32:29 +02:00
Andrew Lanzone 45de167b6b Adjust layer of controller button overlay so it doesn't hide tooltips 2025-05-24 21:29:06 -07:00
Andrew Lanzone d6c23f7664 Add controller support to map's node dialog 2025-05-24 21:28:43 -07:00
Andrew Lanzone cf26020ed6 Fix several minor issues with controller inventory menus 2025-05-24 20:56:43 -07:00
Andrew Lanzone 3eec24b2a6 Limit the size of controller-focused inventory windows on large screens 2025-05-24 20:08:45 -07:00
Andrew Lanzone f1c34ea7b1 Add a tab bar above inventory to show active tab and change tabs with mouse 2025-05-24 16:00:13 -07:00
Andrew Lanzone d759418f01 Add controller support for all four inventory menus 2025-05-24 14:17:41 -07:00
psi29a 8a10de5fed Merge branch 'kaamatan-seminggu-lagi-8165' into 'master'
Remove redundant activate check in `activateBy` #8165

See merge request OpenMW/openmw!4690
2025-05-24 12:35:09 +00:00
Kuyondo 86783e8758 also for creatures 2025-05-23 23:46:42 +08:00
Kuyondo 2df7ded814 respawning npc respawns in origin cell 2025-05-23 18:15:24 +08:00
psi29a 42ca8e31eb Merge branch 'equipunequip' into 'master'
Allow equip attach/detach keys to coincide with the start key

See merge request OpenMW/openmw!4691
2025-05-23 07:26:58 +00:00
psi29a a8334a237b Merge branch 'supernamespace' into 'master'
Fix compilation on MSVC

See merge request OpenMW/openmw!4692
2025-05-23 07:25:07 +00:00
Aussiemon 192cf1535b Fix second instance of mPickpocketDetected set after use 2025-05-22 16:10:05 -06:00
Aussiemon b5aaf4ca30 Fix mPickpocketDetected flag being set after use 2025-05-22 16:03:52 -06:00
Evil Eye 5cf8191cea Fix compilation on MSVC 2025-05-22 17:31:33 +02:00
Alexei Kotov e3daff7b17 Support extended selection in the directory picker (#8113) 2025-05-22 15:49:54 +03:00
Alexei Kotov e8b0ee874f Launcher: Reload cells after a short delay (#8478) 2025-05-22 15:42:56 +03:00
Alexei Kotov 2342dbe0f5 Merge branch 'fix_launcher_ui_freeze' into 'master'
Make launcher UI on content files selection more responsive (#8478)

See merge request OpenMW/openmw!4682
2025-05-22 15:37:23 +03:00
psi29a 6ef3c089bf Merge branch 'flagsgamefiles' into 'master'
Make the horrifying content model flags() game search less horrifying (#8478)

See merge request OpenMW/openmw!4688
2025-05-22 09:45:30 +00:00
elsid 157e8c763c Show progress dialog for setting content list 2025-05-22 07:47:58 +02:00
elsid 3955428f87 Show progress dialog on updating content selection 2025-05-22 07:47:38 +02:00
Alexei Kotov 9387f50f77 Allow equip attach/detach keys to coincide with the start key 2025-05-22 04:53:34 +03:00
Alexei Kotov 5ffcd21eee Content selector: Cut down on unnecessary dataChanged calls (#8478)
setData shouldn't do dataChanged calls setCheckState already does
setCheckState should emit dataChanged for downstream dependencies unconditionally
setCheckState shouldn't emit dataChanged for upstream dependencies that weren't enabled
2025-05-22 01:01:41 +03:00
elsid 0fc22b2b2d Check selected files existence in the reload cells thread
This reduces UI reponse time.
2025-05-21 22:11:22 +02:00
Kuyondo b7a7936dd6 api revision 73 to 74 2025-05-22 02:49:45 +08:00
Kuyondo 30da6dc508 allow activateBy to trigger handlers 2025-05-22 02:45:29 +08:00
Andrew Lanzone 5e3a49ade5 Make right stick scroll dialog history 2025-05-20 22:41:17 -07:00
Andrew Lanzone ba0a579371 Play correct sound and update button overlay when swapping between menus 2025-05-20 19:32:13 -07:00
psi29a b7a48e1d78 Merge branch 'disable-shadows-even-harder' into 'master'
Disable shadows even harder

Closes #8514

See merge request OpenMW/openmw!4686
2025-05-20 14:12:57 +00:00
Alexei Kotov 2c6d11f95e Make the horrifying content model flags() game search less horrifying
Properly exit early and cache game file check result
2025-05-20 16:15:16 +03:00
Andrew Lanzone 23c733ef94 Use wrap helper function to simplify some controller handler logic 2025-05-20 00:27:14 -07:00
Andrew Lanzone f03f242e4a Allow controller to select choice text in dialogue 2025-05-20 00:12:34 -07:00
Andrew Lanzone f36401438f Move wrap function to windowbase so all windows can use it 2025-05-19 23:43:28 -07:00
AnyOldName3 47fff7f998 Disable shadows even harder
On GPUs that can detect when all fragments in an execution group take the same branch, this might run faster. Even if it doesn't, it might suppress any weirdness coming from sampling the dummy shadow maps.
2025-05-19 15:06:19 +01:00
Andrew Lanzone 0aad0d379a Minimal controller support for dialog window 2025-05-18 22:45:22 -07:00
Andrew Lanzone a144793753 Fix Y button changing character 2025-05-18 22:45:03 -07:00
Andrew Lanzone f80d46dc94 Add controller support to count dialog 2025-05-18 15:34:22 -07:00
Evil Eye 045640303f Merge branch 'cleanup/menu-interfaces' into 'master'
FIX: Correctly describe interface availability of menu scripts

See merge request OpenMW/openmw!4683
2025-05-18 16:45:40 +00:00
Evil Eye f32d62def8 Merge branch 'setcheckstateesmfile' into 'master'
Avoid repeated item(QString) in plugin toggling-related code

See merge request OpenMW/openmw!4678
2025-05-18 16:41:46 +00:00
Andrew Lanzone f15cc663ae Remove old way of listening for gamepad mouse events 2025-05-18 01:42:11 -07:00
Andrew Lanzone 33a6189f7a Consolidate all gamepad cursor listening in controllermanager 2025-05-18 01:27:38 -07:00
Andrew Lanzone e01291ec4a Add whole set of button icons 2025-05-17 22:32:03 -07:00
Dave Corley b006cb9846 FIX: Correctly describe interface availability of menu scripts 2025-05-17 07:04:23 -07:00
Evil Eye a7a072e3f8 Merge branch 'qfileinfo' into 'master'
Avoid unnecessary file system access in plugin toggling

See merge request OpenMW/openmw!4679
2025-05-17 10:25:02 +00:00
Evil Eye 52b3e0688a Merge branch 'refreshmodel' into 'master'
Fix out-of-bounds index dataChanged calls

See merge request OpenMW/openmw!4677
2025-05-17 10:24:58 +00:00
Andrew Lanzone c0694d3c0e Add overlay showing what controller buttons do 2025-05-16 21:41:28 -07:00
Alexei Kotov f7f5665588 Avoid repeated item(QString) in plugin toggling-related code 2025-05-15 23:17:17 +03:00
Alexei Kotov 89d6408587 Avoid unnecessary file system access in plugin toggling 2025-05-15 23:00:08 +03:00
Alexei Kotov 54eea09a9e Fix out-of-bounds index dataChanged calls 2025-05-15 21:18:10 +03:00
Andrew Lanzone 8c2ecc2a88 Allow LT and RT to toggle between open gui windows 2025-05-15 00:46:02 -07:00
Andrew Lanzone f055ccf5ba Update item view to allow controller support; test it in Container menu 2025-05-14 02:31:32 -07:00
psi29a 6d97ea01b2 Merge branch 'packageusage' into 'master'
Update can be used column

See merge request OpenMW/openmw!4670
2025-05-13 20:30:46 +00:00
psi29a 0251b7c820 Merge branch 'uneventful' into 'master'
Don't trigger cell change logic when the player isn't changing cells

Closes #8469

See merge request OpenMW/openmw!4657
2025-05-13 20:30:28 +00:00
Andrew Lanzone 77e17743f7 Only use bumpers to turn pages in books 2025-05-12 22:37:11 -07:00
Andrew Lanzone 65bab3858a Add basic controller support to scrolls 2025-05-12 22:36:28 -07:00
Andrew Lanzone 9a72ecb61c Don't close a book with A 2025-05-12 20:32:59 -07:00
Andrew Lanzone 9aff9cb48e Swap Topics and Quests buttons 2025-05-12 20:31:15 -07:00
Andrew Lanzone 07be682b88 Better controller support for journal; mouse for topic index A-Z 2025-05-12 20:10:13 -07:00
Andrew Lanzone fa52fea59b Better joystick/mouse coordination in save game diaglog 2025-05-12 20:09:24 -07:00
Andrew Lanzone a78bdee941 Reset selected button when confirmation dialog is reopened 2025-05-12 20:08:47 -07:00
Andrew Lanzone 4bad7a3074 Update character creation controller support to work better with gamepad mouse mode 2025-05-12 02:20:28 -07:00
Andrew Lanzone 83162477ec Basic controller support for all character creation windows 2025-05-12 01:34:28 -07:00
Andrew Lanzone c4a87cfe4d Fix selecting saves with mouse controller 2025-05-11 22:59:11 -07:00
Andrew Lanzone 8f415ceab6 Convert UI widgets to local scrollbar implementation 2025-05-11 22:30:58 -07:00
Andrew Lanzone b2620c861a Add scrollbar override to capture mouse hover events 2025-05-11 22:24:05 -07:00
Andrew Lanzone 5e7761bef1 Add controller support to text input menu 2025-05-11 14:56:58 -07:00
Andrew Lanzone 1e200ed048 Add controller support to race menu 2025-05-11 14:48:42 -07:00
Andrew Lanzone c9ce93a22f Controller menus: don't wrap focus when only two buttons 2025-05-11 13:48:50 -07:00
Evil Eye 9756d3d84f Update can be used column 2025-05-11 13:38:39 +02:00
Andrew Lanzone 4c5db612f0 Improve controller support for confirmation dialogs by highlighting selected choice 2025-05-11 00:32:29 -07:00
Andrew Lanzone 3b42d02cfc Add controller support to message boxes 2025-05-11 00:20:31 -07:00
Andrew Lanzone 80166cddd0 Make main menu honor controller mouse clicks 2025-05-11 00:19:01 -07:00
Andrew Lanzone be298f78cb Basic controller support for the books 2025-05-10 23:17:23 -07:00
Andrew Lanzone bb88becc2b Basic controller support for the journal 2025-05-10 22:50:16 -07:00
Andrew Lanzone 58c4e0ddf7 Minimal controller bindings for save/load window 2025-05-10 01:41:53 -07:00
Andrew Lanzone 2970913d55 Minimal controller bindings for settings window 2025-05-09 23:44:06 -07:00
Andrew Lanzone fc86878922 Allow exiting credits by pressing B 2025-05-09 23:43:29 -07:00
Andy LanzoneandGitHub b4e0590a10 Merge branch 'OpenMW:master' into master 2025-05-09 22:57:21 -07:00
Andrew Lanzone a8824b46a8 Add first batch of controller-enabled windows 2025-05-09 22:56:04 -07:00
Evil Eye 9ea1afedcc Merge branch 'baiki-isActive-kembalikan-bool' into 'master'
self:isActive() returns bool

See merge request OpenMW/openmw!4663
2025-05-09 15:17:08 +00:00
Kuyondo 087349a3e5 bump lua API_REVISION 72 to 73 2025-05-09 19:06:24 +08:00
Alexei Kotov 8966b5292b Merge branch 'bug8465' into 'master'
Bug 8465: Fix anti-aliasing on macOS

Closes #8465

See merge request OpenMW/openmw!4665
2025-05-09 04:45:31 +03:00
thagberg 2bcbb2d01c Update authors 2025-05-07 22:28:35 -04:00
thagberg 4297ef2f97 Add changelog 2025-05-07 21:55:58 -04:00
thagberg 883f9e5049 Fix anti-aliasing on macOS
Blitting to the resolve FBO in OSG::RenderStage was causing a GL_INVALID_FRAMEBUFFER_OPERATION due to a mismatch in attached colorbuffers between the FBOs bound in read and draw slots. This was because the normal attachment was invariantly attached to FBO_Interrupt, but not to other FBOs.
2025-05-07 16:31:22 -04:00
psi29a 1f724cc336 Merge branch 'postprocessingglslversion' into 'master'
Fix post-processing shader glsl_version bumping

See merge request OpenMW/openmw!4653
2025-05-07 17:57:15 +00:00
Kuyondo 77bd2250b0 isactive return bool now 2025-05-07 11:24:09 +08:00
Evil Eye 1d736bcf79 Merge branch 'fix_launcher_crash' into 'master'
Wait for the reloading cells thread on DataFilesPage destruction (#8445)

Closes #8445

See merge request OpenMW/openmw!4661
2025-05-06 18:37:04 +00:00
Evil Eye d1196ea667 Ignore resistances for base diseases 2025-05-06 20:09:48 +02:00
Andrew Lanzone 71aa11404c Add checkbox to enable controller menus to openmw launcher. 2025-05-05 22:47:55 -07:00
elsid 4a18c23e2d Wait for the reloading cells thread on DataFilesPage destruction
Run a single thread and notify it when it has to reload cells.
2025-05-04 21:59:49 +02:00
Alexei Kotov 0d27dc2336 Merge branch 'fognearisafloat' into 'master'
Tiny fix in omwfx docs

See merge request OpenMW/openmw!4656
2025-05-03 21:30:07 +03:00
Evil Eye 87014016a2 Stop postponing physics for objects that _don't_ have physics 2025-05-03 17:25:27 +02:00
Evil Eye 57c40bc052 Don't trigger cell change logic when the player isn't changing cells 2025-05-03 16:26:39 +02:00
epochwon 9e80c27002 changed fognear to a float instead of a vec2 2025-05-02 15:42:15 -04:00
psi29a 0e76a6edb5 Merge branch 'custom-config-directory-documentation' into 'master'
Add documentation for custom config directories

See merge request OpenMW/openmw!4633
2025-05-01 11:42:57 +00:00
Evil Eye a37758a165 Merge branch 'jinja' into 'master'
Bump jinja2

See merge request OpenMW/openmw!4654
2025-04-30 18:43:29 +00:00
Evil Eye 36e34426bb Merge branch 'fix_warnings' into 'master'
Fix warnings

See merge request OpenMW/openmw!4651
2025-04-30 18:43:14 +00:00
Alexei Kotov 7a0e3aaf11 Bump jinja2 2025-04-29 19:50:02 +03:00
Alexei Kotov c7f6de472f Merge branch 'fix_cobertura_path' into 'master'
Fix path for junit reports

See merge request OpenMW/openmw!4650
2025-04-29 19:32:36 +03:00
elsid 52281a5e32 Fix path for junit reports 2025-04-29 08:34:09 +02:00
Alexei Kotov 72e73784fb Fix post-processing shader glsl_version bumping 2025-04-29 04:25:24 +03:00
elsid b5f8a0ecdb Fix warning: -Wstring-compare
In file included from ../../../components/esm/defs.hpp:7,
                 from ../../../apps/components_tests/esm/test_fixed_string.cpp:1:
In function 'bool ESM::operator==(const FixedString<capacity>&, const char (&)[rhsSize]) [with long unsigned int capacity = 4; long unsigned int rhsSize = 12]',
    inlined from 'virtual void {anonymous}::EsmFixedString_empty_strings_Test::TestBody()' at ../../../apps/components_tests/esm/test_fixed_string.cpp:82:13:
../../../components/esm/esmcommon.hpp:142:85: error: 'int strncmp(const char*, const char*, size_t)' of strings of length 0 and 4 and bound of 4 evaluates to nonzero [-Werror=string-compare]
  142 |         return strnlen(rhs, rhsSize) == strnlen(lhs.mData, capacity) && std::strncmp(lhs.mData, rhs, capacity) == 0;
      |                                                                         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
2025-04-28 22:07:00 +02:00
elsid a5826b75e0 Disable -Werror for ASAN builds
To avoid warnings like:

In file included from /usr/include/c++/13/regex:50,
                 from ../../components/lua/yamlloader.cpp:6:
In constructor 'std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool; _ArgTypes = {char}]',
    inlined from 'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&) [with _Char_type = char]' at /usr/include/c++/13/bits/regex_automaton.h:149:4,
    inlined from 'std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT = std::__cxx11::regex_traits<char>]' at /usr/include/c++/13/bits/regex_automaton.h:281:24:
/usr/include/c++/13/bits/std_function.h:405:42: error: '*(std::function<bool(char)>*)((char*)&__tmp + offsetof(std::__detail::_StateT, std::__detail::_State<char>::<unnamed>.std::__detail::_State_base::<unnamed>)).std::function<bool(char)>::_M_invoker' may be used uninitialized [-Werror=maybe-uninitialized]
  405 |       : _Function_base(), _M_invoker(__x._M_invoker)
      |                                      ~~~~^~~~~~~~~~
In file included from /usr/include/c++/13/regex:65:
/usr/include/c++/13/bits/regex_automaton.h: In member function 'std::__detail::_StateIdT std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_begin() [with _TraitsT = std::__cxx11::regex_traits<char>]':
/usr/include/c++/13/bits/regex_automaton.h:279:17: note: '__tmp' declared here
  279 |         _StateT __tmp(_S_opcode_subexpr_begin);
      |                 ^~~~~

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562.
2025-04-28 22:07:00 +02:00
elsid 875a45837a Disable -Warray-bounds due to GCC bug
To avoid getting warnings like:

In file included from ../../../extern/sol3/sol/compatibility.hpp:46,
                 from ../../../extern/sol3/sol/bytecode.hpp:27,
                 from ../../../extern/sol3/sol/sol.hpp:51,
                 from ../../../components/lua/luastate.hpp:8,
                 from ../../../apps/openmw/mwlua/context.hpp:4,
                 from ../../../apps/openmw/mwlua/soundbindings.hpp:6,
                 from ../../../apps/openmw/mwlua/soundbindings.cpp:1:
In member function 'void sol::stack::field_getter<T, global, raw, <template-parameter-1-4> >::get(lua_State*, Key&&, int) [with Key = const char (&)[7]; T = char [7]; bool global = false; bool raw = false; <template-parameter-1-4> = void]',
    inlined from 'void sol::stack::get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; Key = const char (&)[7]]' at ../../../extern/sol3/sol/stack_core.hpp:1210:62,
    inlined from 'sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, <template-parameter-1-5> >::get(lua_State*, Key&&, int) [with Key = const char (&)[7]; T = char [7]; P = float; bool b = false; bool raw = false; <template-parameter-1-5> = void]' at ../../../extern/sol3/sol/stack_probe.hpp:41:21,
    inlined from 'sol::stack::probe sol::stack::probe_field_getter<T, P, global, raw, <template-parameter-1-5> >::get(lua_State*, Key&&, int) [with Key = const char (&)[6]; T = char [6]; P = float; bool b = false; bool raw = false; <template-parameter-1-5> = void]' at ../../../extern/sol3/sol/stack_probe.hpp:35:9,
    inlined from 'sol::stack::probe sol::stack::probe_get_field(lua_State*, Key&&, int) [with bool global = false; bool raw = false; C = float; Key = const char (&)[6]]' at ../../../extern/sol3/sol/stack_core.hpp:1230:78,
    inlined from 'decltype(auto) sol::basic_table_core<<anonymous>, <template-parameter-1-2> >::traverse_get_deep_optional(int&, int, Key&&, Keys&& ...) const [with bool global = false; bool raw = false; sol::detail::insert_mode mode = sol::detail::none; T = sol::optional<float>; Key = const char (&)[6]; Keys = {}; bool top_level = false; ref_t = sol::basic_reference<false>]' at ../../../extern/sol3/sol/table_core.hpp:217:62,
    inlined from 'decltype(auto) sol::basic_table_core<<anonymous>, <template-parameter-1-2> >::traverse_get_single(int, Keys&& ...) const [with bool raw = false; Ret = sol::optional<float>; Keys = {const char (&)[6]}; bool top_level = false; ref_t = sol::basic_reference<false>]' at ../../../extern/sol3/sol/table_core.hpp:123:83,
    inlined from 'decltype(auto) sol::basic_table_core<<anonymous>, <template-parameter-1-2> >::traverse_get_single_maybe_tuple(int, Key&&) const [with bool raw = false; Ret = sol::optional<float>; Key = const char (&)[6]; bool top_level = false; ref_t = sol::basic_reference<false>]' at ../../../extern/sol3/sol/table_core.hpp:113:41,
    inlined from 'decltype(auto) sol::basic_table_core<<anonymous>, <template-parameter-1-2> >::tuple_get(int, Keys&& ...) const [with bool raw = false; Ret = {sol::optional<float>}; Keys = {const char (&)[6]}; bool top_level = false; ref_t = sol::basic_reference<false>]' at ../../../extern/sol3/sol/table_core.hpp:93:56,
    inlined from 'decltype(auto) sol::basic_table_core<<anonymous>, <template-parameter-1-2> >::get(Keys&& ...) const [with Ret = {sol::optional<float>}; Keys = {const char (&)[6]}; bool top_level = false; ref_t = sol::basic_reference<false>]' at ../../../extern/sol3/sol/table_core.hpp:422:35,
    inlined from 'decltype(auto) sol::basic_table_core<<anonymous>, <template-parameter-1-2> >::get_or(Key&&, T&&) const [with T = float; Key = const char (&)[6]; bool top_level = false; ref_t = sol::basic_reference<false>]' at ../../../extern/sol3/sol/table_core.hpp:428:41,
    inlined from '{anonymous}::PlaySoundArgs {anonymous}::getPlaySoundArgs(const sol::optional<sol::basic_table_core<false, sol::basic_reference<false> > >&)' at ../../../apps/openmw/mwlua/soundbindings.cpp:62:42:
../../../extern/sol3/sol/stack_field.hpp:116:49: error: array subscript 'const char [7][0]' is partly outside array bounds of 'const char [6]' [-Werror=array-bounds=]
  116 |                                                 lua_getfield(L, tableindex, &key[0]);
      |                                                 ^~~~~~~~~~~~

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438.

Simplified example: https://godbolt.org/z/ccPje4nK1.
2025-04-28 22:06:51 +02:00
elsid 891d6fd0ba Fix warning: -Wmaybe-uninitialized
In member function 'ESM::RefId {anonymous}::IdGettingVisitor::operator()(const MWWorld::Ptr&) const',
    inlined from 'constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = ESM::RefId; _Fn = {anonymous}::IdGettingVisitor; _Args = {const MWWorld::Ptr&}]' at /usr/include/c++/13/bits/invoke.h:61:36,
    inlined from 'constexpr typename std::__invoke_result<_Functor, _ArgTypes>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable = {anonymous}::IdGettingVisitor; _Args = {const MWWorld::Ptr&}]' at /usr/include/c++/13/bits/invoke.h:96:40,
    inlined from 'static constexpr decltype(auto) std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<_Result_type (*)(_Visitor, _Variants ...)>, std::integer_sequence<long unsigned int, __indices ...> >::__visit_invoke(_Visitor&&, _Variants ...) [with _Result_type = std::__detail::__variant::__deduce_visit_result<ESM::RefId>; _Visitor = {anonymous}::IdGettingVisitor&&; _Variants = {const std::variant<MWWorld::Ptr, std::pair<ESM::FormId, ESM::RefId> >&}; long unsigned int ...__indices = {0}]' at /usr/include/c++/13/variant:1060:24,
    inlined from 'constexpr decltype(auto) std::__do_visit(_Visitor&&, _Variants&& ...) [with _Result_type = __detail::__variant::__deduce_visit_result<ESM::RefId>; _Visitor = {anonymous}::IdGettingVisitor; _Variants = {const variant<MWWorld::Ptr, pair<ESM::FormId, ESM::RefId> >&}]' at /usr/include/c++/13/variant:1815:5,
    inlined from 'constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...) [with _Visitor = {anonymous}::IdGettingVisitor; _Variants = {const variant<MWWorld::Ptr, pair<ESM::FormId, ESM::RefId> >&}]' at /usr/include/c++/13/variant:1878:34,
    inlined from 'ESM::RefId MWScript::GlobalScriptDesc::getId() const' at ../../../apps/openmw/mwscript/globalscripts.cpp:120:26:
../../../apps/openmw/mwscript/globalscripts.cpp:91:35: error: '*(const uint32_t*)((char*)&<unnamed> + offsetof(ESM::RefId, ESM::RefId::mValue.std::variant<ESM::EmptyRefId, ESM::ESM3ExteriorCellRefId, ESM::StringRefId, ESM::FormId, ESM::GeneratedRefId, ESM::IndexRefId>::<unnamed>.std::__detail::__variant::_Variant_base<ESM::EmptyRefId, ESM::ESM3ExteriorCellRefId, ESM::StringRefId, ESM::FormId, ESM::GeneratedRefId, ESM::IndexRefId>::<unnamed>.std::__detail::__variant::_Move_assign_base<true, ESM::EmptyRefId, ESM::ESM3ExteriorCellRefId, ESM::StringRefId, ESM::FormId, ESM::GeneratedRefId, ESM::IndexRefId>::<unnamed>.std::__detail::__variant::_Copy_assign_base<true, ESM::EmptyRefId, ESM::ESM3ExteriorCellRefId, ESM::StringRefId, ESM::FormId, ESM::GeneratedRefId, ESM::IndexRefId>::<unnamed>.std::__detail::__variant::_Move_ctor_base<true, ESM::EmptyRefId, ESM::ESM3ExteriorCellRefId, ESM::StringRefId, ESM::FormId, ESM::GeneratedRefId, ESM::IndexRefId>::<unnamed>.std::__detail::__variant::_Copy_ctor_base<true, ESM::EmptyRefId, ESM::ESM3ExteriorCellRefId, ESM::StringRefId, ESM::FormId, ESM::GeneratedRefId, ESM::IndexRefId>::<unnamed>.std::__detail::__variant::_Variant_storage<true, ESM::EmptyRefId, ESM::ESM3ExteriorCellRefId, ESM::StringRefId, ESM::FormId, ESM::GeneratedRefId, ESM::IndexRefId>::_M_u))' may be used uninitialized [-Werror=maybe-uninitialized]
   91 |                 return ESM::RefId();
      |                                   ^
../../../apps/openmw/mwscript/globalscripts.cpp: In member function 'ESM::RefId MWScript::GlobalScriptDesc::getId() const':
../../../apps/openmw/mwscript/globalscripts.cpp:91:35: note: '<anonymous>' declared here
   91 |                 return ESM::RefId();
      |                                   ^
2025-04-28 22:00:03 +02:00
Alexei Kotov 55107e0913 Merge branch 'idle_select_to_group_name' into 'master'
Build and test / Read .env file and expose it as output (push) Successful in 10s
Release / Read .env file and expose it as output (push) Successful in 6s
Build and test / Ubuntu (push) Failing after 1h6m28s
Build and test / MacOS (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Build and test / Windows (2019) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Use string_view for sIdleSelectToGroupName

See merge request OpenMW/openmw!4646
2025-04-28 03:02:17 +03:00
AnyOldName3 897b502b0f Field lists for tokens 2025-04-26 19:09:59 +01:00
AnyOldName3 cbf0760adf Configuration sources to bulleted list 2025-04-26 18:57:57 +01:00
Alexei Kotov 58fcc8f66d Require a non-empty argument in ShowMap (#8466) 2025-04-26 13:29:01 +03:00
Alexei Kotov 011dfb305c Merge branch 'navmeshtool_lib' into 'master'
Do not build navmeshtool translation units twice

See merge request OpenMW/openmw!4647
2025-04-25 21:40:57 +03:00
elsid fc4cc3255d Do not build navmeshtool translation units twice 2025-04-24 23:03:07 +02:00
elsid f487a6332b Use string_view for sIdleSelectToGroupName 2025-04-24 23:01:30 +02:00
Kindi 0247082e19 fix signedness, remove extra semicolon, update offer 2025-04-24 20:24:55 +08:00
psi29a 80d6f020ed Merge branch 'apt_get_retry' into 'master'
Retry apt-get update and add-apt-repository

See merge request OpenMW/openmw!4639
2025-04-24 09:07:20 +00:00
psi29a c7c95c5a85 Merge branch 'fix-bug-8462' into 'master'
Set SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH.

Closes #8225 and #8462

See merge request OpenMW/openmw!4641
2025-04-24 09:06:27 +00:00
Sam Kaufman 1948ab21f7 Set SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH.
This fixes bugs #8225 and #8462.
2025-04-23 20:33:56 -07:00
Alexei Kotov ca3a286cc4 Merge branch 'master' into 'master'
FIX: Clarify that `ignore` field of raycast options types are a list and not a single object

See merge request OpenMW/openmw!4613
2025-04-24 02:09:47 +03:00
Evil Eye ab5070328d Merge branch 'powershell-multiline-exit' into 'master'
Detect failures in multiline PowerShell commands

See merge request OpenMW/openmw!4645
2025-04-23 18:54:47 +00:00
Evil Eye 23522ed314 Merge branch 'missing_enum' into 'master'
Add missing TargetPolygonNotFound enum value to lua bindings

See merge request OpenMW/openmw!4643
2025-04-23 18:54:46 +00:00
Evil Eye b4d5013679 Merge branch 'lua_state' into 'master'
Use unique_ptr to handle lua state lifetime

See merge request OpenMW/openmw!4636
2025-04-23 18:54:40 +00:00
Dave Corley 5ef2cf23b3 CLEANUP: Loop param, also, is a bool 2025-04-23 11:20:46 -07:00
Kindi 4b94b6f678 also update draganddrop and trade items 2025-04-23 21:19:52 +08:00
elsid 8ee0c9e7be Retry apt-get update and add-apt-repository 2025-04-22 23:05:27 +02:00
AnyOldName3 19725473d7 Detect failures in multiline PowerShell commands
GitLab inserts a check for failure after each command in our `script`.
This is documented here https://docs.gitlab.com/runner/shells/#powershell

However, it doesn't detect failures if we run commands back to back.

This adds the checks GitLab would have added for us if we were able to make it do that.
2025-04-22 20:58:43 +01:00
psi29a aed135a7c0 Merge branch 'bump-cache-key' into 'master'
Increment cache keys missed in !4450

Closes #8463

See merge request OpenMW/openmw!4644
2025-04-22 07:05:45 +00:00
AnyOldName3 928bbed09b Increment cache keys missed in !4450
It changed the filenames for deps, so we've got two copies of the deps in the cache, and now we're running out of disk space.
2025-04-21 22:52:24 +01:00
elsid 626d7b2282 Add missing TargetPolygonNotFound enum value to lua bindings 2025-04-21 16:36:19 +02:00
Kindi bdf025a532 also update companion window and tradewindow 2025-04-21 19:33:31 +08:00
Kindi a9870bbcde update container window when item is added or removed 2025-04-21 19:33:22 +08:00
Kindi 15ceee4b1a also update companion window and tradewindow 2025-04-21 19:29:57 +08:00
Kindi 0547f09bf0 update container window when item is added or removed 2025-04-21 19:29:57 +08:00
Evil Eye e20d52d23c Merge branch 'namespace_typo' into 'master'
Fix typo in namespace name

See merge request OpenMW/openmw!4635
2025-04-21 08:41:27 +00:00
Evil Eye 05c624bc34 Merge branch 'rm_using_namespace_fallback' into 'master'
Remove redundant using namespace Fallback

See merge request OpenMW/openmw!4638
2025-04-21 08:39:48 +00:00
Evil Eye 5a42db3256 Merge branch 'static_assert' into 'master'
Use static_assert for compile time check

See merge request OpenMW/openmw!4637
2025-04-21 08:35:17 +00:00
AnyOldName3 e2e7b58b3a Handle normalHeightMap as special case 2025-04-20 23:55:38 +01:00
Aussiemon 22c01b22c1 Clang format 2025-04-19 23:06:30 -06:00
Aussiemon 085e5d1988 Calculate spell cost when building buying window 2025-04-19 22:31:58 -06:00
elsid 6f89d38b78 Replace includes by forward declaration 2025-04-20 02:28:34 +02:00
AnyOldName3 4707c7e2fc Format 2025-04-20 00:17:03 +01:00
AnyOldName3 115fc08904 Don't forget parallax when reapplying shader visitor
Fixes https://gitlab.com/OpenMW/openmw/-/issues/8341

I don't think this should go into 0.49 because there may be implications beyond what I've thought of and I'd rather we had a full dev cycle to notice any regressions.

The fix is a little janky, but makes use of some dead code we've had since the introduction of normal-height maps nearly a decade ago, so it's a safe bet that it was never intended to be dead code.
The main effect of the jankiness is that we'll add some pointless @defines for normalHeightMap that none of our shaders use and which will always be zero.
2025-04-20 00:12:53 +01:00
AnyOldName3 c0a05f5d13 Add documentation for custom config directories
Also includes examples for portable installs and profiles.
2025-04-19 19:14:18 +01:00
elsid 042c4b2b9d Use static_assert for compile time check 2025-04-18 14:38:23 +02:00
elsid f80283422f Use unique_ptr to handle lua state lifetime 2025-04-18 14:01:07 +02:00
elsid 972995d124 Fix typo in namespace name 2025-04-18 12:27:48 +02:00
elsid 0d5e9ef85f Remove redundant using namespace Fallback
C++ has ADL to find overloads. using namespace does nothing in this
case.
2025-04-18 12:27:37 +02:00
psi29a 87d77a6882 Merge branch 'rippleshaders' into 'master'
Fix crash if ripple pipeline shaders are unavailable

See merge request OpenMW/openmw!4622
2025-04-17 09:26:12 +00:00
Alexei Kotov c1c8769742 Merge branch 'clang_tidy_identifier_naming' into 'master'
Enable identifier naming clang-tidy check (#8424)

See merge request OpenMW/openmw!4631
2025-04-14 13:39:09 +03:00
Alexei Kotov 271ab2e109 Merge branch 'dont-ask-the-disk-for-things-we-already-know' into 'master'
Avoid IO in resolveParentFileIndices

See merge request OpenMW/openmw!4627
2025-04-14 13:11:57 +03:00
Alexei Kotov 583620e607 Merge branch 'patch-1' into 'master'
Crimes.lua wrong type for victim aware

See merge request OpenMW/openmw!4623
2025-04-14 09:44:45 +03:00
psi29a 6dd2cac3ec Merge branch 'better-freeze-catcher' into 'master'
Improve Windows crash/freeze catcher UX

See merge request OpenMW/openmw!4630
2025-04-13 20:57:12 +00:00
Alexei Kotov 6aed2d8284 Bump Crimes interface version 2025-04-13 14:05:07 +03:00
elsid 84f471ce5c Enable identifier naming clang-tidy check 2025-04-13 09:59:51 +02:00
AnyOldName3 deb070389f Improve Windows crash/freeze catcher UX
* Change crash log to crash dump in messages.
* Make the freeze catcher popup disappear more quickly when OpenMW thaws - we got a few freeze dumps from after a thaw.
* Improve freeze catcher message - hopefully fewer users think it's a false positive they're expected to put up with and we get future reports sooner.
2025-04-12 18:38:55 +01:00
Alexei Kotov f7f148a6ca Merge branch 'fix-debug-config' into 'master'
Fix Windows Debug build

See merge request OpenMW/openmw!4629
2025-04-12 17:35:03 +03:00
AnyOldName3 a5a6f33578 Manual reformatting that wasn't done automatically on my machine 2025-04-11 17:41:40 +01:00
AnyOldName3 d74a0edb82 Format 2025-04-11 17:37:55 +01:00
AnyOldName3 396cd1c727 Fix Windows Debug build
This was a regression from https://gitlab.com/OpenMW/openmw/-/merge_requests/4596

Also move more things into the anonymous namespace because there's not really a reason not to and I had to rearrange things anyway.
2025-04-11 17:33:19 +01:00
AnyOldName3 31fcc5e126 Add test for new ReadersCache functions 2025-04-11 17:30:56 +01:00
Dave Corley 22172f3b0e FIX: useAmbientLighting arg of addVfx options is a bool 2025-04-10 11:48:57 -07:00
Dave Corley b68935e917 FIX: Model param of addVfx should not be a header 2025-04-10 11:44:34 -07:00
Dave Corley e512a8e74f FIX: Add a name to options table in castRenderingRay 2025-04-10 11:42:24 -07:00
AnyOldName3 48572e4c96 Even more elses 2025-04-10 18:32:52 +01:00
Dave Corley 1d1ae1c906 CLEANUP: But it can also be a single object 2025-04-10 10:15:31 -07:00
Dave Corley 586467540b FIX: Clarify that ignore field of raycast options types are a list and not a single object 2025-04-10 10:15:31 -07:00
AnyOldName3 37dc1a6a76 Remove redundant elses 2025-04-10 16:51:23 +01:00
AnyOldName3 15162a734d Avoid IO in resolveParentFileIndices
In the olden days, we passed it a vector of open ESMReader instances, as they knew the filenames and sizes, so were a convenient source of this knowledge.

When the ReadersCache was introduced as a pool of readers to limit the maximum number of simultaneously open file handles (to avoid going over the OS' limit) it was a poor substitute.
* We iterate over all the earlier readers in order in a double loop, which is the worst case scenario for an LRU pool as once we're past the size limit, we're guaranteed maximum thrashing - the least recently used item is the most likely to be used next, so the worst to evict.
* We didn't want to read any ESM files, just know whether they'd been read and what their sizes were, so didn't want to open a file handle, which the ReadersCache forced us to do.

Obviously, opening lots of file handles isn't fast, and as this was an operation done for each content file which iterated over the file's masters and within that loop iterated over every loaded file, that's O(n^3) complexity in the worst case, and for things like delta plugin merged plugins, they hit the worst case in long load orders.

This resolves the freeze reported as https://gitlab.com/OpenMW/openmw/-/issues/8425, but there may be other freezes on launch.
2025-04-10 16:16:19 +01:00
Alexei Kotov ec77ec299d Rescale the base travel cost by the number of followers (#8446)
Rather than the offered price.
2025-04-10 16:24:36 +03:00
psi29a ea8369eff0 Merge branch 'dont-redraw-the-whole-gui-every-time-we-change-the-tiniest-thing' into 'master'
Be more careful when we tell Qt that data has changed

Closes #8405

See merge request OpenMW/openmw!4621
2025-04-09 11:19:32 +00:00
AnyOldName3 096759435a Add progress bars where the launcher can be limited by IO
I tested this with a USB3 external hard drive.

These two places were the only ones where we're IO-bound and block the main thread, so they're the only ones that need progress bars.

If trying to replicate this test, then it's important to unplug the hard drive between each repeat.
Apparently Windows is excellent at disk caching these days as it takes a minute and a half to start the launcher with Total Overhaul on this drive when it's just been plugged in, but less time than the first launch after a reboot on an NVME drive once the cache has been warmed up.
2025-04-09 01:36:52 +01:00
AnyOldName3 894ea4ba62 Don't precompute load order errors after every change
It's much slower than doing it on demand as it only takes a microsecond, but for a really big load order, there are hundreds of thousands of intermediate calls before everything's set up and we can draw the GUI.
2025-04-08 01:19:24 +01:00
AnyOldName3 d6b61f1f54 Sprinkle some const&
QStringView required more fighting as loads of call sites take a const&
2025-04-08 00:34:45 +01:00
AnyOldName3 e779f115ef Exclude directories from containsDataFiles
Also include capo's microoptimisation even though it doesn't make things any faster.
2025-04-07 16:11:27 +01:00
psi29a 428044abe2 Merge branch 'moveoutalready' into 'master'
Open the data directory file picker at the last opened location

Closes #8426

See merge request OpenMW/openmw!4606
2025-04-07 11:04:26 +00:00
psi29a bd1c2a11d7 Merge branch 'herbalfish' into 'master'
Fix some graphic herbalism issues

See merge request OpenMW/openmw!4624
2025-04-07 11:03:55 +00:00
psi29a 0c4c202998 Merge branch 'ifavideofallsintheforest' into 'master'
Pause menu video playback when OpenMW is minimized

Closes #8441

See merge request OpenMW/openmw!4625
2025-04-07 11:03:37 +00:00
Alexei Kotov 8419116cae Fix crash if ripple pipeline shaders are unavailable 2025-04-07 03:31:32 +03:00
psi29a 8a0f513094 Merge branch 'fix_clang_tidy' into 'master'
Fix clang tidy checks

See merge request OpenMW/openmw!4619
2025-04-06 17:54:20 +00:00
Evil Eye 1667b11564 Pause menu video playback when OpenMW is minimized 2025-04-06 19:42:04 +02:00
psi29a b29d89bd6a Merge branch 'enchantment404' into 'master'
Allow referenced enchantments to be missing on equipped items

See merge request OpenMW/openmw!4617
2025-04-06 16:06:10 +00:00
psi29a 211a5e5bda Merge branch 'lightminimumradius' into 'master'
Give point lights a minimum radius of 16

See merge request OpenMW/openmw!4601
2025-04-06 16:03:35 +00:00
psi29a 2ed14de41f Merge branch 'objectrootless' into 'master'
Account for creatures not having a model in more places

Closes #8439

See merge request OpenMW/openmw!4618
2025-04-06 16:01:50 +00:00
Evil Eye d826962eaa Don't assume unresolved containers contain no visible items 2025-04-06 11:02:31 +02:00
Evil Eye 962ef91e25 Allow skinned plants to be harvested 2025-04-06 11:01:26 +02:00
Chronolegionnaire ed62f9b12b Lua api demands a boolean for victim aware but crimes.lua looks for a number. Which makes scripts that call the crime interface unable to provide a value other than nil for victim aware. 2025-04-06 06:27:40 +00:00
AnyOldName3 973282e471 Optimise ContentSelectorModel::ContentModel::item
This saves about 5% of remaining launcher startup time

Not using fileProperty avoids loads of QVariant conversions.
2025-04-06 02:46:31 +01:00
AnyOldName3 7bad2864d9 Reuse QIcon
This saves more than 15% of launcher startup time on my machine (after the prior improvements - it's way less without those)
2025-04-06 02:40:42 +01:00
AnyOldName3 1237746549 Be more careful when we tell Qt that data has changed
Unchecking files only changes whether they're checked, and doesn't completely rearrange the table and change the number of elements it has, so we only need to change the check state, not the whole layout.

It's way faster to just query all the data once after setting a content list than it is to query the data for all files between the old and new location of a file when we change any file's location in the load order.
2025-04-06 01:31:05 +01:00
elsid 7254bb74a4 Enable modernize-avoid-bind clang-tidy check 2025-04-05 12:55:18 +02:00
elsid 3af2091b28 Use prefix with dot for clang-analyzer-optin. checks 2025-04-05 12:55:18 +02:00
elsid 621a0a15a3 Disable clang-analyzer-cplusplus.NewDelete clang-tidy check 2025-04-05 12:55:18 +02:00
elsid c34b0f90d7 Avoid clang-tidy checks duplication 2025-04-05 12:55:17 +02:00
elsid e098770ba2 Use custom clang-tidy config for extern/ 2025-04-05 12:55:17 +02:00
elsid 7c45a564a1 Fix clang-analyzer-deadcode.DeadStores 2025-04-05 12:55:17 +02:00
elsid da388c93eb Remove boost-* clang-tidy checks
There are only:
* https://clang.llvm.org/extra/clang-tidy/checks/boost/use-ranges.html
* https://clang.llvm.org/extra/clang-tidy/checks/boost/use-to-string.html

None of them makes sense in this project.
2025-04-05 12:55:17 +02:00
elsid d609bd1ab1 Fix clang-tidy header filter 2025-04-05 12:55:17 +02:00
Evil Eye 15f4368fe6 Account for creatures not having a model in more places 2025-04-05 10:19:50 +02:00
Alexei Kotov 3901084cc2 Merge branch 'cmake_minimum_required_macos' into 'master'
Remove cmake_minimum_required for osx install script

See merge request OpenMW/openmw!4615
2025-04-05 08:54:09 +03:00
Kindi a5580718f7 clangformat 2025-04-05 11:26:34 +08:00
Alexei Kotov 065a388632 Allow enchantments to be missing on equipped items 2025-04-05 01:10:41 +03:00
Kindi 71a6b26b4f add missing semicolon, add leading whitespace, 2025-04-04 19:47:47 +08:00
Kindi 0a49c5f71e show global script variables in showVars 2025-04-04 15:36:01 +08:00
Kindi 0eb2ced072 update spell windows after selecting spell using quickkey 2025-04-04 12:58:07 +08:00
elsid 9a6807f862 Remove cmake_minimum_required for osx install script 2025-04-03 23:01:36 +02:00
Alexei Kotov 468724075e Restore 0.45.0 pin button visibility conditions (#8437) 2025-04-03 11:09:50 +03:00
Alexei Kotov 3523ba564a Merge branch 'non-deprecated-known-folder-api' into 'master'
Use non-deprecated known folder API

See merge request OpenMW/openmw!4603
2025-04-02 19:20:21 +03:00
Alexei Kotov 1629ea32f7 Merge branch 'rm_unused' into 'master'
Remove declaration without definition

See merge request OpenMW/openmw!4607
2025-04-01 23:35:49 +03:00
Alexei Kotov 17938cdb7e Make the crosshair smaller 2025-04-01 01:25:08 +03:00
Evil Eye 86426aa87b Open the data directory file picker at the last opened location 2025-03-31 17:11:09 +02:00
elsid a61ce111a5 Remove declaration without definition 2025-03-31 00:28:06 +02:00
Alexei Kotov 11c2fd9e3d Merge branch 'master' into 'master'
FIX: Remove outdated instructions for ubuntu installation

See merge request OpenMW/openmw!4605
2025-03-29 02:47:16 +03:00
Dave Corley b6be7cdd56 CLEANUP: Use apt instead of apt-get 2025-03-28 22:27:30 +00:00
Dave Corley caef91d261 FIX: Remove outdated instructions for ubuntu installation 2025-03-27 14:55:05 -07:00
psi29a 72aefbf191 Merge branch 'lua_save_load_test' into 'master'
Add Lua integration tests for loading and saving

See merge request OpenMW/openmw!4604
2025-03-27 11:05:12 +00:00
psi29a 747771ac5e Merge branch 'fontexport' into 'master'
Restore --export-fonts option functionality

See merge request OpenMW/openmw!4561
2025-03-27 11:04:35 +00:00
psi29a 5f413e7b4d Merge branch 'navigator_debug_mesh' into 'master'
Make navigator debug meshes generation safer

See merge request OpenMW/openmw!4602
2025-03-27 11:04:18 +00:00
elsid 2ebdc43bbe Add test for load while teleporting
To reproduce #8311.

Load game while landracer is scheduled to teleport from different cell.
2025-03-25 23:41:04 +01:00
elsid 536325e0ba Add test for saving and loading the game 2025-03-25 23:40:58 +01:00
elsid cbcd4f6acd Move matchers to different module 2025-03-25 23:24:24 +01:00
Evil Eye 9570b29a0a Merge branch 'lua_test_menu' into 'master'
Run Lua integration tests starting with menu script

See merge request OpenMW/openmw!4556
2025-03-25 16:54:41 +00:00
AnyOldName3 166852254f Use non-deprecated known folder API
SHGetFolderPathW was deprecated in Windows Vista nearly two decades ago. ShGetKnownFolderPath is the replacement.

Also log if there was an error. Someone seemed to be getting an error on Discord, despite other apps being able to get the path just fine with these functions.

Also don't pass the flags to create the folders if they don't exist. We probably don't have the right permissions and if they don't exist, then there are bigger problems. Maybe this will fix the issue the user was having.

Also add a comment about global config on Windows being fundamentally wrong.
2025-03-25 01:32:44 +00:00
Alexei Kotov f8be5fdd2a Give point lights a minimum radius of 16 2025-03-24 22:14:08 +03:00
Alexei Kotov 652113c46d Don't enable water collision when collision is disabled (#8414) 2025-03-24 21:26:37 +03:00
elsid ada48d9021 Reduce a chance to have a deadlock in the AsyncNavMeshUpdater
* Do not fail tile generation if debug mesh writing fails.
* Mark some functions as noexcept to better crash than have a deadlock.
* Unlock tile and remove job if there on exception while processing it.
2025-03-23 23:33:40 +01:00
elsid 7112217adc Use temporary directory for tests output 2025-03-23 23:33:40 +01:00
elsid 87a2f776b7 Add version to the recast log prefix 2025-03-23 23:33:39 +01:00
Evil Eye 73811b45b1 Clarify the resetInitialPosition loop 2025-03-23 21:44:04 +01:00
Evil Eye 88cac9b0fa Reset initial wander position when commanding actors and don't create return packages when stacking actual ai packages 2025-03-23 18:25:20 +01:00
psi29a d13f108779 Merge branch 'nbsp' into 'master'
Non-breaking space-related fixes (#8378)

Closes #8378

See merge request OpenMW/openmw!4592
2025-03-23 16:27:07 +00:00
Evil Eye 57fb334a6e Merge branch 'recast_log_level' into 'master'
Support max log level for Recast via env variable

See merge request OpenMW/openmw!4596
2025-03-23 14:50:11 +00:00
Alexei Kotov 7fb5d4f47a Inform the player about both resting hindrances (#8408) 2025-03-23 03:38:21 +03:00
Alexei Kotov 88c673de51 Merge branch 'luadoc' into 'master'
Fix minor documentation errors

See merge request OpenMW/openmw!4595
2025-03-22 14:22:51 +03:00
elsid 51258662b5 Support max log level for Recast via env variable
Do not write to log if log message level is greater than one speficied
in the OPENMW_RECAST_MAX_LOG_LEVEL env variable. Use Error by default.
2025-03-21 15:34:47 +01:00
Alexei Kotov d6916c35bc Only print the player name if it doesn't match the profile 2025-03-21 04:10:52 +03:00
Alexei Kotov 8634b6c3ac Revise saved game dialog save info layout (#8313) 2025-03-21 03:18:32 +03:00
Evil Eye e5e21eef20 Fix minor documentation errors 2025-03-20 20:08:31 +01:00
psi29a 057c85b710 Merge branch 'esmtool_qust_subrecords' into 'master'
Skip SLSD, SCVR, SCRV subrecords in QUST record

See merge request OpenMW/openmw!4589
2025-03-18 13:18:15 +00:00
psi29a 241a24564a Merge branch 'doubleexit' into 'master'
Don't assume there is a GUI mode in exitCurrentGuiMode (#8380)

Closes #8380

See merge request OpenMW/openmw!4590
2025-03-18 13:16:23 +00:00
Alexei Kotov cd3980eca4 Make figure space non-breaking 2025-03-18 10:29:29 +03:00
Alexei Kotov c2744a1846 Change substitute character in Mystic Cards from question mark to underscore 2025-03-18 00:50:03 +03:00
Alexei Kotov 8d0dcb774f Add no-break space to MysticCards 2025-03-18 00:49:51 +03:00
Alexei Kotov b5a2a4e52d Render no-break space in books, don't consider narrow NBSP breaking 2025-03-17 22:03:38 +03:00
Alexei Kotov 887e1c04ef Spell buying window layout tweaks 2025-03-16 13:53:43 +03:00
Alexei Kotov 4db41c2111 Merchant repair menu layout tweaks 2025-03-16 13:16:59 +03:00
Alexei Kotov e4ae0c9a95 Don't assume there is a GUI mode in exitCurrentGuiMode (#8380) 2025-03-16 09:06:01 +03:00
elsid e5f6b77c29 Skip SLSD, SCVR, SCRV subrecords in QUST record
Present in:

Fallout 3 GOTY English/Data/Anchorage.esm
Fallout 3 GOTY English/Data/BrokenSteel.esm
Fallout 3 GOTY English/Data/PointLookout.esm
Fallout 3 GOTY English/Data/ThePitt.esm
Fallout 3 GOTY English/Data/Zeta.esm
2025-03-15 13:11:26 +01:00
Evil Eye 2b5d076ff8 Merge branch 'followmeifyouwanttohit' into 'master'
Release / Read .env file and expose it as output (push) Successful in 1m9s
Build and test / Read .env file and expose it as output (push) Successful in 1m9s
Build and test / Ubuntu (push) Failing after 29m22s
Build and test / MacOS (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Build and test / Windows (2019) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Don't use attack strength as "hit ready" flag

See merge request OpenMW/openmw!4583
2025-03-15 12:02:35 +00:00
psi29a 2ca1850ea9 Merge branch 'clang19' into 'master'
Clang 19 build fix (!4549 without sol update)

See merge request OpenMW/openmw!4585
2025-03-14 14:47:20 +00:00
psi29a 9a35e3f64d Merge branch 'ripplinglogs' into 'master'
Only log ripples pipeline once

See merge request OpenMW/openmw!4584
2025-03-14 13:17:14 +00:00
Alexei Kotov 34a5eb7512 Editor: Account for pixel ratio in instance mode mouse coordinates conversion (#6573) 2025-03-13 20:06:20 +03:00
Alexei Kotov fdba5d4cb7 Merge branch 'padgame' into 'master'
Distinguish between I.Controls and I.GamepadControls

See merge request OpenMW/openmw!4582
2025-03-12 08:59:39 +03:00
Alexei Kotov ced142da92 Lift upstream sol::optional::emplace Clang 19 build fix 2025-03-12 00:05:20 +03:00
Alexei Kotov 71ef86078c Clip HUD item widgets to not overlap the borders (#7740) 2025-03-11 22:21:42 +03:00
elsidandAlexei Kotov e5ad1cd214 Do not use no longer supported std::char_traits
/usr/bin/../include/c++/v1/string_view:300:42: error: implicit instantiation of undefined template 'std::char_traits<signed char>'
  300 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
      |                                          ^
/home/elsid/dev/openmw/components/to_utf8/to_utf8.cpp:55:41: note: in instantiation of template class 'std::basic_string_view<signed char>' requested here
   55 |     std::basic_string_view<signed char> getTranslationArray(FromType sourceEncoding)
      |                                         ^
/usr/bin/../include/c++/v1/__fwd/string.h:23:29: note: template is declared here
   23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
      |                             ^

std::char_traits support for non char types was removed from libc++19:
https://reviews.llvm.org/D157058.
2025-03-11 20:32:36 +03:00
Alexei Kotov 9f85e51934 Only log ripples pipeline once 2025-03-11 17:37:18 +03:00
Alexei Kotov 569ed4559f Merge branch 'fix_msvc_warnings' into 'master'
Fix msvc warnings

See merge request OpenMW/openmw!4579
2025-03-11 00:55:32 +03:00
Alexei Kotov 5354a5f786 Don't use attack strength as "hit ready" flag
This unbreaks follow animations' strength dependence
2025-03-11 00:44:35 +03:00
Evil Eye c691917172 Distinguish between I.Controls and I.GamepadControls 2025-03-10 16:37:13 +01:00
psi29a 73bb17009e Merge branch 'getsoundplaying' into 'master'
Don't require a reference for GetSoundPlaying (#8389)

Closes #8389

See merge request OpenMW/openmw!4576
2025-03-10 08:13:23 +00:00
Alexei Kotov 3f63700e99 Improve topic and magic effect list padding accuracy
This also touches the quest list, but there are bigger problems with the journal than just padding
2025-03-10 05:48:54 +03:00
elsid 51d73e37df Fix msvc warnings
components\lua\configuration.cpp(133): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
components\esm3\effectlist.cpp(35): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
components_tests\misc\testmathutil.cpp(54): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(62): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(131): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(135): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(135): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(139): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
2025-03-09 17:55:17 +01:00
Alexei Kotov a49a900a7b Merge branch 'fix_lua_teleport' into 'master'
Merge deleted refs when unloading a cell (#8311)

Closes #8311

See merge request OpenMW/openmw!4575
2025-03-09 15:51:01 +03:00
Alexei Kotov 01ea2ad08c Merge branch 'fix_delete_game_ub' into 'master'
Avoid accessing removed character on deleting last save (#8387)

Closes #8387

See merge request OpenMW/openmw!4574
2025-03-09 10:42:11 +03:00
Alexei Kotov 8cb1838c4a Don't require a reference for GetSoundPlaying (#8389) 2025-03-09 00:52:00 +03:00
elsid 2892e19c43 Run integration tests with verbose output 2025-03-08 13:14:23 +01:00
elsid 0e19b1dd75 Run Lua integration tests starting with menu script
This allows writing tests for menu scripts.

Keep global script as entry point to morrowind tests.

Fix menu.newGame and menu.loadGame to hide main menu.
2025-03-08 13:14:20 +01:00
elsid f800f63ee5 Merge deleted refs when unloading a cell
To unload objects scheduled to be teleported.
2025-03-08 12:48:28 +01:00
elsid 5776eea1b0 Avoid accessing removed character on deleting last save 2025-03-08 00:34:27 +01:00
Alexei Kotov 5f92d520ee Merge branch 'mainmembers' into 'master'
Fix more potential use-after-free issues

See merge request OpenMW/openmw!4566
2025-03-07 00:25:35 +03:00
Evil Eye 9bf6a15ff5 Force move the captured string 2025-03-06 17:32:56 +01:00
psi29a c5a1ca7c3e Merge branch 'changelog' into 'master'
Add addressed Korean font issue (#8378) to the changelog

Closes #8378

See merge request OpenMW/openmw!4573
2025-03-06 12:22:58 +00:00
Alexei Kotov 59edf4750b Fix Travel window header alignment 2025-03-06 01:16:45 +03:00
elsid 7a9c2d5e88 Split local and global event handlers 2025-03-05 22:18:46 +01:00
elsid 981ca957c1 Register global tests to run them 2025-03-05 22:18:46 +01:00
elsid 8b62f02523 Use world.players to initialize player in global tests 2025-03-05 22:18:46 +01:00
elsid c298210844 Make integration_tests.py output more verbose
* Make it look more like googletest.
* Print total and failed number of tests.
* Print failed tests names.
* Print duration of each test and total.
* Hide all logs by default.
2025-03-05 22:18:46 +01:00
elsid f80c7b2355 Expect openmw.cfg to exist 2025-03-05 22:18:47 +01:00
Alexei Kotov 124ada8d14 Add addressed Korean font issue (#8378) to the changelog 2025-03-06 00:18:10 +03:00
psi29a 95312139d5 Merge branch 'context_matters' into 'master'
Fix in-game actions not clearing because of input bindings only initializing in menu context

See merge request OpenMW/openmw!4570
2025-03-05 21:18:02 +00:00
psi29a 8bbb46b52c Merge branch 'frankfontaine' into 'master'
Properly implement bitmap font kerning (#8378)

See merge request OpenMW/openmw!4565
2025-03-05 21:16:19 +00:00
Alexei Kotov 918a6352e4 Let cancelled bound item effect remain active for the frame 2025-03-05 23:53:31 +03:00
Alexei Kotov 5b18edf938 Interrupt bound item effect if equipment failed (#8383) 2025-03-05 20:24:02 +03:00
psi29a 888415059c Merge branch 'fontainofdreams' into 'master'
Allow bitmap font texture reading to end prematurely (#8378)

See merge request OpenMW/openmw!4564
2025-03-05 13:11:10 +00:00
psi29a 1e0bdcc270 Merge branch 'elefont' into 'master'
Further revise bitmap glyph replacements (#7531)

See merge request OpenMW/openmw!4563
2025-03-05 13:09:53 +00:00
Alexei Kotov 97717e6fce Merge branch 'fix_lua_vfs_crash' into 'master'
Fix crash on LuaManager::clear triggered by vfs (#8370)

Closes #8370

See merge request OpenMW/openmw!4559
2025-03-05 04:51:47 +03:00
uramer 990096ff9b Fix in-game actions not clearing because of input bindings only initializing in menu context 2025-03-04 21:08:26 +01:00
Alexei Kotov 82307d4e6b Merge branch 'lua_player_attack_test' into 'master'
Direct player attack lower by target's half height

See merge request OpenMW/openmw!4562
2025-03-04 22:49:32 +03:00
Alexei Kotov 61e2117e9d Remove excessive spacing between travel destination and price 2025-03-04 04:03:37 +03:00
Evil Eye b0e9df0139 Ensure class members are tied to the main Lua state 2025-03-03 19:37:07 +01:00
Evil Eye f0cee09b7c Extend lifetime of strings placed on the action queue 2025-03-03 19:36:54 +01:00
Alexei Kotov 6e9d15f91d Merge branch 'keep-menu-actions-after-load' into 'master'
#8365 Keep MENU-registered input actions between games

See merge request OpenMW/openmw!4554
2025-03-03 18:10:12 +00:00
Evil Eye 62d1cdcdac Merge branch 'lua_hide_main_menu' into 'master'
Hide main menu on new and loading game from menu scripts

See merge request OpenMW/openmw!4560
2025-03-03 15:39:05 +00:00
Alexei Kotov fd358396fc Properly implement bitmap font kerning 2025-03-03 08:42:39 +03:00
Alexei Kotov 24468fd965 Allow bitmap font texture to end prematurely 2025-03-03 08:29:00 +03:00
Alexei Kotov c8fe596fc4 Add some remaining missing bitmap substitutions 2025-03-03 08:02:34 +03:00
Alexei Kotov c50d8195bb Remove custom substitutions for glyphs that may exist in the font 2025-03-03 08:02:16 +03:00
elsid 7670afcba1 Direct player attack lower by target's half height
To make sure it always hits the target.
2025-03-03 00:18:42 +01:00
Alexei Kotov dc3264a3a5 Restore --export-fonts option functionality 2025-03-02 22:33:06 +03:00
elsid 1bb3198b71 Fix crash on LuaManager::clear triggered by vfs
See https://gitlab.com/OpenMW/openmw/-/issues/8370#note_2370896069.

=================================================================
==8699==ERROR: AddressSanitizer: heap-use-after-free on address 0x50800060d4b0 at pc 0x7254de50893e bp 0x7fffa97f9700 sp 0x7fffa97f96f0
READ of size 8 at 0x50800060d4b0 thread T0
    #0 0x7254de50893d  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x6293d) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #1 0x7254de50ccad in lua_rawgeti (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x66cad) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #2 0x7254de5d4cab in luaL_unref (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x12ecab) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #3 0x5f96378dd1e9 in sol::stateless_reference::deref(lua_State*) const /home/elsid/dev/openmw/extern/sol3/sol/reference.hpp:440
    #4 0x5f96378dd1e9 in sol::basic_reference<false>::deref() const /home/elsid/dev/openmw/extern/sol3/sol/reference.hpp:545
    #5 0x5f96378dd1e9 in sol::basic_reference<false>::~basic_reference() /home/elsid/dev/openmw/extern/sol3/sol/reference.hpp:635
    #6 0x5f96378dd1e9 in sol::basic_object_base<sol::basic_reference<false> >::~basic_object_base() /home/elsid/dev/openmw/extern/sol3/sol/object_base.hpp:33
    #7 0x5f96378dd1e9 in sol::basic_object<sol::basic_reference<false> >::~basic_object() /home/elsid/dev/openmw/extern/sol3/sol/object.hpp:35
    #8 0x5f96378dd1e9 in ~<lambda> /home/elsid/dev/openmw/apps/openmw/mwlua/vfsbindings.cpp:195
    #9 0x5f96378dd1e9 in ~functor_function /home/elsid/dev/openmw/extern/sol3/sol/function_types_stateful.hpp:32
    #10 0x5f96378dd1e9 in destroy_at<sol::function_detail::functor_function<MWLua::initVFSPackage(const Context&)::<lambda(sol::this_state, sol::object)>::<lambda()>, false, true> > /usr/include/c++/14.2.1/bits/stl_construct.h:88
    #11 0x5f96378dd1e9 in destroy<sol::function_detail::functor_function<MWLua::initVFSPackage(const Context&)::<lambda(sol::this_state, sol::object)>::<lambda()>, false, true> > /usr/include/c++/14.2.1/bits/alloc_traits.h:599
    #12 0x5f96378dd1e9 in user_alloc_destroy<sol::function_detail::functor_function<MWLua::initVFSPackage(const Context&)::<lambda(sol::this_state, sol::object)>::<lambda()>, false, true> > /home/elsid/dev/openmw/extern/sol3/sol/stack_core.hpp:460
    #13 0x5f963a31e305 in int sol::detail::trampoline<int (*&)(lua_State*)>(lua_State*, int (*&)(lua_State*)) /home/elsid/dev/openmw/extern/sol3/sol/trampoline.hpp:158
    #14 0x5f963a31e89c in sol::detail::c_trampoline(lua_State*, int (*)(lua_State*)) /home/elsid/dev/openmw/extern/sol3/sol/trampoline.hpp:183
    #15 0x7254de4dc13a  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x3613a) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #16 0x7254de4deac4  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x38ac4) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #17 0x7254de4df1a2  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x391a2) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #18 0x7254de4e1cf2  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x3bcf2) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #19 0x7254de4e2a37  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x3ca37) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #20 0x7254de50f4a4 in lua_gc (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x694a4) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #21 0x5f96371f615c in MWLua::LuaManager::clear() /home/elsid/dev/openmw/apps/openmw/mwlua/luamanagerimp.cpp:348
    #22 0x5f96371f91ea in MWLua::LuaManager::noGame() /home/elsid/dev/openmw/apps/openmw/mwlua/luamanagerimp.cpp:397
    #23 0x5f963a1c7170 in MWState::StateManager::cleanup(bool) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:71
    #24 0x5f963a1cabfe in MWState::StateManager::newGame(bool) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:169
    #25 0x5f963a1c7aa4 in MWState::StateManager::update(float) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:761
    #26 0x5f963a230bab in OMW::Engine::frame(unsigned int, float) /home/elsid/dev/openmw/apps/openmw/engine.cpp:238
    #27 0x5f963a2442f3 in OMW::Engine::go() /home/elsid/dev/openmw/apps/openmw/engine.cpp:1032
    #28 0x5f963633b3a7 in runApplication(int, char**) /home/elsid/dev/openmw/apps/openmw/main.cpp:228
    #29 0x5f963b375b45 in Debug::wrapApplication(int (*)(int, char**), int, char**, std::basic_string_view<char, std::char_traits<char> >) /home/elsid/dev/openmw/components/debug/debugging.cpp:457
    #30 0x5f9636331695 in main /home/elsid/dev/openmw/apps/openmw/main.cpp:240
    #31 0x7254db435487  (/usr/lib/libc.so.6+0x27487) (BuildId: 0b707b217b15b106c25fe51df3724b25848310c0)
    #32 0x7254db43554b in __libc_start_main (/usr/lib/libc.so.6+0x2754b) (BuildId: 0b707b217b15b106c25fe51df3724b25848310c0)
    #33 0x5f9636331464 in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw+0x10db464) (BuildId: ac74a52ca60e8913bef6eb6b3b23d6de648cf3c9)

0x50800060d4b0 is located 16 bytes inside of 96-byte region [0x50800060d4a0,0x50800060d500)
freed by thread T0 here:
    #0 0x7254e2afc102 in free /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x5f963a2f84e7 in LuaUtil::LuaState::trackingAllocator(void*, void*, unsigned long, unsigned long) /home/elsid/dev/openmw/components/lua/luastate.cpp:107
    #2 0x7254de4f7779  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x51779) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #3 0x7254de4de7f3  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x387f3) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #4 0x7254de4e1a9a  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x3ba9a) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #5 0x7254de4e2a37  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x3ca37) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #6 0x7254de50f4a4 in lua_gc (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x694a4) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #7 0x5f96371f615c in MWLua::LuaManager::clear() /home/elsid/dev/openmw/apps/openmw/mwlua/luamanagerimp.cpp:348
    #8 0x5f96371f91ea in MWLua::LuaManager::noGame() /home/elsid/dev/openmw/apps/openmw/mwlua/luamanagerimp.cpp:397
    #9 0x5f963a1c7170 in MWState::StateManager::cleanup(bool) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:71
    #10 0x5f963a1cabfe in MWState::StateManager::newGame(bool) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:169
    #11 0x5f963a1c7aa4 in MWState::StateManager::update(float) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:761
    #12 0x5f963a230bab in OMW::Engine::frame(unsigned int, float) /home/elsid/dev/openmw/apps/openmw/engine.cpp:238
    #13 0x5f963a2442f3 in OMW::Engine::go() /home/elsid/dev/openmw/apps/openmw/engine.cpp:1032
    #14 0x5f963633b3a7 in runApplication(int, char**) /home/elsid/dev/openmw/apps/openmw/main.cpp:228
    #15 0x5f963b375b45 in Debug::wrapApplication(int (*)(int, char**), int, char**, std::basic_string_view<char, std::char_traits<char> >) /home/elsid/dev/openmw/components/debug/debugging.cpp:457
    #16 0x5f9636331695 in main /home/elsid/dev/openmw/apps/openmw/main.cpp:240
    #17 0x7254db435487  (/usr/lib/libc.so.6+0x27487) (BuildId: 0b707b217b15b106c25fe51df3724b25848310c0)
    #18 0x7254db43554b in __libc_start_main (/usr/lib/libc.so.6+0x2754b) (BuildId: 0b707b217b15b106c25fe51df3724b25848310c0)
    #19 0x5f9636331464 in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw+0x10db464) (BuildId: ac74a52ca60e8913bef6eb6b3b23d6de648cf3c9)

previously allocated by thread T20 here:
    #0 0x7254e2afc3c2 in realloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:85
    #1 0x5f963a2f7080 in LuaUtil::LuaState::trackingAllocator(void*, void*, unsigned long, unsigned long) /home/elsid/dev/openmw/components/lua/luastate.cpp:110
    #2 0x7254de4e2fc8  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x3cfc8) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #3 0x7254de4f7476  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x51476) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #4 0x7254de50c456 in lua_newthread (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x66456) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #5 0x7254de5d53e5  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x12f3e5) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
    #6 0x7254de4dc0c5  (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x360c5) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)

Thread T20 created by T0 here:
    #0 0x7254e2af44cb in pthread_create /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:245
    #1 0x7254db6e2071 in __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:676
    #2 0x7254db6e2071 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:172
    #3 0x5f96380fa2eb in thread<MWLua::Worker::Worker(MWLua::LuaManager&)::<lambda()> > /usr/include/c++/14.2.1/bits/std_thread.h:173
    #4 0x5f96380fa2eb in MWLua::Worker::Worker(MWLua::LuaManager&) /home/elsid/dev/openmw/apps/openmw/mwlua/worker.cpp:18
    #5 0x5f963a23faf4 in std::__detail::_MakeUniq<MWLua::Worker>::__single_object std::make_unique<MWLua::Worker, MWLua::LuaManager&>(MWLua::LuaManager&) /usr/include/c++/14.2.1/bits/unique_ptr.h:1077
    #6 0x5f963a23faf4 in OMW::Engine::prepareEngine() /home/elsid/dev/openmw/apps/openmw/engine.cpp:920
    #7 0x5f963a2413ae in OMW::Engine::go() /home/elsid/dev/openmw/apps/openmw/engine.cpp:952
    #8 0x5f963633b3a7 in runApplication(int, char**) /home/elsid/dev/openmw/apps/openmw/main.cpp:228
    #9 0x5f963b375b45 in Debug::wrapApplication(int (*)(int, char**), int, char**, std::basic_string_view<char, std::char_traits<char> >) /home/elsid/dev/openmw/components/debug/debugging.cpp:457
    #10 0x5f9636331695 in main /home/elsid/dev/openmw/apps/openmw/main.cpp:240
    #11 0x7254db435487  (/usr/lib/libc.so.6+0x27487) (BuildId: 0b707b217b15b106c25fe51df3724b25848310c0)
    #12 0x7254db43554b in __libc_start_main (/usr/lib/libc.so.6+0x2754b) (BuildId: 0b707b217b15b106c25fe51df3724b25848310c0)
    #13 0x5f9636331464 in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw+0x10db464) (BuildId: ac74a52ca60e8913bef6eb6b3b23d6de648cf3c9)

SUMMARY: AddressSanitizer: heap-use-after-free (/home/elsid/dev/LuaJIT/build/gcc/asan/install/lib/libluajit-5.1.so.2+0x6293d) (BuildId: 1249151684379d19b11900f406fea9704a6375cb)
Shadow bytes around the buggy address:
  0x50800060d200: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
  0x50800060d280: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
  0x50800060d300: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
  0x50800060d380: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
  0x50800060d400: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
=>0x50800060d480: fa fa fa fa fd fd[fd]fd fd fd fd fd fd fd fd fd
  0x50800060d500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x50800060d580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x50800060d600: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x50800060d680: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x50800060d700: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==8699==ABORTING
2025-03-01 15:54:24 +01:00
elsid d400c0959c Hide main menu on new and loading game from menu scripts 2025-02-28 18:11:22 +01:00
Alexei Kotov ec2c031792 Make powers immune to silence (#8371) 2025-02-27 18:27:10 +03:00
uramer 3a98b945a8 Keep MENU-registered input actions between games 2025-02-26 16:56:41 +01:00
Alexei Kotov a6676fd6f3 Merge branch 'actionshaveeffects' into 'master'
Turn ActorActiveEffects:remove into a delayed action

Closes #8317, #8350, and #8366

See merge request OpenMW/openmw!4553
2025-02-24 22:49:52 +00:00
Alexei Kotov 73bb281f34 Merge branch 'toscrollornottoscroll' into 'master'
Don't create a scrollbar that cannot be scrolled

Closes #8364

See merge request OpenMW/openmw!4552
2025-02-24 21:35:19 +00:00
Evil Eye f891a7c3b3 Turn ActorActiveEffects:remove into a delayed action 2025-02-24 17:07:32 +01:00
psi29a 614ca25d3b Merge branch 'changelog' into 'master'
Move #6097 from 0.49.0 to 0.48.0 changelog

See merge request OpenMW/openmw!4544
2025-02-24 08:34:56 +00:00
psi29a 74018162c7 Merge branch 'deordmitri-master-patch-83688' into 'master'
Update install-game-files.rst

See merge request OpenMW/openmw!4269
2025-02-24 08:33:13 +00:00
Evil Eye 3e3dfac4e0 Don't create a scrollbar that cannot be scrolled 2025-02-23 10:48:13 +01:00
Alexei Kotov dad22cb672 Apply jvoisin's suggestion to install-game-files.rst 2025-02-22 22:37:58 +00:00
Alexei Kotov cf7e276a6a Remove file name exceptions (#7249) 2025-02-23 00:18:07 +03:00
Alexei Kotov 72cbf61b43 Rename apps/openmw/mwsound files and classes to follow naming conventions 2025-02-23 00:18:07 +03:00
Alexei Kotov fc850cfe69 Rename components/crashcatcher files to follow naming conventions 2025-02-23 00:18:07 +03:00
Alexei Kotov ac9505b536 Rename components/to_utf8 directory and files to follow naming conventions 2025-02-23 00:18:07 +03:00
Alexei Kotov 89426af94a Rename apps/components_tests files to follow naming conventions 2025-02-22 23:47:12 +03:00
Alexei Kotov a3e19f9bb7 Rename apps/openmw_tests files to follow naming conventions 2025-02-22 23:47:12 +03:00
Alexei Kotov dd16c87080 Rename components/platform files to follow naming conventions 2025-02-22 23:47:11 +03:00
Alexei Kotov b997386cd3 Rename android-main.cpp to follow naming conventions 2025-02-22 23:47:09 +03:00
Alexei Kotov 7df74664e4 Rename gl4es-init.cpp/h to follow naming conventions 2025-02-22 21:49:49 +03:00
Alexei Kotov 3793ff8be8 Standardize components/fx file include guards 2025-02-22 21:14:58 +03:00
Alexei Kotov 5d5595cc5b Standardize components/bsa file include guards and order 2025-02-22 21:12:28 +03:00
Alexei Kotov 8b911ce3eb Rename components/fx files to follow naming conventions 2025-02-22 21:00:40 +03:00
Alexei Kotov 0254feefe3 Rename bsa_file.cpp/hpp to follow naming conventions 2025-02-22 20:52:39 +03:00
Evil Eye 07cc2a72bb Merge branch 'automove' into 'master'
Don't disable automove when the player can't move (#8358)

Closes #8358

See merge request OpenMW/openmw!4547
2025-02-22 11:18:39 +00:00
Alexei Kotov 835ad09657 Move #6097 from 0.49.0 to 0.48.0 changelog 2025-02-21 11:39:54 +03:00
Alexei Kotov cd53cbbea2 Don't disable automove when the player can't move (#8358) 2025-02-21 01:38:08 +03:00
psi29a 5b788baa35 Merge branch 'screening' into 'master'
Build and test / Read .env file and expose it as output (push) Successful in 12s
Release / Read .env file and expose it as output (push) Successful in 6s
Build and test / Ubuntu (push) Failing after 29m42s
Build and test / MacOS (push) Canceled after 0s
Build and test / Windows (2019) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Release / Windows (push) Canceled after 0s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Editor: Fall back to the closest screen when necessary (#8354)

Closes #8354

See merge request OpenMW/openmw!4542
2025-02-19 11:27:33 +00:00
Alexei Kotov 04689334c5 Editor: Use the first/primary screen as last resort 2025-02-18 22:28:54 +03:00
Alexei Kotov d71e4ec9f0 Editor: Fall back to the closest screen when necessary (#8354) 2025-02-18 13:31:13 +03:00
psi29a 6ede5635b3 Merge branch 'edgelord' into 'master'
Fix UB when pathgrid geometry is generated and all pathgrid edges are invalid

See merge request OpenMW/openmw!4541
2025-02-17 15:01:15 +00:00
Alexei Kotov 602a429a68 Fix UB when pathgrid geometry is generated and all pathgrid edges are invalid 2025-02-16 17:46:52 +03:00
psi29a 3b05ec0ab1 Merge branch 'countteleportula' into 'master'
Include Ptrs with a count of 0 in cell unloading

Closes #8311

See merge request OpenMW/openmw!4536
2025-02-14 18:25:14 +00:00
Alexei Kotov 1a9e29844b Implement TCB interpolation for vectors and scalars (#2379) 2025-02-13 13:41:34 +03:00
Evil Eye ad8f6e5eb6 Include Ptrs with a count of 0 in cell unloading 2025-02-12 22:07:30 +01:00
psi29a 63e3b8f41b Merge branch 'levelledcreatures' into 'master'
Avoid reference to temporary in levelled creatures bindings (#8347)

Closes #8347

See merge request OpenMW/openmw!4535
2025-02-11 20:34:20 +00:00
psi29a 19793c21b4 Merge branch 'menucrash' into 'master'
Clear queued scripts when clearing the Lua manager

Closes #8346

See merge request OpenMW/openmw!4537
2025-02-11 20:33:11 +00:00
Evil Eye 86d56a0b1a Clear queued scripts when clearing the Lua manager 2025-02-10 20:04:24 +01:00
psi29a 782c274d86 Merge branch 'shutupsdl' into 'master'
Silence SDL3 window/display events coming from SDL2-compat

See merge request OpenMW/openmw!4531
2025-02-10 16:58:28 +00:00
psi29a d2610973dd Merge branch 'shutupssg' into 'master'
Add a dummy serializer for billboards

See merge request OpenMW/openmw!4532
2025-02-10 16:58:21 +00:00
psi29a 3405dbab6d Merge branch 'nifboolvectors' into 'master'
Optimize NIF boolean list reading

See merge request OpenMW/openmw!4534
2025-02-10 16:57:53 +00:00
Alexei Kotov 5626d925e3 Avoid reference to temporary in levelled creatures bindings (#8347) 2025-02-10 13:07:31 +03:00
Alexei Kotov c1960635d2 Optimize NIF boolean vector reading 2025-02-07 04:55:06 +03:00
Alexei Kotov eaf9488ba0 Silence SDL3 window/display events coming from SDL2-compat 2025-02-04 20:30:19 +03:00
Alexei Kotov cfa1ad0b33 Add a dummy serializer for billboards 2025-02-04 20:22:14 +03:00
Alexei Kotov 0f9be64904 Use the final effect cost to calculate enchantment price (#8340) 2025-02-04 09:21:13 +03:00
Evil Eye 7d2dd3422d Ignore missing global variables when filtering dialogue 2025-01-21 20:31:12 +01:00
Evil Eye a645ec0910 Allow filters to apply to creatures 2025-01-21 20:25:13 +01:00
Evil Eye 3b50bcfb3a Allow GetSpellEffects to detect enchantments by id 2025-01-19 20:07:53 +01:00
AnyOldName3 84c497b1fb capitulate 2025-01-17 01:45:09 +00:00
AnyOldName3 33553c0cf7 Handle encoding a bit more cleverly
* use the value from the existing openmw.cfg if it exists and we weren't told to use something else on the command line
* write the value to openmw.cfg if it wasn't there or we've overridden it
2025-01-17 01:34:08 +00:00
AnyOldName3 e345fca99a trim_ws, too 2025-01-17 01:21:24 +00:00
AnyOldName3 88fe079f95 Don't mangle settings with the comment character in their value
'#' is a valid character in setting values - it's only a comment if it's the first non-" \t\r\n" character on a line.
Making the comment ignoring match the parser we use elsewhere should avoid mangling data.
2025-01-17 00:53:19 +00:00
Evil Eye 40cba7962c Bump us up to 0.50.0 2025-01-06 16:43:54 +01:00
Bob Tuttle 3ef2084f80 Update install-game-files.rst 2024-07-22 20:19:21 +00:00
Yury Stepovikov 1e8b388be5 Fix typo and config description. 2024-06-19 22:03:40 +03:00
Yury Stepovikov 10c3c3389a Merge branch 'master' into add_open_config_button 2024-06-17 21:48:57 +03:00
Yury Stepovikov 5cfabd22fc Replace join with explicit strings to simplify translation 2024-06-17 21:11:21 +03:00
Yury Stepovikov 03d39f556b Fix ts files 2024-06-13 10:46:39 +03:00
Yury Stepovikov a8f54bf8ec Fix message order 2024-06-12 23:20:41 +03:00
Yury Stepovikov 86d7e34618 Merge branch 'master' into add_open_config_button 2024-06-12 23:15:15 +03:00
Yury Stepovikov de04c99087 Check for the presence of openmw.cfg and settings.cfg 2024-05-30 14:54:48 +03:00
Yury Stepovikov 8e370b042a Add toolTipText translations 2024-05-27 23:16:10 +03:00
Yury Stepovikov 603a75ab0a Code cleanup. Fix windows build. 2024-05-27 17:18:36 +03:00
Yury Stepovikov c29353e0b6 Improve toolTip messages 2024-05-27 14:10:10 +03:00
Yury Stepovikov e76196aadd Remove accidental changes 2024-05-25 17:32:19 +03:00
Yury Stepovikov 9d651a171e Add a list view to display config files 2024-05-25 13:08:39 +03:00
Yury Stepovikov 5676ccadaf Update translation files 2024-05-23 13:41:38 +03:00
Yury Stepovikov 2620744a57 Fix format 2024-05-23 12:58:20 +03:00
Yury Stepovikov 1c40b9ad1e Add a menu button to open configuration files 2024-05-23 12:36:10 +03:00
1727 changed files with 92725 additions and 34828 deletions
+21 -12
View File
@@ -1,18 +1,27 @@
Checks: >
-*,
boost-*,
portability-*,
-portability-template-virtual-member-function,
clang-analyzer-*,
-clang-analyzer-optin*,
-clang-analyzer-optin.*,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-clang-analyzer-cplusplus.NewDelete,
-clang-analyzer-core.CallAndMessage,
-modernize-avoid-bind
WarningsAsErrors: >
-*,
boost-*,
portability-*,
clang-analyzer-*,
-clang-analyzer-optin*,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-clang-analyzer-core.CallAndMessage
HeaderFilterRegex: '^(apps|components)'
modernize-avoid-bind,
readability-identifier-naming
WarningsAsErrors: '*'
HeaderFilterRegex: '(apps|components)/'
ExcludeHeaderFilterRegex: '_autogen/'
CheckOptions:
- key: readability-identifier-naming.ConceptCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.LocalVariableCase
value: camelBack
- key: readability-identifier-naming.NamespaceCase
value: CamelCase
- key: readability-identifier-naming.NamespaceIgnoredRegexp
value: 'bpo|osg(DB|FX|Particle|Shadow|Viewer|Util)?'
- key: readability-identifier-naming.ParameterCase
value: camelBack
+57
View File
@@ -0,0 +1,57 @@
name: Reusable MacOS workflow
on:
workflow_call:
inputs:
build-type:
default: RelWithDebInfo
type: string
image:
description: MacOS Runner image
required: true
type: string
jobs:
MacOS:
name: ${{ inputs.image }}
runs-on: ${{ inputs.image }}
steps:
- uses: actions/checkout@v6
- run: echo "CMAKE_BUILD_TYPE=${{ inputs.build-type }}" >> $GITHUB_ENV
- run: echo "MACOS_AMD64=true" >> $GITHUB_ENV
if: ${{ inputs.image == 'macos-15-intel' }}
- run: echo "DMG_IDENTIFIER=x86_64" >> $GITHUB_ENV
if: ${{ inputs.image == 'macos-15-intel' }}
- run: echo "DMG_IDENTIFIER=arm64" >> $GITHUB_ENV
if: ${{ inputs.image != 'macos-15-intel' }}
- name: Install Building Dependencies
run: CI/before_install.macos.sh
- name: Prime ccache
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ${{ inputs.image }}-${{ inputs.build-type }}
max-size: 1000M
- name: Configure
run: CI/before_script.macos.sh -C
- name: Build
run: CI/macos/build.sh
- name: Store dmg
uses: actions/upload-artifact@v6
with:
name: openmw-macos-dmg-${{ env.DMG_IDENTIFIER }}-${{ github.sha }}
path: |
${{ github.workspace }}/build/OpenMW-*.dmg
- name: Create prerelease
if: ${{ inputs.build-type == 'Release' }}
uses: softprops/action-gh-release@v2
with:
files: ${{ github.workspace }}/build/OpenMW-*.dmg
prerelease: true
draft: true
+10 -37
View File
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Add OpenMW PPA Dependencies
run: sudo add-apt-repository ppa:openmw/openmw; sudo apt-get update
@@ -67,50 +67,23 @@ jobs:
# name: build_artifact.7z
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Building Dependencies
run: CI/before_install.osx.sh
- name: Prime ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ env.BUILD_TYPE }}
max-size: 1000M
- name: Configure
run: CI/before_script.osx.sh
- name: Build
run: |
cd build
make -j $(sysctl -n hw.logicalcpu) package
Output-Envs:
name: Read .env file and expose it as output
runs-on: ubuntu-latest
outputs:
VCPKG_DEPS_TAG: ${{ env.VCPKG_DEPS_TAG }}
BUILD_TYPE: ${{ env.BUILD_TYPE }}
steps:
- uses: actions/checkout@v4
- run: cat "${{ github.workspace }}/CI/github.env" >> $GITHUB_ENV
strategy:
fail-fast: true
matrix:
args:
- image: macos-15
- image: macos-15-intel
uses: ./.github/workflows/macos.yml
with:
image: ${{ matrix.args.image }}
Windows:
needs:
- Output-Envs
strategy:
fail-fast: true
matrix:
image:
- "2019"
- "2022"
uses: ./.github/workflows/windows.yml
with:
image: ${{ matrix.image }}
vcpkg-deps-tag: ${{ needs.Output-Envs.outputs.VCPKG_DEPS_TAG }}
build-type: ${{ needs.Output-Envs.outputs.BUILD_TYPE }}
+11 -12
View File
@@ -6,23 +6,22 @@ on:
- openmw-**
jobs:
Output-Envs:
name: Read .env file and expose it as output
runs-on: ubuntu-latest
outputs:
VCPKG_DEPS_TAG: ${{ env.VCPKG_DEPS_TAG }}
steps:
- uses: actions/checkout@v4
- run: cat "${{ github.workspace }}/CI/github.env" >> $GITHUB_ENV
Windows:
needs:
- Output-Envs
uses: ./.github/workflows/windows.yml
with:
image: "2022"
vcpkg-deps-tag: ${{ needs.Output-Envs.outputs.VCPKG_DEPS_TAG }}
build-type: Release
package: true
release: true
secrets: inherit
MacOS:
strategy:
fail-fast: true
matrix:
args:
- image: macos-15
- image: macos-15-intel
uses: ./.github/workflows/macos.yml
with:
image: ${{ matrix.args.image }}
build-type: Release
+44 -27
View File
@@ -4,12 +4,12 @@ on:
workflow_call:
inputs:
image:
description: MSVC image (2019/2022)
description: Window Server image
required: true
type: string
vcpkg-deps-tag:
description: Git tag of our deps
required: true
msvc:
description: MSVC version (2022/2026)
default: "2022"
type: string
build-type:
default: RelWithDebInfo
@@ -35,7 +35,12 @@ jobs:
if: ${{ inputs.package }}
run: choco install nsis
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- shell: bash
name: Add deps version env to GITHUB_ENV, stripping comments
run: |
sed '/^\s*#/d; /^\s*$/d' "${{ github.workspace }}/CI/deps_versions.msvc.sh" >> $GITHUB_ENV
- name: Create directories for dependencies
run: |
@@ -45,7 +50,7 @@ jobs:
- name: Download prebuilt vcpkg packages
working-directory: ${{ github.workspace }}/deps
run: |
$MANIFEST = "vcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }}.txt"
$MANIFEST = "vcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }}-manifest.txt"
curl --fail --retry 3 -L -o "$MANIFEST" "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/$MANIFEST"
$lines = Get-Content "$MANIFEST"
$URL = $lines[0]
@@ -61,14 +66,14 @@ jobs:
- name: Extract archived prebuilt vcpkg packages
working-directory: ${{ github.workspace }}/deps
run: 7z x -y -ovcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }} $env:archive
run: 7z x -y -ovcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }} $env:archive
- name: Cache Qt
id: qt-cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/deps/Qt/6.6.3/msvc2019_64
key: qt-cache-6.6.3-msvc2019_64-v1
path: ${{ github.workspace }}/deps/Qt/${{ env.QT_VER }}/msvc2019_64
key: qt-cache-${{ env.QT_VER }}-msvc2019_64-v1
- name: Download aqt
if: steps.qt-cache.outputs.cache-hit != 'true'
@@ -81,7 +86,7 @@ jobs:
- name: Install Qt with aqt
if: steps.qt-cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/deps/Qt
run: .\aqt_x64.exe install-qt windows desktop 6.6.3 win64_msvc2019_64
run: .\aqt_x64.exe install-qt windows desktop ${{ env.QT_VER }} win64_msvc2019_64
- uses: ilammy/msvc-dev-cmd@v1
@@ -94,12 +99,12 @@ jobs:
-B ${{ github.workspace }}/build
-G Ninja
-D CMAKE_BUILD_TYPE=${{ inputs.build-type }}
-D CMAKE_TOOLCHAIN_FILE='${{ github.workspace }}/deps/vcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }}/scripts/buildsystems/vcpkg.cmake'
-D CMAKE_PREFIX_PATH='${{ github.workspace }}/deps/Qt/6.6.3/msvc2019_64'
-D CMAKE_TOOLCHAIN_FILE='${{ github.workspace }}/deps/vcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }}/scripts/buildsystems/vcpkg.cmake'
-D CMAKE_PREFIX_PATH='${{ github.workspace }}/deps/Qt/${{ env.QT_VER }}/msvc2019_64'
${{ inputs.package && '-D CMAKE_CXX_FLAGS_RELEASE="/O2 /Ob2 /DNDEBUG /Zi"' || '' }}
${{ inputs.package && '-D "CMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO"' || '' }}
-D LuaJit_INCLUDE_DIR='${{ github.workspace }}/deps/vcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }}/installed/x64-windows/include/luajit'
-D LuaJit_LIBRARY='${{ github.workspace }}/deps/vcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }}/installed/x64-windows/lib/lua51.lib'
${{ inputs.package && '-D "CMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO"' || '' }}
-D LuaJit_INCLUDE_DIR='${{ github.workspace }}/deps/vcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }}/installed/x64-windows/include/luajit'
-D LuaJit_LIBRARY='${{ github.workspace }}/deps/vcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }}/installed/x64-windows/lib/lua51.lib'
-D BUILD_BENCHMARKS=${{ ! inputs.package }}
-D BUILD_COMPONENTS_TESTS=${{ ! inputs.package }}
-D BUILD_OPENMW_TESTS=${{ ! inputs.package }}
@@ -108,18 +113,19 @@ jobs:
-D OPENMW_USE_SYSTEM_YAML_CPP=OFF
-D OPENMW_LTO_BUILD=ON
${{ inputs.package && '-D "VCREDIST64=$env:VCToolsRedistDir/vc_redist.x64.exe"' || '' }}
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build OpenMW
run: cmake --build ${{ github.workspace }}/build
- name: Copy missing DLLs
run: |
cp ${{ github.workspace }}/deps/vcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }}/installed/x64-windows/bin/Release/MyGUIEngine.dll ${{ github.workspace }}/build
cp -Filter *.dll -Recurse ${{ github.workspace }}/deps/vcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }}/installed/x64-windows/bin/osgPlugins-3.6.5 ${{ github.workspace }}/build
cp ${{ github.workspace }}/deps/vcpkg-x64-${{ inputs.image }}-${{ inputs.vcpkg-deps-tag }}/installed/x64-windows/bin/*.dll ${{ github.workspace }}/build
cp ${{ github.workspace }}/deps/vcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }}/installed/x64-windows/bin/Release/MyGUIEngine.dll ${{ github.workspace }}/build
cp -Filter *.dll -Recurse ${{ github.workspace }}/deps/vcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }}/installed/x64-windows/bin/osgPlugins-3.6.5 ${{ github.workspace }}/build
cp ${{ github.workspace }}/deps/vcpkg-x64-windows-${{ inputs.msvc }}-${{ env.VCPKG_TAG }}/installed/x64-windows/bin/*.dll ${{ github.workspace }}/build
- name: Copy Qt DLLs
working-directory: ${{ github.workspace }}/deps/Qt/6.6.3/msvc2019_64
working-directory: ${{ github.workspace }}/deps/Qt/${{ env.QT_VER }}/msvc2019_64
run: |
cp bin/Qt6Core.dll ${{ github.workspace }}/build
cp bin/Qt6Gui.dll ${{ github.workspace }}/build
@@ -172,29 +178,39 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
job_url=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json jobs --jq '.jobs[] | select(.name == "windows-${{ inputs.image }}") | .url')
job_url=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json jobs --jq '.jobs[] | select(.name == "windows-${{ inputs.msvc }}") | .url')
printf "Ref ${{ github.ref }}\nJob ${job_url}\nCommit ${{ github.sha }}\n" > install/CI-ID.txt
cp install/CI-ID.txt pdb/CI-ID.txt
cp install/CI-ID.txt SymStore/CI-ID.txt
- name: Store OpenMW archived pdb files
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: openmw-windows-${{ inputs.image }}-pdb-${{ github.sha }}
name: openmw-windows-${{ inputs.msvc }}-pdb-${{ github.sha }}
path: ${{ github.workspace }}/pdb/*
- name: Store OpenMW build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: openmw-windows-${{ inputs.image }}-${{ github.sha }}
name: openmw-windows-${{ inputs.msvc }}-${{ github.sha }}
path: ${{ github.workspace }}/install/*
- name: Store symbol server artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: openmw-windows-${{ inputs.image }}-sym-store-${{ github.sha }}
name: openmw-windows-${{ inputs.msvc }}-sym-store-${{ github.sha }}
path: ${{ github.workspace }}/SymStore/*
- name: Store log etc. artifacts
uses: actions/upload-artifact@v6
with:
name: openmw-windows-${{ inputs.msvc }}-logs-and-stuff-${{ github.sha }}
path: |
${{ github.workspace }}/build/compile_commands.json
${{ github.workspace }}/build/**/*.log
${{ github.workspace }}/build/**/*.ninja_log
${{ github.workspace }}/build/**/CMakeCache.txt
- name: Upload to symbol server
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -242,3 +258,4 @@ jobs:
with:
files: ${{ github.workspace }}/install/*.exe
prerelease: true
draft: true
+488 -117
View File
File diff suppressed because it is too large Load Diff
+44
View File
@@ -0,0 +1,44 @@
<!--
PLEASE READ THIS BEFORE POSTING:
If you're reporting an issue specific to an OpenMW fork:
- TES3MP (Multiplayer): Report at https://github.com/TES3MP/openmw-tes3mp/issues
- OpenMW-VR: Report at https://gitlab.com/madsbuvi/openmw/-/issues
Mod list issues or mod installer issues do not belong here.
If reporting an issue with a specific open Merge Request, comment on the MR itself.
-->
## Issue Description
<!-- Describe the issue in as much detail as you can. -->
## Steps to Reproduce
<!--
1. Open the game
2. Go to '...'
3. Click on '...'
-->
## System Information
* **OpenMW Version:** <!-- e.g. 0.50.0 or Revision 945c3a... -->
* **Operating System & Version:**
* **GPU:**
* **Morrowind Version:** <!-- Retail CD, Steam, GOG? -->
* **Language:** <!-- e.g. English -->
* **Addons:** <!-- Tribunal, Bloodmoon? -->
## Mods
* **Are you using mods?** Yes/No
* **Are you using any shader mods?** Yes/No
* **Does it happen in a clean vanilla install?** Yes/No/Untested
## Logs and Settings
<!--
Please attach your openmw.log and settings.cfg files.
If the issue is graphical or location-based, please paste the output of the 'bc' command below.
(Open console with ` -> Click object -> type 'bc')
-->
@@ -0,0 +1,36 @@
<!--
Identify the issue number this MR fixes or relates to.
Use "Closes #NUMBER" if it fixes the issue, or "Related to #NUMBER" if it references it.
-->
Closes #
## Description
<!--
Provide a description of your changes.
Reasoning, approach, and any specific architectural decisions.
PLEASE: No LLM/AI generated descriptions. Write this yourself.
-->
## Checklist
<!--
Mark as done if not applicable.
-->
- [ ] I have read the [CONTRIBUTING guidelines](https://gitlab.com/OpenMW/openmw/-/blob/master/CONTRIBUTING.md)
- [ ] My code builds and runs locally
- [ ] My code passes CI on my fork
- [ ] I have included steps to replicate/confirm the changes below
- [ ] I have attached necessary supporting files or assets
## Steps to Test/Replicate
1. ...
2. ...
3. ...
## Outstanding TODOs / Questions
- [ ] ...
+1 -1
View File
@@ -10,4 +10,4 @@ python:
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.9"
+10 -4
View File
@@ -10,7 +10,8 @@ If you feel your name is missing from this list, please add it to `AUTHORS.md`.
Programmers
-----------
Bret Curtis (psi29a) - Project leader 2019-present
Alexey Dobrokhotov (Capo) - Project leader 2025-present
Bret Curtis (psi29a) - Project leader 2019-2025
Marc Zinnschlag (Zini) - Project leader 2010-2018
Nicolay Korslund - Project leader 2008-2010
scrawl - Top contributor
@@ -49,10 +50,10 @@ Programmers
Berulacks
Bo Svensson
Britt Mathis (galdor557)
Capostrophic
Carl Maxwell
cc9cii
Cédric Mocquillon
Charles Horn
Chris Boyce (slothlife)
Chris Robinson (KittyCat)
Chris Vigil
@@ -98,6 +99,7 @@ Programmers
Gohan1989
gugus/gus
guidoj
Hailey Tribble (daisyhasacat)
Haoda Wang (h313)
holorat
hristoast
@@ -196,7 +198,7 @@ Programmers
Qlonever
Radu-Marius Popovici (rpopovici)
Rafael Moura (dhustkoder)
Randy Davin (Kindi)
Randy Davin (Kuyondo)
rdimesio
rexelion
riothamus
@@ -219,6 +221,7 @@ Programmers
sir_herrbatka
smbas
Sophie Kirschner (pineapplemachine)
Sophia Polfliet (Sophie~<3)
spycrab
Stefan Galowicz (bogglez)
Stanislav Bobrov (Jiub)
@@ -232,11 +235,11 @@ Programmers
Tess (tescoShoppah)
thegriglat
Thomas Luppi (Digmaster)
Tim Hagberg (hazardMan)
tlmullis
trav
tri4ng1e
Thoronador
Tobias Tribble (zackhasacat)
Tom Lowe (Vulpen)
Tom Mason (wheybags)
Torben Leif Carrington (TorbenC)
@@ -283,6 +286,7 @@ Packagers
Kenny Armstrong (artorius) - Fedora Linux
Nikolay Kasyanov (corristo) - Mac OS X
Sandy Carter (bwrsandman) - Arch Linux
Sarah Sunday (ssunday) - MacOS
Public Relations and Translations
---------------------------------
@@ -290,6 +294,8 @@ Public Relations and Translations
Artem Kotsynyak (greye) - Russian News Writer
Dawid Lakomy (Vedyimyn) - Polish News Writer
ElderTroll - Release Manager
Georgi Georgiev (RacerBG) - Bulgarian Translation
Igor Wiśniewski (Igilq) - Polish Translation
Jim Clauwaert (Zedd) - Public Outreach
juanmnzsk8 - Spanish News Writer
Julien Voisin (jvoisin/ap0) - French News Writer
+226 -1
View File
@@ -1,3 +1,217 @@
0.51.0
------
Bug #4769: Editor: Unable to edit exterior cells from topic info table
Bug #6439: Moons are blended incorrectly
Bug #6494: Some Raven Rock buildings are enabled from the beginning of the game
Bug #7340: Guards do not become properly aggressive e.g. for dialogue purposes
Bug #7595: OpenMW-CS does not support shader rendering
Bug #7605: Creatures without inventory stores cannot use enchanted items
Bug #8110: say function doesn't seem to respect subtitles config
Bug #8123: Can't switch ammo while attacking with a weapon/spell that doesn't use it
Bug #8129: MessageBox button argument handling differences
Bug #8270: Editor: Parts of landscape textures are transparent in the cell view, allowing you to see wallpaper or other windows below them
Bug #8345: Editor: Random crash on save with Qt6
Bug #8351: Malformed potion model should consistently error out
Bug #8601: Segfault when opening Options menu while NCGDMW is loaded
Bug #8657: Preloading crash on exit due to failed startup
Bug #8692: Can't switch to enchanted weapons' spells in the spell menu when spellcasting
Bug #8693: Crash when constructing infinite-length UI elements
Bug #8699: Dangling Lua script pointer crashes caused by e.g. moving items
Bug #8732: MessageBox formatting is too limited
Bug #8733: Steam Deck controller triggers not detected in game menus
Bug #8760: Single-character topics don't get linked
Bug #8765: Actors can't transmit diseases to other actors
Bug #8769: LuaUtil::call not wrapped by invokeProtectedCall
Bug #8770: Cursor should be hidden when controller tooltips are visible for spells
Bug #8771: Controller focus is often reset inappropriately in containers
Bug #8775: Crash when using nearby.castRay with { ignore = nearby.actors }
Bug #8779: Lua: addSkillLevelUpHandler does not work properly with skills that reached maximum level
Bug #8786: Door markers aren't updated correctly
Bug #8789: Lua API: Incorrect field name for FactionRank reputation requirement
Bug #8797: Make equipping button play the sound once
Bug #8799: 'Show Controller Tooltips By Default' option is not persistent
Bug #8802: Lua UI layout children removal leaves dangling pointers leading to reloading crashes
Bug #8820: Trueflame torch effect not working in 0.50
Bug #8833: Resizing item and spell views with a mouse leads to breakage when controller tooltips are on
Bug #8840: Lua UI elements accept table-like objects as properties, causing crashes
Bug #8842: Loading game with --load-savegame may not detect the original character profile
Bug #8847: Physics shape "is actor?" test should be based on ratio, not abs diff
Bug #8854: Having a sunrays shader in post-processing chain disables default sun glare even if post processing is off
Bug #8864: Heavy snowfall and rainfall are broken
Bug #8884: Object paging LOD level selection is unreliable
Bug #8917: Lua: Spawned gold stacks don't pick a model
Bug #8924: Odd animation after throwing all thrown weapon stack
Bug #8926: No "throwing" sound for thrown weapons
Bug #8929: Magicka weakness does not enhance itself
Bug #8930: Extra data links cannot be null in Gamebryo meshes
Bug #8946: Spell icon order and visibility should rely on the earliest applied effect
Bug #8949: Dire Shockballs with 0 duration do too much damage
Bug #8955: [Lua] Item:remove() goes by id and deletes *every* item with that id (restocking)
Bug #8975: Werewolf attribute bug when boosted over 100 with corprus
Bug #8978: Polish needs additional word separators in dialogue
Bug #8980: Lua: Teleporting the player while menus are open crashes the game
Bug #8983: Animation instant transition on unequipping ammo mid-attack
Bug #8985: Objects that share a mesh with a VFX become uninteractable
Bug #8988: Particles are not inverted vertically
Bug #8996: Crash when skinning data references a nonexistent vertex
Bug #8999: Various Wizard badness
Bug #9018: controls.use = 4 sometimes semi-freezes the game
Bug #9026: Thrown projectiles are not rotated
Bug #9048: Escort AI missing argument
Bug #9062: Actors may fail to reequip the weapon when staggered
Bug #9078: Player can become decoupled from camera in cases when it shouldn't
Bug #9085: Lua item:remove() before queued npc:teleport() hangs main thread
Feature #721: Editor: Right-to-Left subview placement option
Feature #2316: ess-Importer: convert targeted scripts
Feature #2903: Barter gold bindings
Feature #5197: Editor: terrain vertex paint editmode
Feature #7152: OpenMW-CS: Verify global search regexp
Feature #7297: Support topic keyword override files from the Russian localization
Feature #7399: Automatically detect supported games via launcher through common locations like steam
Feature #7493: Add button to open current openmw.cfg(s) in the launcher
Feature #7830: Preserve global script targets not created by content files
Feature #8076: Lua: Add read access to Topic info Conditions
Feature #8342: Custom spell, enchantment records and effect lists
Feature #8392: Editor: Rotate a group of selected objects around 1 axis
Feature #8644: Add loop key to world.vfx.spawn and a way to remove them
Feature #8705: Dehardcode global map color palette
Feature #8725: Lua: Expose localized cell names
Feature #8731: Use Hand to Hand Hit 2 sound
Feature #8774: Controller Support: When in the barter/loot menus, have the active menu be brought to the front.
Feature #8788: Dehardcode script settings window font and colors
Feature #8791: Custom magic effect records
Feature #8796: Expose potion autocalc flag
Feature #8801: Support additional controller buttons
Feature #8816: Werewolf transformation binding
Feature #8826: OMWFX: Expose the sunlight direction
Feature #8841: Time advancement binding
Feature #8874: esmtool dump should output cell reference rotation and door destination rotation
Feature #8902: Controller navigation for quick keys menu spell selection
Feature #8911: Custom creature and container records
Feature #8913: Show the current gamma correction value like the other settings in-game
Feature #8956: Implement iGreetDuration and fGreetDistanceReset
Feature #8957: Implement iMaxInfoDist
Feature #8962: Expose magic effect speed parameter
Feature #8966: Add DialogueResponse event
Feature #8979: Animation ended handler
Feature #8987: Lua Load context
Feature #8998: Custom door, probe, and static records
Feature #9002: Warn on unknown layout properties
Feature #9010: Starting cell binding
Feature #9013: Expose reputation to Lua
Feature #9027: Bulgarian translation for Qt tools
Feature #9030: Lua-controllable camera projection offset
Task #8718: Lua: Cell fields can still return empty strings instead of nil values
Task #9001: Remove the exclusive FFP mode
0.50.0
------
Bug #2967: Inventory windows don't update when changing items by script
Bug #4437: Transformations for NiSkinInstance are ignored
Bug #4885: Disable in dialogue result script causes a crash
Bug #5331: Pathfinding works incorrectly when actor is moved from one interior cell to another
Bug #6029: Hostile NPCs are perfectly aware of a player character with a 75% Chameleon effect
Bug #6039: Next Spell keybind fails while selected enchanted item has multiple copies
Bug #6573: Editor: Selection behaves incorrectly on high-DPI displays
Bug #6792: Birth sign info box has no line breaks
Bug #7371: Equipping item from inventory does not play a Down sound when equipping fails
Bug #7622: Player's marksman weapons don't work on close actors underwater
Bug #7649: The sound and vfx of resisted enchanted items' magic still play
Bug #7693: I.ItemUsage should return an item to the selected stack if equipping/consumption is denied
Bug #7740: Magic items in the HUD aren't composited correctly
Bug #7799: Picking up ingredients while object paging active grid is on may cause a hiccup
Bug #7871: Kwama Queen doesn't start combat with player
Bug #7979: Paralyzed NPCs battlecry
Bug #7996: Instant magic effects are not always instant
Bug #8012: Startcombat and Stopcombat do not affect music in the menu mode
Bug #8176: Error marker cloning is not thread-safe
Bug #8245: The console command ShowVars does not list global mwscripts
Bug #8265: Topics are linked incorrectly
Bug #8303: On target spells cast by non-actors should fire underwater
Bug #8309: RemoveSpell should instantly remove the spell's effects
Bug #8318: Missing global variables are not handled gracefully in dialogue conditions
Bug #8333: Quest status subrecords should not actually cause parsing to skip remaining data
Bug #8340: Multi-effect enchantments are too expensive
Bug #8341: Repeat shader visitor passes discard parallax
Bug #8349: Travel to non-existent cell causes persistent black screen
Bug #8359: Some quick keys menu related issues
Bug #8371: Silence affects powers
Bug #8375: Moon phase cycle doesn't match Morrowind
Bug #8383: Casting bound helm or boots on beast races doesn't cleanup properly
Bug #8385: Russian encoding broken with locale parameters and calendar
Bug #8399: Jail skill increases don't count as progress towards the next level
Bug #8404: Prevent merchant equipping breaks on lights
Bug #8408: OpenMW doesn't report all the potential resting hindrances
Bug #8414: Waterwalking works when collision is disabled
Bug #8431: Behaviour of removed items from a container is buggy
Bug #8432: Changing to and from an interior cell doesn't update collision
Bug #8433: Wandering NPCs are not capable of avoiding easy obstacles
Bug #8436: Spell selection in a pinned spellbook window doesn't update
Bug #8437: Pinned inventory window's pin button doesn't look pressed
Bug #8446: Travel prices are strangely inconsistent
Bug #8447: Werewolf swimming animation breaks in third person perspective
Bug #8459: Changing magic effect base cost doesn't change spell price
Bug #8466: Showmap "" reveals nameless cells
Bug #8485: Witchwither disease and probably other common diseases don't work correctly
Bug #8490: Normals on Water disappear when Water Shader is Enabled but Refraction is Disabled
Bug #8500: OpenMW Alarm behaviour doesn't match morrowind.exe
Bug #8519: Multiple bounty is sometimes assigned to player when detected during a pickpocketing action
Bug #8540: Magic resistance is applied to effects without a magnitude
Bug #8551: Quick keys are not saved if the item is not present anymore
Bug #8557: Charm's disposition changes capped on 100, uncapped below 0
Bug #8560: Global filtering setting doesn't apply to spell effect in hands
Bug #8582: addScript-attached local scripts start out inactive
Bug #8584: Spacing of service menu list entries is inconsistent
Bug #8585: Dialogue topic list doesn't have enough padding
Bug #8587: Minor INI importer problems
Bug #8593: Render targets do not generate mipmaps
Bug #8598: Post processing shaders don't interact with the vfs correctly
Bug #8599: Non-ASCII paths in BSA files don't work
Bug #8606: Floating point imprecision can mess with container capacity
Bug #8609: The crosshair is too large
Bug #8610: Terrain normal maps using NormalGL format instead of NormalDX
Bug #8612: Using aiactivate on an ingredient when graphical herbalism is enabled triggers non-stop pickup sounds
Bug #8614: Lua garbage collection fails to remove unused data
Bug #8615: Rest/wait time progress speed is different from vanilla
Bug #8620: Create/CloneCommand can reuse refNums, causing severe issues in-game
Bug #8650: Some plants turn invisible when being called types.Container.inventory(cont):isResolved()
Bug #8680: Dead ancestor ghosts stop being dust when you rest near them
Bug #8686: openmw-cs: Crash when smoothing terrain of a not-yet-created cell.
Bug #8710: Absorb Skill breaks on creatures
Bug #8720: Crash due to a malformed Lua UI element
Bug #8734: Shield sheathing does not work properly
Bug #8757: Crash in Lua coroutine when accessing player
Bug #8758: Lua UI crash on creating nested UI elements twice without destroying old parent element
Feature #2522: Support quick item transfer
Feature #3740: Gamepad GUI Mode
Feature #3769: Allow GetSpellEffects on enchantments
Feature #6000: Oblivion terrain rendering
Feature #6976: [Lua] Weather API
Feature #7813: Add audio doppler for 3d sounds
Feature #7879: Lua: Region record store bindings
Feature #7966: Add Lua read access to TES3 player's journal records
Feature #8077: Save settings changes when clicking "ok"/closing the window
Feature #8112: Expose landscape record data to Lua
Feature #8113: Support extended selection in autodetected subdirectory dialog
Feature #8139: Editor: Redesign the selection markers
Feature #8285: Expose list of active shaders in postprocessing API
Feature #8290: Show player gold in Spellmaking
Feature #8313: Show the character name in the savegame details
Feature #8320: Add access mwscript source text to lua api
Feature #8334: Lua: AddTopic equivalent
Feature #8355: Lua: Window visibility checking in interfaces.UI
Feature #8509: FillJournal script instruction
Feature #8579: Bulk (un)indentation in mwscript editor
Feature #8580: Sort characters in the save loading menu
Feature #8597: Lua: Add more built-in event handlers
Feature #8629: Expose path grid data to Lua
Feature #8642: Partially dehardcode on-hit mechanics
Feature #8654: Allow lua world.createRecord to create NPC records
Feature #8665: Polish localization for Qt tools and exposed in-game lines
Task #8578: Drop support for Qt5
0.49.0
------
@@ -35,7 +249,6 @@
Bug #5977: Fatigueless NPCs' corpse underwater changes animation on game load
Bug #6025: Subrecords cannot overlap records
Bug #6027: Collisionshape becomes spiderweb-like when the mesh is too complex
Bug #6097: Level Progress Tooltip Sometimes Not Updated
Bug #6146: Lua command `actor:setEquipment` doesn't trigger mwscripts when equipping or unequipping a scripted item
Bug #6156: 1ft Charm or Sound magic effect vfx doesn't work properly
Bug #6190: Unintuitive sun specularity time of day dependence
@@ -228,6 +441,17 @@
Bug #8252: Plugin dependencies are not required to be loaded
Bug #8295: Post-processing chain is case-sensitive
Bug #8299: Crash while smoothing landscape
Bug #8364: Crash when clicking scrollbar without handle (divide by zero)
Bug #8378: Korean bitmap fonts are unusable
Bug #8439: Creatures without models can crash the game
Bug #8441: Freeze when using video main menu replacers
Bug #8445: Launcher crashes on exit when cell name loading thread is still running
Bug #8462: Crashes when resizing the window on macOS
Bug #8465: Blue screen w/ antialiasing and post-processing on macOS
Bug #8503: Camera does not handle NaN gracefully
Bug #8541: Lua: util.color:asHex produces wrong output for some colors
Bug #8567: Token replacement does not work via CLI and relative paths passed via the command line are not relative to the CWD
Bug #8576: Crash on exit when unresolving containers with scripted items
Feature #1415: Infinite fall failsafe
Feature #2566: Handle NAM9 records for manual cell references
Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking
@@ -392,6 +616,7 @@
Bug #6066: Addtopic "return" does not work from within script. No errors thrown
Bug #6067: ESP loader fails for certain subrecord orders
Bug #6087: Bound items added directly to the inventory disappear if their corresponding spell effect ends
Bug #6097: Level Progress Tooltip Sometimes Not Updated
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
Bug #6107: Fatigue is incorrectly recalculated when fortify effect is applied or removed
Bug #6109: Crash when playing a custom made menu_background file
+1 -1
View File
@@ -32,7 +32,7 @@ command -v unixPathAsWindows >/dev/null 2>&1 || function unixPathAsWindows {
# capture CMD environment in a shell with MSVC activated
cmd //c "$(unixPathAsWindows "$(dirname "${BASH_SOURCE[0]}")")\ActivateMSVC.bat" "&&" "bash" "-c" "declare -px > declared_env.sh"
cmd //c "$(unixPathAsWindows "$(dirname "${BASH_SOURCE[0]}")")\ActivateMSVC.bat" "&&" "$(unixPathAsWindows $BASH)" "-c" "declare -px > declared_env.sh"
source ./declared_env.sh
rm declared_env.sh
+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh -ex
source ./CI/macos/deps_versions.sh
brew tap --repair
brew update --quiet
brew install curl p7zip
if [[ "${MACOS_AMD64}" ]]; then
VCPKG_FILE="vcpkg-x64-osx-dynamic"
command -v /usr/local/bin/brew || arch -x86_64 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 bash -c "command -v qmake >/dev/null 2>&1 && qmake -v | grep -F 'Using Qt version 6.' >/dev/null || /usr/local/bin/brew install qt@6"
else
VCPKG_FILE="vcpkg-arm64-osx-dynamic"
command -v qmake >/dev/null 2>&1 && qmake -v | grep -F "Using Qt version 6." >/dev/null || brew install qt@6
fi
curl "https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/${VCPKG_FILE}-${VCPKG_TAG}-manifest.txt" -o openmw-manifest.txt
{ read -r URL && read -r HASH FILE; } < openmw-manifest.txt
curl -fSL -R -J $URL -o $FILE
echo "${HASH:?} ${FILE:?}" | sha512sum
7z x -y -o/tmp/openmw-deps-pre $FILE && \
mv /tmp/openmw-deps-pre/*/ /tmp/openmw-deps/ && \
rmdir /tmp/openmw-deps-pre
command -v cmake >/dev/null 2>&1 || brew install cmake
-30
View File
@@ -1,30 +0,0 @@
#!/bin/sh -ex
export HOMEBREW_NO_EMOJI=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_AUTOREMOVE=1
brew tap --repair
brew update --quiet
brew install curl xquartz gd fontconfig freetype harfbuzz brotli s3cmd
command -v ccache >/dev/null 2>&1 || brew install ccache
command -v cmake >/dev/null 2>&1 || brew install cmake
command -v qmake >/dev/null 2>&1 || brew install qt@5
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"
# Install deps
brew install openal-soft icu4c yaml-cpp sqlite
ccache --version
cmake --version
qmake --version
if [[ "${MACOS_AMD64}" ]]; then
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20240802.zip -o ~/openmw-deps.zip
unzip -o ~/openmw-deps.zip -d /tmp > /dev/null
else
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20240818-arm64.tar.xz -o ~/openmw-deps.tar.xz
tar xf ~/openmw-deps.tar.xz -C /tmp > /dev/null
fi
+2 -2
View File
@@ -17,7 +17,7 @@ declare -a CMAKE_CONF_OPTS=(
-DBUILD_SHARED_LIBS="${BUILD_SHARED_LIBS:-OFF}"
-DUSE_SYSTEM_TINYXML=ON
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=ON
-DOPENMW_CXX_FLAGS="-Werror -Werror=implicit-fallthrough" # flags specific to OpenMW project
-DOPENMW_CXX_FLAGS="${OPENMW_CXX_FLAGS}" # flags specific to OpenMW project
)
if [[ "${CMAKE_EXE_LINKER_FLAGS}" ]]; then
@@ -38,7 +38,7 @@ fi
if [[ $CI_CLANG_TIDY ]]; then
CMAKE_CONF_OPTS+=(
-DCMAKE_CXX_CLANG_TIDY="clang-tidy;--warnings-as-errors=*"
-DCMAKE_CXX_CLANG_TIDY=clang-tidy-19
-DBUILD_COMPONENTS_TESTS=ON
-DBUILD_OPENMW_TESTS=ON
-DBUILD_OPENCS_TESTS=ON
+157
View File
@@ -0,0 +1,157 @@
#!/bin/bash -e
VERBOSE=""
USE_CCACHE=""
KEEP=""
USE_WERROR=""
while [ $# -gt 0 ]; do
ARGSTR=$1
shift
if [ ${ARGSTR:0:1} != "-" ]; then
echo "Unknown argument $ARGSTR"
echo "Try '$0 -h'"
wrappedExit 1
fi
for (( i=1; i<${#ARGSTR}; i++ )); do
ARG=${ARGSTR:$i:1}
case $ARG in
V )
VERBOSE=true ;;
C )
USE_CCACHE=true ;;
k )
KEEP=true ;;
E )
USE_WERROR=true ;;
h )
cat <<EOF
Usage: $0 [-VCkETh]
Options:
-C
Use ccache.
-h
Show this message.
-k
Keep the old build directory, default is to delete it.
-V
Run verbosely
-E
Use warnings as errors (-Werror)
EOF
exit 0
;;
* )
echo "Unknown argument $ARG."
echo "Try '$0 -h'"
exit 1 ;;
esac
done
done
if [[ -z $KEEP ]]; then
if [[ -n $VERBOSE && -d "build" ]]; then
echo "Deleting existing build directory"
fi
rm -fr build
fi
mkdir -p build
cd build
DEPENDENCIES_ROOT_PATH="/tmp/openmw-deps"
if [[ "${MACOS_AMD64}" ]]; then
QT_PATH=$(arch -x86_64 /bin/bash -c "qmake -v | sed -rn -e 's/Using Qt version [.0-9]+ in //p'")
else
QT_PATH=$(qmake -v | sed -rn -e "s/Using Qt version [.0-9]+ in //p")
fi
if [[ -n $VERBOSE ]]; then
echo "Using Qt path: ${QT_PATH}"
fi
declare -a CMAKE_CONF_OPTS=(
-D CMAKE_CXX_FLAGS="-stdlib=libc++"
-D CMAKE_C_COMPILER="clang"
-D CMAKE_CXX_COMPILER="clang++"
-DOPENMW_USE_SYSTEM_YAML_CPP=OFF
-D OPENMW_OSX_DEPLOYMENT=TRUE
)
declare -a BUILD_OPTS=(
-D BUILD_OPENMW=TRUE
-D BUILD_OPENCS=TRUE
-D BUILD_ESMTOOL=TRUE
-D BUILD_BSATOOL=TRUE
-D BUILD_ESSIMPORTER=TRUE
-D BUILD_NIFTEST=TRUE
-D BUILD_NAVMESHTOOL=TRUE
-D BUILD_BULLETOBJECTTOOL=TRUE
-G"Unix Makefiles"
)
if [[ "${MACOS_AMD64}" ]]; then
VCPKG_TARGET_TRIPLET="x64-osx-dynamic"
CMAKE_CONF_OPTS+=(
-D CMAKE_OSX_ARCHITECTURES="x86_64"
-D CMAKE_OSX_DEPLOYMENT_TARGET="13.7"
)
else
VCPKG_TARGET_TRIPLET="arm64-osx-dynamic"
CMAKE_CONF_OPTS+=(
-D CMAKE_OSX_DEPLOYMENT_TARGET="14.8"
)
fi
DEPENDENCIES_INSTALLED_PATH="$DEPENDENCIES_ROOT_PATH/installed/$VCPKG_TARGET_TRIPLET"
CMAKE_CONF_OPTS+=(
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_INSTALLED_PATH;$QT_PATH"
-D collada_dom_DIR="$DEPENDENCIES_INSTALLED_PATH/share/collada-dom"
-DVCPKG_HOST_TRIPLET="$VCPKG_TARGET_TRIPLET"
-DVCPKG_TARGET_TRIPLET="$VCPKG_TARGET_TRIPLET"
-DCMAKE_TOOLCHAIN_FILE="$DEPENDENCIES_ROOT_PATH/scripts/buildsystems/vcpkg.cmake"
)
if [[ "${CMAKE_BUILD_TYPE}" ]]; then
CMAKE_CONF_OPTS+=(
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
)
else
CMAKE_CONF_OPTS+=(
-D CMAKE_BUILD_TYPE=RelWithDebInfo
)
fi
if [[ -n $USE_CCACHE ]]; then
CMAKE_CONF_OPTS+=(
-D CMAKE_C_COMPILER_LAUNCHER="ccache"
-D CMAKE_CXX_COMPILER_LAUNCHER="ccache"
)
fi
if [[ -n $USE_WERROR ]]; then
CMAKE_CONF_OPTS+=(
-D OPENMW_CXX_FLAGS="-Werror"
)
fi
if [[ -n $VERBOSE ]]; then
echo CMake arguments: \
"${CMAKE_CONF_OPTS[@]}" \
"${BUILD_OPTS[@]}" \
..
fi
cmake \
"${CMAKE_CONF_OPTS[@]}" \
"${BUILD_OPTS[@]}" \
..
+43 -36
View File
@@ -161,7 +161,7 @@ Options:
Build unit tests / Google test
-u
Configure for unity builds.
-v <2019/2022>
-v <2022/2026>
Choose the Visual Studio version to use.
-n
Produce NMake makefiles instead of a Visual Studio solution. Cannot be used with -N.
@@ -248,7 +248,7 @@ download() {
shift
if ! [ -f $FILE ]; then
printf " Downloading $FILE... "
printf " Downloading $FILE from $URL... "
if [ -z $VERBOSE ]; then
RET=0
@@ -366,26 +366,34 @@ if [ -z $PLATFORM ]; then
fi
if [ -z $VS_VERSION ]; then
VS_VERSION="2019"
VS_VERSION="2022"
fi
case $VS_VERSION in
18|18.0|2026 )
GENERATOR="Visual Studio 18 2026"
MSVC_REAL_VER="18"
MSVC_DISPLAY_YEAR="2026"
DEPS_MSVC_YEAR="2022"
QT_MSVC_YEAR="2019"
VCPKG_TRIPLET="x64-windows"
;;
17|17.0|2022 )
GENERATOR="Visual Studio 17 2022"
MSVC_TOOLSET="vc143"
MSVC_REAL_VER="17"
MSVC_DISPLAY_YEAR="2022"
DEPS_MSVC_YEAR="2022"
QT_MSVC_YEAR="2019"
VCPKG_TRIPLET="x64-windows"
;;
16|16.0|2019 )
GENERATOR="Visual Studio 16 2019"
MSVC_TOOLSET="vc142"
MSVC_REAL_VER="16"
MSVC_DISPLAY_YEAR="2019"
QT_MSVC_YEAR="2019"
echo "Visual Studio 2019 is no longer supported"
wrappedExit 1
;;
15|15.0|2017 )
@@ -526,9 +534,9 @@ fi
if [ -n "$USE_CCACHE" ]; then
if [ -n "$NMAKE" ] || [ -n "$NINJA" ]; then
add_cmake_opts "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DPRECOMPILE_HEADERS_WITH_MSVC=OFF"
add_cmake_opts "-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
else
echo "Ignoring -C (CCache) as it is incompatible with Visual Studio CMake generators"
add_cmake_opts "-DOPENMW_MSBUILD_COMPILER_OVERRIDE=ccache"
fi
fi
@@ -543,14 +551,16 @@ if [[ -n "$USE_CLANG_TIDY" ]]; then
add_cmake_opts "-DCMAKE_CXX_CLANG_TIDY=\"clang-tidy --warnings-as-errors=*\""
fi
QT_VER='6.6.3'
# these are defined in a separate file so its hash can be used as a CI cache key
source "$(dirname -- "${BASH_SOURCE[0]}")/deps_versions.msvc.sh"
# versions that don't affect the CI cache can go here
AQT_VERSION='v3.1.15'
VCPKG_TAG="2024-11-10"
VCPKG_PATH="vcpkg-x64-${VS_VERSION:?}-${VCPKG_TAG:?}"
VCPKG_PDB_PATH="vcpkg-x64-${VS_VERSION:?}-pdb-${VCPKG_TAG:?}"
VCPKG_MANIFEST="${VCPKG_PATH:?}.txt"
VCPKG_PDB_MANIFEST="${VCPKG_PDB_PATH:?}.txt"
VCPKG_PATH="vcpkg-x64-windows-${DEPS_MSVC_YEAR:?}-${VCPKG_TAG:?}"
VCPKG_PDB_PATH="vcpkg-x64-windows-${DEPS_MSVC_YEAR:?}-pdb-${VCPKG_TAG:?}"
VCPKG_MANIFEST="${VCPKG_PATH:?}-manifest.txt"
VCPKG_PDB_MANIFEST="${VCPKG_PDB_PATH:?}-manifest.txt"
echo
echo "==================================="
@@ -633,16 +643,16 @@ printf "vcpkg packages ${VCPKG_TAG:?}... "
fi
add_cmake_opts -DCMAKE_TOOLCHAIN_FILE="$(real_pwd)/${VCPKG_PATH:?}/scripts/buildsystems/vcpkg.cmake"
add_cmake_opts -DLuaJit_INCLUDE_DIR="$(real_pwd)/${VCPKG_PATH:?}/installed/x64-windows/include/luajit"
add_cmake_opts -DLuaJit_LIBRARY="$(real_pwd)/${VCPKG_PATH:?}/installed/x64-windows/lib/lua51.lib"
add_cmake_opts -DLuaJit_INCLUDE_DIR="$(real_pwd)/${VCPKG_PATH:?}/installed/${VCPKG_TRIPLET}/include/luajit"
add_cmake_opts -DLuaJit_LIBRARY="$(real_pwd)/${VCPKG_PATH:?}/installed/${VCPKG_TRIPLET}/lib/lua51.lib"
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
if [[ ${CONFIGURATION:?} == "Debug" ]]; then
VCPKG_DLL_BIN="$(pwd)/${VCPKG_PATH:?}/installed/x64-windows/debug/bin"
VCPKG_DLL_BIN="$(pwd)/${VCPKG_PATH:?}/installed/${VCPKG_TRIPLET}/debug/bin"
add_runtime_dlls ${CONFIGURATION:?} "${VCPKG_DLL_BIN:?}/Debug/MyGUIEngine_d.dll"
else
VCPKG_DLL_BIN="$(pwd)/${VCPKG_PATH:?}/installed/x64-windows/bin"
VCPKG_DLL_BIN="$(pwd)/${VCPKG_PATH:?}/installed/${VCPKG_TRIPLET}/bin"
add_runtime_dlls ${CONFIGURATION:?} "${VCPKG_DLL_BIN:?}/Release/MyGUIEngine.dll"
fi
@@ -704,17 +714,12 @@ printf "Qt ${QT_VER}... "
DLLSUFFIX=""
fi
if [ "${QT_MAJOR_VER}" -eq 6 ]; then
add_runtime_dlls $CONFIGURATION "$(pwd)/bin/Qt${QT_MAJOR_VER}"{Core,Gui,Network,OpenGL,OpenGLWidgets,Widgets,Svg}${DLLSUFFIX}.dll
add_runtime_dlls $CONFIGURATION "$(pwd)/bin/Qt${QT_MAJOR_VER}"{Core,Gui,Network,OpenGL,OpenGLWidgets,Widgets,Svg}${DLLSUFFIX}.dll
# Since Qt 6.7.0 plugin is called "qmodernwindowsstyle"
if [ "${QT_MINOR_VER}" -ge 7 ]; then
add_qt_style_dlls $CONFIGURATION "$(pwd)/plugins/styles/qmodernwindowsstyle${DLLSUFFIX}.dll"
else
add_qt_style_dlls $CONFIGURATION "$(pwd)/plugins/styles/qwindowsvistastyle${DLLSUFFIX}.dll"
fi
# Since Qt 6.7.0 plugin is called "qmodernwindowsstyle"
if [ "${QT_MINOR_VER}" -ge 7 ]; then
add_qt_style_dlls $CONFIGURATION "$(pwd)/plugins/styles/qmodernwindowsstyle${DLLSUFFIX}.dll"
else
add_runtime_dlls $CONFIGURATION "$(pwd)/bin/Qt${QT_MAJOR_VER}"{Core,Gui,Network,OpenGL,Widgets,Svg}${DLLSUFFIX}.dll
add_qt_style_dlls $CONFIGURATION "$(pwd)/plugins/styles/qwindowsvistastyle${DLLSUFFIX}.dll"
fi
@@ -731,7 +736,9 @@ echo
cd $DEPS_INSTALL/..
echo
echo "Setting up OpenMW build..."
add_cmake_opts -DOPENMW_MP_BUILD=on
if [[ -z "$USE_CCACHE" ]]; then
add_cmake_opts -DOPENMW_MP_BUILD=on
fi
add_cmake_opts -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
add_cmake_opts -DOPENMW_USE_SYSTEM_SQLITE3=OFF
add_cmake_opts -DOPENMW_USE_SYSTEM_YAML_CPP=OFF
@@ -853,13 +860,13 @@ if [ -n "$ACTIVATE_MSVC" ]; then
echo "vswhere was unable to find MSVC $MSVC_DISPLAY_YEAR"
wrappedExit 1
fi
echo "@\"${MSVC_INSTALLATION_PATH}\Common7\Tools\VsDevCmd.bat\" -no_logo -arch=$([ $BITS -eq 64 ] && echo "amd64" || echo "x86") -host_arch=$([ $(uname -m) == 'x86_64' ] && echo "amd64" || echo "x86")" > ActivateMSVC.bat
cp "../CI/activate_msvc.sh" .
sed -i "s/\$MSVC_DISPLAY_YEAR/$MSVC_DISPLAY_YEAR/g" activate_msvc.sh
source ./activate_msvc.sh
cp "../CI/ActivateMSVC.ps1" .
sed -i "s/\$MSVC_DISPLAY_YEAR/$MSVC_DISPLAY_YEAR/g" ActivateMSVC.ps1
@@ -912,7 +919,7 @@ if [ -n "$ACTIVATE_MSVC" ]; then
inheritEnvironments=msvc_x86
fi
fi
echo "In Visual Studio 15.3 (2017 Update 3) or later, try setting '\"inheritEnvironments\": [ \"$inheritEnvironments\" ]' in CMakeSettings.json to build in the IDE."
echo "In Visual Studio, try setting '\"inheritEnvironments\": [ \"$inheritEnvironments\" ]' in CMakeSettings.json to build in the IDE."
fi
wrappedExit $RET
-53
View File
@@ -1,53 +0,0 @@
#!/bin/sh -e
# Silence a git warning
git config --global advice.detachedHead false
rm -fr build
mkdir build
cd build
DEPENDENCIES_ROOT="/tmp/openmw-deps"
QT_PATH=$(brew --prefix qt@5)
ICU_PATH=$(brew --prefix icu4c)
OPENAL_PATH=$(brew --prefix openal-soft)
CCACHE_EXECUTABLE=$(brew --prefix ccache)/bin/ccache
declare -a CMAKE_CONF_OPTS=(
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH;$OPENAL_PATH"
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE"
-D CMAKE_CXX_FLAGS="-stdlib=libc++"
-D CMAKE_C_COMPILER="clang"
-D CMAKE_CXX_COMPILER="clang++"
-D CMAKE_OSX_DEPLOYMENT_TARGET="13.6"
-D OPENMW_USE_SYSTEM_RECASTNAVIGATION=TRUE
-D Boost_INCLUDE_DIR="$DEPENDENCIES_ROOT/include"
-D OSGPlugins_LIB_DIR="$DEPENDENCIES_ROOT/lib/osgPlugins-3.6.5"
-D ICU_ROOT="$ICU_PATH"
-D OPENMW_OSX_DEPLOYMENT=TRUE
)
if [[ "${CMAKE_BUILD_TYPE}" ]]; then
CMAKE_CONF_OPTS+=(
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
)
else
CMAKE_CONF_OPTS+=(
-D CMAKE_BUILD_TYPE=RelWithDebInfo
)
fi
cmake \
"${CMAKE_CONF_OPTS[@]}" \
-D BUILD_OPENMW=TRUE \
-D BUILD_OPENCS=TRUE \
-D BUILD_ESMTOOL=TRUE \
-D BUILD_BSATOOL=TRUE \
-D BUILD_ESSIMPORTER=TRUE \
-D BUILD_NIFTEST=TRUE \
-D BUILD_NAVMESHTOOL=TRUE \
-D BUILD_BULLETOBJECTTOOL=TRUE \
-G"Unix Makefiles" \
..
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash -ex
git ls-files -- ':(exclude)extern/' '*.cpp' '*.hpp' '*.h' |
grep -vP '/[a-z0-9]+\.(cpp|hpp|h)$' |
grep -vFf CI/file_name_exceptions.txt &&
grep -vP '/[a-z0-9]+\.(cpp|hpp|h)$' &&
( echo 'File names do not follow the naming convention, see https://wiki.openmw.org/index.php?title=Naming_Conventions#Files'; exit -1 )
exit 0
+3
View File
@@ -0,0 +1,3 @@
# You must not quote any of these, they are piped to GitHub Action's ENV in addition to Gitlab CI.
QT_VER=6.6.3
VCPKG_TAG=2026-02-24
-48
View File
@@ -1,48 +0,0 @@
apps/openmw/android_main.cpp
apps/openmw/mwsound/efx-presets.h
apps/openmw/mwsound/ffmpeg_decoder.cpp
apps/openmw/mwsound/ffmpeg_decoder.hpp
apps/openmw/mwsound/openal_output.cpp
apps/openmw/mwsound/openal_output.hpp
apps/openmw/mwsound/sound_buffer.cpp
apps/openmw/mwsound/sound_buffer.hpp
apps/openmw/mwsound/sound_decoder.hpp
apps/openmw/mwsound/sound_output.hpp
apps/components_tests/esm/test_fixed_string.cpp
apps/components_tests/files/conversion_tests.cpp
apps/components_tests/lua/test_async.cpp
apps/components_tests/lua/test_configuration.cpp
apps/components_tests/lua/test_l10n.cpp
apps/components_tests/lua/test_lua.cpp
apps/components_tests/lua/test_scriptscontainer.cpp
apps/components_tests/lua/test_serialization.cpp
apps/components_tests/lua/test_storage.cpp
apps/components_tests/lua/test_ui_content.cpp
apps/components_tests/lua/test_utilpackage.cpp
apps/components_tests/lua/test_inputactions.cpp
apps/components_tests/lua/test_yaml.cpp
apps/components_tests/misc/test_endianness.cpp
apps/components_tests/misc/test_resourcehelpers.cpp
apps/components_tests/misc/test_stringops.cpp
apps/openmw_tests/mwdialogue/test_keywordsearch.cpp
apps/openmw_tests/mwscript/test_scripts.cpp
apps/openmw_tests/mwscript/test_utils.hpp
apps/openmw_tests/mwworld/test_store.cpp
components/bsa/bsa_file.cpp
components/bsa/bsa_file.hpp
components/crashcatcher/windows_crashcatcher.cpp
components/crashcatcher/windows_crashcatcher.hpp
components/crashcatcher/windows_crashmonitor.cpp
components/crashcatcher/windows_crashmonitor.hpp
components/crashcatcher/windows_crashshm.hpp
components/fx/lexer_types.hpp
components/fx/parse_constants.hpp
components/platform/file.posix.cpp
components/platform/file.stdio.cpp
components/platform/file.win32.cpp
components/sdlutil/gl4es_init.cpp
components/sdlutil/gl4es_init.h
components/to_utf8/gen_iconv.cpp
components/to_utf8/tables_gen.hpp
components/to_utf8/to_utf8.cpp
components/to_utf8/to_utf8.hpp
-1
View File
@@ -1 +0,0 @@
VCPKG_DEPS_TAG=2024-11-10
+38 -23
View File
@@ -11,7 +11,8 @@ print_help() {
declare -rA GROUPED_DEPS=(
[gcc]="binutils gcc build-essential cmake ccache curl unzip git pkg-config mold"
[clang]="binutils clang make cmake ccache curl unzip git pkg-config mold"
[coverity]="binutils clang-12 make cmake ccache curl unzip git pkg-config"
[coverity]="binutils clang make cmake ccache curl unzip git pkg-config file"
[coverity_upload]="curl"
[gcc_preprocess]="
binutils
build-essential
@@ -33,15 +34,15 @@ declare -rA GROUPED_DEPS=(
libboost-system-dev libboost-iostreams-dev
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev
libsdl2-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools libopenal-dev
libsdl2-dev libqt6opengl6-dev qt6-tools-dev qt6-tools-dev-tools libopenal-dev
libunshield-dev libtinyxml-dev libbullet-dev liblz4-dev libpng-dev libjpeg-dev
libluajit-5.1-dev librecast-dev libsqlite3-dev ca-certificates libicu-dev
libyaml-cpp-dev libqt5svg5 libqt5svg5-dev
libyaml-cpp-dev libqt6svg6 libqt6svg6-dev
"
# These dependencies can alternatively be built and linked statically.
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev libsqlite3-dev libcollada-dom-dev"
[clang-tidy]="clang-tidy"
[clang-tidy]="clang-tidy-19"
# Pre-requisites for building MyGUI and OSG for static linking.
#
@@ -57,22 +58,22 @@ declare -rA GROUPED_DEPS=(
libsdl2-dev libboost-system-dev libboost-filesystem-dev libgl-dev
"
[openmw-coverage]="gcovr"
[openmw-coverage]="pipx"
[openmw-integration-tests]="
ca-certificates
gdb
git
git-lfs
libavcodec58
libavformat58
libavutil56
libboost-iostreams1.74.0
libboost-program-options1.74.0
libboost-system1.74.0
libavcodec60
libavformat60
libavutil58
libboost-iostreams1.83.0
libboost-program-options1.83.0
libboost-system1.83.0
libbullet3.24
libcollada-dom2.5-dp0
libicu70
libicu74
libjpeg8
libluajit-5.1-2
liblz4-1
@@ -80,30 +81,30 @@ declare -rA GROUPED_DEPS=(
libopenal1
libopenscenegraph161
libpng16-16
libqt5opengl5
libqt6opengl6
librecast1
libsdl2-2.0-0
libsqlite3-0
libswresample3
libswscale5
libswresample4
libswscale7
libtinyxml2.6.2v5
libyaml-cpp0.8
python3-pip
xvfb
"
[libasan6]="libasan6"
[libasan]="libasan8"
[android]="binutils build-essential cmake ccache curl unzip git pkg-config"
[openmw-clang-format]="
clang-format-14
git-core
"
[openmw-qt-translations]="
qttools5-dev
qttools5-dev-tools
qt6-tools-dev
qt6-tools-dev-tools
git-core
"
)
@@ -126,10 +127,24 @@ export APT_CACHE_DIR="${PWD}/apt-cache"
export DEBIAN_FRONTEND=noninteractive
set -x
mkdir -pv "$APT_CACHE_DIR"
apt-get update -yqq
while true; do
apt-get update -yqq && break
done
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y --no-install-recommends software-properties-common gnupg >/dev/null
add-apt-repository -y ppa:openmw/openmw
add-apt-repository -y ppa:openmw/openmw-daily
add-apt-repository -y ppa:openmw/staging
while true; do
add-apt-repository -y ppa:openmw/openmw && break
done
while true; do
add-apt-repository -y ppa:openmw/openmw-daily && break
done
while true; do
add-apt-repository -y ppa:openmw/staging && break
done
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y --no-install-recommends "${deps[@]}" >/dev/null
apt list --installed
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh -ex
cd build
if [[ "${MACOS_AMD64}" ]]; then
arch -x86_64 make -j $(sysctl -n hw.logicalcpu) package
else
make -j $(sysctl -n hw.logicalcpu) package
fi
+1
View File
@@ -0,0 +1 @@
VCPKG_TAG='2026-02-24'
+1 -1
View File
@@ -9,7 +9,7 @@ git checkout FETCH_HEAD
cd ..
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24x60' \
scripts/integration_tests.py --omw build/install/bin/openmw --workdir integration_tests_output example-suite/
scripts/integration_tests.py --verbose --omw build/install/bin/openmw --workdir integration_tests_output example-suite/
ls integration_tests_output/*.osg_stats.log | while read v; do
scripts/osg_stats.py --stats '.*' --regexp_match < "${v}"
+2 -2
View File
@@ -7,8 +7,8 @@ pushd .
echo "Install Teal Cyan"
git clone https://github.com/teal-language/cyan.git
cd cyan
git checkout v0.4.0
luarocks make cyan-0.4.0-1.rockspec
git checkout v0.4.1
luarocks make cyan-0.4.1-1.rockspec
popd
cyan version
+5 -4
View File
@@ -50,15 +50,16 @@ git remote add target "${CI_MERGE_REQUEST_PROJECT_URL:-https://gitlab.com/OpenMW
TARGET_BRANCH="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-master}"
git fetch target "${TARGET_BRANCH:?}"
# Use unshallow to prevent error with git-merge-base: https://stackoverflow.com/a/78596539/22975246
git fetch --unshallow target "${TARGET_BRANCH:?}" || git fetch target "${TARGET_BRANCH:?}"
if [[ "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" ]]; then
git remote add source "${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}"
git fetch --unshallow source "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
git fetch --unshallow source "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" || git fetch source "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
elif [[ "${CI_COMMIT_BRANCH}" ]]; then
git fetch origin "${CI_COMMIT_BRANCH:?}"
git fetch --unshallow origin "${CI_COMMIT_BRANCH:?}" || git fetch origin "${CI_COMMIT_BRANCH:?}"
else
git fetch origin
git fetch --unshallow origin || git fetch origin
fi
BASE_VERSION=$(git merge-base "target/${TARGET_BRANCH:?}" "${VERSION:?}")
+140 -149
View File
@@ -16,7 +16,7 @@ include(GNUInstallDirs)
option(OPENMW_GL4ES_MANUAL_INIT "Manually initialize gl4es. This is more reliable on platforms without a windowing system. Requires gl4es to be configured with -DNOEGL=ON -DNO_LOADER=ON -DNO_INIT_CONSTRUCTOR=ON." OFF)
if(OPENMW_GL4ES_MANUAL_INIT)
add_definitions(-DOPENMW_GL4ES_MANUAL_INIT)
add_compile_definitions(OPENMW_GL4ES_MANUAL_INIT)
endif()
if (APPLE OR WIN32)
@@ -80,10 +80,10 @@ endif()
message(STATUS "Configuring OpenMW...")
set(OPENMW_VERSION_MAJOR 0)
set(OPENMW_VERSION_MINOR 49)
set(OPENMW_VERSION_MINOR 51)
set(OPENMW_VERSION_RELEASE 0)
set(OPENMW_LUA_API_REVISION 70)
set(OPENMW_POSTPROCESSING_API_REVISION 2)
set(OPENMW_LUA_API_REVISION 129)
set(OPENMW_POSTPROCESSING_API_REVISION 5)
set(OPENMW_VERSION_COMMITHASH "")
set(OPENMW_VERSION_TAGHASH "")
@@ -170,6 +170,34 @@ option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of
# OS X deployment
option(OPENMW_OSX_DEPLOYMENT OFF)
if (CMAKE_GENERATOR MATCHES "Visual Studio")
if (OPENMW_MSBUILD_COMPILER_OVERRIDE)
if (NOT IS_ABSOLUTE OPENMW_MSBUILD_COMPILER_OVERRIDE)
find_program(OPENMW_MSBUILD_COMPILER_OVERRIDE_PATH "${OPENMW_MSBUILD_COMPILER_OVERRIDE}")
else()
set(OPENMW_MSBUILD_COMPILER_OVERRIDE_PATH "${OPENMW_MSBUILD_COMPILER_OVERRIDE}")
endif()
if (DEFINED ENV{ChocolateyInstall})
# if Chocolatey's installed, it's relatively likely that the command's a shim and won't work if copied
# it's safer to shim it
execute_process(COMMAND "$ENV{ChocolateyInstall}/tools/shimgen.exe" -p "${OPENMW_MSBUILD_COMPILER_OVERRIDE_PATH}" -o "${CMAKE_BINARY_DIR}/cl.exe" -c cl.exe)
else()
file(COPY_FILE "${OPENMW_MSBUILD_COMPILER_OVERRIDE_PATH}" "${CMAKE_BINARY_DIR}/cl.exe" ONLY_IF_DIFFERENT)
endif()
list(APPEND CMAKE_VS_GLOBALS
"CLToolPath=${CMAKE_BINARY_DIR}"
"UseMultiToolTask=true"
)
endif()
endif()
if ((NOT CMAKE_GENERATOR MATCHES "Visual Studio") OR ("UseMultiToolTask=true" IN_LIST CMAKE_VS_GLOBALS))
# don't spawn multiple moc/uic child processes in parallel - the build system already parallelises the build
# this genuinely saves time (confirmed with MSVC+Ninja in CI)
set(CMAKE_AUTOGEN_PARALLEL 1)
endif()
if (MSVC)
option(OPENMW_MP_BUILD "Build OpenMW with /MP flag" OFF)
if (OPENMW_MP_BUILD)
@@ -185,16 +213,16 @@ if (MSVC)
add_compile_options(/Zc:__cplusplus)
if (CMAKE_CXX_COMPILER_LAUNCHER OR CMAKE_C_COMPILER_LAUNCHER)
if (CMAKE_GENERATOR MATCHES "Visual Studio")
if (CMAKE_CXX_COMPILER_LAUNCHER OR CMAKE_C_COMPILER_LAUNCHER OR OPENMW_MSBUILD_COMPILER_OVERRIDE)
if ((CMAKE_CXX_COMPILER_LAUNCHER OR CMAKE_C_COMPILER_LAUNCHER) AND CMAKE_GENERATOR MATCHES "Visual Studio")
message(STATUS "A compiler launcher was specified, but will be unused by the current generator (${CMAKE_GENERATOR})")
else()
foreach (config_lower ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${config_lower}" config)
if (CMAKE_C_COMPILER_LAUNCHER STREQUAL "ccache")
if (CMAKE_C_COMPILER_LAUNCHER STREQUAL "ccache" OR OPENMW_MSBUILD_COMPILER_OVERRIDE STREQUAL "ccache")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
endif()
if (CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "ccache")
if (CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "ccache" OR OPENMW_MSBUILD_COMPILER_OVERRIDE STREQUAL "ccache")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
endif()
endforeach()
@@ -249,12 +277,8 @@ endif()
find_package(LZ4 REQUIRED)
if (USE_QT)
find_package(QT REQUIRED COMPONENTS Core NAMES Qt6 Qt5)
if (QT_VERSION_MAJOR VERSION_EQUAL 5)
find_package(Qt5 5.15 COMPONENTS Core Widgets Network OpenGL LinguistTools Svg REQUIRED)
else()
find_package(Qt6 COMPONENTS Core Widgets Network OpenGL OpenGLWidgets LinguistTools Svg REQUIRED)
endif()
find_package(QT REQUIRED COMPONENTS Core NAMES Qt6)
find_package(Qt6 COMPONENTS Core Widgets Network OpenGL OpenGLWidgets LinguistTools Svg REQUIRED)
message(STATUS "Using Qt${QT_VERSION}")
endif()
@@ -357,35 +381,35 @@ if(NOT FFmpeg_FOUND)
message(FATAL_ERROR "FFmpeg was not found" )
endif()
if(WIN32)
message("Can not detect FFmpeg version, at least the 3.2 is required" )
endif()
# Required for building the FFmpeg headers
add_definitions(-D__STDC_CONSTANT_MACROS)
# Required for unity build
add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR)
add_compile_definitions(__STDC_CONSTANT_MACROS)
# TinyXML
option(USE_SYSTEM_TINYXML "Use system TinyXML library instead of internal." OFF)
if (USE_SYSTEM_TINYXML)
find_package(TinyXML REQUIRED)
add_definitions (-DTIXML_USE_STL)
add_compile_definitions(TIXML_USE_STL)
include_directories(SYSTEM ${TinyXML_INCLUDE_DIRS})
endif()
# Platform specific
if (WIN32)
# Suppress WinMain(), provided by SDL
add_definitions(-DSDL_MAIN_HANDLED)
add_compile_definitions(SDL_MAIN_HANDLED)
# Get rid of useless crud from windows.h
add_definitions(
-DNOMINMAX # name conflict with std::min, std::max
-DWIN32_LEAN_AND_MEAN
-DNOMB # name conflict with MWGui::MessageBox
-DNOGDI # name conflict with osgAnimation::MorphGeometry::RELATIVE
add_compile_definitions(
NOMINMAX # name conflict with std::min, std::max
WIN32_LEAN_AND_MEAN
NOMB # name conflict with MWGui::MessageBox
NOGDI # name conflict with osgAnimation::MorphGeometry::RELATIVE
)
# Put Win32 API into UTF-16 mode
# We really don't care, but targets linking with Qt 6 (not 5 and earlier) inherit this, and mixing and matching stops us reusing precompiled headers
add_compile_definitions(
_UNICODE
UNICODE
)
endif()
@@ -451,22 +475,22 @@ endif()
include_directories(BEFORE SYSTEM ${OPENSCENEGRAPH_INCLUDE_DIRS})
if(OSG_STATIC)
add_definitions(-DOSG_LIBRARY_STATIC)
add_compile_definitions(OSG_LIBRARY_STATIC)
endif()
include(cmake/CheckOsgMultiview.cmake)
if(HAVE_MULTIVIEW)
add_definitions(-DOSG_HAS_MULTIVIEW)
add_compile_definitions(OSG_HAS_MULTIVIEW)
endif(HAVE_MULTIVIEW)
set(BOOST_COMPONENTS iostreams program_options system)
set(BOOST_COMPONENTS iostreams program_options)
find_package(Boost 1.70.0 CONFIG REQUIRED COMPONENTS ${BOOST_COMPONENTS} OPTIONAL_COMPONENTS ${BOOST_OPTIONAL_COMPONENTS})
if(OPENMW_USE_SYSTEM_MYGUI)
find_package(MyGUI 3.4.3 REQUIRED)
endif()
find_package(SDL2 2.0.10 REQUIRED)
find_package(SDL2 2.0.20 REQUIRED)
find_package(OpenAL REQUIRED)
find_package(ZLIB REQUIRED)
@@ -489,7 +513,6 @@ set(SOL_CONFIG_DIR ${OpenMW_SOURCE_DIR}/extern/sol_config)
include_directories(
BEFORE SYSTEM
"."
${MyGUI_INCLUDE_DIRS}
${OPENAL_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR}
@@ -499,11 +522,12 @@ include_directories(
${SOL_CONFIG_DIR}
${ICU_INCLUDE_DIRS}
)
include_directories(".")
link_directories(${COLLADA_DOM_LIBRARY_DIRS})
if(MYGUI_STATIC)
add_definitions(-DMYGUI_STATIC)
add_compile_definitions(MYGUI_STATIC)
endif (MYGUI_STATIC)
if (APPLE)
@@ -590,25 +614,10 @@ if(OPENMW_LTO_BUILD)
endif()
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(OPENMW_CXX_FLAGS "-Wall -Wextra -Wundef -Wextra-semi -Wno-unused-parameter -pedantic -Wno-long-long -Wnon-virtual-dtor -Wunused ${OPENMW_CXX_FLAGS}")
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND NOT APPLE)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.6)
set(OPENMW_CXX_FLAGS "${OPENMW_CXX_FLAGS} -Wno-potentially-evaluated-expression")
endif ()
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(OPENMW_CXX_FLAGS "${OPENMW_CXX_FLAGS} -Wno-unused-but-set-parameter -Wduplicated-branches -Wduplicated-cond -Wlogical-op")
endif()
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
endif()
# Extern
@@ -619,8 +628,50 @@ if (BUILD_OPENCS OR BUILD_OPENCS_TESTS)
add_subdirectory (extern/osgQt)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
add_compile_options("/W4")
set(WARNINGS_DISABLE
4100 # Unreferenced formal parameter (-Wunused-parameter)
4127 # Conditional expression is constant
4996 # Function was declared deprecated
5054 # Deprecated operations between enumerations of different types caused by Qt headers
)
foreach(d ${WARNINGS_DISABLE})
add_compile_options("/wd${d}")
endforeach(d)
set(WARNINGS_EXTRA
4855 # implicit capture of 'this' via '[=]' is deprecated in 'version'
)
foreach(d ${WARNINGS_EXTRA})
add_compile_options("/w1${d}")
endforeach(d)
if(OPENMW_MSVC_WERROR)
add_compile_options("/WX")
endif()
else ()
add_compile_options("-Wall" "-Wextra" "-Wundef" "-Wextra-semi" "-Wno-unused-parameter" "-pedantic" "-Wno-long-long" "-Wnon-virtual-dtor" "-Wunused" "-Wshadow")
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND NOT APPLE)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.6)
add_compile_options("-Wno-potentially-evaluated-expression")
endif ()
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
add_compile_options("-Wno-unused-but-set-parameter" "-Wduplicated-branches" "-Wduplicated-cond" "-Wlogical-op")
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105438
add_compile_options("-Wno-array-bounds")
endif()
endif ()
if (OPENMW_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENMW_CXX_FLAGS}")
separate_arguments(OPENMW_CXX_FLAGS NATIVE_COMMAND "${OPENMW_CXX_FLAGS}")
add_compile_options(${OPENMW_CXX_FLAGS})
endif()
# Components
@@ -710,87 +761,9 @@ if (WIN32)
set_target_properties(openmw PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
endif()
# Play a bit with the warning levels
set(WARNINGS "/W4")
set(WARNINGS_DISABLE
4100 # Unreferenced formal parameter (-Wunused-parameter)
4127 # Conditional expression is constant
4996 # Function was declared deprecated
5054 # Deprecated operations between enumerations of different types caused by Qt headers
)
foreach(d ${WARNINGS_DISABLE})
list(APPEND WARNINGS "/wd${d}")
endforeach(d)
if(OPENMW_MSVC_WERROR)
list(APPEND WARNINGS "/WX")
endif()
target_compile_options(components PRIVATE ${WARNINGS})
target_compile_options(osg-ffmpeg-videoplayer PRIVATE ${WARNINGS})
if (MSVC_VERSION GREATER_EQUAL 1915 AND MSVC_VERSION LESS 1920)
target_compile_definitions(components INTERFACE _ENABLE_EXTENDED_ALIGNED_STORAGE)
endif()
if (BUILD_BSATOOL)
target_compile_options(bsatool PRIVATE ${WARNINGS})
endif()
if (BUILD_ESMTOOL)
target_compile_options(esmtool PRIVATE ${WARNINGS})
endif()
if (BUILD_ESSIMPORTER)
target_compile_options(openmw-essimporter PRIVATE ${WARNINGS})
endif()
if (BUILD_LAUNCHER)
target_compile_options(openmw-launcher PRIVATE ${WARNINGS})
endif()
if (BUILD_MWINIIMPORTER)
target_compile_options(openmw-iniimporter PRIVATE ${WARNINGS})
endif()
if (BUILD_OPENCS)
target_compile_options(openmw-cs PRIVATE ${WARNINGS})
endif()
if (BUILD_OPENMW)
target_compile_options(openmw PRIVATE ${WARNINGS})
endif()
if (BUILD_WIZARD)
target_compile_options(openmw-wizard PRIVATE ${WARNINGS})
endif()
if (BUILD_COMPONENTS_TESTS)
target_compile_options(components-tests PRIVATE ${WARNINGS})
endif()
if (BUILD_BENCHMARKS)
target_compile_options(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE ${WARNINGS})
endif()
if (BUILD_NAVMESHTOOL)
target_compile_options(openmw-navmeshtool PRIVATE ${WARNINGS})
endif()
if (BUILD_BULLETOBJECTTOOL)
target_compile_options(openmw-bulletobjecttool PRIVATE ${WARNINGS} ${MT_BUILD})
endif()
if (BUILD_OPENCS_TESTS)
target_compile_options(openmw-cs-tests PRIVATE ${WARNINGS})
endif()
if (BUILD_OPENMW_TESTS)
target_compile_options(openmw-tests PRIVATE ${WARNINGS})
endif()
endif(MSVC)
# TODO: At some point release builds should not use the console but rather write to a log file
@@ -798,16 +771,45 @@ if (WIN32)
#set_target_properties(openmw PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
endif()
if (APPLE)
target_compile_definitions(components PRIVATE GL_SILENCE_DEPRECATION=1)
target_compile_definitions(openmw PRIVATE GL_SILENCE_DEPRECATION=1)
# Core CPACK Setup
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
set(CPACK_PACKAGE_NAME "OpenMW")
set(CPACK_PACKAGE_VENDOR "OpenMW.org")
set(CUSTOM_CPACK_OS_NAME "")
set(CUSTOM_CPACK_ARCHITECTURE "")
if(APPLE)
set(CUSTOM_CPACK_OS_NAME "macOS")
elseif(WIN32)
set(CUSTOM_CPACK_OS_NAME "Windows")
elseif(UNIX)
set(CUSTOM_CPACK_OS_NAME "Linux")
else()
set(CUSTOM_CPACK_OS_NAME "${CMAKE_SYSTEM_NAME}")
endif()
if(WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
set(CUSTOM_CPACK_ARCHITECTURE "x64")
elseif(APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(CUSTOM_CPACK_ARCHITECTURE "x86_64")
else()
set(CUSTOM_CPACK_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
endif()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CUSTOM_CPACK_OS_NAME}-${CUSTOM_CPACK_ARCHITECTURE}")
# Apple bundling
if (OPENMW_OSX_DEPLOYMENT AND APPLE)
if (CMAKE_VERSION VERSION_LESS 3.19)
if(CMAKE_VERSION VERSION_LESS 3.19)
message(FATAL_ERROR "macOS packaging requires CMake 3.19 or higher to sign macOS app bundles.")
endif ()
endif()
if(CMAKE_OSX_ARCHITECTURES AND NOT (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_OSX_ARCHITECTURES STREQUAL "arm64"))
message(FATAL_ERROR "Only x86_64 OR arm64 is accepted for CMAKE_OSX_ARCHITECTURES")
endif()
get_property(QT_COCOA_PLUGIN_PATH TARGET Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin PROPERTY LOCATION_RELEASE)
get_filename_component(QT_COCOA_PLUGIN_DIR "${QT_COCOA_PLUGIN_PATH}" DIRECTORY)
@@ -848,10 +850,6 @@ if (OPENMW_OSX_DEPLOYMENT AND APPLE)
install(DIRECTORY "${APP_BUNDLE_DIR}" USE_SOURCE_PERMISSIONS DESTINATION "." COMPONENT Runtime)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
set(INSTALLED_OPENMW_APP "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_NAME}")
set(INSTALLED_OPENCS_APP "\${CMAKE_INSTALL_PREFIX}/${OPENCS_BUNDLE_NAME}")
@@ -860,7 +858,6 @@ if (OPENMW_OSX_DEPLOYMENT AND APPLE)
set(BU_CHMOD_BUNDLE_ITEMS ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
include(BundleUtilities)
cmake_minimum_required(VERSION 3.1)
" COMPONENT Runtime)
set(ABSOLUTE_PLUGINS "")
@@ -993,12 +990,6 @@ elseif(NOT APPLE)
INSTALL(DIRECTORY "${INSTALL_SOURCE}/resources" DESTINATION ".")
SET(CPACK_GENERATOR "NSIS")
SET(CPACK_PACKAGE_NAME "OpenMW")
SET(CPACK_PACKAGE_VENDOR "OpenMW.org")
SET(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
SET(CPACK_PACKAGE_VERSION_MAJOR ${OPENMW_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW")
IF(BUILD_LAUNCHER)
SET(CPACK_PACKAGE_EXECUTABLES "${CPACK_PACKAGE_EXECUTABLES};openmw-launcher;OpenMW Launcher")
+16 -8
View File
@@ -5,7 +5,7 @@ OpenMW is an open-source open-world RPG game engine that supports playing Morrow
OpenMW also comes with OpenMW-CS, a replacement for Bethesda's Construction Set.
* Version: 0.49.0
* Version: 0.51.0
* License: GPLv3 (see [LICENSE](https://gitlab.com/OpenMW/openmw/-/raw/master/LICENSE) for more information)
* Website: https://www.openmw.org
* IRC: #openmw on irc.libera.chat
@@ -20,7 +20,7 @@ Font Licenses:
Current Status
--------------
The main quests in Morrowind, Tribunal and Bloodmoon are all completable. Some issues with side quests are to be expected (but rare). Check the [bug tracker](https://gitlab.com/OpenMW/openmw/-/issues/?milestone_title=openmw-1.0) for a list of issues we need to resolve before the "1.0" release. Even before the "1.0" release however, OpenMW boasts some new [features](https://wiki.openmw.org/index.php?title=Features), such as improved graphics and user interfaces.
The main quests in Morrowind, Tribunal and Bloodmoon are all completable. Some issues with side quests are to be expected (but rare). Check the [bug tracker](https://gitlab.com/OpenMW/openmw/-/issues/?milestone_title=openmw-1.0) for a list of issues we need to resolve before the "1.0" release. Even before the "1.0" release, however, OpenMW boasts some new [features](https://wiki.openmw.org/index.php?title=Features), such as improved graphics and user interfaces.
Pre-existing modifications created for the original Morrowind engine can be hit-and-miss. The OpenMW script compiler performs more thorough error-checking than Morrowind does, meaning that a mod created for Morrowind may not necessarily run in OpenMW. Some mods also rely on quirky behaviour or engine bugs in order to work. We are considering such compatibility issues on a case-by-case basis - in some cases adding a workaround to OpenMW may be feasible, in other cases fixing the mod will be the only option. If you know of any mods that work or don't work, feel free to add them to the [Mod status](https://wiki.openmw.org/index.php?title=Mod_status) wiki page.
@@ -45,6 +45,14 @@ Command line options
Syntax: openmw <options>
Allowed options:
--config arg additional config directories
--replace arg settings where the values from the
current source should replace those
from lower-priority sources instead of
being appended
--user-data arg set user data directory (used for
saves, screenshots, etc)
--resources arg (=resources) set resources directory
--help print help message
--version print version information and quit
--data arg (=data) set data directories (later directories
@@ -54,12 +62,12 @@ Command line options
--fallback-archive arg (=fallback-archive)
set fallback BSA archives (later
archives have higher priority)
--resources arg (=resources) set resources directory
--start arg set initial cell
--content arg content file(s): esm/esp, or
omwgame/omwaddon
omwgame/omwaddon/omwscripts
--groundcover arg groundcover content file(s): esm/esp,
or omwgame/omwaddon
--no-sound [=arg(=1)] (=0) disable all sounds
--script-verbose [=arg(=1)] (=0) verbose script output
--script-all [=arg(=1)] (=0) compile all scripts (excluding dialogue
scripts) at startup
--script-all-dialogue [=arg(=1)] (=0) compile all dialogue scripts at startup
@@ -70,8 +78,8 @@ Command line options
startup
--script-warn [=arg(=1)] (=1) handling of warnings when compiling
scripts
0 - ignore warning
1 - show warning but consider script as
0 - ignore warnings
1 - show warnings but consider script as
correctly compiled anyway
2 - treat warnings as errors
--load-savegame arg load a save game file on game startup
@@ -97,7 +105,7 @@ Command line options
win1252 - Western European (Latin)
alphabet, used by default
--fallback arg fallback values
--no-grab Don't grab mouse cursor
--no-grab [=arg(=1)] (=0) Don't grab mouse cursor
--export-fonts [=arg(=1)] (=0) Export Morrowind .fnt fonts to PNG
image and XML file in current directory
--activate-dist arg (=-1) activation distance override
@@ -6,10 +6,14 @@ if (UNIX AND NOT APPLE)
endif()
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE <algorithm>)
target_precompile_headers(openmw_detournavigator_navmeshtilescache_benchmark REUSE_FROM components)
endif()
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE --coverage)
target_link_libraries(openmw_detournavigator_navmeshtilescache_benchmark gcov)
endif()
if (WIN32)
target_sources(openmw_detournavigator_navmeshtilescache_benchmark PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
@@ -33,7 +33,7 @@ namespace
osg::Vec3f generateAgentHalfExtents(float min, float max, auto& random)
{
std::uniform_int_distribution<int> distribution(min, max);
std::uniform_real_distribution<float> distribution(min, max);
return osg::Vec3f(distribution(random), distribution(random), distribution(random));
}
@@ -94,9 +94,9 @@ namespace
std::vector<AreaType> areaTypes;
if (distribution(random) < 0.939)
{
generateVertices(std::back_inserter(vertices), triangles * 2.467, random);
generateVertices(std::back_inserter(vertices), static_cast<std::size_t>(triangles * 2.467), random);
generateIndices(std::back_inserter(indices), static_cast<int>(vertices.size() / 3) - 1,
vertices.size() * 1.279, random);
static_cast<std::size_t>(vertices.size() * 1.279), random);
generateAreaTypes(std::back_inserter(areaTypes), indices.size() / 3, random);
}
return Mesh(std::move(indices), std::move(vertices), std::move(areaTypes));
@@ -109,7 +109,7 @@ namespace
result.mCellPosition = generateVec2i(1000, random);
result.mCellSize = ESM::Land::REAL_SIZE;
result.mMinHeight = distribution(random);
result.mMaxHeight = result.mMinHeight + 1.0;
result.mMaxHeight = result.mMinHeight + 1.0f;
result.mLength = static_cast<std::uint8_t>(ESM::Land::LAND_SIZE);
std::generate_n(
std::back_inserter(result.mHeights), ESM::Land::LAND_NUM_VERTS, [&] { return distribution(random); });
@@ -179,7 +179,7 @@ namespace
generateKeys(std::back_inserter(keys), keys.size() * (100 - hitPercentage) / 100, random);
std::size_t n = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
const auto& key = keys[n++ % keys.size()];
auto result = cache.get(key.mAgentBounds, key.mTilePosition, key.mRecastMesh);
+5 -1
View File
@@ -6,10 +6,14 @@ if (UNIX AND NOT APPLE)
endif()
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(openmw_esm_refid_benchmark PRIVATE <algorithm>)
target_precompile_headers(openmw_esm_refid_benchmark REUSE_FROM components)
endif()
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw_esm_refid_benchmark PRIVATE --coverage)
target_link_libraries(openmw_esm_refid_benchmark gcov)
endif()
if (WIN32)
target_sources(openmw_esm_refid_benchmark PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
+10 -10
View File
@@ -104,7 +104,7 @@ namespace
std::minstd_rand random;
std::vector<ESM::RefId> refIds = generateStringRefIds(state.range(0), random);
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(refIds[i].serialize());
if (++i >= refIds.size())
@@ -118,7 +118,7 @@ namespace
std::vector<std::string> serializedRefIds
= generateSerializedStringRefIds(state.range(0), random, [](ESM::RefId v) { return v.serialize(); });
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(ESM::RefId::deserialize(serializedRefIds[i]));
if (++i >= serializedRefIds.size())
@@ -131,7 +131,7 @@ namespace
std::minstd_rand random;
std::vector<ESM::RefId> refIds = generateStringRefIds(state.range(0), random);
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(refIds[i].serializeText());
if (++i >= refIds.size())
@@ -145,7 +145,7 @@ namespace
std::vector<std::string> serializedRefIds
= generateSerializedStringRefIds(state.range(0), random, [](ESM::RefId v) { return v.serializeText(); });
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(ESM::RefId::deserializeText(serializedRefIds[i]));
if (++i >= serializedRefIds.size())
@@ -158,7 +158,7 @@ namespace
std::minstd_rand random;
std::vector<ESM::RefId> refIds = generateGeneratedRefIds(random);
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(refIds[i].serializeText());
if (++i >= refIds.size())
@@ -172,7 +172,7 @@ namespace
std::vector<std::string> serializedRefIds
= generateSerializedGeneratedRefIds(random, [](ESM::RefId v) { return v.serializeText(); });
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(ESM::RefId::deserializeText(serializedRefIds[i]));
if (++i >= serializedRefIds.size())
@@ -185,7 +185,7 @@ namespace
std::minstd_rand random;
std::vector<ESM::RefId> refIds = generateIndexRefIds(random);
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(refIds[i].serializeText());
if (++i >= refIds.size())
@@ -199,7 +199,7 @@ namespace
std::vector<std::string> serializedRefIds
= generateSerializedIndexRefIds(random, [](ESM::RefId v) { return v.serializeText(); });
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(ESM::RefId::deserializeText(serializedRefIds[i]));
if (++i >= serializedRefIds.size())
@@ -212,7 +212,7 @@ namespace
std::minstd_rand random;
std::vector<ESM::RefId> refIds = generateESM3ExteriorCellRefIds(random);
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(refIds[i].serializeText());
if (++i >= refIds.size())
@@ -226,7 +226,7 @@ namespace
std::vector<std::string> serializedRefIds
= generateSerializedESM3ExteriorCellRefIds(random, [](ESM::RefId v) { return v.serializeText(); });
std::size_t i = 0;
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(ESM::RefId::deserializeText(serializedRefIds[i]));
if (++i >= serializedRefIds.size())
+5 -1
View File
@@ -9,10 +9,14 @@ if (UNIX AND NOT APPLE)
endif()
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(openmw_settings_access_benchmark PRIVATE <algorithm>)
target_precompile_headers(openmw_settings_access_benchmark REUSE_FROM components)
endif()
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw_settings_access_benchmark PRIVATE --coverage)
target_link_libraries(openmw_settings_access_benchmark gcov)
endif()
if (WIN32)
target_sources(openmw_settings_access_benchmark PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
+12 -12
View File
@@ -9,7 +9,7 @@ namespace
{
void settingsManager(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(Settings::Manager::getFloat("sky blending start", "Fog"));
}
@@ -17,7 +17,7 @@ namespace
void settingsManager2(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(Settings::Manager::getFloat("near clip", "Camera"));
benchmark::DoNotOptimize(Settings::Manager::getBool("transparent postpass", "Post Processing"));
@@ -26,7 +26,7 @@ namespace
void settingsManager3(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(Settings::Manager::getFloat("near clip", "Camera"));
benchmark::DoNotOptimize(Settings::Manager::getBool("transparent postpass", "Post Processing"));
@@ -36,7 +36,7 @@ namespace
void localStatic(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
static float v = Settings::Manager::getFloat("sky blending start", "Fog");
benchmark::DoNotOptimize(v);
@@ -45,7 +45,7 @@ namespace
void localStatic2(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
static float v1 = Settings::Manager::getFloat("near clip", "Camera");
static bool v2 = Settings::Manager::getBool("transparent postpass", "Post Processing");
@@ -56,7 +56,7 @@ namespace
void localStatic3(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
static float v1 = Settings::Manager::getFloat("near clip", "Camera");
static bool v2 = Settings::Manager::getBool("transparent postpass", "Post Processing");
@@ -69,7 +69,7 @@ namespace
void settingsStorage(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
float v = Settings::fog().mSkyBlendingStart.get();
benchmark::DoNotOptimize(v);
@@ -78,7 +78,7 @@ namespace
void settingsStorage2(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
bool v1 = Settings::postProcessing().mTransparentPostpass.get();
float v2 = Settings::camera().mNearClip.get();
@@ -89,7 +89,7 @@ namespace
void settingsStorage3(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
bool v1 = Settings::postProcessing().mTransparentPostpass.get();
float v2 = Settings::camera().mNearClip.get();
@@ -102,7 +102,7 @@ namespace
void settingsStorageGet(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(Settings::get<float>("Fog", "sky blending start"));
}
@@ -110,7 +110,7 @@ namespace
void settingsStorageGet2(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(Settings::get<bool>("Post Processing", "transparent postpass"));
benchmark::DoNotOptimize(Settings::get<float>("Camera", "near clip"));
@@ -119,7 +119,7 @@ namespace
void settingsStorageGet3(benchmark::State& state)
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(Settings::get<bool>("Post Processing", "transparent postpass"));
benchmark::DoNotOptimize(Settings::get<float>("Camera", "near clip"));
+5 -5
View File
@@ -13,6 +13,10 @@ target_link_libraries(bsatool
components
)
if (WIN32)
target_sources(bsatool PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(bsatool PRIVATE --coverage)
target_link_libraries(bsatool gcov)
@@ -23,9 +27,5 @@ if (WIN32)
endif()
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(bsatool PRIVATE
<filesystem>
<fstream>
<vector>
)
target_precompile_headers(bsatool REUSE_FROM components)
endif()
+4 -4
View File
@@ -75,8 +75,8 @@ Allowed options)");
bpo::variables_map variables;
try
{
bpo::parsed_options valid_opts = bpo::command_line_parser(argc, argv).options(all).positional(p).run();
bpo::store(valid_opts, variables);
bpo::parsed_options validOpts = bpo::command_line_parser(argc, argv).options(all).positional(p).run();
bpo::store(validOpts, variables);
}
catch (std::exception& e)
{
@@ -170,8 +170,8 @@ int list(std::unique_ptr<File>& bsa, Arguments& info)
// Long format
std::ios::fmtflags f(std::cout.flags());
std::cout << std::setw(50) << std::left << file.name();
std::cout << std::setw(8) << std::left << std::dec << file.fileSize;
std::cout << "@ 0x" << std::hex << file.offset << std::endl;
std::cout << std::setw(8) << std::left << std::dec << file.mFileSize;
std::cout << "@ 0x" << std::hex << file.mOffset << std::endl;
std::cout.flags(f);
}
else
+5 -4
View File
@@ -10,6 +10,10 @@ target_link_libraries(openmw-bulletobjecttool
components
)
if (WIN32)
target_sources(openmw-bulletobjecttool PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw-bulletobjecttool PRIVATE --coverage)
target_link_libraries(openmw-bulletobjecttool gcov)
@@ -20,8 +24,5 @@ if (WIN32)
endif()
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(openmw-bulletobjecttool PRIVATE
<string>
<vector>
)
target_precompile_headers(openmw-bulletobjecttool REUSE_FROM components)
endif()
+5 -5
View File
@@ -20,7 +20,7 @@
#include <components/resource/niffilemanager.hpp>
#include <components/resource/scenemanager.hpp>
#include <components/settings/settings.hpp>
#include <components/to_utf8/to_utf8.hpp>
#include <components/toutf8/toutf8.hpp>
#include <components/version/version.hpp>
#include <components/vfs/manager.hpp>
#include <components/vfs/registerarchives.hpp>
@@ -53,8 +53,6 @@ namespace
bpo::options_description makeOptionsDescription()
{
using Fallback::FallbackMap;
bpo::options_description result;
auto addOption = result.add_options();
addOption("help", "print help message");
@@ -87,7 +85,8 @@ namespace
"\n\twin1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages\n"
"\n\twin1252 - Western European (Latin) alphabet, used by default");
addOption("fallback", bpo::value<FallbackMap>()->default_value(FallbackMap(), "")->multitoken()->composing(),
addOption("fallback",
bpo::value<Fallback::FallbackMap>()->default_value(Fallback::FallbackMap(), "")->multitoken()->composing(),
"fallback values");
Files::ConfigurationManager::addCommonOptions(result);
@@ -126,6 +125,7 @@ namespace
}
Files::ConfigurationManager config;
config.processPaths(variables, std::filesystem::current_path());
config.readConfiguration(variables, desc);
Debug::setupLogging(config.getLogPath(), applicationName);
@@ -155,7 +155,7 @@ namespace
VFS::Manager vfs;
VFS::registerArchives(&vfs, fileCollections, archives, true);
VFS::registerArchives(&vfs, fileCollections, archives, true, &encoder.getStatelessEncoder());
Settings::Manager::load(config);
+28 -18
View File
@@ -4,29 +4,28 @@ include_directories(SYSTEM ${GMOCK_INCLUDE_DIRS})
file(GLOB UNITTEST_SRC_FILES
main.cpp
esm/test_fixed_string.cpp
esm/variant.cpp
esm/testfixedstring.cpp
esm/testrefid.cpp
esm/variant.cpp
lua/test_lua.cpp
lua/test_scriptscontainer.cpp
lua/test_utilpackage.cpp
lua/test_serialization.cpp
lua/test_configuration.cpp
lua/test_l10n.cpp
lua/test_storage.cpp
lua/test_async.cpp
lua/test_inputactions.cpp
lua/test_yaml.cpp
lua/test_ui_content.cpp
lua/testasync.cpp
lua/testconfiguration.cpp
lua/testinputactions.cpp
lua/testl10n.cpp
lua/testlua.cpp
lua/testscriptscontainer.cpp
lua/testserialization.cpp
lua/teststorage.cpp
lua/testuicontent.cpp
lua/testutilpackage.cpp
lua/testyaml.cpp
misc/compression.cpp
misc/progressreporter.cpp
misc/test_endianness.cpp
misc/test_resourcehelpers.cpp
misc/test_stringops.cpp
misc/testendianness.cpp
misc/testmathutil.cpp
misc/testresourcehelpers.cpp
misc/teststringops.cpp
nifloader/testbulletnifloader.cpp
@@ -64,8 +63,8 @@ file(GLOB UNITTEST_SRC_FILES
esmloader/esmdata.cpp
esmloader/record.cpp
files/conversiontests.cpp
files/hash.cpp
files/conversion_tests.cpp
toutf8/toutf8.cpp
@@ -85,10 +84,17 @@ file(GLOB UNITTEST_SRC_FILES
esmterrain/testgridsampling.cpp
resource/testobjectcache.cpp
resource/testresourcesystem.cpp
vfs/testpathutil.cpp
sceneutil/osgacontroller.cpp
bsa/testbsafile.cpp
bsa/testcompressedbsafile.cpp
nif/node.hpp
nif/testphysics.cpp
)
source_group(apps\\components-tests FILES ${UNITTEST_SRC_FILES})
@@ -101,6 +107,10 @@ target_link_libraries(components-tests
components
)
if (WIN32)
target_sources(components-tests PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
# Fix for not visible pthreads functions for linker with glibc 2.15
if (UNIX AND NOT APPLE)
target_link_libraries(components-tests ${CMAKE_THREAD_LIBS_INIT})
+40
View File
@@ -0,0 +1,40 @@
#ifndef COMPONETS_TESTS_BSA_OPERATORS_H
#define COMPONETS_TESTS_BSA_OPERATORS_H
#include <components/bsa/bsafile.hpp>
#include <ostream>
#include <tuple>
namespace Bsa
{
inline auto makeTuple(const BSAFile::Hash& value)
{
return std::make_tuple(value.mLow, value.mHigh);
}
inline auto makeTuple(const BSAFile::FileStruct& value)
{
return std::make_tuple(
value.mFileSize, value.mOffset, makeTuple(value.mHash), value.mNameOffset, value.mNameSize, value.name());
}
inline std::ostream& operator<<(std::ostream& stream, const BSAFile::Hash& value)
{
return stream << "Hash { .mLow = " << value.mLow << ", .mHigh = " << value.mHigh << "}";
}
inline std::ostream& operator<<(std::ostream& stream, const BSAFile::FileStruct& value)
{
return stream << "FileStruct { .mFileSize = " << value.mFileSize << ", .mOffset = " << value.mOffset
<< ", .mHash = " << value.mHash << ", .mNameOffset = " << value.mNameOffset
<< ", .mNameSize = " << value.mNameSize << ", .name() = " << value.name() << "}";
}
inline bool operator==(const BSAFile::FileStruct& lhs, const BSAFile::FileStruct& rhs)
{
return makeTuple(lhs) == makeTuple(rhs);
}
}
#endif
+356
View File
@@ -0,0 +1,356 @@
#include "operators.hpp"
#include <components/bsa/compressedbsafile.hpp>
#include <components/files/memorystream.hpp>
#include <components/testing/util.hpp>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <format>
#include <fstream>
#include <memory>
#include <sstream>
#include <vector>
namespace Bsa
{
namespace
{
using namespace ::testing;
struct Free
{
void operator()(void* ptr) const { std::free(ptr); }
};
struct Buffer
{
std::unique_ptr<char, Free> mData;
std::size_t mCapacity;
};
struct Header
{
uint32_t mFormat;
uint32_t mDirSize;
uint32_t mFileCount;
};
struct Archive
{
Header mHeader;
std::vector<std::uint32_t> mOffsets;
std::vector<char> mStringBuffer;
std::vector<BSAFile::Hash> mHashes;
std::size_t mTailSize;
};
struct TestBSAFile final : public BSAFile
{
void readHeader(std::istream& input) override { BSAFile::readHeader(input); }
void writeHeader() override { throw std::logic_error("TestBSAFile::writeHeader is not implemented"); }
};
void writeArchive(const Archive& value, std::ostream& stream)
{
stream.write(reinterpret_cast<const char*>(&value.mHeader), sizeof(value.mHeader));
if (!value.mOffsets.empty())
stream.write(reinterpret_cast<const char*>(value.mOffsets.data()),
value.mOffsets.size() * sizeof(std::uint32_t));
if (!value.mStringBuffer.empty())
stream.write(reinterpret_cast<const char*>(value.mStringBuffer.data()), value.mStringBuffer.size());
for (const BSAFile::Hash& hash : value.mHashes)
stream.write(reinterpret_cast<const char*>(&hash), sizeof(BSAFile::Hash));
const std::size_t chunkSize = 4096;
std::vector<char> chunk(chunkSize);
for (std::size_t i = 0; i < value.mTailSize; i += chunkSize)
stream.write(reinterpret_cast<const char*>(chunk.data()), std::min(chunk.size(), value.mTailSize - i));
}
std::filesystem::path makeOutputPath()
{
const auto testInfo = UnitTest::GetInstance()->current_test_info();
return TestingOpenMW::outputFilePath(
std::format("{}.{}.bsa", testInfo->test_suite_name(), testInfo->name()));
}
Buffer makeBsaBuffer(std::uint32_t fileSize, std::uint32_t fileOffset)
{
std::ostringstream stream;
const Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Uncompressed),
.mDirSize = 14,
.mFileCount = 1,
};
const BSAFile::Hash hash{
.mLow = 0xaaaabbbb,
.mHigh = 0xccccdddd,
};
const Archive archive{
.mHeader = header,
.mOffsets = { fileSize, fileOffset, 0 },
.mStringBuffer = { 'a', '\0' },
.mHashes = { hash },
.mTailSize = 0,
};
writeArchive(archive, stream);
const std::string data = std::move(stream).str();
const std::size_t capacity = static_cast<std::size_t>(fileSize) + static_cast<std::size_t>(fileOffset) + 34;
std::unique_ptr<char, Free> buffer(reinterpret_cast<char*>(std::malloc(capacity)));
if (buffer == nullptr)
throw std::bad_alloc();
std::memcpy(buffer.get(), data.data(), data.size());
return Buffer{ .mData = std::move(buffer), .mCapacity = capacity };
}
TEST(BSAFileTest, shouldHandleEmpty)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
}
BSAFile file;
EXPECT_THROW(file.open(path), std::runtime_error);
EXPECT_THAT(file.getList(), IsEmpty());
}
TEST(BSAFileTest, shouldHandleZeroFiles)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
const Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Uncompressed),
.mDirSize = 0,
.mFileCount = 0,
};
const Archive archive{
.mHeader = header,
.mOffsets = {},
.mStringBuffer = {},
.mHashes = {},
.mTailSize = 0,
};
writeArchive(archive, stream);
}
BSAFile file;
file.open(path);
EXPECT_THAT(file.getList(), IsEmpty());
}
TEST(BSAFileTest, shouldHandleSingleFile)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
const Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Uncompressed),
.mDirSize = 14,
.mFileCount = 1,
};
const BSAFile::Hash hash{
.mLow = 0xaaaabbbb,
.mHigh = 0xccccdddd,
};
const Archive archive{
.mHeader = header,
.mOffsets = { 42, 0, 0 },
.mStringBuffer = { 'a', '\0' },
.mHashes = { hash },
.mTailSize = 42,
};
writeArchive(archive, stream);
}
BSAFile file;
file.open(path);
std::vector<char> namesBuffer = { 'a', '\0' };
EXPECT_THAT(file.getList(),
ElementsAre(BSAFile::FileStruct{
.mFileSize = 42,
.mOffset = 34,
.mHash = BSAFile::Hash{ .mLow = 0xaaaabbbb, .mHigh = 0xccccdddd },
.mNameOffset = 0,
.mNameSize = 1,
.mNamesBuffer = &namesBuffer,
}));
}
TEST(BSAFileTest, shouldHandleTwoFiles)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
const std::uint32_t fileSize1 = 42;
const std::uint32_t fileSize2 = 13;
const Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Uncompressed),
.mDirSize = 28,
.mFileCount = 2,
};
const BSAFile::Hash hash1{
.mLow = 0xaaaabbbb,
.mHigh = 0xccccdddd,
};
const BSAFile::Hash hash2{
.mLow = 0x11112222,
.mHigh = 0x33334444,
};
const Archive archive{
.mHeader = header,
.mOffsets = { fileSize1, 0, fileSize2, fileSize1, 0, 2 },
.mStringBuffer = { 'a', '\0', 'b', '\0' },
.mHashes = { hash1, hash2 },
.mTailSize = fileSize1 + fileSize2,
};
writeArchive(archive, stream);
}
BSAFile file;
file.open(path);
std::vector<char> namesBuffer = { 'a', '\0', 'b', '\0' };
EXPECT_THAT(file.getList(),
ElementsAre(
BSAFile::FileStruct{
.mFileSize = 42,
.mOffset = 56,
.mHash = BSAFile::Hash{ .mLow = 0xaaaabbbb, .mHigh = 0xccccdddd },
.mNameOffset = 0,
.mNameSize = 1,
.mNamesBuffer = &namesBuffer,
},
BSAFile::FileStruct{
.mFileSize = 13,
.mOffset = 98,
.mHash = BSAFile::Hash{ .mLow = 0x11112222, .mHigh = 0x33334444 },
.mNameOffset = 2,
.mNameSize = 1,
.mNamesBuffer = &namesBuffer,
}));
}
TEST(BSAFileTest, shouldHandleSomewhatLargeFiles)
{
constexpr std::uint32_t maxUInt32 = std::numeric_limits<uint32_t>::max();
constexpr std::uint32_t fileSize = maxUInt32 / 4;
constexpr std::uint32_t fileOffset = maxUInt32 / 4 - 34;
const Buffer buffer = makeBsaBuffer(fileSize, fileOffset);
TestBSAFile file;
// Use capacity assuming we never read beyond small header.
Files::IMemStream stream(buffer.mData.get(), buffer.mCapacity);
file.readHeader(stream);
std::vector<char> namesBuffer = { 'a', '\0' };
EXPECT_THAT(file.getList(),
ElementsAre(BSAFile::FileStruct{
.mFileSize = maxUInt32 / 4,
.mOffset = maxUInt32 / 4,
.mHash = BSAFile::Hash{ .mLow = 0xaaaabbbb, .mHigh = 0xccccdddd },
.mNameOffset = 0,
.mNameSize = 1,
.mNamesBuffer = &namesBuffer,
}));
}
// std::streambuf in MSVC does not support buffers larger than 2**31 - 1:
// https://developercommunity.visualstudio.com/t/stdbasic-stringbuf-is-broken/290124
#ifndef _MSC_VER
TEST(BSAFileTest, shouldHandleSingleFileAtTheEndOfLargeFile)
{
constexpr std::uint32_t maxUInt32 = std::numeric_limits<uint32_t>::max();
constexpr std::uint32_t fileSize = maxUInt32;
constexpr std::uint32_t fileOffset = maxUInt32 - 34;
const Buffer buffer = makeBsaBuffer(fileSize, fileOffset);
TestBSAFile file;
// Use capacity assuming we never read beyond small header.
Files::IMemStream stream(buffer.mData.get(), buffer.mCapacity);
file.readHeader(stream);
std::vector<char> namesBuffer = { 'a', '\0' };
EXPECT_THAT(file.getList(),
ElementsAre(BSAFile::FileStruct{
.mFileSize = maxUInt32,
.mOffset = maxUInt32,
.mHash = BSAFile::Hash{ .mLow = 0xaaaabbbb, .mHigh = 0xccccdddd },
.mNameOffset = 0,
.mNameSize = 1,
.mNamesBuffer = &namesBuffer,
}));
}
TEST(BSAFileTest, shouldThrowExceptionOnTooBigAbsoluteOffset)
{
constexpr std::uint32_t maxUInt32 = std::numeric_limits<uint32_t>::max();
constexpr std::uint32_t fileSize = maxUInt32;
constexpr std::uint32_t fileOffset = maxUInt32 - 34 + 1;
const Buffer buffer = makeBsaBuffer(fileSize, fileOffset);
TestBSAFile file;
// Use capacity assuming we never read beyond small header.
Files::IMemStream stream(buffer.mData.get(), buffer.mCapacity);
EXPECT_THROW(file.readHeader(stream), std::runtime_error);
EXPECT_THAT(file.getList(), IsEmpty());
}
#endif
}
}
@@ -0,0 +1,360 @@
#include "operators.hpp"
#include <components/bsa/compressedbsafile.hpp>
#include <components/testing/util.hpp>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <cstdint>
#include <filesystem>
#include <format>
#include <fstream>
#include <string>
namespace Bsa
{
namespace
{
using namespace ::testing;
struct FileRecord
{
std::uint64_t mHash;
std::uint32_t mSize;
std::uint32_t mOffset;
std::string mName;
};
struct NonSSEFolderRecord
{
std::uint64_t mHash;
std::uint32_t mCount;
std::int32_t mOffset;
std::string mName;
std::vector<FileRecord> mFiles;
};
struct Archive
{
CompressedBSAFile::Header mHeader;
std::vector<NonSSEFolderRecord> mFolders;
};
void writeArchive(const Archive& value, std::ostream& stream)
{
stream.write(reinterpret_cast<const char*>(&value.mHeader), sizeof(value.mHeader));
for (const NonSSEFolderRecord& folder : value.mFolders)
{
stream.write(reinterpret_cast<const char*>(&folder.mHash), sizeof(folder.mHash));
stream.write(reinterpret_cast<const char*>(&folder.mCount), sizeof(folder.mCount));
stream.write(reinterpret_cast<const char*>(&folder.mOffset), sizeof(folder.mOffset));
}
for (const NonSSEFolderRecord& folder : value.mFolders)
{
const std::uint8_t folderNameSize = static_cast<std::uint8_t>(folder.mName.size() + 1);
stream.write(reinterpret_cast<const char*>(&folderNameSize), sizeof(folderNameSize));
stream.write(reinterpret_cast<const char*>(folder.mName.data()), folder.mName.size());
stream.put('\0');
for (const FileRecord& file : folder.mFiles)
{
stream.write(reinterpret_cast<const char*>(&file.mHash), sizeof(file.mHash));
stream.write(reinterpret_cast<const char*>(&file.mSize), sizeof(file.mSize));
stream.write(reinterpret_cast<const char*>(&file.mOffset), sizeof(file.mOffset));
}
}
for (const NonSSEFolderRecord& folder : value.mFolders)
{
for (const FileRecord& file : folder.mFiles)
{
stream.write(reinterpret_cast<const char*>(file.mName.data()), file.mName.size());
stream.put('\0');
}
}
}
std::filesystem::path makeOutputPath()
{
const auto testInfo = UnitTest::GetInstance()->current_test_info();
return TestingOpenMW::outputFilePath(
std::format("{}.{}.bsa", testInfo->test_suite_name(), testInfo->name()));
}
TEST(CompressedBSAFileTest, shouldHandleEmpty)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
}
CompressedBSAFile file;
EXPECT_THROW(file.open(path), std::runtime_error);
EXPECT_THAT(file.getList(), IsEmpty());
}
TEST(CompressedBSAFileTest, shouldHandleSingleFile)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
const CompressedBSAFile::Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Compressed),
.mVersion = CompressedBSAFile::Version_TES4,
.mFoldersOffset = sizeof(CompressedBSAFile::Header),
.mFlags = CompressedBSAFile::ArchiveFlag_FolderNames | CompressedBSAFile::ArchiveFlag_FileNames,
.mFolderCount = 1,
.mFileCount = 1,
.mFolderNamesLength = 7,
.mFileNamesLength = 9,
.mFileFlags = 0,
};
const FileRecord file{
.mHash = 0xfedcba9876543210,
.mSize = 42,
.mOffset = 0,
.mName = "filename",
};
const NonSSEFolderRecord folder{
.mHash = 0xfedcba9876543210,
.mCount = 1,
.mOffset = 0,
.mName = "folder",
.mFiles = { file },
};
const Archive archive{
.mHeader = header,
.mFolders = { folder },
};
writeArchive(archive, stream);
}
CompressedBSAFile file;
file.open(path);
std::vector<char> namesBuffer;
constexpr std::string_view filePath = "folder\\filename";
namesBuffer.assign(filePath.begin(), filePath.end());
namesBuffer.push_back('\0');
EXPECT_THAT(file.getList(),
ElementsAre(BSAFile::FileStruct{
.mFileSize = 42,
.mOffset = 0,
.mHash = BSAFile::Hash{ .mLow = 0, .mHigh = 0 },
.mNameOffset = 0,
.mNameSize = 15,
.mNamesBuffer = &namesBuffer,
}));
}
TEST(CompressedBSAFileTest, shouldHandleEmptyFileName)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
const CompressedBSAFile::Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Compressed),
.mVersion = CompressedBSAFile::Version_TES4,
.mFoldersOffset = sizeof(CompressedBSAFile::Header),
.mFlags = CompressedBSAFile::ArchiveFlag_FolderNames | CompressedBSAFile::ArchiveFlag_FileNames,
.mFolderCount = 1,
.mFileCount = 1,
.mFolderNamesLength = 7,
.mFileNamesLength = 1,
.mFileFlags = 0,
};
const FileRecord file{
.mHash = 0xfedcba9876543210,
.mSize = 42,
.mOffset = 0,
.mName = "",
};
const NonSSEFolderRecord folder{
.mHash = 0xfedcba9876543210,
.mCount = 1,
.mOffset = 0,
.mName = "folder",
.mFiles = { file },
};
const Archive archive{
.mHeader = header,
.mFolders = { folder },
};
writeArchive(archive, stream);
}
CompressedBSAFile file;
EXPECT_THROW(file.open(path), std::runtime_error);
}
TEST(CompressedBSAFileTest, shouldHandleFoldersWithDuplicateHash)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
const CompressedBSAFile::Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Compressed),
.mVersion = CompressedBSAFile::Version_TES4,
.mFoldersOffset = sizeof(CompressedBSAFile::Header),
.mFlags = CompressedBSAFile::ArchiveFlag_FolderNames | CompressedBSAFile::ArchiveFlag_FileNames,
.mFolderCount = 2,
.mFileCount = 2,
.mFolderNamesLength = 16,
.mFileNamesLength = 18,
.mFileFlags = 0,
};
const FileRecord file{
.mHash = 0xfedcba9876543210,
.mSize = 42,
.mOffset = 0,
.mName = "filename",
};
const NonSSEFolderRecord folder1{
.mHash = 0xfedcba9876543210,
.mCount = 1,
.mOffset = 0,
.mName = "folder1",
.mFiles = { file },
};
const NonSSEFolderRecord folder2{
.mHash = 0xfedcba9876543210,
.mCount = 1,
.mOffset = 0,
.mName = "folder2",
.mFiles = { file },
};
const Archive archive{
.mHeader = header,
.mFolders = { folder1, folder2 },
};
writeArchive(archive, stream);
}
CompressedBSAFile file;
file.open(path);
std::vector<char> namesBuffer;
constexpr std::string_view filePath = "folder2\\filename";
namesBuffer.assign(filePath.begin(), filePath.end());
namesBuffer.push_back('\0');
EXPECT_THAT(file.getList(),
ElementsAre(BSAFile::FileStruct{
.mFileSize = 42,
.mOffset = 0,
.mHash = BSAFile::Hash{ .mLow = 0, .mHigh = 0 },
.mNameOffset = 0,
.mNameSize = 16,
.mNamesBuffer = &namesBuffer,
}));
}
TEST(CompressedBSAFileTest, shouldHandleFilesWithDuplicateHash)
{
const std::filesystem::path path = makeOutputPath();
{
std::ofstream stream;
stream.exceptions(std::ifstream::failbit | std::ifstream::badbit);
stream.open(path, std::ios::binary);
const CompressedBSAFile::Header header{
.mFormat = static_cast<std::uint32_t>(BsaVersion::Compressed),
.mVersion = CompressedBSAFile::Version_TES4,
.mFoldersOffset = sizeof(CompressedBSAFile::Header),
.mFlags = CompressedBSAFile::ArchiveFlag_FolderNames | CompressedBSAFile::ArchiveFlag_FileNames,
.mFolderCount = 1,
.mFileCount = 2,
.mFolderNamesLength = 9,
.mFileNamesLength = 18,
.mFileFlags = 0,
};
const FileRecord file1{
.mHash = 0xfedcba9876543210,
.mSize = 42,
.mOffset = 0,
.mName = "filename1",
};
const FileRecord file2{
.mHash = 0xfedcba9876543210,
.mSize = 13,
.mOffset = 0,
.mName = "filename2",
};
const NonSSEFolderRecord folder{
.mHash = 0xfedcba9876543210,
.mCount = 2,
.mOffset = 0,
.mName = "folder",
.mFiles = { file1, file2 },
};
const Archive archive{
.mHeader = header,
.mFolders = { folder },
};
writeArchive(archive, stream);
}
CompressedBSAFile file;
file.open(path);
std::vector<char> namesBuffer;
constexpr std::string_view filePath = "folder\\filename2";
namesBuffer.assign(filePath.begin(), filePath.end());
namesBuffer.push_back('\0');
EXPECT_THAT(file.getList(),
ElementsAre(BSAFile::FileStruct{
.mFileSize = 13,
.mOffset = 0,
.mHash = BSAFile::Hash{ .mLow = 0, .mHigh = 0 },
.mNameOffset = 0,
.mNameSize = 16,
.mNamesBuffer = &namesBuffer,
}));
}
}
}
@@ -5,7 +5,9 @@
#include <components/detournavigator/makenavmesh.hpp>
#include <components/detournavigator/navmeshdbutils.hpp>
#include <components/detournavigator/serialization.hpp>
#include <components/files/conversion.hpp>
#include <components/loadinglistener/loadinglistener.hpp>
#include <components/testing/util.hpp>
#include <BulletCollision/CollisionShapes/btBoxShape.h>
@@ -80,6 +82,7 @@ namespace
updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles);
updater.wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_NE(navMeshCacheItem->lockConst()->getImpl().getTileRefAt(0, 0, 0), 0u);
EXPECT_EQ(updater.getStats().mPosted, 1);
}
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, repeated_post_should_lead_to_cache_hit)
@@ -372,6 +375,106 @@ namespace
}
}
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, should_write_debug_recast_mesh)
{
mRecastMeshManager.setWorldspace(mWorldspace, nullptr);
addHeightFieldPlane(mRecastMeshManager);
mSettings.mEnableWriteRecastMeshToFile = true;
const std::filesystem::path dir = TestingOpenMW::currentTestDirPath();
mSettings.mRecastMeshPathPrefix = Files::pathToUnicodeString(dir) + "/";
Log(Debug::Verbose) << mSettings.mRecastMeshPathPrefix;
AsyncNavMeshUpdater updater(mSettings, mRecastMeshManager, mOffMeshConnectionsManager, nullptr);
const auto navMeshCacheItem = std::make_shared<GuardedNavMeshCacheItem>(1, mSettings);
const std::map<TilePosition, ChangeType> changedTiles{ { TilePosition{ 0, 0 }, ChangeType::add } };
updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles);
updater.wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_TRUE(std::filesystem::exists(dir / "0.0.recastmesh.obj"));
}
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, should_write_debug_recast_mesh_with_revision)
{
mRecastMeshManager.setWorldspace(mWorldspace, nullptr);
addHeightFieldPlane(mRecastMeshManager);
mSettings.mEnableWriteRecastMeshToFile = true;
mSettings.mEnableRecastMeshFileNameRevision = true;
const std::filesystem::path dir = TestingOpenMW::currentTestDirPath();
mSettings.mRecastMeshPathPrefix = Files::pathToUnicodeString(dir) + "/";
Log(Debug::Verbose) << mSettings.mRecastMeshPathPrefix;
AsyncNavMeshUpdater updater(mSettings, mRecastMeshManager, mOffMeshConnectionsManager, nullptr);
const auto navMeshCacheItem = std::make_shared<GuardedNavMeshCacheItem>(1, mSettings);
const std::map<TilePosition, ChangeType> changedTiles{ { TilePosition{ 0, 0 }, ChangeType::add } };
updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles);
updater.wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_TRUE(std::filesystem::exists(dir / "0.0.recastmesh.1.2.obj"));
}
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, writing_recast_mesh_to_absent_file_should_not_fail_tile_generation)
{
mRecastMeshManager.setWorldspace(mWorldspace, nullptr);
addHeightFieldPlane(mRecastMeshManager);
mSettings.mEnableWriteRecastMeshToFile = true;
const std::filesystem::path dir = TestingOpenMW::currentTestDirPath() / "absent";
mSettings.mRecastMeshPathPrefix = Files::pathToUnicodeString(dir) + "/";
Log(Debug::Verbose) << mSettings.mRecastMeshPathPrefix;
AsyncNavMeshUpdater updater(mSettings, mRecastMeshManager, mOffMeshConnectionsManager, nullptr);
const auto navMeshCacheItem = std::make_shared<GuardedNavMeshCacheItem>(1, mSettings);
const std::map<TilePosition, ChangeType> changedTiles{ { TilePosition{ 0, 0 }, ChangeType::add } };
updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles);
updater.wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_NE(navMeshCacheItem->lockConst()->getImpl().getTileRefAt(0, 0, 0), 0u);
EXPECT_FALSE(std::filesystem::exists(dir));
}
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, should_write_debug_navmesh)
{
mRecastMeshManager.setWorldspace(mWorldspace, nullptr);
addHeightFieldPlane(mRecastMeshManager);
mSettings.mEnableWriteNavMeshToFile = true;
const std::filesystem::path dir = TestingOpenMW::currentTestDirPath();
mSettings.mNavMeshPathPrefix = Files::pathToUnicodeString(dir) + "/";
Log(Debug::Verbose) << mSettings.mRecastMeshPathPrefix;
AsyncNavMeshUpdater updater(mSettings, mRecastMeshManager, mOffMeshConnectionsManager, nullptr);
const auto navMeshCacheItem = std::make_shared<GuardedNavMeshCacheItem>(1, mSettings);
const std::map<TilePosition, ChangeType> changedTiles{ { TilePosition{ 0, 0 }, ChangeType::add } };
updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles);
updater.wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_TRUE(std::filesystem::exists(dir / "all_tiles_navmesh.bin"));
}
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, should_write_debug_navmesh_with_revision)
{
mRecastMeshManager.setWorldspace(mWorldspace, nullptr);
addHeightFieldPlane(mRecastMeshManager);
mSettings.mEnableWriteNavMeshToFile = true;
mSettings.mEnableNavMeshFileNameRevision = true;
const std::filesystem::path dir = TestingOpenMW::currentTestDirPath();
mSettings.mNavMeshPathPrefix = Files::pathToUnicodeString(dir) + "/";
Log(Debug::Verbose) << mSettings.mRecastMeshPathPrefix;
AsyncNavMeshUpdater updater(mSettings, mRecastMeshManager, mOffMeshConnectionsManager, nullptr);
const auto navMeshCacheItem = std::make_shared<GuardedNavMeshCacheItem>(1, mSettings);
const std::map<TilePosition, ChangeType> changedTiles{ { TilePosition{ 0, 0 }, ChangeType::add } };
updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles);
updater.wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_TRUE(std::filesystem::exists(dir / "all_tiles_navmesh.1.1.bin"));
}
TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, writing_navmesh_to_absent_file_should_not_fail_tile_generation)
{
mRecastMeshManager.setWorldspace(mWorldspace, nullptr);
addHeightFieldPlane(mRecastMeshManager);
mSettings.mEnableWriteNavMeshToFile = true;
const std::filesystem::path dir = TestingOpenMW::currentTestDirPath() / "absent";
mSettings.mNavMeshPathPrefix = Files::pathToUnicodeString(dir) + "/";
Log(Debug::Verbose) << mSettings.mRecastMeshPathPrefix;
AsyncNavMeshUpdater updater(mSettings, mRecastMeshManager, mOffMeshConnectionsManager, nullptr);
const auto navMeshCacheItem = std::make_shared<GuardedNavMeshCacheItem>(1, mSettings);
const std::map<TilePosition, ChangeType> changedTiles{ { TilePosition{ 0, 0 }, ChangeType::add } };
updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles);
updater.wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_NE(navMeshCacheItem->lockConst()->getImpl().getTileRefAt(0, 0, 0), 0u);
EXPECT_FALSE(std::filesystem::exists(dir));
}
struct DetourNavigatorSpatialJobQueueTest : Test
{
const AgentBounds mAgentBounds{ CollisionShapeType::Aabb, osg::Vec3f(1, 1, 1) };
@@ -82,30 +82,36 @@ namespace
0, -25, -100, -100, -100, // row 4
} };
template <class T, std::size_t size>
std::pair<T, T> getMinMaxHeight(const std::array<T, size>& values)
{
const auto [min, max] = std::minmax_element(values.begin(), values.end());
if (*min == *max)
return { *min, *min + 1 };
return { *min, *max };
}
template <std::size_t size>
std::unique_ptr<btHeightfieldTerrainShape> makeSquareHeightfieldTerrainShape(
const std::array<btScalar, size>& values, btScalar heightScale = 1, int upAxis = 2,
PHY_ScalarType heightDataType = PHY_FLOAT, bool flipQuadEdges = false)
{
const int width = static_cast<int>(std::sqrt(size));
const btScalar min = *std::min_element(values.begin(), values.end());
const btScalar max = *std::max_element(values.begin(), values.end());
const btScalar greater = std::max(std::abs(min), std::abs(max));
const auto [minHeight, maxHeight] = getMinMaxHeight(values);
return std::make_unique<btHeightfieldTerrainShape>(
width, width, values.data(), heightScale, -greater, greater, upAxis, heightDataType, flipQuadEdges);
width, width, values.data(), heightScale, minHeight, maxHeight, upAxis, heightDataType, flipQuadEdges);
}
template <std::size_t size>
HeightfieldSurface makeSquareHeightfieldSurface(const std::array<float, size>& values)
{
const auto [min, max] = std::minmax_element(values.begin(), values.end());
const float greater = std::max(std::abs(*min), std::abs(*max));
HeightfieldSurface surface;
surface.mHeights = values.data();
surface.mMinHeight = -greater;
surface.mMaxHeight = greater;
surface.mSize = static_cast<int>(std::sqrt(size));
return surface;
const auto [minHeight, maxHeight] = getMinMaxHeight(values);
return HeightfieldSurface{
.mHeights = values.data(),
.mSize = static_cast<std::size_t>(std::sqrt(size)),
.mMinHeight = minHeight,
.mMaxHeight = maxHeight,
};
}
template <class T>
@@ -139,7 +145,7 @@ namespace
TEST_F(DetourNavigatorNavigatorTest, find_path_for_empty_should_return_empty)
{
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::NavMeshNotFound);
EXPECT_EQ(mPath, std::deque<osg::Vec3f>());
}
@@ -147,7 +153,7 @@ namespace
TEST_F(DetourNavigatorNavigatorTest, find_path_for_existing_agent_with_no_navmesh_should_throw_exception)
{
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::StartPolygonNotFound);
}
@@ -156,7 +162,7 @@ namespace
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->removeAgent(mAgentBounds);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::StartPolygonNotFound);
}
@@ -172,7 +178,7 @@ namespace
updateGuard.reset();
mNavigator->wait(WaitConditionType::requiredTilesPresent, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -194,7 +200,7 @@ namespace
updateGuard.reset();
mNavigator->wait(WaitConditionType::requiredTilesPresent, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mStart, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mStart, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath, ElementsAre(Vec3fEq(56.66666412353515625, 460, 1.99998295307159423828125))) << mPath;
@@ -218,7 +224,7 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -237,7 +243,7 @@ namespace
mPath.clear();
mOut = std::back_inserter(mPath);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -265,7 +271,7 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -285,7 +291,7 @@ namespace
mPath.clear();
mOut = std::back_inserter(mPath);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -310,15 +316,18 @@ namespace
CollisionShapeInstance heightfield2(makeSquareHeightfieldTerrainShape(heightfieldData2));
heightfield2.shape().setLocalScaling(btVector3(128, 128, 1));
const ObjectTransform objectTransform{ ESM::Position{ { 256, 256, -50 }, { 0, 0, 0 } }, 0.0f };
const btTransform transform{ btMatrix3x3::getIdentity(), btVector3(256, 256, -50) };
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addObject(ObjectId(&heightfield1.shape()), ObjectShapes(heightfield1.instance(), mObjectTransform),
mTransform, nullptr);
mNavigator->addObject(ObjectId(&heightfield2.shape()), ObjectShapes(heightfield2.instance(), mObjectTransform),
mTransform, nullptr);
mNavigator->addObject(ObjectId(&heightfield1.shape()), ObjectShapes(heightfield1.instance(), objectTransform),
transform, nullptr);
mNavigator->addObject(ObjectId(&heightfield2.shape()), ObjectShapes(heightfield2.instance(), objectTransform),
transform, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -331,7 +340,7 @@ namespace
TEST_F(DetourNavigatorNavigatorTest, only_one_heightfield_per_cell_is_allowed)
{
const HeightfieldSurface surface1 = makeSquareHeightfieldSurface(defaultHeightfieldData);
const int cellSize1 = heightfieldTileSize * (surface1.mSize - 1);
const int cellSize1 = heightfieldTileSize * static_cast<int>(surface1.mSize - 1);
const std::array<float, 5 * 5> heightfieldData2{ {
-25, -25, -25, -25, -25, // row 0
@@ -341,7 +350,7 @@ namespace
-25, -25, -25, -25, -25, // row 4
} };
const HeightfieldSurface surface2 = makeSquareHeightfieldSurface(heightfieldData2);
const int cellSize2 = heightfieldTileSize * (surface2.mSize - 1);
const int cellSize2 = heightfieldTileSize * static_cast<int>(surface2.mSize - 1);
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addHeightfield(mCellPosition, cellSize1, surface1, nullptr);
@@ -386,15 +395,15 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
ElementsAre( //
Vec3fEq(56.66664886474609375, 460, 1.99999392032623291015625),
Vec3fEq(158.6666412353515625, 249.3332977294921875, -20.6666717529296875),
Vec3fEq(249.3332977294921875, 158.6666412353515625, -20.6666717529296875),
Vec3fEq(460, 56.66664886474609375, 1.99999392032623291015625)))
Vec3fEq(56.66664886474609375, 460, 51.999996185302734375),
Vec3fEq(192.666656494140625, 249.3332977294921875, 6.666663646697998046875),
Vec3fEq(249.3332977294921875, 192.666656494140625, 6.666663646697998046875),
Vec3fEq(460, 56.66664886474609375, 51.999996185302734375)))
<< mPath;
}
@@ -421,7 +430,7 @@ namespace
mEnd.x() = 256;
mEnd.z() = 300;
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_swim, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_swim, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -453,8 +462,8 @@ namespace
mStart.x() = 256;
mEnd.x() = 256;
EXPECT_EQ(
findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_swim | Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_swim | Flag_walk, mAreaCosts, mEndTolerance,
{}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -487,8 +496,8 @@ namespace
mStart.x() = 256;
mEnd.x() = 256;
EXPECT_EQ(
findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_swim | Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_swim | Flag_walk, mAreaCosts, mEndTolerance,
{}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -520,7 +529,7 @@ namespace
mStart.x() = 256;
mEnd.x() = 256;
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -534,9 +543,12 @@ namespace
CollisionShapeInstance heightfield(makeSquareHeightfieldTerrainShape(defaultHeightfieldDataScalar));
heightfield.shape().setLocalScaling(btVector3(128, 128, 1));
const ObjectTransform objectTransform{ ESM::Position{ { 256, 256, -50 }, { 0, 0, 0 } }, 0.0f };
const btTransform transform{ btMatrix3x3::getIdentity(), btVector3(256, 256, -50) };
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addObject(ObjectId(&heightfield.shape()), ObjectShapes(heightfield.instance(), mObjectTransform),
mTransform, nullptr);
mNavigator->addObject(
ObjectId(&heightfield.shape()), ObjectShapes(heightfield.instance(), objectTransform), transform, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
@@ -544,12 +556,12 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
mNavigator->addObject(ObjectId(&heightfield.shape()), ObjectShapes(heightfield.instance(), mObjectTransform),
mTransform, nullptr);
mNavigator->addObject(
ObjectId(&heightfield.shape()), ObjectShapes(heightfield.instance(), objectTransform), transform, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -577,7 +589,7 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -639,8 +651,9 @@ namespace
for (std::size_t i = 0; i < boxes.size(); ++i)
{
const btScalar diameter = static_cast<btScalar>(i) * 10;
const btTransform transform(
btMatrix3x3::getIdentity(), btVector3(shift.x() + i * 10, shift.y() + i * 10, i * 10));
btMatrix3x3::getIdentity(), btVector3(shift.x() + diameter, shift.y() + diameter, diameter));
mNavigator->addObject(
ObjectId(&boxes[i].shape()), ObjectShapes(boxes[i].instance(), mObjectTransform), transform, nullptr);
}
@@ -649,8 +662,9 @@ namespace
for (std::size_t i = 0; i < boxes.size(); ++i)
{
const btScalar diameter = static_cast<btScalar>(i) * 10 + 1;
const btTransform transform(
btMatrix3x3::getIdentity(), btVector3(shift.x() + i * 10 + 1, shift.y() + i * 10 + 1, i * 10 + 1));
btMatrix3x3::getIdentity(), btVector3(shift.x() + diameter, shift.y() + diameter, diameter));
mNavigator->updateObject(
ObjectId(&boxes[i].shape()), ObjectShapes(boxes[i].instance(), mObjectTransform), transform, nullptr);
}
@@ -658,7 +672,7 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -680,7 +694,8 @@ namespace
for (std::size_t i = 0; i < shapes.size(); ++i)
{
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(i * 32, i * 32, i * 32));
const btScalar diameter = static_cast<btScalar>(i) * 32;
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(diameter, diameter, diameter));
mNavigator->addObject(
ObjectId(&shapes[i].shape()), ObjectShapes(shapes[i].instance(), mObjectTransform), transform, nullptr);
}
@@ -690,7 +705,8 @@ namespace
const auto start = std::chrono::steady_clock::now();
for (std::size_t i = 0; i < shapes.size(); ++i)
{
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(i * 32 + 1, i * 32 + 1, i * 32 + 1));
const btScalar diameter = static_cast<btScalar>(i) * 32 + 1;
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(diameter, diameter, diameter));
mNavigator->updateObject(
ObjectId(&shapes[i].shape()), ObjectShapes(shapes[i].instance(), mObjectTransform), transform, nullptr);
}
@@ -699,7 +715,8 @@ namespace
for (std::size_t i = 0; i < shapes.size(); ++i)
{
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(i * 32 + 2, i * 32 + 2, i * 32 + 2));
const btScalar diameter = static_cast<btScalar>(i) * 32 + 2;
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(diameter, diameter, diameter));
mNavigator->updateObject(
ObjectId(&shapes[i].shape()), ObjectShapes(shapes[i].instance(), mObjectTransform), transform, nullptr);
}
@@ -781,7 +798,7 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::requiredTilesPresent, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -806,7 +823,7 @@ namespace
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::PartialPath);
EXPECT_THAT(mPath,
@@ -834,7 +851,7 @@ namespace
const float endTolerance = 1000.0f;
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, endTolerance, mOut),
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, mStart, mEnd, Flag_walk, mAreaCosts, endTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
@@ -979,6 +996,146 @@ namespace
EXPECT_EQ(usedNavMeshTiles, 854);
}
TEST_F(DetourNavigatorNavigatorTest, find_path_should_return_path_around_steep_mountains)
{
const std::array<float, 5 * 5> heightfieldData{ {
0, 0, 0, 0, 0, // row 0
0, 0, 0, 0, 0, // row 1
0, 0, 1000, 0, 0, // row 2
0, 0, 1000, 0, 0, // row 3
0, 0, 0, 0, 0, // row 4
} };
const HeightfieldSurface surface = makeSquareHeightfieldSurface(heightfieldData);
const int cellSize = heightfieldTileSize * static_cast<int>(surface.mSize - 1);
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addHeightfield(mCellPosition, cellSize, surface, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
const osg::Vec3f start(56, 56, 12);
const osg::Vec3f end(464, 464, 12);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, start, end, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
ElementsAre( //
Vec3fEq(56.66664886474609375, 56.66664886474609375, 11.33333301544189453125),
Vec3fEq(396.666656494140625, 79.33331298828125, 11.33333301544189453125),
Vec3fEq(430.666656494140625, 113.33331298828125, 11.33333301544189453125),
Vec3fEq(463.999969482421875, 463.999969482421875, 11.33333301544189453125)))
<< mPath;
}
TEST_F(DetourNavigatorNavigatorTest, find_path_should_return_path_around_steep_cliffs)
{
const std::array<float, 5 * 5> heightfieldData{ {
0, 0, 0, 0, 0, // row 0
0, 0, 0, 0, 0, // row 1
0, 0, -1000, 0, 0, // row 2
0, 0, -1000, 0, 0, // row 3
0, 0, 0, 0, 0, // row 4
} };
const HeightfieldSurface surface = makeSquareHeightfieldSurface(heightfieldData);
const int cellSize = heightfieldTileSize * static_cast<int>(surface.mSize - 1);
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addHeightfield(mCellPosition, cellSize, surface, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
const osg::Vec3f start(56, 56, 12);
const osg::Vec3f end(464, 464, 12);
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, start, end, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
ElementsAre( //
Vec3fEq(56.66664886474609375, 56.66664886474609375, 8.66659259796142578125),
Vec3fEq(385.33331298828125, 79.33331298828125, 8.66659259796142578125),
Vec3fEq(430.666656494140625, 124.66664886474609375, 8.66659259796142578125),
Vec3fEq(463.999969482421875, 463.999969482421875, 8.66659259796142578125)))
<< mPath;
}
TEST_F(DetourNavigatorNavigatorTest, find_path_should_return_path_with_checkpoints)
{
const std::array<float, 5 * 5> heightfieldData{ {
0, 0, 0, 0, 0, // row 0
0, 0, 0, 0, 0, // row 1
0, 0, 1000, 0, 0, // row 2
0, 0, 1000, 0, 0, // row 3
0, 0, 0, 0, 0, // row 4
} };
const HeightfieldSurface surface = makeSquareHeightfieldSurface(heightfieldData);
const int cellSize = heightfieldTileSize * static_cast<int>(surface.mSize - 1);
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addHeightfield(mCellPosition, cellSize, surface, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
const std::vector<osg::Vec3f> checkpoints = {
osg::Vec3f(400, 70, 12),
};
const osg::Vec3f start(56, 56, 12);
const osg::Vec3f end(464, 464, 12);
EXPECT_EQ(
findPath(*mNavigator, mAgentBounds, start, end, Flag_walk, mAreaCosts, mEndTolerance, checkpoints, mOut),
Status::Success);
EXPECT_THAT(mPath,
ElementsAre( //
Vec3fEq(56.66664886474609375, 56.66664886474609375, 11.33333301544189453125),
Vec3fEq(400, 70, 11.33333301544189453125),
Vec3fEq(430.666656494140625, 113.33331298828125, 11.33333301544189453125),
Vec3fEq(463.999969482421875, 463.999969482421875, 11.33333301544189453125)))
<< mPath;
}
TEST_F(DetourNavigatorNavigatorTest, find_path_should_skip_unreachable_checkpoints)
{
const std::array<float, 5 * 5> heightfieldData{ {
0, 0, 0, 0, 0, // row 0
0, 0, 0, 0, 0, // row 1
0, 0, 1000, 0, 0, // row 2
0, 0, 1000, 0, 0, // row 3
0, 0, 0, 0, 0, // row 4
} };
const HeightfieldSurface surface = makeSquareHeightfieldSurface(heightfieldData);
const int cellSize = heightfieldTileSize * static_cast<int>(surface.mSize - 1);
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addHeightfield(mCellPosition, cellSize, surface, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
const std::vector<osg::Vec3f> checkpoints = {
osg::Vec3f(400, 70, 10000),
osg::Vec3f(256, 256, 1000),
osg::Vec3f(-1000, -1000, 0),
};
const osg::Vec3f start(56, 56, 12);
const osg::Vec3f end(464, 464, 12);
EXPECT_EQ(
findPath(*mNavigator, mAgentBounds, start, end, Flag_walk, mAreaCosts, mEndTolerance, checkpoints, mOut),
Status::Success);
EXPECT_THAT(mPath,
ElementsAre( //
Vec3fEq(56.66664886474609375, 56.66664886474609375, 11.33333301544189453125),
Vec3fEq(396.666656494140625, 79.33331298828125, 11.33333301544189453125),
Vec3fEq(430.666656494140625, 113.33331298828125, 11.33333301544189453125),
Vec3fEq(463.999969482421875, 463.999969482421875, 11.33333301544189453125)))
<< mPath;
}
struct DetourNavigatorNavigatorNotSupportedAgentBoundsTest : TestWithParam<AgentBounds>
{
};
@@ -1065,6 +1222,78 @@ namespace
std::nullopt);
}
TEST_F(DetourNavigatorNavigatorTest, should_not_post_jobs_for_tiles_outside_processing_range)
{
CollisionShapeInstance compound(std::make_unique<btCompoundShape>());
compound.shape().addChildShape(
btTransform(btMatrix3x3::getIdentity(), btVector3(0, 0, 0)), new btBoxShape(btVector3(20, 20, 100)));
const btTransform transform{ btMatrix3x3::getIdentity(), btVector3(100512, 256, 0) };
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addObject(
ObjectId(&compound.shape()), ObjectShapes(compound.instance(), mObjectTransform), transform, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(mNavigator->getStats().mUpdater.mPosted, 0);
}
TEST_F(DetourNavigatorNavigatorTest, should_add_jobs_for_tiles_when_they_get_in_range)
{
CollisionShapeInstance compound(std::make_unique<btCompoundShape>());
compound.shape().addChildShape(
btTransform(btMatrix3x3::getIdentity(), btVector3(0, 0, 0)), new btBoxShape(btVector3(20, 20, 100)));
const btTransform transform{ btMatrix3x3::getIdentity(), btVector3(100512, 256, 0) };
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
mNavigator->addObject(
ObjectId(&compound.shape()), ObjectShapes(compound.instance(), mObjectTransform), transform, nullptr);
mNavigator->update(mPlayerPosition, nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(mNavigator->getStats().mUpdater.mPosted, 0);
mNavigator->update(osg::Vec3f(100512, 256, 0), nullptr);
mNavigator->wait(WaitConditionType::allJobsDone, &mListener);
EXPECT_EQ(mNavigator->getStats().mUpdater.mPosted, 1);
}
TEST_F(DetourNavigatorNavigatorTest, should_handle_lifted_heightfield)
{
constexpr std::array<float, 5 * 5> heightfieldData{ {
1000, 1000, 1000, 1000, 1000, // row 0
1000, 1025, 1025, 1025, 1025, // row 1
1000, 1025, 1100, 1100, 1100, // row 2
1000, 1025, 1100, 1100, 1100, // row 3
1000, 1025, 1100, 1100, 1100, // row 4
} };
const HeightfieldSurface surface = makeSquareHeightfieldSurface(heightfieldData);
const int cellSize = heightfieldTileSize * static_cast<int>(surface.mSize - 1);
ASSERT_TRUE(mNavigator->addAgent(mAgentBounds));
auto updateGuard = mNavigator->makeUpdateGuard();
mNavigator->addHeightfield(mCellPosition, cellSize, surface, updateGuard.get());
mNavigator->update(mPlayerPosition, updateGuard.get());
updateGuard.reset();
mNavigator->wait(WaitConditionType::requiredTilesPresent, &mListener);
const osg::Vec3f start{ 52, 460, 1001 };
const osg::Vec3f end{ 460, 52, 1001 };
EXPECT_EQ(findPath(*mNavigator, mAgentBounds, start, end, Flag_walk, mAreaCosts, mEndTolerance, {}, mOut),
Status::Success);
EXPECT_THAT(mPath,
ElementsAre( //
Vec3fEq(56.66664886474609375, 460, 1019.870361328125),
Vec3fEq(460, 56.66664886474609375, 1019.870361328125)))
<< mPath;
}
struct DetourNavigatorUpdateTest : TestWithParam<std::function<void(Navigator&)>>
{
};
@@ -21,7 +21,7 @@ namespace
using namespace DetourNavigator::Tests;
template <class T, class Random>
void generateRecastArray(T*& values, int size, Random& random)
void generateRecastArray(T*& values, size_t size, Random& random)
{
values = static_cast<T*>(permRecastAlloc(size * sizeof(T)));
generateRange(values, values + static_cast<std::ptrdiff_t>(size), random);
@@ -503,4 +503,78 @@ namespace
ASSERT_EQ(manager.getCachedMesh(mWorldspace, tilePosition), nullptr);
}
TEST_F(DetourNavigatorTileCachedRecastMeshManagerTest, add_heightfield_plane_should_add_tiles)
{
TileCachedRecastMeshManager manager(mSettings);
manager.setWorldspace(mWorldspace, nullptr);
const osg::Vec2i cellPosition(1, 2);
const int cellSize = 32;
const HeightfieldPlane plane{
.mHeight = 1000,
};
manager.addHeightfield(cellPosition, cellSize, plane, nullptr);
EXPECT_THAT(manager.takeChangedTiles(nullptr),
ElementsAre( //
std::pair(TilePosition(-1, -1), ChangeType::add), //
std::pair(TilePosition(-1, 0), ChangeType::add), //
std::pair(TilePosition(0, -1), ChangeType::add), //
std::pair(TilePosition(0, 0), ChangeType::add) //
));
for (int x = -1; x < 1; ++x)
for (int y = -1; y < 1; ++y)
EXPECT_NE(manager.getMesh(mWorldspace, TilePosition(x, y)), nullptr) << x << " " << y;
}
TEST_F(DetourNavigatorTileCachedRecastMeshManagerTest, add_heightfield_surface_should_add_tiles)
{
TileCachedRecastMeshManager manager(mSettings);
manager.setWorldspace(mWorldspace, nullptr);
const osg::Vec2i cellPosition(1, 2);
const int cellSize = 32;
const std::array<float, 25> heights{ {
1000, 1100, 1200, 1300, 1400, // 0
1100, 1200, 1300, 1400, 1600, // 1
1200, 1300, 1400, 1500, 1500, // 2
1400, 1500, 1600, 1700, 1800, // 3
1600, 1700, 1800, 1900, 2000, // 4
} };
const HeightfieldSurface surface{
.mHeights = heights.data(),
.mSize = 5,
.mMinHeight = 1000,
.mMaxHeight = 2000,
};
manager.addHeightfield(cellPosition, cellSize, surface, nullptr);
EXPECT_THAT(manager.takeChangedTiles(nullptr),
ElementsAre( //
std::pair(TilePosition(-1, -1), ChangeType::add), //
std::pair(TilePosition(-1, 0), ChangeType::add), //
std::pair(TilePosition(0, -1), ChangeType::add), //
std::pair(TilePosition(0, 0), ChangeType::add) //
));
for (int x = -1; x < 1; ++x)
for (int y = -1; y < 1; ++y)
EXPECT_NE(manager.getMesh(mWorldspace, TilePosition(x, y)), nullptr) << x << " " << y;
}
TEST_F(DetourNavigatorTileCachedRecastMeshManagerTest, add_water_should_add_tiles)
{
TileCachedRecastMeshManager manager(mSettings);
manager.setWorldspace(mWorldspace, nullptr);
const osg::Vec2i cellPosition(1, 2);
const int cellSize = 32;
const float level = 1000;
manager.addWater(cellPosition, cellSize, level, nullptr);
EXPECT_THAT(manager.takeChangedTiles(nullptr),
ElementsAre( //
std::pair(TilePosition(-1, -1), ChangeType::add), //
std::pair(TilePosition(-1, 0), ChangeType::add), //
std::pair(TilePosition(0, -1), ChangeType::add), //
std::pair(TilePosition(0, 0), ChangeType::add) //
));
for (int x = -1; x < 1; ++x)
for (int y = -1; y < 1; ++y)
EXPECT_NE(manager.getMesh(mWorldspace, TilePosition(x, y)), nullptr) << x << " " << y;
}
}
@@ -74,19 +74,20 @@ namespace
TEST(EsmFixedString, empty_strings)
{
constexpr std::string_view someStr = "some string";
{
SCOPED_TRACE("4 bytes");
ESM::NAME empty = ESM::NAME();
EXPECT_TRUE(empty == "");
EXPECT_TRUE(empty == static_cast<uint32_t>(0));
EXPECT_TRUE(empty != "some string");
EXPECT_TRUE(empty != someStr);
EXPECT_TRUE(empty != static_cast<uint32_t>(42));
}
{
SCOPED_TRACE("32 bytes");
ESM::NAME32 empty = ESM::NAME32();
EXPECT_TRUE(empty == "");
EXPECT_TRUE(empty != "some string");
EXPECT_TRUE(empty != someStr);
}
}
+28 -1
View File
@@ -42,7 +42,7 @@ namespace
const Files::PathContainer mDataDirs{ { std::filesystem::path{ OPENMW_DATA_DIR } } };
const Files::Collections mFileCollections{ mDataDirs };
const std::string mContentFile = "template.omwgame";
const std::filesystem::path mContentFilePath = mFileCollections.getCollection(".omwgame").getPath(mContentFile);
const std::filesystem::path mContentFilePath = mFileCollections.getCollection("omwgame").getPath(mContentFile);
};
TEST_F(ESM3ReadersCacheWithContentFile, shouldKeepOpenReleasedOpenReader)
@@ -88,4 +88,31 @@ namespace
EXPECT_EQ(reader->getFileOffset(), sInitialOffset);
}
}
TEST_F(ESM3ReadersCacheWithContentFile, CachedSizeAndName)
{
ESM::ReadersCache readers(2);
{
readers.get(0)->openRaw(std::make_unique<std::istringstream>("123"), "closed0.omwaddon");
readers.get(1)->openRaw(std::make_unique<std::istringstream>("12345"), "closed1.omwaddon");
readers.get(2)->openRaw(std::make_unique<std::istringstream>("1234567"), "free.omwaddon");
}
auto busy = readers.get(3);
busy->openRaw(std::make_unique<std::istringstream>("123456789"), "busy.omwaddon");
EXPECT_EQ(readers.getFileSize(0), 3);
EXPECT_EQ(readers.getName(0), "closed0.omwaddon");
EXPECT_EQ(readers.getFileSize(1), 5);
EXPECT_EQ(readers.getName(1), "closed1.omwaddon");
EXPECT_EQ(readers.getFileSize(2), 7);
EXPECT_EQ(readers.getName(2), "free.omwaddon");
EXPECT_EQ(readers.getFileSize(3), 9);
EXPECT_EQ(readers.getName(3), "busy.omwaddon");
// not-yet-seen indices give zero for their size
EXPECT_EQ(readers.getFileSize(4), 0);
}
}
+10 -6
View File
@@ -8,6 +8,7 @@
#include <components/esm3/loaddial.hpp>
#include <components/esm3/loadinfo.hpp>
#include <components/esm3/loadland.hpp>
#include <components/esm3/loadmgef.hpp>
#include <components/esm3/loadregn.hpp>
#include <components/esm3/loadscpt.hpp>
#include <components/esm3/loadweap.hpp>
@@ -524,7 +525,7 @@ namespace ESM
record.mData.mY = 2;
record.mData.mZ = 3;
record.mData.mDuration = 4;
record.mTargetActorId = 5;
record.mTargetActor = RefNum{ .mIndex = 5, .mContentFile = -1 };
record.mTargetId = generateRandomRefId(32);
record.mCellId = generateRandomString(257);
record.mRemainingDuration = 6;
@@ -540,7 +541,10 @@ namespace ESM
EXPECT_EQ(result.mData.mDuration, record.mRemainingDuration);
else
EXPECT_EQ(result.mData.mDuration, record.mData.mDuration);
EXPECT_EQ(result.mTargetActorId, record.mTargetActorId);
if (GetParam() > MaxActorIdSaveGameFormatVersion)
{
EXPECT_EQ(result.mTargetActor, record.mTargetActor);
}
EXPECT_EQ(result.mTargetId, record.mTargetId);
EXPECT_EQ(result.mCellId, record.mCellId);
EXPECT_EQ(result.mRemainingDuration, record.mRemainingDuration);
@@ -571,9 +575,9 @@ namespace ESM
{
EffectList record;
record.mList.emplace_back(IndexedENAMstruct{ {
.mEffectID = 1,
.mSkill = 2,
.mAttribute = 3,
.mEffectID = ESM::MagicEffect::SwiftSwim,
.mSkill = ESM::Skill::MediumArmor,
.mAttribute = ESM::Attribute::Agility,
.mRange = 4,
.mArea = 5,
.mDuration = 6,
@@ -723,7 +727,7 @@ namespace ESM
TEST_P(Esm3SaveLoadRecordTest, landShouldNotChange)
{
LandRecordData data;
std::iota(data.mHeights.begin(), data.mHeights.end(), 1);
std::iota(data.mHeights.begin(), data.mHeights.end(), 1.0f);
std::for_each(data.mHeights.begin(), data.mHeights.end(), [](float& v) { v *= Land::sHeightScale; });
data.mMinHeight = *std::min_element(data.mHeights.begin(), data.mHeights.end());
data.mMaxHeight = *std::max_element(data.mHeights.begin(), data.mHeights.end());
+1 -1
View File
@@ -10,7 +10,7 @@
#include <components/esmloader/load.hpp>
#include <components/files/collections.hpp>
#include <components/files/multidircollection.hpp>
#include <components/to_utf8/to_utf8.hpp>
#include <components/toutf8/toutf8.hpp>
#include <gtest/gtest.h>
+2 -2
View File
@@ -30,7 +30,7 @@ namespace
TEST(FilesGetHash, shouldClearErrors)
{
const auto fileName = temporaryFilePath("fileName");
const auto fileName = outputFilePath("fileName");
std::string content;
std::fill_n(std::back_inserter(content), 1, 'a');
std::istringstream stream(content);
@@ -41,7 +41,7 @@ namespace
TEST_P(FilesGetHash, shouldReturnHashForStringStream)
{
const auto fileName = temporaryFilePath("fileName");
const auto fileName = outputFilePath("fileName");
std::string content;
std::fill_n(std::back_inserter(content), GetParam().mSize, 'a');
std::istringstream stream(content);
+12 -1
View File
@@ -5,7 +5,7 @@
namespace
{
using namespace testing;
using namespace fx::Lexer;
using namespace Fx::Lexer;
struct LexerTest : Test
{
@@ -135,6 +135,17 @@ namespace
EXPECT_EQ(std::get<Integer>(token).value, 123);
}
TEST(LexerTest, float_suffix_should_be_float)
{
Lexer lexer(R"(
123f
)");
auto token = lexer.next();
EXPECT_TRUE(std::holds_alternative<Float>(token));
EXPECT_FLOAT_EQ(std::get<Float>(token).value, 123.f);
}
TEST(LexerTest, simple_string)
{
Lexer lexer(R"(
+82 -14
View File
@@ -90,8 +90,58 @@ namespace
technique { passes = main; }
)" };
constexpr VFS::Path::NormalizedView invalidNumberInfPath("shaders/invalid_number_inf.omwfx");
TestingOpenMW::VFSTestFile invalidNumberInf{ R"(
uniform_vec4 uVec4 {
step = inf;
}
fragment main { }
technique { passes = main; }
)" };
constexpr VFS::Path::NormalizedView invalidNumberNegativeInfPath("shaders/invalid_number_negative_inf.omwfx");
TestingOpenMW::VFSTestFile invalidNumberNegativeInf{ R"(
uniform_vec4 uVec4 {
step = -inf;
}
fragment main { }
technique { passes = main; }
)" };
constexpr VFS::Path::NormalizedView invalidNumberUnsignedLongPath("shaders/invalid_number_ulong.omwfx");
TestingOpenMW::VFSTestFile invalidNumberUnsignedLong{ R"(
uniform_vec4 uVec4 {
step = 18446744073709551615;
}
fragment main { }
technique { passes = main; }
)" };
constexpr VFS::Path::NormalizedView invalidNumberHexFloatPath("shaders/invalid_number_hex.omwfx");
TestingOpenMW::VFSTestFile invalidNumberHexFloat{ R"(
uniform_vec4 uVec4 {
step = 0x1.fffffep+12;
}
fragment main { }
technique { passes = main; }
)" };
constexpr VFS::Path::NormalizedView invalidNumberDoublePath("shaders/invalid_number_double.omwfx");
TestingOpenMW::VFSTestFile invalidNumberDouble{ R"(
uniform_vec4 uVec4 {
step = 1.79769e+50;
}
fragment main { }
technique { passes = main; }
)" };
using namespace testing;
using namespace fx;
using namespace Fx;
struct TechniqueTest : Test
{
@@ -106,6 +156,11 @@ namespace
{ uniformPropertiesPath, &uniformProperties },
{ missingSamplerSourcePath, &missingSamplerSource },
{ repeatedSharedBlockPath, &repeatedSharedBlock },
{ invalidNumberInfPath, &invalidNumberInf },
{ invalidNumberNegativeInfPath, &invalidNumberNegativeInf },
{ invalidNumberUnsignedLongPath, &invalidNumberUnsignedLong },
{ invalidNumberHexFloatPath, &invalidNumberHexFloat },
{ invalidNumberDoublePath, &invalidNumberDouble },
}))
, mImageManager(mVFS.get(), 0)
{
@@ -113,9 +168,21 @@ namespace
void compile(const std::string& name)
{
mTechnique = std::make_unique<Technique>(*mVFS.get(), mImageManager, name, 1, 1, true, true);
mTechnique = std::make_unique<Technique>(
*mVFS.get(), mImageManager, Technique::makeFileName(name), name, 1, 1, true, true);
mTechnique->compile();
}
void expectFailure(const std::string& name, std::string_view errorString)
{
internal::CaptureStdout();
compile(name);
std::string output = internal::GetCapturedStdout();
Log(Debug::Error) << output;
EXPECT_THAT(output, HasSubstr(errorString));
}
};
TEST_F(TechniqueTest, technique_properties)
@@ -182,23 +249,24 @@ namespace
TEST_F(TechniqueTest, fail_with_missing_source_for_sampler)
{
internal::CaptureStdout();
compile("missing_sampler_source");
std::string output = internal::GetCapturedStdout();
Log(Debug::Error) << output;
EXPECT_THAT(output, HasSubstr("sampler_1d 'mysampler1d' requires a filename"));
expectFailure("missing_sampler_source", "sampler_1d 'mysampler1d' requires a filename");
}
TEST_F(TechniqueTest, fail_with_repeated_shared_block)
{
internal::CaptureStdout();
expectFailure("repeated_shared_block", "repeated 'shared' block");
}
compile("repeated_shared_block");
TEST_F(TechniqueTest, fail_with_invalid_float)
{
expectFailure("invalid_number_inf", "expected float value");
expectFailure("invalid_number_negative_inf", "expected float value");
expectFailure("invalid_number_hex", "expected float value");
}
std::string output = internal::GetCapturedStdout();
Log(Debug::Error) << output;
EXPECT_THAT(output, HasSubstr("repeated 'shared' block"));
TEST_F(TechniqueTest, fail_with_out_of_range)
{
expectFailure("invalid_number_ulong", "number out of range");
expectFailure("invalid_number_double", "number out of range");
}
}
@@ -1,146 +0,0 @@
#include <gtest/gtest.h>
#include <sol/sol.hpp>
#include <components/lua/luastate.hpp>
#include <components/lua_ui/content.hpp>
namespace
{
using namespace testing;
struct LuaUiContentTest : Test
{
LuaUtil::LuaState mLuaState{ nullptr, nullptr };
sol::protected_function mNew;
LuaUiContentTest()
{
mLuaState.addInternalLibSearchPath(
std::filesystem::path{ OPENMW_PROJECT_SOURCE_DIR } / "components" / "lua_ui");
mNew = LuaUi::loadContentConstructor(&mLuaState);
}
LuaUi::ContentView makeContent(sol::table source)
{
auto result = mNew.call(source);
if (result.get_type() != sol::type::table)
throw std::logic_error("Expected table");
return LuaUi::ContentView(result.get<sol::table>());
}
sol::table makeTable() { return sol::table(mLuaState.unsafeState(), sol::create); }
sol::table makeTable(std::string name)
{
auto result = makeTable();
result["name"] = name;
return result;
}
};
TEST_F(LuaUiContentTest, ProtectedMetatable)
{
sol::state_view sol = mLuaState.unsafeState();
sol["makeContent"] = mNew;
sol["M"] = makeContent(makeTable()).getMetatable();
std::string testScript = R"(
assert(not pcall(function() setmetatable(makeContent{}, {}) end), 'Metatable is not protected')
assert(getmetatable(makeContent{}) == false, 'Metatable is not protected')
)";
EXPECT_NO_THROW(sol.safe_script(testScript));
}
TEST_F(LuaUiContentTest, Create)
{
auto table = makeTable();
table.add(makeTable());
table.add(makeTable());
table.add(makeTable());
LuaUi::ContentView content = makeContent(table);
EXPECT_EQ(content.size(), 3);
}
TEST_F(LuaUiContentTest, Insert)
{
auto table = makeTable();
table.add(makeTable());
table.add(makeTable());
table.add(makeTable());
LuaUi::ContentView content = makeContent(table);
content.insert(2, makeTable("inserted"));
EXPECT_EQ(content.size(), 4);
auto inserted = content.at("inserted");
auto index = content.indexOf(inserted);
EXPECT_TRUE(index.has_value());
EXPECT_EQ(index.value(), 2);
}
TEST_F(LuaUiContentTest, MakeHole)
{
auto table = makeTable();
table.add(makeTable());
table.add(makeTable());
LuaUi::ContentView content = makeContent(table);
sol::table t = makeTable();
EXPECT_ANY_THROW(content.assign(3, t));
}
TEST_F(LuaUiContentTest, WrongType)
{
auto table = makeTable();
table.add(makeTable());
table.add("a");
table.add(makeTable());
EXPECT_ANY_THROW(makeContent(table));
}
TEST_F(LuaUiContentTest, NameAccess)
{
auto table = makeTable();
table.add(makeTable());
table.add(makeTable("a"));
LuaUi::ContentView content = makeContent(table);
EXPECT_NO_THROW(content.at("a"));
content.remove("a");
EXPECT_EQ(content.size(), 1);
content.assign(content.size(), makeTable("b"));
content.assign("b", makeTable());
EXPECT_ANY_THROW(content.at("b"));
EXPECT_EQ(content.size(), 2);
content.assign(content.size(), makeTable("c"));
content.assign(content.size(), makeTable("c"));
content.remove("c");
EXPECT_ANY_THROW(content.at("c"));
}
TEST_F(LuaUiContentTest, IndexOf)
{
auto table = makeTable();
table.add(makeTable());
table.add(makeTable());
table.add(makeTable());
LuaUi::ContentView content = makeContent(table);
auto child = makeTable();
content.assign(2, child);
EXPECT_EQ(content.indexOf(child).value(), 2);
EXPECT_TRUE(!content.indexOf(makeTable()).has_value());
}
TEST_F(LuaUiContentTest, BoundsChecks)
{
auto table = makeTable();
LuaUi::ContentView content = makeContent(table);
EXPECT_ANY_THROW(content.at(0));
EXPECT_EQ(content.size(), 0);
content.assign(content.size(), makeTable());
EXPECT_EQ(content.size(), 1);
content.assign(content.size(), makeTable());
EXPECT_EQ(content.size(), 2);
content.assign(content.size(), makeTable());
EXPECT_EQ(content.size(), 3);
EXPECT_ANY_THROW(content.at(3));
EXPECT_ANY_THROW(content.remove(3));
content.remove(2);
EXPECT_EQ(content.size(), 2);
EXPECT_ANY_THROW(content.at(2));
}
}
@@ -48,7 +48,7 @@ namespace
EXPECT_EQ(LuaUtil::scriptCfgToString(cfg.mScripts[5]), "CUSTOM CREATURE : my_mod/creature.lua");
LuaUtil::ScriptsConfiguration conf;
conf.init(std::move(cfg));
conf.init(std::move(cfg), false);
ASSERT_EQ(conf.size(), 4);
EXPECT_EQ(LuaUtil::scriptCfgToString(conf[0]), "GLOBAL : my_mod/#some_global_script.lua");
// cfg.mScripts[1] is overridden by cfg.mScripts[4]
@@ -68,7 +68,7 @@ namespace
// Check that initialization cleans old data
cfg = ESM::LuaScriptsCfg();
conf.init(std::move(cfg));
conf.init(std::move(cfg), false);
EXPECT_EQ(conf.size(), 0);
}
@@ -82,7 +82,7 @@ namespace
cfg.mScripts.clear();
EXPECT_NO_THROW(LuaUtil::parseOMWScripts(cfg, "GLOBAL, PLAYER: something.lua"));
LuaUtil::ScriptsConfiguration conf;
EXPECT_ERROR(conf.init(std::move(cfg)), "Global script can not have local flags");
EXPECT_ERROR(conf.init(std::move(cfg), false), "Global script can not have local flags");
}
TEST(LuaConfigurationTest, ConfInit)
@@ -112,7 +112,7 @@ namespace
script1Extra.mRefs.push_back({ false, 2, 3, "" });
LuaUtil::ScriptsConfiguration conf;
conf.init(cfg);
conf.init(cfg, false);
ASSERT_EQ(conf.size(), 2);
EXPECT_EQ(LuaUtil::scriptCfgToString(conf[0]),
"CUSTOM PLAYER CREATURE NPC : script1.lua ; data 5 bytes ; 3 records ; 4 objects");
@@ -141,7 +141,7 @@ namespace
ESM::LuaScriptCfg& script3 = cfg.mScripts.emplace_back();
script3.mScriptPath = VFS::Path::Normalized("script1.lua");
script3.mFlags = ESM::LuaScriptCfg::sGlobal;
EXPECT_ERROR(conf.init(cfg), "Flags mismatch for script1.lua");
EXPECT_ERROR(conf.init(cfg, false), "Flags mismatch for script1.lua");
}
TEST(LuaConfigurationTest, Serialization)
@@ -38,10 +38,10 @@ namespace
sol::state lua;
LuaUtil::InputAction::Registry registry;
LuaUtil::InputAction::Info a({ "a", LuaUtil::InputAction::Type::Boolean, "test", "a_name", "a_description",
sol::make_object(lua, false) });
sol::make_object(lua, false), false });
registry.insert(a);
LuaUtil::InputAction::Info b({ "b", LuaUtil::InputAction::Type::Boolean, "test", "b_name", "b_description",
sol::make_object(lua, false) });
sol::make_object(lua, false), false });
registry.insert(b);
LuaUtil::Callback bindA({ lua.load("return function() return true end")(), sol::table(lua, sol::create) });
LuaUtil::Callback bindBToA(
@@ -24,6 +24,10 @@ namespace
constexpr VFS::Path::NormalizedView test2EnPath("l10n/test2/en.yaml");
constexpr VFS::Path::NormalizedView test3EnPath("l10n/test3/en.yaml");
constexpr VFS::Path::NormalizedView test3DePath("l10n/test3/de.yaml");
constexpr VFS::Path::NormalizedView test4RuPath("l10n/test4/ru.yaml");
constexpr VFS::Path::NormalizedView test4EnPath("l10n/test4/en.yaml");
constexpr VFS::Path::NormalizedView test5GmstPath("l10n/test5/gmst.yaml");
constexpr VFS::Path::NormalizedView test5EnPath("l10n/test5/en.yaml");
VFSTestFile invalidScript("not a script");
VFSTestFile incorrectScript(
@@ -71,6 +75,41 @@ good_morning: "Morning!"
you_have_arrows: "Arrows count: {count}"
)X");
VFSTestFile test4Ru(R"X(
skill_increase: "Ваш навык {навык} увеличился до {value}"
acrobatics: "Акробатика"
)X");
VFSTestFile test4En(R"X(
stat_increase: "Your {stat} has increased to {value}"
speed: "Speed"
)X");
VFSTestFile test5(R"X(
string: "sSimpleString"
format_string: "sFormatString"
inject_string: "sStringInjection"
not_found: "sNoSuchString"
no_gmst:
pattern: "Hello world"
interpreted_string:
pattern: "{gmst:sFormatString} {sSimpleString} {gmst:sFormatString}"
variables:
- ["a", "b"]
- ["b", "a"]
plural_string:
pattern: |-
{count, plural,
one{{gmst:sSimpleString}}
other{{gmst:sFormatString}}
}
variables:
- []
- ["count", "count"]
unnamed_string:
pattern: "{gmst:sFormatString}"
)X");
struct LuaL10nTest : Test
{
std::unique_ptr<VFS::Manager> mVFS = createTestVFS({
@@ -80,6 +119,10 @@ you_have_arrows: "Arrows count: {count}"
{ test2EnPath, &test2En },
{ test3EnPath, &test1En },
{ test3DePath, &test1De },
{ test4RuPath, &test4Ru },
{ test4EnPath, &test4En },
{ test5GmstPath, &test5 },
{ test5EnPath, &test5 },
});
LuaUtil::ScriptsConfiguration mCfg;
@@ -91,7 +134,7 @@ you_have_arrows: "Arrows count: {count}"
lua.protectedCall([&](LuaUtil::LuaView& view) {
sol::state_view& l = view.sol();
internal::CaptureStdout();
l10n::Manager l10nManager(mVFS.get());
L10n::Manager l10nManager(mVFS.get());
l10nManager.setPreferredLocales({ "de", "en" });
EXPECT_THAT(internal::GetCapturedStdout(), "Preferred locales: gmst de en\n");
@@ -169,6 +212,66 @@ you_have_arrows: "Arrows count: {count}"
l.safe_script("t3 = l10n('Test3', 'de')");
l10nManager.setPreferredLocales({ "en" });
EXPECT_EQ(get<std::string>(l, "t3('Hello {name}!', {name='World'})"), "Hallo World!");
// Test that formatting arguments use a correct encoding
l.safe_script("t4 = l10n('Test4', 'ru')");
l10nManager.setPreferredLocales({ "ru", "en" });
EXPECT_EQ(get<std::string>(l, "t4('skill_increase', {навык='Акробатика', value=100})"),
"Ваш навык Акробатика увеличился до 100");
EXPECT_EQ(get<std::string>(l, "t4('skill_increase', {навык=t4('acrobatics'), value=100})"),
"Ваш навык Акробатика увеличился до 100");
EXPECT_EQ(get<std::string>(l, "t4('stat_increase', {stat='Speed', value=100})"),
"Your Speed has increased to 100");
EXPECT_EQ(get<std::string>(l, "t4('stat_increase', {stat=t4('speed'), value=100})"),
"Your Speed has increased to 100");
});
}
TEST_F(LuaL10nTest, L10nGMST)
{
LuaUtil::LuaState lua{ mVFS.get(), &mCfg };
lua.protectedCall([&](LuaUtil::LuaView& view) {
sol::state_view& l = view.sol();
L10n::Manager l10nManager(mVFS.get());
const std::map<std::string_view, std::string, Misc::StringUtils::CiComp> gmsts{
{ "sSimpleString", "Hello it's the world" },
{ "sFormatString", "You have %i %s" },
{ "sStringInjection", "{a}" },
};
l10nManager.setGmstLoader([&](std::string_view gmst) -> const std::string* {
auto it = gmsts.find(gmst);
if (it != gmsts.end())
return &it->second;
return nullptr;
});
internal::CaptureStdout();
l10nManager.setPreferredLocales({ "en" });
EXPECT_THAT(internal::GetCapturedStdout(), "Preferred locales: gmst en\n");
l["l10n"] = LuaUtil::initL10nLoader(l, &l10nManager);
l.safe_script("t5 = l10n('Test5')");
EXPECT_EQ(get<std::string>(l, "t5('string')"), "Hello it's the world");
EXPECT_EQ(get<std::string>(l, "t5('format_string')"), "You have %i %s");
EXPECT_EQ(get<std::string>(l, "t5('format_string', { i = 1, s = 'a' })"), "You have %i %s");
EXPECT_EQ(
get<std::string>(l, "t5('interpreted_string')"), "You have {a} {b} {sSimpleString} You have {b} {a}");
EXPECT_EQ(get<std::string>(l, "t5('interpreted_string', { a = 1, b = 2, sSimpleString = 3 })"),
"You have 1 2 3 You have 2 1");
EXPECT_EQ(get<std::string>(l, "t5('inject_string')"), "{a}");
EXPECT_EQ(get<std::string>(l, "t5('inject_string', { a = 1 })"), "{a}");
EXPECT_EQ(get<std::string>(l, "t5('plural_string', { count = 1 })"), "Hello it's the world");
EXPECT_EQ(get<std::string>(l, "t5('plural_string', { count = 2 })"), "You have 2 2");
EXPECT_EQ(get<std::string>(l, "t5('unnamed_string')"), "You have {0} {1}");
EXPECT_EQ(get<std::string>(l, "t5('unnamed_string', { ['0'] = 'a', ['1'] = 'b' })"), "You have a b");
EXPECT_EQ(get<std::string>(l, "t5('no_gmst')"), "Hello world");
EXPECT_EQ(get<std::string>(l, "t5('not_found')"), "GMST:sNoSuchString");
l10nManager.setPreferredLocales({ "en" }, false);
EXPECT_EQ(get<std::string>(l, "t5('string')"), "sSimpleString");
EXPECT_EQ(get<std::string>(l, "t5('format_string')"), "sFormatString");
EXPECT_EQ(get<std::string>(l, "t5('not_found')"), "sNoSuchString");
});
}
}
@@ -258,7 +258,7 @@ return {
TEST_F(LuaStateTest, SafeIndexMetamethod)
{
const VFS::Path::Normalized path("metaIndexError.lua");
sol::table t = mLua.runInNewSandbox(path);
sol::lua_table t = mLua.runInNewSandbox(path);
// without safe get we crash here
EXPECT_ERROR(LuaUtil::safeGet(t, "any key"), "meta index error");
}
@@ -225,7 +225,7 @@ CUSTOM, PLAYER: useInterface.lua
CUSTOM: unload.lua
CUSTOM: customdata.lua
)X");
mCfg.init(std::move(cfg));
mCfg.init(std::move(cfg), false);
}
int getId(VFS::Path::NormalizedView path) const
@@ -285,17 +285,17 @@ CUSTOM: customdata.lua
EXPECT_TRUE(scripts.addCustomScript(getId(test2Path)));
sol::state_view sol = mLua.unsafeState();
std::string X0 = LuaUtil::serialize(sol.create_table_with("x", 0.5));
std::string X1 = LuaUtil::serialize(sol.create_table_with("x", 1.5));
std::string x0 = LuaUtil::serialize(sol.create_table_with("x", 0.5));
std::string x1 = LuaUtil::serialize(sol.create_table_with("x", 1.5));
{
testing::internal::CaptureStdout();
scripts.receiveEvent("SomeEvent", X1);
scripts.receiveEvent("SomeEvent", x1);
EXPECT_EQ(internal::GetCapturedStdout(), "");
}
{
testing::internal::CaptureStdout();
scripts.receiveEvent("Event1", X1);
scripts.receiveEvent("Event1", x1);
EXPECT_EQ(internal::GetCapturedStdout(),
"Test[test2.lua]:\t event1 1.5\n"
"Test[stopevent.lua]:\t event1 1.5\n"
@@ -303,21 +303,21 @@ CUSTOM: customdata.lua
}
{
testing::internal::CaptureStdout();
scripts.receiveEvent("Event2", X1);
scripts.receiveEvent("Event2", x1);
EXPECT_EQ(internal::GetCapturedStdout(),
"Test[test2.lua]:\t event2 1.5\n"
"Test[test1.lua]:\t event2 1.5\n");
}
{
testing::internal::CaptureStdout();
scripts.receiveEvent("Event1", X0);
scripts.receiveEvent("Event1", x0);
EXPECT_EQ(internal::GetCapturedStdout(),
"Test[test2.lua]:\t event1 0.5\n"
"Test[stopevent.lua]:\t event1 0.5\n");
}
{
testing::internal::CaptureStdout();
scripts.receiveEvent("Event2", X0);
scripts.receiveEvent("Event2", x0);
EXPECT_EQ(internal::GetCapturedStdout(),
"Test[test2.lua]:\t event2 0.5\n"
"Test[test1.lua]:\t event2 0.5\n");
@@ -333,12 +333,12 @@ CUSTOM: customdata.lua
EXPECT_TRUE(scripts.addCustomScript(getId(test2Path)));
sol::state_view sol = mLua.unsafeState();
std::string X = LuaUtil::serialize(sol.create_table_with("x", 0.5));
std::string x = LuaUtil::serialize(sol.create_table_with("x", 0.5));
{
testing::internal::CaptureStdout();
scripts.update(1.5f);
scripts.receiveEvent("Event1", X);
scripts.receiveEvent("Event1", x);
EXPECT_EQ(internal::GetCapturedStdout(),
"Test[test1.lua]:\t update 1.5\n"
"Test[test2.lua]:\t update 1.5\n"
@@ -352,7 +352,7 @@ CUSTOM: customdata.lua
scripts.removeScript(stopEventScriptId);
EXPECT_FALSE(scripts.hasScript(stopEventScriptId));
scripts.update(1.5f);
scripts.receiveEvent("Event1", X);
scripts.receiveEvent("Event1", x);
EXPECT_EQ(internal::GetCapturedStdout(),
"Test[test1.lua]:\t update 1.5\n"
"Test[test2.lua]:\t update 1.5\n"
@@ -363,7 +363,7 @@ CUSTOM: customdata.lua
testing::internal::CaptureStdout();
scripts.removeScript(getId(test1Path));
scripts.update(1.5f);
scripts.receiveEvent("Event1", X);
scripts.receiveEvent("Event1", x);
EXPECT_EQ(internal::GetCapturedStdout(),
"Test[test2.lua]:\t update 1.5\n"
"Test[test2.lua]:\t event1 0.5\n");
@@ -638,8 +638,9 @@ CUSTOM: customdata.lua
sol::object deserialized = LuaUtil::deserialize(lua.sol(), data2.mScripts[0].mData, &serializer1);
EXPECT_TRUE(deserialized.is<sol::table>());
sol::table table = deserialized;
for (const auto& [key, value] : table)
if (!table.empty())
{
const auto [key, value] = *table.cbegin();
EXPECT_TRUE(key.is<ESM::RefNum>());
EXPECT_TRUE(value.is<ESM::RefNum>());
EXPECT_EQ(key.as<ESM::RefNum>(), (ESM::RefNum{ 42, 34 }));
@@ -649,4 +650,33 @@ CUSTOM: customdata.lua
EXPECT_FALSE(true);
});
}
TEST_F(LuaScriptsContainerTest, ScriptOrderChange)
{
LuaUtil::ScriptsContainer scripts1(&mLua, "Test");
scripts1.setAutoStartConf(mCfg.getLocalConf(ESM::REC_NPC_, ESM::RefId(), ESM::RefNum()));
scripts1.addAutoStartedScripts();
const int scriptId = getId(test1Path);
EXPECT_TRUE(scripts1.addCustomScript(scriptId));
ESM::LuaScripts data;
scripts1.save(data);
ESM::LuaScriptsCfg cfg;
LuaUtil::parseOMWScripts(cfg, R"X(
CUSTOM, NPC: loadSave2.lua
NPC: loadSave1.lua
CUSTOM: test1.lua
)X");
mCfg.init(std::move(cfg), true);
LuaUtil::ScriptsContainer scripts2(&mLua, "Test");
scripts2.setAutoStartConf(mCfg.getLocalConf(ESM::REC_NPC_, ESM::RefId(), ESM::RefNum()));
scripts2.load(data);
const int newScriptId = getId(test1Path);
EXPECT_NE(scriptId, newScriptId);
EXPECT_EQ(newScriptId, 2);
EXPECT_TRUE(scripts2.hasScript(newScriptId));
}
}
@@ -171,10 +171,10 @@ namespace
std::string serialized = LuaUtil::serialize(table);
EXPECT_EQ(serialized.size(), 139);
sol::table res_table = LuaUtil::deserialize(lua, serialized);
sol::table res_readonly_table = LuaUtil::deserialize(lua, serialized, nullptr, true);
sol::table resTable = LuaUtil::deserialize(lua, serialized);
sol::table resReadonlyTable = LuaUtil::deserialize(lua, serialized, nullptr, true);
for (auto t : { res_table, res_readonly_table })
for (auto t : { resTable, resReadonlyTable })
{
EXPECT_EQ(t.get<int>("aa"), 1);
EXPECT_EQ(t.get<bool>("ab"), true);
@@ -185,8 +185,8 @@ namespace
EXPECT_EQ(t.get<osg::Vec2f>(2), osg::Vec2f(2, 1));
}
lua["t"] = res_table;
lua["ro_t"] = res_readonly_table;
lua["t"] = resTable;
lua["ro_t"] = resReadonlyTable;
EXPECT_NO_THROW(lua.safe_script("t.x = 5"));
EXPECT_NO_THROW(lua.safe_script("t.nested.x = 5"));
EXPECT_ERROR(lua.safe_script("ro_t.x = 5"), "userdata value");
+145
View File
@@ -0,0 +1,145 @@
#include <gtest/gtest.h>
#include <sol/sol.hpp>
#include <components/lua/luastate.hpp>
#include <components/lua_ui/content.hpp>
namespace
{
using namespace testing;
struct LuaUiContentTest : Test
{
LuaUtil::LuaState mLuaState{ nullptr, nullptr };
sol::protected_function mNew;
LuaUiContentTest()
{
mLuaState.addInternalLibSearchPath(
std::filesystem::path{ OPENMW_PROJECT_SOURCE_DIR } / "components" / "lua_ui");
mNew = LuaUi::loadContentConstructor(&mLuaState);
}
LuaUi::ContentView makeContent(sol::table source)
{
auto result = mNew.call(source);
if (result.get_type() != sol::type::table)
throw std::logic_error("Expected table");
return LuaUi::ContentView(result.get<sol::table>());
}
sol::table makeTable() { return sol::table(mLuaState.unsafeState(), sol::create); }
};
TEST_F(LuaUiContentTest, ProtectedMetatable)
{
sol::state_view sol = mLuaState.unsafeState();
sol["makeContent"] = mNew;
std::string testScript = R"(
assert(not pcall(function() setmetatable(makeContent{}, {}) end), 'Metatable is not protected')
assert(getmetatable(makeContent{}) == false, 'Metatable is not protected')
)";
EXPECT_NO_THROW(sol.safe_script(testScript));
}
TEST_F(LuaUiContentTest, Insert)
{
mLuaState.protectedCall([&](LuaUtil::LuaView& state) {
sol::state_view& sol = state.sol();
sol["makeContent"] = mNew;
EXPECT_NO_THROW(sol.safe_script(R"(
local content = makeContent({ {}, {}, {} })
content:insert(2, { name = 'inserted' })
assert(#content == 4, 'Not inserted')
local inserted = content:indexOf('inserted')
local index = content:indexOf(content[inserted])
assert(index ~= nil, 'Failed to find inserted')
assert(index == 2, 'Inserted at the wrong index')
)"));
});
}
TEST_F(LuaUiContentTest, MakeHole)
{
mLuaState.protectedCall([&](LuaUtil::LuaView& state) {
sol::state_view& sol = state.sol();
sol["makeContent"] = mNew;
EXPECT_NO_THROW(sol.safe_script(R"(
local content = makeContent({ {}, {} })
assert(not pcall(function() content[4] = {} end), 'Allowed to make hole')
)"));
});
}
TEST_F(LuaUiContentTest, Create)
{
auto table = makeTable();
table.add(makeTable());
table.add(makeTable());
table.add(makeTable());
LuaUi::ContentView content = makeContent(table);
EXPECT_EQ(content.size(), 3);
}
TEST_F(LuaUiContentTest, WrongType)
{
auto table = makeTable();
table.add(makeTable());
table.add("a");
table.add(makeTable());
EXPECT_ANY_THROW(makeContent(table));
}
TEST_F(LuaUiContentTest, NameAccess)
{
mLuaState.protectedCall([&](LuaUtil::LuaView& state) {
sol::state_view& sol = state.sol();
sol["makeContent"] = mNew;
EXPECT_NO_THROW(sol.safe_script(R"(
local content = makeContent({ {}, { name = 'a' } })
assert(content:indexOf('a') ~= nil, 'Could not find named table')
content['a'] = nil
assert(#content == 1, 'Failed to remove')
content:add({ name = 'b' })
content['b'] = {}
assert(#content == 2, 'Failed to insert')
content:add({ name = 'c' })
content:add({ name = 'c' })
content['c'] = nil
assert(content:indexOf('c') == nil, 'Failed to remove value inserted twice'..#content)
)"));
});
}
TEST_F(LuaUiContentTest, IndexOf)
{
mLuaState.protectedCall([&](LuaUtil::LuaView& state) {
sol::state_view& sol = state.sol();
sol["makeContent"] = mNew;
EXPECT_NO_THROW(sol.safe_script(R"(
local content = makeContent({ {}, {}, {} })
local child = {}
content[3] = child
assert(content:indexOf(child) == 3, 'Failed to assign')
assert(content:indexOf({}) == nil, 'Found non-existent child')
)"));
});
}
TEST_F(LuaUiContentTest, BoundsChecks)
{
{
auto table = makeTable();
LuaUi::ContentView content = makeContent(table);
EXPECT_ANY_THROW(content.at(0));
EXPECT_EQ(content.size(), 0);
}
{
auto table = makeTable();
table[1] = makeTable();
LuaUi::ContentView content = makeContent(table);
EXPECT_EQ(content.size(), 1);
EXPECT_ANY_THROW(content.at(1));
content.at(0);
}
}
}
@@ -9,22 +9,33 @@ namespace
{
using namespace testing;
struct LuaUtilPackageTest : Test
{
LuaUtil::LuaState mLuaState{ nullptr, nullptr };
LuaUtilPackageTest()
{
mLuaState.addInternalLibSearchPath(
std::filesystem::path{ OPENMW_PROJECT_SOURCE_DIR } / "components" / "lua");
sol::state_view sol = mLuaState.unsafeState();
sol["util"] = LuaUtil::initUtilPackage(sol);
}
};
template <typename T>
T get(sol::state& lua, const std::string& luaCode)
T get(sol::state_view& lua, const std::string& luaCode)
{
return lua.safe_script("return " + luaCode).get<T>();
}
std::string getAsString(sol::state& lua, std::string luaCode)
std::string getAsString(sol::state_view& lua, std::string luaCode)
{
return LuaUtil::toString(lua.safe_script("return " + luaCode));
}
TEST(LuaUtilPackageTest, Vector2)
TEST_F(LuaUtilPackageTest, Vector2)
{
sol::state lua;
lua.open_libraries(sol::lib::base, sol::lib::math, sol::lib::string);
lua["util"] = LuaUtil::initUtilPackage(lua);
sol::state_view lua = mLuaState.unsafeState();
lua.safe_script("v = util.vector2(3, 4)");
EXPECT_FLOAT_EQ(get<float>(lua, "v.x"), 3);
EXPECT_FLOAT_EQ(get<float>(lua, "v.y"), 4);
@@ -55,11 +66,9 @@ namespace
EXPECT_TRUE(get<bool>(lua, "swizzle['01'] == util.vector2(0, 1) and swizzle['0y'] == util.vector2(0, 2)"));
}
TEST(LuaUtilPackageTest, Vector3)
TEST_F(LuaUtilPackageTest, Vector3)
{
sol::state lua;
lua.open_libraries(sol::lib::base, sol::lib::math, sol::lib::string);
lua["util"] = LuaUtil::initUtilPackage(lua);
sol::state_view lua = mLuaState.unsafeState();
lua.safe_script("v = util.vector3(5, 12, 13)");
EXPECT_FLOAT_EQ(get<float>(lua, "v.x"), 5);
EXPECT_FLOAT_EQ(get<float>(lua, "v.y"), 12);
@@ -94,11 +103,9 @@ namespace
get<bool>(lua, "swizzle['001'] == util.vector3(0, 0, 1) and swizzle['0yx'] == util.vector3(0, 2, 1)"));
}
TEST(LuaUtilPackageTest, Vector4)
TEST_F(LuaUtilPackageTest, Vector4)
{
sol::state lua;
lua.open_libraries(sol::lib::base, sol::lib::math, sol::lib::string);
lua["util"] = LuaUtil::initUtilPackage(lua);
sol::state_view lua = mLuaState.unsafeState();
lua.safe_script("v = util.vector4(5, 12, 13, 15)");
EXPECT_FLOAT_EQ(get<float>(lua, "v.x"), 5);
EXPECT_FLOAT_EQ(get<float>(lua, "v.y"), 12);
@@ -136,11 +143,9 @@ namespace
lua, "swizzle['0001'] == util.vector4(0, 0, 0, 1) and swizzle['0yx1'] == util.vector4(0, 2, 1, 1)"));
}
TEST(LuaUtilPackageTest, Color)
TEST_F(LuaUtilPackageTest, Color)
{
sol::state lua;
lua.open_libraries(sol::lib::base, sol::lib::math, sol::lib::string);
lua["util"] = LuaUtil::initUtilPackage(lua);
sol::state_view lua = mLuaState.unsafeState();
lua.safe_script("brown = util.color.rgba(0.75, 0.25, 0, 1)");
EXPECT_EQ(get<std::string>(lua, "tostring(brown)"), "(0.75, 0.25, 0, 1)");
lua.safe_script("blue = util.color.rgb(0, 1, 0, 1)");
@@ -153,13 +158,18 @@ namespace
EXPECT_EQ(get<std::string>(lua, "darkRed:asHex()"), "a01112");
EXPECT_TRUE(get<bool>(lua, "green:asRgba() == util.vector4(0, 1, 0, 1)"));
EXPECT_TRUE(get<bool>(lua, "red:asRgb() == util.vector3(1, 0, 0)"));
lua.safe_script("green = util.color.commaString('0,255,0')");
EXPECT_EQ(get<std::string>(lua, "tostring(green)"), "(0, 1, 0, 1)");
lua.safe_script("red = util.color.commaString('255, 0, 0, 255')");
EXPECT_EQ(get<std::string>(lua, "tostring(red)"), "(1, 0, 0, 1)");
lua.safe_script("blue = util.color.commaString('0, 0, 1000, 255')");
EXPECT_EQ(get<std::string>(lua, "tostring(blue)"), "(0, 0, 1, 1)");
EXPECT_ERROR(lua.safe_script("white = util.color.commaString('aaa')"), "Invalid comma-separated color");
}
TEST(LuaUtilPackageTest, Transform)
TEST_F(LuaUtilPackageTest, Transform)
{
sol::state lua;
lua.open_libraries(sol::lib::base, sol::lib::math, sol::lib::string);
lua["util"] = LuaUtil::initUtilPackage(lua);
sol::state_view lua = mLuaState.unsafeState();
lua["T"] = lua["util"]["transform"];
lua["v"] = lua["util"]["vector3"];
EXPECT_ERROR(lua.safe_script("T.identity = nil"), "attempt to index");
@@ -191,11 +201,9 @@ namespace
EXPECT_LT(get<float>(lua, "(rz_move_rx:inverse() * v(0, 1, 2) - v(1, 2, 3)):length()"), 1e-6);
}
TEST(LuaUtilPackageTest, UtilityFunctions)
TEST_F(LuaUtilPackageTest, UtilityFunctions)
{
sol::state lua;
lua.open_libraries(sol::lib::base, sol::lib::math, sol::lib::string);
lua["util"] = LuaUtil::initUtilPackage(lua);
sol::state_view lua = mLuaState.unsafeState();
lua.safe_script("v = util.vector2(1, 0):rotate(math.rad(120))");
EXPECT_FLOAT_EQ(get<float>(lua, "v.x"), -0.5f);
EXPECT_FLOAT_EQ(get<float>(lua, "v.y"), 0.86602539f);
@@ -203,6 +211,10 @@ namespace
EXPECT_FLOAT_EQ(get<float>(lua, "util.clamp(0.1, 0, 1.5)"), 0.1f);
EXPECT_FLOAT_EQ(get<float>(lua, "util.clamp(-0.1, 0, 1.5)"), 0);
EXPECT_FLOAT_EQ(get<float>(lua, "util.clamp(2.1, 0, 1.5)"), 1.5f);
EXPECT_FLOAT_EQ(get<float>(lua, "util.round(2.1)"), 2.0f);
EXPECT_FLOAT_EQ(get<float>(lua, "util.round(-2.1)"), -2.0f);
EXPECT_FLOAT_EQ(get<float>(lua, "util.remap(5, 0, 10, 0, 100)"), 50.0f);
EXPECT_FLOAT_EQ(get<float>(lua, "util.remap(-5, 0, 10, 0, 100)"), -50.0f);
lua.safe_script("t = util.makeReadOnly({x = 1})");
EXPECT_FLOAT_EQ(get<float>(lua, "t.x"), 1);
EXPECT_ERROR(lua.safe_script("t.y = 2"), "userdata value");
+6 -1
View File
@@ -2,6 +2,7 @@
#include <components/misc/strings/conversion.hpp>
#include <components/settings/parser.hpp>
#include <components/settings/values.hpp>
#include <components/testing/util.hpp>
#include <gtest/gtest.h>
@@ -24,5 +25,9 @@ int main(int argc, char** argv)
Settings::StaticValues::init();
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
const int result = RUN_ALL_TESTS();
if (result == 0)
std::filesystem::remove_all(TestingOpenMW::outputDir());
return result;
}
@@ -1,72 +0,0 @@
#include <components/misc/resourcehelpers.hpp>
#include <components/testing/util.hpp>
#include <gtest/gtest.h>
namespace
{
using namespace Misc::ResourceHelpers;
TEST(CorrectSoundPath, wav_files_not_overridden_with_mp3_in_vfs_are_not_corrected)
{
constexpr VFS::Path::NormalizedView path("sound/bar.wav");
std::unique_ptr<VFS::Manager> mVFS = TestingOpenMW::createTestVFS({ { path, nullptr } });
EXPECT_EQ(correctSoundPath(path, *mVFS), "sound/bar.wav");
}
TEST(CorrectSoundPath, wav_files_overridden_with_mp3_in_vfs_are_corrected)
{
constexpr VFS::Path::NormalizedView mp3("sound/foo.mp3");
std::unique_ptr<VFS::Manager> mVFS = TestingOpenMW::createTestVFS({ { mp3, nullptr } });
constexpr VFS::Path::NormalizedView wav("sound/foo.wav");
EXPECT_EQ(correctSoundPath(wav, *mVFS), "sound/foo.mp3");
}
TEST(CorrectSoundPath, corrected_path_does_not_check_existence_in_vfs)
{
std::unique_ptr<VFS::Manager> mVFS = TestingOpenMW::createTestVFS({});
constexpr VFS::Path::NormalizedView path("sound/foo.wav");
EXPECT_EQ(correctSoundPath(path, *mVFS), "sound/foo.mp3");
}
namespace
{
std::string checkChangeExtensionToDds(std::string path)
{
changeExtensionToDds(path);
return path;
}
}
TEST(ChangeExtensionToDds, original_extension_with_same_size_as_dds)
{
EXPECT_EQ(checkChangeExtensionToDds("texture/bar.tga"), "texture/bar.dds");
}
TEST(ChangeExtensionToDds, original_extension_greater_than_dds)
{
EXPECT_EQ(checkChangeExtensionToDds("texture/bar.jpeg"), "texture/bar.dds");
}
TEST(ChangeExtensionToDds, original_extension_smaller_than_dds)
{
EXPECT_EQ(checkChangeExtensionToDds("texture/bar.xx"), "texture/bar.dds");
}
TEST(ChangeExtensionToDds, does_not_change_dds_extension)
{
std::string path = "texture/bar.dds";
EXPECT_FALSE(changeExtensionToDds(path));
}
TEST(ChangeExtensionToDds, does_not_change_when_no_extension)
{
std::string path = "texture/bar";
EXPECT_FALSE(changeExtensionToDds(path));
}
TEST(ChangeExtensionToDds, change_when_there_is_an_extension)
{
std::string path = "texture/bar.jpeg";
EXPECT_TRUE(changeExtensionToDds(path));
}
}
+5 -5
View File
@@ -51,7 +51,7 @@ namespace Misc
const std::pair<osg::Quat, osg::Vec3f> eulerAnglesXZQuat[] = {
{
osg::Quat(1, 0, 0, 0),
osg::Vec3f(0, 0, osg::PI),
osg::Vec3f(0, 0, osg::PIf),
},
{
osg::Quat(0, 1, 0, 0),
@@ -59,7 +59,7 @@ namespace Misc
},
{
osg::Quat(0, 0, 1, 0),
osg::Vec3f(0, 0, osg::PI),
osg::Vec3f(0, 0, osg::PIf),
},
{
osg::Quat(0, 0, 0, 1),
@@ -128,15 +128,15 @@ namespace Misc
const std::pair<osg::Quat, osg::Vec3f> eulerAnglesZYXQuat[] = {
{
osg::Quat(1, 0, 0, 0),
osg::Vec3f(osg::PI, 0, 0),
osg::Vec3f(osg::PIf, 0, 0),
},
{
osg::Quat(0, 1, 0, 0),
osg::Vec3f(osg::PI, 0, osg::PI),
osg::Vec3f(osg::PIf, 0, osg::PIf),
},
{
osg::Quat(0, 0, 1, 0),
osg::Vec3f(0, 0, osg::PI),
osg::Vec3f(0, 0, osg::PIf),
},
{
osg::Quat(0, 0, 0, 1),
@@ -0,0 +1,159 @@
#include <components/misc/resourcehelpers.hpp>
#include <components/testing/util.hpp>
#include <gtest/gtest.h>
namespace Misc::ResourceHelpers
{
namespace
{
using namespace ::testing;
constexpr VFS::Path::NormalizedView sound("sound");
constexpr VFS::Path::NormalizedView textures("textures");
constexpr VFS::Path::NormalizedView bookart("bookart");
constexpr VFS::Path::ExtensionView mp3("mp3");
constexpr VFS::Path::ExtensionView b("b");
TEST(MiscResourceHelpersCorrectSoundPath, shouldKeepWavExtensionIfExistsInVfs)
{
constexpr VFS::Path::NormalizedView path("sound/foo.wav");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({ { path, nullptr } });
EXPECT_EQ(correctSoundPath(path, *vfs), "sound/foo.wav");
}
TEST(MiscResourceHelpersCorrectSoundPath, shouldFallbackToMp3IfWavDoesNotExistInVfs)
{
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({});
constexpr VFS::Path::NormalizedView path("sound/foo.wav");
EXPECT_EQ(correctSoundPath(path, *vfs), "sound/foo.mp3");
}
TEST(MiscResourceHelpersCorrectSoundPath, shouldKeepWavExtensionIfBothExistsInVfs)
{
constexpr VFS::Path::NormalizedView wavPath("sound/foo.wav");
constexpr VFS::Path::NormalizedView mp3Path("sound/foo.mp3");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({
{ wavPath, nullptr },
{ mp3Path, nullptr },
});
EXPECT_EQ(correctSoundPath(wavPath, *vfs), "sound/foo.wav");
}
TEST(MiscResourceHelpersCorrectResourcePath, shouldFallbackToGivenExtensionIfDoesNotExistInVfs)
{
constexpr VFS::Path::NormalizedView path("sound/foo.wav");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({});
EXPECT_EQ(correctResourcePath({ { sound } }, path, *vfs, mp3), "sound/foo.mp3");
}
TEST(MiscResourceHelpersCorrectResourcePath, shouldFallbackToGivenExtensionIfBothExistInVfs)
{
constexpr VFS::Path::NormalizedView wavPath("sound/foo.wav");
constexpr VFS::Path::NormalizedView mp3Path("sound/foo.mp3");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({
{ wavPath, nullptr },
{ mp3Path, nullptr },
});
EXPECT_EQ(correctResourcePath({ { sound } }, wavPath, *vfs, mp3), "sound/foo.mp3");
}
TEST(MiscResourceHelpersCorrectResourcePath, shouldKeepExtensionIfExistInVfs)
{
constexpr VFS::Path::NormalizedView wavPath("sound/foo.wav");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({
{ wavPath, nullptr },
});
EXPECT_EQ(correctResourcePath({ { sound } }, wavPath, *vfs, mp3), "sound/foo.wav");
}
TEST(MiscResourceHelpersCorrectResourcePath, shouldPrefixWithGivenTopDirectory)
{
constexpr VFS::Path::NormalizedView path("foo.mp3");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({});
EXPECT_EQ(correctResourcePath({ { sound } }, path, *vfs, mp3), "sound/foo.mp3");
}
TEST(MiscResourceHelpersCorrectResourcePath, shouldChangeTopDirectoryAndKeepExtensionIfOriginalExistInVfs)
{
constexpr VFS::Path::NormalizedView path("bookart/foo.a");
constexpr VFS::Path::NormalizedView aPath("textures/foo.a");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({
{ aPath, nullptr },
});
EXPECT_EQ(correctResourcePath({ { textures, bookart } }, path, *vfs, b), "textures/foo.a");
}
TEST(MiscResourceHelpersCorrectResourcePath, shouldChangeTopDirectoryAndChangeExtensionIfFallbackExistInVfs)
{
constexpr VFS::Path::NormalizedView path("bookart/foo.a");
constexpr VFS::Path::NormalizedView bPath("textures/foo.b");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({
{ bPath, nullptr },
});
EXPECT_EQ(correctResourcePath({ { textures, bookart } }, path, *vfs, b), "textures/foo.b");
}
TEST(MiscResourceHelpersCorrectResourcePath, shouldHandlePathEqualToDirectory)
{
constexpr VFS::Path::NormalizedView path("sound");
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({});
EXPECT_EQ(correctResourcePath({ { sound } }, path, *vfs, mp3), "sound/sound");
}
struct MiscResourceHelpersCorrectResourcePathShouldRemoveExtraPrefix : TestWithParam<VFS::Path::NormalizedView>
{
};
TEST_P(MiscResourceHelpersCorrectResourcePathShouldRemoveExtraPrefix, shouldMatchExpected)
{
const std::unique_ptr<const VFS::Manager> vfs = TestingOpenMW::createTestVFS({});
EXPECT_EQ(correctResourcePath({ { sound } }, GetParam(), *vfs, mp3), "sound/foo.mp3");
}
const std::vector<VFS::Path::NormalizedView> pathsWithPrefix = {
VFS::Path::NormalizedView("data/sound/foo.mp3"),
VFS::Path::NormalizedView("data/notsound/sound/foo.mp3"),
VFS::Path::NormalizedView("data/soundnot/sound/foo.mp3"),
VFS::Path::NormalizedView("data/notsoundnot/sound/foo.mp3"),
};
INSTANTIATE_TEST_SUITE_P(
PathsWithPrefix, MiscResourceHelpersCorrectResourcePathShouldRemoveExtraPrefix, ValuesIn(pathsWithPrefix));
TEST(MiscResourceHelpersChangeExtensionToDds, original_extension_with_same_size_as_dds)
{
std::string path = "texture/bar.tga";
ASSERT_TRUE(changeExtensionToDds(path));
EXPECT_EQ(path, "texture/bar.dds");
}
TEST(MiscResourceHelpersChangeExtensionToDds, original_extension_greater_than_dds)
{
std::string path = "texture/bar.jpeg";
ASSERT_TRUE(changeExtensionToDds(path));
EXPECT_EQ(path, "texture/bar.dds");
}
TEST(MiscResourceHelpersChangeExtensionToDds, original_extension_smaller_than_dds)
{
std::string path = "texture/bar.xx";
ASSERT_TRUE(changeExtensionToDds(path));
EXPECT_EQ(path, "texture/bar.dds");
}
TEST(MiscResourceHelpersChangeExtensionToDds, does_not_change_dds_extension)
{
std::string path = "texture/bar.dds";
EXPECT_FALSE(changeExtensionToDds(path));
EXPECT_EQ(path, "texture/bar.dds");
}
TEST(MiscResourceHelpersChangeExtensionToDds, does_not_change_when_no_extension)
{
std::string path = "texture/bar";
EXPECT_FALSE(changeExtensionToDds(path));
EXPECT_EQ(path, "texture/bar");
}
}
}
+2 -2
View File
@@ -40,13 +40,13 @@ namespace Nif::Testing
inline void init(NiTriShape& value)
{
init(static_cast<NiGeometry&>(value));
value.recType = RC_NiTriShape;
value.mRecordType = RC_NiTriShape;
}
inline void init(NiTriStrips& value)
{
init(static_cast<NiGeometry&>(value));
value.recType = RC_NiTriStrips;
value.mRecordType = RC_NiTriStrips;
}
inline void init(NiSkinInstance& value)
+192
View File
@@ -0,0 +1,192 @@
#include <components/nif/physics.hpp>
#include <gtest/gtest.h>
namespace Nif
{
namespace
{
using namespace testing;
constexpr VFS::Path::NormalizedView path("test");
void writeUInt8(std::uint8_t value, std::ostream& stream)
{
stream.write(reinterpret_cast<const char*>(&value), sizeof(value));
}
void writeUInt16(std::uint16_t value, std::ostream& stream)
{
stream.write(reinterpret_cast<const char*>(&value), sizeof(value));
}
void writeUInt32(std::uint32_t value, std::ostream& stream)
{
stream.write(reinterpret_cast<const char*>(&value), sizeof(value));
}
void writeString(std::string_view value, std::ostream& stream)
{
stream.write(value.data(), value.size());
}
void writeUInt8SizedString(std::string_view value, std::ostream& stream)
{
writeUInt8(static_cast<std::uint8_t>(value.size() + 1), stream);
writeString(value, stream);
stream.put(0);
}
void writeUInt32SizedString(std::string_view value, std::ostream& stream)
{
writeUInt32(static_cast<std::uint32_t>(value.size() + 1), stream);
writeString(value, stream);
stream.put(0);
}
void writeFloat(float value, std::ostream& stream)
{
stream.write(reinterpret_cast<const char*>(&value), sizeof(value));
}
struct NifBhkRagdollTemplateTest : Test
{
NifBhkRagdollTemplateTest()
{
Nif::Reader::setLoadUnsupportedFiles(true);
Nif::Reader::setWriteNifDebugLog(true);
}
};
TEST_F(NifBhkRagdollTemplateTest, shouldParseRecord)
{
NIFFile file(path);
const ToUTF8::StatelessUtf8Encoder* const encoder = nullptr;
Reader reader(file, encoder);
std::ostringstream stream;
writeString("Gamebryo File Format, Version 20.2.0.7\n", stream);
writeUInt32(NIFStream::generateVersion(20, 2, 0, 7), stream);
constexpr std::uint8_t endianness = 1;
writeUInt8(endianness, stream);
constexpr std::uint32_t userVersion = 11;
writeUInt32(userVersion, stream);
constexpr std::uint32_t recordsCount = 2;
writeUInt32(recordsCount, stream);
constexpr std::uint32_t bsStreamVersion = 34;
writeUInt32(bsStreamVersion, stream);
writeUInt8SizedString("author", stream);
writeUInt8SizedString("process_script", stream);
writeUInt8SizedString("export_script", stream);
constexpr std::uint16_t recordTypesCount = 2;
writeUInt16(recordTypesCount, stream);
constexpr std::uint16_t bhkRagdollTemplateTypeIndex = 0;
writeUInt32SizedString("bhkRagdollTemplate", stream);
constexpr std::uint16_t bhkRagdollTemplateDataTypeIndex = 1;
writeUInt32SizedString("bhkRagdollTemplateData", stream);
writeUInt16(bhkRagdollTemplateTypeIndex, stream);
writeUInt16(bhkRagdollTemplateDataTypeIndex, stream);
for (std::uint32_t i = 0; i < recordsCount; ++i)
{
constexpr std::uint32_t recordSize = 0;
writeUInt32(recordSize, stream);
}
constexpr std::uint32_t stringsCount = 2;
writeUInt32(stringsCount, stream);
constexpr std::uint32_t maxStringSize = 0;
writeUInt32(maxStringSize, stream);
constexpr std::uint32_t bhkRagdollTemplateNameIndex = 0;
writeUInt32SizedString("bhkRagdollTemplateName", stream);
constexpr std::uint32_t bhkRagdollTemplateDataNameIndex = 1;
writeUInt32SizedString("bhkRagdollTemplateDataName", stream);
constexpr std::uint32_t groupsCount = 0;
writeUInt32(groupsCount, stream);
writeUInt32(bhkRagdollTemplateNameIndex, stream);
constexpr std::uint32_t bonesCount = 1;
writeUInt32(bonesCount, stream);
constexpr std::uint32_t bhkRagdollTemplateDataIndex = 1;
writeUInt32(bhkRagdollTemplateDataIndex, stream);
writeUInt32(bhkRagdollTemplateDataNameIndex, stream);
constexpr float mass = 1.1f;
writeFloat(mass, stream);
constexpr float restitution = 2.2f;
writeFloat(restitution, stream);
constexpr float friction = 3.3f;
writeFloat(friction, stream);
constexpr float radius = 4.4f;
writeFloat(radius, stream);
constexpr std::uint32_t havokMaterial = 42;
writeUInt32(havokMaterial, stream);
constexpr std::uint32_t constraintsCount = 0;
writeUInt32(constraintsCount, stream);
constexpr std::uint32_t rootsCount = 0;
writeUInt32(rootsCount, stream);
const std::string buffer = stream.str();
std::unique_ptr<std::istringstream> input = std::make_unique<std::istringstream>(buffer);
input->exceptions(std::ios::failbit | std::ios_base::badbit);
reader.parse(std::move(input));
{
const Record* const record = reader.getRecord(0);
ASSERT_NE(record, nullptr);
EXPECT_EQ(record->mRecordIndex, 0);
EXPECT_EQ(record->mRecordName, "bhkRagdollTemplate");
EXPECT_EQ(record->mRecordType, RC_bhkRagdollTemplate);
const bhkRagdollTemplate* const typed = dynamic_cast<const bhkRagdollTemplate*>(record);
ASSERT_NE(typed, nullptr);
EXPECT_EQ(typed->mName, "bhkRagdollTemplateName");
EXPECT_EQ(typed->mBones.size(), 1);
EXPECT_NE(typed->mBones[0].getPtr(), nullptr);
}
{
const Record* const record = reader.getRecord(1);
ASSERT_NE(record, nullptr);
EXPECT_EQ(record->mRecordIndex, 1);
EXPECT_EQ(record->mRecordName, "bhkRagdollTemplateData");
EXPECT_EQ(record->mRecordType, RC_bhkRagdollTemplateData);
const bhkRagdollTemplateData* const typed = dynamic_cast<const bhkRagdollTemplateData*>(record);
ASSERT_NE(typed, nullptr);
EXPECT_EQ(typed->mName, "bhkRagdollTemplateDataName");
EXPECT_EQ(typed->mMass, mass);
EXPECT_EQ(typed->mRestitution, restitution);
EXPECT_EQ(typed->mFriction, friction);
EXPECT_EQ(typed->mRadius, radius);
EXPECT_EQ(typed->mHavokMaterial.mMaterial, havokMaterial);
EXPECT_EQ(typed->mConstraints.size(), 0);
}
}
}
}
@@ -1,6 +1,7 @@
#include "../nif/node.hpp"
#include <components/bullethelpers/processtrianglecallback.hpp>
#include <components/misc/convert.hpp>
#include <components/nif/data.hpp>
#include <components/nif/extra.hpp>
#include <components/nif/node.hpp>
@@ -47,7 +48,7 @@ namespace
bool isNear(const btVector3& lhs, const btVector3& rhs)
{
return std::equal(static_cast<const btScalar*>(lhs), static_cast<const btScalar*>(lhs) + 3,
static_cast<const btScalar*>(rhs), [](btScalar lhs, btScalar rhs) { return isNear(lhs, rhs); });
static_cast<const btScalar*>(rhs), [](btScalar l, btScalar r) { return isNear(l, r); });
}
bool isNear(const btMatrix3x3& lhs, const btMatrix3x3& rhs)
@@ -300,10 +301,10 @@ namespace
void copy(const btTransform& src, Nif::NiTransform& dst)
{
dst.mTranslation = osg::Vec3f(src.getOrigin().x(), src.getOrigin().y(), src.getOrigin().z());
dst.mTranslation = Misc::Convert::makeOsgVec3f(src.getOrigin());
for (int row = 0; row < 3; ++row)
for (int column = 0; column < 3; ++column)
dst.mRotation.mValues[row][column] = src.getBasis().getRow(row)[column];
dst.mRotation.mValues[row][column] = static_cast<float>(src.getBasis().getRow(row)[column]);
}
struct TestBulletNifLoader : Test
@@ -346,19 +347,19 @@ namespace
init(mNiStringExtraData2);
init(mController);
mNiTriShapeData.recType = Nif::RC_NiTriShapeData;
mNiTriShapeData.mRecordType = Nif::RC_NiTriShapeData;
mNiTriShapeData.mVertices = { osg::Vec3f(0, 0, 0), osg::Vec3f(1, 0, 0), osg::Vec3f(1, 1, 0) };
mNiTriShapeData.mNumTriangles = 1;
mNiTriShapeData.mTriangles = { 0, 1, 2 };
mNiTriShape.mData = Nif::NiGeometryDataPtr(&mNiTriShapeData);
mNiTriShapeData2.recType = Nif::RC_NiTriShapeData;
mNiTriShapeData2.mRecordType = Nif::RC_NiTriShapeData;
mNiTriShapeData2.mVertices = { osg::Vec3f(0, 0, 1), osg::Vec3f(1, 0, 1), osg::Vec3f(1, 1, 1) };
mNiTriShapeData2.mNumTriangles = 1;
mNiTriShapeData2.mTriangles = { 0, 1, 2 };
mNiTriShape2.mData = Nif::NiGeometryDataPtr(&mNiTriShapeData2);
mNiTriStripsData.recType = Nif::RC_NiTriStripsData;
mNiTriStripsData.mRecordType = Nif::RC_NiTriStripsData;
mNiTriStripsData.mVertices
= { osg::Vec3f(0, 0, 0), osg::Vec3f(1, 0, 0), osg::Vec3f(1, 1, 0), osg::Vec3f(0, 1, 0) };
mNiTriStripsData.mNumTriangles = 2;
@@ -409,7 +410,7 @@ namespace
TEST_F(TestBulletNifLoader, for_default_root_collision_node_nif_node_should_return_default)
{
mNode.recType = Nif::RC_RootCollisionNode;
mNode.mRecordType = Nif::RC_RootCollisionNode;
Nif::NIFFile file(testNif);
file.mRoots.push_back(&mNode);
@@ -830,7 +831,7 @@ namespace
TEST_F(TestBulletNifLoader, for_tri_shape_child_node_with_controller_should_return_animated_shape)
{
mController.recType = Nif::RC_NiKeyframeController;
mController.mRecordType = Nif::RC_NiKeyframeController;
mController.mFlags |= Nif::NiTimeController::Flag_Active;
copy(mTransform, mNiTriShape.mTransform);
mNiTriShape.mTransform.mScale = 3;
@@ -860,7 +861,7 @@ namespace
TEST_F(TestBulletNifLoader, for_two_tri_shape_children_nodes_where_one_with_controller_should_return_animated_shape)
{
mController.recType = Nif::RC_NiKeyframeController;
mController.mRecordType = Nif::RC_NiKeyframeController;
mController.mFlags |= Nif::NiTimeController::Flag_Active;
copy(mTransform, mNiTriShape.mTransform);
mNiTriShape.mTransform.mScale = 3;
@@ -939,7 +940,7 @@ namespace
{
mNiTriShape.mParents.push_back(&mNiNode);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
mNiNode.recType = Nif::RC_AvoidNode;
mNiNode.mRecordType = Nif::RC_AvoidNode;
Nif::NIFFile file(testNif);
file.mRoots.push_back(&mNiNode);
@@ -1000,7 +1001,7 @@ namespace
for_root_node_with_extra_data_string_equal_ncc_should_return_shape_with_cameraonly_collision)
{
mNiStringExtraData.mData = "NCC__";
mNiStringExtraData.recType = Nif::RC_NiStringExtraData;
mNiStringExtraData.mRecordType = Nif::RC_NiStringExtraData;
mNiTriShape.mParents.push_back(&mNiNode);
mNiNode.mExtra = Nif::ExtraPtr(&mNiStringExtraData);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
@@ -1031,7 +1032,7 @@ namespace
{
mNiStringExtraData.mNext = Nif::ExtraPtr(&mNiStringExtraData2);
mNiStringExtraData2.mData = "NCC__";
mNiStringExtraData2.recType = Nif::RC_NiStringExtraData;
mNiStringExtraData2.mRecordType = Nif::RC_NiStringExtraData;
mNiTriShape.mParents.push_back(&mNiNode);
mNiNode.mExtra = Nif::ExtraPtr(&mNiStringExtraData);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
@@ -1060,7 +1061,7 @@ namespace
TestBulletNifLoader, for_root_node_with_extra_data_string_starting_with_nc_should_return_shape_with_nocollision)
{
mNiStringExtraData.mData = "NC___";
mNiStringExtraData.recType = Nif::RC_NiStringExtraData;
mNiStringExtraData.mRecordType = Nif::RC_NiStringExtraData;
mNiTriShape.mParents.push_back(&mNiNode);
mNiNode.mExtra = Nif::ExtraPtr(&mNiStringExtraData);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
@@ -1090,7 +1091,7 @@ namespace
{
mNiStringExtraData.mNext = Nif::ExtraPtr(&mNiStringExtraData2);
mNiStringExtraData2.mData = "NC___";
mNiStringExtraData2.recType = Nif::RC_NiStringExtraData;
mNiStringExtraData2.mRecordType = Nif::RC_NiStringExtraData;
mNiTriShape.mParents.push_back(&mNiNode);
mNiNode.mExtra = Nif::ExtraPtr(&mNiStringExtraData);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
@@ -1118,7 +1119,7 @@ namespace
TEST_F(TestBulletNifLoader, for_tri_shape_child_node_with_extra_data_string_should_ignore_extra_data)
{
mNiStringExtraData.mData = "NC___";
mNiStringExtraData.recType = Nif::RC_NiStringExtraData;
mNiStringExtraData.mRecordType = Nif::RC_NiStringExtraData;
mNiTriShape.mExtra = Nif::ExtraPtr(&mNiStringExtraData);
mNiTriShape.mParents.push_back(&mNiNode);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
@@ -1152,7 +1153,7 @@ namespace
niTriShape.mData = Nif::NiGeometryDataPtr(&mNiTriShapeData);
niTriShape.mParents.push_back(&mNiNode);
emptyCollisionNode.recType = Nif::RC_RootCollisionNode;
emptyCollisionNode.mRecordType = Nif::RC_RootCollisionNode;
emptyCollisionNode.mParents.push_back(&mNiNode);
mNiNode.mChildren
@@ -1183,7 +1184,7 @@ namespace
mNiTriShape.mParents.push_back(&mNiNode);
mNiTriShape.mName = "EditorMarker";
mNiIntegerExtraData.mData = 34; // BSXFlags "has collision" | "editor marker"
mNiIntegerExtraData.recType = Nif::RC_BSXFlags;
mNiIntegerExtraData.mRecordType = Nif::RC_BSXFlags;
mNiNode.mExtraList.push_back(Nif::ExtraPtr(&mNiIntegerExtraData));
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
@@ -1204,7 +1205,7 @@ namespace
mNiTriShape.mParents.push_back(&mNiNode);
mNiTriShape.mName = "Tri EditorMarker";
mNiStringExtraData.mData = "MRK";
mNiStringExtraData.recType = Nif::RC_NiStringExtraData;
mNiStringExtraData.mRecordType = Nif::RC_NiStringExtraData;
mNiNode.mExtra = Nif::ExtraPtr(&mNiStringExtraData);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
@@ -1275,7 +1276,7 @@ namespace
{
mNiTriShape.mParents.push_back(&mNiNode);
mNiNode.mChildren = Nif::NiAVObjectList{ Nif::NiAVObjectPtr(&mNiTriShape) };
mNiNode.recType = Nif::RC_AvoidNode;
mNiNode.mRecordType = Nif::RC_AvoidNode;
mNiTriStripsData.mStrips.front() = { 0, 1 };
Nif::NIFFile file(testNif);
+10 -20
View File
@@ -100,7 +100,7 @@ osg::Group {
UDC_UserObjects 1 {
osg::UIntValueObject {
UniqueID 6
Name "recIndex"
Name "recordIndex"
Value 4294967295
}
}
@@ -137,10 +137,10 @@ osg::Group {
UserDataContainer TRUE {
osg::DefaultUserDataContainer {
UniqueID 5
UDC_UserObjects 3 {
UDC_UserObjects 2 {
osg::UIntValueObject {
UniqueID 6
Name "recIndex"
Name "recordIndex"
Value 4294967295
}
osg::StringValueObject {
@@ -149,17 +149,12 @@ osg::Group {
Value ")"
<< shaderPrefix << R"("
}
osg::BoolValueObject {
UniqueID 8
Name "shaderRequired"
Value TRUE
}
}
}
}
StateSet TRUE {
osg::StateSet {
UniqueID 9
UniqueID 8
}
}
}
@@ -194,10 +189,10 @@ osg::Group {
UserDataContainer TRUE {
osg::DefaultUserDataContainer {
UniqueID 5
UDC_UserObjects 3 {
UDC_UserObjects 2 {
osg::UIntValueObject {
UniqueID 6
Name "recIndex"
Name "recordIndex"
Value 4294967295
}
osg::StringValueObject {
@@ -206,23 +201,18 @@ osg::Group {
Value ")"
<< shaderPrefix << R"("
}
osg::BoolValueObject {
UniqueID 8
Name "shaderRequired"
Value TRUE
}
}
}
}
StateSet TRUE {
osg::StateSet {
UniqueID 9
UniqueID 8
ModeList 1 {
GL_DEPTH_TEST ON
}
AttributeList 1 {
osg::Depth {
UniqueID 10
UniqueID 9
Function LEQUAL
}
Value OFF
@@ -257,7 +247,7 @@ osg::Group {
Nif::NiAVObject node;
init(node);
Nif::BSShaderPPLightingProperty property;
property.recType = Nif::RC_BSShaderPPLightingProperty;
property.mRecordType = Nif::RC_BSShaderPPLightingProperty;
property.mTextureSet = nullptr;
property.mController = nullptr;
property.mType = GetParam().mShaderType;
@@ -285,7 +275,7 @@ osg::Group {
Nif::NiAVObject node;
init(node);
Nif::BSLightingShaderProperty property;
property.recType = Nif::RC_BSLightingShaderProperty;
property.mRecordType = Nif::RC_BSLightingShaderProperty;
property.mTextureSet = nullptr;
property.mController = nullptr;
property.mType = GetParam().mShaderType;
@@ -0,0 +1,50 @@
#include <components/files/configurationmanager.hpp>
#include <components/resource/resourcesystem.hpp>
#include <components/resource/scenemanager.hpp>
#include <components/sceneutil/shadow.hpp>
#include <components/toutf8/toutf8.hpp>
#include <components/vfs/manager.hpp>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <thread>
namespace
{
using namespace testing;
TEST(ResourceResourceSystem, scenemanager_getinstance_should_be_thread_safe)
{
const VFS::Manager vfsManager;
const ToUTF8::Utf8Encoder encoder(ToUTF8::WINDOWS_1252);
Resource::ResourceSystem resourceSystem(&vfsManager, 1.0, &encoder.getStatelessEncoder());
Resource::SceneManager* sceneManager = resourceSystem.getSceneManager();
const Files::ConfigurationManager configurationManager;
sceneManager->setShaderPath(configurationManager.getLocalPath() / "resources/shaders");
auto defines = Shader::getDefaultDefines();
auto shadowDefines = SceneUtil::ShadowManager::getShadowsDisabledDefines();
osg::ref_ptr<SceneUtil::LightManager> lightManager = new SceneUtil::LightManager(SceneUtil::LightSettings{});
auto lightDefines = lightManager->getLightDefines();
for (const auto& define : shadowDefines)
defines[define.first] = define.second;
for (const auto& define : lightDefines)
defines[define.first] = define.second;
sceneManager->getShaderManager().setGlobalDefines(defines);
constexpr VFS::Path::NormalizedView noSuchPath("meshes/whatever.nif");
std::vector<std::thread> threads;
for (int i = 0; i < 50; ++i)
{
threads.emplace_back([=]() { sceneManager->getInstance(noSuchPath); });
}
for (std::thread& thread : threads)
thread.join();
}
}
@@ -16,7 +16,7 @@ namespace
ShaderManager mManager;
ShaderManager::DefineMap mDefines;
ShaderManagerTest() { mManager.setShaderPath("tests_output"); }
ShaderManagerTest() { mManager.setShaderPath(TestingOpenMW::outputDir()); }
template <class F>
void withShaderFile(const std::string& content, F&& f)
+1 -1
View File
@@ -1,5 +1,5 @@
#include <components/misc/strings/conversion.hpp>
#include <components/to_utf8/to_utf8.hpp>
#include <components/toutf8/toutf8.hpp>
#include <gtest/gtest.h>
+325 -56
View File
@@ -10,54 +10,178 @@ namespace VFS::Path
{
using namespace testing;
TEST(NormalizedTest, shouldSupportDefaultConstructor)
template <class T0, class T1>
struct TypePair
{
using Type0 = T0;
using Type1 = T1;
};
struct VFSPathIsNormalizedTest : TestWithParam<std::pair<std::string_view, bool>>
{
};
TEST_P(VFSPathIsNormalizedTest, shouldReturnExpectedResult)
{
EXPECT_EQ(isNormalized(GetParam().first), GetParam().second);
}
const std::pair<std::string_view, bool> isNormalizedTestParams[] = {
{ std::string_view(), true },
{ "foo", true },
{ "foo/bar", true },
{ "foo/bar/baz", true },
{ "/foo", false },
{ "foo//", false },
{ "foo\\", false },
{ "Foo", false },
};
INSTANTIATE_TEST_SUITE_P(IsNormalizedTestParams, VFSPathIsNormalizedTest, ValuesIn(isNormalizedTestParams));
TEST(VFSPathNormalizeFilenameInPlaceTest, shouldRemoveLeadingSeparators)
{
std::string value("//foo");
normalizeFilenameInPlace(value);
EXPECT_EQ(value, "foo");
}
TEST(VFSPathNormalizeFilenameInPlaceTest, shouldRemoveDuplicatedSeparators)
{
std::string value("foo//bar///baz");
normalizeFilenameInPlace(value);
EXPECT_EQ(value, "foo/bar/baz");
}
TEST(VFSPathNormalizeFilenameInPlaceTest, shouldRemoveDuplicatedLeadingSeparator)
{
std::string value("//foo");
normalizeFilenameInPlace(value);
EXPECT_EQ(value, "foo");
}
TEST(VFSPathExtensionViewTest, shouldSupportDefaultConstructor)
{
constexpr ExtensionView extension;
EXPECT_TRUE(extension.empty());
EXPECT_EQ(extension.value(), "");
}
TEST(VFSPathExtensionViewTest, shouldSupportConstexprConstructorFromConstCharPtr)
{
constexpr ExtensionView extension("png");
EXPECT_FALSE(extension.empty());
EXPECT_EQ(extension.value(), "png");
}
TEST(VFSPathExtensionViewTest, constructorShouldThrowExceptionOnNotNormalizedValue)
{
EXPECT_THROW([] { ExtensionView("PNG"); }(), std::invalid_argument);
}
TEST(VFSPathExtensionViewTest, constructorShouldThrowExceptionIfValueContainsExtensionSeparator)
{
EXPECT_THROW([] { ExtensionView(".png"); }(), std::invalid_argument);
}
TEST(VFSPathExtensionViewTest, constructorShouldThrowExceptionIfValueContainsSeparator)
{
EXPECT_THROW([] { ExtensionView("/png"); }(), std::invalid_argument);
}
template <class T>
struct VFSPathExtensionViewOperatorsTest : Test
{
};
TYPED_TEST_SUITE_P(VFSPathExtensionViewOperatorsTest);
TYPED_TEST_P(VFSPathExtensionViewOperatorsTest, supportsEqual)
{
using Type0 = typename TypeParam::Type0;
using Type1 = typename TypeParam::Type1;
const Type0 extension{ "png" };
const Type1 otherEqual{ "png" };
const Type1 otherNotEqual{ "jpg" };
EXPECT_EQ(extension, otherEqual);
EXPECT_EQ(otherEqual, extension);
EXPECT_NE(extension, otherNotEqual);
EXPECT_NE(otherNotEqual, extension);
}
TYPED_TEST_P(VFSPathExtensionViewOperatorsTest, supportsLess)
{
using Type0 = typename TypeParam::Type0;
using Type1 = typename TypeParam::Type1;
const Type0 extension{ "png" };
const Type1 otherEqual{ "png" };
const Type1 otherLess{ "jpg" };
const Type1 otherGreater{ "tga" };
EXPECT_FALSE(extension < otherEqual);
EXPECT_FALSE(otherEqual < extension);
EXPECT_LT(otherLess, extension);
EXPECT_FALSE(extension < otherLess);
EXPECT_LT(extension, otherGreater);
EXPECT_FALSE(otherGreater < extension);
}
REGISTER_TYPED_TEST_SUITE_P(VFSPathExtensionViewOperatorsTest, supportsEqual, supportsLess);
using VFSPathExtensionViewOperatorsTypePairs
= Types<TypePair<ExtensionView, ExtensionView>, TypePair<ExtensionView, const char*>,
TypePair<ExtensionView, std::string>, TypePair<ExtensionView, std::string_view>>;
INSTANTIATE_TYPED_TEST_SUITE_P(
Typed, VFSPathExtensionViewOperatorsTest, VFSPathExtensionViewOperatorsTypePairs);
TEST(VFSPathNormalizedTest, shouldSupportDefaultConstructor)
{
const Normalized value;
EXPECT_EQ(value.value(), "");
}
TEST(NormalizedTest, shouldSupportConstructorFromString)
TEST(VFSPathNormalizedTest, shouldSupportConstructorFromString)
{
const std::string string("Foo\\Bar/baz");
const Normalized value(string);
EXPECT_EQ(value.value(), "foo/bar/baz");
}
TEST(NormalizedTest, shouldSupportConstructorFromConstCharPtr)
TEST(VFSPathNormalizedTest, shouldSupportConstructorFromConstCharPtr)
{
const char* const ptr = "Foo\\Bar/baz";
const Normalized value(ptr);
EXPECT_EQ(value.value(), "foo/bar/baz");
}
TEST(NormalizedTest, shouldSupportConstructorFromStringView)
TEST(VFSPathNormalizedTest, shouldSupportConstructorFromStringView)
{
const std::string_view view = "Foo\\Bar/baz";
const Normalized value(view);
EXPECT_EQ(value.view(), "foo/bar/baz");
}
TEST(NormalizedTest, shouldSupportConstructorFromNormalizedView)
TEST(VFSPathNormalizedTest, shouldSupportConstructorFromNormalizedView)
{
const NormalizedView view("foo/bar/baz");
const Normalized value(view);
EXPECT_EQ(value.view(), "foo/bar/baz");
}
TEST(NormalizedTest, supportMovingValueOut)
TEST(VFSPathNormalizedTest, supportMovingValueOut)
{
Normalized value("Foo\\Bar/baz");
EXPECT_EQ(std::move(value).value(), "foo/bar/baz");
EXPECT_EQ(value.value(), "");
}
TEST(NormalizedTest, isNotEqualToNotNormalized)
TEST(VFSPathNormalizedTest, isNotEqualToNotNormalized)
{
const Normalized value("Foo\\Bar/baz");
EXPECT_NE(value.value(), "Foo\\Bar/baz");
}
TEST(NormalizedTest, shouldSupportOperatorLeftShiftToOStream)
TEST(VFSPathNormalizedTest, shouldSupportOperatorLeftShiftToOStream)
{
const Normalized value("Foo\\Bar/baz");
std::stringstream stream;
@@ -65,68 +189,107 @@ namespace VFS::Path
EXPECT_EQ(stream.str(), "foo/bar/baz");
}
TEST(NormalizedTest, shouldSupportOperatorDivEqual)
TEST(VFSPathNormalizedTest, shouldSupportOperatorDivEqual)
{
Normalized value("foo/bar");
value /= NormalizedView("baz");
EXPECT_EQ(value.value(), "foo/bar/baz");
}
TEST(NormalizedTest, shouldSupportOperatorDivEqualWithStringView)
TEST(VFSPathNormalizedTest, shouldSupportOperatorDivEqualWithStringView)
{
Normalized value("foo/bar");
value /= std::string_view("BAZ");
EXPECT_EQ(value.value(), "foo/bar/baz");
}
TEST(NormalizedTest, changeExtensionShouldReplaceAfterLastDot)
{
Normalized value("foo/bar.a");
ASSERT_TRUE(value.changeExtension("so"));
EXPECT_EQ(value.value(), "foo/bar.so");
}
TEST(NormalizedTest, changeExtensionShouldNormalizeExtension)
{
Normalized value("foo/bar.a");
ASSERT_TRUE(value.changeExtension("SO"));
EXPECT_EQ(value.value(), "foo/bar.so");
}
TEST(NormalizedTest, changeExtensionShouldIgnorePathWithoutADot)
TEST(VFSPathNormalizedTest, operatorDivShouldNormalizeSuffix)
{
Normalized value("foo/bar");
ASSERT_FALSE(value.changeExtension("so"));
value /= std::string_view("\\A\\\\B");
EXPECT_EQ(value.value(), "foo/bar/a/b");
}
TEST(VFSPathNormalizedTest, operatorDivForNormalizedViewShouldNotPrependSeparatorToEmpty)
{
Normalized value;
value /= NormalizedView("a");
EXPECT_EQ(value.value(), "a");
}
TEST(VFSPathNormalizedTest, operatorDivForStringViewShouldNotPrependSeparatorToEmpty)
{
Normalized value;
value /= std::string_view("a");
EXPECT_EQ(value.value(), "a");
}
TEST(VFSPathNormalizedTest, changeExtensionShouldReplaceAfterLastDot)
{
Normalized value("foo/ba.r.a");
constexpr ExtensionView extension("so");
ASSERT_TRUE(value.changeExtension(extension));
EXPECT_EQ(value.value(), "foo/ba.r.so");
}
TEST(VFSPathNormalizedTest, changeExtensionShouldIgnorePathWithoutADot)
{
Normalized value("foo/bar");
constexpr ExtensionView extension("so");
ASSERT_FALSE(value.changeExtension(extension));
EXPECT_EQ(value.value(), "foo/bar");
}
TEST(NormalizedTest, changeExtensionShouldIgnorePathWithDotBeforeSeparator)
TEST(VFSPathNormalizedTest, changeExtensionShouldIgnorePathWithDotBeforeSeparator)
{
Normalized value("foo.bar/baz");
ASSERT_FALSE(value.changeExtension("so"));
constexpr ExtensionView extension("so");
ASSERT_FALSE(value.changeExtension(extension));
EXPECT_EQ(value.value(), "foo.bar/baz");
}
TEST(NormalizedTest, changeExtensionShouldThrowExceptionOnExtensionWithDot)
TEST(VFSPathNormalizedTest, changeExtensionShouldReplaceWithShorterExtension)
{
Normalized value("foo.a");
EXPECT_THROW(value.changeExtension(".so"), std::invalid_argument);
Normalized value("foo/bar.nif");
constexpr ExtensionView extension("kf");
ASSERT_TRUE(value.changeExtension(extension));
EXPECT_EQ(value.value(), "foo/bar.kf");
}
TEST(NormalizedTest, changeExtensionShouldThrowExceptionOnExtensionWithSeparator)
TEST(VFSPathNormalizedTest, filenameShouldReturnLastComponentOfThePath)
{
Normalized value("foo.a");
EXPECT_THROW(value.changeExtension("/so"), std::invalid_argument);
const Normalized value("foo/bar");
EXPECT_EQ(value.filename(), "bar");
}
TEST(VFSPathNormalizedTest, filenameShouldReturnSameValueForPathWithSingleComponent)
{
const Normalized value("foo");
EXPECT_EQ(value.filename(), "foo");
}
TEST(VFSPathNormalizedTest, appendShouldAddExtensionWithSeparator)
{
Normalized value("foo");
value.append(ExtensionView("ext"));
EXPECT_EQ(value.value(), "foo.ext");
}
TEST(VFSPathNormalizedTest, appendForEmptyShouldAddExtensionWithSeparator)
{
Normalized value;
value.append(ExtensionView("ext"));
EXPECT_EQ(value.value(), ".ext");
}
template <class T>
struct NormalizedOperatorsTest : Test
struct VFSPathNormalizedOperatorsTest : Test
{
};
TYPED_TEST_SUITE_P(NormalizedOperatorsTest);
TYPED_TEST_SUITE_P(VFSPathNormalizedOperatorsTest);
TYPED_TEST_P(NormalizedOperatorsTest, supportsEqual)
TYPED_TEST_P(VFSPathNormalizedOperatorsTest, supportsEqual)
{
using Type0 = typename TypeParam::Type0;
using Type1 = typename TypeParam::Type1;
@@ -139,7 +302,7 @@ namespace VFS::Path
EXPECT_NE(otherNotEqual, normalized);
}
TYPED_TEST_P(NormalizedOperatorsTest, supportsLess)
TYPED_TEST_P(VFSPathNormalizedOperatorsTest, supportsLess)
{
using Type0 = typename TypeParam::Type0;
using Type1 = typename TypeParam::Type1;
@@ -155,47 +318,153 @@ namespace VFS::Path
EXPECT_FALSE(otherGreater < normalized);
}
REGISTER_TYPED_TEST_SUITE_P(NormalizedOperatorsTest, supportsEqual, supportsLess);
REGISTER_TYPED_TEST_SUITE_P(VFSPathNormalizedOperatorsTest, supportsEqual, supportsLess);
template <class T0, class T1>
struct TypePair
{
using Type0 = T0;
using Type1 = T1;
};
using VFSPathNormalizedOperatorsTypePairs
= Types<TypePair<Normalized, Normalized>, TypePair<Normalized, const char*>,
TypePair<Normalized, std::string>, TypePair<Normalized, std::string_view>,
TypePair<Normalized, NormalizedView>, TypePair<NormalizedView, Normalized>,
TypePair<NormalizedView, const char*>, TypePair<NormalizedView, std::string>,
TypePair<NormalizedView, std::string_view>, TypePair<NormalizedView, NormalizedView>>;
using TypePairs = Types<TypePair<Normalized, Normalized>, TypePair<Normalized, const char*>,
TypePair<Normalized, std::string>, TypePair<Normalized, std::string_view>,
TypePair<Normalized, NormalizedView>, TypePair<NormalizedView, Normalized>,
TypePair<NormalizedView, const char*>, TypePair<NormalizedView, std::string>,
TypePair<NormalizedView, std::string_view>, TypePair<NormalizedView, NormalizedView>>;
INSTANTIATE_TYPED_TEST_SUITE_P(Typed, VFSPathNormalizedOperatorsTest, VFSPathNormalizedOperatorsTypePairs);
INSTANTIATE_TYPED_TEST_SUITE_P(Typed, NormalizedOperatorsTest, TypePairs);
TEST(NormalizedViewTest, shouldSupportConstructorFromNormalized)
TEST(VFSPathNormalizedViewTest, shouldSupportConstructorFromNormalized)
{
const Normalized value("Foo\\Bar/baz");
const NormalizedView view(value);
EXPECT_EQ(view.value(), "foo/bar/baz");
}
TEST(NormalizedViewTest, shouldSupportConstexprConstructorFromNormalizedStringLiteral)
TEST(VFSPathNormalizedViewTest, shouldSupportConstexprConstructorFromNormalizedStringLiteral)
{
constexpr NormalizedView view("foo/bar/baz");
EXPECT_EQ(view.value(), "foo/bar/baz");
}
TEST(NormalizedViewTest, constructorShouldThrowExceptionOnNotNormalized)
TEST(VFSPathNormalizedViewTest, constructorShouldThrowExceptionOnNotNormalized)
{
EXPECT_THROW([] { NormalizedView("Foo\\Bar/baz"); }(), std::invalid_argument);
}
TEST(NormalizedView, shouldSupportOperatorDiv)
TEST(VFSPathNormalizedViewTest, shouldSupportOperatorDiv)
{
const NormalizedView a("foo/bar");
const NormalizedView b("baz");
const Normalized result = a / b;
EXPECT_EQ(result.value(), "foo/bar/baz");
}
TEST(VFSPathNormalizedViewTest, filenameShouldReturnLastComponentOfThePath)
{
const NormalizedView value("foo/bar");
EXPECT_EQ(value.filename(), "bar");
}
TEST(VFSPathNormalizedViewTest, filenameShouldReturnSameValueForPathWithSingleComponent)
{
const NormalizedView value("foo");
EXPECT_EQ(value.filename(), "foo");
}
TEST(VFSPathNormalizedViewTest, stemShouldOmitPathAndExtension)
{
const NormalizedView value("foo/bar.a");
EXPECT_EQ(value.stem(), "bar");
}
TEST(VFSPathNormalizedViewTest, stemShouldReturnSameValueForPathWithSingleComponent)
{
const NormalizedView value("foo");
EXPECT_EQ(value.stem(), "foo");
}
TEST(VFSPathNormalizedViewTest, stemShouldIncludeDotsBeforeTheExtension)
{
const NormalizedView value("last voyage of the u.s.s. constitution.swf");
EXPECT_EQ(value.stem(), "last voyage of the u.s.s. constitution");
}
TEST(VFSPathNormalizedJoinTest, shouldHandleSingleValue)
{
EXPECT_EQ(join(Normalized("foo")), "foo");
}
TEST(VFSPathNormalizedJoinTest, shouldHandleSingleView)
{
EXPECT_EQ(join(NormalizedView("foo")), "foo");
}
TEST(VFSPathNormalizedJoinTest, shouldHandleSingleString)
{
EXPECT_EQ(join(std::string("FOO")), "foo");
}
TEST(VFSPathNormalizedJoinTest, shouldHandleSingleStringView)
{
EXPECT_EQ(join(std::string_view("FOO")), "foo");
}
TEST(VFSPathNormalizedJoinTest, shouldHandleSingleConstCharArray)
{
EXPECT_EQ(join("FOO"), "foo");
}
TEST(VFSPathNormalizedJoinTest, shouldHandleSingleConstCharPtr)
{
const char* const ptr = "FOO";
EXPECT_EQ(join(ptr), "foo");
}
TEST(VFSPathNormalizedJoinTest, shouldHandleSingleExtension)
{
constexpr ExtensionView extension("foo");
EXPECT_EQ(join(extension), ".foo");
}
TEST(VFSPathNormalizedJoinTest, shouldJoinTwoPathComponents)
{
EXPECT_EQ(join(NormalizedView("foo"), std::string_view("BAR")), "foo/bar");
}
TEST(VFSPathNormalizedJoinTest, shouldJoinComponentAndExtension)
{
EXPECT_EQ(join(NormalizedView("foo"), ExtensionView("bar")), "foo.bar");
}
TEST(VFSPathNormalizedJoinTest, shouldJoinTwoExtensions)
{
EXPECT_EQ(join(ExtensionView("foo"), ExtensionView("bar")), ".foo.bar");
}
TEST(VFSPathNormalizedJoinTest, shouldJoinTreePathComponents)
{
EXPECT_EQ(join(NormalizedView("a"), std::string_view("B"), Normalized("c")), "a/b/c");
}
TEST(VFSPathNormalizedJoinedCapacityTest, forNormalizedShouldReturnSizeOnly)
{
EXPECT_EQ(joinedCapacity(Normalized("a")), 1);
}
TEST(VFSPathNormalizedJoinedCapacityTest, forConstCharPtrShouldReturnSizeOnly)
{
EXPECT_EQ(joinedCapacity("a"), 1);
}
TEST(VFSPathNormalizedJoinedCapacityTest, forExtensionViewShouldReturnSizePlusSeparator)
{
EXPECT_EQ(joinedCapacity(ExtensionView("a")), 2);
}
TEST(VFSPathNormalizedJoinedCapacityTest, shouldReturnSumOfSizesPlusNumberOfSeparators)
{
constexpr NormalizedView b("b");
const Normalized c("c");
constexpr std::string_view d("d");
const std::string e("e");
constexpr ExtensionView f("f");
EXPECT_EQ(joinedCapacity("a", b, c, d, e, f), 11);
}
}
}
+4
View File
@@ -20,6 +20,10 @@ target_link_libraries(esmtool
components
)
if (WIN32)
target_sources(esmtool PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(esmtool PRIVATE --coverage)
target_link_libraries(esmtool gcov)
+12 -6
View File
@@ -11,6 +11,8 @@
#include <boost/program_options.hpp>
#include <osg/Math>
#include <components/esm/format.hpp>
#include <components/esm3/esmreader.hpp>
#include <components/esm3/esmwriter.hpp>
@@ -101,9 +103,9 @@ Allowed options)");
try
{
bpo::parsed_options valid_opts = bpo::command_line_parser(argc, argv).options(all).positional(p).run();
bpo::parsed_options validOpts = bpo::command_line_parser(argc, argv).options(all).positional(p).run();
bpo::store(valid_opts, variables);
bpo::store(validOpts, variables);
}
catch (std::exception& e)
{
@@ -215,8 +217,6 @@ int main(int argc, char** argv)
std::cerr << "ERROR: " << e.what() << std::endl;
return 1;
}
return 0;
}
namespace
@@ -253,6 +253,9 @@ namespace
std::cout << " ID: " << ref.mRefID << '\n';
std::cout << " Position: (" << ref.mPos.pos[0] << ", " << ref.mPos.pos[1] << ", " << ref.mPos.pos[2]
<< ")\n";
std::cout << " Rotation: (" << osg::RadiansToDegrees(ref.mPos.rot[0]) << ", "
<< osg::RadiansToDegrees(ref.mPos.rot[1]) << ", " << osg::RadiansToDegrees(ref.mPos.rot[2])
<< ")\n";
if (ref.mScale != 1.f)
std::cout << " Scale: " << ref.mScale << '\n';
if (!ref.mOwner.empty())
@@ -279,6 +282,9 @@ namespace
{
std::cout << " Destination position: (" << ref.mDoorDest.pos[0] << ", " << ref.mDoorDest.pos[1]
<< ", " << ref.mDoorDest.pos[2] << ")\n";
std::cout << " Destination rotation: (" << osg::RadiansToDegrees(ref.mDoorDest.rot[0]) << ", "
<< osg::RadiansToDegrees(ref.mDoorDest.rot[1]) << ", "
<< osg::RadiansToDegrees(ref.mDoorDest.rot[2]) << ")\n";
if (!ref.mDestCell.empty())
std::cout << " Destination cell: " << ref.mDestCell << '\n';
}
@@ -484,7 +490,7 @@ namespace
int digitCount = 1; // For a nicer output
if (recordCount > 0)
digitCount = (int)std::log10(recordCount) + 1;
digitCount = static_cast<int>(std::log10(recordCount)) + 1;
std::cout << "Loaded " << recordCount << " records:\n\n";
@@ -509,7 +515,7 @@ namespace
esm.setEncoder(&encoder);
esm.setHeader(data.mHeader);
esm.setVersion(ESM::VER_130);
esm.setRecordCount(recordCount);
esm.setRecordCount(static_cast<int>(recordCount));
std::fstream save(info.outname, std::fstream::out | std::fstream::binary);
esm.save(save);
+18 -18
View File
@@ -1,5 +1,7 @@
#include "labels.hpp"
#include <format>
#include <components/esm3/dialoguecondition.hpp>
#include <components/esm3/loadalch.hpp>
#include <components/esm3/loadbody.hpp>
@@ -16,8 +18,6 @@
#include <components/esm3/loadspel.hpp>
#include <components/esm3/loadweap.hpp>
#include <components/misc/strings/format.hpp>
std::string_view bodyPartLabel(int idx)
{
if (idx >= 0 && idx <= 26)
@@ -675,7 +675,7 @@ std::string bodyPartFlags(int flags)
int unused = (0xFFFFFFFF ^ (ESM::BodyPart::BPF_Female | ESM::BodyPart::BPF_NotPlayable));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -699,7 +699,7 @@ std::string cellFlags(int flags)
^ (ESM::Cell::HasWater | ESM::Cell::Interior | ESM::Cell::NoSleep | ESM::Cell::QuasiEx | 0x00000040));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -717,7 +717,7 @@ std::string containerFlags(int flags)
int unused = (0xFFFFFFFF ^ (ESM::Container::Unknown | ESM::Container::Organic | ESM::Container::Respawn));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -747,7 +747,7 @@ std::string creatureFlags(int flags)
| ESM::Creature::Bipedal | ESM::Creature::Respawn | ESM::Creature::Weapon | ESM::Creature::Essential));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%02X)", flags);
properties += std::format("(0x{:02X})", flags);
return properties;
}
@@ -760,7 +760,7 @@ std::string enchantmentFlags(int flags)
properties += "Autocalc ";
if (flags & (0xFFFFFFFF ^ ESM::Enchantment::Autocalc))
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -778,7 +778,7 @@ std::string landFlags(std::uint32_t flags)
int unused = 0xFFFFFFFF ^ (ESM::Land::Flag_HeightsNormals | ESM::Land::Flag_Colors | ESM::Land::Flag_Textures);
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -794,7 +794,7 @@ std::string itemListFlags(int flags)
int unused = (0xFFFFFFFF ^ (ESM::ItemLevList::AllLevels | ESM::ItemLevList::Each));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -808,7 +808,7 @@ std::string creatureListFlags(int flags)
int unused = (0xFFFFFFFF ^ ESM::CreatureLevList::AllLevels);
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -840,7 +840,7 @@ std::string lightFlags(int flags)
| ESM::Light::Pulse | ESM::Light::PulseSlow | ESM::Light::Negative | ESM::Light::OffDefault));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -888,7 +888,7 @@ std::string magicEffectFlags(int flags)
if (flags & 0xFFFC0000)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -913,7 +913,7 @@ std::string npcFlags(int flags)
= (0xFF ^ (ESM::NPC::Base | ESM::NPC::Autocalc | ESM::NPC::Female | ESM::NPC::Respawn | ESM::NPC::Essential));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%02X)", flags);
properties += std::format("(0x{:02X})", flags);
return properties;
}
@@ -930,7 +930,7 @@ std::string raceFlags(int flags)
int unused = (0xFFFFFFFF ^ (ESM::Race::Playable | ESM::Race::Beast));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -948,7 +948,7 @@ std::string spellFlags(int flags)
int unused = (0xFFFFFFFF ^ (ESM::Spell::F_Autocalc | ESM::Spell::F_PCStart | ESM::Spell::F_Always));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -967,7 +967,7 @@ std::string weaponFlags(int flags)
int unused = (0xFFFFFFFF ^ (ESM::Weapon::Magical | ESM::Weapon::Silver));
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -987,7 +987,7 @@ std::string recordFlags(uint32_t flags)
int unused = ~(ESM::FLAG_Deleted | ESM::FLAG_Persistent | ESM::FLAG_Ignored | ESM::FLAG_Blocked);
if (flags & unused)
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
@@ -1000,6 +1000,6 @@ std::string potionFlags(int flags)
properties += "Autocalc ";
if (flags & (0xFFFFFFFF ^ ESM::Enchantment::Autocalc))
properties += "Invalid ";
properties += Misc::StringUtils::format("(0x%08X)", flags);
properties += std::format("(0x{:08X})", flags);
return properties;
}
+82 -78
View File
@@ -1,22 +1,23 @@
#include "record.hpp"
#include "labels.hpp"
#include <format>
#include <iostream>
#include <numeric>
#include <sstream>
#include <osg/Math>
#include <components/esm3/cellstate.hpp>
#include <components/esm3/esmreader.hpp>
#include <components/misc/strings/conversion.hpp>
#include <components/misc/strings/format.hpp>
namespace
{
void printAIPackage(const ESM::AIPackage& p)
{
std::cout << " AI Type: " << aiTypeLabel(p.mType) << " (" << Misc::StringUtils::format("0x%08X", p.mType)
<< ")" << std::endl;
std::cout << std::format(" AI Type: {} (0x{:08X})\n", aiTypeLabel(p.mType), std::uint32_t(p.mType));
if (p.mType == ESM::AI_Wander)
{
std::cout << " Distance: " << p.mWander.mDistance << std::endl;
@@ -51,7 +52,7 @@ namespace
}
else
{
std::cout << " BadPackage: " << Misc::StringUtils::format("0x%08X", p.mType) << std::endl;
std::cout << std::format(" BadPackage: 0x{:08X}\n", std::uint32_t(p.mType));
}
if (!p.mCellName.empty())
@@ -60,81 +61,81 @@ namespace
std::string ruleString(const ESM::DialogueCondition& ss)
{
std::string_view type_str = "INVALID";
std::string_view func_str;
std::string_view typeStr = "INVALID";
std::string_view funcStr;
switch (ss.mFunction)
{
case ESM::DialogueCondition::Function_Global:
type_str = "Global";
func_str = ss.mVariable;
typeStr = "Global";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_Local:
type_str = "Local";
func_str = ss.mVariable;
typeStr = "Local";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_Journal:
type_str = "Journal";
func_str = ss.mVariable;
typeStr = "Journal";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_Item:
type_str = "Item count";
func_str = ss.mVariable;
typeStr = "Item count";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_Dead:
type_str = "Dead";
func_str = ss.mVariable;
typeStr = "Dead";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_NotId:
type_str = "Not ID";
func_str = ss.mVariable;
typeStr = "Not ID";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_NotFaction:
type_str = "Not Faction";
func_str = ss.mVariable;
typeStr = "Not Faction";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_NotClass:
type_str = "Not Class";
func_str = ss.mVariable;
typeStr = "Not Class";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_NotRace:
type_str = "Not Race";
func_str = ss.mVariable;
typeStr = "Not Race";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_NotCell:
type_str = "Not Cell";
func_str = ss.mVariable;
typeStr = "Not Cell";
funcStr = ss.mVariable;
break;
case ESM::DialogueCondition::Function_NotLocal:
type_str = "Not Local";
func_str = ss.mVariable;
typeStr = "Not Local";
funcStr = ss.mVariable;
break;
default:
type_str = "Function";
func_str = ruleFunction(ss.mFunction);
typeStr = "Function";
funcStr = ruleFunction(ss.mFunction);
break;
}
std::string_view oper_str = "??";
std::string_view operStr = "??";
switch (ss.mComparison)
{
case ESM::DialogueCondition::Comp_Eq:
oper_str = "==";
operStr = "==";
break;
case ESM::DialogueCondition::Comp_Ne:
oper_str = "!=";
operStr = "!=";
break;
case ESM::DialogueCondition::Comp_Gt:
oper_str = "> ";
operStr = "> ";
break;
case ESM::DialogueCondition::Comp_Ge:
oper_str = ">=";
operStr = ">=";
break;
case ESM::DialogueCondition::Comp_Ls:
oper_str = "< ";
operStr = "< ";
break;
case ESM::DialogueCondition::Comp_Le:
oper_str = "<=";
operStr = "<=";
break;
default:
break;
@@ -143,8 +144,7 @@ namespace
std::ostringstream stream;
std::visit([&](auto value) { stream << value; }, ss.mValue);
std::string result
= Misc::StringUtils::format("%-12s %-32s %2s %s", type_str, func_str, oper_str, stream.str());
std::string result = std::format("{:<12} {:<32} {:2} {}", typeStr, funcStr, operStr, stream.str());
return result;
}
@@ -153,14 +153,16 @@ namespace
int i = 0;
for (const ESM::IndexedENAMstruct& effect : effects.mList)
{
std::cout << " Effect[" << i << "]: " << magicEffectLabel(effect.mData.mEffectID) << " ("
<< effect.mData.mEffectID << ")" << std::endl;
if (effect.mData.mSkill != -1)
std::cout << " Skill: " << skillLabel(effect.mData.mSkill) << " (" << (int)effect.mData.mSkill << ")"
int effectIdx = ESM::MagicEffect::refIdToIndex(effect.mData.mEffectID);
int skillIdx = ESM::Skill::refIdToIndex(effect.mData.mSkill);
int attributeIdx = ESM::Attribute::refIdToIndex(effect.mData.mAttribute);
std::cout << " Effect[" << i << "]: " << magicEffectLabel(effectIdx) << " (" << effectIdx << ")"
<< std::endl;
if (skillIdx != -1)
std::cout << " Skill: " << skillLabel(skillIdx) << " (" << skillIdx << ")" << std::endl;
if (attributeIdx != -1)
std::cout << " Attribute: " << attributeLabel(attributeIdx) << " (" << attributeIdx << ")"
<< std::endl;
if (effect.mData.mAttribute != -1)
std::cout << " Attribute: " << attributeLabel(effect.mData.mAttribute) << " ("
<< (int)effect.mData.mAttribute << ")" << std::endl;
std::cout << " Range: " << rangeTypeLabel(effect.mData.mRange) << " (" << effect.mData.mRange << ")"
<< std::endl;
// Area is always zero if range type is "Self"
@@ -176,12 +178,11 @@ namespace
{
for (const ESM::Transport::Dest& dest : transport)
{
std::cout << " Destination Position: " << Misc::StringUtils::format("%12.3f", dest.mPos.pos[0]) << ","
<< Misc::StringUtils::format("%12.3f", dest.mPos.pos[1]) << ","
<< Misc::StringUtils::format("%12.3f", dest.mPos.pos[2]) << ")" << std::endl;
std::cout << " Destination Rotation: " << Misc::StringUtils::format("%9.6f", dest.mPos.rot[0]) << ","
<< Misc::StringUtils::format("%9.6f", dest.mPos.rot[1]) << ","
<< Misc::StringUtils::format("%9.6f", dest.mPos.rot[2]) << ")" << std::endl;
std::cout << std::format(" Destination Position: ({:12.3f}, {:12.3f}, {:12.3f})\n", dest.mPos.pos[0],
dest.mPos.pos[1], dest.mPos.pos[2]);
std::cout << std::format(" Destination Rotation: ({:12.3f}, {:12.3f}, {:12.3f})\n",
osg::RadiansToDegrees(dest.mPos.rot[0]), osg::RadiansToDegrees(dest.mPos.rot[1]),
osg::RadiansToDegrees(dest.mPos.rot[2]));
if (!dest.mCellName.empty())
std::cout << " Destination Cell: " << dest.mCellName << std::endl;
}
@@ -583,7 +584,7 @@ namespace EsmTool
std::cout << " Water Level: " << mData.mWater << std::endl;
}
else
std::cout << " Map Color: " << Misc::StringUtils::format("0x%08X", mData.mMapColor) << std::endl;
std::cout << std::format(" Map Color: 0x{:08X}\n", mData.mMapColor);
std::cout << " RefId counter: " << mData.mRefNumCounter << std::endl;
std::cout << " Deleted: " << mIsDeleted << std::endl;
}
@@ -594,7 +595,7 @@ namespace EsmTool
std::cout << " Name: " << mData.mName << std::endl;
std::cout << " Description: " << mData.mDescription << std::endl;
std::cout << " Playable: " << mData.mData.mIsPlayable << std::endl;
std::cout << " AI Services: " << Misc::StringUtils::format("0x%08X", mData.mData.mServices) << std::endl;
std::cout << std::format(" AI Services: 0x{:08X}\n", mData.mData.mServices);
for (size_t i = 0; i < mData.mData.mAttribute.size(); ++i)
std::cout << " Attribute" << (i + 1) << ": " << attributeLabel(mData.mData.mAttribute[i]) << " ("
<< mData.mData.mAttribute[i] << ")" << std::endl;
@@ -642,8 +643,7 @@ namespace EsmTool
std::cout << " Flags: " << containerFlags(mData.mFlags) << std::endl;
std::cout << " Weight: " << mData.mWeight << std::endl;
for (const ESM::ContItem& item : mData.mInventory.mList)
std::cout << " Inventory: Count: " << Misc::StringUtils::format("%4d", item.mCount)
<< " Item: " << item.mItem << std::endl;
std::cout << std::format(" Inventory: Count: {:4d} Item: ", item.mCount) << item.mItem << std::endl;
std::cout << " Deleted: " << mIsDeleted << std::endl;
}
@@ -665,7 +665,8 @@ namespace EsmTool
std::cout << " Attributes:" << std::endl;
for (size_t i = 0; i < mData.mData.mAttributes.size(); ++i)
std::cout << " " << ESM::Attribute::indexToRefId(i) << ": " << mData.mData.mAttributes[i] << std::endl;
std::cout << " " << ESM::Attribute::indexToRefId(static_cast<int>(i)) << ": "
<< mData.mData.mAttributes[i] << std::endl;
std::cout << " Health: " << mData.mData.mHealth << std::endl;
std::cout << " Magicka: " << mData.mData.mMana << std::endl;
@@ -680,8 +681,7 @@ namespace EsmTool
std::cout << " Gold: " << mData.mData.mGold << std::endl;
for (const ESM::ContItem& item : mData.mInventory.mList)
std::cout << " Inventory: Count: " << Misc::StringUtils::format("%4d", item.mCount)
<< " Item: " << item.mItem << std::endl;
std::cout << std::format(" Inventory: Count: {:4d} Item: ", item.mCount) << item.mItem << std::endl;
for (const auto& spell : mData.mSpells.mList)
std::cout << " Spell: " << spell << std::endl;
@@ -693,7 +693,7 @@ namespace EsmTool
std::cout << " AI Fight:" << (int)mData.mAiData.mFight << std::endl;
std::cout << " AI Flee:" << (int)mData.mAiData.mFlee << std::endl;
std::cout << " AI Alarm:" << (int)mData.mAiData.mAlarm << std::endl;
std::cout << " AI Services:" << Misc::StringUtils::format("0x%08X", mData.mAiData.mServices) << std::endl;
std::cout << std::format(" AI Services:0x{:08X}\n", mData.mAiData.mServices);
for (const ESM::AIPackage& package : mData.mAiPackage.mList)
printAIPackage(package);
@@ -755,7 +755,7 @@ namespace EsmTool
std::cout << " Attribute2 Requirement: " << mData.mData.mRankData[i].mAttribute2 << std::endl;
std::cout << " One Skill at Level: " << mData.mData.mRankData[i].mPrimarySkill << std::endl;
std::cout << " Two Skills at Level: " << mData.mData.mRankData[i].mFavouredSkill << std::endl;
std::cout << " Faction Reaction: " << mData.mData.mRankData[i].mFactReaction << std::endl;
std::cout << " Faction Reputation: " << mData.mData.mRankData[i].mFactReputation << std::endl;
}
for (const auto& reaction : mData.mReactions)
std::cout << " Reaction: " << reaction.second << " = " << reaction.first << std::endl;
@@ -845,15 +845,16 @@ namespace EsmTool
std::cout << " Value: " << mData.mData.mValue << std::endl;
for (int i = 0; i != 4; i++)
{
// A value of -1 means no effect
if (mData.mData.mEffectID[i] == -1)
// A value of EmptyRefId means no effect
if (mData.mData.mEffectID[i].empty())
continue;
std::cout << " Effect: " << magicEffectLabel(mData.mData.mEffectID[i]) << " (" << mData.mData.mEffectID[i]
<< ")" << std::endl;
std::cout << " Skill: " << skillLabel(mData.mData.mSkills[i]) << " (" << mData.mData.mSkills[i] << ")"
<< std::endl;
std::cout << " Attribute: " << attributeLabel(mData.mData.mAttributes[i]) << " ("
<< mData.mData.mAttributes[i] << ")" << std::endl;
int effectIdx = ESM::MagicEffect::refIdToIndex(mData.mData.mEffectID[i]);
int skillIdx = ESM::Skill::refIdToIndex(mData.mData.mSkills[i]);
int attributeIdx = ESM::Attribute::refIdToIndex(mData.mData.mAttributes[i]);
std::cout << " Effect: " << magicEffectLabel(effectIdx) << " (" << effectIdx << ")" << std::endl;
std::cout << " Skill: " << skillLabel(skillIdx) << " (" << skillIdx << ")" << std::endl;
std::cout << " Attribute: " << attributeLabel(attributeIdx) << " (" << attributeIdx << ")" << std::endl;
}
std::cout << " Deleted: " << mIsDeleted << std::endl;
}
@@ -975,7 +976,8 @@ namespace EsmTool
template <>
void Record<ESM::MagicEffect>::print()
{
std::cout << " Index: " << magicEffectLabel(mData.mIndex) << " (" << mData.mIndex << ")" << std::endl;
int effectIdx = ESM::MagicEffect::refIdToIndex(mData.mId);
std::cout << " Index: " << magicEffectLabel(effectIdx) << " (" << effectIdx << ")" << std::endl;
std::cout << " Description: " << mData.mDescription << std::endl;
std::cout << " Icon: " << mData.mIcon << std::endl;
std::cout << " Flags: " << magicEffectFlags(mData.mData.mFlags) << std::endl;
@@ -1055,11 +1057,13 @@ namespace EsmTool
std::cout << " Attributes:" << std::endl;
for (size_t i = 0; i != mData.mNpdt.mAttributes.size(); i++)
std::cout << " " << attributeLabel(i) << ": " << int(mData.mNpdt.mAttributes[i]) << std::endl;
std::cout << " " << attributeLabel(static_cast<int>(i)) << ": " << int(mData.mNpdt.mAttributes[i])
<< std::endl;
std::cout << " Skills:" << std::endl;
for (size_t i = 0; i != mData.mNpdt.mSkills.size(); i++)
std::cout << " " << skillLabel(i) << ": " << int(mData.mNpdt.mSkills[i]) << std::endl;
std::cout << " " << skillLabel(static_cast<int>(i)) << ": " << int(mData.mNpdt.mSkills[i])
<< std::endl;
std::cout << " Health: " << mData.mNpdt.mHealth << std::endl;
std::cout << " Magicka: " << mData.mNpdt.mMana << std::endl;
@@ -1068,8 +1072,7 @@ namespace EsmTool
}
for (const ESM::ContItem& item : mData.mInventory.mList)
std::cout << " Inventory: Count: " << Misc::StringUtils::format("%4d", item.mCount)
<< " Item: " << item.mItem << std::endl;
std::cout << std::format(" Inventory: Count: {:4d} Item: ", item.mCount) << item.mItem << std::endl;
for (const auto& spell : mData.mSpells.mList)
std::cout << " Spell: " << spell << std::endl;
@@ -1081,7 +1084,7 @@ namespace EsmTool
std::cout << " AI Fight:" << (int)mData.mAiData.mFight << std::endl;
std::cout << " AI Flee:" << (int)mData.mAiData.mFlee << std::endl;
std::cout << " AI Alarm:" << (int)mData.mAiData.mAlarm << std::endl;
std::cout << " AI Services:" << Misc::StringUtils::format("0x%08X", mData.mAiData.mServices) << std::endl;
std::cout << std::format(" AI Services:0x{:08X}\n", mData.mAiData.mServices);
for (const ESM::AIPackage& package : mData.mAiPackage.mList)
printAIPackage(package);
@@ -1192,8 +1195,8 @@ namespace EsmTool
std::cout << " Variable: " << variable << std::endl;
std::cout << " ByteCode: ";
for (const unsigned char& byte : mData.mScriptData)
std::cout << Misc::StringUtils::format("%02X", (int)(byte));
for (unsigned char byte : mData.mScriptData)
std::cout << std::format("{:02X}", byte);
std::cout << std::endl;
if (mPrintPlain)
@@ -1312,7 +1315,8 @@ namespace EsmTool
std::cout << " Hour:" << mData.mCellState.mLastRespawn.mHour << std::endl;
if (mData.mCellState.mHasFogOfWar)
{
std::cout << " North Marker Angle: " << mData.mFogState.mNorthMarkerAngle << std::endl;
std::cout << " North Marker Angle: " << osg::RadiansToDegrees(mData.mFogState.mNorthMarkerAngle)
<< std::endl;
std::cout << " Bounds:" << std::endl;
std::cout << " Min X: " << mData.mFogState.mBounds.mMinX << std::endl;
std::cout << " Min Y: " << mData.mFogState.mBounds.mMinY << std::endl;
+6 -6
View File
@@ -15,7 +15,7 @@
#include <components/esm4/readerutils.hpp>
#include <components/esm4/records.hpp>
#include <components/esm4/typetraits.hpp>
#include <components/to_utf8/to_utf8.hpp>
#include <components/toutf8/toutf8.hpp>
namespace EsmTool
{
@@ -572,13 +572,13 @@ namespace EsmTool
}
}
auto visitorRec = [&params](ESM4::Reader& reader) { return readRecord(params, reader); };
auto visitorGroup = [&params](ESM4::Reader& reader) {
auto visitorRec = [&params](ESM4::Reader& r) { return readRecord(params, r); };
auto visitorGroup = [&params](ESM4::Reader& r) {
if (params.mQuite)
return;
auto groupType = static_cast<ESM4::GroupType>(reader.hdr().group.type);
std::cout << "\nGroup: " << toString(groupType) << " "
<< ESM::NAME(reader.hdr().group.typeId).toStringView() << '\n';
auto groupType = static_cast<ESM4::GroupType>(r.hdr().group.type);
std::cout << "\nGroup: " << toString(groupType) << " " << ESM::NAME(r.hdr().group.typeId).toStringView()
<< '\n';
};
ESM4::ReaderUtils::readAll(reader, visitorRec, visitorGroup);
}
+4 -1
View File
@@ -17,7 +17,6 @@ set(ESSIMPORTER_FILES
importscpt.cpp
importproj.cpp
importsplm.cpp
importercontext.cpp
converter.cpp
convertacdt.cpp
convertnpcc.cpp
@@ -38,6 +37,10 @@ target_link_libraries(openmw-essimporter
components
)
if (WIN32)
target_sources(openmw-essimporter PRIVATE ${CMAKE_SOURCE_DIR}/files/windows/other-apps.manifest)
endif()
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw-essimporter PRIVATE --coverage)
target_link_libraries(openmw-essimporter gcov)
+3 -3
View File
@@ -48,8 +48,8 @@ namespace ESSImport
for (int i = 0; i < ESM::Skill::Length; ++i)
{
npcStats.mSkills[i].mMod = 0.f;
npcStats.mSkills[i].mCurrent = actorData.mSkills[i][1];
npcStats.mSkills[i].mBase = actorData.mSkills[i][0];
npcStats.mSkills[i].mCurrent = static_cast<float>(actorData.mSkills[i][1]);
npcStats.mSkills[i].mBase = static_cast<float>(actorData.mSkills[i][0]);
}
npcStats.mTimeToStartDrowning = actorData.mACDT.mBreathMeter;
@@ -90,7 +90,7 @@ namespace ESSImport
scriptedAnim.mAbsolute = true;
// Neither loop count nor queueing seems to be supported by the ess format.
scriptedAnim.mLoopCount = std::numeric_limits<size_t>::max();
state.mScriptedAnims.push_back(scriptedAnim);
state.mScriptedAnims.push_back(std::move(scriptedAnim));
}
else
// TODO: Handle 0xFF index, which seems to be used for finished animations.
+18 -21
View File
@@ -18,7 +18,7 @@
namespace
{
void convertImage(char* data, int size, int width, int height, GLenum pf, const std::string& out)
void convertImage(char* data, size_t size, int width, int height, GLenum pf, const std::string& out)
{
osg::ref_ptr<osg::Image> image(new osg::Image);
image->allocateImage(width, height, 1, pf, GL_UNSIGNED_BYTE);
@@ -64,7 +64,7 @@ namespace
refId = indexedRefId.substr(0, indexedRefId.size() - 8);
}
int convertActorId(const std::string& indexedRefId, ESSImport::Context& context)
ESM::RefNum convertActorId(const std::string& indexedRefId, ESSImport::Context& context)
{
if (isIndexedRefId(indexedRefId))
{
@@ -73,16 +73,15 @@ namespace
splitIndexedRefId(indexedRefId, refIndex, refId);
auto it = context.mActorIdMap.find(std::make_pair(refIndex, ESM::RefId::stringRefId(refId)));
if (it == context.mActorIdMap.end())
return -1;
return it->second;
if (it != context.mActorIdMap.end())
return it->second;
}
else if (indexedRefId == "PlayerSaveGame")
{
return context.mPlayer.mObject.mCreatureStats.mActorId;
return context.mPlayer.mObject.mRef.mRefNum;
}
return -1;
return {};
}
}
@@ -114,7 +113,7 @@ namespace ESSImport
mGlobalMapImage->scaleImage(maph.size * 2, maph.size * 2, 1, GL_UNSIGNED_BYTE);
}
void ConvertFMAP::write(ESM::ESMWriter& esm)
void ConvertFMAP::write(ESM::ESMWriter& esm) const
{
int numcells = mGlobalMapImage->s() / 18; // NB truncating, doesn't divide perfectly
// with the 512x512 map the game has by default
@@ -303,7 +302,7 @@ namespace ESSImport
marker.mWorldY = notepos[1];
marker.mNote = std::move(note);
marker.mCell = cell.mId;
mMarkers.push_back(marker);
mMarkers.push_back(std::move(marker));
}
newcell.mRefs = std::move(cellrefs);
@@ -314,7 +313,7 @@ namespace ESSImport
mIntCells[cell.mName] = std::move(newcell);
}
void ConvertCell::writeCell(const Cell& cell, ESM::ESMWriter& esm)
void ConvertCell::writeCell(const Cell& cell, ESM::ESMWriter& esm) const
{
ESM::Cell esmcell = cell.mCell;
esm.startRecord(ESM::REC_CSTA);
@@ -378,9 +377,8 @@ namespace ESSImport
convertNPCC(npccIt->second, objstate);
convertCellRef(cellref, objstate);
objstate.mCreatureStats.mActorId = mContext->generateActorId();
mContext->mActorIdMap.insert(
std::make_pair(std::make_pair(refIndex, out.mRefID), objstate.mCreatureStats.mActorId));
mContext->generateRefNum(objstate.mRef.mRefNum);
mContext->mActorIdMap.emplace(std::make_pair(refIndex, out.mRefID), objstate.mRef.mRefNum);
esm.writeHNT("OBJE", ESM::REC_NPC_);
objstate.save(esm);
@@ -419,9 +417,8 @@ namespace ESSImport
convertCREC(crecIt->second, objstate);
convertCellRef(cellref, objstate);
objstate.mCreatureStats.mActorId = mContext->generateActorId();
mContext->mActorIdMap.insert(
std::make_pair(std::make_pair(refIndex, out.mRefID), objstate.mCreatureStats.mActorId));
mContext->generateRefNum(objstate.mRef.mRefNum);
mContext->mActorIdMap.emplace(std::make_pair(refIndex, out.mRefID), objstate.mRef.mRefNum);
esm.writeHNT("OBJE", ESM::REC_CREA);
objstate.save(esm);
@@ -437,7 +434,7 @@ namespace ESSImport
esm.endRecord(ESM::REC_CSTA);
}
void ConvertCell::write(ESM::ESMWriter& esm)
void ConvertCell::write(ESM::ESMWriter& esm) const
{
for (const auto& cell : mIntCells)
writeCell(cell.second, esm);
@@ -458,7 +455,7 @@ namespace ESSImport
mProj.load(esm);
}
void ConvertPROJ::write(ESM::ESMWriter& esm)
void ConvertPROJ::write(ESM::ESMWriter& esm) const
{
for (const PROJ::PNAM& pnam : mProj.mProjectiles)
{
@@ -501,7 +498,7 @@ namespace ESSImport
}
}
void ConvertPROJ::convertBaseState(ESM::BaseProjectileState& base, const PROJ::PNAM& pnam)
void ConvertPROJ::convertBaseState(ESM::BaseProjectileState& base, const PROJ::PNAM& pnam) const
{
base.mId = ESM::RefId::stringRefId(pnam.mArrowId.toString());
base.mPosition = pnam.mPosition;
@@ -510,7 +507,7 @@ namespace ESSImport
orient.makeRotate(osg::Vec3f(0, 1, 0), pnam.mVelocity);
base.mOrientation = orient;
base.mActorId = convertActorId(pnam.mActorId.toString(), *mContext);
base.mCaster = convertActorId(pnam.mActorId.toString(), *mContext);
}
void ConvertSPLM::read(ESM::ESMReader& esm)
@@ -519,7 +516,7 @@ namespace ESSImport
mContext->mActiveSpells = mSPLM.mActiveSpells;
}
void ConvertSPLM::write(ESM::ESMWriter& esm)
void ConvertSPLM::write(ESM::ESMWriter& esm) const
{
std::cerr << "Warning: Skipped active spell conversion (not implemented)" << std::endl;
}
+33 -33
View File
@@ -54,7 +54,7 @@ namespace ESSImport
{
public:
/// @return the order for writing this converter's records to the output file, in relation to other converters
virtual int getStage() { return 1; }
virtual int getStage() const { return 1; }
virtual ~Converter() = default;
@@ -66,7 +66,7 @@ namespace ESSImport
/// Called after the input file has been read in completely, which may be necessary
/// if the conversion process relies on information in other records
virtual void write(ESM::ESMWriter& esm) {}
virtual void write(ESM::ESMWriter& esm) const {}
protected:
Context* mContext;
@@ -77,7 +77,7 @@ namespace ESSImport
class DefaultConverter : public Converter
{
public:
int getStage() override { return 0; }
int getStage() const override { return 0; }
void read(ESM::ESMReader& esm) override
{
@@ -88,7 +88,7 @@ namespace ESSImport
mRecords[record.mId] = record;
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
for (auto it = mRecords.begin(); it != mRecords.end(); ++it)
{
@@ -181,14 +181,14 @@ namespace ESSImport
public:
void read(ESM::ESMReader& esm) override
{
ESM::Class class_;
ESM::Class classRecord;
bool isDeleted = false;
class_.load(esm, isDeleted);
if (class_.mId == "NEWCLASSID_CHARGEN")
mContext->mCustomPlayerClassName = class_.mName;
classRecord.load(esm, isDeleted);
if (classRecord.mId == "NEWCLASSID_CHARGEN")
mContext->mCustomPlayerClassName = classRecord.mName;
mRecords[class_.mId] = class_;
mRecords[classRecord.mId] = classRecord;
}
};
@@ -249,23 +249,23 @@ namespace ESSImport
{
ESM::InventoryState& invState = mContext->mPlayer.mObject.mInventory;
for (size_t i = 0; i < invState.mItems.size(); ++i)
for (uint32_t i = 0; i < static_cast<uint32_t>(invState.mItems.size()); ++i)
{
// FIXME: in case of conflict (multiple items with this refID) use the already equipped one?
if (invState.mItems[i].mRef.mRefID == ESM::RefId::stringRefId(refr.mActorData.mSelectedEnchantItem))
if (invState.mItems[i].mRef.mRefID == refr.mActorData.mSelectedEnchantItem)
invState.mSelectedEnchantItem = i;
}
}
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
esm.startRecord(ESM::REC_ASPL);
esm.writeHNString("ID__", mSelectedSpell);
esm.writeHNRefId("ID__", mSelectedSpell);
esm.endRecord(ESM::REC_ASPL);
}
private:
std::string mSelectedSpell;
ESM::RefId mSelectedSpell;
};
class ConvertPCDT : public Converter
@@ -286,7 +286,7 @@ namespace ESSImport
convertPCDT(pcdt, mContext->mPlayer, mContext->mDialogueState.mKnownTopics, mFirstPersonCam,
mTeleportingEnabled, mLevitationEnabled, mContext->mControlsState);
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
esm.startRecord(ESM::REC_ENAB);
esm.writeHNT("TELE", mTeleportingEnabled);
@@ -331,7 +331,7 @@ namespace ESSImport
{
public:
void read(ESM::ESMReader& esm) override;
void write(ESM::ESMWriter& esm) override;
void write(ESM::ESMWriter& esm) const override;
private:
osg::ref_ptr<osg::Image> mGlobalMapImage;
@@ -341,7 +341,7 @@ namespace ESSImport
{
public:
void read(ESM::ESMReader& esm) override;
void write(ESM::ESMWriter& esm) override;
void write(ESM::ESMWriter& esm) const override;
private:
struct Cell
@@ -356,7 +356,7 @@ namespace ESSImport
std::vector<ESM::CustomMarker> mMarkers;
void writeCell(const Cell& cell, ESM::ESMWriter& esm);
void writeCell(const Cell& cell, ESM::ESMWriter& esm) const;
};
class ConvertKLST : public Converter
@@ -371,19 +371,19 @@ namespace ESSImport
mContext->mPlayer.mObject.mNpcStats.mWerewolfKills = klst.mWerewolfKills;
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
esm.startRecord(ESM::REC_DCOU);
for (auto it = mKillCounter.begin(); it != mKillCounter.end(); ++it)
for (const auto& [id, count] : mKillCounter)
{
esm.writeHNString("ID__", it->first);
esm.writeHNT("COUN", it->second);
esm.writeHNRefId("ID__", id);
esm.writeHNT("COUN", count);
}
esm.endRecord(ESM::REC_DCOU);
}
private:
std::map<std::string, int> mKillCounter;
std::map<ESM::RefId, int> mKillCounter;
};
class ConvertFACT : public Converter
@@ -428,7 +428,7 @@ namespace ESSImport
}
}
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
ESM::StolenItems items;
for (auto it = mStolenItems.begin(); it != mStolenItems.end(); ++it)
@@ -486,7 +486,7 @@ namespace ESSImport
if (dial.mIndex > 0)
mDials[id] = dial;
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
for (auto it = mDials.begin(); it != mDials.end(); ++it)
{
@@ -539,7 +539,7 @@ namespace ESSImport
mHasGame = true;
}
int validateWeatherID(int weatherID)
int validateWeatherID(int weatherID) const
{
if (weatherID >= -1 && weatherID < 10)
{
@@ -551,7 +551,7 @@ namespace ESSImport
}
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
if (!mHasGame)
return;
@@ -584,9 +584,9 @@ namespace ESSImport
script.load(esm);
ESM::GlobalScript out;
convertSCPT(script, out);
mScripts.push_back(out);
mScripts.push_back(std::move(out));
}
void write(ESM::ESMWriter& esm) override
void write(ESM::ESMWriter& esm) const override
{
for (const auto& script : mScripts)
{
@@ -604,12 +604,12 @@ namespace ESSImport
class ConvertPROJ : public Converter
{
public:
int getStage() override { return 2; }
int getStage() const override { return 2; }
void read(ESM::ESMReader& esm) override;
void write(ESM::ESMWriter& esm) override;
void write(ESM::ESMWriter& esm) const override;
private:
void convertBaseState(ESM::BaseProjectileState& base, const PROJ::PNAM& pnam);
void convertBaseState(ESM::BaseProjectileState& base, const PROJ::PNAM& pnam) const;
PROJ mProj;
};
@@ -617,7 +617,7 @@ namespace ESSImport
{
public:
void read(ESM::ESMReader& esm) override;
void write(ESM::ESMWriter& esm) override;
void write(ESM::ESMWriter& esm) const override;
private:
SPLM mSPLM;
+1 -1
View File
@@ -11,7 +11,7 @@ namespace ESSImport
{
out.mId = ESM::RefId::stringRefId(scpt.mSCHD.mName.toString());
out.mRunning = scpt.mRunning;
out.mTargetRef = ESM::RefNum{}; // TODO: convert target reference of global script
out.mTargetRef = scpt.mRefNum;
convertSCRI(scpt.mSCRI, out.mLocals);
}
+2 -2
View File
@@ -75,8 +75,8 @@ namespace ESSImport
// to change them ingame
int mCombatStats[3][2];
std::string mSelectedSpell;
std::string mSelectedEnchantItem;
ESM::RefId mSelectedSpell;
ESM::RefId mSelectedEnchantItem;
SCRI mSCRI;
+3 -3
View File
@@ -107,12 +107,12 @@ namespace ESSImport
if (esm.isNextSub("WNAM"))
{
std::string id = esm.getHString();
ESM::RefId spellRefId = esm.getRefId();
if (esm.isNextSub("XNAM"))
mActorData.mSelectedEnchantItem = esm.getHString();
mActorData.mSelectedEnchantItem = esm.getRefId();
else
mActorData.mSelectedSpell = std::move(id);
mActorData.mSelectedSpell = std::move(spellRefId);
if (esm.isNextSub("YNAM"))
esm.skipHSub(); // 4 byte, 0
+21 -20
View File
@@ -25,7 +25,7 @@
#include <components/misc/constants.hpp>
#include <components/to_utf8/to_utf8.hpp>
#include <components/toutf8/toutf8.hpp>
#include "importercontext.hpp"
@@ -136,9 +136,9 @@ namespace ESSImport
sub.mName = esm.retSubName().toString();
sub.mData.resize(esm.getSubSize());
esm.getExact(sub.mData.data(), sub.mData.size());
rec.mSubrecords.push_back(sub);
rec.mSubrecords.push_back(std::move(sub));
}
file.mRecords.push_back(rec);
file.mRecords.push_back(std::move(rec));
}
}
@@ -388,13 +388,22 @@ namespace ESSImport
profile.save(writer);
writer.endRecord(ESM::REC_SAVE);
writer.startRecord(ESM::REC_DIAS);
context.mDialogueState.save(writer);
writer.endRecord(ESM::REC_DIAS);
writer.startRecord(ESM::REC_LUAM);
writer.writeHNT<double>("LUAW", 0);
writer.writeFormId(context.mNextRefNum, true);
writer.endRecord(ESM::REC_LUAM);
// Writing order should be Dynamic Store -> Cells -> Player,
// so that references to dynamic records can be recognized when loading
for (auto it = converters.begin(); it != converters.end(); ++it)
for (const auto& [_, converter] : converters)
{
if (it->second->getStage() != 0)
if (converter->getStage() != 0)
continue;
it->second->write(writer);
converter->write(writer);
}
writer.startRecord(ESM::REC_NPC_);
@@ -402,11 +411,11 @@ namespace ESSImport
context.mPlayerBase.save(writer);
writer.endRecord(ESM::REC_NPC_);
for (auto it = converters.begin(); it != converters.end(); ++it)
for (const auto& [_, converter] : converters)
{
if (it->second->getStage() != 1)
if (converter->getStage() != 1)
continue;
it->second->write(writer);
converter->write(writer);
}
writer.startRecord(ESM::REC_PLAY);
@@ -418,22 +427,14 @@ namespace ESSImport
context.mPlayer.save(writer);
writer.endRecord(ESM::REC_PLAY);
writer.startRecord(ESM::REC_ACTC);
writer.writeHNT("COUN", context.mNextActorId);
writer.endRecord(ESM::REC_ACTC);
// Stage 2 requires cell references to be written / actors IDs assigned
for (auto it = converters.begin(); it != converters.end(); ++it)
for (const auto& [_, converter] : converters)
{
if (it->second->getStage() != 2)
if (converter->getStage() != 2)
continue;
it->second->write(writer);
converter->write(writer);
}
writer.startRecord(ESM::REC_DIAS);
context.mDialogueState.save(writer);
writer.endRecord(ESM::REC_DIAS);
writer.startRecord(ESM::REC_INPU);
context.mControlsState.save(writer);
writer.endRecord(ESM::REC_INPU);
+13 -5
View File
@@ -45,8 +45,8 @@ namespace ESSImport
std::map<std::pair<int, ESM::RefId>, NPCC> mNpcChanges;
std::map<std::pair<int, ESM::RefId>, CNTC> mContainerChanges;
std::map<std::pair<int, ESM::RefId>, int> mActorIdMap;
int mNextActorId;
std::map<std::pair<int, ESM::RefId>, ESM::RefNum> mActorIdMap;
ESM::RefNum mNextRefNum;
std::map<ESM::RefId, ESM::Creature> mCreatures;
std::map<ESM::RefId, ESM::NPC> mNpcs;
@@ -58,7 +58,6 @@ namespace ESSImport
, mMonth(0)
, mYear(0)
, mHour(0.f)
, mNextActorId(0)
{
mPlayer.mCellId = ESM::RefId::esm3ExteriorCell(0, 0);
mPlayer.mLastKnownExteriorPosition[0] = mPlayer.mLastKnownExteriorPosition[1]
@@ -69,7 +68,7 @@ namespace ESSImport
mPlayer.mObject.blank();
mPlayer.mObject.mEnabled = true;
mPlayer.mObject.mRef.mRefID = ESM::RefId::stringRefId("player"); // REFR.mRefID would be PlayerSaveGame
mPlayer.mObject.mCreatureStats.mActorId = generateActorId();
generateRefNum(mPlayer.mObject.mRef.mRefNum);
mGlobalMapState.mBounds.mMinX = 0;
mGlobalMapState.mBounds.mMaxX = 0;
@@ -79,7 +78,16 @@ namespace ESSImport
mPlayerBase.blank();
}
int generateActorId() { return mNextActorId++; }
void generateRefNum(ESM::RefNum& refNum)
{
if (!refNum.isSet())
{
mNextRefNum.mIndex++;
if (mNextRefNum.mIndex == 0)
mNextRefNum.mContentFile--;
refNum = mNextRefNum;
}
}
};
}
+13 -1
View File
@@ -7,7 +7,19 @@ namespace ESSImport
void INFO::load(ESM::ESMReader& esm)
{
mInfo = esm.getHNString("INAM");
if (esm.peekNextSub("XNAM"))
{
// TODO: Support older saves by turning XNAM into a RefId.
// XNAM is probably the number of the topic response within the topic record's linked list.
// Resolving this value will likely require loading Morrowind.esm.
esm.getSubName();
esm.skipHSub();
mInfo = ESM::RefId();
}
else
mInfo = esm.getHNRefId("INAM");
mActorRefId = esm.getHNString("ACDT");
}
+3 -1
View File
@@ -3,6 +3,8 @@
#include <string>
#include <components/esm/refid.hpp>
namespace ESM
{
class ESMReader;
@@ -13,7 +15,7 @@ namespace ESSImport
struct INFO
{
std::string mInfo;
ESM::RefId mInfo;
std::string mActorRefId;
void load(ESM::ESMReader& esm);
+1 -1
View File
@@ -49,7 +49,7 @@ namespace ESSImport
}
if (!separateStacks)
mItems.push_back(item);
mItems.push_back(std::move(item));
}
// equipped items
+2 -2
View File
@@ -9,14 +9,14 @@ namespace ESSImport
{
while (esm.isNextSub("KNAM"))
{
std::string refId = esm.getHString();
ESM::RefId refId = esm.getRefId();
int32_t count;
esm.getHNT(count, "CNAM");
mKillCounter[refId] = count;
}
mWerewolfKills = 0;
esm.getHNOT(mWerewolfKills, "INTV");
esm.getHNOT(mWerewolfKills, "VTNI");
}
}

Some files were not shown because too many files have changed in this diff Show More