2011-11-24 06:48:54 +00:00
|
|
|
#ifndef _GAME_RENDER_NPCANIMATION_H
|
|
|
|
#define _GAME_RENDER_NPCANIMATION_H
|
2012-07-17 07:27:12 +00:00
|
|
|
|
2011-11-24 06:48:54 +00:00
|
|
|
#include "animation.hpp"
|
2011-12-12 03:40:00 +00:00
|
|
|
|
|
|
|
#include "components/nifogre/ogre_nif_loader.hpp"
|
2012-04-08 02:02:20 +00:00
|
|
|
#include "../mwworld/inventorystore.hpp"
|
2012-04-08 21:27:56 +00:00
|
|
|
#include "../mwclass/npc.hpp"
|
|
|
|
#include "../mwworld/containerstore.hpp"
|
2011-12-12 03:40:00 +00:00
|
|
|
|
2011-11-24 06:48:54 +00:00
|
|
|
namespace MWRender{
|
|
|
|
|
2011-12-12 03:40:00 +00:00
|
|
|
class NpcAnimation: public Animation{
|
2012-04-05 03:23:24 +00:00
|
|
|
private:
|
2012-07-13 10:51:58 +00:00
|
|
|
MWWorld::InventoryStore& mInv;
|
2012-07-13 03:12:18 +00:00
|
|
|
int mStateID;
|
2012-04-12 00:16:22 +00:00
|
|
|
|
2012-07-17 17:57:15 +00:00
|
|
|
int mPartslots[27]; //Each part slot is taken by clothing, armor, or is empty
|
|
|
|
int mPartPriorities[27];
|
2012-04-12 00:16:22 +00:00
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
//Bounded Parts
|
2012-07-18 17:26:25 +00:00
|
|
|
NifOgre::EntityList lclavicle;
|
|
|
|
NifOgre::EntityList rclavicle;
|
|
|
|
NifOgre::EntityList rupperArm;
|
|
|
|
NifOgre::EntityList lupperArm;
|
|
|
|
NifOgre::EntityList rUpperLeg;
|
|
|
|
NifOgre::EntityList lUpperLeg;
|
|
|
|
NifOgre::EntityList lForearm;
|
|
|
|
NifOgre::EntityList rForearm;
|
|
|
|
NifOgre::EntityList lWrist;
|
|
|
|
NifOgre::EntityList rWrist;
|
|
|
|
NifOgre::EntityList rKnee;
|
|
|
|
NifOgre::EntityList lKnee;
|
|
|
|
NifOgre::EntityList neck;
|
|
|
|
NifOgre::EntityList rAnkle;
|
|
|
|
NifOgre::EntityList lAnkle;
|
|
|
|
NifOgre::EntityList groin;
|
2012-07-19 05:32:26 +00:00
|
|
|
NifOgre::EntityList skirt;
|
2012-07-18 17:26:25 +00:00
|
|
|
NifOgre::EntityList lfoot;
|
|
|
|
NifOgre::EntityList rfoot;
|
|
|
|
NifOgre::EntityList hair;
|
2012-07-19 03:14:23 +00:00
|
|
|
NifOgre::EntityList rHand;
|
|
|
|
NifOgre::EntityList lHand;
|
2012-07-18 17:26:25 +00:00
|
|
|
NifOgre::EntityList head;
|
2012-07-19 03:14:23 +00:00
|
|
|
NifOgre::EntityList chest;
|
|
|
|
NifOgre::EntityList tail;
|
2012-04-23 13:27:03 +00:00
|
|
|
|
2012-04-08 21:27:56 +00:00
|
|
|
bool isBeast;
|
2012-04-14 22:58:52 +00:00
|
|
|
bool isFemale;
|
2012-07-13 03:12:18 +00:00
|
|
|
std::string headModel;
|
|
|
|
std::string hairModel;
|
|
|
|
std::string npcName;
|
|
|
|
std::string bodyRaceID;
|
|
|
|
float timeToChange;
|
|
|
|
MWWorld::ContainerStoreIterator robe;
|
2012-04-14 03:25:15 +00:00
|
|
|
MWWorld::ContainerStoreIterator helmet;
|
2012-04-14 20:44:46 +00:00
|
|
|
MWWorld::ContainerStoreIterator shirt;
|
|
|
|
MWWorld::ContainerStoreIterator cuirass;
|
2012-04-14 22:58:52 +00:00
|
|
|
MWWorld::ContainerStoreIterator greaves;
|
2012-04-14 23:21:14 +00:00
|
|
|
MWWorld::ContainerStoreIterator leftpauldron;
|
|
|
|
MWWorld::ContainerStoreIterator rightpauldron;
|
2012-04-15 00:32:46 +00:00
|
|
|
MWWorld::ContainerStoreIterator boots;
|
|
|
|
MWWorld::ContainerStoreIterator pants;
|
|
|
|
MWWorld::ContainerStoreIterator leftglove;
|
|
|
|
MWWorld::ContainerStoreIterator rightglove;
|
2012-04-15 19:16:48 +00:00
|
|
|
MWWorld::ContainerStoreIterator skirtiter;
|
2012-04-23 13:27:03 +00:00
|
|
|
|
2012-09-13 17:03:31 +00:00
|
|
|
int mVisibilityFlags;
|
|
|
|
|
2012-07-13 03:12:18 +00:00
|
|
|
public:
|
2012-09-14 22:57:29 +00:00
|
|
|
NpcAnimation(const MWWorld::Ptr& ptr, Ogre::SceneNode* node,
|
2012-09-13 17:03:31 +00:00
|
|
|
MWWorld::InventoryStore& _inv, int visibilityFlags);
|
2012-07-13 03:12:18 +00:00
|
|
|
virtual ~NpcAnimation();
|
2012-09-14 12:34:18 +00:00
|
|
|
NifOgre::EntityList insertBoundedPart(const std::string &mesh, int group, const std::string &bonename);
|
2012-07-13 03:12:18 +00:00
|
|
|
virtual void runAnimation(float timepassed);
|
|
|
|
void updateParts();
|
2012-07-18 17:26:25 +00:00
|
|
|
void removeEntities(NifOgre::EntityList &entities);
|
2012-04-13 00:40:11 +00:00
|
|
|
void removeIndividualPart(int type);
|
2012-04-15 19:16:48 +00:00
|
|
|
void reserveIndividualPart(int type, int group, int priority);
|
2012-04-23 13:27:03 +00:00
|
|
|
|
2012-04-13 02:16:02 +00:00
|
|
|
bool addOrReplaceIndividualPart(int type, int group, int priority, const std::string &mesh);
|
2012-07-13 03:12:18 +00:00
|
|
|
void removePartGroup(int group);
|
2012-04-14 22:58:52 +00:00
|
|
|
void addPartGroup(int group, int priority, std::vector<ESM::PartReference>& parts);
|
2012-09-13 17:03:31 +00:00
|
|
|
|
|
|
|
void forceUpdate();
|
2011-11-24 06:48:54 +00:00
|
|
|
};
|
2012-07-13 03:12:18 +00:00
|
|
|
|
2011-11-24 06:48:54 +00:00
|
|
|
}
|
2012-04-23 13:27:03 +00:00
|
|
|
#endif
|