2014-01-05 17:22:29 +00:00
|
|
|
#ifndef GAME_RENDER_CREATUREANIMATION_H
|
|
|
|
#define GAME_RENDER_CREATUREANIMATION_H
|
2011-11-24 06:48:54 +00:00
|
|
|
|
|
|
|
#include "animation.hpp"
|
2014-01-19 12:05:26 +00:00
|
|
|
#include "../mwworld/inventorystore.hpp"
|
2011-12-12 03:40:00 +00:00
|
|
|
|
2013-01-06 05:12:08 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Ptr;
|
|
|
|
}
|
2011-11-24 06:48:54 +00:00
|
|
|
|
2013-01-06 05:12:08 +00:00
|
|
|
namespace MWRender
|
|
|
|
{
|
|
|
|
class CreatureAnimation : public Animation
|
2012-09-14 22:57:29 +00:00
|
|
|
{
|
2011-12-12 03:40:00 +00:00
|
|
|
public:
|
2012-09-14 22:57:29 +00:00
|
|
|
CreatureAnimation(const MWWorld::Ptr& ptr);
|
2014-01-19 12:05:26 +00:00
|
|
|
virtual ~CreatureAnimation() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
// For creatures with weapons and shields
|
|
|
|
// Animation is already virtual anyway, so might as well make a separate class.
|
|
|
|
// Most creatures don't need weapons/shields, so this will save some memory.
|
|
|
|
class CreatureWeaponAnimation : public Animation, public MWWorld::InventoryStoreListener
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CreatureWeaponAnimation(const MWWorld::Ptr& ptr);
|
|
|
|
virtual ~CreatureWeaponAnimation() {}
|
|
|
|
|
|
|
|
virtual void equipmentChanged() { updateParts(); }
|
|
|
|
|
|
|
|
virtual void showWeapons(bool showWeapon);
|
|
|
|
virtual void showCarriedLeft(bool show);
|
|
|
|
|
|
|
|
void updateParts();
|
|
|
|
|
|
|
|
void updatePart(NifOgre::ObjectScenePtr& scene, int slot);
|
|
|
|
|
|
|
|
private:
|
|
|
|
NifOgre::ObjectScenePtr mWeapon;
|
|
|
|
NifOgre::ObjectScenePtr mShield;
|
|
|
|
bool mShowWeapons;
|
|
|
|
bool mShowCarriedLeft;
|
2012-09-14 22:57:29 +00:00
|
|
|
};
|
2011-11-24 06:48:54 +00:00
|
|
|
}
|
2013-01-06 05:12:08 +00:00
|
|
|
|
2012-04-23 13:27:03 +00:00
|
|
|
#endif
|