2010-01-04 19:35:11 +01:00
|
|
|
/*
|
|
|
|
OpenMW - The completely unofficial reimplementation of Morrowind
|
|
|
|
Copyright (C) 2008-2010 Nicolay Korslund
|
|
|
|
Email: < korslund@gmail.com >
|
2018-03-08 21:23:24 +01:00
|
|
|
WWW: https://openmw.org/
|
2010-01-04 19:35:11 +01: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
|
2018-03-08 21:23:24 +01:00
|
|
|
https://www.gnu.org/licenses/ .
|
2010-01-04 19:35:11 +01:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
2013-02-24 13:51:56 -08:00
|
|
|
#ifndef OPENMW_COMPONENTS_NIF_RECORD_HPP
|
|
|
|
#define OPENMW_COMPONENTS_NIF_RECORD_HPP
|
2010-01-04 19:35:11 +01:00
|
|
|
|
2012-07-12 12:01:11 -07:00
|
|
|
#include <string>
|
2011-06-19 18:14:03 +02:00
|
|
|
|
2010-01-06 12:28:37 +01:00
|
|
|
namespace Nif
|
|
|
|
{
|
|
|
|
|
2010-01-04 19:35:11 +01:00
|
|
|
class NIFFile;
|
2013-01-05 13:03:05 -08:00
|
|
|
class NIFStream;
|
2010-01-04 19:35:11 +01:00
|
|
|
|
2010-01-13 14:37:42 +01:00
|
|
|
enum RecordType
|
|
|
|
{
|
2010-06-12 09:48:58 +02:00
|
|
|
RC_MISSING = 0,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiNode,
|
2015-11-12 19:40:31 +01:00
|
|
|
RC_NiSwitchNode,
|
|
|
|
RC_NiLODNode,
|
2013-12-26 18:16:28 +01:00
|
|
|
RC_NiBillboardNode,
|
2013-04-28 11:12:55 -07:00
|
|
|
RC_AvoidNode,
|
2020-02-19 12:14:21 +04:00
|
|
|
RC_NiCollisionSwitch,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiTriShape,
|
2019-08-08 13:11:24 +03:00
|
|
|
RC_NiTriStrips,
|
2020-05-30 17:59:36 +03:00
|
|
|
RC_NiLines,
|
2020-11-26 21:04:56 +03:00
|
|
|
RC_NiParticles,
|
2013-04-14 12:52:20 -07:00
|
|
|
RC_NiBSParticleNode,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiCamera,
|
2010-01-13 21:19:17 +01:00
|
|
|
RC_NiTexturingProperty,
|
2014-12-10 20:51:32 +01:00
|
|
|
RC_NiFogProperty,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiMaterialProperty,
|
|
|
|
RC_NiZBufferProperty,
|
|
|
|
RC_NiAlphaProperty,
|
|
|
|
RC_NiVertexColorProperty,
|
|
|
|
RC_NiShadeProperty,
|
|
|
|
RC_NiDitherProperty,
|
|
|
|
RC_NiWireframeProperty,
|
|
|
|
RC_NiSpecularProperty,
|
2013-02-27 23:45:09 +04:00
|
|
|
RC_NiStencilProperty,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiVisController,
|
|
|
|
RC_NiGeomMorpherController,
|
|
|
|
RC_NiKeyframeController,
|
|
|
|
RC_NiAlphaController,
|
2019-02-20 22:55:40 +04:00
|
|
|
RC_NiRollController,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiUVController,
|
|
|
|
RC_NiPathController,
|
|
|
|
RC_NiMaterialColorController,
|
|
|
|
RC_NiBSPArrayController,
|
|
|
|
RC_NiParticleSystemController,
|
2013-04-19 15:07:08 -07:00
|
|
|
RC_NiFlipController,
|
2013-04-06 05:00:19 -07:00
|
|
|
RC_NiBSAnimationNode,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiLight,
|
|
|
|
RC_NiTextureEffect,
|
2021-07-26 04:46:03 +03:00
|
|
|
RC_NiExtraData,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiVertWeightsExtraData,
|
|
|
|
RC_NiTextKeyExtraData,
|
|
|
|
RC_NiStringExtraData,
|
|
|
|
RC_NiGravity,
|
|
|
|
RC_NiPlanarCollider,
|
|
|
|
RC_NiParticleGrowFade,
|
|
|
|
RC_NiParticleColorModifier,
|
|
|
|
RC_NiParticleRotation,
|
|
|
|
RC_NiFloatData,
|
|
|
|
RC_NiTriShapeData,
|
2019-08-08 13:11:24 +03:00
|
|
|
RC_NiTriStripsData,
|
2020-05-30 17:59:36 +03:00
|
|
|
RC_NiLinesData,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiVisData,
|
|
|
|
RC_NiColorData,
|
|
|
|
RC_NiPixelData,
|
|
|
|
RC_NiMorphData,
|
|
|
|
RC_NiKeyframeData,
|
2010-01-24 13:49:38 +01:00
|
|
|
RC_NiSkinData,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiUVData,
|
|
|
|
RC_NiPosData,
|
|
|
|
RC_NiRotatingParticlesData,
|
2020-11-26 21:04:56 +03:00
|
|
|
RC_NiParticlesData,
|
2010-01-13 14:37:42 +01:00
|
|
|
RC_NiSequenceStreamHelper,
|
|
|
|
RC_NiSourceTexture,
|
2011-01-13 17:51:50 +01:00
|
|
|
RC_NiSkinInstance,
|
2016-12-05 21:31:17 +01:00
|
|
|
RC_RootCollisionNode,
|
2018-04-29 09:24:13 +04:00
|
|
|
RC_NiSphericalCollider,
|
2019-08-13 01:20:30 +03:00
|
|
|
RC_NiLookAtController,
|
2020-10-06 20:52:21 +03:00
|
|
|
RC_NiPalette,
|
|
|
|
RC_NiIntegerExtraData,
|
|
|
|
RC_NiIntegersExtraData,
|
|
|
|
RC_NiBinaryExtraData,
|
|
|
|
RC_NiBooleanExtraData,
|
|
|
|
RC_NiVectorExtraData,
|
|
|
|
RC_NiColorExtraData,
|
|
|
|
RC_NiFloatExtraData,
|
2020-11-07 03:40:21 +03:00
|
|
|
RC_NiFloatsExtraData,
|
|
|
|
RC_NiStringPalette,
|
2020-11-07 04:04:46 +03:00
|
|
|
RC_NiBoolData,
|
2020-11-09 00:19:35 +03:00
|
|
|
RC_NiSkinPartition,
|
|
|
|
RC_BSXFlags,
|
|
|
|
RC_BSBound,
|
2020-11-10 22:30:44 +03:00
|
|
|
RC_bhkBlendController,
|
|
|
|
RC_NiFloatInterpolator,
|
|
|
|
RC_NiPoint3Interpolator,
|
|
|
|
RC_NiBoolInterpolator,
|
2020-12-13 02:35:57 +03:00
|
|
|
RC_NiTransformInterpolator,
|
|
|
|
RC_NiColorInterpolator,
|
2020-12-13 03:45:29 +03:00
|
|
|
RC_BSShaderTextureSet,
|
2020-12-13 04:04:14 +03:00
|
|
|
RC_BSLODTriShape,
|
2020-12-17 00:46:09 +03:00
|
|
|
RC_BSShaderProperty,
|
|
|
|
RC_BSShaderPPLightingProperty,
|
|
|
|
RC_BSShaderNoLightingProperty
|
2010-01-13 14:37:42 +01:00
|
|
|
};
|
|
|
|
|
2010-01-06 12:28:37 +01:00
|
|
|
/// Base class for all records
|
|
|
|
struct Record
|
2010-01-04 19:35:11 +01:00
|
|
|
{
|
2012-07-02 21:41:21 -07:00
|
|
|
// Record type and type name
|
2020-10-26 02:36:32 +03:00
|
|
|
int recType{RC_MISSING};
|
2012-07-09 20:53:54 -07:00
|
|
|
std::string recName;
|
2020-10-26 02:36:32 +03:00
|
|
|
unsigned int recIndex{~0u};
|
2010-01-13 14:37:42 +01:00
|
|
|
|
2020-10-26 02:36:32 +03:00
|
|
|
Record() = default;
|
2010-01-12 14:46:44 +01:00
|
|
|
|
2012-07-02 21:41:21 -07:00
|
|
|
/// Parses the record from file
|
2013-01-05 13:03:05 -08:00
|
|
|
virtual void read(NIFStream *nif) = 0;
|
2010-01-04 19:35:11 +01:00
|
|
|
|
2012-07-02 21:41:21 -07:00
|
|
|
/// Does post-processing, after the entire tree is loaded
|
|
|
|
virtual void post(NIFFile *nif) {}
|
2010-01-24 15:17:50 +01:00
|
|
|
|
2012-03-15 16:01:41 +01:00
|
|
|
virtual ~Record() {}
|
2010-01-04 19:35:11 +01:00
|
|
|
};
|
|
|
|
|
2010-01-06 12:28:37 +01:00
|
|
|
} // Namespace
|
2010-01-04 19:35:11 +01:00
|
|
|
#endif
|