1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 17:23:53 +00:00
Commit graph

874 commits

Author SHA1 Message Date
Andrei Kortunov
d3d7a663c6 Move some objects instead of copying 2023-07-31 20:43:46 +04:00
Evil Eye
6b7e7acd16 Replace a number of incorrect index types 2023-06-03 16:30:35 +02:00
psi29a
df57f8004b Merge branch 'default' into 'master'
Replace some empty constructors and destructors with default

See merge request OpenMW/openmw!3078
2023-05-29 13:06:19 +00:00
Evil Eye
9214ffb50b Replace some empty constructors and destructors with default 2023-05-29 13:37:19 +02:00
florent.teppe
ad8cfde4e0 ESM::LandData no longer a virtual interface
instead it is constructed from ESM::Land or ESM4::Land
2023-05-29 12:10:42 +02:00
fteppe
22dc383f63 fixes errors and warnings
Applies review comments

getWorldspaceTerrain => returns a reference because never null
crashfix in navigator
updateLandPositions fixes naming of it
const ESM4::Land* MWWorld::Store<ESM4::Land>::search(ESM::ExteriorCellLocation cellLocation) const removes useless else
ExteriorCellLocation uses default initializers
get terrain height returns -MAX_FLOAT when there is no esm4 terrain.

applied review comments

use default initlializer when possible
factorise code
uses pattern matching in for loop.
2023-05-29 12:10:42 +02:00
florent.teppe
e0fa15b727 Abstracted Land data that can be used by esm3 and esm4. 2023-05-29 11:31:37 +02:00
florent.teppe
1b718f09c5 adding worldspace info to terrain data structures
Rendering manager can have multiple terrain, one for each queried worldspace
Terrain::World has a worldspace member
storage functions require a worldspace parameter.
2023-05-29 11:31:37 +02:00
florent.teppe
93e7b0d946 Terrain has a mandatory worldspace in constructor
getTerrainHeightAt takes a worldspace.

Doesn't change anything for now => Therrain is created with the default ESM3 worldspace, and is never changed.
2023-05-29 11:31:36 +02:00
jvoisin
c7a3f43915 Minor header cleanup
This has been done via CLion's "unused include directive",
set to "detect completely unused".
2023-04-30 16:26:03 +02:00
florent.teppe
cb4a97e50b Displays references in exterior cells. A bit hackish. 2023-04-20 10:03:35 +02:00
psi29a
4fd8ed8f13 Merge branch 'qt_scene' into 'master'
Migrate from GraphicsWindowQt to QOpenGLWidget

See merge request OpenMW/openmw!2895
2023-04-11 10:51:07 +00:00
Evil Eye
8d8207b734 Refactor pathgrid indices to use size_t instead of int 2023-04-08 00:32:43 +00:00
Andrei Kortunov
3e9cedf3b5 Use a compile-time check 2023-04-06 08:04:21 +04:00
Andrei Kortunov
8df7ce545e Migrate from GraphicsWindowQt to QOpenGLWidget 2023-04-05 19:43:42 +04:00
Shi Han
a90e3b8c3b Move from std::atoi to std::from_char 2023-03-18 09:30:48 +00:00
elsid
d03bec60e9
Avoid redundant conversion from RefId to string and back 2023-03-03 15:44:19 +01:00
elsid
419a86f0b9
Use ESM::RefId for actor parts
To avoid redundant conversion RefId to string and back.
2023-03-03 15:44:14 +01:00
elsid
e618026c69
Use ESM::RefId as index key in collections 2023-02-17 11:08:46 +01:00
florent.teppe
486d15b19e moved light common to its own file
moved esm4light to it's own file
2023-02-07 16:29:17 +01:00
florent.teppe
dc961e3189 Adds the light into the scene.
Common struct for ESM3 and ESM4 light
2023-02-07 10:07:59 +01:00
Andrei Kortunov
7e2aedf637 Add an initial Qt6 support 2023-02-06 18:38:59 +04:00
florent.teppe
6ff90b34a8 Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
Fixed multiple issues from the review.
2022-12-27 19:15:58 +01:00
florent.teppe
0f3499f504 Renamed string => Id, makes more sense considering the new underlying type
Fixes unnecessary copies, and issues with case sensitive comparisons.

