Commit Graph

142 Commits (replace)

Author SHA1 Message Date
dteviot 45b6538820 fixed MSVC 2013 warning C4800
forcing value to bool 'true' or 'false'
10 years ago
dteviot 407cd50890 fixed warning C4099:
type name first seen using 'class' now seen using 'struct'
10 years ago
scrawl 387969bf42 Remove an old .gitignore 10 years ago
scrawl d541bc8064 Remove unused functions in nifstream 10 years ago
scrawl c6c7d102d0 Revert "components/nif/base.hpp now uses the templated get() function"
This reverts commit ad609bff78.

Revert "Made incorrect nif get error message more informative."

This reverts commit 9909c4abad.

Revert "Build the nif file tester by default"

This reverts commit c1315ed90c.

Revert "Converted most nifstream "get multiple" functions to the templated version"

This reverts commit 2619d57bb6.

Revert "Add a templated option for getting vectors to NIFStream"

This reverts commit f318ee0b8c.

Revert "Made NIFStream getters templated"

This reverts commit 4edc4142f3.
10 years ago
Arthur Moore ad609bff78 components/nif/base.hpp now uses the templated get() function 10 years ago
Arthur Moore 9909c4abad Made incorrect nif get error message more informative. 10 years ago
Arthur Moore c1315ed90c Build the nif file tester by default
It's extremely useful in determining if a nif file is bad without having to load up openmw or opencs.
Also updated the nif testing script to run at a low priority.
10 years ago
Arthur Moore 2619d57bb6 Converted most nifstream "get multiple" functions to the templated version 10 years ago
Arthur Moore f318ee0b8c Add a templated option for getting vectors to NIFStream 10 years ago
Arthur Moore 4edc4142f3 Made NIFStream getters templated 10 years ago
Marc Zinnschlag 33d905dc03 Merge remote-tracking branch 'scrawl/master' 10 years ago
Arthur Moore b8edd9bac3 Get a nif file's version string regardless of its length. 10 years ago
Arthur Moore cd835152e1 Fix spacing issue for NIF file errors. 10 years ago
Arthur Moore 018f4e6895 Fail early if trying to read a string larger than the nif file size.
This is much better than failing after a few minutes with an out of memory error.
10 years ago
scrawl 6eebe9b44c Read NiFogProperty, but don't use it yet (Feature #920) 10 years ago
scrawl 5a25649076 Implement XYZ rotation keys support (Fixes #1067) 10 years ago
scrawl b650338d69 Implement drawMode of NiStencilProperty (Feature #1057) 10 years ago
scrawl e6c59f5585 Revert "Allow NIF rotation matrices that include scale values"
This reverts commit f57ddec6a2.

Conflicts:
	components/nif/nifstream.hpp

(Fixes #2168)
10 years ago
Arthur Moore 4a9a9855bf NIFStream getUInt should return an unsigned integer 10 years ago
Arthur Moore 4583dc05db Move NIFStream functions into a cpp file where they belong 10 years ago
scrawl f57ddec6a2 Allow NIF rotation matrices that include scale values (Fixes #2052) 10 years ago
Arthur Moore 38bcff2622 Moved base NIF classes into a separate file.
This resolves the dependency mess, and makes things more readable.
The dependency tree for nif records now looks like this:
Record.hpp
--base.hpp
----controlled.hpp
----controller.hpp
----data.hpp
----effect.hpp
----extra.hpp
----node.hpp

Node.hpp has many extra dependencies because nifogre only includes it instead of each of these files.
That should be fixed.
10 years ago
Arthur Moore 5abed1c32a Print a NIF file's version information when an error occurs 10 years ago
Arthur Moore 9ebf3f2f10 Provide more data when nifstream throws a runtime_error 10 years ago
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