Commit Graph

46 Commits

Author SHA1 Message Date
Alexei Kotov 137382b424 Reserve capacity for physics NIF collections 2025-12-15 10:44:27 +03:00
jvoisin 472240526d Merge branch 'fix_niftest_afl_findings' into 'master'
Fix AFL findings in niftest

See merge request OpenMW/openmw!4988
2025-11-24 21:41:46 +00:00
Alexei Kotov c687a21ccb Merge branch 'enum_naming' into 'master'
Fix and enforce enum naming (#8424)

See merge request OpenMW/openmw!4986
2025-11-23 22:36:23 +03:00
elsid 246759ecd2
Only reserve capacity when reading collections
But do not initialize. If the meta information is invalid and has a big
value, initialization will take significant amount of time but there
might be no actual data in the file because it's too small.
2025-11-23 13:17:00 +01:00
elsid d4ce5a2ac6
Fix and enforce enum naming 2025-11-22 11:19:18 +01:00
rapidsamphire a3d99ce636 Add post-processing for bhkListShape subshapes
bhkListShape contains a list of subshape references that need to be
resolved after initial parsing. Without calling postRecordList(), the
mSubshapes list would contain unresolved RecordPtrs.

This adds the missing post() override to properly load subshape data,
consistent with other NIF record types that contain RecordPtr lists.
2025-11-07 14:56:05 -06:00
Alexei Kotov 6e70893113 Parse bhkPoseArray 2024-09-18 23:53:33 +03:00
Alexei Kotov 5f7fa640b0 Parse bhkRagdollTemplate/bhkRagdollTemplateData 2024-09-17 00:26:06 +03:00
Alexei Kotov 67e24a0ffe Read all Bethesda Havok Action records 2023-09-25 14:45:40 +03:00
Alexei Kotov a18601d6e0 Finish bhkPhantom hierarchy, read bhkAabbPhantom 2023-09-25 14:21:15 +03:00
Alexei Kotov e22654baa7 Read bhkMeshShape 2023-09-25 14:00:44 +03:00
Alexei Kotov 6b28f07537 Read bhkPlaneShape and bhkMultiSphereShape 2023-09-24 20:22:09 +03:00
Alexei Kotov 285eafbf66 Read bhkBallSocketConstraintChain and BSProceduralLightingController 2023-09-24 20:22:07 +03:00
Alexei Kotov 02c895c107 Read all remaining Havok constraint records 2023-09-24 20:21:30 +03:00
Alexei Kotov 6204a83a2b Read bhkBallAndSocketConstraint and bhkStiffSpringConstraint 2023-09-21 23:07:56 +03:00
Alexei Kotov 1aabc9aee5 Read bhkNPCollisionObject, bhkPhysicsSystem and bhkRagdollSystem 2023-09-20 08:27:20 +03:00
Alexei Kotov 312e32717c Read bhkConvexListShape and bhkConvexSweepShape 2023-09-20 07:14:03 +03:00
Alexei Kotov 0eb8d28e81 Read bhkBlendCollisionObject 2023-09-20 05:57:43 +03:00
Alexei Kotov ecf644bda5 Read bhkCylinderShape 2023-09-20 05:06:38 +03:00
Alexei Kotov 8a7e8a89ac Modernize Bethesda Havok records 2023-09-01 01:54:11 +03:00
Alexei Kotov 57144accf6 Phase out NIFStream::get[Types] 2023-08-17 09:15:45 +03:00
elsid dd54857610
Add missing array include 2023-07-29 00:29:03 +02:00
psi29a 62ef209185 Merge branch 'readingbooksbutnotquite' into 'master'
Read bhkLimitedHingeConstraint

See merge request OpenMW/openmw!3254
2023-07-22 09:46:21 +00:00
Alexei Kotov 6c4957fe4a Read bhkLimitedHingeConstraint 2023-07-20 05:30:22 +03:00
Alexei Kotov c34157fc28 Fix bhkConstraintMotorCInfo loading 2023-07-20 03:14:55 +03:00
Alexei Kotov ed8fd81714 Don't mess with A/B hardcoding in constraints 2023-07-15 06:59:22 +03:00
Alexei Kotov eb3e762c50 Read bhkHingeConstraint 2023-07-15 06:47:28 +03:00
Alexei Kotov 83be42893d Read bhkRagdollConstraint 2023-07-15 06:47:28 +03:00
Alexei Kotov 723f5c58e1 Add bhkConstraint 2023-07-15 06:47:28 +03:00
alekulyn ed532b5aca Add BSEffectShaderPropertyFloatController record reading 2023-07-10 17:58:32 -05:00
alekulyn 7ea2ea96b6 Read new nodes pt1 2023-07-10 17:27:05 -05:00
Alexei Kotov 9618a465ce Read bhkCompressedMeshShape 2023-02-24 20:32:35 +03:00
Alexei Kotov 115c30a573 Read bhkConvexTransformShape 2023-02-08 13:26:26 +03:00
elsid 0688b6de40
Separate record list reading from its state
To make it possible to set record list state independently from reading NIF
file.
2022-09-24 19:10:35 +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
clang-format-bot ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Alexei Kotov f17b1cd7ab Load bhkCapsuleShape and bhkSphereShape 2022-09-07 16:09:19 +03:00
Andrei Kortunov c36c28e8f9 Move NIF implementation to cpp files 2022-07-21 15:54:52 +04:00
Alexei Dobrohotov 25f4d05c2e Load bhkRigidBody 2021-11-13 19:59:30 +03:00
Alexei Dobrohotov c01fff280a Load bhkConvexVerticesShape, bhkBoxShape, bhkListShape 2021-11-13 19:53:03 +03:00
Alexei Dobrohotov 83aa96e38f Load a bunch of triangle strip-based Havok records 2021-11-13 19:52:08 +03:00
Alexei Dobrohotov e7cc76bba2 Load bhkMoppBvTreeShape 2021-11-13 19:27:32 +03:00
Alexei Dobrohotov 59ce00f742 Refactor all present Bethesda Havok 'support' 2021-11-13 19:14:28 +03:00
Alexei Dobrohotov cc4c96d0f1 Follow global naming convention for new records 2021-11-10 22:50:01 +03:00
Alexei Dobrohotov 6e5b45453d some physics stuff idk 2021-11-10 20:33:46 +03:00
Alexei Dobrohotov 5571099147 Load NiCollisionObject and bhkCollisionObject 2021-11-10 19:31:28 +03:00