fixed modification that wasn't necessary

Fixed type mismatch, and unecessary copy
2022-12-27 19:15:57 +01:00
florent.teppe
30a020883e Avoids unecessary copies
Fixed issue with lowerCase

Oups fixed compialtion on openMW_test_suite
2022-12-27 19:15:57 +01:00
florent.teppe
65cdd489fb create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
Fixed some types

removed useless header

applied clang format

fixed compile tests

fixed clang tidy, and closer to logic before this MR

Removed hardcoded refids

unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string

Fix clang format

Fixed a few instances where std::string was used, when only const std::string& was needed

removed unused variable
2022-12-27 19:15:57 +01:00
fteppe
09d461a8cd fixed Topic selected event
Fix rebase
2022-12-27 19:15:56 +01:00
fteppe
20da0892ef openMW_test_suite compiles and runs
Slowly moving through the open-cs errors

Good progress in openCS

Very good progress on openCS

Getting closer with openCS

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

ix openMW

everything compiles on windows??

Fix gcc

Fix Clang
2022-12-27 19:15:55 +01:00
Max Henzerling
897cdc62d8 Add snap to reference 2022-11-04 15:04:42 -07:00
jvoisin
1a326294c0 Run IWYU on the opencs 2022-10-31 21:04:01 +01:00
jvoisin
cd29c181cf Another pass with IWYU 2022-10-10 15:16:18 +02:00
elsid
843753da14
Remove unused includes 2022-10-09 16:44:18 +02:00
jvoisin
3cbf1dc042 First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Evil Eye
fb9bc5f535 Use string_view in Fallback::Map 2022-08-28 17:20:49 +02:00
mpeco
78700eee57 functor-based Qt signal-slot syntax construction set 2022-08-23 17:14:12 -03:00
elsid
b3882777ab
Cleanup opencs includes 2022-08-19 19:25:03 +02:00
psi29a
b551e69b6f #5534 remove OSG 3.4 support and require at least 3.6.5 support 2022-08-09 21:07:28 +00:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
Andrei Kortunov
de58c9dff3 Get rid of obsolete osg::Geode where it is possible 2022-07-20 15:28:56 +04:00
elsid
7501597813
Do not use float as loop variable
apps/opencs/view/render/instanceselectionmode.cpp:294:9: warning: Variable 'i' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter]
        for (float i = 0.0; i <= resolution; i += 2)
        ^                   ~                ~
2022-07-06 13:52:28 +02:00
elsid
bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00
jvoisin
8b9ed57348 Clean up Qt includes 2022-06-17 11:56:54 +02:00
Cody Glassman
ce49aa1202 Attach lights at origin when missing AttachLight node 2022-06-04 13:35:27 +00:00
Evil Eye
db1a372e5b Replace new with make_unique in opencs 2022-05-29 13:25:17 +02:00
Evil Eye
a64979e25d Replace empty std::string assignments 2022-05-04 22:33:39 +02:00
Vidi_Aquam
035fe778b2 Temporary workaround for angle snapping
Made the angle snap only apply to an object when the drag is finished, which is much more usable until the rotation system can be fixed completely
2022-04-11 08:12:38 -05:00
Vidi_Aquam
abf0c8048e Change reading of settings and add missing logic to mouse wheel drag 2022-04-03 09:04:12 -05:00
Vidi_Aquam
6d7c8f25fc Implement grid snapping and angle snapping in OpenMW-CS
Adds configurable snap settings for instance movement, rotation and scaling, used with the secondary edit button
2022-04-02 19:25:57 -05:00
Bret Curtis
74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
2022-01-23 17:30:25 +01:00
Bret Curtis
cdbab2325f rename esmterrain to esm3terrain 2022-01-23 17:19:30 +01:00
Bret Curtis
d1fb854521 move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4
esm typo

