Issue #107: MechanicsManager is accessed only through the interface class from now on
parent
f3edea77b2
commit
b68f9d6a28
@ -0,0 +1,77 @@
|
||||
#ifndef GAME_MWBASE_MECHANICSMANAGER_H
|
||||
#define GAME_MWBASE_MECHANICSMANAGER_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Vector3;
|
||||
}
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
struct Class;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class Ptr;
|
||||
class CellStore;
|
||||
}
|
||||
|
||||
namespace MWBase
|
||||
{
|
||||
/// \brief Interface for game mechanics manager (implemented in MWMechanics)
|
||||
class MechanicsManager
|
||||
{
|
||||
MechanicsManager (const MechanicsManager&);
|
||||
///< not implemented
|
||||
|
||||
MechanicsManager& operator= (const MechanicsManager&);
|
||||
///< not implemented
|
||||
|
||||
public:
|
||||
|
||||
MechanicsManager() {}
|
||||
|
||||
virtual ~MechanicsManager() {}
|
||||
|
||||
virtual void addActor (const MWWorld::Ptr& ptr) = 0;
|
||||
///< Register an actor for stats management
|
||||
|
||||
virtual void removeActor (const MWWorld::Ptr& ptr) = 0;
|
||||
///< Deregister an actor for stats management
|
||||
|
||||
virtual void dropActors (const MWWorld::CellStore *cellStore) = 0;
|
||||
///< Deregister all actors in the given cell.
|
||||
|
||||
virtual void watchActor (const MWWorld::Ptr& ptr) = 0;
|
||||
///< On each update look for changes in a previously registered actor and update the
|
||||
/// GUI accordingly.
|
||||
|
||||
virtual void update (std::vector<std::pair<std::string, Ogre::Vector3> >& movement,
|
||||
float duration, bool paused) = 0;
|
||||
///< Update actor stats and store desired velocity vectors in \a movement
|
||||
///
|
||||
/// \param paused In game type does not currently advance (this usually means some GUI
|
||||
/// component is up).
|
||||
|
||||
virtual void setPlayerName (const std::string& name) = 0;
|
||||
///< Set player name.
|
||||
|
||||
virtual void setPlayerRace (const std::string& id, bool male) = 0;
|
||||
///< Set player race.
|
||||
|
||||
virtual void setPlayerBirthsign (const std::string& id) = 0;
|
||||
///< Set player birthsign.
|
||||
|
||||
virtual void setPlayerClass (const std::string& id) = 0;
|
||||
///< Set player class to stock class.
|
||||
|
||||
virtual void setPlayerClass (const ESM::Class& class_) = 0;
|
||||
///< Set player class to custom class.
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,5 +1,5 @@
|
||||
|
||||
#include "mechanicsmanager.hpp"
|
||||
#include "mechanicsmanagerimp.hpp"
|
||||
|
||||
#include <components/esm_store/store.hpp>
|
||||
|
Loading…
Reference in New Issue