Commit Graph

117 Commits (deque)

Author SHA1 Message Date
scrawl 7252cb63a6 Fix cppcheck issues 10 years ago
scrawl 487e318ede Remove old niftool test 10 years ago
scrawl 9809748eba Store NIF keys mapped by time and use lower_bound for searches 10 years ago
cc9cii 7ff1136d81 For compiling in Windows with MSVC. 10 years ago
Arthur Moore b7852b8215 Convert niffile.cpp to use std::map instead of a custom search function.
I haven't profiled this, but it should speed things up a decent bit.
11 years ago
Arthur Moore 8be6aefd95 Moved functions from niffile.cpp to where they belong.
Also cleaned up some #includes

Removed a few asserts.  Vector already throws an out_of_range error.
11 years ago
Arthur Moore cdfa24e15d (Re) Wrote a tool to test NIF files in BSAs and on the filesystem.
Just give it a set of files, one file per argument, and it will make sure openmw can read them.

On linux/mac you can use "xargs --arg-file=nifs.txt ./niftest" to give it a list of files to check.
11 years ago
scrawl 2b407a9995 Refactor NIF cache
- Remove broken cache locking mechanism

This was supposed to unload NIFFiles after a cell transition completes, but it was never working due to a mistake on the line if (--sLockLevel), should have been if (--sLockLevel == 0). Repairing this would increase load times (NIF files would have to be reloaded more frequently), so just removed it for now.

 - Decouple cache from NIFFile (now a new nifcache component)

 - Add API for future background loading

 - Provide a reliable way (SharedPtr) to hold on to loaded NIFFiles. This will be useful to avoid deep copies of keyframe and text key data, which is currently a performance bottleneck.
11 years ago
scrawl 30be59c029 Implement auto-adjusting of particle emit rate
This makes ashcloud.nif and blightcloud.nif work properly.
11 years ago
Marc Zinnschlag c8c45d4923 Merge remote-tracking branch 'lgro/valgrind_fixes' 11 years ago
Lukasz Gromanowski abeb1d4ab3 Valgrind: Added constructor for KeyListT class, and added initialziation of ver member field in NIFFile class.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
scrawl b158919c4b Fix uninitialized variable use 11 years ago
scrawl 029e438c11 Don't check mInterpolationType each iteration 11 years ago
Arthur Moore f9f278f645 Fixed a capitalization error.
Changed Interpolations to unsigned.
Also explained what's happening in the comments.
11 years ago
Arthur Moore b90e4db871 Actually read in XYZ_ROTATION_KEY data instead of discarding it. 11 years ago
dreamer-dead e772bb88da Remove RTTI usage in NIF reader. 11 years ago
Arthur Moore 576c06d791 Fix Bug #1371
Not properly reading in the NIF file's QuaternionKeyList.
11 years ago
Arthur Moore 50a4d175da Read NIF interpolation type 4 (XYZ_ROTATION_KEY)
Don't actually do anything with it yet, but without this the "MW Containers Animated" mod made containers inaccessible.

Partly implements Feature #1067
11 years ago
scrawl 45d2a00717 Fixes #1293: Allow interpolation type 0 in case of 0 keys 11 years ago
Bret Curtis ab224f93c9 remove our stdint.h version that uses boost and force usage of system stdint.h 11 years ago
scrawl bbd15b185d Skip inactive controllers. Fixes those bloody bone boots again. 11 years ago
scrawl 254eba350e Not handling interpolation type should be an error, since it will fail reading the next record if it hasn't read the previous one completely. 11 years ago
scrawl 5931fdcbde Implement NiBillboardNode. Flags not handled yet. 11 years ago
scrawl 9fcb4fad5c Implement NiFlipController 11 years ago
scrawl 6b81fd78f1 Particle improvements: Handle LocalSpace flag. Attach particle systems to the base node, since they need to be relative to that when LocalSpace is enabled. Get the bone in emitters/affectors so that resulting particle positions are the same. TODO: Fix Controllers to affect particle systems. 11 years ago
Xethik 9f533dbbe4 Fixed "most vexing parse" issue. 11 years ago
Chris Robinson fb0ee7f2fc Improve constness of the Nif RecordPtr structs 12 years ago
Chris Robinson 4cedf0fbab Avoid colliding with AvoidNodes
These are placed under the RootCollisionNode hierarchy, but the shapes they
hold aren't collided with. Their exact function is unknown, but seems to be
related to lava? Maybe damage avoidance info for the AI.
12 years ago
Chris Robinson 1051fa51a7 Recognize NiFlipController 12 years ago
Chris Robinson 36170c5374 Use flag enums instead of hard-coded hex values 12 years ago
Chris Robinson bf8bc989fc Recognize and partly handle NiBSParticleNode 12 years ago
Chris Robinson d26ffe9de0 Move a method to the Node class 12 years ago
Chris Robinson 3970407772 Use actual classes for properties 12 years ago
Chris Robinson 6c6750342c Specified particle size is actually the radius 12 years ago
Chris Robinson 23097ac9dc Minor cleanup of NiMorphData 12 years ago
Chris Robinson c6c67a1bb4 Read NiGravity fields 12 years ago
Chris Robinson ebcb4c66c3 Properly read and use the NIF root record list 12 years ago
Chris Robinson f764f243d2 Fix the particle quota 12 years ago
Chris Robinson 41ce5464c9 Recognize NiBSAnimationNode as a record type
And don't warn about animated nodes without textkeys
12 years ago
Chris Robinson bf0ae3ae72 Read NiVisData info 12 years ago
Chris Robinson ac10c5f05c Even more particle information 12 years ago
Chris Robinson 2f6ae4a915 Read more particle information 12 years ago
Chris Robinson ee0a20f9ce Read some missing particle data from NIFs 12 years ago
scrawl a9b56eedc3 Support NIF "glow maps", which are basically an emissive channel. 12 years ago
scrawl 5625d73d84 Bump texture support 12 years ago
Nathan Jeffords d3c1f5e7b2 renamed low-level NIF related files and include guards to conform to naming convention 12 years ago
Nathan Jeffords 0ed2015319 refactored NIFFile parse to get better code/data seperation 12 years ago
Nathan Jeffords 6de6d9ff6e Factored a NIFStream class out of the NIFFile class.
Split NIFFile into two parts, NIFFile which is cached and is a container
for a parsed NIF, and NIFStream which is a class specialized for parsing
NIFs. This required a semi-sweeping change to make all record classes
accept a NIFStream instead of a NIFFile as an agurment to their read
functions.
12 years ago
Chris Robinson 2786cc67f6 Fix loading empty NiTriShapeData records 12 years ago
Sergey Shambir 03ca7f6123 NIF: added NiStencilProperty record handling
NiStencilProperty appears in Better Clothes plugin. If it not handled,
some parts of NPCs bodies will be not rendered.
12 years ago