From c0236f86ce5be3de406f7d12b5c54f542e67a940 Mon Sep 17 00:00:00 2001 From: Shon Ferguson <shonferg@users.sourceforge.net> Date: Thu, 21 Sep 2006 17:37:35 +0000 Subject: [PATCH] Added support for sub version 4 headers, object storage, and link method. Some objects like NiNodes already read correctly. --- include/NIF_IO.h | 2 +- include/gen/obj_defines.h | 2 +- include/obj/ABoneLODController.h | 2 +- include/obj/AKeyedData.h | 2 +- include/obj/APSysCtlr.h | 2 +- include/obj/APSysData.h | 2 +- include/obj/AParticleModifier.h | 2 +- include/obj/AbhkConstraint.h | 2 +- include/obj/AbhkRagdollConstraint.h | 2 +- include/obj/AbhkShapeCollection.h | 2 +- include/obj/AvoidNode.h | 2 +- include/obj/BSBound.h | 2 +- include/obj/BSFurnitureMarker.h | 2 +- include/obj/BSKeyframeController.h | 2 +- include/obj/BSPSysArrayEmitter.h | 2 +- include/obj/BSParentVelocityModifier.h | 2 +- include/obj/BSXFlags.h | 2 +- include/obj/FxButton.h | 2 +- include/obj/FxRadioButton.h | 2 +- include/obj/FxWidget.h | 2 +- include/obj/NiAVObject.h | 2 +- include/obj/NiAlphaController.h | 2 +- include/obj/NiAlphaProperty.h | 2 +- include/obj/NiAmbientLight.h | 2 +- include/obj/NiAutoNormalParticles.h | 2 +- include/obj/NiAutoNormalParticlesData.h | 2 +- include/obj/NiBSAnimationNode.h | 2 +- include/obj/NiBSBoneLODController.h | 2 +- include/obj/NiBSPArrayController.h | 2 +- include/obj/NiBSParticleNode.h | 2 +- include/obj/NiBSplineBasisData.h | 2 +- include/obj/NiBSplineCompFloatInterpolator.h | 2 +- include/obj/NiBSplineCompPoint3Interpolator.h | 2 +- .../obj/NiBSplineCompTransformInterpolator.h | 2 +- include/obj/NiBSplineData.h | 2 +- include/obj/NiBSplineInterpolator.h | 2 +- include/obj/NiBillboardNode.h | 2 +- include/obj/NiBinaryExtraData.h | 2 +- include/obj/NiBlendBoolInterpolator.h | 2 +- include/obj/NiBlendFloatInterpolator.h | 2 +- include/obj/NiBlendInterpolator.h | 2 +- include/obj/NiBlendPoint3Interpolator.h | 2 +- include/obj/NiBlendTransformInterpolator.h | 2 +- include/obj/NiBoneLODController.h | 2 +- include/obj/NiBoolData.h | 2 +- include/obj/NiBoolInterpolator.h | 2 +- include/obj/NiBoolTimelineInterpolator.h | 2 +- include/obj/NiBooleanExtraData.h | 2 +- include/obj/NiCamera.h | 2 +- include/obj/NiClod.h | 2 +- include/obj/NiClodData.h | 2 +- include/obj/NiCollisionData.h | 2 +- include/obj/NiCollisionObject.h | 2 +- include/obj/NiColorData.h | 2 +- include/obj/NiColorExtraData.h | 2 +- include/obj/NiControllerManager.h | 2 +- include/obj/NiControllerSequence.h | 2 +- include/obj/NiDefaultAVObjectPalette.h | 2 +- include/obj/NiDirectionalLight.h | 2 +- include/obj/NiDitherProperty.h | 2 +- include/obj/NiDynamicEffect.h | 2 +- include/obj/NiExtraData.h | 2 +- include/obj/NiFlipController.h | 2 +- include/obj/NiFloatData.h | 2 +- include/obj/NiFloatExtraData.h | 2 +- include/obj/NiFloatExtraDataController.h | 2 +- include/obj/NiFloatInterpolator.h | 2 +- include/obj/NiFloatsExtraData.h | 2 +- include/obj/NiFogProperty.h | 2 +- include/obj/NiGeomMorpherController.h | 2 +- include/obj/NiGravity.h | 2 +- include/obj/NiIntegerExtraData.h | 2 +- include/obj/NiIntegersExtraData.h | 2 +- include/obj/NiInterpolator.h | 2 +- include/obj/NiKeyframeController.h | 2 +- include/obj/NiKeyframeData.h | 2 +- include/obj/NiLODData.h | 2 +- include/obj/NiLODNode.h | 2 +- include/obj/NiLight.h | 2 +- include/obj/NiLightColorController.h | 2 +- include/obj/NiLightDimmerController.h | 2 +- include/obj/NiLookAtController.h | 2 +- include/obj/NiLookAtInterpolator.h | 2 +- include/obj/NiMaterialColorController.h | 2 +- include/obj/NiMaterialProperty.h | 2 +- include/obj/NiMeshPSysData.h | 2 +- include/obj/NiMeshParticleSystem.h | 2 +- include/obj/NiMorphData.h | 2 +- .../obj/NiMultiTargetTransformController.h | 2 +- include/obj/NiNode.h | 2 +- include/obj/NiObject.h | 2 +- include/obj/NiObjectNET.h | 2 +- include/obj/NiPSysAgeDeathModifier.h | 2 +- include/obj/NiPSysBombModifier.h | 2 +- include/obj/NiPSysBoundUpdateModifier.h | 2 +- include/obj/NiPSysBoxEmitter.h | 2 +- include/obj/NiPSysColliderManager.h | 2 +- include/obj/NiPSysColorModifier.h | 2 +- include/obj/NiPSysCylinderEmitter.h | 2 +- include/obj/NiPSysData.h | 2 +- include/obj/NiPSysDragModifier.h | 2 +- include/obj/NiPSysEmitter.h | 2 +- include/obj/NiPSysEmitterCtlr.h | 2 +- include/obj/NiPSysEmitterCtlrData.h | 2 +- include/obj/NiPSysEmitterDeclinationCtlr.h | 2 +- include/obj/NiPSysEmitterDeclinationVarCtlr.h | 2 +- include/obj/NiPSysEmitterInitialRadiusCtlr.h | 2 +- include/obj/NiPSysEmitterLifeSpanCtlr.h | 2 +- include/obj/NiPSysEmitterSpeedCtlr.h | 2 +- include/obj/NiPSysGravityModifier.h | 2 +- include/obj/NiPSysGravityStrengthCtlr.h | 2 +- include/obj/NiPSysGrowFadeModifier.h | 2 +- include/obj/NiPSysMeshEmitter.h | 2 +- include/obj/NiPSysMeshUpdateModifier.h | 2 +- include/obj/NiPSysModifier.h | 2 +- include/obj/NiPSysModifierActiveCtlr.h | 2 +- include/obj/NiPSysPlanarCollider.h | 2 +- include/obj/NiPSysPositionModifier.h | 2 +- include/obj/NiPSysResetOnLoopCtlr.h | 2 +- include/obj/NiPSysRotationModifier.h | 2 +- include/obj/NiPSysSpawnModifier.h | 2 +- include/obj/NiPSysSphereEmitter.h | 2 +- include/obj/NiPSysUpdateCtlr.h | 2 +- include/obj/NiPSysVolumeEmitter.h | 2 +- include/obj/NiPalette.h | 2 +- include/obj/NiParticleBomb.h | 2 +- include/obj/NiParticleColorModifier.h | 2 +- include/obj/NiParticleGrowFade.h | 2 +- include/obj/NiParticleMeshModifier.h | 2 +- include/obj/NiParticleMeshes.h | 2 +- include/obj/NiParticleMeshesData.h | 2 +- include/obj/NiParticleRotation.h | 2 +- include/obj/NiParticleSystem.h | 2 +- include/obj/NiParticleSystemController.h | 2 +- include/obj/NiParticles.h | 2 +- include/obj/NiParticlesData.h | 2 +- include/obj/NiPathController.h | 2 +- include/obj/NiPathInterpolator.h | 2 +- include/obj/NiPixelData.h | 2 +- include/obj/NiPlanarCollider.h | 2 +- include/obj/NiPoint3Interpolator.h | 2 +- include/obj/NiPointLight.h | 2 +- include/obj/NiPosData.h | 2 +- include/obj/NiProperty.h | 2 +- include/obj/NiRangeLODData.h | 2 +- include/obj/NiRotatingParticles.h | 2 +- include/obj/NiRotatingParticlesData.h | 2 +- include/obj/NiScreenLODData.h | 2 +- include/obj/NiSequenceStreamHelper.h | 2 +- include/obj/NiShadeProperty.h | 2 +- include/obj/NiSingleInterpolatorController.h | 2 +- include/obj/NiSkinData.h | 2 +- include/obj/NiSkinInstance.h | 2 +- include/obj/NiSkinPartition.h | 2 +- include/obj/NiSourceTexture.h | 2 +- include/obj/NiSpecularProperty.h | 2 +- include/obj/NiSphericalCollider.h | 2 +- include/obj/NiSpotLight.h | 2 +- include/obj/NiStencilProperty.h | 2 +- include/obj/NiStringExtraData.h | 2 +- include/obj/NiStringPalette.h | 2 +- include/obj/NiStringsExtraData.h | 2 +- include/obj/NiTextKeyExtraData.h | 2 +- include/obj/NiTextureEffect.h | 2 +- include/obj/NiTextureTransformController.h | 2 +- include/obj/NiTexturingProperty.h | 2 +- include/obj/NiTimeController.h | 2 +- include/obj/NiTransformController.h | 2 +- include/obj/NiTransformData.h | 2 +- include/obj/NiTransformInterpolator.h | 2 +- include/obj/NiTriBasedGeom.h | 2 +- include/obj/NiTriBasedGeomData.h | 2 +- include/obj/NiTriShape.h | 2 +- include/obj/NiTriShapeData.h | 2 +- include/obj/NiTriStrips.h | 2 +- include/obj/NiTriStripsData.h | 2 +- include/obj/NiUVController.h | 2 +- include/obj/NiUVData.h | 2 +- include/obj/NiVectorExtraData.h | 2 +- include/obj/NiVertWeightsExtraData.h | 2 +- include/obj/NiVertexColorProperty.h | 2 +- include/obj/NiVisController.h | 2 +- include/obj/NiVisData.h | 2 +- include/obj/NiWireframeProperty.h | 2 +- include/obj/NiZBufferProperty.h | 2 +- include/obj/RootCollisionNode.h | 2 +- include/obj/bhkBlendCollisionObject.h | 2 +- include/obj/bhkBlendController.h | 2 +- include/obj/bhkBoxShape.h | 2 +- include/obj/bhkCapsuleShape.h | 2 +- include/obj/bhkCollisionObject.h | 2 +- include/obj/bhkConvexShape.h | 2 +- include/obj/bhkConvexTransformShape.h | 2 +- include/obj/bhkConvexVerticesShape.h | 2 +- include/obj/bhkEntity.h | 2 +- include/obj/bhkHingeConstraint.h | 2 +- include/obj/bhkLimitedHingeConstraint.h | 2 +- include/obj/bhkListShape.h | 2 +- include/obj/bhkMalleableConstraint.h | 2 +- include/obj/bhkMoppBvTreeShape.h | 2 +- include/obj/bhkMultiSphereShape.h | 2 +- include/obj/bhkNiTriStripsShape.h | 2 +- include/obj/bhkPackedNiTriStripsShape.h | 2 +- include/obj/bhkPrismaticConstraint.h | 2 +- include/obj/bhkRagdollConstraint.h | 2 +- include/obj/bhkRefObject.h | 2 +- include/obj/bhkRigidBody.h | 2 +- include/obj/bhkRigidBodyT.h | 2 +- include/obj/bhkSPCollisionObject.h | 2 +- include/obj/bhkSerializable.h | 2 +- include/obj/bhkShape.h | 2 +- include/obj/bhkSimpleShapePhantom.h | 2 +- include/obj/bhkSphereRepShape.h | 2 +- include/obj/bhkSphereShape.h | 2 +- include/obj/bhkStiffSpringConstraint.h | 2 +- include/obj/bhkTransformShape.h | 2 +- include/obj/bhkWorldObject.h | 2 +- include/obj/hkPackedNiTriStripsData.h | 2 +- src/NIF_IO.cpp | 42 +- src/gen/Header.cpp | 16 +- src/gen/obj_impl.cpp | 1731 ++++------------- src/niflib.cpp | 177 +- src/obj/ABoneLODController.cpp | 2 +- src/obj/AKeyedData.cpp | 2 +- src/obj/APSysCtlr.cpp | 2 +- src/obj/APSysData.cpp | 2 +- src/obj/AParticleModifier.cpp | 2 +- src/obj/AbhkConstraint.cpp | 2 +- src/obj/AbhkRagdollConstraint.cpp | 2 +- src/obj/AbhkShapeCollection.cpp | 2 +- src/obj/AvoidNode.cpp | 2 +- src/obj/BSBound.cpp | 2 +- src/obj/BSFurnitureMarker.cpp | 2 +- src/obj/BSKeyframeController.cpp | 2 +- src/obj/BSPSysArrayEmitter.cpp | 2 +- src/obj/BSParentVelocityModifier.cpp | 2 +- src/obj/BSXFlags.cpp | 2 +- src/obj/FxButton.cpp | 2 +- src/obj/FxRadioButton.cpp | 2 +- src/obj/FxWidget.cpp | 2 +- src/obj/NiAVObject.cpp | 2 +- src/obj/NiAlphaController.cpp | 2 +- src/obj/NiAlphaProperty.cpp | 2 +- src/obj/NiAmbientLight.cpp | 2 +- src/obj/NiAutoNormalParticles.cpp | 2 +- src/obj/NiAutoNormalParticlesData.cpp | 2 +- src/obj/NiBSAnimationNode.cpp | 2 +- src/obj/NiBSBoneLODController.cpp | 2 +- src/obj/NiBSPArrayController.cpp | 2 +- src/obj/NiBSParticleNode.cpp | 2 +- src/obj/NiBSplineBasisData.cpp | 2 +- src/obj/NiBSplineCompFloatInterpolator.cpp | 2 +- src/obj/NiBSplineCompPoint3Interpolator.cpp | 2 +- .../NiBSplineCompTransformInterpolator.cpp | 2 +- src/obj/NiBSplineData.cpp | 2 +- src/obj/NiBSplineInterpolator.cpp | 2 +- src/obj/NiBillboardNode.cpp | 2 +- src/obj/NiBinaryExtraData.cpp | 2 +- src/obj/NiBlendBoolInterpolator.cpp | 2 +- src/obj/NiBlendFloatInterpolator.cpp | 2 +- src/obj/NiBlendInterpolator.cpp | 2 +- src/obj/NiBlendPoint3Interpolator.cpp | 2 +- src/obj/NiBlendTransformInterpolator.cpp | 2 +- src/obj/NiBoneLODController.cpp | 2 +- src/obj/NiBoolData.cpp | 2 +- src/obj/NiBoolInterpolator.cpp | 2 +- src/obj/NiBoolTimelineInterpolator.cpp | 2 +- src/obj/NiBooleanExtraData.cpp | 2 +- src/obj/NiCamera.cpp | 2 +- src/obj/NiClod.cpp | 2 +- src/obj/NiClodData.cpp | 2 +- src/obj/NiCollisionData.cpp | 2 +- src/obj/NiCollisionObject.cpp | 2 +- src/obj/NiColorData.cpp | 2 +- src/obj/NiColorExtraData.cpp | 2 +- src/obj/NiControllerManager.cpp | 2 +- src/obj/NiControllerSequence.cpp | 2 +- src/obj/NiDefaultAVObjectPalette.cpp | 2 +- src/obj/NiDirectionalLight.cpp | 2 +- src/obj/NiDitherProperty.cpp | 2 +- src/obj/NiDynamicEffect.cpp | 2 +- src/obj/NiExtraData.cpp | 2 +- src/obj/NiFlipController.cpp | 2 +- src/obj/NiFloatData.cpp | 2 +- src/obj/NiFloatExtraData.cpp | 2 +- src/obj/NiFloatExtraDataController.cpp | 2 +- src/obj/NiFloatInterpolator.cpp | 2 +- src/obj/NiFloatsExtraData.cpp | 2 +- src/obj/NiFogProperty.cpp | 2 +- src/obj/NiGeomMorpherController.cpp | 2 +- src/obj/NiGravity.cpp | 2 +- src/obj/NiIntegerExtraData.cpp | 2 +- src/obj/NiIntegersExtraData.cpp | 2 +- src/obj/NiInterpolator.cpp | 2 +- src/obj/NiKeyframeController.cpp | 2 +- src/obj/NiKeyframeData.cpp | 2 +- src/obj/NiLODData.cpp | 2 +- src/obj/NiLODNode.cpp | 2 +- src/obj/NiLight.cpp | 2 +- src/obj/NiLightColorController.cpp | 2 +- src/obj/NiLightDimmerController.cpp | 2 +- src/obj/NiLookAtController.cpp | 2 +- src/obj/NiLookAtInterpolator.cpp | 2 +- src/obj/NiMaterialColorController.cpp | 2 +- src/obj/NiMaterialProperty.cpp | 2 +- src/obj/NiMeshPSysData.cpp | 2 +- src/obj/NiMeshParticleSystem.cpp | 2 +- src/obj/NiMorphData.cpp | 2 +- src/obj/NiMultiTargetTransformController.cpp | 2 +- src/obj/NiNode.cpp | 2 +- src/obj/NiObjectNET.cpp | 2 +- src/obj/NiPSysAgeDeathModifier.cpp | 2 +- src/obj/NiPSysBombModifier.cpp | 2 +- src/obj/NiPSysBoundUpdateModifier.cpp | 2 +- src/obj/NiPSysBoxEmitter.cpp | 2 +- src/obj/NiPSysColliderManager.cpp | 2 +- src/obj/NiPSysColorModifier.cpp | 2 +- src/obj/NiPSysCylinderEmitter.cpp | 2 +- src/obj/NiPSysData.cpp | 2 +- src/obj/NiPSysDragModifier.cpp | 2 +- src/obj/NiPSysEmitter.cpp | 2 +- src/obj/NiPSysEmitterCtlr.cpp | 2 +- src/obj/NiPSysEmitterCtlrData.cpp | 2 +- src/obj/NiPSysEmitterDeclinationCtlr.cpp | 2 +- src/obj/NiPSysEmitterDeclinationVarCtlr.cpp | 2 +- src/obj/NiPSysEmitterInitialRadiusCtlr.cpp | 2 +- src/obj/NiPSysEmitterLifeSpanCtlr.cpp | 2 +- src/obj/NiPSysEmitterSpeedCtlr.cpp | 2 +- src/obj/NiPSysGravityModifier.cpp | 2 +- src/obj/NiPSysGravityStrengthCtlr.cpp | 2 +- src/obj/NiPSysGrowFadeModifier.cpp | 2 +- src/obj/NiPSysMeshEmitter.cpp | 2 +- src/obj/NiPSysMeshUpdateModifier.cpp | 2 +- src/obj/NiPSysModifier.cpp | 2 +- src/obj/NiPSysModifierActiveCtlr.cpp | 2 +- src/obj/NiPSysPlanarCollider.cpp | 2 +- src/obj/NiPSysPositionModifier.cpp | 2 +- src/obj/NiPSysResetOnLoopCtlr.cpp | 2 +- src/obj/NiPSysRotationModifier.cpp | 2 +- src/obj/NiPSysSpawnModifier.cpp | 2 +- src/obj/NiPSysSphereEmitter.cpp | 2 +- src/obj/NiPSysUpdateCtlr.cpp | 2 +- src/obj/NiPSysVolumeEmitter.cpp | 2 +- src/obj/NiPalette.cpp | 2 +- src/obj/NiParticleBomb.cpp | 2 +- src/obj/NiParticleColorModifier.cpp | 2 +- src/obj/NiParticleGrowFade.cpp | 2 +- src/obj/NiParticleMeshModifier.cpp | 2 +- src/obj/NiParticleMeshes.cpp | 2 +- src/obj/NiParticleMeshesData.cpp | 2 +- src/obj/NiParticleRotation.cpp | 2 +- src/obj/NiParticleSystem.cpp | 2 +- src/obj/NiParticleSystemController.cpp | 2 +- src/obj/NiParticles.cpp | 2 +- src/obj/NiParticlesData.cpp | 2 +- src/obj/NiPathController.cpp | 2 +- src/obj/NiPathInterpolator.cpp | 2 +- src/obj/NiPixelData.cpp | 2 +- src/obj/NiPlanarCollider.cpp | 2 +- src/obj/NiPoint3Interpolator.cpp | 2 +- src/obj/NiPointLight.cpp | 2 +- src/obj/NiPosData.cpp | 2 +- src/obj/NiProperty.cpp | 2 +- src/obj/NiRangeLODData.cpp | 2 +- src/obj/NiRotatingParticles.cpp | 2 +- src/obj/NiRotatingParticlesData.cpp | 2 +- src/obj/NiScreenLODData.cpp | 2 +- src/obj/NiSequenceStreamHelper.cpp | 2 +- src/obj/NiShadeProperty.cpp | 2 +- src/obj/NiSingleInterpolatorController.cpp | 2 +- src/obj/NiSkinData.cpp | 2 +- src/obj/NiSkinInstance.cpp | 2 +- src/obj/NiSkinPartition.cpp | 2 +- src/obj/NiSourceTexture.cpp | 2 +- src/obj/NiSpecularProperty.cpp | 2 +- src/obj/NiSphericalCollider.cpp | 2 +- src/obj/NiSpotLight.cpp | 2 +- src/obj/NiStencilProperty.cpp | 2 +- src/obj/NiStringExtraData.cpp | 2 +- src/obj/NiStringPalette.cpp | 2 +- src/obj/NiStringsExtraData.cpp | 2 +- src/obj/NiTextKeyExtraData.cpp | 2 +- src/obj/NiTextureEffect.cpp | 2 +- src/obj/NiTextureTransformController.cpp | 2 +- src/obj/NiTexturingProperty.cpp | 2 +- src/obj/NiTimeController.cpp | 2 +- src/obj/NiTransformController.cpp | 2 +- src/obj/NiTransformData.cpp | 2 +- src/obj/NiTransformInterpolator.cpp | 2 +- src/obj/NiTriBasedGeom.cpp | 2 +- src/obj/NiTriBasedGeomData.cpp | 2 +- src/obj/NiTriShape.cpp | 2 +- src/obj/NiTriShapeData.cpp | 2 +- src/obj/NiTriStrips.cpp | 2 +- src/obj/NiTriStripsData.cpp | 2 +- src/obj/NiUVController.cpp | 2 +- src/obj/NiUVData.cpp | 2 +- src/obj/NiVectorExtraData.cpp | 2 +- src/obj/NiVertWeightsExtraData.cpp | 2 +- src/obj/NiVertexColorProperty.cpp | 2 +- src/obj/NiVisController.cpp | 2 +- src/obj/NiVisData.cpp | 2 +- src/obj/NiWireframeProperty.cpp | 2 +- src/obj/NiZBufferProperty.cpp | 2 +- src/obj/RootCollisionNode.cpp | 2 +- src/obj/bhkBlendCollisionObject.cpp | 2 +- src/obj/bhkBlendController.cpp | 2 +- src/obj/bhkBoxShape.cpp | 2 +- src/obj/bhkCapsuleShape.cpp | 2 +- src/obj/bhkCollisionObject.cpp | 2 +- src/obj/bhkConvexShape.cpp | 2 +- src/obj/bhkConvexTransformShape.cpp | 2 +- src/obj/bhkConvexVerticesShape.cpp | 2 +- src/obj/bhkEntity.cpp | 2 +- src/obj/bhkHingeConstraint.cpp | 2 +- src/obj/bhkLimitedHingeConstraint.cpp | 2 +- src/obj/bhkListShape.cpp | 2 +- src/obj/bhkMalleableConstraint.cpp | 2 +- src/obj/bhkMoppBvTreeShape.cpp | 2 +- src/obj/bhkMultiSphereShape.cpp | 2 +- src/obj/bhkNiTriStripsShape.cpp | 2 +- src/obj/bhkPackedNiTriStripsShape.cpp | 2 +- src/obj/bhkPrismaticConstraint.cpp | 2 +- src/obj/bhkRagdollConstraint.cpp | 2 +- src/obj/bhkRefObject.cpp | 2 +- src/obj/bhkRigidBody.cpp | 2 +- src/obj/bhkRigidBodyT.cpp | 2 +- src/obj/bhkSPCollisionObject.cpp | 2 +- src/obj/bhkSerializable.cpp | 2 +- src/obj/bhkShape.cpp | 2 +- src/obj/bhkSimpleShapePhantom.cpp | 2 +- src/obj/bhkSphereRepShape.cpp | 2 +- src/obj/bhkSphereShape.cpp | 2 +- src/obj/bhkStiffSpringConstraint.cpp | 2 +- src/obj/bhkTransformShape.cpp | 2 +- src/obj/bhkWorldObject.cpp | 2 +- src/obj/hkPackedNiTriStripsData.cpp | 2 +- 437 files changed, 969 insertions(+), 1863 deletions(-) diff --git a/include/NIF_IO.h b/include/NIF_IO.h index 5a6d6494..a19e0a32 100644 --- a/include/NIF_IO.h +++ b/include/NIF_IO.h @@ -284,7 +284,7 @@ void NifStream( Quaternion & val, istream& in, uint version = 0 ); void NifStream( Quaternion const & val, ostream& out, uint version = 0 ); //HeaderString -void NifStream( HeaderString & val, istream& in, uint version = 0 ); +void NifStream( HeaderString & val, istream& in, uint & version ); //Sets the passed in version varible void NifStream( HeaderString const & val, ostream& out, uint version = 0 ); ostream & operator<<( ostream & out, HeaderString const & val ); diff --git a/include/gen/obj_defines.h b/include/gen/obj_defines.h index 9914f618..8ac45871 100644 --- a/include/gen/obj_defines.h +++ b/include/gen/obj_defines.h @@ -11,7 +11,7 @@ private:\ void InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version );\ void InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const;\ string InternalAsString( bool verbose ) const;\ - void InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version );\ + void InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version );\ list<NiObjectRef> InternalGetRefs() const; #define NI_OBJECT_MEMBERS \ diff --git a/include/obj/ABoneLODController.h b/include/obj/ABoneLODController.h index eeb7c362..bf877017 100644 --- a/include/obj/ABoneLODController.h +++ b/include/obj/ABoneLODController.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/AKeyedData.h b/include/obj/AKeyedData.h index f5de9671..f704daeb 100644 --- a/include/obj/AKeyedData.h +++ b/include/obj/AKeyedData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/APSysCtlr.h b/include/obj/APSysCtlr.h index 0738662b..ed0f8129 100644 --- a/include/obj/APSysCtlr.h +++ b/include/obj/APSysCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/APSysData.h b/include/obj/APSysData.h index 57717777..8d671373 100644 --- a/include/obj/APSysData.h +++ b/include/obj/APSysData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/AParticleModifier.h b/include/obj/AParticleModifier.h index 4f0e8ec9..70ce9846 100644 --- a/include/obj/AParticleModifier.h +++ b/include/obj/AParticleModifier.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/AbhkConstraint.h b/include/obj/AbhkConstraint.h index 88349b6b..bc0a1dee 100644 --- a/include/obj/AbhkConstraint.h +++ b/include/obj/AbhkConstraint.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/AbhkRagdollConstraint.h b/include/obj/AbhkRagdollConstraint.h index c81cc709..5917ddc2 100644 --- a/include/obj/AbhkRagdollConstraint.h +++ b/include/obj/AbhkRagdollConstraint.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/AbhkShapeCollection.h b/include/obj/AbhkShapeCollection.h index b45f0a9b..61cfa519 100644 --- a/include/obj/AbhkShapeCollection.h +++ b/include/obj/AbhkShapeCollection.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/AvoidNode.h b/include/obj/AvoidNode.h index 908eb9b3..a8b84bdc 100644 --- a/include/obj/AvoidNode.h +++ b/include/obj/AvoidNode.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/BSBound.h b/include/obj/BSBound.h index edfc2073..72cb5884 100644 --- a/include/obj/BSBound.h +++ b/include/obj/BSBound.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/BSFurnitureMarker.h b/include/obj/BSFurnitureMarker.h index 1784abcf..e5733326 100644 --- a/include/obj/BSFurnitureMarker.h +++ b/include/obj/BSFurnitureMarker.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/BSKeyframeController.h b/include/obj/BSKeyframeController.h index 18781c5e..694658ad 100644 --- a/include/obj/BSKeyframeController.h +++ b/include/obj/BSKeyframeController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/BSPSysArrayEmitter.h b/include/obj/BSPSysArrayEmitter.h index be6cb4bf..9979c734 100644 --- a/include/obj/BSPSysArrayEmitter.h +++ b/include/obj/BSPSysArrayEmitter.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/BSParentVelocityModifier.h b/include/obj/BSParentVelocityModifier.h index 0fe839bf..a3cbbd3f 100644 --- a/include/obj/BSParentVelocityModifier.h +++ b/include/obj/BSParentVelocityModifier.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/BSXFlags.h b/include/obj/BSXFlags.h index 91366c44..7d9eed5a 100644 --- a/include/obj/BSXFlags.h +++ b/include/obj/BSXFlags.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/FxButton.h b/include/obj/FxButton.h index 6759d48c..96858d40 100644 --- a/include/obj/FxButton.h +++ b/include/obj/FxButton.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/FxRadioButton.h b/include/obj/FxRadioButton.h index 82c1084c..3c1dbc14 100644 --- a/include/obj/FxRadioButton.h +++ b/include/obj/FxRadioButton.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/FxWidget.h b/include/obj/FxWidget.h index 8808c1ed..b00336d4 100644 --- a/include/obj/FxWidget.h +++ b/include/obj/FxWidget.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiAVObject.h b/include/obj/NiAVObject.h index 159311d7..132f3558 100644 --- a/include/obj/NiAVObject.h +++ b/include/obj/NiAVObject.h @@ -37,7 +37,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; //TODO: What to do with newer files that have a link for a bounding box? Wrap this in a function and translate? diff --git a/include/obj/NiAlphaController.h b/include/obj/NiAlphaController.h index 0f9ac268..09016693 100644 --- a/include/obj/NiAlphaController.h +++ b/include/obj/NiAlphaController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiAlphaProperty.h b/include/obj/NiAlphaProperty.h index 6780ede1..ee8db6ea 100644 --- a/include/obj/NiAlphaProperty.h +++ b/include/obj/NiAlphaProperty.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiAmbientLight.h b/include/obj/NiAmbientLight.h index 538f983e..2ea53ac0 100644 --- a/include/obj/NiAmbientLight.h +++ b/include/obj/NiAmbientLight.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiAutoNormalParticles.h b/include/obj/NiAutoNormalParticles.h index d5d18069..2cc0bd7b 100644 --- a/include/obj/NiAutoNormalParticles.h +++ b/include/obj/NiAutoNormalParticles.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiAutoNormalParticlesData.h b/include/obj/NiAutoNormalParticlesData.h index ef93fe2c..a84aca7d 100644 --- a/include/obj/NiAutoNormalParticlesData.h +++ b/include/obj/NiAutoNormalParticlesData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSAnimationNode.h b/include/obj/NiBSAnimationNode.h index 46be0bf5..c36f3c77 100644 --- a/include/obj/NiBSAnimationNode.h +++ b/include/obj/NiBSAnimationNode.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSBoneLODController.h b/include/obj/NiBSBoneLODController.h index a9e77fd6..256363f6 100644 --- a/include/obj/NiBSBoneLODController.h +++ b/include/obj/NiBSBoneLODController.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSPArrayController.h b/include/obj/NiBSPArrayController.h index 21f06db0..ae14d217 100644 --- a/include/obj/NiBSPArrayController.h +++ b/include/obj/NiBSPArrayController.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSParticleNode.h b/include/obj/NiBSParticleNode.h index f59b29bb..0f38c70b 100644 --- a/include/obj/NiBSParticleNode.h +++ b/include/obj/NiBSParticleNode.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSplineBasisData.h b/include/obj/NiBSplineBasisData.h index 345893aa..4f1d6808 100644 --- a/include/obj/NiBSplineBasisData.h +++ b/include/obj/NiBSplineBasisData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSplineCompFloatInterpolator.h b/include/obj/NiBSplineCompFloatInterpolator.h index 76f203af..ae7a902d 100644 --- a/include/obj/NiBSplineCompFloatInterpolator.h +++ b/include/obj/NiBSplineCompFloatInterpolator.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSplineCompPoint3Interpolator.h b/include/obj/NiBSplineCompPoint3Interpolator.h index 12c64178..26fd93aa 100644 --- a/include/obj/NiBSplineCompPoint3Interpolator.h +++ b/include/obj/NiBSplineCompPoint3Interpolator.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSplineCompTransformInterpolator.h b/include/obj/NiBSplineCompTransformInterpolator.h index 4f8f5920..71863c91 100644 --- a/include/obj/NiBSplineCompTransformInterpolator.h +++ b/include/obj/NiBSplineCompTransformInterpolator.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSplineData.h b/include/obj/NiBSplineData.h index 261ea1b6..da107606 100644 --- a/include/obj/NiBSplineData.h +++ b/include/obj/NiBSplineData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBSplineInterpolator.h b/include/obj/NiBSplineInterpolator.h index 4cef7d35..bd760d3d 100644 --- a/include/obj/NiBSplineInterpolator.h +++ b/include/obj/NiBSplineInterpolator.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBillboardNode.h b/include/obj/NiBillboardNode.h index 9a0ab03a..1c07ad0d 100644 --- a/include/obj/NiBillboardNode.h +++ b/include/obj/NiBillboardNode.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBinaryExtraData.h b/include/obj/NiBinaryExtraData.h index d941b6e0..c2264340 100644 --- a/include/obj/NiBinaryExtraData.h +++ b/include/obj/NiBinaryExtraData.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBlendBoolInterpolator.h b/include/obj/NiBlendBoolInterpolator.h index 18929226..c72e5270 100644 --- a/include/obj/NiBlendBoolInterpolator.h +++ b/include/obj/NiBlendBoolInterpolator.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBlendFloatInterpolator.h b/include/obj/NiBlendFloatInterpolator.h index f7cc7be5..da59a3e5 100644 --- a/include/obj/NiBlendFloatInterpolator.h +++ b/include/obj/NiBlendFloatInterpolator.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBlendInterpolator.h b/include/obj/NiBlendInterpolator.h index 0b9332b9..50045d8e 100644 --- a/include/obj/NiBlendInterpolator.h +++ b/include/obj/NiBlendInterpolator.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBlendPoint3Interpolator.h b/include/obj/NiBlendPoint3Interpolator.h index fdc8a62e..833c78da 100644 --- a/include/obj/NiBlendPoint3Interpolator.h +++ b/include/obj/NiBlendPoint3Interpolator.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBlendTransformInterpolator.h b/include/obj/NiBlendTransformInterpolator.h index 89190853..a30dd385 100644 --- a/include/obj/NiBlendTransformInterpolator.h +++ b/include/obj/NiBlendTransformInterpolator.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBoneLODController.h b/include/obj/NiBoneLODController.h index 8c8fdc9b..19b1e9cf 100644 --- a/include/obj/NiBoneLODController.h +++ b/include/obj/NiBoneLODController.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBoolData.h b/include/obj/NiBoolData.h index 20a5cd4e..913d4f0c 100644 --- a/include/obj/NiBoolData.h +++ b/include/obj/NiBoolData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBoolInterpolator.h b/include/obj/NiBoolInterpolator.h index 4c779aab..5271fa41 100644 --- a/include/obj/NiBoolInterpolator.h +++ b/include/obj/NiBoolInterpolator.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBoolTimelineInterpolator.h b/include/obj/NiBoolTimelineInterpolator.h index 51d69b3e..3100137f 100644 --- a/include/obj/NiBoolTimelineInterpolator.h +++ b/include/obj/NiBoolTimelineInterpolator.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiBooleanExtraData.h b/include/obj/NiBooleanExtraData.h index 26c23a10..570bc1e7 100644 --- a/include/obj/NiBooleanExtraData.h +++ b/include/obj/NiBooleanExtraData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiCamera.h b/include/obj/NiCamera.h index e1ca2384..22135664 100644 --- a/include/obj/NiCamera.h +++ b/include/obj/NiCamera.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiClod.h b/include/obj/NiClod.h index 98b05419..f7f9f385 100644 --- a/include/obj/NiClod.h +++ b/include/obj/NiClod.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiClodData.h b/include/obj/NiClodData.h index d78146ee..91846b59 100644 --- a/include/obj/NiClodData.h +++ b/include/obj/NiClodData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiCollisionData.h b/include/obj/NiCollisionData.h index 808f78ce..da425855 100644 --- a/include/obj/NiCollisionData.h +++ b/include/obj/NiCollisionData.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiCollisionObject.h b/include/obj/NiCollisionObject.h index 66f5f2ca..e6775864 100644 --- a/include/obj/NiCollisionObject.h +++ b/include/obj/NiCollisionObject.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiColorData.h b/include/obj/NiColorData.h index 26c1dde5..ff210e5b 100644 --- a/include/obj/NiColorData.h +++ b/include/obj/NiColorData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiColorExtraData.h b/include/obj/NiColorExtraData.h index 32864d8d..9bb13a38 100644 --- a/include/obj/NiColorExtraData.h +++ b/include/obj/NiColorExtraData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiControllerManager.h b/include/obj/NiControllerManager.h index 53ed0967..6083b01e 100644 --- a/include/obj/NiControllerManager.h +++ b/include/obj/NiControllerManager.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiControllerSequence.h b/include/obj/NiControllerSequence.h index 0905b62b..6e0294e6 100644 --- a/include/obj/NiControllerSequence.h +++ b/include/obj/NiControllerSequence.h @@ -39,7 +39,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiDefaultAVObjectPalette.h b/include/obj/NiDefaultAVObjectPalette.h index 5381a6a4..d291c2ab 100644 --- a/include/obj/NiDefaultAVObjectPalette.h +++ b/include/obj/NiDefaultAVObjectPalette.h @@ -33,7 +33,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiDirectionalLight.h b/include/obj/NiDirectionalLight.h index 9a984adf..c3697303 100644 --- a/include/obj/NiDirectionalLight.h +++ b/include/obj/NiDirectionalLight.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiDitherProperty.h b/include/obj/NiDitherProperty.h index 550cce5a..ef6a0bef 100644 --- a/include/obj/NiDitherProperty.h +++ b/include/obj/NiDitherProperty.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiDynamicEffect.h b/include/obj/NiDynamicEffect.h index a9af02e2..10f8f55d 100644 --- a/include/obj/NiDynamicEffect.h +++ b/include/obj/NiDynamicEffect.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiExtraData.h b/include/obj/NiExtraData.h index 1c26ea78..e7b0a525 100644 --- a/include/obj/NiExtraData.h +++ b/include/obj/NiExtraData.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiFlipController.h b/include/obj/NiFlipController.h index 676fc306..1b3bbd62 100644 --- a/include/obj/NiFlipController.h +++ b/include/obj/NiFlipController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiFloatData.h b/include/obj/NiFloatData.h index fe8833a0..fcf4d443 100644 --- a/include/obj/NiFloatData.h +++ b/include/obj/NiFloatData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiFloatExtraData.h b/include/obj/NiFloatExtraData.h index 1369c7ec..ce3e7fa9 100644 --- a/include/obj/NiFloatExtraData.h +++ b/include/obj/NiFloatExtraData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiFloatExtraDataController.h b/include/obj/NiFloatExtraDataController.h index d1a9aa9e..90868cd1 100644 --- a/include/obj/NiFloatExtraDataController.h +++ b/include/obj/NiFloatExtraDataController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiFloatInterpolator.h b/include/obj/NiFloatInterpolator.h index fe44e779..fd0d4782 100644 --- a/include/obj/NiFloatInterpolator.h +++ b/include/obj/NiFloatInterpolator.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiFloatsExtraData.h b/include/obj/NiFloatsExtraData.h index b1276ee9..3f2ca143 100644 --- a/include/obj/NiFloatsExtraData.h +++ b/include/obj/NiFloatsExtraData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiFogProperty.h b/include/obj/NiFogProperty.h index 47ee0d02..3492d51a 100644 --- a/include/obj/NiFogProperty.h +++ b/include/obj/NiFogProperty.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiGeomMorpherController.h b/include/obj/NiGeomMorpherController.h index 503f49d0..34575a90 100644 --- a/include/obj/NiGeomMorpherController.h +++ b/include/obj/NiGeomMorpherController.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiGravity.h b/include/obj/NiGravity.h index 190a175e..5785e8dc 100644 --- a/include/obj/NiGravity.h +++ b/include/obj/NiGravity.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; protected: diff --git a/include/obj/NiIntegerExtraData.h b/include/obj/NiIntegerExtraData.h index 5489096b..8e190d75 100644 --- a/include/obj/NiIntegerExtraData.h +++ b/include/obj/NiIntegerExtraData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiIntegersExtraData.h b/include/obj/NiIntegersExtraData.h index 1a2cb6da..a2988d17 100644 --- a/include/obj/NiIntegersExtraData.h +++ b/include/obj/NiIntegersExtraData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiInterpolator.h b/include/obj/NiInterpolator.h index 394ff2d9..42148cc9 100644 --- a/include/obj/NiInterpolator.h +++ b/include/obj/NiInterpolator.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiKeyframeController.h b/include/obj/NiKeyframeController.h index a0a8bd3e..185cb039 100644 --- a/include/obj/NiKeyframeController.h +++ b/include/obj/NiKeyframeController.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiKeyframeData.h b/include/obj/NiKeyframeData.h index fb08de34..eb04032d 100644 --- a/include/obj/NiKeyframeData.h +++ b/include/obj/NiKeyframeData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiLODData.h b/include/obj/NiLODData.h index e0dfbbc1..04c9f7ff 100644 --- a/include/obj/NiLODData.h +++ b/include/obj/NiLODData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiLODNode.h b/include/obj/NiLODNode.h index 6ac4fb44..872e303b 100644 --- a/include/obj/NiLODNode.h +++ b/include/obj/NiLODNode.h @@ -37,7 +37,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiLight.h b/include/obj/NiLight.h index ee917bc5..f143a4be 100644 --- a/include/obj/NiLight.h +++ b/include/obj/NiLight.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiLightColorController.h b/include/obj/NiLightColorController.h index a26f16bb..1581433e 100644 --- a/include/obj/NiLightColorController.h +++ b/include/obj/NiLightColorController.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiLightDimmerController.h b/include/obj/NiLightDimmerController.h index 5c352c0a..9a922576 100644 --- a/include/obj/NiLightDimmerController.h +++ b/include/obj/NiLightDimmerController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiLookAtController.h b/include/obj/NiLookAtController.h index 0e4bd626..b7b285fe 100644 --- a/include/obj/NiLookAtController.h +++ b/include/obj/NiLookAtController.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiLookAtInterpolator.h b/include/obj/NiLookAtInterpolator.h index 1dfd35c4..a76f80ed 100644 --- a/include/obj/NiLookAtInterpolator.h +++ b/include/obj/NiLookAtInterpolator.h @@ -36,7 +36,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiMaterialColorController.h b/include/obj/NiMaterialColorController.h index 99fcd03d..9b0e4378 100644 --- a/include/obj/NiMaterialColorController.h +++ b/include/obj/NiMaterialColorController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiMaterialProperty.h b/include/obj/NiMaterialProperty.h index 0ca66c1c..3cb9300a 100644 --- a/include/obj/NiMaterialProperty.h +++ b/include/obj/NiMaterialProperty.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiMeshPSysData.h b/include/obj/NiMeshPSysData.h index 9d0e14fb..19ea8bd7 100644 --- a/include/obj/NiMeshPSysData.h +++ b/include/obj/NiMeshPSysData.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiMeshParticleSystem.h b/include/obj/NiMeshParticleSystem.h index 230bab72..ec7d234c 100644 --- a/include/obj/NiMeshParticleSystem.h +++ b/include/obj/NiMeshParticleSystem.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiMorphData.h b/include/obj/NiMorphData.h index 32f4fa78..c9674a1c 100644 --- a/include/obj/NiMorphData.h +++ b/include/obj/NiMorphData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiMultiTargetTransformController.h b/include/obj/NiMultiTargetTransformController.h index 67303f01..72de8e63 100644 --- a/include/obj/NiMultiTargetTransformController.h +++ b/include/obj/NiMultiTargetTransformController.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiNode.h b/include/obj/NiNode.h index 2bcb6ee7..18733226 100644 --- a/include/obj/NiNode.h +++ b/include/obj/NiNode.h @@ -37,7 +37,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiObject.h b/include/obj/NiObject.h index 8c440bb3..11512acf 100644 --- a/include/obj/NiObject.h +++ b/include/obj/NiObject.h @@ -65,7 +65,7 @@ public: //Streaming Functions NIFLIB_HIDDEN virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {} NIFLIB_HIDDEN virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const {} - NIFLIB_HIDDEN virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {} + NIFLIB_HIDDEN virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {} //Reference Counting NIFLIB_API void AddRef() const; //Should not be called directly diff --git a/include/obj/NiObjectNET.h b/include/obj/NiObjectNET.h index b1e2e5d3..d40c7038 100644 --- a/include/obj/NiObjectNET.h +++ b/include/obj/NiObjectNET.h @@ -37,7 +37,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; string GetName(); diff --git a/include/obj/NiPSysAgeDeathModifier.h b/include/obj/NiPSysAgeDeathModifier.h index af71a029..8811a53b 100644 --- a/include/obj/NiPSysAgeDeathModifier.h +++ b/include/obj/NiPSysAgeDeathModifier.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysBombModifier.h b/include/obj/NiPSysBombModifier.h index 1999540c..871cd60b 100644 --- a/include/obj/NiPSysBombModifier.h +++ b/include/obj/NiPSysBombModifier.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysBoundUpdateModifier.h b/include/obj/NiPSysBoundUpdateModifier.h index f85fbc17..8cfbc103 100644 --- a/include/obj/NiPSysBoundUpdateModifier.h +++ b/include/obj/NiPSysBoundUpdateModifier.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysBoxEmitter.h b/include/obj/NiPSysBoxEmitter.h index 02c5bc6a..42ba40b0 100644 --- a/include/obj/NiPSysBoxEmitter.h +++ b/include/obj/NiPSysBoxEmitter.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysColliderManager.h b/include/obj/NiPSysColliderManager.h index 0d426986..c6b35656 100644 --- a/include/obj/NiPSysColliderManager.h +++ b/include/obj/NiPSysColliderManager.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysColorModifier.h b/include/obj/NiPSysColorModifier.h index 2cd8218a..028a102a 100644 --- a/include/obj/NiPSysColorModifier.h +++ b/include/obj/NiPSysColorModifier.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysCylinderEmitter.h b/include/obj/NiPSysCylinderEmitter.h index 2b8d5623..d75f8480 100644 --- a/include/obj/NiPSysCylinderEmitter.h +++ b/include/obj/NiPSysCylinderEmitter.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysData.h b/include/obj/NiPSysData.h index 538b2968..0552b757 100644 --- a/include/obj/NiPSysData.h +++ b/include/obj/NiPSysData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysDragModifier.h b/include/obj/NiPSysDragModifier.h index c85d0be1..d828f8cd 100644 --- a/include/obj/NiPSysDragModifier.h +++ b/include/obj/NiPSysDragModifier.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitter.h b/include/obj/NiPSysEmitter.h index 28a1b79f..e9a25e0b 100644 --- a/include/obj/NiPSysEmitter.h +++ b/include/obj/NiPSysEmitter.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitterCtlr.h b/include/obj/NiPSysEmitterCtlr.h index d5fedf82..460cd16b 100644 --- a/include/obj/NiPSysEmitterCtlr.h +++ b/include/obj/NiPSysEmitterCtlr.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitterCtlrData.h b/include/obj/NiPSysEmitterCtlrData.h index b5df6684..38289f13 100644 --- a/include/obj/NiPSysEmitterCtlrData.h +++ b/include/obj/NiPSysEmitterCtlrData.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitterDeclinationCtlr.h b/include/obj/NiPSysEmitterDeclinationCtlr.h index f2dd6a21..1b774679 100644 --- a/include/obj/NiPSysEmitterDeclinationCtlr.h +++ b/include/obj/NiPSysEmitterDeclinationCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitterDeclinationVarCtlr.h b/include/obj/NiPSysEmitterDeclinationVarCtlr.h index 73734c6d..444e19ed 100644 --- a/include/obj/NiPSysEmitterDeclinationVarCtlr.h +++ b/include/obj/NiPSysEmitterDeclinationVarCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitterInitialRadiusCtlr.h b/include/obj/NiPSysEmitterInitialRadiusCtlr.h index 9d465385..bafe8d7d 100644 --- a/include/obj/NiPSysEmitterInitialRadiusCtlr.h +++ b/include/obj/NiPSysEmitterInitialRadiusCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitterLifeSpanCtlr.h b/include/obj/NiPSysEmitterLifeSpanCtlr.h index 176ff5fa..f0916b47 100644 --- a/include/obj/NiPSysEmitterLifeSpanCtlr.h +++ b/include/obj/NiPSysEmitterLifeSpanCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysEmitterSpeedCtlr.h b/include/obj/NiPSysEmitterSpeedCtlr.h index 25b0b620..33e1fba3 100644 --- a/include/obj/NiPSysEmitterSpeedCtlr.h +++ b/include/obj/NiPSysEmitterSpeedCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysGravityModifier.h b/include/obj/NiPSysGravityModifier.h index faa92381..00b0f7fb 100644 --- a/include/obj/NiPSysGravityModifier.h +++ b/include/obj/NiPSysGravityModifier.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysGravityStrengthCtlr.h b/include/obj/NiPSysGravityStrengthCtlr.h index 48120d2c..624cccce 100644 --- a/include/obj/NiPSysGravityStrengthCtlr.h +++ b/include/obj/NiPSysGravityStrengthCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysGrowFadeModifier.h b/include/obj/NiPSysGrowFadeModifier.h index f738498c..46acbe77 100644 --- a/include/obj/NiPSysGrowFadeModifier.h +++ b/include/obj/NiPSysGrowFadeModifier.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysMeshEmitter.h b/include/obj/NiPSysMeshEmitter.h index e576aaba..c13f487f 100644 --- a/include/obj/NiPSysMeshEmitter.h +++ b/include/obj/NiPSysMeshEmitter.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysMeshUpdateModifier.h b/include/obj/NiPSysMeshUpdateModifier.h index 975c8189..6338191b 100644 --- a/include/obj/NiPSysMeshUpdateModifier.h +++ b/include/obj/NiPSysMeshUpdateModifier.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysModifier.h b/include/obj/NiPSysModifier.h index a3108d1c..b4ef0a13 100644 --- a/include/obj/NiPSysModifier.h +++ b/include/obj/NiPSysModifier.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysModifierActiveCtlr.h b/include/obj/NiPSysModifierActiveCtlr.h index 57e711de..d75b1fa5 100644 --- a/include/obj/NiPSysModifierActiveCtlr.h +++ b/include/obj/NiPSysModifierActiveCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysPlanarCollider.h b/include/obj/NiPSysPlanarCollider.h index 04fc744e..7fd02afc 100644 --- a/include/obj/NiPSysPlanarCollider.h +++ b/include/obj/NiPSysPlanarCollider.h @@ -36,7 +36,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysPositionModifier.h b/include/obj/NiPSysPositionModifier.h index d57e265b..26157a71 100644 --- a/include/obj/NiPSysPositionModifier.h +++ b/include/obj/NiPSysPositionModifier.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysResetOnLoopCtlr.h b/include/obj/NiPSysResetOnLoopCtlr.h index 3294f46e..ca921e42 100644 --- a/include/obj/NiPSysResetOnLoopCtlr.h +++ b/include/obj/NiPSysResetOnLoopCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysRotationModifier.h b/include/obj/NiPSysRotationModifier.h index c7af7d9e..bb9369a2 100644 --- a/include/obj/NiPSysRotationModifier.h +++ b/include/obj/NiPSysRotationModifier.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysSpawnModifier.h b/include/obj/NiPSysSpawnModifier.h index b72592dd..adfb0911 100644 --- a/include/obj/NiPSysSpawnModifier.h +++ b/include/obj/NiPSysSpawnModifier.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysSphereEmitter.h b/include/obj/NiPSysSphereEmitter.h index 037275ab..d3e0322d 100644 --- a/include/obj/NiPSysSphereEmitter.h +++ b/include/obj/NiPSysSphereEmitter.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysUpdateCtlr.h b/include/obj/NiPSysUpdateCtlr.h index 8abb6037..fd84a0db 100644 --- a/include/obj/NiPSysUpdateCtlr.h +++ b/include/obj/NiPSysUpdateCtlr.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPSysVolumeEmitter.h b/include/obj/NiPSysVolumeEmitter.h index a706945f..75e035f2 100644 --- a/include/obj/NiPSysVolumeEmitter.h +++ b/include/obj/NiPSysVolumeEmitter.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPalette.h b/include/obj/NiPalette.h index 9ababc3f..ac361228 100644 --- a/include/obj/NiPalette.h +++ b/include/obj/NiPalette.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleBomb.h b/include/obj/NiParticleBomb.h index 804c16bd..9765e6c2 100644 --- a/include/obj/NiParticleBomb.h +++ b/include/obj/NiParticleBomb.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleColorModifier.h b/include/obj/NiParticleColorModifier.h index ba06ed90..ed047c1e 100644 --- a/include/obj/NiParticleColorModifier.h +++ b/include/obj/NiParticleColorModifier.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleGrowFade.h b/include/obj/NiParticleGrowFade.h index fe70404f..d65a6ccb 100644 --- a/include/obj/NiParticleGrowFade.h +++ b/include/obj/NiParticleGrowFade.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleMeshModifier.h b/include/obj/NiParticleMeshModifier.h index a8393287..9f99ead5 100644 --- a/include/obj/NiParticleMeshModifier.h +++ b/include/obj/NiParticleMeshModifier.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleMeshes.h b/include/obj/NiParticleMeshes.h index 2e6f1b73..c03d027d 100644 --- a/include/obj/NiParticleMeshes.h +++ b/include/obj/NiParticleMeshes.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleMeshesData.h b/include/obj/NiParticleMeshesData.h index 17708a46..921400b7 100644 --- a/include/obj/NiParticleMeshesData.h +++ b/include/obj/NiParticleMeshesData.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleRotation.h b/include/obj/NiParticleRotation.h index b0f7a3fa..8d03575d 100644 --- a/include/obj/NiParticleRotation.h +++ b/include/obj/NiParticleRotation.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleSystem.h b/include/obj/NiParticleSystem.h index cf0f71e9..1beca594 100644 --- a/include/obj/NiParticleSystem.h +++ b/include/obj/NiParticleSystem.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticleSystemController.h b/include/obj/NiParticleSystemController.h index c0febfde..a4d4eb15 100644 --- a/include/obj/NiParticleSystemController.h +++ b/include/obj/NiParticleSystemController.h @@ -37,7 +37,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; //TODO: This controller is not a priority and it has a lot of unknown data. diff --git a/include/obj/NiParticles.h b/include/obj/NiParticles.h index 37cf0379..32e477de 100644 --- a/include/obj/NiParticles.h +++ b/include/obj/NiParticles.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiParticlesData.h b/include/obj/NiParticlesData.h index 0a776b4d..d6d824a5 100644 --- a/include/obj/NiParticlesData.h +++ b/include/obj/NiParticlesData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPathController.h b/include/obj/NiPathController.h index ab738ca1..c312a02a 100644 --- a/include/obj/NiPathController.h +++ b/include/obj/NiPathController.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPathInterpolator.h b/include/obj/NiPathInterpolator.h index c6ba63da..28efc65f 100644 --- a/include/obj/NiPathInterpolator.h +++ b/include/obj/NiPathInterpolator.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPixelData.h b/include/obj/NiPixelData.h index 91f7854b..3ea7f9c0 100644 --- a/include/obj/NiPixelData.h +++ b/include/obj/NiPixelData.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPlanarCollider.h b/include/obj/NiPlanarCollider.h index a2392b31..adb05af1 100644 --- a/include/obj/NiPlanarCollider.h +++ b/include/obj/NiPlanarCollider.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPoint3Interpolator.h b/include/obj/NiPoint3Interpolator.h index 3a7c91eb..b2d65ebc 100644 --- a/include/obj/NiPoint3Interpolator.h +++ b/include/obj/NiPoint3Interpolator.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPointLight.h b/include/obj/NiPointLight.h index 6b1ee4d4..f4619852 100644 --- a/include/obj/NiPointLight.h +++ b/include/obj/NiPointLight.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiPosData.h b/include/obj/NiPosData.h index 98cd8465..9f744b87 100644 --- a/include/obj/NiPosData.h +++ b/include/obj/NiPosData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiProperty.h b/include/obj/NiProperty.h index 7a24dc70..2e327573 100644 --- a/include/obj/NiProperty.h +++ b/include/obj/NiProperty.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiRangeLODData.h b/include/obj/NiRangeLODData.h index c6e401bd..5f7b5da7 100644 --- a/include/obj/NiRangeLODData.h +++ b/include/obj/NiRangeLODData.h @@ -33,7 +33,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiRotatingParticles.h b/include/obj/NiRotatingParticles.h index f340c74e..515b88e4 100644 --- a/include/obj/NiRotatingParticles.h +++ b/include/obj/NiRotatingParticles.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiRotatingParticlesData.h b/include/obj/NiRotatingParticlesData.h index affbb414..460c3c8c 100644 --- a/include/obj/NiRotatingParticlesData.h +++ b/include/obj/NiRotatingParticlesData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiScreenLODData.h b/include/obj/NiScreenLODData.h index 1a3e7b47..3530f755 100644 --- a/include/obj/NiScreenLODData.h +++ b/include/obj/NiScreenLODData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSequenceStreamHelper.h b/include/obj/NiSequenceStreamHelper.h index 6b985f0c..5f2d6aad 100644 --- a/include/obj/NiSequenceStreamHelper.h +++ b/include/obj/NiSequenceStreamHelper.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiShadeProperty.h b/include/obj/NiShadeProperty.h index cec3e2a9..811f8477 100644 --- a/include/obj/NiShadeProperty.h +++ b/include/obj/NiShadeProperty.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSingleInterpolatorController.h b/include/obj/NiSingleInterpolatorController.h index 09b4b7f6..efbca783 100644 --- a/include/obj/NiSingleInterpolatorController.h +++ b/include/obj/NiSingleInterpolatorController.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSkinData.h b/include/obj/NiSkinData.h index d7920145..63e6cd6d 100644 --- a/include/obj/NiSkinData.h +++ b/include/obj/NiSkinData.h @@ -43,7 +43,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSkinInstance.h b/include/obj/NiSkinInstance.h index 5fa4fd8c..63409e88 100644 --- a/include/obj/NiSkinInstance.h +++ b/include/obj/NiSkinInstance.h @@ -43,7 +43,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSkinPartition.h b/include/obj/NiSkinPartition.h index df04b7d0..c62f5240 100644 --- a/include/obj/NiSkinPartition.h +++ b/include/obj/NiSkinPartition.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSourceTexture.h b/include/obj/NiSourceTexture.h index 004cc68f..8aa0c991 100644 --- a/include/obj/NiSourceTexture.h +++ b/include/obj/NiSourceTexture.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSpecularProperty.h b/include/obj/NiSpecularProperty.h index 7152e0a6..05557862 100644 --- a/include/obj/NiSpecularProperty.h +++ b/include/obj/NiSpecularProperty.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSphericalCollider.h b/include/obj/NiSphericalCollider.h index 03f8a904..037d9404 100644 --- a/include/obj/NiSphericalCollider.h +++ b/include/obj/NiSphericalCollider.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiSpotLight.h b/include/obj/NiSpotLight.h index a19be9fa..fe6a49aa 100644 --- a/include/obj/NiSpotLight.h +++ b/include/obj/NiSpotLight.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiStencilProperty.h b/include/obj/NiStencilProperty.h index 84496e3c..82839c4a 100644 --- a/include/obj/NiStencilProperty.h +++ b/include/obj/NiStencilProperty.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiStringExtraData.h b/include/obj/NiStringExtraData.h index 6f379b2a..c6d26d1d 100644 --- a/include/obj/NiStringExtraData.h +++ b/include/obj/NiStringExtraData.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiStringPalette.h b/include/obj/NiStringPalette.h index 423ebadd..a77245bc 100644 --- a/include/obj/NiStringPalette.h +++ b/include/obj/NiStringPalette.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiStringsExtraData.h b/include/obj/NiStringsExtraData.h index 07131e1b..8998bf90 100644 --- a/include/obj/NiStringsExtraData.h +++ b/include/obj/NiStringsExtraData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTextKeyExtraData.h b/include/obj/NiTextKeyExtraData.h index 69c309d8..a4e6622c 100644 --- a/include/obj/NiTextKeyExtraData.h +++ b/include/obj/NiTextKeyExtraData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; const Type & GetType() const; diff --git a/include/obj/NiTextureEffect.h b/include/obj/NiTextureEffect.h index 1133cf8f..c133581b 100644 --- a/include/obj/NiTextureEffect.h +++ b/include/obj/NiTextureEffect.h @@ -37,7 +37,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTextureTransformController.h b/include/obj/NiTextureTransformController.h index dd6c7227..0f173a52 100644 --- a/include/obj/NiTextureTransformController.h +++ b/include/obj/NiTextureTransformController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTexturingProperty.h b/include/obj/NiTexturingProperty.h index 21e75bec..575a3aab 100644 --- a/include/obj/NiTexturingProperty.h +++ b/include/obj/NiTexturingProperty.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTimeController.h b/include/obj/NiTimeController.h index b4c83863..154755c5 100644 --- a/include/obj/NiTimeController.h +++ b/include/obj/NiTimeController.h @@ -33,7 +33,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTransformController.h b/include/obj/NiTransformController.h index ffe96b05..fdc3fb67 100644 --- a/include/obj/NiTransformController.h +++ b/include/obj/NiTransformController.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTransformData.h b/include/obj/NiTransformData.h index 59570cf3..539ed410 100644 --- a/include/obj/NiTransformData.h +++ b/include/obj/NiTransformData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTransformInterpolator.h b/include/obj/NiTransformInterpolator.h index 60d86bea..bf523a55 100644 --- a/include/obj/NiTransformInterpolator.h +++ b/include/obj/NiTransformInterpolator.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTriBasedGeom.h b/include/obj/NiTriBasedGeom.h index 350d94a6..62bd716a 100644 --- a/include/obj/NiTriBasedGeom.h +++ b/include/obj/NiTriBasedGeom.h @@ -38,7 +38,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTriBasedGeomData.h b/include/obj/NiTriBasedGeomData.h index 9bcec05f..8c61d2c8 100644 --- a/include/obj/NiTriBasedGeomData.h +++ b/include/obj/NiTriBasedGeomData.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTriShape.h b/include/obj/NiTriShape.h index 59ed973a..625e5830 100644 --- a/include/obj/NiTriShape.h +++ b/include/obj/NiTriShape.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTriShapeData.h b/include/obj/NiTriShapeData.h index 87d7b973..38856713 100644 --- a/include/obj/NiTriShapeData.h +++ b/include/obj/NiTriShapeData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; public: diff --git a/include/obj/NiTriStrips.h b/include/obj/NiTriStrips.h index 881327a2..68a6f159 100644 --- a/include/obj/NiTriStrips.h +++ b/include/obj/NiTriStrips.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiTriStripsData.h b/include/obj/NiTriStripsData.h index 1c9a315f..6afc5c2e 100644 --- a/include/obj/NiTriStripsData.h +++ b/include/obj/NiTriStripsData.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiUVController.h b/include/obj/NiUVController.h index 3f2f868f..8839f63f 100644 --- a/include/obj/NiUVController.h +++ b/include/obj/NiUVController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiUVData.h b/include/obj/NiUVData.h index 78618010..00dd9c79 100644 --- a/include/obj/NiUVData.h +++ b/include/obj/NiUVData.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiVectorExtraData.h b/include/obj/NiVectorExtraData.h index a68b8cd8..3a95ba05 100644 --- a/include/obj/NiVectorExtraData.h +++ b/include/obj/NiVectorExtraData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiVertWeightsExtraData.h b/include/obj/NiVertWeightsExtraData.h index e8bf7682..6447edba 100644 --- a/include/obj/NiVertWeightsExtraData.h +++ b/include/obj/NiVertWeightsExtraData.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiVertexColorProperty.h b/include/obj/NiVertexColorProperty.h index 8d8847fb..3f68511a 100644 --- a/include/obj/NiVertexColorProperty.h +++ b/include/obj/NiVertexColorProperty.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiVisController.h b/include/obj/NiVisController.h index cf2d07d7..4d6c85bf 100644 --- a/include/obj/NiVisController.h +++ b/include/obj/NiVisController.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiVisData.h b/include/obj/NiVisData.h index 79b8a0c8..27228ed4 100644 --- a/include/obj/NiVisData.h +++ b/include/obj/NiVisData.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiWireframeProperty.h b/include/obj/NiWireframeProperty.h index 921ce33d..d45bae86 100644 --- a/include/obj/NiWireframeProperty.h +++ b/include/obj/NiWireframeProperty.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/NiZBufferProperty.h b/include/obj/NiZBufferProperty.h index e21faa77..2f47b77a 100644 --- a/include/obj/NiZBufferProperty.h +++ b/include/obj/NiZBufferProperty.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/RootCollisionNode.h b/include/obj/RootCollisionNode.h index b452ae32..d1389599 100644 --- a/include/obj/RootCollisionNode.h +++ b/include/obj/RootCollisionNode.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkBlendCollisionObject.h b/include/obj/bhkBlendCollisionObject.h index aabb5728..dcb70b83 100644 --- a/include/obj/bhkBlendCollisionObject.h +++ b/include/obj/bhkBlendCollisionObject.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkBlendController.h b/include/obj/bhkBlendController.h index b7d2fa8b..edd24b05 100644 --- a/include/obj/bhkBlendController.h +++ b/include/obj/bhkBlendController.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkBoxShape.h b/include/obj/bhkBoxShape.h index 4e1bb6e6..6d35075a 100644 --- a/include/obj/bhkBoxShape.h +++ b/include/obj/bhkBoxShape.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkCapsuleShape.h b/include/obj/bhkCapsuleShape.h index 49be185e..b2cb2fe3 100644 --- a/include/obj/bhkCapsuleShape.h +++ b/include/obj/bhkCapsuleShape.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkCollisionObject.h b/include/obj/bhkCollisionObject.h index 58dcbfd7..07ac152d 100644 --- a/include/obj/bhkCollisionObject.h +++ b/include/obj/bhkCollisionObject.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkConvexShape.h b/include/obj/bhkConvexShape.h index dd9f70bb..ad67cb2f 100644 --- a/include/obj/bhkConvexShape.h +++ b/include/obj/bhkConvexShape.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkConvexTransformShape.h b/include/obj/bhkConvexTransformShape.h index 07571617..2a7ec917 100644 --- a/include/obj/bhkConvexTransformShape.h +++ b/include/obj/bhkConvexTransformShape.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkConvexVerticesShape.h b/include/obj/bhkConvexVerticesShape.h index 962a3a40..07fffb46 100644 --- a/include/obj/bhkConvexVerticesShape.h +++ b/include/obj/bhkConvexVerticesShape.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkEntity.h b/include/obj/bhkEntity.h index 303e8e9d..0a97e97a 100644 --- a/include/obj/bhkEntity.h +++ b/include/obj/bhkEntity.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkHingeConstraint.h b/include/obj/bhkHingeConstraint.h index e55558bb..31b984ce 100644 --- a/include/obj/bhkHingeConstraint.h +++ b/include/obj/bhkHingeConstraint.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkLimitedHingeConstraint.h b/include/obj/bhkLimitedHingeConstraint.h index 050faafe..de9d3fa3 100644 --- a/include/obj/bhkLimitedHingeConstraint.h +++ b/include/obj/bhkLimitedHingeConstraint.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkListShape.h b/include/obj/bhkListShape.h index cf0f85fb..be79d4aa 100644 --- a/include/obj/bhkListShape.h +++ b/include/obj/bhkListShape.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkMalleableConstraint.h b/include/obj/bhkMalleableConstraint.h index af3b0bdf..005a64e5 100644 --- a/include/obj/bhkMalleableConstraint.h +++ b/include/obj/bhkMalleableConstraint.h @@ -36,7 +36,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkMoppBvTreeShape.h b/include/obj/bhkMoppBvTreeShape.h index e827533b..29e517d8 100644 --- a/include/obj/bhkMoppBvTreeShape.h +++ b/include/obj/bhkMoppBvTreeShape.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkMultiSphereShape.h b/include/obj/bhkMultiSphereShape.h index e0af1370..57c11a7b 100644 --- a/include/obj/bhkMultiSphereShape.h +++ b/include/obj/bhkMultiSphereShape.h @@ -31,7 +31,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkNiTriStripsShape.h b/include/obj/bhkNiTriStripsShape.h index 34fcf044..6203877d 100644 --- a/include/obj/bhkNiTriStripsShape.h +++ b/include/obj/bhkNiTriStripsShape.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkPackedNiTriStripsShape.h b/include/obj/bhkPackedNiTriStripsShape.h index be303c47..7ef118d2 100644 --- a/include/obj/bhkPackedNiTriStripsShape.h +++ b/include/obj/bhkPackedNiTriStripsShape.h @@ -34,7 +34,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkPrismaticConstraint.h b/include/obj/bhkPrismaticConstraint.h index 2b83db87..574fd8cf 100644 --- a/include/obj/bhkPrismaticConstraint.h +++ b/include/obj/bhkPrismaticConstraint.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkRagdollConstraint.h b/include/obj/bhkRagdollConstraint.h index adf6c69f..d6ca1cbd 100644 --- a/include/obj/bhkRagdollConstraint.h +++ b/include/obj/bhkRagdollConstraint.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkRefObject.h b/include/obj/bhkRefObject.h index b1287016..84b8ae18 100644 --- a/include/obj/bhkRefObject.h +++ b/include/obj/bhkRefObject.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkRigidBody.h b/include/obj/bhkRigidBody.h index 27a024d2..ed5ccb6c 100644 --- a/include/obj/bhkRigidBody.h +++ b/include/obj/bhkRigidBody.h @@ -35,7 +35,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkRigidBodyT.h b/include/obj/bhkRigidBodyT.h index cb3f2d29..fd6a0f2e 100644 --- a/include/obj/bhkRigidBodyT.h +++ b/include/obj/bhkRigidBodyT.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkSPCollisionObject.h b/include/obj/bhkSPCollisionObject.h index a65450c8..bdd51302 100644 --- a/include/obj/bhkSPCollisionObject.h +++ b/include/obj/bhkSPCollisionObject.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkSerializable.h b/include/obj/bhkSerializable.h index ca3d227c..f11fe2b7 100644 --- a/include/obj/bhkSerializable.h +++ b/include/obj/bhkSerializable.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkShape.h b/include/obj/bhkShape.h index d41cc1fe..9e182115 100644 --- a/include/obj/bhkShape.h +++ b/include/obj/bhkShape.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkSimpleShapePhantom.h b/include/obj/bhkSimpleShapePhantom.h index a21f0513..f5e9fdf1 100644 --- a/include/obj/bhkSimpleShapePhantom.h +++ b/include/obj/bhkSimpleShapePhantom.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkSphereRepShape.h b/include/obj/bhkSphereRepShape.h index 23b87bac..7e04adb7 100644 --- a/include/obj/bhkSphereRepShape.h +++ b/include/obj/bhkSphereRepShape.h @@ -30,7 +30,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkSphereShape.h b/include/obj/bhkSphereShape.h index 2c687091..9263fcaa 100644 --- a/include/obj/bhkSphereShape.h +++ b/include/obj/bhkSphereShape.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkStiffSpringConstraint.h b/include/obj/bhkStiffSpringConstraint.h index df322102..674de68a 100644 --- a/include/obj/bhkStiffSpringConstraint.h +++ b/include/obj/bhkStiffSpringConstraint.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkTransformShape.h b/include/obj/bhkTransformShape.h index 9424b984..f7bb9e59 100644 --- a/include/obj/bhkTransformShape.h +++ b/include/obj/bhkTransformShape.h @@ -29,7 +29,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/bhkWorldObject.h b/include/obj/bhkWorldObject.h index 6e344c3a..8e273ab9 100644 --- a/include/obj/bhkWorldObject.h +++ b/include/obj/bhkWorldObject.h @@ -28,7 +28,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/include/obj/hkPackedNiTriStripsData.h b/include/obj/hkPackedNiTriStripsData.h index ea7013b3..b7ce0133 100644 --- a/include/obj/hkPackedNiTriStripsData.h +++ b/include/obj/hkPackedNiTriStripsData.h @@ -32,7 +32,7 @@ public: virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); + virtual void FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); virtual list<NiObjectRef> GetRefs() const; virtual const Type & GetType() const; diff --git a/src/NIF_IO.cpp b/src/NIF_IO.cpp index 3e7001c3..53222bad 100644 --- a/src/NIF_IO.cpp +++ b/src/NIF_IO.cpp @@ -2,6 +2,7 @@ All rights reserved. Please see niflib.h for licence. */ #include "../include/NIF_IO.h" +#include "../include/niflib.h" namespace Niflib { int BlockSearch( istream& in ) { @@ -233,22 +234,35 @@ void NifStream( string const & val, ostream& out, uint version ) { WriteString( //--Structs--// //HeaderString -void NifStream( HeaderString & val, istream& in, uint version ) { - char tmp[64]; - in.getline( tmp, 64 ); +void NifStream( HeaderString & val, istream& in, uint & version ) { + char tmp[256]; + in.getline( tmp, 256 ); val.header = tmp; - // make sure this is a NIF file - if ( ( val.header.substr(0, 22) != "NetImmerse File Format" ) - && ( val.header.substr(0, 20) != "Gamebryo File Format" ) ) - throw runtime_error("Not a NIF file."); - - // detect old versions - if ( ( val.header == "NetImmerse File Format, Version 3.1" ) - || ( val.header == "NetImmerse File Format, Version 3.03" ) - || ( val.header == "NetImmerse File Format, Version 3.0" ) - || ( val.header == "NetImmerse File Format, Version 2.3" ) ) - throw runtime_error("Unsupported: " + val.header); + // make sure this is a NIF file + unsigned ver_start = 0; + if ( val.header.substr(0, 22) == "NetImmerse File Format" ) { + ver_start = 32; + } else if ( val.header.substr(0, 20) == "Gamebryo File Format" ) { + ver_start = 30; + } else { + //Not a NIF file + version = VER_INVALID; + } + + //Parse version string and return result. + version = ParseVersionString( val.header.substr( ver_start ) ); + + //Temporarily read the next 3 strings if this is a < 4 file + if ( version < VER_4_0_0_0 ) { + in.getline( tmp, 256 ); + in.getline( tmp, 256 ); + in.getline( tmp, 256 ); + } + + //if ( version < VER_4_0_0_0 ) { + // throw runtime_error("NIF Versions below 4.0.0.0 are not yet supported"); + //} }; void NifStream( HeaderString const & val, ostream& out, uint version ) { diff --git a/src/gen/Header.cpp b/src/gen/Header.cpp index 7dbfe23a..6a192a85 100644 --- a/src/gen/Header.cpp +++ b/src/gen/Header.cpp @@ -11,14 +11,18 @@ Header::Header() : version((uint)0x04000002), endianType((byte)1), userVersion(( Header::~Header() {}; void Header::Read( istream& in ) { NifStream( headerString, in, version ); - NifStream( version, in, version ); + if ( version >= 0x04000000 ) { + NifStream( version, in, version ); + }; if ( version >= 0x14000004 ) { NifStream( endianType, in, version ); }; if ( version >= 0x0A010000 ) { NifStream( userVersion, in, version ); }; - NifStream( numBlocks, in, version ); + if ( version >= 0x04000000 ) { + NifStream( numBlocks, in, version ); + }; if ( ( version >= 0x0A000102 ) && ( version <= 0x0A000102 ) ) { NifStream( unknownInt1, in, version ); }; @@ -52,14 +56,18 @@ void Header::Write( ostream& out ) const { numBlockTypes = ushort(blockTypes.size()); numBlocks = uint(blockTypeIndex.size()); NifStream( headerString, out, version ); - NifStream( version, out, version ); + if ( version >= 0x04000000 ) { + NifStream( version, out, version ); + }; if ( version >= 0x14000004 ) { NifStream( endianType, out, version ); }; if ( version >= 0x0A010000 ) { NifStream( userVersion, out, version ); }; - NifStream( numBlocks, out, version ); + if ( version >= 0x04000000 ) { + NifStream( numBlocks, out, version ); + }; if ( ( version >= 0x0A000102 ) && ( version <= 0x0A000102 ) ) { NifStream( unknownInt1, out, version ); }; diff --git a/src/gen/obj_impl.cpp b/src/gen/obj_impl.cpp index 0c257b9c..0b3e2d10 100644 --- a/src/gen/obj_impl.cpp +++ b/src/gen/obj_impl.cpp @@ -188,6 +188,36 @@ using namespace std; #include "../../include/obj/NiZBufferProperty.h" #include "../../include/obj/RootCollisionNode.h" +const char FIX_LINK_POP_ERROR[] = "Trying to pop a link from empty stack. This is probably a bug."; +const char FIX_LINK_INDEX_ERROR[] = "Object index was not found in object map. This NIF file may be invalid or imporperly supported."; +const char FIX_LINK_CAST_ERROR[] = "Link could not be cast to required type during file read. This NIF file may be invalid or improperly supported."; + +template <class T> +Ref<T> FixLink( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned version ) { + if (link_stack.empty()) { + throw runtime_error(FIX_LINK_POP_ERROR); + } + unsigned index = link_stack.front(); + link_stack.pop_front(); + + //Check if link is NULL + if ( index == 0xFFFFFFFF) { + return NULL; + } + + map<unsigned,NiObjectRef>::const_iterator it = objects.find(index); + if ( it == objects.end() ) { + throw runtime_error(FIX_LINK_INDEX_ERROR); + } + + Ref<T> object = DynamicCast<T>(it->second); + if ( object == NULL ) { + throw runtime_error(FIX_LINK_CAST_ERROR); + } + + return object; +} + void NiObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { } @@ -199,7 +229,7 @@ std::string NiObject::InternalAsString( bool verbose ) const { return out.str(); } -void NiObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { } std::list<NiObjectRef> NiObject::InternalGetRefs() const { @@ -221,7 +251,7 @@ std::string AKeyedData::InternalAsString( bool verbose ) const { return out.str(); } -void AKeyedData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AKeyedData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -260,26 +290,10 @@ std::string AParticleModifier::InternalAsString( bool verbose ) const { return out.str(); } -void AParticleModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AParticleModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nextModifier = DynamicCast<AParticleModifier>(objects[link_stack.front()]); - if ( nextModifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nextModifier = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controller = DynamicCast<NiParticleSystemController>(objects[link_stack.front()]); - if ( controller == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controller = NULL; - link_stack.pop_front(); + nextModifier = FixLink<AParticleModifier>( objects, link_stack, version ); + controller = FixLink<NiParticleSystemController>( objects, link_stack, version ); } std::list<NiObjectRef> AParticleModifier::InternalGetRefs() const { @@ -304,7 +318,7 @@ std::string bhkRefObject::InternalAsString( bool verbose ) const { return out.str(); } -void bhkRefObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRefObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -328,7 +342,7 @@ std::string bhkSerializable::InternalAsString( bool verbose ) const { return out.str(); } -void bhkSerializable::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSerializable::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkRefObject::FixLinks( objects, link_stack, version, user_version ); } @@ -379,18 +393,10 @@ std::string AbhkConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void AbhkConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AbhkConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkSerializable::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < bodies.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - bodies[i1] = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( bodies[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - bodies[i1] = NULL; - link_stack.pop_front(); + bodies[i1] = FixLink<bhkShape>( objects, link_stack, version ); }; } @@ -452,7 +458,7 @@ std::string AbhkRagdollConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void AbhkRagdollConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AbhkRagdollConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); } @@ -476,7 +482,7 @@ std::string bhkShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkSerializable::FixLinks( objects, link_stack, version, user_version ); } @@ -500,7 +506,7 @@ std::string AbhkShapeCollection::InternalAsString( bool verbose ) const { return out.str(); } -void AbhkShapeCollection::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AbhkShapeCollection::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkShape::FixLinks( objects, link_stack, version, user_version ); } @@ -527,7 +533,7 @@ std::string bhkSphereRepShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkSphereRepShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSphereRepShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkShape::FixLinks( objects, link_stack, version, user_version ); } @@ -551,7 +557,7 @@ std::string bhkConvexShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkConvexShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkConvexShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); } @@ -575,7 +581,7 @@ std::string bhkWorldObject::InternalAsString( bool verbose ) const { return out.str(); } -void bhkWorldObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkWorldObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkShape::FixLinks( objects, link_stack, version, user_version ); } @@ -616,17 +622,9 @@ std::string bhkEntity::InternalAsString( bool verbose ) const { return out.str(); } -void bhkEntity::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkEntity::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkWorldObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shape = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( shape == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shape = NULL; - link_stack.pop_front(); + shape = FixLink<bhkShape>( objects, link_stack, version ); } std::list<NiObjectRef> bhkEntity::InternalGetRefs() const { @@ -669,26 +667,10 @@ std::string NiCollisionObject::InternalAsString( bool verbose ) const { return out.str(); } -void NiCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiCollisionObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - parent = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( parent == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - parent = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - body = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( body == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - body = NULL; - link_stack.pop_front(); + parent = FixLink<NiAVObject>( objects, link_stack, version ); + body = FixLink<NiObject>( objects, link_stack, version ); } std::list<NiObjectRef> NiCollisionObject::InternalGetRefs() const { @@ -732,18 +714,10 @@ std::string NiExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x04020200 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nextExtraData = DynamicCast<NiExtraData>(objects[link_stack.front()]); - if ( nextExtraData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nextExtraData = NULL; - link_stack.pop_front(); + nextExtraData = FixLink<NiExtraData>( objects, link_stack, version ); }; } @@ -769,7 +743,7 @@ std::string NiInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -799,7 +773,7 @@ std::string NiBlendInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiBlendInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -844,26 +818,10 @@ std::string NiBSplineInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiBSplineInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - splineData = DynamicCast<NiBSplineData>(objects[link_stack.front()]); - if ( splineData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - splineData = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - basisData = DynamicCast<NiBSplineBasisData>(objects[link_stack.front()]); - if ( basisData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - basisData = NULL; - link_stack.pop_front(); + splineData = FixLink<NiBSplineData>( objects, link_stack, version ); + basisData = FixLink<NiBSplineBasisData>( objects, link_stack, version ); } std::list<NiObjectRef> NiBSplineInterpolator::InternalGetRefs() const { @@ -939,41 +897,17 @@ std::string NiObjectNET::InternalAsString( bool verbose ) const { return out.str(); } -void NiObjectNET::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiObjectNET::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x04020200 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - extraData = DynamicCast<NiExtraData>(objects[link_stack.front()]); - if ( extraData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - extraData = NULL; - link_stack.pop_front(); + extraData = FixLink<NiExtraData>( objects, link_stack, version ); }; if ( version >= 0x0A000100 ) { for (uint i2 = 0; i2 < extraDataList.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - extraDataList[i2] = DynamicCast<NiExtraData>(objects[link_stack.front()]); - if ( extraDataList[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - extraDataList[i2] = NULL; - link_stack.pop_front(); - }; - }; - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controller = DynamicCast<NiTimeController>(objects[link_stack.front()]); - if ( controller == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controller = NULL; - link_stack.pop_front(); + extraDataList[i2] = FixLink<NiExtraData>( objects, link_stack, version ); + }; + }; + controller = FixLink<NiTimeController>( objects, link_stack, version ); } std::list<NiObjectRef> NiObjectNET::InternalGetRefs() const { @@ -1094,40 +1028,16 @@ std::string NiAVObject::InternalAsString( bool verbose ) const { return out.str(); } -void NiAVObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAVObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObjectNET::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < properties.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - properties[i1] = DynamicCast<NiProperty>(objects[link_stack.front()]); - if ( properties[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - properties[i1] = NULL; - link_stack.pop_front(); + properties[i1] = FixLink<NiProperty>( objects, link_stack, version ); }; if ( ( version >= 0x0A000100 ) && ( version <= 0x0A020000 ) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - collisionData = DynamicCast<NiCollisionData>(objects[link_stack.front()]); - if ( collisionData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - collisionData = NULL; - link_stack.pop_front(); + collisionData = FixLink<NiCollisionData>( objects, link_stack, version ); }; if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - collisionObject = DynamicCast<NiCollisionObject>(objects[link_stack.front()]); - if ( collisionObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - collisionObject = NULL; - link_stack.pop_front(); + collisionObject = FixLink<NiCollisionObject>( objects, link_stack, version ); }; } @@ -1212,19 +1122,11 @@ std::string NiDynamicEffect::InternalAsString( bool verbose ) const { return out.str(); } -void NiDynamicEffect::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDynamicEffect::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiAVObject::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x0A010000 ) { for (uint i2 = 0; i2 < affectedNodes.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - affectedNodes[i2] = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( affectedNodes[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - affectedNodes[i2] = NULL; - link_stack.pop_front(); + affectedNodes[i2] = FixLink<NiAVObject>( objects, link_stack, version ); }; }; } @@ -1265,7 +1167,7 @@ std::string NiLight::InternalAsString( bool verbose ) const { return out.str(); } -void NiLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLight::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiDynamicEffect::FixLinks( objects, link_stack, version, user_version ); } @@ -1289,7 +1191,7 @@ std::string NiProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObjectNET::FixLinks( objects, link_stack, version, user_version ); } @@ -1330,17 +1232,9 @@ std::string NiPSysModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - target = DynamicCast<NiParticleSystem>(objects[link_stack.front()]); - if ( target == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - target = NULL; - link_stack.pop_front(); + target = FixLink<NiParticleSystem>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysModifier::InternalGetRefs() const { @@ -1396,7 +1290,7 @@ std::string NiPSysEmitter::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitter::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -1432,18 +1326,10 @@ std::string NiPSysVolumeEmitter::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysVolumeEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysVolumeEmitter::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysEmitter::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - emitterObject = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( emitterObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - emitterObject = NULL; - link_stack.pop_front(); + emitterObject = FixLink<NiNode>( objects, link_stack, version ); }; } @@ -1497,26 +1383,10 @@ std::string NiTimeController::InternalAsString( bool verbose ) const { return out.str(); } -void NiTimeController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTimeController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nextController = DynamicCast<NiTimeController>(objects[link_stack.front()]); - if ( nextController == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nextController = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - target = DynamicCast<NiObjectNET>(objects[link_stack.front()]); - if ( target == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - target = NULL; - link_stack.pop_front(); + nextController = FixLink<NiTimeController>( objects, link_stack, version ); + target = FixLink<NiObjectNET>( objects, link_stack, version ); } std::list<NiObjectRef> NiTimeController::InternalGetRefs() const { @@ -1583,19 +1453,11 @@ std::string ABoneLODController::InternalAsString( bool verbose ) const { return out.str(); } -void ABoneLODController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void ABoneLODController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < nodeGroups.size(); i1++) { for (uint i2 = 0; i2 < nodeGroups[i1].nodes.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nodeGroups[i1].nodes[i2] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( nodeGroups[i1].nodes[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nodeGroups[i1].nodes[i2] = NULL; - link_stack.pop_front(); + nodeGroups[i1].nodes[i2] = FixLink<NiNode>( objects, link_stack, version ); }; }; } @@ -1638,18 +1500,10 @@ std::string NiSingleInterpolatorController::InternalAsString( bool verbose ) con return out.str(); } -void NiSingleInterpolatorController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSingleInterpolatorController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - interpolator = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( interpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - interpolator = NULL; - link_stack.pop_front(); + interpolator = FixLink<NiInterpolator>( objects, link_stack, version ); }; } @@ -1678,7 +1532,7 @@ std::string APSysCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void APSysCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void APSysCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); } @@ -1740,37 +1594,13 @@ std::string NiTriBasedGeom::InternalAsString( bool verbose ) const { return out.str(); } -void NiTriBasedGeom::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriBasedGeom::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiAVObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiTriBasedGeomData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skinInstance = DynamicCast<NiSkinInstance>(objects[link_stack.front()]); - if ( skinInstance == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skinInstance = NULL; - link_stack.pop_front(); + data = FixLink<NiTriBasedGeomData>( objects, link_stack, version ); + skinInstance = FixLink<NiSkinInstance>( objects, link_stack, version ); if ( version >= 0x0A000100 ) { if ( (hasShader != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); + unknownLink = FixLink<NiObject>( objects, link_stack, version ); }; }; } @@ -2017,18 +1847,10 @@ std::string NiTriBasedGeomData::InternalAsString( bool verbose ) const { return out.str(); } -void NiTriBasedGeomData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriBasedGeomData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); + unknownLink = FixLink<NiObject>( objects, link_stack, version ); }; } @@ -2106,7 +1928,7 @@ std::string APSysData::InternalAsString( bool verbose ) const { return out.str(); } -void APSysData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void APSysData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); } @@ -2136,7 +1958,7 @@ std::string bhkBlendCollisionObject::InternalAsString( bool verbose ) const { return out.str(); } -void bhkBlendCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkBlendCollisionObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiCollisionObject::FixLinks( objects, link_stack, version, user_version ); } @@ -2163,7 +1985,7 @@ std::string bhkBlendController::InternalAsString( bool verbose ) const { return out.str(); } -void bhkBlendController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkBlendController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); } @@ -2208,7 +2030,7 @@ std::string bhkBoxShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkBoxShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkBoxShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkConvexShape::FixLinks( objects, link_stack, version, user_version ); } @@ -2259,7 +2081,7 @@ std::string bhkCapsuleShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkCapsuleShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkCapsuleShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkConvexShape::FixLinks( objects, link_stack, version, user_version ); } @@ -2283,7 +2105,7 @@ std::string bhkCollisionObject::InternalAsString( bool verbose ) const { return out.str(); } -void bhkCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkCollisionObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiCollisionObject::FixLinks( objects, link_stack, version, user_version ); } @@ -2358,7 +2180,7 @@ std::string bhkConvexVerticesShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkConvexVerticesShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkConvexVerticesShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); } @@ -2401,7 +2223,7 @@ std::string bhkHingeConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void bhkHingeConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkHingeConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); } @@ -2455,7 +2277,7 @@ std::string bhkLimitedHingeConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void bhkLimitedHingeConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkLimitedHingeConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); } @@ -2538,18 +2360,10 @@ std::string bhkListShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkListShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkListShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkShapeCollection::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < subShapes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - subShapes[i1] = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( subShapes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - subShapes[i1] = NULL; - link_stack.pop_front(); + subShapes[i1] = FixLink<bhkShape>( objects, link_stack, version ); }; } @@ -2685,26 +2499,10 @@ std::string bhkMalleableConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void bhkMalleableConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkMalleableConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink1 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink1 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink1 = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); + unknownLink1 = FixLink<NiObject>( objects, link_stack, version ); + unknownLink2 = FixLink<NiObject>( objects, link_stack, version ); } std::list<NiObjectRef> bhkMalleableConstraint::InternalGetRefs() const { @@ -2783,17 +2581,9 @@ std::string bhkMoppBvTreeShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkMoppBvTreeShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkMoppBvTreeShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkShape::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shape = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( shape == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shape = NULL; - link_stack.pop_front(); + shape = FixLink<bhkShape>( objects, link_stack, version ); } std::list<NiObjectRef> bhkMoppBvTreeShape::InternalGetRefs() const { @@ -2845,7 +2635,7 @@ std::string bhkMultiSphereShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkMultiSphereShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkMultiSphereShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); } @@ -2940,18 +2730,10 @@ std::string bhkNiTriStripsShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkNiTriStripsShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkNiTriStripsShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < stripsData.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - stripsData[i1] = DynamicCast<NiTriStripsData>(objects[link_stack.front()]); - if ( stripsData[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - stripsData[i1] = NULL; - link_stack.pop_front(); + stripsData[i1] = FixLink<NiTriStripsData>( objects, link_stack, version ); }; } @@ -3041,17 +2823,9 @@ std::string bhkPackedNiTriStripsShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkPackedNiTriStripsShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkPackedNiTriStripsShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkShapeCollection::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<hkPackedNiTriStripsData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<hkPackedNiTriStripsData>( objects, link_stack, version ); } std::list<NiObjectRef> bhkPackedNiTriStripsShape::InternalGetRefs() const { @@ -3102,7 +2876,7 @@ std::string bhkPrismaticConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void bhkPrismaticConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkPrismaticConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); } @@ -3126,7 +2900,7 @@ std::string bhkRagdollConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void bhkRagdollConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRagdollConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkRagdollConstraint::FixLinks( objects, link_stack, version, user_version ); } @@ -3315,18 +3089,10 @@ std::string bhkRigidBody::InternalAsString( bool verbose ) const { return out.str(); } -void bhkRigidBody::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRigidBody::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkEntity::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < constraints.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - constraints[i1] = DynamicCast<AbhkConstraint>(objects[link_stack.front()]); - if ( constraints[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - constraints[i1] = NULL; - link_stack.pop_front(); + constraints[i1] = FixLink<AbhkConstraint>( objects, link_stack, version ); }; } @@ -3354,7 +3120,7 @@ std::string bhkRigidBodyT::InternalAsString( bool verbose ) const { return out.str(); } -void bhkRigidBodyT::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRigidBodyT::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkRigidBody::FixLinks( objects, link_stack, version, user_version ); } @@ -3413,7 +3179,7 @@ std::string bhkSimpleShapePhantom::InternalAsString( bool verbose ) const { return out.str(); } -void bhkSimpleShapePhantom::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSimpleShapePhantom::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkEntity::FixLinks( objects, link_stack, version, user_version ); } @@ -3437,7 +3203,7 @@ std::string bhkSPCollisionObject::InternalAsString( bool verbose ) const { return out.str(); } -void bhkSPCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSPCollisionObject::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiCollisionObject::FixLinks( objects, link_stack, version, user_version ); } @@ -3464,7 +3230,7 @@ std::string bhkSphereShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkSphereShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSphereShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkConvexShape::FixLinks( objects, link_stack, version, user_version ); } @@ -3510,7 +3276,7 @@ std::string bhkStiffSpringConstraint::InternalAsString( bool verbose ) const { return out.str(); } -void bhkStiffSpringConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkStiffSpringConstraint::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); } @@ -3546,7 +3312,7 @@ std::string bhkTransformShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkTransformShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkTransformShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkEntity::FixLinks( objects, link_stack, version, user_version ); } @@ -3570,7 +3336,7 @@ std::string bhkConvexTransformShape::InternalAsString( bool verbose ) const { return out.str(); } -void bhkConvexTransformShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkConvexTransformShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { bhkTransformShape::FixLinks( objects, link_stack, version, user_version ); } @@ -3600,7 +3366,7 @@ std::string BSBound::InternalAsString( bool verbose ) const { return out.str(); } -void BSBound::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSBound::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -3648,7 +3414,7 @@ std::string BSFurnitureMarker::InternalAsString( bool verbose ) const { return out.str(); } -void BSFurnitureMarker::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSFurnitureMarker::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -3675,7 +3441,7 @@ std::string BSParentVelocityModifier::InternalAsString( bool verbose ) const { return out.str(); } -void BSParentVelocityModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSParentVelocityModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -3699,7 +3465,7 @@ std::string BSPSysArrayEmitter::InternalAsString( bool verbose ) const { return out.str(); } -void BSPSysArrayEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSPSysArrayEmitter::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); } @@ -3726,7 +3492,7 @@ std::string BSXFlags::InternalAsString( bool verbose ) const { return out.str(); } -void BSXFlags::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSXFlags::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -3790,7 +3556,7 @@ std::string hkPackedNiTriStripsData::InternalAsString( bool verbose ) const { return out.str(); } -void hkPackedNiTriStripsData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void hkPackedNiTriStripsData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AbhkShapeCollection::FixLinks( objects, link_stack, version, user_version ); } @@ -3826,18 +3592,10 @@ std::string NiAlphaController::InternalAsString( bool verbose ) const { return out.str(); } -void NiAlphaController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAlphaController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiFloatData>( objects, link_stack, version ); }; } @@ -3869,7 +3627,7 @@ std::string NiAlphaProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiAlphaProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAlphaProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -3893,7 +3651,7 @@ std::string NiAmbientLight::InternalAsString( bool verbose ) const { return out.str(); } -void NiAmbientLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAmbientLight::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiLight::FixLinks( objects, link_stack, version, user_version ); } @@ -3968,7 +3726,7 @@ std::string NiAutoNormalParticlesData::InternalAsString( bool verbose ) const { return out.str(); } -void NiAutoNormalParticlesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAutoNormalParticlesData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); } @@ -4011,7 +3769,7 @@ std::string NiBinaryExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiBinaryExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBinaryExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -4038,7 +3796,7 @@ std::string NiBlendBoolInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiBlendBoolInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendBoolInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -4065,7 +3823,7 @@ std::string NiBlendFloatInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiBlendFloatInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendFloatInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -4092,7 +3850,7 @@ std::string NiBlendPoint3Interpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiBlendPoint3Interpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendPoint3Interpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -4116,7 +3874,7 @@ std::string NiBlendTransformInterpolator::InternalAsString( bool verbose ) const return out.str(); } -void NiBlendTransformInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendTransformInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -4202,40 +3960,16 @@ std::string NiBoneLODController::InternalAsString( bool verbose ) const { return out.str(); } -void NiBoneLODController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoneLODController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { ABoneLODController::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < shapeGroups1.size(); i1++) { for (uint i2 = 0; i2 < shapeGroups1[i1].linkPairs.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shapeGroups1[i1].linkPairs[i2].shape = DynamicCast<NiTriShape>(objects[link_stack.front()]); - if ( shapeGroups1[i1].linkPairs[i2].shape == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shapeGroups1[i1].linkPairs[i2].shape = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shapeGroups1[i1].linkPairs[i2].skinInstance = DynamicCast<NiSkinInstance>(objects[link_stack.front()]); - if ( shapeGroups1[i1].linkPairs[i2].skinInstance == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shapeGroups1[i1].linkPairs[i2].skinInstance = NULL; - link_stack.pop_front(); + shapeGroups1[i1].linkPairs[i2].shape = FixLink<NiTriShape>( objects, link_stack, version ); + shapeGroups1[i1].linkPairs[i2].skinInstance = FixLink<NiSkinInstance>( objects, link_stack, version ); }; }; for (uint i1 = 0; i1 < shapeGroups2.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shapeGroups2[i1] = DynamicCast<NiTriShape>(objects[link_stack.front()]); - if ( shapeGroups2[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shapeGroups2[i1] = NULL; - link_stack.pop_front(); + shapeGroups2[i1] = FixLink<NiTriShape>( objects, link_stack, version ); }; } @@ -4299,7 +4033,7 @@ std::string NiBoolData::InternalAsString( bool verbose ) const { return out.str(); } -void NiBoolData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoolData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AKeyedData::FixLinks( objects, link_stack, version, user_version ); } @@ -4326,7 +4060,7 @@ std::string NiBooleanExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiBooleanExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBooleanExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -4361,17 +4095,9 @@ std::string NiBoolInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiBoolInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoolInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiBoolData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiBoolData>( objects, link_stack, version ); } std::list<NiObjectRef> NiBoolInterpolator::InternalGetRefs() const { @@ -4407,17 +4133,9 @@ std::string NiBoolTimelineInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiBoolTimelineInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoolTimelineInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiBoolData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiBoolData>( objects, link_stack, version ); } std::list<NiObjectRef> NiBoolTimelineInterpolator::InternalGetRefs() const { @@ -4442,7 +4160,7 @@ std::string NiBSBoneLODController::InternalAsString( bool verbose ) const { return out.str(); } -void NiBSBoneLODController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSBoneLODController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { ABoneLODController::FixLinks( objects, link_stack, version, user_version ); } @@ -4469,7 +4187,7 @@ std::string NiBSplineBasisData::InternalAsString( bool verbose ) const { return out.str(); } -void NiBSplineBasisData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineBasisData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -4506,7 +4224,7 @@ std::string NiBSplineCompFloatInterpolator::InternalAsString( bool verbose ) con return out.str(); } -void NiBSplineCompFloatInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineCompFloatInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBSplineInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -4543,7 +4261,7 @@ std::string NiBSplineCompPoint3Interpolator::InternalAsString( bool verbose ) co return out.str(); } -void NiBSplineCompPoint3Interpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineCompPoint3Interpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBSplineInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -4603,7 +4321,7 @@ std::string NiBSplineCompTransformInterpolator::InternalAsString( bool verbose ) return out.str(); } -void NiBSplineCompTransformInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineCompTransformInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBSplineInterpolator::FixLinks( objects, link_stack, version, user_version ); } @@ -4649,7 +4367,7 @@ std::string NiBSplineData::InternalAsString( bool verbose ) const { return out.str(); } -void NiBSplineData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -4738,17 +4456,9 @@ std::string NiCamera::InternalAsString( bool verbose ) const { return out.str(); } -void NiCamera::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiCamera::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiAVObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink_ = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink_ == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink_ = NULL; - link_stack.pop_front(); + unknownLink_ = FixLink<NiObject>( objects, link_stack, version ); } std::list<NiObjectRef> NiCamera::InternalGetRefs() const { @@ -4840,17 +4550,9 @@ std::string NiCollisionData::InternalAsString( bool verbose ) const { return out.str(); } -void NiCollisionData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiCollisionData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - targetNode = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( targetNode == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - targetNode = NULL; - link_stack.pop_front(); + targetNode = FixLink<NiNode>( objects, link_stack, version ); } std::list<NiObjectRef> NiCollisionData::InternalGetRefs() const { @@ -4901,7 +4603,7 @@ std::string NiColorData::InternalAsString( bool verbose ) const { return out.str(); } -void NiColorData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiColorData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AKeyedData::FixLinks( objects, link_stack, version, user_version ); } @@ -4928,7 +4630,7 @@ std::string NiColorExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiColorExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiColorExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -4986,28 +4688,12 @@ std::string NiControllerManager::InternalAsString( bool verbose ) const { return out.str(); } -void NiControllerManager::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiControllerManager::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < controllerSequences.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controllerSequences[i1] = DynamicCast<NiControllerSequence>(objects[link_stack.front()]); - if ( controllerSequences[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controllerSequences[i1] = NULL; - link_stack.pop_front(); - }; - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - objectPalette = DynamicCast<NiDefaultAVObjectPalette>(objects[link_stack.front()]); - if ( objectPalette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - objectPalette = NULL; - link_stack.pop_front(); + controllerSequences[i1] = FixLink<NiControllerSequence>( objects, link_stack, version ); + }; + objectPalette = FixLink<NiDefaultAVObjectPalette>( objects, link_stack, version ); } std::list<NiObjectRef> NiControllerManager::InternalGetRefs() const { @@ -5295,106 +4981,34 @@ std::string NiControllerSequence::InternalAsString( bool verbose ) const { return out.str(); } -void NiControllerSequence::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiControllerSequence::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - textKeys = DynamicCast<NiTextKeyExtraData>(objects[link_stack.front()]); - if ( textKeys == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - textKeys = NULL; - link_stack.pop_front(); + textKeys = FixLink<NiTextKeyExtraData>( objects, link_stack, version ); }; for (uint i1 = 0; i1 < controlledBlocks.size(); i1++) { if ( version <= 0x0A01006A ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].controller = DynamicCast<NiTimeController>(objects[link_stack.front()]); - if ( controlledBlocks[i1].controller == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].controller = NULL; - link_stack.pop_front(); + controlledBlocks[i1].controller = FixLink<NiTimeController>( objects, link_stack, version ); }; if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].interpolator = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( controlledBlocks[i1].interpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].interpolator = NULL; - link_stack.pop_front(); + controlledBlocks[i1].interpolator = FixLink<NiInterpolator>( objects, link_stack, version ); }; if ( version >= 0x0A01006A ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].controller = DynamicCast<NiTimeController>(objects[link_stack.front()]); - if ( controlledBlocks[i1].controller == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].controller = NULL; - link_stack.pop_front(); + controlledBlocks[i1].controller = FixLink<NiTimeController>( objects, link_stack, version ); }; if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].unknownLink2 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( controlledBlocks[i1].unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].unknownLink2 = NULL; - link_stack.pop_front(); + controlledBlocks[i1].unknownLink2 = FixLink<NiObject>( objects, link_stack, version ); }; if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].stringPalette = DynamicCast<NiStringPalette>(objects[link_stack.front()]); - if ( controlledBlocks[i1].stringPalette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].stringPalette = NULL; - link_stack.pop_front(); + controlledBlocks[i1].stringPalette = FixLink<NiStringPalette>( objects, link_stack, version ); }; }; if ( version >= 0x0A01006A ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - textKeys = DynamicCast<NiTextKeyExtraData>(objects[link_stack.front()]); - if ( textKeys == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - textKeys = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - manager = DynamicCast<NiControllerManager>(objects[link_stack.front()]); - if ( manager == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - manager = NULL; - link_stack.pop_front(); + textKeys = FixLink<NiTextKeyExtraData>( objects, link_stack, version ); + manager = FixLink<NiControllerManager>( objects, link_stack, version ); }; if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - stringPalette = DynamicCast<NiStringPalette>(objects[link_stack.front()]); - if ( stringPalette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - stringPalette = NULL; - link_stack.pop_front(); + stringPalette = FixLink<NiStringPalette>( objects, link_stack, version ); }; } @@ -5458,18 +5072,10 @@ std::string NiDefaultAVObjectPalette::InternalAsString( bool verbose ) const { return out.str(); } -void NiDefaultAVObjectPalette::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDefaultAVObjectPalette::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < objs.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - objs[i1].avObject = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( objs[i1].avObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - objs[i1].avObject = NULL; - link_stack.pop_front(); + objs[i1].avObject = FixLink<NiAVObject>( objects, link_stack, version ); }; } @@ -5495,7 +5101,7 @@ std::string NiDirectionalLight::InternalAsString( bool verbose ) const { return out.str(); } -void NiDirectionalLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDirectionalLight::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiLight::FixLinks( objects, link_stack, version, user_version ); } @@ -5522,7 +5128,7 @@ std::string NiDitherProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiDitherProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDitherProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -5583,18 +5189,10 @@ std::string NiFlipController::InternalAsString( bool verbose ) const { return out.str(); } -void NiFlipController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFlipController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < sources.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - sources[i1] = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( sources[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - sources[i1] = NULL; - link_stack.pop_front(); + sources[i1] = FixLink<NiSourceTexture>( objects, link_stack, version ); }; } @@ -5650,7 +5248,7 @@ std::string NiFloatData::InternalAsString( bool verbose ) const { return out.str(); } -void NiFloatData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AKeyedData::FixLinks( objects, link_stack, version, user_version ); } @@ -5677,7 +5275,7 @@ std::string NiFloatExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiFloatExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -5716,18 +5314,10 @@ std::string NiFloatExtraDataController::InternalAsString( bool verbose ) const { return out.str(); } -void NiFloatExtraDataController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatExtraDataController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); + unknownLink = FixLink<NiObject>( objects, link_stack, version ); }; } @@ -5764,17 +5354,9 @@ std::string NiFloatInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiFloatInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiFloatData>( objects, link_stack, version ); } std::list<NiObjectRef> NiFloatInterpolator::InternalGetRefs() const { @@ -5818,7 +5400,7 @@ std::string NiFloatsExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiFloatsExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatsExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -5851,7 +5433,7 @@ std::string NiFogProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiFogProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFogProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -5950,28 +5532,12 @@ std::string NiGeomMorpherController::InternalAsString( bool verbose ) const { return out.str(); } -void NiGeomMorpherController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiGeomMorpherController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiMorphData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiMorphData>( objects, link_stack, version ); if ( version >= 0x0A01006A ) { for (uint i2 = 0; i2 < interpolators.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - interpolators[i2] = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( interpolators[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - interpolators[i2] = NULL; - link_stack.pop_front(); + interpolators[i2] = FixLink<NiInterpolator>( objects, link_stack, version ); }; }; } @@ -6017,7 +5583,7 @@ std::string NiGravity::InternalAsString( bool verbose ) const { return out.str(); } -void NiGravity::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiGravity::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -6044,7 +5610,7 @@ std::string NiIntegerExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiIntegerExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiIntegerExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -6087,7 +5653,7 @@ std::string NiIntegersExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiIntegersExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiIntegersExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -6119,17 +5685,9 @@ std::string NiKeyframeController::InternalAsString( bool verbose ) const { return out.str(); } -void NiKeyframeController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiKeyframeController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiKeyframeData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiKeyframeData>( objects, link_stack, version ); } std::list<NiObjectRef> NiKeyframeController::InternalGetRefs() const { @@ -6162,17 +5720,9 @@ std::string BSKeyframeController::InternalAsString( bool verbose ) const { return out.str(); } -void BSKeyframeController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSKeyframeController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiKeyframeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data2 = DynamicCast<NiKeyframeData>(objects[link_stack.front()]); - if ( data2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data2 = NULL; - link_stack.pop_front(); + data2 = FixLink<NiKeyframeData>( objects, link_stack, version ); } std::list<NiObjectRef> BSKeyframeController::InternalGetRefs() const { @@ -6336,7 +5886,7 @@ std::string NiKeyframeData::InternalAsString( bool verbose ) const { return out.str(); } -void NiKeyframeData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiKeyframeData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AKeyedData::FixLinks( objects, link_stack, version, user_version ); } @@ -6392,29 +5942,13 @@ std::string NiLightColorController::InternalAsString( bool verbose ) const { return out.str(); } -void NiLightColorController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLightColorController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiPosData>( objects, link_stack, version ); }; if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - interpolator = DynamicCast<NiPoint3Interpolator>(objects[link_stack.front()]); - if ( interpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - interpolator = NULL; - link_stack.pop_front(); + interpolator = FixLink<NiPoint3Interpolator>( objects, link_stack, version ); }; } @@ -6450,17 +5984,9 @@ std::string NiLightDimmerController::InternalAsString( bool verbose ) const { return out.str(); } -void NiLightDimmerController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLightDimmerController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); + unknownLink = FixLink<NiInterpolator>( objects, link_stack, version ); } std::list<NiObjectRef> NiLightDimmerController::InternalGetRefs() const { @@ -6500,17 +6026,9 @@ std::string NiLookAtController::InternalAsString( bool verbose ) const { return out.str(); } -void NiLookAtController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLookAtController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - lookAtNode = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( lookAtNode == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - lookAtNode = NULL; - link_stack.pop_front(); + lookAtNode = FixLink<NiNode>( objects, link_stack, version ); } std::list<NiObjectRef> NiLookAtController::InternalGetRefs() const { @@ -6579,44 +6097,12 @@ std::string NiLookAtInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiLookAtInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLookAtInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - lookAt = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( lookAt == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - lookAt = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink1 = DynamicCast<NiPoint3Interpolator>(objects[link_stack.front()]); - if ( unknownLink1 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink1 = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiFloatInterpolator>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink3 = DynamicCast<NiFloatInterpolator>(objects[link_stack.front()]); - if ( unknownLink3 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink3 = NULL; - link_stack.pop_front(); + lookAt = FixLink<NiNode>( objects, link_stack, version ); + unknownLink1 = FixLink<NiPoint3Interpolator>( objects, link_stack, version ); + unknownLink2 = FixLink<NiFloatInterpolator>( objects, link_stack, version ); + unknownLink3 = FixLink<NiFloatInterpolator>( objects, link_stack, version ); } std::list<NiObjectRef> NiLookAtInterpolator::InternalGetRefs() const { @@ -6666,18 +6152,10 @@ std::string NiMaterialColorController::InternalAsString( bool verbose ) const { return out.str(); } -void NiMaterialColorController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMaterialColorController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiPosData>( objects, link_stack, version ); }; } @@ -6728,7 +6206,7 @@ std::string NiMaterialProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiMaterialProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMaterialProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -6902,42 +6380,18 @@ std::string NiMeshPSysData::InternalAsString( bool verbose ) const { return out.str(); } -void NiMeshPSysData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMeshPSysData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysData::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - modifier = DynamicCast<NiPSysModifier>(objects[link_stack.front()]); - if ( modifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - modifier = NULL; - link_stack.pop_front(); + modifier = FixLink<NiPSysModifier>( objects, link_stack, version ); }; if ( ( version >= 0x0A020000 ) && ( version <= 0x14000004 ) ) { for (uint i2 = 0; i2 < unknownLinks.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLinks[i2] = DynamicCast<NiPSysModifier>(objects[link_stack.front()]); - if ( unknownLinks[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLinks[i2] = NULL; - link_stack.pop_front(); + unknownLinks[i2] = FixLink<NiPSysModifier>( objects, link_stack, version ); }; }; if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); + unknownLink2 = FixLink<NiNode>( objects, link_stack, version ); }; } @@ -7041,7 +6495,7 @@ std::string NiMorphData::InternalAsString( bool verbose ) const { return out.str(); } -void NiMorphData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMorphData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -7089,18 +6543,10 @@ std::string NiMultiTargetTransformController::InternalAsString( bool verbose ) c return out.str(); } -void NiMultiTargetTransformController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMultiTargetTransformController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < extraTargets.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - extraTargets[i1] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( extraTargets[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - extraTargets[i1] = NULL; - link_stack.pop_front(); + extraTargets[i1] = FixLink<NiNode>( objects, link_stack, version ); }; } @@ -7173,29 +6619,13 @@ std::string NiNode::InternalAsString( bool verbose ) const { return out.str(); } -void NiNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiNode::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiAVObject::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < children.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - children[i1] = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( children[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - children[i1] = NULL; - link_stack.pop_front(); + children[i1] = FixLink<NiAVObject>( objects, link_stack, version ); }; for (uint i1 = 0; i1 < effects.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - effects[i1] = DynamicCast<NiDynamicEffect>(objects[link_stack.front()]); - if ( effects[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - effects[i1] = NULL; - link_stack.pop_front(); + effects[i1] = FixLink<NiDynamicEffect>( objects, link_stack, version ); }; } @@ -7227,7 +6657,7 @@ std::string AvoidNode::InternalAsString( bool verbose ) const { return out.str(); } -void AvoidNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AvoidNode::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiNode::FixLinks( objects, link_stack, version, user_version ); } @@ -7267,7 +6697,7 @@ std::string FxWidget::InternalAsString( bool verbose ) const { return out.str(); } -void FxWidget::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void FxWidget::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiNode::FixLinks( objects, link_stack, version, user_version ); } @@ -7291,7 +6721,7 @@ std::string FxButton::InternalAsString( bool verbose ) const { return out.str(); } -void FxButton::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void FxButton::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { FxWidget::FixLinks( objects, link_stack, version, user_version ); } @@ -7348,18 +6778,10 @@ std::string FxRadioButton::InternalAsString( bool verbose ) const { return out.str(); } -void FxRadioButton::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void FxRadioButton::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { FxWidget::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLinks[i1] = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLinks[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLinks[i1] = NULL; - link_stack.pop_front(); + unknownLinks[i1] = FixLink<NiObject>( objects, link_stack, version ); }; } @@ -7394,7 +6816,7 @@ std::string NiBillboardNode::InternalAsString( bool verbose ) const { return out.str(); } -void NiBillboardNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBillboardNode::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiNode::FixLinks( objects, link_stack, version, user_version ); } @@ -7418,7 +6840,7 @@ std::string NiBSAnimationNode::InternalAsString( bool verbose ) const { return out.str(); } -void NiBSAnimationNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSAnimationNode::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiNode::FixLinks( objects, link_stack, version, user_version ); } @@ -7442,7 +6864,7 @@ std::string NiBSParticleNode::InternalAsString( bool verbose ) const { return out.str(); } -void NiBSParticleNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSParticleNode::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiNode::FixLinks( objects, link_stack, version, user_version ); } @@ -7519,18 +6941,10 @@ std::string NiLODNode::InternalAsString( bool verbose ) const { return out.str(); } -void NiLODNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLODNode::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiNode::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - lodLevelData = DynamicCast<NiLODData>(objects[link_stack.front()]); - if ( lodLevelData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - lodLevelData = NULL; - link_stack.pop_front(); + lodLevelData = FixLink<NiLODData>( objects, link_stack, version ); }; } @@ -7581,7 +6995,7 @@ std::string NiPalette::InternalAsString( bool verbose ) const { return out.str(); } -void NiPalette::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPalette::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -7641,7 +7055,7 @@ std::string NiParticleBomb::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleBomb::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleBomb::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -7673,17 +7087,9 @@ std::string NiParticleColorModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleColorModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleColorModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - colorData = DynamicCast<NiColorData>(objects[link_stack.front()]); - if ( colorData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - colorData = NULL; - link_stack.pop_front(); + colorData = FixLink<NiColorData>( objects, link_stack, version ); } std::list<NiObjectRef> NiParticleColorModifier::InternalGetRefs() const { @@ -7714,7 +7120,7 @@ std::string NiParticleGrowFade::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleGrowFade::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleGrowFade::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -7762,18 +7168,10 @@ std::string NiParticleMeshModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleMeshModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleMeshModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < particleMeshes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - particleMeshes[i1] = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( particleMeshes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - particleMeshes[i1] = NULL; - link_stack.pop_front(); + particleMeshes[i1] = FixLink<NiAVObject>( objects, link_stack, version ); }; } @@ -7816,7 +7214,7 @@ std::string NiParticleRotation::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleRotation::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleRotation::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -7840,7 +7238,7 @@ std::string NiParticles::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticles::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticles::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeom::FixLinks( objects, link_stack, version, user_version ); } @@ -7864,7 +7262,7 @@ std::string NiAutoNormalParticles::InternalAsString( bool verbose ) const { return out.str(); } -void NiAutoNormalParticles::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAutoNormalParticles::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticles::FixLinks( objects, link_stack, version, user_version ); } @@ -7888,7 +7286,7 @@ std::string NiParticleMeshes::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleMeshes::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleMeshes::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticles::FixLinks( objects, link_stack, version, user_version ); } @@ -7965,7 +7363,7 @@ std::string NiParticlesData::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticlesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticlesData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiAutoNormalParticlesData::FixLinks( objects, link_stack, version, user_version ); } @@ -7997,17 +7395,9 @@ std::string NiParticleMeshesData::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleMeshesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleMeshesData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticlesData::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); + unknownLink2 = FixLink<NiAVObject>( objects, link_stack, version ); } std::list<NiObjectRef> NiParticleMeshesData::InternalGetRefs() const { @@ -8063,19 +7453,11 @@ std::string NiParticleSystem::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleSystem::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleSystem::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticles::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x0A010000 ) { for (uint i2 = 0; i2 < modifiers.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - modifiers[i2] = DynamicCast<NiPSysModifier>(objects[link_stack.front()]); - if ( modifiers[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - modifiers[i2] = NULL; - link_stack.pop_front(); + modifiers[i2] = FixLink<NiPSysModifier>( objects, link_stack, version ); }; }; } @@ -8104,7 +7486,7 @@ std::string NiMeshParticleSystem::InternalAsString( bool verbose ) const { return out.str(); } -void NiMeshParticleSystem::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMeshParticleSystem::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticleSystem::FixLinks( objects, link_stack, version, user_version ); } @@ -8277,44 +7659,12 @@ std::string NiParticleSystemController::InternalAsString( bool verbose ) const { return out.str(); } -void NiParticleSystemController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleSystemController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - emitter = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( emitter == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - emitter = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - particleExtra = DynamicCast<AParticleModifier>(objects[link_stack.front()]); - if ( particleExtra == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - particleExtra = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); + emitter = FixLink<NiObject>( objects, link_stack, version ); + unknownLink = FixLink<NiObject>( objects, link_stack, version ); + particleExtra = FixLink<AParticleModifier>( objects, link_stack, version ); + unknownLink2 = FixLink<NiObject>( objects, link_stack, version ); } std::list<NiObjectRef> NiParticleSystemController::InternalGetRefs() const { @@ -8345,7 +7695,7 @@ std::string NiBSPArrayController::InternalAsString( bool verbose ) const { return out.str(); } -void NiBSPArrayController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSPArrayController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticleSystemController::FixLinks( objects, link_stack, version, user_version ); } @@ -8403,26 +7753,10 @@ std::string NiPathController::InternalAsString( bool verbose ) const { return out.str(); } -void NiPathController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPathController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - posData = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( posData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - posData = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - floatData = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( floatData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - floatData = NULL; - link_stack.pop_front(); + posData = FixLink<NiPosData>( objects, link_stack, version ); + floatData = FixLink<NiFloatData>( objects, link_stack, version ); } std::list<NiObjectRef> NiPathController::InternalGetRefs() const { @@ -8473,26 +7807,10 @@ std::string NiPathInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiPathInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPathInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - posData = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( posData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - posData = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - floatData = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( floatData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - floatData = NULL; - link_stack.pop_front(); + posData = FixLink<NiPosData>( objects, link_stack, version ); + floatData = FixLink<NiFloatData>( objects, link_stack, version ); } std::list<NiObjectRef> NiPathInterpolator::InternalGetRefs() const { @@ -8636,17 +7954,9 @@ std::string NiPixelData::InternalAsString( bool verbose ) const { return out.str(); } -void NiPixelData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPixelData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - palette = DynamicCast<NiPalette>(objects[link_stack.front()]); - if ( palette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - palette = NULL; - link_stack.pop_front(); + palette = FixLink<NiPalette>( objects, link_stack, version ); } std::list<NiObjectRef> NiPixelData::InternalGetRefs() const { @@ -8733,7 +8043,7 @@ std::string NiPlanarCollider::InternalAsString( bool verbose ) const { return out.str(); } -void NiPlanarCollider::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPlanarCollider::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -8768,17 +8078,9 @@ std::string NiPoint3Interpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiPoint3Interpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPoint3Interpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiPosData>( objects, link_stack, version ); } std::list<NiObjectRef> NiPoint3Interpolator::InternalGetRefs() const { @@ -8812,7 +8114,7 @@ std::string NiPointLight::InternalAsString( bool verbose ) const { return out.str(); } -void NiPointLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPointLight::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiLight::FixLinks( objects, link_stack, version, user_version ); } @@ -8864,7 +8166,7 @@ std::string NiPosData::InternalAsString( bool verbose ) const { return out.str(); } -void NiPosData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPosData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AKeyedData::FixLinks( objects, link_stack, version, user_version ); } @@ -8899,17 +8201,9 @@ std::string NiPSysAgeDeathModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysAgeDeathModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysAgeDeathModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - spawnModifier = DynamicCast<NiPSysSpawnModifier>(objects[link_stack.front()]); - if ( spawnModifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - spawnModifier = NULL; - link_stack.pop_front(); + spawnModifier = FixLink<NiPSysSpawnModifier>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysAgeDeathModifier::InternalGetRefs() const { @@ -8981,17 +8275,9 @@ std::string NiPSysBombModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysBombModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysBombModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); + unknownLink = FixLink<NiNode>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysBombModifier::InternalGetRefs() const { @@ -9017,7 +8303,7 @@ std::string NiPSysBoundUpdateModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysBoundUpdateModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysBoundUpdateModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -9050,7 +8336,7 @@ std::string NiPSysBoxEmitter::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysBoxEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysBoxEmitter::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); } @@ -9082,17 +8368,9 @@ std::string NiPSysColliderManager::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysColliderManager::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysColliderManager::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - collider = DynamicCast<NiPSysPlanarCollider>(objects[link_stack.front()]); - if ( collider == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - collider = NULL; - link_stack.pop_front(); + collider = FixLink<NiPSysPlanarCollider>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysColliderManager::InternalGetRefs() const { @@ -9125,17 +8403,9 @@ std::string NiPSysColorModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysColorModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysColorModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiColorData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiColorData>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysColorModifier::InternalGetRefs() const { @@ -9166,7 +8436,7 @@ std::string NiPSysCylinderEmitter::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysCylinderEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysCylinderEmitter::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); } @@ -9308,7 +8578,7 @@ std::string NiPSysData::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysData::FixLinks( objects, link_stack, version, user_version ); } @@ -9352,17 +8622,9 @@ std::string NiPSysDragModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysDragModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysDragModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - parent = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( parent == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - parent = NULL; - link_stack.pop_front(); + parent = FixLink<NiObject>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysDragModifier::InternalGetRefs() const { @@ -9408,29 +8670,13 @@ std::string NiPSysEmitterCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysEmitterCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPSysEmitterCtlrData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiPSysEmitterCtlrData>( objects, link_stack, version ); }; if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - visibilityInterpolator = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( visibilityInterpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - visibilityInterpolator = NULL; - link_stack.pop_front(); + visibilityInterpolator = FixLink<NiInterpolator>( objects, link_stack, version ); }; } @@ -9505,7 +8751,7 @@ std::string NiPSysEmitterCtlrData::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysEmitterCtlrData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterCtlrData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -9529,7 +8775,7 @@ std::string NiPSysEmitterDeclinationCtlr::InternalAsString( bool verbose ) const return out.str(); } -void NiPSysEmitterDeclinationCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterDeclinationCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); } @@ -9553,7 +8799,7 @@ std::string NiPSysEmitterDeclinationVarCtlr::InternalAsString( bool verbose ) co return out.str(); } -void NiPSysEmitterDeclinationVarCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterDeclinationVarCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); } @@ -9577,7 +8823,7 @@ std::string NiPSysEmitterInitialRadiusCtlr::InternalAsString( bool verbose ) con return out.str(); } -void NiPSysEmitterInitialRadiusCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterInitialRadiusCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); } @@ -9601,7 +8847,7 @@ std::string NiPSysEmitterLifeSpanCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysEmitterLifeSpanCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterLifeSpanCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); } @@ -9625,7 +8871,7 @@ std::string NiPSysEmitterSpeedCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysEmitterSpeedCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterSpeedCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); } @@ -9675,17 +8921,9 @@ std::string NiPSysGravityModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysGravityModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysGravityModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - gravityObject = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( gravityObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - gravityObject = NULL; - link_stack.pop_front(); + gravityObject = FixLink<NiNode>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysGravityModifier::InternalGetRefs() const { @@ -9708,7 +8946,7 @@ std::string NiPSysGravityStrengthCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysGravityStrengthCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysGravityStrengthCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); } @@ -9744,7 +8982,7 @@ std::string NiPSysGrowFadeModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysGrowFadeModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysGrowFadeModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -9801,18 +9039,10 @@ std::string NiPSysMeshEmitter::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysMeshEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysMeshEmitter::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysEmitter::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < emitterMeshes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - emitterMeshes[i1] = DynamicCast<NiTriBasedGeom>(objects[link_stack.front()]); - if ( emitterMeshes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - emitterMeshes[i1] = NULL; - link_stack.pop_front(); + emitterMeshes[i1] = FixLink<NiTriBasedGeom>( objects, link_stack, version ); }; } @@ -9864,18 +9094,10 @@ std::string NiPSysMeshUpdateModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysMeshUpdateModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysMeshUpdateModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); for (uint i1 = 0; i1 < meshes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - meshes[i1] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( meshes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - meshes[i1] = NULL; - link_stack.pop_front(); + meshes[i1] = FixLink<NiNode>( objects, link_stack, version ); }; } @@ -9903,7 +9125,7 @@ std::string NiPSysModifierActiveCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysModifierActiveCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysModifierActiveCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { APSysCtlr::FixLinks( objects, link_stack, version, user_version ); } @@ -9977,44 +9199,12 @@ std::string NiPSysPlanarCollider::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysPlanarCollider::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysPlanarCollider::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - spawnModifier = DynamicCast<NiPSysSpawnModifier>(objects[link_stack.front()]); - if ( spawnModifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - spawnModifier = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - parent = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( parent == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - parent = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink_ = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink_ == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink_ = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - colliderObject = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( colliderObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - colliderObject = NULL; - link_stack.pop_front(); + spawnModifier = FixLink<NiPSysSpawnModifier>( objects, link_stack, version ); + parent = FixLink<NiObject>( objects, link_stack, version ); + unknownLink_ = FixLink<NiObject>( objects, link_stack, version ); + colliderObject = FixLink<NiNode>( objects, link_stack, version ); } std::list<NiObjectRef> NiPSysPlanarCollider::InternalGetRefs() const { @@ -10043,7 +9233,7 @@ std::string NiPSysPositionModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysPositionModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysPositionModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -10067,7 +9257,7 @@ std::string NiPSysResetOnLoopCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysResetOnLoopCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysResetOnLoopCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); } @@ -10116,7 +9306,7 @@ std::string NiPSysRotationModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysRotationModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysRotationModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -10164,7 +9354,7 @@ std::string NiPSysSpawnModifier::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysSpawnModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysSpawnModifier::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -10191,7 +9381,7 @@ std::string NiPSysSphereEmitter::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysSphereEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysSphereEmitter::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); } @@ -10215,7 +9405,7 @@ std::string NiPSysUpdateCtlr::InternalAsString( bool verbose ) const { return out.str(); } -void NiPSysUpdateCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysUpdateCtlr::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); } @@ -10239,7 +9429,7 @@ std::string NiLODData::InternalAsString( bool verbose ) const { return out.str(); } -void NiLODData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLODData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -10284,7 +9474,7 @@ std::string NiRangeLODData::InternalAsString( bool verbose ) const { return out.str(); } -void NiRangeLODData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiRangeLODData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiLODData::FixLinks( objects, link_stack, version, user_version ); } @@ -10339,7 +9529,7 @@ std::string NiScreenLODData::InternalAsString( bool verbose ) const { return out.str(); } -void NiScreenLODData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiScreenLODData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiLODData::FixLinks( objects, link_stack, version, user_version ); } @@ -10363,7 +9553,7 @@ std::string NiRotatingParticles::InternalAsString( bool verbose ) const { return out.str(); } -void NiRotatingParticles::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiRotatingParticles::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticles::FixLinks( objects, link_stack, version, user_version ); } @@ -10387,7 +9577,7 @@ std::string NiRotatingParticlesData::InternalAsString( bool verbose ) const { return out.str(); } -void NiRotatingParticlesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiRotatingParticlesData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiParticlesData::FixLinks( objects, link_stack, version, user_version ); } @@ -10411,7 +9601,7 @@ std::string NiSequenceStreamHelper::InternalAsString( bool verbose ) const { return out.str(); } -void NiSequenceStreamHelper::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSequenceStreamHelper::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObjectNET::FixLinks( objects, link_stack, version, user_version ); } @@ -10438,7 +9628,7 @@ std::string NiShadeProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiShadeProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiShadeProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -10535,18 +9725,10 @@ std::string NiSkinData::InternalAsString( bool verbose ) const { return out.str(); } -void NiSkinData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSkinData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skinPartition = DynamicCast<NiSkinPartition>(objects[link_stack.front()]); - if ( skinPartition == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skinPartition = NULL; - link_stack.pop_front(); + skinPartition = FixLink<NiSkinPartition>( objects, link_stack, version ); }; } @@ -10621,47 +9803,15 @@ std::string NiSkinInstance::InternalAsString( bool verbose ) const { return out.str(); } -void NiSkinInstance::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSkinInstance::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiSkinData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiSkinData>( objects, link_stack, version ); if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skinPartition = DynamicCast<NiSkinPartition>(objects[link_stack.front()]); - if ( skinPartition == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skinPartition = NULL; - link_stack.pop_front(); - }; - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skeletonRoot = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( skeletonRoot == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skeletonRoot = NULL; - link_stack.pop_front(); + skinPartition = FixLink<NiSkinPartition>( objects, link_stack, version ); + }; + skeletonRoot = FixLink<NiNode>( objects, link_stack, version ); for (uint i1 = 0; i1 < bones.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - bones[i1] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( bones[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - bones[i1] = NULL; - link_stack.pop_front(); + bones[i1] = FixLink<NiNode>( objects, link_stack, version ); }; } @@ -10950,7 +10100,7 @@ std::string NiSkinPartition::InternalAsString( bool verbose ) const { return out.str(); } -void NiSkinPartition::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSkinPartition::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -11055,31 +10205,15 @@ std::string NiSourceTexture::InternalAsString( bool verbose ) const { return out.str(); } -void NiSourceTexture::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSourceTexture::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObjectNET::FixLinks( objects, link_stack, version, user_version ); if ( version >= 0x0A010000 ) { if ( (useExternal == 1) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); + unknownLink = FixLink<NiObject>( objects, link_stack, version ); }; }; if ( (useExternal == 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - pixelData = DynamicCast<NiPixelData>(objects[link_stack.front()]); - if ( pixelData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - pixelData = NULL; - link_stack.pop_front(); + pixelData = FixLink<NiPixelData>( objects, link_stack, version ); }; } @@ -11110,7 +10244,7 @@ std::string NiSpecularProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiSpecularProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSpecularProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -11152,7 +10286,7 @@ std::string NiSphericalCollider::InternalAsString( bool verbose ) const { return out.str(); } -void NiSphericalCollider::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSphericalCollider::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AParticleModifier::FixLinks( objects, link_stack, version, user_version ); } @@ -11182,7 +10316,7 @@ std::string NiSpotLight::InternalAsString( bool verbose ) const { return out.str(); } -void NiSpotLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSpotLight::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiPointLight::FixLinks( objects, link_stack, version, user_version ); } @@ -11237,7 +10371,7 @@ std::string NiStencilProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiStencilProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStencilProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -11271,7 +10405,7 @@ std::string NiStringExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiStringExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStringExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -11301,7 +10435,7 @@ std::string NiStringPalette::InternalAsString( bool verbose ) const { return out.str(); } -void NiStringPalette::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStringPalette::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -11344,7 +10478,7 @@ std::string NiStringsExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiStringsExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStringsExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -11394,7 +10528,7 @@ std::string NiTextKeyExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiTextKeyExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTextKeyExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -11470,17 +10604,9 @@ std::string NiTextureEffect::InternalAsString( bool verbose ) const { return out.str(); } -void NiTextureEffect::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTextureEffect::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiDynamicEffect::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - sourceTexture = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( sourceTexture == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - sourceTexture = NULL; - link_stack.pop_front(); + sourceTexture = FixLink<NiSourceTexture>( objects, link_stack, version ); } std::list<NiObjectRef> NiTextureEffect::InternalGetRefs() const { @@ -11526,18 +10652,10 @@ std::string NiTextureTransformController::InternalAsString( bool verbose ) const return out.str(); } -void NiTextureTransformController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTextureTransformController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiFloatData>( objects, link_stack, version ); }; } @@ -12241,108 +11359,36 @@ std::string NiTexturingProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiTexturingProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTexturingProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); if ( (hasBaseTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - baseTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( baseTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - baseTexture.source = NULL; - link_stack.pop_front(); + baseTexture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( (hasDarkTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - darkTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( darkTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - darkTexture.source = NULL; - link_stack.pop_front(); + darkTexture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( (hasDetailTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - detailTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( detailTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - detailTexture.source = NULL; - link_stack.pop_front(); + detailTexture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( (hasGlossTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - glossTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( glossTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - glossTexture.source = NULL; - link_stack.pop_front(); + glossTexture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( (hasGlowTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - glowTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( glowTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - glowTexture.source = NULL; - link_stack.pop_front(); + glowTexture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( (hasBumpMapTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - bumpMapTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( bumpMapTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - bumpMapTexture.source = NULL; - link_stack.pop_front(); + bumpMapTexture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( (hasDecal0Texture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - decal0Texture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( decal0Texture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - decal0Texture.source = NULL; - link_stack.pop_front(); + decal0Texture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( (((textureCount == 8)) && ((hasDecal1Texture != 0))) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - decal1Texture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( decal1Texture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - decal1Texture.source = NULL; - link_stack.pop_front(); + decal1Texture.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; if ( version >= 0x0A000100 ) { for (uint i2 = 0; i2 < shaderTextures.size(); i2++) { if ( (shaderTextures[i2].isUsed != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shaderTextures[i2].textureData.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( shaderTextures[i2].textureData.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shaderTextures[i2].textureData.source = NULL; - link_stack.pop_front(); + shaderTextures[i2].textureData.source = FixLink<NiSourceTexture>( objects, link_stack, version ); }; }; }; @@ -12388,7 +11434,7 @@ std::string NiTransformController::InternalAsString( bool verbose ) const { return out.str(); } -void NiTransformController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTransformController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); } @@ -12412,7 +11458,7 @@ std::string NiTransformData::InternalAsString( bool verbose ) const { return out.str(); } -void NiTransformData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTransformData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiKeyframeData::FixLinks( objects, link_stack, version, user_version ); } @@ -12470,17 +11516,9 @@ std::string NiTransformInterpolator::InternalAsString( bool verbose ) const { return out.str(); } -void NiTransformInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTransformInterpolator::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiTransformData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiTransformData>( objects, link_stack, version ); } std::list<NiObjectRef> NiTransformInterpolator::InternalGetRefs() const { @@ -12505,7 +11543,7 @@ std::string NiTriShape::InternalAsString( bool verbose ) const { return out.str(); } -void NiTriShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriShape::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeom::FixLinks( objects, link_stack, version, user_version ); } @@ -12608,7 +11646,7 @@ std::string NiTriShapeData::InternalAsString( bool verbose ) const { return out.str(); } -void NiTriShapeData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriShapeData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); } @@ -12632,7 +11670,7 @@ std::string NiTriStrips::InternalAsString( bool verbose ) const { return out.str(); } -void NiTriStrips::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriStrips::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeom::FixLinks( objects, link_stack, version, user_version ); } @@ -12734,7 +11772,7 @@ std::string NiTriStripsData::InternalAsString( bool verbose ) const { return out.str(); } -void NiTriStripsData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriStripsData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); } @@ -12758,7 +11796,7 @@ std::string NiClod::InternalAsString( bool verbose ) const { return out.str(); } -void NiClod::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiClod::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeom::FixLinks( objects, link_stack, version, user_version ); } @@ -12840,7 +11878,7 @@ std::string NiClodData::InternalAsString( bool verbose ) const { return out.str(); } -void NiClodData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiClodData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); } @@ -12875,17 +11913,9 @@ std::string NiUVController::InternalAsString( bool verbose ) const { return out.str(); } -void NiUVController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiUVController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiUVData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiUVData>( objects, link_stack, version ); } std::list<NiObjectRef> NiUVController::InternalGetRefs() const { @@ -12944,7 +11974,7 @@ std::string NiUVData::InternalAsString( bool verbose ) const { return out.str(); } -void NiUVData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiUVData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiObject::FixLinks( objects, link_stack, version, user_version ); } @@ -12974,7 +12004,7 @@ std::string NiVectorExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiVectorExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVectorExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -13007,7 +12037,7 @@ std::string NiVertexColorProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiVertexColorProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVertexColorProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -13053,7 +12083,7 @@ std::string NiVertWeightsExtraData::InternalAsString( bool verbose ) const { return out.str(); } -void NiVertWeightsExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVertWeightsExtraData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiExtraData::FixLinks( objects, link_stack, version, user_version ); } @@ -13089,18 +12119,10 @@ std::string NiVisController::InternalAsString( bool verbose ) const { return out.str(); } -void NiVisController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVisController::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiVisData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); + data = FixLink<NiVisData>( objects, link_stack, version ); }; } @@ -13145,7 +12167,7 @@ std::string NiVisData::InternalAsString( bool verbose ) const { return out.str(); } -void NiVisData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVisData::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AKeyedData::FixLinks( objects, link_stack, version, user_version ); } @@ -13172,7 +12194,7 @@ std::string NiWireframeProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiWireframeProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiWireframeProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -13206,7 +12228,7 @@ std::string NiZBufferProperty::InternalAsString( bool verbose ) const { return out.str(); } -void NiZBufferProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiZBufferProperty::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiProperty::FixLinks( objects, link_stack, version, user_version ); } @@ -13230,7 +12252,7 @@ std::string RootCollisionNode::InternalAsString( bool verbose ) const { return out.str(); } -void RootCollisionNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void RootCollisionNode::InternalFixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NiNode::FixLinks( objects, link_stack, version, user_version ); } @@ -13239,4 +12261,3 @@ std::list<NiObjectRef> RootCollisionNode::InternalGetRefs() const { refs = NiNode::GetRefs(); return refs; } - diff --git a/src/niflib.cpp b/src/niflib.cpp index 6e2b89dc..eb64ca6e 100644 --- a/src/niflib.cpp +++ b/src/niflib.cpp @@ -2,8 +2,8 @@ All rights reserved. Please see niflib.h for licence. */ //#define DEBUG // this will produce lots of output -//#define PRINT_OBJECT_NAMES -//#define PRINT_OBJECT_CONTENTS +#define PRINT_OBJECT_NAMES +#define PRINT_OBJECT_CONTENTS //#define DEBUG_LINK_PHASE //#define DEBUG_HEADER_FOOTER @@ -117,24 +117,13 @@ unsigned int GetNifVersion( string const & file_name ) { //--Open File--// ifstream in( file_name.c_str(), ifstream::binary ); - //--Read Header--// - char header_string[64]; - in.getline( header_string, 64 ); - string headerstr(header_string); - - // make sure this is a NIF file - unsigned ver_start = 0; - if ( headerstr.substr(0, 22) == "NetImmerse File Format" ) { - ver_start = 32; - } else if ( headerstr.substr(0, 20) == "Gamebryo File Format" ) { - ver_start = 30; - } else { - //Not a NIF file - return VER_INVALID; - } + //--Read Header String--// + + HeaderString header; + unsigned version; + NifStream( header, in, version ); - //Parse version string and return result. - return ParseVersionString( headerstr.substr( ver_start ) ); + return version; } //Reads the given file by file name and returns a vector of block references @@ -180,29 +169,46 @@ vector<NiObjectRef> ReadNifList( istream & in, NifInfo * info ) { #endif //--Read Objects--// - size_t numBlocks = header.numBlocks; - vector<NiObjectRef> blocks( numBlocks ); //List to hold the blocks + size_t numObjects = header.numBlocks; + map<unsigned,NiObjectRef> objects; //Map to hold objects by number list<uint> link_stack; //List to add link values to as they're read in from the file string objectType; stringstream errStream; - for (uint i = 0; i < numBlocks; i++) { + //Loop through all objects in the file + uint i = 0; + NiObjectRef new_obj; + while (true) { //Check for EOF - //if (in.eof() ) { - // throw runtime_error("End of file reached prematurely. This NIF may be corrupt or improperly supported."); - //} + if (in.eof() ) { + errStream << "End of file reached prematurely. This NIF may be corrupt or improperly supported." << endl; + if ( new_obj != NULL ) { + errStream << "Last successfuly read object was: " << endl; + errStream << "====[ " << "Object " << i - 1 << " | " << new_obj->GetType().GetTypeName() << " ]====" << endl; + errStream << new_obj->asString(); + } else { + errStream << "No objects were read successfully." << endl; + } + throw runtime_error( errStream.str() ); + } - //There are two ways to read blocks, one before version 5.0.0.1 and one after that + //There are two main ways to read objects + //One before version 5.0.0.1 and one after if ( header.version >= 0x05000001 ) { - //From version 5.0.0.1 to version 10.0.1.0 there is a zero byte at the begining of each block + //From version 5.0.0.1 to version 10.0.1.0 there is a zero byte at the begining of each object if ( header.version <= VER_10_1_0_0 ) { uint checkValue = ReadUInt( in ); if ( checkValue != 0 ) { //Throw an exception if it's not zero - errStream << "Read failue - Bad object position. Invalid check value" << endl; - errStream << "====[ " << "Object " << i << " | " << blocks[i - 1]->GetType().GetTypeName() << " ]====" << endl; - errStream << blocks[i - 1]->asString(); + errStream << "Read failue - Bad object position. Invalid check value: " << checkValue << endl; + if ( new_obj != NULL ) { + errStream << "Last successfuly read object was: " << endl; + errStream << "====[ " << "Object " << i - 1 << " | " << new_obj->GetType().GetTypeName() << " ]====" << endl; + errStream << new_obj->asString(); + } else { + errStream << "No objects were read successfully." << endl; + } throw runtime_error( errStream.str() ); } } @@ -210,12 +216,17 @@ vector<NiObjectRef> ReadNifList( istream & in, NifInfo * info ) { // Find which block type this is by using the header arrays objectType = header.blockTypes[ header.blockTypeIndex[i] ]; } else { - // Find which block type this is by reading the string at this location + // Find which object type this is by reading the string at this location uint objectTypeLength = ReadUInt( in ); if (objectTypeLength > 30 || objectTypeLength < 6) { errStream << "Read failue - Bad object position. Invalid Type Name Length: " << objectTypeLength << endl; - errStream << "====[ " << "Object " << i - 1 << " | " << blocks[i - 1]->GetType().GetTypeName() << " ]====" << endl; - errStream << blocks[i - 1]->asString(); + if ( new_obj != NULL ) { + errStream << "Last successfuly read object was: " << endl; + errStream << "====[ " << "Object " << i - 1 << " | " << new_obj->GetType().GetTypeName() << " ]====" << endl; + errStream << new_obj->asString(); + } else { + errStream << "No objects were read successfully." << endl; + } throw runtime_error( errStream.str() ); } char* charobjectType = new char[objectTypeLength + 1]; @@ -223,38 +234,81 @@ vector<NiObjectRef> ReadNifList( istream & in, NifInfo * info ) { charobjectType[objectTypeLength] = 0; objectType = string(charobjectType); delete [] charobjectType; + +#ifdef PRINT_OBJECT_NAMES + cout << endl << i << ": " << objectType; +#endif + + if ( header.version < VER_4_0_0_0 ) { + //There can be special commands instead of object names + //in these versions + + if ( objectType == "Top Level Object" ) { + //Just continue on to the next object + continue; + } + + if ( objectType == "End Of File" ) { + //File is finished + break; + } + } + if ( (objectType[0] != 'N' || objectType[1] != 'i') && (objectType[0] != 'R' || objectType[1] != 'o') && (objectType[0] != 'A' || objectType[1] != 'v')) { errStream << "Read failue - Bad object position. Invalid Type Name: " << objectType << endl; - errStream << "====[ " << "Object " << i - 1 << " | " << blocks[i - 1]->GetType().GetTypeName() << " ]====" << endl; - errStream << blocks[i - 1]->asString(); + if ( new_obj != NULL ) { + errStream << "Last successfuly read object was: " << endl; + errStream << "====[ " << "Object " << i - 1 << " | " << new_obj->GetType().GetTypeName() << " ]====" << endl; + errStream << new_obj->asString(); + } else { + errStream << "No objects were read successfully." << endl; + } throw runtime_error( errStream.str() ); } } -#ifdef PRINT_OBJECT_NAMES - cout << endl << i << ": " << objectType; -#endif - - //Create Block of the type that was found - blocks[i] = CreateObject(objectType); + //Create object of the type that was found + new_obj = CreateObject(objectType); + + //Check for an unknown object type + if ( new_obj == NULL ) { + errStream << "Unknown object type encountered during file read: " << objectType << endl; + if ( new_obj != NULL ) { + errStream << "Last successfuly read object was: " << endl; + errStream << "====[ " << "Object " << i - 1 << " | " << new_obj->GetType().GetTypeName() << " ]====" << endl; + errStream << new_obj->asString(); + } else { + errStream << "No objects were read successfully." << endl; + } + throw runtime_error( errStream.str() ); + } - //Check for an unknown block type - if ( blocks[i] == NULL ) { - //For version 5.0.0.1 and up, throw an exception - there's nothing we can do - //if ( version >= 0x05000001 ) { - errStream << "Unknown object type encountered during file read: " << objectType; - throw runtime_error( errStream.str() ); - //} else { - //We can skip over this block in older versions - //blocks[i] = new UnknownBlock(objectType); - //} + uint index; + if ( header.version < VER_4_0_0_0 ) { + //These old versions have a pointer value after the name + //which is used as the index + index = ReadUInt(in); + } else { + //These newer verisons use their position in the file as their index + index = i; } - //blocks[i]->SetBlockNum(i); - blocks[i]->Read( in, link_stack, header.version, header.userVersion ); + //Read new object + new_obj->Read( in, link_stack, header.version, header.userVersion ); + objects[index] = new_obj; + #ifdef PRINT_OBJECT_CONTENTS - cout << endl << blocks[i]->asString() << endl; + cout << endl << new_obj->asString() << endl; #endif + + if ( header.version >= VER_4_0_0_0 ) { + //We know the number of objects, so increment the count + //and break if we've finished + ++i; + if ( i >= numObjects ) { + break; + } + } } //cout << endl; @@ -286,16 +340,25 @@ vector<NiObjectRef> ReadNifList( istream & in, NifInfo * info ) { cout << "Fixing Links:" << endl; #endif //--Now that all blocks are read, go back and fix the links--// - for (uint i = 0; i < blocks.size(); ++i) { + if ( header.version < VER_4_0_0_0 ) { + //First wen + } + + vector<NiObjectRef> obj_list; + + for ( map<unsigned,NiObjectRef>::iterator it = objects.begin(); it != objects.end(); ++it ) { #ifdef DEBUG_LINK_PHASE cout << i << ": " << blocks[i] << endl; #endif //Fix links & other pre-processing - blocks[i]->FixLinks( blocks, link_stack, header.version, header.userVersion ); + it->second->FixLinks( objects, link_stack, header.version, header.userVersion ); + + //Add object to list + obj_list.push_back(it->second); } //Return completed block list - return blocks; + return obj_list; } // Writes a valid Nif File given an ostream, a list to the root objects of a file tree diff --git a/src/obj/ABoneLODController.cpp b/src/obj/ABoneLODController.cpp index 1fbaf9cd..59b60e35 100644 --- a/src/obj/ABoneLODController.cpp +++ b/src/obj/ABoneLODController.cpp @@ -26,7 +26,7 @@ string ABoneLODController::asString( bool verbose ) const { A_BONE_L_O_D_CONTROLLER_STRING } -void ABoneLODController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void ABoneLODController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { A_BONE_L_O_D_CONTROLLER_FIXLINKS } diff --git a/src/obj/AKeyedData.cpp b/src/obj/AKeyedData.cpp index e201c773..95796a4f 100644 --- a/src/obj/AKeyedData.cpp +++ b/src/obj/AKeyedData.cpp @@ -23,7 +23,7 @@ string AKeyedData::asString( bool verbose ) const { A_KEYED_DATA_STRING } -void AKeyedData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AKeyedData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { A_KEYED_DATA_FIXLINKS } diff --git a/src/obj/APSysCtlr.cpp b/src/obj/APSysCtlr.cpp index 31582f1b..c9dfc966 100644 --- a/src/obj/APSysCtlr.cpp +++ b/src/obj/APSysCtlr.cpp @@ -23,7 +23,7 @@ string APSysCtlr::asString( bool verbose ) const { A_P_SYS_CTLR_STRING } -void APSysCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void APSysCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { A_P_SYS_CTLR_FIXLINKS } diff --git a/src/obj/APSysData.cpp b/src/obj/APSysData.cpp index 77be9b72..cfabcd76 100644 --- a/src/obj/APSysData.cpp +++ b/src/obj/APSysData.cpp @@ -23,7 +23,7 @@ string APSysData::asString( bool verbose ) const { A_P_SYS_DATA_STRING } -void APSysData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void APSysData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { A_P_SYS_DATA_FIXLINKS } diff --git a/src/obj/AParticleModifier.cpp b/src/obj/AParticleModifier.cpp index d2b604df..901965ae 100644 --- a/src/obj/AParticleModifier.cpp +++ b/src/obj/AParticleModifier.cpp @@ -24,7 +24,7 @@ string AParticleModifier::asString( bool verbose ) const { A_PARTICLE_MODIFIER_STRING } -void AParticleModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AParticleModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { A_PARTICLE_MODIFIER_FIXLINKS } diff --git a/src/obj/AbhkConstraint.cpp b/src/obj/AbhkConstraint.cpp index 582cd5be..492c265a 100644 --- a/src/obj/AbhkConstraint.cpp +++ b/src/obj/AbhkConstraint.cpp @@ -24,7 +24,7 @@ string AbhkConstraint::asString( bool verbose ) const { ABHK_CONSTRAINT_STRING } -void AbhkConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AbhkConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { ABHK_CONSTRAINT_FIXLINKS } diff --git a/src/obj/AbhkRagdollConstraint.cpp b/src/obj/AbhkRagdollConstraint.cpp index f638f6df..524f4cff 100644 --- a/src/obj/AbhkRagdollConstraint.cpp +++ b/src/obj/AbhkRagdollConstraint.cpp @@ -23,7 +23,7 @@ string AbhkRagdollConstraint::asString( bool verbose ) const { ABHK_RAGDOLL_CONSTRAINT_STRING } -void AbhkRagdollConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AbhkRagdollConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { ABHK_RAGDOLL_CONSTRAINT_FIXLINKS } diff --git a/src/obj/AbhkShapeCollection.cpp b/src/obj/AbhkShapeCollection.cpp index 15861838..1f878535 100644 --- a/src/obj/AbhkShapeCollection.cpp +++ b/src/obj/AbhkShapeCollection.cpp @@ -23,7 +23,7 @@ string AbhkShapeCollection::asString( bool verbose ) const { ABHK_SHAPE_COLLECTION_STRING } -void AbhkShapeCollection::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AbhkShapeCollection::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { ABHK_SHAPE_COLLECTION_FIXLINKS } diff --git a/src/obj/AvoidNode.cpp b/src/obj/AvoidNode.cpp index f3c9f074..b04aaad9 100644 --- a/src/obj/AvoidNode.cpp +++ b/src/obj/AvoidNode.cpp @@ -23,7 +23,7 @@ string AvoidNode::asString( bool verbose ) const { AVOID_NODE_STRING } -void AvoidNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void AvoidNode::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { AVOID_NODE_FIXLINKS } diff --git a/src/obj/BSBound.cpp b/src/obj/BSBound.cpp index 6e7d48a3..90a69e71 100644 --- a/src/obj/BSBound.cpp +++ b/src/obj/BSBound.cpp @@ -23,7 +23,7 @@ string BSBound::asString( bool verbose ) const { B_S_BOUND_STRING } -void BSBound::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSBound::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { B_S_BOUND_FIXLINKS } diff --git a/src/obj/BSFurnitureMarker.cpp b/src/obj/BSFurnitureMarker.cpp index 86ec09ca..fab06225 100644 --- a/src/obj/BSFurnitureMarker.cpp +++ b/src/obj/BSFurnitureMarker.cpp @@ -24,7 +24,7 @@ string BSFurnitureMarker::asString( bool verbose ) const { B_S_FURNITURE_MARKER_STRING } -void BSFurnitureMarker::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSFurnitureMarker::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { B_S_FURNITURE_MARKER_FIXLINKS } diff --git a/src/obj/BSKeyframeController.cpp b/src/obj/BSKeyframeController.cpp index c58ab24a..322caf53 100644 --- a/src/obj/BSKeyframeController.cpp +++ b/src/obj/BSKeyframeController.cpp @@ -24,7 +24,7 @@ string BSKeyframeController::asString( bool verbose ) const { B_S_KEYFRAME_CONTROLLER_STRING } -void BSKeyframeController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSKeyframeController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { B_S_KEYFRAME_CONTROLLER_FIXLINKS } diff --git a/src/obj/BSPSysArrayEmitter.cpp b/src/obj/BSPSysArrayEmitter.cpp index 4eb28f4b..607e1400 100644 --- a/src/obj/BSPSysArrayEmitter.cpp +++ b/src/obj/BSPSysArrayEmitter.cpp @@ -23,7 +23,7 @@ string BSPSysArrayEmitter::asString( bool verbose ) const { B_S_P_SYS_ARRAY_EMITTER_STRING } -void BSPSysArrayEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSPSysArrayEmitter::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { B_S_P_SYS_ARRAY_EMITTER_FIXLINKS } diff --git a/src/obj/BSParentVelocityModifier.cpp b/src/obj/BSParentVelocityModifier.cpp index 66462f93..6632f0b5 100644 --- a/src/obj/BSParentVelocityModifier.cpp +++ b/src/obj/BSParentVelocityModifier.cpp @@ -23,7 +23,7 @@ string BSParentVelocityModifier::asString( bool verbose ) const { B_S_PARENT_VELOCITY_MODIFIER_STRING } -void BSParentVelocityModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSParentVelocityModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { B_S_PARENT_VELOCITY_MODIFIER_FIXLINKS } diff --git a/src/obj/BSXFlags.cpp b/src/obj/BSXFlags.cpp index 6c545883..a324da36 100644 --- a/src/obj/BSXFlags.cpp +++ b/src/obj/BSXFlags.cpp @@ -23,7 +23,7 @@ string BSXFlags::asString( bool verbose ) const { B_S_X_FLAGS_STRING } -void BSXFlags::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void BSXFlags::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { B_S_X_FLAGS_FIXLINKS } diff --git a/src/obj/FxButton.cpp b/src/obj/FxButton.cpp index 87c33914..101f27d3 100644 --- a/src/obj/FxButton.cpp +++ b/src/obj/FxButton.cpp @@ -23,7 +23,7 @@ string FxButton::asString( bool verbose ) const { FX_BUTTON_STRING } -void FxButton::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void FxButton::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { FX_BUTTON_FIXLINKS } diff --git a/src/obj/FxRadioButton.cpp b/src/obj/FxRadioButton.cpp index c63c7a80..40c09300 100644 --- a/src/obj/FxRadioButton.cpp +++ b/src/obj/FxRadioButton.cpp @@ -24,7 +24,7 @@ string FxRadioButton::asString( bool verbose ) const { FX_RADIO_BUTTON_STRING } -void FxRadioButton::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void FxRadioButton::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { FX_RADIO_BUTTON_FIXLINKS } diff --git a/src/obj/FxWidget.cpp b/src/obj/FxWidget.cpp index 3e229c8d..e25d7a2f 100644 --- a/src/obj/FxWidget.cpp +++ b/src/obj/FxWidget.cpp @@ -23,7 +23,7 @@ string FxWidget::asString( bool verbose ) const { FX_WIDGET_STRING } -void FxWidget::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void FxWidget::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { FX_WIDGET_FIXLINKS } diff --git a/src/obj/NiAVObject.cpp b/src/obj/NiAVObject.cpp index 658b1215..bce27d09 100644 --- a/src/obj/NiAVObject.cpp +++ b/src/obj/NiAVObject.cpp @@ -37,7 +37,7 @@ string NiAVObject::asString( bool verbose ) const { NI_A_V_OBJECT_STRING } -void NiAVObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAVObject::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_A_V_OBJECT_FIXLINKS } diff --git a/src/obj/NiAlphaController.cpp b/src/obj/NiAlphaController.cpp index 18e779f0..fa217c1c 100644 --- a/src/obj/NiAlphaController.cpp +++ b/src/obj/NiAlphaController.cpp @@ -24,7 +24,7 @@ string NiAlphaController::asString( bool verbose ) const { NI_ALPHA_CONTROLLER_STRING } -void NiAlphaController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAlphaController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_ALPHA_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiAlphaProperty.cpp b/src/obj/NiAlphaProperty.cpp index 232db5a1..8935bcb8 100644 --- a/src/obj/NiAlphaProperty.cpp +++ b/src/obj/NiAlphaProperty.cpp @@ -23,7 +23,7 @@ string NiAlphaProperty::asString( bool verbose ) const { NI_ALPHA_PROPERTY_STRING } -void NiAlphaProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAlphaProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_ALPHA_PROPERTY_FIXLINKS } diff --git a/src/obj/NiAmbientLight.cpp b/src/obj/NiAmbientLight.cpp index 2b810bd8..fb2c0c44 100644 --- a/src/obj/NiAmbientLight.cpp +++ b/src/obj/NiAmbientLight.cpp @@ -23,7 +23,7 @@ string NiAmbientLight::asString( bool verbose ) const { NI_AMBIENT_LIGHT_STRING } -void NiAmbientLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAmbientLight::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_AMBIENT_LIGHT_FIXLINKS } diff --git a/src/obj/NiAutoNormalParticles.cpp b/src/obj/NiAutoNormalParticles.cpp index 7511ff86..6249c444 100644 --- a/src/obj/NiAutoNormalParticles.cpp +++ b/src/obj/NiAutoNormalParticles.cpp @@ -23,7 +23,7 @@ string NiAutoNormalParticles::asString( bool verbose ) const { NI_AUTO_NORMAL_PARTICLES_STRING } -void NiAutoNormalParticles::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAutoNormalParticles::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_AUTO_NORMAL_PARTICLES_FIXLINKS } diff --git a/src/obj/NiAutoNormalParticlesData.cpp b/src/obj/NiAutoNormalParticlesData.cpp index b212c2a2..b0312d6c 100644 --- a/src/obj/NiAutoNormalParticlesData.cpp +++ b/src/obj/NiAutoNormalParticlesData.cpp @@ -23,7 +23,7 @@ string NiAutoNormalParticlesData::asString( bool verbose ) const { NI_AUTO_NORMAL_PARTICLES_DATA_STRING } -void NiAutoNormalParticlesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiAutoNormalParticlesData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_AUTO_NORMAL_PARTICLES_DATA_FIXLINKS } diff --git a/src/obj/NiBSAnimationNode.cpp b/src/obj/NiBSAnimationNode.cpp index bb257bf3..a2aa6b05 100644 --- a/src/obj/NiBSAnimationNode.cpp +++ b/src/obj/NiBSAnimationNode.cpp @@ -23,7 +23,7 @@ string NiBSAnimationNode::asString( bool verbose ) const { NI_B_S_ANIMATION_NODE_STRING } -void NiBSAnimationNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSAnimationNode::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_S_ANIMATION_NODE_FIXLINKS } diff --git a/src/obj/NiBSBoneLODController.cpp b/src/obj/NiBSBoneLODController.cpp index 6fd795b2..40c40070 100644 --- a/src/obj/NiBSBoneLODController.cpp +++ b/src/obj/NiBSBoneLODController.cpp @@ -23,7 +23,7 @@ string NiBSBoneLODController::asString( bool verbose ) const { NI_B_S_BONE_L_O_D_CONTROLLER_STRING } -void NiBSBoneLODController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSBoneLODController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_S_BONE_L_O_D_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiBSPArrayController.cpp b/src/obj/NiBSPArrayController.cpp index b4d003fb..af0bcd12 100644 --- a/src/obj/NiBSPArrayController.cpp +++ b/src/obj/NiBSPArrayController.cpp @@ -23,7 +23,7 @@ string NiBSPArrayController::asString( bool verbose ) const { NI_B_S_P_ARRAY_CONTROLLER_STRING } -void NiBSPArrayController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSPArrayController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_S_P_ARRAY_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiBSParticleNode.cpp b/src/obj/NiBSParticleNode.cpp index 60d4ee9a..1e47a22d 100644 --- a/src/obj/NiBSParticleNode.cpp +++ b/src/obj/NiBSParticleNode.cpp @@ -23,7 +23,7 @@ string NiBSParticleNode::asString( bool verbose ) const { NI_B_S_PARTICLE_NODE_STRING } -void NiBSParticleNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSParticleNode::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_S_PARTICLE_NODE_FIXLINKS } diff --git a/src/obj/NiBSplineBasisData.cpp b/src/obj/NiBSplineBasisData.cpp index 33e336e8..8c4c5766 100644 --- a/src/obj/NiBSplineBasisData.cpp +++ b/src/obj/NiBSplineBasisData.cpp @@ -23,7 +23,7 @@ string NiBSplineBasisData::asString( bool verbose ) const { NI_B_SPLINE_BASIS_DATA_STRING } -void NiBSplineBasisData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineBasisData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_SPLINE_BASIS_DATA_FIXLINKS } diff --git a/src/obj/NiBSplineCompFloatInterpolator.cpp b/src/obj/NiBSplineCompFloatInterpolator.cpp index a45de581..5a9d961d 100644 --- a/src/obj/NiBSplineCompFloatInterpolator.cpp +++ b/src/obj/NiBSplineCompFloatInterpolator.cpp @@ -23,7 +23,7 @@ string NiBSplineCompFloatInterpolator::asString( bool verbose ) const { NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_STRING } -void NiBSplineCompFloatInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineCompFloatInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBSplineCompPoint3Interpolator.cpp b/src/obj/NiBSplineCompPoint3Interpolator.cpp index 8ecf3bb9..c977a293 100644 --- a/src/obj/NiBSplineCompPoint3Interpolator.cpp +++ b/src/obj/NiBSplineCompPoint3Interpolator.cpp @@ -23,7 +23,7 @@ string NiBSplineCompPoint3Interpolator::asString( bool verbose ) const { NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_STRING } -void NiBSplineCompPoint3Interpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineCompPoint3Interpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBSplineCompTransformInterpolator.cpp b/src/obj/NiBSplineCompTransformInterpolator.cpp index fe9ea520..80ca8483 100644 --- a/src/obj/NiBSplineCompTransformInterpolator.cpp +++ b/src/obj/NiBSplineCompTransformInterpolator.cpp @@ -29,7 +29,7 @@ string NiBSplineCompTransformInterpolator::asString( bool verbose ) const { NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_STRING } -void NiBSplineCompTransformInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineCompTransformInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBSplineData.cpp b/src/obj/NiBSplineData.cpp index c2fe7183..5c716b16 100644 --- a/src/obj/NiBSplineData.cpp +++ b/src/obj/NiBSplineData.cpp @@ -23,7 +23,7 @@ string NiBSplineData::asString( bool verbose ) const { NI_B_SPLINE_DATA_STRING } -void NiBSplineData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_SPLINE_DATA_FIXLINKS } diff --git a/src/obj/NiBSplineInterpolator.cpp b/src/obj/NiBSplineInterpolator.cpp index d159d874..1bd37141 100644 --- a/src/obj/NiBSplineInterpolator.cpp +++ b/src/obj/NiBSplineInterpolator.cpp @@ -25,7 +25,7 @@ string NiBSplineInterpolator::asString( bool verbose ) const { NI_B_SPLINE_INTERPOLATOR_STRING } -void NiBSplineInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBSplineInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_B_SPLINE_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBillboardNode.cpp b/src/obj/NiBillboardNode.cpp index 14b82ffa..c31e2bdb 100644 --- a/src/obj/NiBillboardNode.cpp +++ b/src/obj/NiBillboardNode.cpp @@ -23,7 +23,7 @@ string NiBillboardNode::asString( bool verbose ) const { NI_BILLBOARD_NODE_STRING } -void NiBillboardNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBillboardNode::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BILLBOARD_NODE_FIXLINKS } diff --git a/src/obj/NiBinaryExtraData.cpp b/src/obj/NiBinaryExtraData.cpp index 462ca0eb..eb4e7288 100644 --- a/src/obj/NiBinaryExtraData.cpp +++ b/src/obj/NiBinaryExtraData.cpp @@ -24,7 +24,7 @@ string NiBinaryExtraData::asString( bool verbose ) const { NI_BINARY_EXTRA_DATA_STRING } -void NiBinaryExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBinaryExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BINARY_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiBlendBoolInterpolator.cpp b/src/obj/NiBlendBoolInterpolator.cpp index 2bf6e86e..967d4075 100644 --- a/src/obj/NiBlendBoolInterpolator.cpp +++ b/src/obj/NiBlendBoolInterpolator.cpp @@ -23,7 +23,7 @@ string NiBlendBoolInterpolator::asString( bool verbose ) const { NI_BLEND_BOOL_INTERPOLATOR_STRING } -void NiBlendBoolInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendBoolInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BLEND_BOOL_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBlendFloatInterpolator.cpp b/src/obj/NiBlendFloatInterpolator.cpp index 3b177c7a..322bb0f3 100644 --- a/src/obj/NiBlendFloatInterpolator.cpp +++ b/src/obj/NiBlendFloatInterpolator.cpp @@ -23,7 +23,7 @@ string NiBlendFloatInterpolator::asString( bool verbose ) const { NI_BLEND_FLOAT_INTERPOLATOR_STRING } -void NiBlendFloatInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendFloatInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BLEND_FLOAT_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBlendInterpolator.cpp b/src/obj/NiBlendInterpolator.cpp index 5f21ff2c..7f893c95 100644 --- a/src/obj/NiBlendInterpolator.cpp +++ b/src/obj/NiBlendInterpolator.cpp @@ -23,7 +23,7 @@ string NiBlendInterpolator::asString( bool verbose ) const { NI_BLEND_INTERPOLATOR_STRING } -void NiBlendInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BLEND_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBlendPoint3Interpolator.cpp b/src/obj/NiBlendPoint3Interpolator.cpp index 1b48c8fc..b975f9d1 100644 --- a/src/obj/NiBlendPoint3Interpolator.cpp +++ b/src/obj/NiBlendPoint3Interpolator.cpp @@ -23,7 +23,7 @@ string NiBlendPoint3Interpolator::asString( bool verbose ) const { NI_BLEND_POINT3_INTERPOLATOR_STRING } -void NiBlendPoint3Interpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendPoint3Interpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BLEND_POINT3_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBlendTransformInterpolator.cpp b/src/obj/NiBlendTransformInterpolator.cpp index c0ef29ac..dada4939 100644 --- a/src/obj/NiBlendTransformInterpolator.cpp +++ b/src/obj/NiBlendTransformInterpolator.cpp @@ -23,7 +23,7 @@ string NiBlendTransformInterpolator::asString( bool verbose ) const { NI_BLEND_TRANSFORM_INTERPOLATOR_STRING } -void NiBlendTransformInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBlendTransformInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BLEND_TRANSFORM_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBoneLODController.cpp b/src/obj/NiBoneLODController.cpp index 06405920..b9d6d69b 100644 --- a/src/obj/NiBoneLODController.cpp +++ b/src/obj/NiBoneLODController.cpp @@ -27,7 +27,7 @@ string NiBoneLODController::asString( bool verbose ) const { NI_BONE_L_O_D_CONTROLLER_STRING } -void NiBoneLODController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoneLODController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BONE_L_O_D_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiBoolData.cpp b/src/obj/NiBoolData.cpp index dc4160e9..b368df25 100644 --- a/src/obj/NiBoolData.cpp +++ b/src/obj/NiBoolData.cpp @@ -24,7 +24,7 @@ string NiBoolData::asString( bool verbose ) const { NI_BOOL_DATA_STRING } -void NiBoolData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoolData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BOOL_DATA_FIXLINKS } diff --git a/src/obj/NiBoolInterpolator.cpp b/src/obj/NiBoolInterpolator.cpp index ef47d79b..bf76f7f0 100644 --- a/src/obj/NiBoolInterpolator.cpp +++ b/src/obj/NiBoolInterpolator.cpp @@ -24,7 +24,7 @@ string NiBoolInterpolator::asString( bool verbose ) const { NI_BOOL_INTERPOLATOR_STRING } -void NiBoolInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoolInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BOOL_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBoolTimelineInterpolator.cpp b/src/obj/NiBoolTimelineInterpolator.cpp index 95dd6d24..f4c95e2a 100644 --- a/src/obj/NiBoolTimelineInterpolator.cpp +++ b/src/obj/NiBoolTimelineInterpolator.cpp @@ -24,7 +24,7 @@ string NiBoolTimelineInterpolator::asString( bool verbose ) const { NI_BOOL_TIMELINE_INTERPOLATOR_STRING } -void NiBoolTimelineInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBoolTimelineInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BOOL_TIMELINE_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiBooleanExtraData.cpp b/src/obj/NiBooleanExtraData.cpp index 213798d3..878447f5 100644 --- a/src/obj/NiBooleanExtraData.cpp +++ b/src/obj/NiBooleanExtraData.cpp @@ -23,7 +23,7 @@ string NiBooleanExtraData::asString( bool verbose ) const { NI_BOOLEAN_EXTRA_DATA_STRING } -void NiBooleanExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiBooleanExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_BOOLEAN_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiCamera.cpp b/src/obj/NiCamera.cpp index 3495653c..a75f33b3 100644 --- a/src/obj/NiCamera.cpp +++ b/src/obj/NiCamera.cpp @@ -24,7 +24,7 @@ string NiCamera::asString( bool verbose ) const { NI_CAMERA_STRING } -void NiCamera::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiCamera::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_CAMERA_FIXLINKS } diff --git a/src/obj/NiClod.cpp b/src/obj/NiClod.cpp index 536b1a98..4aa86783 100644 --- a/src/obj/NiClod.cpp +++ b/src/obj/NiClod.cpp @@ -23,7 +23,7 @@ string NiClod::asString( bool verbose ) const { NI_CLOD_STRING } -void NiClod::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiClod::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_CLOD_FIXLINKS } diff --git a/src/obj/NiClodData.cpp b/src/obj/NiClodData.cpp index b7af3368..4e8d22af 100644 --- a/src/obj/NiClodData.cpp +++ b/src/obj/NiClodData.cpp @@ -23,7 +23,7 @@ string NiClodData::asString( bool verbose ) const { NI_CLOD_DATA_STRING } -void NiClodData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiClodData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_CLOD_DATA_FIXLINKS } diff --git a/src/obj/NiCollisionData.cpp b/src/obj/NiCollisionData.cpp index 9f7b3f36..1abfc17a 100644 --- a/src/obj/NiCollisionData.cpp +++ b/src/obj/NiCollisionData.cpp @@ -24,7 +24,7 @@ string NiCollisionData::asString( bool verbose ) const { NI_COLLISION_DATA_STRING } -void NiCollisionData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiCollisionData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_COLLISION_DATA_FIXLINKS } diff --git a/src/obj/NiCollisionObject.cpp b/src/obj/NiCollisionObject.cpp index 7780ace7..d1e50b98 100644 --- a/src/obj/NiCollisionObject.cpp +++ b/src/obj/NiCollisionObject.cpp @@ -25,7 +25,7 @@ string NiCollisionObject::asString( bool verbose ) const { NI_COLLISION_OBJECT_STRING } -void NiCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiCollisionObject::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_COLLISION_OBJECT_FIXLINKS } diff --git a/src/obj/NiColorData.cpp b/src/obj/NiColorData.cpp index 6f69fa24..962a55df 100644 --- a/src/obj/NiColorData.cpp +++ b/src/obj/NiColorData.cpp @@ -24,7 +24,7 @@ string NiColorData::asString( bool verbose ) const { NI_COLOR_DATA_STRING } -void NiColorData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiColorData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_COLOR_DATA_FIXLINKS } diff --git a/src/obj/NiColorExtraData.cpp b/src/obj/NiColorExtraData.cpp index 6c0604f9..39c4f358 100644 --- a/src/obj/NiColorExtraData.cpp +++ b/src/obj/NiColorExtraData.cpp @@ -23,7 +23,7 @@ string NiColorExtraData::asString( bool verbose ) const { NI_COLOR_EXTRA_DATA_STRING } -void NiColorExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiColorExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_COLOR_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiControllerManager.cpp b/src/obj/NiControllerManager.cpp index 8cc85f49..dbd40859 100644 --- a/src/obj/NiControllerManager.cpp +++ b/src/obj/NiControllerManager.cpp @@ -26,7 +26,7 @@ string NiControllerManager::asString( bool verbose ) const { NI_CONTROLLER_MANAGER_STRING } -void NiControllerManager::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiControllerManager::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_CONTROLLER_MANAGER_FIXLINKS } diff --git a/src/obj/NiControllerSequence.cpp b/src/obj/NiControllerSequence.cpp index e0d68c90..125a7196 100644 --- a/src/obj/NiControllerSequence.cpp +++ b/src/obj/NiControllerSequence.cpp @@ -35,7 +35,7 @@ string NiControllerSequence::asString( bool verbose ) const { NI_CONTROLLER_SEQUENCE_STRING } -void NiControllerSequence::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiControllerSequence::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_CONTROLLER_SEQUENCE_FIXLINKS } diff --git a/src/obj/NiDefaultAVObjectPalette.cpp b/src/obj/NiDefaultAVObjectPalette.cpp index bfbf5b65..c9851d7d 100644 --- a/src/obj/NiDefaultAVObjectPalette.cpp +++ b/src/obj/NiDefaultAVObjectPalette.cpp @@ -25,7 +25,7 @@ string NiDefaultAVObjectPalette::asString( bool verbose ) const { NI_DEFAULT_A_V_OBJECT_PALETTE_STRING } -void NiDefaultAVObjectPalette::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDefaultAVObjectPalette::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_DEFAULT_A_V_OBJECT_PALETTE_FIXLINKS } diff --git a/src/obj/NiDirectionalLight.cpp b/src/obj/NiDirectionalLight.cpp index a26e8adb..e24e479c 100644 --- a/src/obj/NiDirectionalLight.cpp +++ b/src/obj/NiDirectionalLight.cpp @@ -23,7 +23,7 @@ string NiDirectionalLight::asString( bool verbose ) const { NI_DIRECTIONAL_LIGHT_STRING } -void NiDirectionalLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDirectionalLight::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_DIRECTIONAL_LIGHT_FIXLINKS } diff --git a/src/obj/NiDitherProperty.cpp b/src/obj/NiDitherProperty.cpp index c0f868f4..7d0456f4 100644 --- a/src/obj/NiDitherProperty.cpp +++ b/src/obj/NiDitherProperty.cpp @@ -23,7 +23,7 @@ string NiDitherProperty::asString( bool verbose ) const { NI_DITHER_PROPERTY_STRING } -void NiDitherProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDitherProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_DITHER_PROPERTY_FIXLINKS } diff --git a/src/obj/NiDynamicEffect.cpp b/src/obj/NiDynamicEffect.cpp index 945237ed..a8666134 100644 --- a/src/obj/NiDynamicEffect.cpp +++ b/src/obj/NiDynamicEffect.cpp @@ -24,7 +24,7 @@ string NiDynamicEffect::asString( bool verbose ) const { NI_DYNAMIC_EFFECT_STRING } -void NiDynamicEffect::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiDynamicEffect::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_DYNAMIC_EFFECT_FIXLINKS } diff --git a/src/obj/NiExtraData.cpp b/src/obj/NiExtraData.cpp index 73c55552..77d73aff 100644 --- a/src/obj/NiExtraData.cpp +++ b/src/obj/NiExtraData.cpp @@ -23,7 +23,7 @@ string NiExtraData::asString( bool verbose ) const { NI_EXTRA_DATA_STRING } -void NiExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiFlipController.cpp b/src/obj/NiFlipController.cpp index ae9711f5..abe2b0b1 100644 --- a/src/obj/NiFlipController.cpp +++ b/src/obj/NiFlipController.cpp @@ -24,7 +24,7 @@ string NiFlipController::asString( bool verbose ) const { NI_FLIP_CONTROLLER_STRING } -void NiFlipController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFlipController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_FLIP_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiFloatData.cpp b/src/obj/NiFloatData.cpp index 8dc8d688..11f3ce6c 100644 --- a/src/obj/NiFloatData.cpp +++ b/src/obj/NiFloatData.cpp @@ -24,7 +24,7 @@ string NiFloatData::asString( bool verbose ) const { NI_FLOAT_DATA_STRING } -void NiFloatData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_FLOAT_DATA_FIXLINKS } diff --git a/src/obj/NiFloatExtraData.cpp b/src/obj/NiFloatExtraData.cpp index b11eff52..485b87c3 100644 --- a/src/obj/NiFloatExtraData.cpp +++ b/src/obj/NiFloatExtraData.cpp @@ -23,7 +23,7 @@ string NiFloatExtraData::asString( bool verbose ) const { NI_FLOAT_EXTRA_DATA_STRING } -void NiFloatExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_FLOAT_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiFloatExtraDataController.cpp b/src/obj/NiFloatExtraDataController.cpp index 4b4fd9b9..dca04606 100644 --- a/src/obj/NiFloatExtraDataController.cpp +++ b/src/obj/NiFloatExtraDataController.cpp @@ -24,7 +24,7 @@ string NiFloatExtraDataController::asString( bool verbose ) const { NI_FLOAT_EXTRA_DATA_CONTROLLER_STRING } -void NiFloatExtraDataController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatExtraDataController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_FLOAT_EXTRA_DATA_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiFloatInterpolator.cpp b/src/obj/NiFloatInterpolator.cpp index 9ea6f2ef..b5c62019 100644 --- a/src/obj/NiFloatInterpolator.cpp +++ b/src/obj/NiFloatInterpolator.cpp @@ -24,7 +24,7 @@ string NiFloatInterpolator::asString( bool verbose ) const { NI_FLOAT_INTERPOLATOR_STRING } -void NiFloatInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_FLOAT_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiFloatsExtraData.cpp b/src/obj/NiFloatsExtraData.cpp index bb673bf8..17b26f6f 100644 --- a/src/obj/NiFloatsExtraData.cpp +++ b/src/obj/NiFloatsExtraData.cpp @@ -23,7 +23,7 @@ string NiFloatsExtraData::asString( bool verbose ) const { NI_FLOATS_EXTRA_DATA_STRING } -void NiFloatsExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFloatsExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_FLOATS_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiFogProperty.cpp b/src/obj/NiFogProperty.cpp index f89e4006..a79f6583 100644 --- a/src/obj/NiFogProperty.cpp +++ b/src/obj/NiFogProperty.cpp @@ -23,7 +23,7 @@ string NiFogProperty::asString( bool verbose ) const { NI_FOG_PROPERTY_STRING } -void NiFogProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiFogProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_FOG_PROPERTY_FIXLINKS } diff --git a/src/obj/NiGeomMorpherController.cpp b/src/obj/NiGeomMorpherController.cpp index 41ef1216..dff5aa98 100644 --- a/src/obj/NiGeomMorpherController.cpp +++ b/src/obj/NiGeomMorpherController.cpp @@ -25,7 +25,7 @@ string NiGeomMorpherController::asString( bool verbose ) const { NI_GEOM_MORPHER_CONTROLLER_STRING } -void NiGeomMorpherController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiGeomMorpherController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_GEOM_MORPHER_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiGravity.cpp b/src/obj/NiGravity.cpp index ee33a55e..c805a309 100644 --- a/src/obj/NiGravity.cpp +++ b/src/obj/NiGravity.cpp @@ -23,7 +23,7 @@ string NiGravity::asString( bool verbose ) const { NI_GRAVITY_STRING } -void NiGravity::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiGravity::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_GRAVITY_FIXLINKS } diff --git a/src/obj/NiIntegerExtraData.cpp b/src/obj/NiIntegerExtraData.cpp index f0bd28b8..cf7ec887 100644 --- a/src/obj/NiIntegerExtraData.cpp +++ b/src/obj/NiIntegerExtraData.cpp @@ -23,7 +23,7 @@ string NiIntegerExtraData::asString( bool verbose ) const { NI_INTEGER_EXTRA_DATA_STRING } -void NiIntegerExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiIntegerExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_INTEGER_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiIntegersExtraData.cpp b/src/obj/NiIntegersExtraData.cpp index 66672497..56bb7e2d 100644 --- a/src/obj/NiIntegersExtraData.cpp +++ b/src/obj/NiIntegersExtraData.cpp @@ -23,7 +23,7 @@ string NiIntegersExtraData::asString( bool verbose ) const { NI_INTEGERS_EXTRA_DATA_STRING } -void NiIntegersExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiIntegersExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_INTEGERS_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiInterpolator.cpp b/src/obj/NiInterpolator.cpp index 4d1b78a4..53fdd111 100644 --- a/src/obj/NiInterpolator.cpp +++ b/src/obj/NiInterpolator.cpp @@ -23,7 +23,7 @@ string NiInterpolator::asString( bool verbose ) const { NI_INTERPOLATOR_STRING } -void NiInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiKeyframeController.cpp b/src/obj/NiKeyframeController.cpp index 46d01d4a..6f015f59 100644 --- a/src/obj/NiKeyframeController.cpp +++ b/src/obj/NiKeyframeController.cpp @@ -24,7 +24,7 @@ string NiKeyframeController::asString( bool verbose ) const { NI_KEYFRAME_CONTROLLER_STRING } -void NiKeyframeController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiKeyframeController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_KEYFRAME_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiKeyframeData.cpp b/src/obj/NiKeyframeData.cpp index 2dac08ca..7a82970b 100644 --- a/src/obj/NiKeyframeData.cpp +++ b/src/obj/NiKeyframeData.cpp @@ -24,7 +24,7 @@ string NiKeyframeData::asString( bool verbose ) const { NI_KEYFRAME_DATA_STRING } -void NiKeyframeData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiKeyframeData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_KEYFRAME_DATA_FIXLINKS } diff --git a/src/obj/NiLODData.cpp b/src/obj/NiLODData.cpp index 5029d088..881e01ab 100644 --- a/src/obj/NiLODData.cpp +++ b/src/obj/NiLODData.cpp @@ -23,7 +23,7 @@ string NiLODData::asString( bool verbose ) const { NI_L_O_D_DATA_STRING } -void NiLODData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLODData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_L_O_D_DATA_FIXLINKS } diff --git a/src/obj/NiLODNode.cpp b/src/obj/NiLODNode.cpp index f339e846..d90b4fae 100644 --- a/src/obj/NiLODNode.cpp +++ b/src/obj/NiLODNode.cpp @@ -25,7 +25,7 @@ string NiLODNode::asString( bool verbose ) const { NI_L_O_D_NODE_STRING } -void NiLODNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLODNode::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_L_O_D_NODE_FIXLINKS } diff --git a/src/obj/NiLight.cpp b/src/obj/NiLight.cpp index ccc1dcc8..c8aa701f 100644 --- a/src/obj/NiLight.cpp +++ b/src/obj/NiLight.cpp @@ -23,7 +23,7 @@ string NiLight::asString( bool verbose ) const { NI_LIGHT_STRING } -void NiLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLight::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_LIGHT_FIXLINKS } diff --git a/src/obj/NiLightColorController.cpp b/src/obj/NiLightColorController.cpp index 80015abe..9920cb3f 100644 --- a/src/obj/NiLightColorController.cpp +++ b/src/obj/NiLightColorController.cpp @@ -25,7 +25,7 @@ string NiLightColorController::asString( bool verbose ) const { NI_LIGHT_COLOR_CONTROLLER_STRING } -void NiLightColorController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLightColorController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_LIGHT_COLOR_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiLightDimmerController.cpp b/src/obj/NiLightDimmerController.cpp index 2d86c621..8b6e87bc 100644 --- a/src/obj/NiLightDimmerController.cpp +++ b/src/obj/NiLightDimmerController.cpp @@ -24,7 +24,7 @@ string NiLightDimmerController::asString( bool verbose ) const { NI_LIGHT_DIMMER_CONTROLLER_STRING } -void NiLightDimmerController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLightDimmerController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_LIGHT_DIMMER_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiLookAtController.cpp b/src/obj/NiLookAtController.cpp index 056ac84f..fcbd4861 100644 --- a/src/obj/NiLookAtController.cpp +++ b/src/obj/NiLookAtController.cpp @@ -24,7 +24,7 @@ string NiLookAtController::asString( bool verbose ) const { NI_LOOK_AT_CONTROLLER_STRING } -void NiLookAtController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLookAtController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_LOOK_AT_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiLookAtInterpolator.cpp b/src/obj/NiLookAtInterpolator.cpp index 4735a7f7..dbcc8834 100644 --- a/src/obj/NiLookAtInterpolator.cpp +++ b/src/obj/NiLookAtInterpolator.cpp @@ -26,7 +26,7 @@ string NiLookAtInterpolator::asString( bool verbose ) const { NI_LOOK_AT_INTERPOLATOR_STRING } -void NiLookAtInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiLookAtInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_LOOK_AT_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiMaterialColorController.cpp b/src/obj/NiMaterialColorController.cpp index 868be206..34717cea 100644 --- a/src/obj/NiMaterialColorController.cpp +++ b/src/obj/NiMaterialColorController.cpp @@ -24,7 +24,7 @@ string NiMaterialColorController::asString( bool verbose ) const { NI_MATERIAL_COLOR_CONTROLLER_STRING } -void NiMaterialColorController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMaterialColorController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_MATERIAL_COLOR_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiMaterialProperty.cpp b/src/obj/NiMaterialProperty.cpp index 0c036848..08e16666 100644 --- a/src/obj/NiMaterialProperty.cpp +++ b/src/obj/NiMaterialProperty.cpp @@ -23,7 +23,7 @@ string NiMaterialProperty::asString( bool verbose ) const { NI_MATERIAL_PROPERTY_STRING } -void NiMaterialProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMaterialProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_MATERIAL_PROPERTY_FIXLINKS } diff --git a/src/obj/NiMeshPSysData.cpp b/src/obj/NiMeshPSysData.cpp index f28a42c1..4dfeed7a 100644 --- a/src/obj/NiMeshPSysData.cpp +++ b/src/obj/NiMeshPSysData.cpp @@ -25,7 +25,7 @@ string NiMeshPSysData::asString( bool verbose ) const { NI_MESH_P_SYS_DATA_STRING } -void NiMeshPSysData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMeshPSysData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_MESH_P_SYS_DATA_FIXLINKS } diff --git a/src/obj/NiMeshParticleSystem.cpp b/src/obj/NiMeshParticleSystem.cpp index 0126f8b6..170abb4a 100644 --- a/src/obj/NiMeshParticleSystem.cpp +++ b/src/obj/NiMeshParticleSystem.cpp @@ -23,7 +23,7 @@ string NiMeshParticleSystem::asString( bool verbose ) const { NI_MESH_PARTICLE_SYSTEM_STRING } -void NiMeshParticleSystem::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMeshParticleSystem::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_MESH_PARTICLE_SYSTEM_FIXLINKS } diff --git a/src/obj/NiMorphData.cpp b/src/obj/NiMorphData.cpp index e8dedfc2..b9c7bf63 100644 --- a/src/obj/NiMorphData.cpp +++ b/src/obj/NiMorphData.cpp @@ -24,7 +24,7 @@ string NiMorphData::asString( bool verbose ) const { NI_MORPH_DATA_STRING } -void NiMorphData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMorphData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_MORPH_DATA_FIXLINKS } diff --git a/src/obj/NiMultiTargetTransformController.cpp b/src/obj/NiMultiTargetTransformController.cpp index bb27778e..55c48003 100644 --- a/src/obj/NiMultiTargetTransformController.cpp +++ b/src/obj/NiMultiTargetTransformController.cpp @@ -25,7 +25,7 @@ string NiMultiTargetTransformController::asString( bool verbose ) const { NI_MULTI_TARGET_TRANSFORM_CONTROLLER_STRING } -void NiMultiTargetTransformController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiMultiTargetTransformController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_MULTI_TARGET_TRANSFORM_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiNode.cpp b/src/obj/NiNode.cpp index 09efdbcc..642f59ab 100644 --- a/src/obj/NiNode.cpp +++ b/src/obj/NiNode.cpp @@ -39,7 +39,7 @@ string NiNode::asString( bool verbose ) const { NI_NODE_STRING } -void NiNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiNode::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_NODE_FIXLINKS //Connect children to their parents and remove any NULL ones for ( vector< NiAVObjectRef >::iterator it = children.begin(); it != children.end(); ) { diff --git a/src/obj/NiObjectNET.cpp b/src/obj/NiObjectNET.cpp index dc039c02..39b384af 100644 --- a/src/obj/NiObjectNET.cpp +++ b/src/obj/NiObjectNET.cpp @@ -29,7 +29,7 @@ string NiObjectNET::asString( bool verbose ) const { NI_OBJECT_N_E_T_STRING } -void NiObjectNET::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiObjectNET::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_OBJECT_N_E_T_FIXLINKS } diff --git a/src/obj/NiPSysAgeDeathModifier.cpp b/src/obj/NiPSysAgeDeathModifier.cpp index cd011126..217f7141 100644 --- a/src/obj/NiPSysAgeDeathModifier.cpp +++ b/src/obj/NiPSysAgeDeathModifier.cpp @@ -24,7 +24,7 @@ string NiPSysAgeDeathModifier::asString( bool verbose ) const { NI_P_SYS_AGE_DEATH_MODIFIER_STRING } -void NiPSysAgeDeathModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysAgeDeathModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_AGE_DEATH_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysBombModifier.cpp b/src/obj/NiPSysBombModifier.cpp index 9eefaa97..0d1efc25 100644 --- a/src/obj/NiPSysBombModifier.cpp +++ b/src/obj/NiPSysBombModifier.cpp @@ -24,7 +24,7 @@ string NiPSysBombModifier::asString( bool verbose ) const { NI_P_SYS_BOMB_MODIFIER_STRING } -void NiPSysBombModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysBombModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_BOMB_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysBoundUpdateModifier.cpp b/src/obj/NiPSysBoundUpdateModifier.cpp index 9a6a64a0..bf8244dc 100644 --- a/src/obj/NiPSysBoundUpdateModifier.cpp +++ b/src/obj/NiPSysBoundUpdateModifier.cpp @@ -23,7 +23,7 @@ string NiPSysBoundUpdateModifier::asString( bool verbose ) const { NI_P_SYS_BOUND_UPDATE_MODIFIER_STRING } -void NiPSysBoundUpdateModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysBoundUpdateModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_BOUND_UPDATE_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysBoxEmitter.cpp b/src/obj/NiPSysBoxEmitter.cpp index 5e73d22c..888a2ec9 100644 --- a/src/obj/NiPSysBoxEmitter.cpp +++ b/src/obj/NiPSysBoxEmitter.cpp @@ -23,7 +23,7 @@ string NiPSysBoxEmitter::asString( bool verbose ) const { NI_P_SYS_BOX_EMITTER_STRING } -void NiPSysBoxEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysBoxEmitter::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_BOX_EMITTER_FIXLINKS } diff --git a/src/obj/NiPSysColliderManager.cpp b/src/obj/NiPSysColliderManager.cpp index d67b5fa4..4f9646a7 100644 --- a/src/obj/NiPSysColliderManager.cpp +++ b/src/obj/NiPSysColliderManager.cpp @@ -24,7 +24,7 @@ string NiPSysColliderManager::asString( bool verbose ) const { NI_P_SYS_COLLIDER_MANAGER_STRING } -void NiPSysColliderManager::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysColliderManager::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_COLLIDER_MANAGER_FIXLINKS } diff --git a/src/obj/NiPSysColorModifier.cpp b/src/obj/NiPSysColorModifier.cpp index 74947f32..6b67ce52 100644 --- a/src/obj/NiPSysColorModifier.cpp +++ b/src/obj/NiPSysColorModifier.cpp @@ -24,7 +24,7 @@ string NiPSysColorModifier::asString( bool verbose ) const { NI_P_SYS_COLOR_MODIFIER_STRING } -void NiPSysColorModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysColorModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_COLOR_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysCylinderEmitter.cpp b/src/obj/NiPSysCylinderEmitter.cpp index aefe22e7..0859ee35 100644 --- a/src/obj/NiPSysCylinderEmitter.cpp +++ b/src/obj/NiPSysCylinderEmitter.cpp @@ -23,7 +23,7 @@ string NiPSysCylinderEmitter::asString( bool verbose ) const { NI_P_SYS_CYLINDER_EMITTER_STRING } -void NiPSysCylinderEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysCylinderEmitter::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_CYLINDER_EMITTER_FIXLINKS } diff --git a/src/obj/NiPSysData.cpp b/src/obj/NiPSysData.cpp index 2b864c6f..b64ee336 100644 --- a/src/obj/NiPSysData.cpp +++ b/src/obj/NiPSysData.cpp @@ -23,7 +23,7 @@ string NiPSysData::asString( bool verbose ) const { NI_P_SYS_DATA_STRING } -void NiPSysData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_DATA_FIXLINKS } diff --git a/src/obj/NiPSysDragModifier.cpp b/src/obj/NiPSysDragModifier.cpp index 1a79567b..fa530a05 100644 --- a/src/obj/NiPSysDragModifier.cpp +++ b/src/obj/NiPSysDragModifier.cpp @@ -24,7 +24,7 @@ string NiPSysDragModifier::asString( bool verbose ) const { NI_P_SYS_DRAG_MODIFIER_STRING } -void NiPSysDragModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysDragModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_DRAG_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysEmitter.cpp b/src/obj/NiPSysEmitter.cpp index fe9c9c11..28a92a8a 100644 --- a/src/obj/NiPSysEmitter.cpp +++ b/src/obj/NiPSysEmitter.cpp @@ -23,7 +23,7 @@ string NiPSysEmitter::asString( bool verbose ) const { NI_P_SYS_EMITTER_STRING } -void NiPSysEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitter::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_FIXLINKS } diff --git a/src/obj/NiPSysEmitterCtlr.cpp b/src/obj/NiPSysEmitterCtlr.cpp index 04284207..e9ef2494 100644 --- a/src/obj/NiPSysEmitterCtlr.cpp +++ b/src/obj/NiPSysEmitterCtlr.cpp @@ -25,7 +25,7 @@ string NiPSysEmitterCtlr::asString( bool verbose ) const { NI_P_SYS_EMITTER_CTLR_STRING } -void NiPSysEmitterCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysEmitterCtlrData.cpp b/src/obj/NiPSysEmitterCtlrData.cpp index a41c24b0..5b4b9f12 100644 --- a/src/obj/NiPSysEmitterCtlrData.cpp +++ b/src/obj/NiPSysEmitterCtlrData.cpp @@ -24,7 +24,7 @@ string NiPSysEmitterCtlrData::asString( bool verbose ) const { NI_P_SYS_EMITTER_CTLR_DATA_STRING } -void NiPSysEmitterCtlrData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterCtlrData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_CTLR_DATA_FIXLINKS } diff --git a/src/obj/NiPSysEmitterDeclinationCtlr.cpp b/src/obj/NiPSysEmitterDeclinationCtlr.cpp index ac8eeaa5..8e39b94a 100644 --- a/src/obj/NiPSysEmitterDeclinationCtlr.cpp +++ b/src/obj/NiPSysEmitterDeclinationCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysEmitterDeclinationCtlr::asString( bool verbose ) const { NI_P_SYS_EMITTER_DECLINATION_CTLR_STRING } -void NiPSysEmitterDeclinationCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterDeclinationCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_DECLINATION_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp b/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp index 6b9827ad..34c99eae 100644 --- a/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp +++ b/src/obj/NiPSysEmitterDeclinationVarCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysEmitterDeclinationVarCtlr::asString( bool verbose ) const { NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_STRING } -void NiPSysEmitterDeclinationVarCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterDeclinationVarCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp b/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp index 2bd816b4..3f42bc74 100644 --- a/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp +++ b/src/obj/NiPSysEmitterInitialRadiusCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysEmitterInitialRadiusCtlr::asString( bool verbose ) const { NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_STRING } -void NiPSysEmitterInitialRadiusCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterInitialRadiusCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysEmitterLifeSpanCtlr.cpp b/src/obj/NiPSysEmitterLifeSpanCtlr.cpp index be994f56..81254106 100644 --- a/src/obj/NiPSysEmitterLifeSpanCtlr.cpp +++ b/src/obj/NiPSysEmitterLifeSpanCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysEmitterLifeSpanCtlr::asString( bool verbose ) const { NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_STRING } -void NiPSysEmitterLifeSpanCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterLifeSpanCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysEmitterSpeedCtlr.cpp b/src/obj/NiPSysEmitterSpeedCtlr.cpp index e1d26bff..c31ce1ed 100644 --- a/src/obj/NiPSysEmitterSpeedCtlr.cpp +++ b/src/obj/NiPSysEmitterSpeedCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysEmitterSpeedCtlr::asString( bool verbose ) const { NI_P_SYS_EMITTER_SPEED_CTLR_STRING } -void NiPSysEmitterSpeedCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysEmitterSpeedCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_EMITTER_SPEED_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysGravityModifier.cpp b/src/obj/NiPSysGravityModifier.cpp index 7635ecb9..64387a9f 100644 --- a/src/obj/NiPSysGravityModifier.cpp +++ b/src/obj/NiPSysGravityModifier.cpp @@ -24,7 +24,7 @@ string NiPSysGravityModifier::asString( bool verbose ) const { NI_P_SYS_GRAVITY_MODIFIER_STRING } -void NiPSysGravityModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysGravityModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_GRAVITY_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysGravityStrengthCtlr.cpp b/src/obj/NiPSysGravityStrengthCtlr.cpp index 511d9c3f..ece29bda 100644 --- a/src/obj/NiPSysGravityStrengthCtlr.cpp +++ b/src/obj/NiPSysGravityStrengthCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysGravityStrengthCtlr::asString( bool verbose ) const { NI_P_SYS_GRAVITY_STRENGTH_CTLR_STRING } -void NiPSysGravityStrengthCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysGravityStrengthCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_GRAVITY_STRENGTH_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysGrowFadeModifier.cpp b/src/obj/NiPSysGrowFadeModifier.cpp index e621f94b..31d2f486 100644 --- a/src/obj/NiPSysGrowFadeModifier.cpp +++ b/src/obj/NiPSysGrowFadeModifier.cpp @@ -23,7 +23,7 @@ string NiPSysGrowFadeModifier::asString( bool verbose ) const { NI_P_SYS_GROW_FADE_MODIFIER_STRING } -void NiPSysGrowFadeModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysGrowFadeModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_GROW_FADE_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysMeshEmitter.cpp b/src/obj/NiPSysMeshEmitter.cpp index b56f7908..186ba55f 100644 --- a/src/obj/NiPSysMeshEmitter.cpp +++ b/src/obj/NiPSysMeshEmitter.cpp @@ -24,7 +24,7 @@ string NiPSysMeshEmitter::asString( bool verbose ) const { NI_P_SYS_MESH_EMITTER_STRING } -void NiPSysMeshEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysMeshEmitter::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_MESH_EMITTER_FIXLINKS } diff --git a/src/obj/NiPSysMeshUpdateModifier.cpp b/src/obj/NiPSysMeshUpdateModifier.cpp index c5ed58cb..51a0d563 100644 --- a/src/obj/NiPSysMeshUpdateModifier.cpp +++ b/src/obj/NiPSysMeshUpdateModifier.cpp @@ -24,7 +24,7 @@ string NiPSysMeshUpdateModifier::asString( bool verbose ) const { NI_P_SYS_MESH_UPDATE_MODIFIER_STRING } -void NiPSysMeshUpdateModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysMeshUpdateModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_MESH_UPDATE_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysModifier.cpp b/src/obj/NiPSysModifier.cpp index 597d69e0..bf7ca912 100644 --- a/src/obj/NiPSysModifier.cpp +++ b/src/obj/NiPSysModifier.cpp @@ -24,7 +24,7 @@ string NiPSysModifier::asString( bool verbose ) const { NI_P_SYS_MODIFIER_STRING } -void NiPSysModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysModifierActiveCtlr.cpp b/src/obj/NiPSysModifierActiveCtlr.cpp index adda1c70..09ae38dc 100644 --- a/src/obj/NiPSysModifierActiveCtlr.cpp +++ b/src/obj/NiPSysModifierActiveCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysModifierActiveCtlr::asString( bool verbose ) const { NI_P_SYS_MODIFIER_ACTIVE_CTLR_STRING } -void NiPSysModifierActiveCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysModifierActiveCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_MODIFIER_ACTIVE_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysPlanarCollider.cpp b/src/obj/NiPSysPlanarCollider.cpp index 8ed804b5..a16a2b43 100644 --- a/src/obj/NiPSysPlanarCollider.cpp +++ b/src/obj/NiPSysPlanarCollider.cpp @@ -26,7 +26,7 @@ string NiPSysPlanarCollider::asString( bool verbose ) const { NI_P_SYS_PLANAR_COLLIDER_STRING } -void NiPSysPlanarCollider::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysPlanarCollider::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_PLANAR_COLLIDER_FIXLINKS } diff --git a/src/obj/NiPSysPositionModifier.cpp b/src/obj/NiPSysPositionModifier.cpp index a6d1d32b..601bae36 100644 --- a/src/obj/NiPSysPositionModifier.cpp +++ b/src/obj/NiPSysPositionModifier.cpp @@ -23,7 +23,7 @@ string NiPSysPositionModifier::asString( bool verbose ) const { NI_P_SYS_POSITION_MODIFIER_STRING } -void NiPSysPositionModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysPositionModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_POSITION_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysResetOnLoopCtlr.cpp b/src/obj/NiPSysResetOnLoopCtlr.cpp index 79c8b4a2..952f01c2 100644 --- a/src/obj/NiPSysResetOnLoopCtlr.cpp +++ b/src/obj/NiPSysResetOnLoopCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysResetOnLoopCtlr::asString( bool verbose ) const { NI_P_SYS_RESET_ON_LOOP_CTLR_STRING } -void NiPSysResetOnLoopCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysResetOnLoopCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_RESET_ON_LOOP_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysRotationModifier.cpp b/src/obj/NiPSysRotationModifier.cpp index 3803caf0..bce236e3 100644 --- a/src/obj/NiPSysRotationModifier.cpp +++ b/src/obj/NiPSysRotationModifier.cpp @@ -23,7 +23,7 @@ string NiPSysRotationModifier::asString( bool verbose ) const { NI_P_SYS_ROTATION_MODIFIER_STRING } -void NiPSysRotationModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysRotationModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_ROTATION_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysSpawnModifier.cpp b/src/obj/NiPSysSpawnModifier.cpp index 983c1915..04b5c519 100644 --- a/src/obj/NiPSysSpawnModifier.cpp +++ b/src/obj/NiPSysSpawnModifier.cpp @@ -23,7 +23,7 @@ string NiPSysSpawnModifier::asString( bool verbose ) const { NI_P_SYS_SPAWN_MODIFIER_STRING } -void NiPSysSpawnModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysSpawnModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_SPAWN_MODIFIER_FIXLINKS } diff --git a/src/obj/NiPSysSphereEmitter.cpp b/src/obj/NiPSysSphereEmitter.cpp index 7382f845..b5cf33d4 100644 --- a/src/obj/NiPSysSphereEmitter.cpp +++ b/src/obj/NiPSysSphereEmitter.cpp @@ -23,7 +23,7 @@ string NiPSysSphereEmitter::asString( bool verbose ) const { NI_P_SYS_SPHERE_EMITTER_STRING } -void NiPSysSphereEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysSphereEmitter::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_SPHERE_EMITTER_FIXLINKS } diff --git a/src/obj/NiPSysUpdateCtlr.cpp b/src/obj/NiPSysUpdateCtlr.cpp index 22db770f..1a1e9f5d 100644 --- a/src/obj/NiPSysUpdateCtlr.cpp +++ b/src/obj/NiPSysUpdateCtlr.cpp @@ -23,7 +23,7 @@ string NiPSysUpdateCtlr::asString( bool verbose ) const { NI_P_SYS_UPDATE_CTLR_STRING } -void NiPSysUpdateCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysUpdateCtlr::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_UPDATE_CTLR_FIXLINKS } diff --git a/src/obj/NiPSysVolumeEmitter.cpp b/src/obj/NiPSysVolumeEmitter.cpp index 4dd44345..86dc1891 100644 --- a/src/obj/NiPSysVolumeEmitter.cpp +++ b/src/obj/NiPSysVolumeEmitter.cpp @@ -24,7 +24,7 @@ string NiPSysVolumeEmitter::asString( bool verbose ) const { NI_P_SYS_VOLUME_EMITTER_STRING } -void NiPSysVolumeEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPSysVolumeEmitter::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_P_SYS_VOLUME_EMITTER_FIXLINKS } diff --git a/src/obj/NiPalette.cpp b/src/obj/NiPalette.cpp index 281d0730..cc891588 100644 --- a/src/obj/NiPalette.cpp +++ b/src/obj/NiPalette.cpp @@ -23,7 +23,7 @@ string NiPalette::asString( bool verbose ) const { NI_PALETTE_STRING } -void NiPalette::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPalette::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PALETTE_FIXLINKS } diff --git a/src/obj/NiParticleBomb.cpp b/src/obj/NiParticleBomb.cpp index 7d478d15..144488c6 100644 --- a/src/obj/NiParticleBomb.cpp +++ b/src/obj/NiParticleBomb.cpp @@ -23,7 +23,7 @@ string NiParticleBomb::asString( bool verbose ) const { NI_PARTICLE_BOMB_STRING } -void NiParticleBomb::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleBomb::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_BOMB_FIXLINKS } diff --git a/src/obj/NiParticleColorModifier.cpp b/src/obj/NiParticleColorModifier.cpp index 8e4ae0ea..7872c85c 100644 --- a/src/obj/NiParticleColorModifier.cpp +++ b/src/obj/NiParticleColorModifier.cpp @@ -24,7 +24,7 @@ string NiParticleColorModifier::asString( bool verbose ) const { NI_PARTICLE_COLOR_MODIFIER_STRING } -void NiParticleColorModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleColorModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_COLOR_MODIFIER_FIXLINKS } diff --git a/src/obj/NiParticleGrowFade.cpp b/src/obj/NiParticleGrowFade.cpp index a9f2a5fc..08cdfa7e 100644 --- a/src/obj/NiParticleGrowFade.cpp +++ b/src/obj/NiParticleGrowFade.cpp @@ -23,7 +23,7 @@ string NiParticleGrowFade::asString( bool verbose ) const { NI_PARTICLE_GROW_FADE_STRING } -void NiParticleGrowFade::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleGrowFade::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_GROW_FADE_FIXLINKS } diff --git a/src/obj/NiParticleMeshModifier.cpp b/src/obj/NiParticleMeshModifier.cpp index 11648910..b0a85bd3 100644 --- a/src/obj/NiParticleMeshModifier.cpp +++ b/src/obj/NiParticleMeshModifier.cpp @@ -24,7 +24,7 @@ string NiParticleMeshModifier::asString( bool verbose ) const { NI_PARTICLE_MESH_MODIFIER_STRING } -void NiParticleMeshModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleMeshModifier::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_MESH_MODIFIER_FIXLINKS } diff --git a/src/obj/NiParticleMeshes.cpp b/src/obj/NiParticleMeshes.cpp index ffac7443..f1676db8 100644 --- a/src/obj/NiParticleMeshes.cpp +++ b/src/obj/NiParticleMeshes.cpp @@ -23,7 +23,7 @@ string NiParticleMeshes::asString( bool verbose ) const { NI_PARTICLE_MESHES_STRING } -void NiParticleMeshes::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleMeshes::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_MESHES_FIXLINKS } diff --git a/src/obj/NiParticleMeshesData.cpp b/src/obj/NiParticleMeshesData.cpp index a2c45fb3..62b1cdcf 100644 --- a/src/obj/NiParticleMeshesData.cpp +++ b/src/obj/NiParticleMeshesData.cpp @@ -24,7 +24,7 @@ string NiParticleMeshesData::asString( bool verbose ) const { NI_PARTICLE_MESHES_DATA_STRING } -void NiParticleMeshesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleMeshesData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_MESHES_DATA_FIXLINKS } diff --git a/src/obj/NiParticleRotation.cpp b/src/obj/NiParticleRotation.cpp index 2bc7c7b0..137b2f38 100644 --- a/src/obj/NiParticleRotation.cpp +++ b/src/obj/NiParticleRotation.cpp @@ -23,7 +23,7 @@ string NiParticleRotation::asString( bool verbose ) const { NI_PARTICLE_ROTATION_STRING } -void NiParticleRotation::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleRotation::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_ROTATION_FIXLINKS } diff --git a/src/obj/NiParticleSystem.cpp b/src/obj/NiParticleSystem.cpp index 1513b329..0c3e672d 100644 --- a/src/obj/NiParticleSystem.cpp +++ b/src/obj/NiParticleSystem.cpp @@ -24,7 +24,7 @@ string NiParticleSystem::asString( bool verbose ) const { NI_PARTICLE_SYSTEM_STRING } -void NiParticleSystem::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleSystem::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_SYSTEM_FIXLINKS } diff --git a/src/obj/NiParticleSystemController.cpp b/src/obj/NiParticleSystemController.cpp index 47fb2071..90f1af97 100644 --- a/src/obj/NiParticleSystemController.cpp +++ b/src/obj/NiParticleSystemController.cpp @@ -26,7 +26,7 @@ string NiParticleSystemController::asString( bool verbose ) const { NI_PARTICLE_SYSTEM_CONTROLLER_STRING } -void NiParticleSystemController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticleSystemController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLE_SYSTEM_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiParticles.cpp b/src/obj/NiParticles.cpp index 7a2bae4c..02298894 100644 --- a/src/obj/NiParticles.cpp +++ b/src/obj/NiParticles.cpp @@ -23,7 +23,7 @@ string NiParticles::asString( bool verbose ) const { NI_PARTICLES_STRING } -void NiParticles::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticles::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLES_FIXLINKS } diff --git a/src/obj/NiParticlesData.cpp b/src/obj/NiParticlesData.cpp index baea13ed..a60cbf6f 100644 --- a/src/obj/NiParticlesData.cpp +++ b/src/obj/NiParticlesData.cpp @@ -23,7 +23,7 @@ string NiParticlesData::asString( bool verbose ) const { NI_PARTICLES_DATA_STRING } -void NiParticlesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiParticlesData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PARTICLES_DATA_FIXLINKS } diff --git a/src/obj/NiPathController.cpp b/src/obj/NiPathController.cpp index 55424f12..f7027809 100644 --- a/src/obj/NiPathController.cpp +++ b/src/obj/NiPathController.cpp @@ -25,7 +25,7 @@ string NiPathController::asString( bool verbose ) const { NI_PATH_CONTROLLER_STRING } -void NiPathController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPathController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PATH_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiPathInterpolator.cpp b/src/obj/NiPathInterpolator.cpp index 65925845..31c6540b 100644 --- a/src/obj/NiPathInterpolator.cpp +++ b/src/obj/NiPathInterpolator.cpp @@ -25,7 +25,7 @@ string NiPathInterpolator::asString( bool verbose ) const { NI_PATH_INTERPOLATOR_STRING } -void NiPathInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPathInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PATH_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiPixelData.cpp b/src/obj/NiPixelData.cpp index 5d35c9be..687462a4 100644 --- a/src/obj/NiPixelData.cpp +++ b/src/obj/NiPixelData.cpp @@ -26,7 +26,7 @@ string NiPixelData::asString( bool verbose ) const { NI_PIXEL_DATA_STRING } -void NiPixelData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPixelData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PIXEL_DATA_FIXLINKS } diff --git a/src/obj/NiPlanarCollider.cpp b/src/obj/NiPlanarCollider.cpp index f36292eb..f699eb95 100644 --- a/src/obj/NiPlanarCollider.cpp +++ b/src/obj/NiPlanarCollider.cpp @@ -23,7 +23,7 @@ string NiPlanarCollider::asString( bool verbose ) const { NI_PLANAR_COLLIDER_STRING } -void NiPlanarCollider::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPlanarCollider::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PLANAR_COLLIDER_FIXLINKS } diff --git a/src/obj/NiPoint3Interpolator.cpp b/src/obj/NiPoint3Interpolator.cpp index 6a4c3eeb..5f9a339d 100644 --- a/src/obj/NiPoint3Interpolator.cpp +++ b/src/obj/NiPoint3Interpolator.cpp @@ -24,7 +24,7 @@ string NiPoint3Interpolator::asString( bool verbose ) const { NI_POINT3_INTERPOLATOR_STRING } -void NiPoint3Interpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPoint3Interpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_POINT3_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiPointLight.cpp b/src/obj/NiPointLight.cpp index 7cd51183..6cf50f0f 100644 --- a/src/obj/NiPointLight.cpp +++ b/src/obj/NiPointLight.cpp @@ -23,7 +23,7 @@ string NiPointLight::asString( bool verbose ) const { NI_POINT_LIGHT_STRING } -void NiPointLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPointLight::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_POINT_LIGHT_FIXLINKS } diff --git a/src/obj/NiPosData.cpp b/src/obj/NiPosData.cpp index 9bc3ea9b..ce1fc531 100644 --- a/src/obj/NiPosData.cpp +++ b/src/obj/NiPosData.cpp @@ -24,7 +24,7 @@ string NiPosData::asString( bool verbose ) const { NI_POS_DATA_STRING } -void NiPosData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiPosData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_POS_DATA_FIXLINKS } diff --git a/src/obj/NiProperty.cpp b/src/obj/NiProperty.cpp index d2da921b..7a1cace6 100644 --- a/src/obj/NiProperty.cpp +++ b/src/obj/NiProperty.cpp @@ -23,7 +23,7 @@ string NiProperty::asString( bool verbose ) const { NI_PROPERTY_STRING } -void NiProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_PROPERTY_FIXLINKS } diff --git a/src/obj/NiRangeLODData.cpp b/src/obj/NiRangeLODData.cpp index 1adf2507..cbffda0c 100644 --- a/src/obj/NiRangeLODData.cpp +++ b/src/obj/NiRangeLODData.cpp @@ -24,7 +24,7 @@ string NiRangeLODData::asString( bool verbose ) const { NI_RANGE_L_O_D_DATA_STRING } -void NiRangeLODData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiRangeLODData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_RANGE_L_O_D_DATA_FIXLINKS } diff --git a/src/obj/NiRotatingParticles.cpp b/src/obj/NiRotatingParticles.cpp index a67771fd..ccf0a689 100644 --- a/src/obj/NiRotatingParticles.cpp +++ b/src/obj/NiRotatingParticles.cpp @@ -23,7 +23,7 @@ string NiRotatingParticles::asString( bool verbose ) const { NI_ROTATING_PARTICLES_STRING } -void NiRotatingParticles::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiRotatingParticles::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_ROTATING_PARTICLES_FIXLINKS } diff --git a/src/obj/NiRotatingParticlesData.cpp b/src/obj/NiRotatingParticlesData.cpp index 9e2f4319..8659ece2 100644 --- a/src/obj/NiRotatingParticlesData.cpp +++ b/src/obj/NiRotatingParticlesData.cpp @@ -23,7 +23,7 @@ string NiRotatingParticlesData::asString( bool verbose ) const { NI_ROTATING_PARTICLES_DATA_STRING } -void NiRotatingParticlesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiRotatingParticlesData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_ROTATING_PARTICLES_DATA_FIXLINKS } diff --git a/src/obj/NiScreenLODData.cpp b/src/obj/NiScreenLODData.cpp index 7c777080..054021c2 100644 --- a/src/obj/NiScreenLODData.cpp +++ b/src/obj/NiScreenLODData.cpp @@ -23,7 +23,7 @@ string NiScreenLODData::asString( bool verbose ) const { NI_SCREEN_L_O_D_DATA_STRING } -void NiScreenLODData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiScreenLODData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SCREEN_L_O_D_DATA_FIXLINKS } diff --git a/src/obj/NiSequenceStreamHelper.cpp b/src/obj/NiSequenceStreamHelper.cpp index 0bfb79f6..24ba3c11 100644 --- a/src/obj/NiSequenceStreamHelper.cpp +++ b/src/obj/NiSequenceStreamHelper.cpp @@ -23,7 +23,7 @@ string NiSequenceStreamHelper::asString( bool verbose ) const { NI_SEQUENCE_STREAM_HELPER_STRING } -void NiSequenceStreamHelper::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSequenceStreamHelper::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SEQUENCE_STREAM_HELPER_FIXLINKS } diff --git a/src/obj/NiShadeProperty.cpp b/src/obj/NiShadeProperty.cpp index 797faf4c..e3146341 100644 --- a/src/obj/NiShadeProperty.cpp +++ b/src/obj/NiShadeProperty.cpp @@ -23,7 +23,7 @@ string NiShadeProperty::asString( bool verbose ) const { NI_SHADE_PROPERTY_STRING } -void NiShadeProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiShadeProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SHADE_PROPERTY_FIXLINKS } diff --git a/src/obj/NiSingleInterpolatorController.cpp b/src/obj/NiSingleInterpolatorController.cpp index e87c0be4..e88c6521 100644 --- a/src/obj/NiSingleInterpolatorController.cpp +++ b/src/obj/NiSingleInterpolatorController.cpp @@ -24,7 +24,7 @@ string NiSingleInterpolatorController::asString( bool verbose ) const { NI_SINGLE_INTERPOLATOR_CONTROLLER_STRING } -void NiSingleInterpolatorController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSingleInterpolatorController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SINGLE_INTERPOLATOR_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiSkinData.cpp b/src/obj/NiSkinData.cpp index 8bbdd962..aad3cd24 100644 --- a/src/obj/NiSkinData.cpp +++ b/src/obj/NiSkinData.cpp @@ -29,7 +29,7 @@ string NiSkinData::asString( bool verbose ) const { NI_SKIN_DATA_STRING } -void NiSkinData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSkinData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SKIN_DATA_FIXLINKS } diff --git a/src/obj/NiSkinInstance.cpp b/src/obj/NiSkinInstance.cpp index 282ad252..99b15733 100644 --- a/src/obj/NiSkinInstance.cpp +++ b/src/obj/NiSkinInstance.cpp @@ -63,7 +63,7 @@ string NiSkinInstance::asString( bool verbose ) const { NI_SKIN_INSTANCE_STRING } -void NiSkinInstance::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSkinInstance::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SKIN_INSTANCE_FIXLINKS //Inform newly fixed skeleton root of attachment diff --git a/src/obj/NiSkinPartition.cpp b/src/obj/NiSkinPartition.cpp index b303faf2..bd1c7399 100644 --- a/src/obj/NiSkinPartition.cpp +++ b/src/obj/NiSkinPartition.cpp @@ -43,7 +43,7 @@ string NiSkinPartition::asString( bool verbose ) const { NI_SKIN_PARTITION_STRING } -void NiSkinPartition::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSkinPartition::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SKIN_PARTITION_FIXLINKS } diff --git a/src/obj/NiSourceTexture.cpp b/src/obj/NiSourceTexture.cpp index b8179502..db0d8679 100644 --- a/src/obj/NiSourceTexture.cpp +++ b/src/obj/NiSourceTexture.cpp @@ -25,7 +25,7 @@ string NiSourceTexture::asString( bool verbose ) const { NI_SOURCE_TEXTURE_STRING } -void NiSourceTexture::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSourceTexture::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SOURCE_TEXTURE_FIXLINKS } diff --git a/src/obj/NiSpecularProperty.cpp b/src/obj/NiSpecularProperty.cpp index 23f1bf93..53611d36 100644 --- a/src/obj/NiSpecularProperty.cpp +++ b/src/obj/NiSpecularProperty.cpp @@ -23,7 +23,7 @@ string NiSpecularProperty::asString( bool verbose ) const { NI_SPECULAR_PROPERTY_STRING } -void NiSpecularProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSpecularProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SPECULAR_PROPERTY_FIXLINKS } diff --git a/src/obj/NiSphericalCollider.cpp b/src/obj/NiSphericalCollider.cpp index e29db3fd..cc8b72c2 100644 --- a/src/obj/NiSphericalCollider.cpp +++ b/src/obj/NiSphericalCollider.cpp @@ -23,7 +23,7 @@ string NiSphericalCollider::asString( bool verbose ) const { NI_SPHERICAL_COLLIDER_STRING } -void NiSphericalCollider::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSphericalCollider::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SPHERICAL_COLLIDER_FIXLINKS } diff --git a/src/obj/NiSpotLight.cpp b/src/obj/NiSpotLight.cpp index 4e11bbae..c3bcc369 100644 --- a/src/obj/NiSpotLight.cpp +++ b/src/obj/NiSpotLight.cpp @@ -23,7 +23,7 @@ string NiSpotLight::asString( bool verbose ) const { NI_SPOT_LIGHT_STRING } -void NiSpotLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiSpotLight::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_SPOT_LIGHT_FIXLINKS } diff --git a/src/obj/NiStencilProperty.cpp b/src/obj/NiStencilProperty.cpp index a9b20611..ed93e938 100644 --- a/src/obj/NiStencilProperty.cpp +++ b/src/obj/NiStencilProperty.cpp @@ -23,7 +23,7 @@ string NiStencilProperty::asString( bool verbose ) const { NI_STENCIL_PROPERTY_STRING } -void NiStencilProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStencilProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_STENCIL_PROPERTY_FIXLINKS } diff --git a/src/obj/NiStringExtraData.cpp b/src/obj/NiStringExtraData.cpp index ddefbe20..056d02af 100644 --- a/src/obj/NiStringExtraData.cpp +++ b/src/obj/NiStringExtraData.cpp @@ -23,7 +23,7 @@ string NiStringExtraData::asString( bool verbose ) const { NI_STRING_EXTRA_DATA_STRING } -void NiStringExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStringExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_STRING_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiStringPalette.cpp b/src/obj/NiStringPalette.cpp index 52a833d1..8f9f4b92 100644 --- a/src/obj/NiStringPalette.cpp +++ b/src/obj/NiStringPalette.cpp @@ -24,7 +24,7 @@ string NiStringPalette::asString( bool verbose ) const { NI_STRING_PALETTE_STRING } -void NiStringPalette::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStringPalette::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_STRING_PALETTE_FIXLINKS } diff --git a/src/obj/NiStringsExtraData.cpp b/src/obj/NiStringsExtraData.cpp index a0ae5fd5..8ca9d6d3 100644 --- a/src/obj/NiStringsExtraData.cpp +++ b/src/obj/NiStringsExtraData.cpp @@ -23,7 +23,7 @@ string NiStringsExtraData::asString( bool verbose ) const { NI_STRINGS_EXTRA_DATA_STRING } -void NiStringsExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiStringsExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_STRINGS_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiTextKeyExtraData.cpp b/src/obj/NiTextKeyExtraData.cpp index 7eecc0e4..4447372a 100644 --- a/src/obj/NiTextKeyExtraData.cpp +++ b/src/obj/NiTextKeyExtraData.cpp @@ -23,7 +23,7 @@ string NiTextKeyExtraData::asString( bool verbose ) const { NI_TEXT_KEY_EXTRA_DATA_STRING } -void NiTextKeyExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTextKeyExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TEXT_KEY_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiTextureEffect.cpp b/src/obj/NiTextureEffect.cpp index 0644dee7..ebbd6c55 100644 --- a/src/obj/NiTextureEffect.cpp +++ b/src/obj/NiTextureEffect.cpp @@ -24,7 +24,7 @@ string NiTextureEffect::asString( bool verbose ) const { NI_TEXTURE_EFFECT_STRING } -void NiTextureEffect::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTextureEffect::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TEXTURE_EFFECT_FIXLINKS } diff --git a/src/obj/NiTextureTransformController.cpp b/src/obj/NiTextureTransformController.cpp index d2cf04a6..87e49653 100644 --- a/src/obj/NiTextureTransformController.cpp +++ b/src/obj/NiTextureTransformController.cpp @@ -24,7 +24,7 @@ string NiTextureTransformController::asString( bool verbose ) const { NI_TEXTURE_TRANSFORM_CONTROLLER_STRING } -void NiTextureTransformController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTextureTransformController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TEXTURE_TRANSFORM_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiTexturingProperty.cpp b/src/obj/NiTexturingProperty.cpp index 7cc875a3..feb3a9c6 100644 --- a/src/obj/NiTexturingProperty.cpp +++ b/src/obj/NiTexturingProperty.cpp @@ -25,7 +25,7 @@ string NiTexturingProperty::asString( bool verbose ) const { NI_TEXTURING_PROPERTY_STRING } -void NiTexturingProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTexturingProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TEXTURING_PROPERTY_FIXLINKS } diff --git a/src/obj/NiTimeController.cpp b/src/obj/NiTimeController.cpp index bd76e052..1e7e7b79 100644 --- a/src/obj/NiTimeController.cpp +++ b/src/obj/NiTimeController.cpp @@ -24,7 +24,7 @@ string NiTimeController::asString( bool verbose ) const { NI_TIME_CONTROLLER_STRING } -void NiTimeController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTimeController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TIME_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiTransformController.cpp b/src/obj/NiTransformController.cpp index 090a098c..0201f025 100644 --- a/src/obj/NiTransformController.cpp +++ b/src/obj/NiTransformController.cpp @@ -23,7 +23,7 @@ string NiTransformController::asString( bool verbose ) const { NI_TRANSFORM_CONTROLLER_STRING } -void NiTransformController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTransformController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRANSFORM_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiTransformData.cpp b/src/obj/NiTransformData.cpp index 7da3fb3c..b4e33ce5 100644 --- a/src/obj/NiTransformData.cpp +++ b/src/obj/NiTransformData.cpp @@ -23,7 +23,7 @@ string NiTransformData::asString( bool verbose ) const { NI_TRANSFORM_DATA_STRING } -void NiTransformData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTransformData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRANSFORM_DATA_FIXLINKS } diff --git a/src/obj/NiTransformInterpolator.cpp b/src/obj/NiTransformInterpolator.cpp index 9c6b388b..b42a809c 100644 --- a/src/obj/NiTransformInterpolator.cpp +++ b/src/obj/NiTransformInterpolator.cpp @@ -24,7 +24,7 @@ string NiTransformInterpolator::asString( bool verbose ) const { NI_TRANSFORM_INTERPOLATOR_STRING } -void NiTransformInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTransformInterpolator::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRANSFORM_INTERPOLATOR_FIXLINKS } diff --git a/src/obj/NiTriBasedGeom.cpp b/src/obj/NiTriBasedGeom.cpp index 6cbc30a9..34c7a9e0 100644 --- a/src/obj/NiTriBasedGeom.cpp +++ b/src/obj/NiTriBasedGeom.cpp @@ -30,7 +30,7 @@ string NiTriBasedGeom::asString( bool verbose ) const { NI_TRI_BASED_GEOM_STRING } -void NiTriBasedGeom::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriBasedGeom::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRI_BASED_GEOM_FIXLINKS } diff --git a/src/obj/NiTriBasedGeomData.cpp b/src/obj/NiTriBasedGeomData.cpp index ebcd114b..1c44b0ef 100644 --- a/src/obj/NiTriBasedGeomData.cpp +++ b/src/obj/NiTriBasedGeomData.cpp @@ -24,7 +24,7 @@ string NiTriBasedGeomData::asString( bool verbose ) const { NI_TRI_BASED_GEOM_DATA_STRING } -void NiTriBasedGeomData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriBasedGeomData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRI_BASED_GEOM_DATA_FIXLINKS } diff --git a/src/obj/NiTriShape.cpp b/src/obj/NiTriShape.cpp index 2210956f..eacc247d 100644 --- a/src/obj/NiTriShape.cpp +++ b/src/obj/NiTriShape.cpp @@ -23,7 +23,7 @@ string NiTriShape::asString( bool verbose ) const { NI_TRI_SHAPE_STRING } -void NiTriShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRI_SHAPE_FIXLINKS } diff --git a/src/obj/NiTriShapeData.cpp b/src/obj/NiTriShapeData.cpp index 4da709e6..c93f4691 100644 --- a/src/obj/NiTriShapeData.cpp +++ b/src/obj/NiTriShapeData.cpp @@ -24,7 +24,7 @@ string NiTriShapeData::asString( bool verbose ) const { NI_TRI_SHAPE_DATA_STRING } -void NiTriShapeData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriShapeData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRI_SHAPE_DATA_FIXLINKS } diff --git a/src/obj/NiTriStrips.cpp b/src/obj/NiTriStrips.cpp index 4a248b8d..4739e47f 100644 --- a/src/obj/NiTriStrips.cpp +++ b/src/obj/NiTriStrips.cpp @@ -23,7 +23,7 @@ string NiTriStrips::asString( bool verbose ) const { NI_TRI_STRIPS_STRING } -void NiTriStrips::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriStrips::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRI_STRIPS_FIXLINKS } diff --git a/src/obj/NiTriStripsData.cpp b/src/obj/NiTriStripsData.cpp index f8dc1289..def72f7e 100644 --- a/src/obj/NiTriStripsData.cpp +++ b/src/obj/NiTriStripsData.cpp @@ -32,7 +32,7 @@ string NiTriStripsData::asString( bool verbose ) const { NI_TRI_STRIPS_DATA_STRING } -void NiTriStripsData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiTriStripsData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_TRI_STRIPS_DATA_FIXLINKS } diff --git a/src/obj/NiUVController.cpp b/src/obj/NiUVController.cpp index e2219b6f..7bbcc90b 100644 --- a/src/obj/NiUVController.cpp +++ b/src/obj/NiUVController.cpp @@ -24,7 +24,7 @@ string NiUVController::asString( bool verbose ) const { NI_U_V_CONTROLLER_STRING } -void NiUVController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiUVController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_U_V_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiUVData.cpp b/src/obj/NiUVData.cpp index bcc144f4..7231ac00 100644 --- a/src/obj/NiUVData.cpp +++ b/src/obj/NiUVData.cpp @@ -24,7 +24,7 @@ string NiUVData::asString( bool verbose ) const { NI_U_V_DATA_STRING } -void NiUVData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiUVData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_U_V_DATA_FIXLINKS } diff --git a/src/obj/NiVectorExtraData.cpp b/src/obj/NiVectorExtraData.cpp index ba8f3a23..8fd07126 100644 --- a/src/obj/NiVectorExtraData.cpp +++ b/src/obj/NiVectorExtraData.cpp @@ -23,7 +23,7 @@ string NiVectorExtraData::asString( bool verbose ) const { NI_VECTOR_EXTRA_DATA_STRING } -void NiVectorExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVectorExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_VECTOR_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiVertWeightsExtraData.cpp b/src/obj/NiVertWeightsExtraData.cpp index 6ed76fa2..712c7ff4 100644 --- a/src/obj/NiVertWeightsExtraData.cpp +++ b/src/obj/NiVertWeightsExtraData.cpp @@ -23,7 +23,7 @@ string NiVertWeightsExtraData::asString( bool verbose ) const { NI_VERT_WEIGHTS_EXTRA_DATA_STRING } -void NiVertWeightsExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVertWeightsExtraData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_VERT_WEIGHTS_EXTRA_DATA_FIXLINKS } diff --git a/src/obj/NiVertexColorProperty.cpp b/src/obj/NiVertexColorProperty.cpp index 84588863..7e86e5bb 100644 --- a/src/obj/NiVertexColorProperty.cpp +++ b/src/obj/NiVertexColorProperty.cpp @@ -23,7 +23,7 @@ string NiVertexColorProperty::asString( bool verbose ) const { NI_VERTEX_COLOR_PROPERTY_STRING } -void NiVertexColorProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVertexColorProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_VERTEX_COLOR_PROPERTY_FIXLINKS } diff --git a/src/obj/NiVisController.cpp b/src/obj/NiVisController.cpp index 598bbcd4..13816e0c 100644 --- a/src/obj/NiVisController.cpp +++ b/src/obj/NiVisController.cpp @@ -24,7 +24,7 @@ string NiVisController::asString( bool verbose ) const { NI_VIS_CONTROLLER_STRING } -void NiVisController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVisController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_VIS_CONTROLLER_FIXLINKS } diff --git a/src/obj/NiVisData.cpp b/src/obj/NiVisData.cpp index 12e83ea5..0f133f48 100644 --- a/src/obj/NiVisData.cpp +++ b/src/obj/NiVisData.cpp @@ -23,7 +23,7 @@ string NiVisData::asString( bool verbose ) const { NI_VIS_DATA_STRING } -void NiVisData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiVisData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_VIS_DATA_FIXLINKS } diff --git a/src/obj/NiWireframeProperty.cpp b/src/obj/NiWireframeProperty.cpp index 2bbae782..b4966355 100644 --- a/src/obj/NiWireframeProperty.cpp +++ b/src/obj/NiWireframeProperty.cpp @@ -23,7 +23,7 @@ string NiWireframeProperty::asString( bool verbose ) const { NI_WIREFRAME_PROPERTY_STRING } -void NiWireframeProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiWireframeProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_WIREFRAME_PROPERTY_FIXLINKS } diff --git a/src/obj/NiZBufferProperty.cpp b/src/obj/NiZBufferProperty.cpp index af1a0a0c..0e6b5fff 100644 --- a/src/obj/NiZBufferProperty.cpp +++ b/src/obj/NiZBufferProperty.cpp @@ -23,7 +23,7 @@ string NiZBufferProperty::asString( bool verbose ) const { NI_Z_BUFFER_PROPERTY_STRING } -void NiZBufferProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void NiZBufferProperty::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { NI_Z_BUFFER_PROPERTY_FIXLINKS } diff --git a/src/obj/RootCollisionNode.cpp b/src/obj/RootCollisionNode.cpp index 97cfea29..cb558a92 100644 --- a/src/obj/RootCollisionNode.cpp +++ b/src/obj/RootCollisionNode.cpp @@ -23,7 +23,7 @@ string RootCollisionNode::asString( bool verbose ) const { ROOT_COLLISION_NODE_STRING } -void RootCollisionNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void RootCollisionNode::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { ROOT_COLLISION_NODE_FIXLINKS } diff --git a/src/obj/bhkBlendCollisionObject.cpp b/src/obj/bhkBlendCollisionObject.cpp index 6657e2c3..f117fd80 100644 --- a/src/obj/bhkBlendCollisionObject.cpp +++ b/src/obj/bhkBlendCollisionObject.cpp @@ -23,7 +23,7 @@ string bhkBlendCollisionObject::asString( bool verbose ) const { BHK_BLEND_COLLISION_OBJECT_STRING } -void bhkBlendCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkBlendCollisionObject::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_BLEND_COLLISION_OBJECT_FIXLINKS } diff --git a/src/obj/bhkBlendController.cpp b/src/obj/bhkBlendController.cpp index 729c097b..9edbf53d 100644 --- a/src/obj/bhkBlendController.cpp +++ b/src/obj/bhkBlendController.cpp @@ -23,7 +23,7 @@ string bhkBlendController::asString( bool verbose ) const { BHK_BLEND_CONTROLLER_STRING } -void bhkBlendController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkBlendController::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_BLEND_CONTROLLER_FIXLINKS } diff --git a/src/obj/bhkBoxShape.cpp b/src/obj/bhkBoxShape.cpp index 1b63072a..5f9662fa 100644 --- a/src/obj/bhkBoxShape.cpp +++ b/src/obj/bhkBoxShape.cpp @@ -23,7 +23,7 @@ string bhkBoxShape::asString( bool verbose ) const { BHK_BOX_SHAPE_STRING } -void bhkBoxShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkBoxShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_BOX_SHAPE_FIXLINKS } diff --git a/src/obj/bhkCapsuleShape.cpp b/src/obj/bhkCapsuleShape.cpp index 7939a8c8..044da845 100644 --- a/src/obj/bhkCapsuleShape.cpp +++ b/src/obj/bhkCapsuleShape.cpp @@ -23,7 +23,7 @@ string bhkCapsuleShape::asString( bool verbose ) const { BHK_CAPSULE_SHAPE_STRING } -void bhkCapsuleShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkCapsuleShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_CAPSULE_SHAPE_FIXLINKS } diff --git a/src/obj/bhkCollisionObject.cpp b/src/obj/bhkCollisionObject.cpp index dcb89a53..ece70244 100644 --- a/src/obj/bhkCollisionObject.cpp +++ b/src/obj/bhkCollisionObject.cpp @@ -23,7 +23,7 @@ string bhkCollisionObject::asString( bool verbose ) const { BHK_COLLISION_OBJECT_STRING } -void bhkCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkCollisionObject::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_COLLISION_OBJECT_FIXLINKS } diff --git a/src/obj/bhkConvexShape.cpp b/src/obj/bhkConvexShape.cpp index 9d3665d4..d8211417 100644 --- a/src/obj/bhkConvexShape.cpp +++ b/src/obj/bhkConvexShape.cpp @@ -23,7 +23,7 @@ string bhkConvexShape::asString( bool verbose ) const { BHK_CONVEX_SHAPE_STRING } -void bhkConvexShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkConvexShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_CONVEX_SHAPE_FIXLINKS } diff --git a/src/obj/bhkConvexTransformShape.cpp b/src/obj/bhkConvexTransformShape.cpp index 895b9cee..fa790336 100644 --- a/src/obj/bhkConvexTransformShape.cpp +++ b/src/obj/bhkConvexTransformShape.cpp @@ -23,7 +23,7 @@ string bhkConvexTransformShape::asString( bool verbose ) const { BHK_CONVEX_TRANSFORM_SHAPE_STRING } -void bhkConvexTransformShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkConvexTransformShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_CONVEX_TRANSFORM_SHAPE_FIXLINKS } diff --git a/src/obj/bhkConvexVerticesShape.cpp b/src/obj/bhkConvexVerticesShape.cpp index db039026..93836ba8 100644 --- a/src/obj/bhkConvexVerticesShape.cpp +++ b/src/obj/bhkConvexVerticesShape.cpp @@ -23,7 +23,7 @@ string bhkConvexVerticesShape::asString( bool verbose ) const { BHK_CONVEX_VERTICES_SHAPE_STRING } -void bhkConvexVerticesShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkConvexVerticesShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_CONVEX_VERTICES_SHAPE_FIXLINKS } diff --git a/src/obj/bhkEntity.cpp b/src/obj/bhkEntity.cpp index a6d859c1..6e8cf3bd 100644 --- a/src/obj/bhkEntity.cpp +++ b/src/obj/bhkEntity.cpp @@ -24,7 +24,7 @@ string bhkEntity::asString( bool verbose ) const { BHK_ENTITY_STRING } -void bhkEntity::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkEntity::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_ENTITY_FIXLINKS } diff --git a/src/obj/bhkHingeConstraint.cpp b/src/obj/bhkHingeConstraint.cpp index 2a6cf72f..62eaf61a 100644 --- a/src/obj/bhkHingeConstraint.cpp +++ b/src/obj/bhkHingeConstraint.cpp @@ -23,7 +23,7 @@ string bhkHingeConstraint::asString( bool verbose ) const { BHK_HINGE_CONSTRAINT_STRING } -void bhkHingeConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkHingeConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_HINGE_CONSTRAINT_FIXLINKS } diff --git a/src/obj/bhkLimitedHingeConstraint.cpp b/src/obj/bhkLimitedHingeConstraint.cpp index d815a8ae..d15a620e 100644 --- a/src/obj/bhkLimitedHingeConstraint.cpp +++ b/src/obj/bhkLimitedHingeConstraint.cpp @@ -24,7 +24,7 @@ string bhkLimitedHingeConstraint::asString( bool verbose ) const { BHK_LIMITED_HINGE_CONSTRAINT_STRING } -void bhkLimitedHingeConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkLimitedHingeConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_LIMITED_HINGE_CONSTRAINT_FIXLINKS } diff --git a/src/obj/bhkListShape.cpp b/src/obj/bhkListShape.cpp index f21dd12b..0165a569 100644 --- a/src/obj/bhkListShape.cpp +++ b/src/obj/bhkListShape.cpp @@ -24,7 +24,7 @@ string bhkListShape::asString( bool verbose ) const { BHK_LIST_SHAPE_STRING } -void bhkListShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkListShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_LIST_SHAPE_FIXLINKS } diff --git a/src/obj/bhkMalleableConstraint.cpp b/src/obj/bhkMalleableConstraint.cpp index 33f0df47..1a146837 100644 --- a/src/obj/bhkMalleableConstraint.cpp +++ b/src/obj/bhkMalleableConstraint.cpp @@ -26,7 +26,7 @@ string bhkMalleableConstraint::asString( bool verbose ) const { BHK_MALLEABLE_CONSTRAINT_STRING } -void bhkMalleableConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkMalleableConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_MALLEABLE_CONSTRAINT_FIXLINKS } diff --git a/src/obj/bhkMoppBvTreeShape.cpp b/src/obj/bhkMoppBvTreeShape.cpp index d2ad26d3..95555c67 100644 --- a/src/obj/bhkMoppBvTreeShape.cpp +++ b/src/obj/bhkMoppBvTreeShape.cpp @@ -24,7 +24,7 @@ string bhkMoppBvTreeShape::asString( bool verbose ) const { BHK_MOPP_BV_TREE_SHAPE_STRING } -void bhkMoppBvTreeShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkMoppBvTreeShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_MOPP_BV_TREE_SHAPE_FIXLINKS } diff --git a/src/obj/bhkMultiSphereShape.cpp b/src/obj/bhkMultiSphereShape.cpp index 754ed155..c326402d 100644 --- a/src/obj/bhkMultiSphereShape.cpp +++ b/src/obj/bhkMultiSphereShape.cpp @@ -24,7 +24,7 @@ string bhkMultiSphereShape::asString( bool verbose ) const { BHK_MULTI_SPHERE_SHAPE_STRING } -void bhkMultiSphereShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkMultiSphereShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_MULTI_SPHERE_SHAPE_FIXLINKS } diff --git a/src/obj/bhkNiTriStripsShape.cpp b/src/obj/bhkNiTriStripsShape.cpp index 763b9652..422d38df 100644 --- a/src/obj/bhkNiTriStripsShape.cpp +++ b/src/obj/bhkNiTriStripsShape.cpp @@ -24,7 +24,7 @@ string bhkNiTriStripsShape::asString( bool verbose ) const { BHK_NI_TRI_STRIPS_SHAPE_STRING } -void bhkNiTriStripsShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkNiTriStripsShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_NI_TRI_STRIPS_SHAPE_FIXLINKS } diff --git a/src/obj/bhkPackedNiTriStripsShape.cpp b/src/obj/bhkPackedNiTriStripsShape.cpp index d56bba08..a85ae3dd 100644 --- a/src/obj/bhkPackedNiTriStripsShape.cpp +++ b/src/obj/bhkPackedNiTriStripsShape.cpp @@ -24,7 +24,7 @@ string bhkPackedNiTriStripsShape::asString( bool verbose ) const { BHK_PACKED_NI_TRI_STRIPS_SHAPE_STRING } -void bhkPackedNiTriStripsShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkPackedNiTriStripsShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_PACKED_NI_TRI_STRIPS_SHAPE_FIXLINKS } diff --git a/src/obj/bhkPrismaticConstraint.cpp b/src/obj/bhkPrismaticConstraint.cpp index 15fc5e3a..d06a99b5 100644 --- a/src/obj/bhkPrismaticConstraint.cpp +++ b/src/obj/bhkPrismaticConstraint.cpp @@ -23,7 +23,7 @@ string bhkPrismaticConstraint::asString( bool verbose ) const { BHK_PRISMATIC_CONSTRAINT_STRING } -void bhkPrismaticConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkPrismaticConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_PRISMATIC_CONSTRAINT_FIXLINKS } diff --git a/src/obj/bhkRagdollConstraint.cpp b/src/obj/bhkRagdollConstraint.cpp index 53280ea7..40a13275 100644 --- a/src/obj/bhkRagdollConstraint.cpp +++ b/src/obj/bhkRagdollConstraint.cpp @@ -23,7 +23,7 @@ string bhkRagdollConstraint::asString( bool verbose ) const { BHK_RAGDOLL_CONSTRAINT_STRING } -void bhkRagdollConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRagdollConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_RAGDOLL_CONSTRAINT_FIXLINKS } diff --git a/src/obj/bhkRefObject.cpp b/src/obj/bhkRefObject.cpp index 905a212d..f6d249e1 100644 --- a/src/obj/bhkRefObject.cpp +++ b/src/obj/bhkRefObject.cpp @@ -23,7 +23,7 @@ string bhkRefObject::asString( bool verbose ) const { BHK_REF_OBJECT_STRING } -void bhkRefObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRefObject::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_REF_OBJECT_FIXLINKS } diff --git a/src/obj/bhkRigidBody.cpp b/src/obj/bhkRigidBody.cpp index db553c20..5c231af8 100644 --- a/src/obj/bhkRigidBody.cpp +++ b/src/obj/bhkRigidBody.cpp @@ -25,7 +25,7 @@ string bhkRigidBody::asString( bool verbose ) const { BHK_RIGID_BODY_STRING } -void bhkRigidBody::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRigidBody::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_RIGID_BODY_FIXLINKS } diff --git a/src/obj/bhkRigidBodyT.cpp b/src/obj/bhkRigidBodyT.cpp index 44fb735f..e8722ac6 100644 --- a/src/obj/bhkRigidBodyT.cpp +++ b/src/obj/bhkRigidBodyT.cpp @@ -23,7 +23,7 @@ string bhkRigidBodyT::asString( bool verbose ) const { BHK_RIGID_BODY_T_STRING } -void bhkRigidBodyT::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkRigidBodyT::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_RIGID_BODY_T_FIXLINKS } diff --git a/src/obj/bhkSPCollisionObject.cpp b/src/obj/bhkSPCollisionObject.cpp index 46829d6b..d7cd0ba2 100644 --- a/src/obj/bhkSPCollisionObject.cpp +++ b/src/obj/bhkSPCollisionObject.cpp @@ -23,7 +23,7 @@ string bhkSPCollisionObject::asString( bool verbose ) const { BHK_S_P_COLLISION_OBJECT_STRING } -void bhkSPCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSPCollisionObject::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_S_P_COLLISION_OBJECT_FIXLINKS } diff --git a/src/obj/bhkSerializable.cpp b/src/obj/bhkSerializable.cpp index 65ba8927..e49e98ef 100644 --- a/src/obj/bhkSerializable.cpp +++ b/src/obj/bhkSerializable.cpp @@ -23,7 +23,7 @@ string bhkSerializable::asString( bool verbose ) const { BHK_SERIALIZABLE_STRING } -void bhkSerializable::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSerializable::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_SERIALIZABLE_FIXLINKS } diff --git a/src/obj/bhkShape.cpp b/src/obj/bhkShape.cpp index f1dd46f8..0a23ff6f 100644 --- a/src/obj/bhkShape.cpp +++ b/src/obj/bhkShape.cpp @@ -23,7 +23,7 @@ string bhkShape::asString( bool verbose ) const { BHK_SHAPE_STRING } -void bhkShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_SHAPE_FIXLINKS } diff --git a/src/obj/bhkSimpleShapePhantom.cpp b/src/obj/bhkSimpleShapePhantom.cpp index 586fabd8..17ed93c0 100644 --- a/src/obj/bhkSimpleShapePhantom.cpp +++ b/src/obj/bhkSimpleShapePhantom.cpp @@ -23,7 +23,7 @@ string bhkSimpleShapePhantom::asString( bool verbose ) const { BHK_SIMPLE_SHAPE_PHANTOM_STRING } -void bhkSimpleShapePhantom::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSimpleShapePhantom::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_SIMPLE_SHAPE_PHANTOM_FIXLINKS } diff --git a/src/obj/bhkSphereRepShape.cpp b/src/obj/bhkSphereRepShape.cpp index 10dc2c9a..3de723e0 100644 --- a/src/obj/bhkSphereRepShape.cpp +++ b/src/obj/bhkSphereRepShape.cpp @@ -23,7 +23,7 @@ string bhkSphereRepShape::asString( bool verbose ) const { BHK_SPHERE_REP_SHAPE_STRING } -void bhkSphereRepShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSphereRepShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_SPHERE_REP_SHAPE_FIXLINKS } diff --git a/src/obj/bhkSphereShape.cpp b/src/obj/bhkSphereShape.cpp index 773b06d9..36815125 100644 --- a/src/obj/bhkSphereShape.cpp +++ b/src/obj/bhkSphereShape.cpp @@ -23,7 +23,7 @@ string bhkSphereShape::asString( bool verbose ) const { BHK_SPHERE_SHAPE_STRING } -void bhkSphereShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkSphereShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_SPHERE_SHAPE_FIXLINKS } diff --git a/src/obj/bhkStiffSpringConstraint.cpp b/src/obj/bhkStiffSpringConstraint.cpp index eaa7ea49..c0dd81a3 100644 --- a/src/obj/bhkStiffSpringConstraint.cpp +++ b/src/obj/bhkStiffSpringConstraint.cpp @@ -23,7 +23,7 @@ string bhkStiffSpringConstraint::asString( bool verbose ) const { BHK_STIFF_SPRING_CONSTRAINT_STRING } -void bhkStiffSpringConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkStiffSpringConstraint::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_STIFF_SPRING_CONSTRAINT_FIXLINKS } diff --git a/src/obj/bhkTransformShape.cpp b/src/obj/bhkTransformShape.cpp index 2d9c6f0c..17f0ab6a 100644 --- a/src/obj/bhkTransformShape.cpp +++ b/src/obj/bhkTransformShape.cpp @@ -23,7 +23,7 @@ string bhkTransformShape::asString( bool verbose ) const { BHK_TRANSFORM_SHAPE_STRING } -void bhkTransformShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkTransformShape::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_TRANSFORM_SHAPE_FIXLINKS } diff --git a/src/obj/bhkWorldObject.cpp b/src/obj/bhkWorldObject.cpp index e960609c..6eabaae0 100644 --- a/src/obj/bhkWorldObject.cpp +++ b/src/obj/bhkWorldObject.cpp @@ -23,7 +23,7 @@ string bhkWorldObject::asString( bool verbose ) const { BHK_WORLD_OBJECT_STRING } -void bhkWorldObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void bhkWorldObject::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { BHK_WORLD_OBJECT_FIXLINKS } diff --git a/src/obj/hkPackedNiTriStripsData.cpp b/src/obj/hkPackedNiTriStripsData.cpp index 11642ba8..d9adbddb 100644 --- a/src/obj/hkPackedNiTriStripsData.cpp +++ b/src/obj/hkPackedNiTriStripsData.cpp @@ -24,7 +24,7 @@ string hkPackedNiTriStripsData::asString( bool verbose ) const { HK_PACKED_NI_TRI_STRIPS_DATA_STRING } -void hkPackedNiTriStripsData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { +void hkPackedNiTriStripsData::FixLinks( const map<unsigned,NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { HK_PACKED_NI_TRI_STRIPS_DATA_FIXLINKS } -- GitLab