esm typo
2022-01-23 17:04:48 +01:00
Cody Glassman
8ec0a52605 Toggable day night switch (#5928) 2022-01-11 09:34:19 +00:00
Alexei Dobrohotov
7a0c13fcf8 Make better use of std::clamp 2021-11-06 08:47:32 +03:00
Bo Svensson
c9c8d02332
fixes a crash (#3183)
This PR fixes a crash caused by the improperly ensured lifetime of RigGeometry::mSourceGeometry. mSourceGeometry was not adequate to ensure mSourceGeometry would outlive mGeometry because we extend mGeometrys lifetime beyond this lifetime by passing mGeometry to the draw traversal instead of this.
In addition,

We add important comments.
We detect and prevent generally unsafe operations in high level code.
We add a sprinkling of const to help clarify intentions.
2021-10-23 10:31:46 +02:00
unelsson
14c4bba4a3 Remove unused include 2021-10-15 21:54:00 +03:00
unelsson
28278e9a82 Drawing duplicate lines is faster than iterating through big containers 2021-10-15 21:54:00 +03:00
unelsson
55456a19fc Only iterate through temporary selection when using toggle 2021-10-15 21:54:00 +03:00
unelsson
46960825ef Various terrain selection and editmode dragging fixes 2021-10-15 21:54:00 +03:00
unelsson
89a20b6ea5 Call dragEnded instead of pressed also after aborted operation 2021-10-15 21:54:00 +03:00
unelsson
3df9ceda03 Remove measurement code 2021-10-15 21:54:00 +03:00
unelsson
7602d677fa Terrain selection optimizations, measurements, renderBin change 2021-10-15 21:54:00 +03:00
Matjaž Lamut
1c9f06f742 Minor UI tweaks all around OpenMW-CS 2021-10-03 19:13:51 +00:00
psi29a
e2e5161d81 Merge branch 'optimizebrushdraw' into 'master'
Optimize terrain editing brush drawing performance

Closes #6285

See merge request OpenMW/openmw!1226
2021-09-26 15:14:55 +00:00
Evil Eye
831055f878 Merge branch 'OpenCS-fix-modify' into 'master'
OpenCS - Re-implement the fix for Issue #6067.

See merge request OpenMW/openmw!1173
2021-09-19 19:23:30 +00:00
unelsson
70e210735a Optimize terrain editing brush drawing performance 2021-09-18 15:57:00 +03:00
elsid
6b7434ca69
Pass std::string_view instead of const std::string&
* Starting with Actor::getBodyPartMesh and ending with
  Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
2021-09-09 18:39:50 +02:00
psi29a
6170971ea3 Merge branch 'bettermoveinstance' into 'master'
Set instance movement based on camera zoom

See merge request OpenMW/openmw!1186
2021-09-06 09:48:30 +00:00
elsid
a8c16071dc
Fix -Wreturn-local-addr warning
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp: In member function ‘const string& CSMWorld::ActorAdapter::ActorData::getPart(ESM::PartReferenceType) const’:
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp:142:20: error: returning reference to temporary [-Werror=return-local-addr]
  142 |             return "";
      |                    ^~
2021-09-04 18:04:45 +02:00
unelsson
f876ff2c14 Clear temporary movement data at the end of the drag 2021-09-01 02:04:04 +03:00
unelsson
53d315c862 XYZ-locking, mouse wheel move fix 2021-09-01 02:04:04 +03:00
unelsson
23fe3d74ab Use floats, not doubles 2021-09-01 02:04:04 +03:00
unelsson
840e7615f5 Store object origins and move difference 2021-09-01 02:04:04 +03:00
unelsson
0d511da615 Test of basic mouse-plane use 2021-09-01 02:04:04 +03:00
cc9cii
b0d5ca386d Update original cell column and do not modify the refnum when moving a reference to another cell with 3D editing. 2021-08-28 16:12:40 +10:00
psi29a
716eebe616 Merge branch 'terrainselectioncrashfix' into 'openmw-47'
Fix terrain selection crash

See merge request OpenMW/openmw!1165

(cherry picked from commit ec4e3b04a7)

b84e41bd Avoid storing ref, dynamic cast worldspacewidget for safety
d62ddc00 Use QPointer to detect object existence, less verbose debug messages
cb42b528 Remove friend, make getEditMode public to allow editmode testing.
4b148180 Restucture code
08f7c73e Fix text
2021-08-22 19:22:54 +00:00
elsid
8d2cdedc87
Show number of pathgrid node in a tooltip
To allow users faster understand what node it is.
2021-06-28 00:34:49 +02:00
Atahualpa
3a1243a5d0 Rebased branch, reduced code duplication, added comments, adjusted formatting. 2021-05-18 17:53:00 +02:00
Atahualpa
ca80aeaaea Fix vertex calculation for cell-border drawing. 2021-05-18 15:05:26 +02:00
Atahualpa
356efa15a2 Fixes #6035 (circle brush selects outside of circle) and #6036 (some corner vertices not selected). 2021-05-18 15:04:01 +02:00
Atahualpa
7be891b440 Directly use Geometry instead of Geode; fix for loop; add size_t type-cast. 2021-05-18 14:56:03 +02:00
Atahualpa
6c49074765 Remove old references to Cell class. 2021-05-18 14:56:03 +02:00
Atahualpa
008bf64dd9 Second step toward fixing terrain selection issues. 2021-05-18 14:56:03 +02:00
Atahualpa
18ea4d8eb2 First step toward fixing terrain selection issues. 2021-05-18 14:56:02 +02:00
psi29a
3944648f0b Merge branch 'opencs_remove_inclde' into 'master'
Remove some superfluous includes in the opencs

See merge request OpenMW/openmw!829
2021-05-14 13:33:06 +00:00
jvoisin
06ae26037f Remove some superfluous includes in the opencs 2021-05-14 10:57:31 +02:00
Thunderforge
339d347aea Fixing performance-faster-string-find issues
This addresses the Clang Tidy check [performance-faster-string-find](https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html).
2021-05-10 22:44:07 -05:00
Andrei Kortunov
2d869ca9ff Fix node masks signed/unsigned mismatch 2021-04-20 10:52:51 +04:00
Andrei Kortunov
9647b670e4 Do not declare unused variables 2021-04-19 15:43:00 +04:00
Andrei Kortunov
0cadc97fb3 Fix double -> float conversions 2021-04-19 15:36:58 +04:00
uramer
ee2f0e7eb3 Fix inconsistent argument name 2021-01-28 23:47:38 +01:00
uramer
eca0d8b7ea Fix typo in DropMode enum 2021-01-28 22:40:44 +01:00
uramer
edc6d5c3e7 Fix a typo in separate drop binds 2021-01-28 22:22:48 +01:00
uramer
36cd818155 Fix separate drop, refactor for code reuse 2021-01-28 22:10:33 +01:00
Bret Curtis
a735bbe9a5
Merge pull request #3040 from akortunov/pvs
Fix some issues, found by PVS Studio
2021-01-10 12:58:17 +01:00
Nelsson Huotari
313e895912 [OpenMW-CS] Cube and sphere instance selection 2021-01-09 21:35:07 +00:00
Andrei Kortunov
ad101de733 Merge declaration and initialization 2021-01-09 22:58:54 +04:00
Andrei Kortunov
7fc4c9f3f6 Avoid dead code 2021-01-09 13:52:01 +04:00
Coleman Smith
3b9db41346 removing unneeded variable 2020-12-10 17:03:10 -08:00
Coleman Smith
842ea9d6ed simplifying a bit
- attaching gradient camera directly to the main camera
- using Vec4ub
2020-12-10 21:36:46 +00:00