Commit Graph

55 Commits (81f2402e66cdc9c21dd81e7126b29a06dbd56d59)

Author SHA1 Message Date
elsid a550a8af36
Use normalized path for KeyframeManager::get 1 month ago
elsid 79b73e45a1
Replace std::filesystem::path by std::string and std::string_view in nif code
It's used only for error reporting.
10 months ago
Evil Eye 48db113149 Address feedback 12 months ago
Evil Eye 27fa411f4f Convert strings in nif files to utf8 12 months ago
Alexei Kotov 535290a83d Update NIF Reader class and related code
Update BSStreamHeader definitions
Fix 10.0.1.8 loading
Explicitly avoid loading 20.3.1.2
1 year ago
alekulyn 74aa7b947a Load BSTriShape NIF nodes 2 years ago
Alexei Dobrohotov 1b5e904285 Read BSMultiBound et al. 2 years ago
elsid 2c43a8558a
Add option to disable debug log for unsupported nif files
It becomes quite extensive and not very useful when loading oblivion content
files.
2 years ago
elsid c338c1e5d3
Add Nif::FileView as read only interface for Nif::NIFFile
To make sure interface is scoped to what users require.
2 years ago
elsid f2fb3d6de8
Separate NIFFileReader from NIFFile
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.

Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2 years ago
elsid b39ccbeeef
Remove NIFFile::warn and NIFFile::fail functions
These functions use NIFFile only as context, they are not really a part of
either reading nor state invariant. And they only confuse reader because it's
not immediatelly obvious that no code is executed after fail.
2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Project579 2df8bfed25 Fix build errors after rebase against master due to large amount of changes. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
Andrei Kortunov c36c28e8f9 Move NIF implementation to cpp files 2 years ago
elsid 6c8ed4d19c
Move Files::IStreamPtr alias to a separate header
To avoid transitive include of Windows.h all over the engine.
2 years ago
elsid 94c1d0cced
Use unique_ptr to store istream 3 years ago
elsid 283b68025c
Avoid possible race condition on NIFFile::sLoadUnsupportedFiles
Its value is written from the main thread but other threads read it.
3 years ago
elsid d097c16206
Use unique_ptr to manage nif record lifetime 3 years ago
elsid a665a38aca
Use MurmurHash3_x64_128 for file hash 3 years ago
elsid d7041613ef
Store BulletShape source file name and content hash 3 years ago
jvoisin aec3c74fa5 Sprinkle some [[noreturn]] where possible 4 years ago
Alexei Dobrohotov c857588ee9 Remove NIFFile settings manager dependency 4 years ago
Capostrophic a08a9518c3 NIF version adjustments
Cut down on obscure version numbers
Call generateVersion without using a stream object
5 years ago
Capostrophic aef6cd7006 Fix handling of empty strings in NIF string tables 5 years ago
Capostrophic e363d5df21 Some more minor NIF support fixes 5 years ago
capostrophic e654a52b70 More NIF adjustments
Constant interpolation support
5 years ago
Andrei Kortunov d2613e35a2 Fix some Clang 7 warnings 6 years ago
Andrei Kortunov 1452684d9e Use new logging system for components 6 years ago
elsid f2a63bcf35
Add unit tests for BulletNifLoader 6 years ago
Bret Curtis 07f75e1104 replace boost::shared_ptr in extern and components 8 years ago
scrawl 9375cbea44 Make NIFFilePtr const 9 years ago
scrawl de84452e5a NifFile: close the stream after reading (Fixes #3070) 9 years ago
scrawl 372a54bbc7 Dead code removal 10 years ago
scrawl 46cbec9a4a Add skinning auto-detection in nifosg loader 10 years ago
scrawl 8c10d4badb NIF reader compiles without Ogre 10 years ago
Arthur Moore cd835152e1 Fix spacing issue for NIF file errors. 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
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
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
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