OpenMW
apps/openmw/mwbase/mechanicsmanager.hpp
Go to the documentation of this file.
00001 #ifndef GAME_MWBASE_MECHANICSMANAGER_H
00002 #define GAME_MWBASE_MECHANICSMANAGER_H
00003 
00004 #include <string>
00005 #include <vector>
00006 
00007 namespace Ogre
00008 {
00009     class Vector3;
00010 }
00011 
00012 namespace ESM
00013 {
00014     struct Class;
00015 }
00016 
00017 namespace MWWorld
00018 {
00019     class Ptr;
00020     class CellStore;
00021 }
00022 
00023 namespace MWBase
00024 {
00026     class MechanicsManager
00027     {
00028             MechanicsManager (const MechanicsManager&);
00030 
00031             MechanicsManager& operator= (const MechanicsManager&);
00033 
00034         public:
00035 
00036             MechanicsManager() {}
00037 
00038             virtual ~MechanicsManager() {}
00039 
00040             virtual void add (const MWWorld::Ptr& ptr) = 0;
00042 
00043             virtual void remove (const MWWorld::Ptr& ptr) = 0;
00045 
00046             virtual void updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr) = 0;
00048 
00049             virtual void drop (const MWWorld::CellStore *cellStore) = 0;
00051 
00052             virtual void watchActor (const MWWorld::Ptr& ptr) = 0;
00055 
00056             virtual void update (float duration, bool paused) = 0;
00061 
00062             virtual void advanceTime (float duration) = 0;
00063 
00064             virtual void setPlayerName (const std::string& name) = 0;
00066 
00067             virtual void setPlayerRace (const std::string& id, bool male, const std::string &head, const std::string &hair) = 0;
00069 
00070             virtual void setPlayerBirthsign (const std::string& id) = 0;
00072 
00073             virtual void setPlayerClass (const std::string& id) = 0;
00075 
00076             virtual void setPlayerClass (const ESM::Class& class_) = 0;
00078 
00079             virtual void restoreDynamicStats() = 0;
00081 
00082             virtual int getBarterOffer(const MWWorld::Ptr& ptr,int basePrice, bool buying) = 0;
00084 
00085             virtual int getDerivedDisposition(const MWWorld::Ptr& ptr) = 0;
00087 
00088             virtual int countDeaths (const std::string& id) const = 0;
00090 
00091             enum PersuasionType
00092             {
00093                 PT_Admire,
00094                 PT_Intimidate,
00095                 PT_Taunt,
00096                 PT_Bribe10,
00097                 PT_Bribe100,
00098                 PT_Bribe1000
00099             };
00100             virtual void getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
00101                 float currentTemporaryDispositionDelta, bool& success, float& tempChange, float& permChange) = 0;
00103 
00104         virtual void forceStateUpdate(const MWWorld::Ptr &ptr) = 0;
00106 
00107         virtual void playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number=1) = 0;
00113 
00114         virtual void skipAnimation(const MWWorld::Ptr& ptr) = 0;
00117 
00118         virtual bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string& groupName) = 0;
00119 
00122         virtual void updateMagicEffects (const MWWorld::Ptr& ptr) = 0;
00123 
00124         virtual void toggleAI() = 0;
00125         virtual bool isAIActive() = 0;
00126     };
00127 }
00128 
00129 #endif