1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 12:45:36 +00:00
openmw/components/nif/record.hpp

344 lines
11 KiB
C++
Raw Normal View History

2010-01-04 18:35:11 +00:00
/*
OpenMW - The completely unofficial reimplementation of Morrowind
Copyright (C) 2008-2010 Nicolay Korslund
Email: < korslund@gmail.com >
WWW: https://openmw.org/
2010-01-04 18:35:11 +00:00
This file (record.h) is part of the OpenMW package.
OpenMW is distributed as free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License
version 3, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
version 3 along with this program. If not, see
https://www.gnu.org/licenses/ .
2010-01-04 18:35:11 +00:00
*/
#ifndef OPENMW_COMPONENTS_NIF_RECORD_HPP
#define OPENMW_COMPONENTS_NIF_RECORD_HPP
2010-01-04 18:35:11 +00:00
#include <string>
2010-01-06 11:28:37 +00:00
namespace Nif
{
class Reader;
2022-09-22 18:26:05 +00:00
class NIFStream;
enum RecordType
{
RC_MISSING = 0,
RC_AvoidNode,
RC_bhkAabbPhantom,
RC_bhkBallAndSocketConstraint,
RC_bhkBallSocketConstraintChain,
2023-09-20 02:37:52 +00:00
RC_bhkBlendCollisionObject,
2023-08-30 16:11:00 +00:00
RC_bhkBlendController,
RC_bhkBoxShape,
RC_bhkBreakableConstraint,
2023-08-30 16:11:00 +00:00
RC_bhkCapsuleShape,
2023-09-20 01:08:11 +00:00
RC_bhkCylinderShape,
2023-08-30 16:11:00 +00:00
RC_bhkCollisionObject,
RC_bhkCompressedMeshShape,
RC_bhkCompressedMeshShapeData,
RC_bhkConvexListShape,
RC_bhkConvexSweepShape,
2023-08-30 16:11:00 +00:00
RC_bhkConvexTransformShape,
RC_bhkConvexVerticesShape,
RC_bhkHingeConstraint,
RC_bhkLimitedHingeConstraint,
2023-09-25 11:36:54 +00:00
RC_bhkLiquidAction,
2023-08-30 16:11:00 +00:00
RC_bhkListShape,
RC_bhkMalleableConstraint,
2023-09-25 11:00:44 +00:00
RC_bhkMeshShape,
2023-08-30 16:11:00 +00:00
RC_bhkMoppBvTreeShape,
RC_bhkMultiSphereShape,
2023-08-30 16:11:00 +00:00
RC_bhkNiTriStripsShape,
2023-09-25 11:36:54 +00:00
RC_bhkOrientHingedBodyAction,
2023-08-30 16:11:00 +00:00
RC_bhkPackedNiTriStripsShape,
RC_bhkPlaneShape,
RC_bhkPhysicsSystem,
2024-09-18 20:03:39 +00:00
RC_bhkPoseArray,
RC_bhkPrismaticConstraint,
2023-08-30 16:11:00 +00:00
RC_bhkRagdollConstraint,
RC_bhkRagdollSystem,
RC_bhkRagdollTemplate,
RC_bhkRagdollTemplateData,
2023-08-30 16:11:00 +00:00
RC_bhkRigidBody,
RC_bhkRigidBodyT,
RC_bhkSimpleShapePhantom,
RC_bhkSphereShape,
RC_bhkStiffSpringConstraint,
2024-05-12 22:12:09 +00:00
RC_BSAnimNote,
RC_BSAnimNotes,
2023-08-30 16:11:00 +00:00
RC_BSBehaviorGraphExtraData,
RC_BSBound,
RC_BSBoneLODExtraData,
RC_BSClothExtraData,
2023-11-08 09:33:26 +00:00
RC_BSCollisionQueryProxyExtraData,
2023-09-27 09:54:38 +00:00
RC_BSConnectPointChildren,
RC_BSConnectPointParents,
RC_BSDecalPlacementVectorExtraData,
RC_BSDistantTreeShaderProperty,
RC_BSDynamicTriShape,
2023-08-30 16:11:00 +00:00
RC_BSDismemberSkinInstance,
RC_BSDistantObjectExtraData,
2024-09-18 19:49:14 +00:00
RC_BSDistantObjectInstancedNode,
RC_BSDistantObjectLargeRefExtraData,
2023-08-30 16:11:00 +00:00
RC_BSEffectShaderProperty,
RC_BSEffectShaderPropertyColorController,
RC_BSEffectShaderPropertyFloatController,
RC_BSExtraData,
2023-09-27 09:54:38 +00:00
RC_BSEyeCenterExtraData,
RC_BSFrustumFOVController,
2023-08-30 16:11:00 +00:00
RC_BSFurnitureMarker,
RC_BSInvMarker,
RC_BSKeyframeController,
2023-09-20 05:53:35 +00:00
RC_BSLagBoneController,
2023-08-30 16:11:00 +00:00
RC_BSLightingShaderProperty,
RC_BSLightingShaderPropertyColorController,
RC_BSLightingShaderPropertyFloatController,
RC_BSLightingShaderPropertyUShortController,
2023-08-30 16:11:00 +00:00
RC_BSLODTriShape,
RC_BSMaterialEmittanceMultController,
RC_BSMeshLODTriShape,
2023-08-30 16:11:00 +00:00
RC_BSMultiBound,
2023-09-20 00:42:59 +00:00
RC_BSMultiBoundAABB,
2023-08-30 16:11:00 +00:00
RC_BSMultiBoundOBB,
RC_BSMultiBoundSphere,
RC_BSNiAlphaPropertyTestRefController,
2023-09-20 01:57:10 +00:00
RC_BSPackedAdditionalGeometryData,
RC_BSPackedCombinedSharedGeomDataExtra,
RC_BSParentVelocityModifier,
2023-09-27 09:54:38 +00:00
RC_BSPositionData,
RC_BSProceduralLightningController,
RC_BSPSysArrayEmitter,
RC_BSPSysHavokUpdateModifier,
RC_BSPSysInheritVelocityModifier,
2023-09-22 00:04:36 +00:00
RC_BSPSysLODModifier,
RC_BSPSysMultiTargetEmitterCtlr,
RC_BSPSysRecycleBoundModifier,
RC_BSPSysScaleModifier,
RC_BSPSysSimpleColorModifier,
RC_BSPSysStripUpdateModifier,
RC_BSPSysSubTexModifier,
2023-09-21 23:19:32 +00:00
RC_BSStripParticleSystem,
RC_BSStripPSysData,
2023-08-30 16:11:00 +00:00
RC_BSRefractionFirePeriodController,
RC_BSRefractionStrengthController,
2024-05-12 21:49:10 +00:00
RC_BSRotAccumTransfInterpolator,
2023-09-25 11:47:37 +00:00
RC_BSSegmentedTriShape,
2023-08-30 16:11:00 +00:00
RC_BSShaderNoLightingProperty,
RC_BSShaderPPLightingProperty,
RC_BSShaderProperty,
RC_BSShaderTextureSet,
2023-09-27 09:17:44 +00:00
RC_BSSkinBoneData,
RC_BSSkinInstance,
RC_BSSkyShaderProperty,
RC_BSSubIndexTriShape,
2024-05-12 22:20:23 +00:00
RC_BSTreadTransfInterpolator,
2023-08-30 16:11:00 +00:00
RC_BSTriShape,
RC_BSWArray,
RC_BSWaterShaderProperty,
RC_BSWindModifier,
2023-08-30 16:11:00 +00:00
RC_BSXFlags,
RC_DistantLODShaderProperty,
RC_HairShaderProperty,
2023-08-30 16:11:00 +00:00
RC_hkPackedNiTriStripsData,
2023-09-20 01:57:10 +00:00
RC_NiAdditionalGeometryData,
2023-08-30 16:11:00 +00:00
RC_NiAlphaAccumulator,
RC_NiAlphaController,
RC_NiAlphaProperty,
RC_NiBillboardNode,
RC_NiBinaryExtraData,
RC_NiBlendBoolInterpolator,
RC_NiBlendFloatInterpolator,
RC_NiBlendPoint3Interpolator,
RC_NiBlendTransformInterpolator,
RC_NiBoneLODController,
2023-08-30 16:11:00 +00:00
RC_NiBoolData,
RC_NiBooleanExtraData,
RC_NiBoolInterpolator,
RC_NiBoolTimelineInterpolator,
RC_NiBSAnimationNode,
RC_NiBSPArrayController,
2022-09-22 18:26:05 +00:00
RC_NiBSParticleNode,
2024-05-12 20:44:23 +00:00
RC_NiBSplineData,
RC_NiBSplineBasisData,
2024-05-12 21:36:10 +00:00
RC_NiBSplineCompFloatInterpolator,
RC_NiBSplineCompPoint3Interpolator,
RC_NiBSplineCompTransformInterpolator,
2024-05-12 21:20:32 +00:00
RC_NiBSplineTransformInterpolator,
2022-09-22 18:26:05 +00:00
RC_NiCamera,
2023-08-30 16:11:00 +00:00
RC_NiClusterAccumulator,
RC_NiCollisionObject,
RC_NiCollisionSwitch,
RC_NiColorData,
RC_NiColorExtraData,
RC_NiColorExtraDataController,
2023-08-30 16:11:00 +00:00
RC_NiColorInterpolator,
RC_NiControllerManager,
RC_NiControllerSequence,
RC_NiDefaultAVObjectPalette,
2022-09-22 18:26:05 +00:00
RC_NiDitherProperty,
2023-08-30 16:11:00 +00:00
RC_NiExtraData,
RC_NiFlipController,
RC_NiFloatData,
RC_NiFloatExtraData,
RC_NiFloatExtraDataController,
2023-08-30 16:11:00 +00:00
RC_NiFloatInterpolator,
RC_NiFloatsExtraData,
RC_NiFloatsExtraDataController,
RC_NiFloatsExtraDataPoint3Controller,
2023-08-30 16:11:00 +00:00
RC_NiFltAnimationNode,
RC_NiFogProperty,
2022-09-22 18:26:05 +00:00
RC_NiGeomMorpherController,
2023-08-30 16:11:00 +00:00
RC_NiGravity,
RC_NiIntegerExtraData,
RC_NiIntegersExtraData,
2022-09-22 18:26:05 +00:00
RC_NiKeyframeController,
2023-08-30 16:11:00 +00:00
RC_NiKeyframeData,
2022-09-22 18:26:05 +00:00
RC_NiLight,
RC_NiLightColorController,
2023-09-20 03:12:56 +00:00
RC_NiLightDimmerController,
2023-09-27 09:30:47 +00:00
RC_NiLightRadiusController,
2023-08-30 16:11:00 +00:00
RC_NiLines,
RC_NiLinesData,
RC_NiLODNode,
RC_NiLookAtController,
RC_NiLookAtInterpolator,
2023-08-30 16:11:00 +00:00
RC_NiMaterialColorController,
RC_NiMaterialProperty,
RC_NiMeshPSysData,
2023-08-30 16:11:00 +00:00
RC_NiMorphData,
RC_NiMultiTargetTransformController,
RC_NiNode,
RC_NiPalette,
2023-10-22 07:12:31 +00:00
RC_NiParticleBomb,
2022-09-22 18:26:05 +00:00
RC_NiParticleColorModifier,
2023-08-30 16:11:00 +00:00
RC_NiParticleGrowFade,
2022-09-22 18:26:05 +00:00
RC_NiParticleRotation,
2023-08-30 16:11:00 +00:00
RC_NiParticles,
RC_NiParticlesData,
RC_NiParticleSystem,
2023-08-30 16:11:00 +00:00
RC_NiParticleSystemController,
RC_NiPathController,
RC_NiPathInterpolator,
2022-09-22 18:26:05 +00:00
RC_NiPixelData,
2023-08-30 16:11:00 +00:00
RC_NiPlanarCollider,
RC_NiPoint3Interpolator,
2022-09-22 18:26:05 +00:00
RC_NiPosData,
RC_NiPSysAgeDeathModifier,
RC_NiPSysAirFieldAirFrictionCtlr,
RC_NiPSysAirFieldInheritVelocityCtlr,
RC_NiPSysAirFieldSpreadCtlr,
RC_NiPSysBombModifier,
RC_NiPSysBoundUpdateModifier,
RC_NiPSysBoxEmitter,
RC_NiPSysColliderManager,
RC_NiPSysColorModifier,
RC_NiPSysCylinderEmitter,
RC_NiPSysData,
RC_NiPSysDragModifier,
RC_NiPSysEmitterCtlr,
RC_NiPSysEmitterCtlrData,
RC_NiPSysEmitterDeclinationCtlr,
RC_NiPSysEmitterDeclinationVarCtlr,
RC_NiPSysEmitterInitialRadiusCtlr,
RC_NiPSysEmitterLifeSpanCtlr,
RC_NiPSysEmitterPlanarAngleCtlr,
RC_NiPSysEmitterPlanarAngleVarCtlr,
RC_NiPSysEmitterSpeedCtlr,
RC_NiPSysFieldAttenuationCtlr,
RC_NiPSysFieldMagnitudeCtlr,
RC_NiPSysFieldMaxDistanceCtlr,
RC_NiPSysGravityModifier,
RC_NiPSysGravityStrengthCtlr,
RC_NiPSysGrowFadeModifier,
RC_NiPSysInitialRotSpeedCtlr,
RC_NiPSysInitialRotSpeedVarCtlr,
RC_NiPSysInitialRotAngleCtlr,
RC_NiPSysInitialRotAngleVarCtlr,
RC_NiPSysMeshEmitter,
RC_NiPSysMeshUpdateModifier,
RC_NiPSysModifierActiveCtlr,
RC_NiPSysPlanarCollider,
RC_NiPSysPositionModifier,
RC_NiPSysRotationModifier,
2024-09-18 19:03:15 +00:00
RC_NiPSysRotDampeningCtlr,
RC_NiPSysResetOnLoopCtlr,
RC_NiPSysSpawnModifier,
RC_NiPSysSphericalCollider,
RC_NiPSysSphereEmitter,
2023-09-21 11:01:43 +00:00
RC_NiPSysUpdateCtlr,
2023-08-30 16:11:00 +00:00
RC_NiRollController,
RC_NiSequence,
2022-09-22 18:26:05 +00:00
RC_NiSequenceStreamHelper,
2023-08-30 16:11:00 +00:00
RC_NiShadeProperty,
RC_NiSkinData,
2022-09-22 18:26:05 +00:00
RC_NiSkinInstance,
2023-08-30 16:11:00 +00:00
RC_NiSkinPartition,
RC_NiSortAdjustNode,
RC_NiSourceTexture,
RC_NiSpecularProperty,
2022-09-22 18:26:05 +00:00
RC_NiSphericalCollider,
2023-08-30 16:11:00 +00:00
RC_NiStencilProperty,
RC_NiStringExtraData,
RC_NiStringsExtraData,
2022-09-22 18:26:05 +00:00
RC_NiStringPalette,
2023-08-30 16:11:00 +00:00
RC_NiSwitchNode,
RC_NiTextKeyExtraData,
RC_NiTextureEffect,
RC_NiTextureTransformController,
RC_NiTexturingProperty,
2022-09-22 18:26:05 +00:00
RC_NiTransformInterpolator,
2023-08-30 16:11:00 +00:00
RC_NiTriShape,
RC_NiTriShapeData,
RC_NiTriStrips,
RC_NiTriStripsData,
RC_NiUVController,
RC_NiUVData,
RC_NiVectorExtraData,
RC_NiVertexColorProperty,
RC_NiVertWeightsExtraData,
RC_NiVisController,
RC_NiVisData,
RC_NiWireframeProperty,
RC_NiZBufferProperty,
RC_RootCollisionNode,
RC_SkyShaderProperty,
RC_TallGrassShaderProperty,
RC_TileShaderProperty,
RC_VolumetricFogShaderProperty,
RC_WaterShaderProperty,
2022-09-22 18:26:05 +00:00
};
/// Base class for all records
struct Record
{
// Record type and type name
RecordType recType{ RC_MISSING };
std::string recName;
unsigned int recIndex{ ~0u };
Record() = default;
/// Parses the record from file
virtual void read(NIFStream* nif) = 0;
/// Does post-processing, after the entire tree is loaded
virtual void post(Reader& nif) {}
2022-09-22 18:26:05 +00:00
virtual ~Record() {}
};
2010-01-04 18:35:11 +00:00
2010-01-06 11:28:37 +00:00
} // Namespace
2010-01-04 18:35:11 +00:00
#endif