1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:23:54 +00:00
Commit graph

54 commits

Author SHA1 Message Date
elsid
79b73e45a1
Replace std::filesystem::path by std::string and std::string_view in nif code
It's used only for error reporting.
2024-03-11 22:07:37 +01:00
Evil Eye
48db113149 Address feedback 2024-01-17 18:10:42 +01:00
Evil Eye
27fa411f4f Convert strings in nif files to utf8 2024-01-16 20:56:58 +01:00
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
2023-09-10 07:18:39 +03:00
alekulyn
74aa7b947a Load BSTriShape NIF nodes 2023-07-09 10:14:27 +00:00
Alexei Dobrohotov
1b5e904285 Read BSMultiBound et al. 2023-05-22 23:05:10 +03:00
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.
2023-02-08 22:59:29 +01:00
elsid
c338c1e5d3
Add Nif::FileView as read only interface for Nif::NIFFile
To make sure interface is scoped to what users require.
2022-09-24 19:10:21 +02:00
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.
2022-09-24 19:10:14 +02:00
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.
2022-09-24 19:10:05 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Project579
2df8bfed25 Fix build errors after rebase against master due to large amount of changes. 2022-09-11 14:41:20 +02:00
Project579
e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2022-09-11 14:41:15 +02:00
Andrei Kortunov
c36c28e8f9 Move NIF implementation to cpp files 2022-07-21 15:54:52 +04:00
elsid
6c8ed4d19c
Move Files::IStreamPtr alias to a separate header
To avoid transitive include of Windows.h all over the engine.
2022-07-17 11:35:39 +02:00
elsid
94c1d0cced
Use unique_ptr to store istream 2022-04-22 18:27:17 +02:00
elsid
283b68025c
Avoid possible race condition on NIFFile::sLoadUnsupportedFiles
Its value is written from the main thread but other threads read it.
2022-02-11 21:41:08 +01:00
elsid
d097c16206
Use unique_ptr to manage nif record lifetime 2022-02-11 20:40:38 +01:00
elsid
a665a38aca
Use MurmurHash3_x64_128 for file hash 2021-11-21 17:05:59 +01:00
elsid
d7041613ef
Store BulletShape source file name and content hash 2021-11-11 00:27:18 +01:00
jvoisin
aec3c74fa5 Sprinkle some [[noreturn]] where possible 2021-06-22 12:51:08 +02:00
Alexei Dobrohotov
c857588ee9 Remove NIFFile settings manager dependency 2020-11-09 14:24:48 +03:00
Capostrophic
a08a9518c3 NIF version adjustments
Cut down on obscure version numbers
Call generateVersion without using a stream object
2020-05-13 01:06:38 +03:00
Capostrophic
aef6cd7006 Fix handling of empty strings in NIF string tables 2020-03-10 23:04:20 +03:00
Capostrophic
e363d5df21 Some more minor NIF support fixes 2020-02-02 17:28:46 +03:00
capostrophic
e654a52b70 More NIF adjustments
Constant interpolation support
2020-01-02 13:07:27 +03:00
Andrei Kortunov
d2613e35a2 Fix some Clang 7 warnings 2018-11-09 19:42:59 +04:00
Andrei Kortunov
1452684d9e Use new logging system for components 2018-08-14 19:42:41 +04:00
elsid
f2a63bcf35
Add unit tests for BulletNifLoader 2018-08-11 18:00:52 +03:00
Bret Curtis
07f75e1104 replace boost::shared_ptr in extern and components 2017-06-09 19:08:53 +02:00
scrawl
9375cbea44 Make NIFFilePtr const 2016-07-10 17:10:19 +02:00
scrawl
de84452e5a NifFile: close the stream after reading (Fixes #3070) 2015-12-09 04:52:00 +01:00
scrawl
372a54bbc7 Dead code removal 2015-04-25 01:28:01 +02:00
scrawl
46cbec9a4a Add skinning auto-detection in nifosg loader 2015-03-25 15:39:41 +01:00
scrawl
8c10d4badb NIF reader compiles without Ogre 2015-02-17 17:08:55 +01:00
Arthur Moore
cd835152e1 Fix spacing issue for NIF file errors. 2014-12-12 02:01:46 -05:00
Arthur Moore
5abed1c32a Print a NIF file's version information when an error occurs 2014-10-19 02:54:27 -04:00
Arthur Moore
9ebf3f2f10 Provide more data when nifstream throws a runtime_error 2014-10-19 02:42:28 -04:00
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.
2014-08-24 13:45:36 -04:00
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.
2014-08-24 02:37:50 +02:00
Marc Zinnschlag
c8c45d4923 Merge remote-tracking branch 'lgro/valgrind_fixes' 2014-06-15 10:57:01 +02:00
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>
2014-06-15 09:39:16 +02:00
scrawl
b158919c4b Fix uninitialized variable use 2014-06-13 02:26:52 +02:00
scrawl
029e438c11 Don't check mInterpolationType each iteration 2014-06-11 23:57:39 +02:00
Arthur Moore
f9f278f645 Fixed a capitalization error.
Changed Interpolations to unsigned.
Also explained what's happening in the comments.
2014-06-06 07:00:04 -04:00
Arthur Moore
b90e4db871 Actually read in XYZ_ROTATION_KEY data instead of discarding it. 2014-06-06 01:26:28 -04:00
dreamer-dead
e772bb88da Remove RTTI usage in NIF reader. 2014-06-05 20:22:20 +04:00
Arthur Moore
576c06d791 Fix Bug #1371
Not properly reading in the NIF file's QuaternionKeyList.
2014-06-01 18:01:44 -04:00
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
2014-05-28 03:42:26 -04:00
scrawl
45d2a00717 Fixes #1293: Allow interpolation type 0 in case of 0 keys 2014-04-26 11:36:27 +02:00