Commit Graph

5414 Commits (19843af704b53016ed303ec2dc8952bd36f817a0)

Author SHA1 Message Date
elsid 19843af704
Combine data check with data handling logic 3 years ago
elsid 4e8e8304aa
Avoid mesh allocation when data is invalid 3 years ago
elsid 4ac83f4c39
Add separate function to handle NiGeometry node
To force use a single source of data. All fields of Nif::Node are available in NiGeometry.
3 years ago
elsid 56eef691a8
Use reference type to pass nif node as argument where nullptr is not handled 3 years ago
elsid 4631d95739
Add more tests for BulletNifLoader 3 years ago
psi29a 523289c531 Merge branch 'refactor_bullet_shape' into 'master'
Refactor bullet shape

See merge request OpenMW/openmw!1333
3 years ago
psi29a 4ff4afd50b Merge branch 'lua_callback' into 'master'
Refactoring. Lua `Callback` is moved from apps/openmw/mwlua to components/lua.

See merge request OpenMW/openmw!1334
3 years ago
psi29a cb3ab21c13 Merge branch 'recast_mesh_object' into 'master'
Store holder only in parent RecastMeshObject

See merge request OpenMW/openmw!1332
3 years ago
Evil Eye a9106f4d7c Rotate torches by 90 degrees 3 years ago
Petr Mikheev e7ec89573e Refactoring. Lua `Callback` is moved from apps/openmw/mwlua to components/lua. 3 years ago
Bo Svensson b9911da4c7
applies lightMask (#3201)
With this PR we apply `lightMask` to a `Transform` node we create specifically for a light. This mask will allow us to stop traversing such nodes sooner and avoid costly processing associated with `Transform` nodes in the cull visitor.
3 years ago
Bo Svensson d88d006984
fixes getViewDistance (#3207)
I have been informed by @akortunov that my addition of `Groundcover::getViewDistance` is not working in some cases. Investigations revealed that some `ViewData` code interacting with my additions had been quite thoroughly optimised in a way that was not sufficiently documented and interfered with the new feature. With this PR we repair `getViewDistance` while preserving such optimisations and add a necessary comment to avoid issues in the future. In addition, we now rebuild views when the global `mViewDistance` changes.
3 years ago
Bo Svensson 356e9d7cf0
refactors osg::Callback virtual inheritance (#3200)
With this PR we refactor `SceneUtil::KeyframeController` not to require `virtual osg::Callback` inheritance. I suppose such `virtual` overhead is not justified here because it negatively impacts many other classes we derive from `osg::Callback`.
3 years ago
psi29a 4c81518abb Merge branch 'puddle' into 'master'
Give each reflect and spell absorption effect a chance to apply

Closes #6255 and #6253

See merge request OpenMW/openmw!1279
3 years ago
elsid 9c5f8b8719
Store holder only in parent RecastMeshObject 3 years ago
elsid a851ac5fea
Use custom deleter for btCompoundShape to delete children shapes 3 years ago
elsid b731a981c4
Make BulletShape::isAnimated inlined 3 years ago
elsid c83facd9d3
Avoid redundant osg::ref_ptr<const BulletShape> copy 3 years ago
elsid ed5a4e195b
Use unique_ptr to avoid possible memory leak 3 years ago
elsid 8e71c246bf
Remove redundant BulletShape getters 3 years ago
elsid fc9a405dc5
Make BulletShape::makeInstance free function 3 years ago
elsid b905dd17c3
Use unique_ptr to store btCollisionShape in BulletShape 3 years ago
elsid 80e3623d9a
Avoid dynamic cast in duplicateCollisionShape 3 years ago
elsid ca8584f6f6
Move functions independent from BulletShape into anonymous namespace 3 years ago
elsid 29a772c33f
Rename Resource::BulletShape::CollisionBox fields according to styleguide 3 years ago
Petr Mikheev 37386f417e Support *.omwscripts in openmw-launcher 3 years ago
psi29a b189282ba1 Merge branch 'compile_no_evil' into 'master'
Remove dead code

See merge request OpenMW/openmw!1327
3 years ago
psi29a 34b63bf142 Merge branch 'omwscripts' into 'master'
Change format of "*.omwscripts" files

See merge request OpenMW/openmw!1271
3 years ago
Evil Eye 9b565c4cf9 Remove dead code 3 years ago
psi29a b3f84df43c Merge branch 'sky_shaders' into 'master'
Sky shaders

See merge request OpenMW/openmw!1057
3 years ago
Petr Mikheev 47c89567fb Load LuaScriptsCfg from both *.omwscripts and *.omwaddon files. 3 years ago
Petr Mikheev 4ec7f0625e Store Lua timers in std::map rather than in sol::table. 3 years ago
Petr Mikheev 9adc190209 Redesign LuaUtil::ScriptsContainer to work with ScriptsConfiguration 3 years ago
Petr Mikheev 33d71be81f Add LuaUtil::ScriptsConfiguration 3 years ago
Petr Mikheev 6aab246879 Add ESM records that are needed to store Lua scripts configuration;
Use ptr.getType() (i.e. esm record names) instead of typeid(ptr.getClass()) in apps/openmw/mwlua.
3 years ago
Evil Eye 4ec927829f Give each reflect and spell absorption effect a chance to apply 3 years ago
psi29a 3006c496fc Merge branch 'morrowland_scripting' into 'master'
Morrowland scripting

Closes #6363

See merge request OpenMW/openmw!1318
3 years ago
psi29a 2765bcee5e Merge branch 'serialization' into 'master'
Add helpers for binary serialization

See merge request OpenMW/openmw!1319
3 years ago
glassmancody.info 07e32c0fa6 remove object shader path 3 years ago
Bret Curtis 3d0da9b9b2
Merge pull request #3191 from akortunov/warnfix
Fix some MSVC warnings
3 years ago
Bret Curtis ac02753da7
Merge pull request #3190 from akortunov/master
Fix showscenegraph warnings
3 years ago
Bo Svensson 1ff8318a52
refactors premultiplied alpha (#3189)
With this PR we refactor a `premultiplied alpha` user string set by `characterpreview.cpp` into a more flexible mechanism allowing us to assign any state to GUI textures. We can consider these changes more future proof than the previous approach.
3 years ago
Bo Svensson 7f9beac3a7
refactors a case insensitive map (#3184)
This PR aims to spark the retirement of a questionable pattern I have found all over our code base. I will illustrate how this pattern encourages code duplication, lacks type safety, requires documentation and can be prone to bugs.
```
std::map<std::string, Object> mMap; // Stored in all lowercase for a case-insensitive lookup

std::string lowerKey = Misc::StringUtils::lowerCase(key);
mMap.emplace(lowerKey, object);

std::string lowerKey = Misc::StringUtils::lowerCase(key);
mMap.find(lowerKey);

mMap.find(key); // Not found. Oops!
```
An alternative approach produces no such issues.
```
std::unordered_map<std::string, Object, Misc::StringUtils::CiHash, Misc::StringUtils::CiEqual> mMap;

mMap.emplace(key, object);

mMap.find(key);
```
Of course, such an alternative will work for a `map` as well, but an `unordered_map` is generally preferable over a `map` with these changes because we have moved `lowerCase` into the comparison operator. 

In this PR I have refactored `Animation::mNodeMap` accordingly. I have reviewed and adapted all direct and indirect usage of `Animation::mNodeMap` to ensure we do not change behaviour with this PR.
3 years ago
Evil Eye fef902617a Parse integer format arguments as variable names 3 years ago
Andrei Kortunov 0f3c0cb0a0 Fix argument types mismatch 3 years ago
Andrei Kortunov 107a9ecb17 Fix variables hiding 3 years ago
elsid a58f1a94e3
Add helpers for binary serialization
To construct serializer from given entities:
* Data source/destination - any value that has to be serialized/deserialized,
  usually already existing type.
* Format - functional object to define high level serialization logic to
  define specific format and data schema. Like order of fields, allocation.
* Visitor - functional object to define low level serialization logic to
  operator on given data part.
  * BinaryWriter - copies given value into provided buffer.
  * BinaryReader - copies value into given destination from provided buffer.
  * SizeAccumulator - calculates required buffer size for given data.
3 years ago
Andrei Kortunov 566380c0d6 Fix showscenegraph warnings 3 years ago
glassmancody.info 1e40d27318 introduce sky shaders 3 years ago
Bo Svensson 41318a585f
fixes enable and disable commands (#3186)
This PR fixes a recent regression concerning enable and disable commands with object paging. In addition, we add a necessary comment to avoid such issues in the future.
3 years ago