2011-01-04 14:58:22 +00:00
|
|
|
#ifndef GAME_MWWORLD_PLAYER_H
|
|
|
|
#define GAME_MWWORLD_PLAYER_H
|
2010-06-21 21:39:59 +00:00
|
|
|
|
2012-06-29 14:48:50 +00:00
|
|
|
#include "../mwworld/cellstore.hpp"
|
2010-07-05 10:09:04 +00:00
|
|
|
#include "../mwworld/refdata.hpp"
|
2010-07-26 10:59:50 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
2010-07-05 10:09:04 +00:00
|
|
|
|
2012-04-08 10:25:33 +00:00
|
|
|
#include "../mwmechanics/drawstate.hpp"
|
|
|
|
|
2012-07-03 10:30:50 +00:00
|
|
|
namespace MWBase
|
|
|
|
{
|
|
|
|
class World;
|
|
|
|
}
|
|
|
|
|
2011-01-04 14:58:22 +00:00
|
|
|
namespace MWWorld
|
2010-06-21 21:39:59 +00:00
|
|
|
{
|
2012-07-03 11:55:53 +00:00
|
|
|
class CellStore;
|
|
|
|
|
2011-01-08 14:11:37 +00:00
|
|
|
/// \brief NPC object representing the player and additional player data
|
2012-06-29 14:48:50 +00:00
|
|
|
class Player
|
2010-07-26 10:59:50 +00:00
|
|
|
{
|
2012-11-07 21:36:43 +00:00
|
|
|
LiveCellRef<ESM::NPC> mPlayer;
|
|
|
|
MWWorld::CellStore *mCellStore;
|
2012-11-08 14:50:18 +00:00
|
|
|
std::string mSign;
|
2012-11-07 21:36:43 +00:00
|
|
|
|
|
|
|
bool mAutoMove;
|
|
|
|
int mForwardBackward;
|
|
|
|
|
2011-01-06 09:07:01 +00:00
|
|
|
public:
|
2010-06-22 08:15:22 +00:00
|
|
|
|
2012-08-08 20:15:52 +00:00
|
|
|
Player(const ESM::NPC *player, const MWBase::World& world);
|
2010-06-21 21:39:59 +00:00
|
|
|
|
2012-07-03 11:55:53 +00:00
|
|
|
void setCell (MWWorld::CellStore *cellStore)
|
2011-01-06 09:07:01 +00:00
|
|
|
{
|
|
|
|
mCellStore = cellStore;
|
|
|
|
}
|
2010-06-21 21:39:59 +00:00
|
|
|
|
2010-07-26 11:09:44 +00:00
|
|
|
MWWorld::Ptr getPlayer()
|
2010-07-05 10:09:04 +00:00
|
|
|
{
|
2010-07-26 11:09:44 +00:00
|
|
|
MWWorld::Ptr ptr (&mPlayer, mCellStore);
|
|
|
|
return ptr;
|
2010-07-05 10:09:04 +00:00
|
|
|
}
|
2010-09-15 10:22:06 +00:00
|
|
|
|
2012-11-08 14:50:18 +00:00
|
|
|
void setBirthSign(const std::string &sign) {
|
|
|
|
mSign = sign;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::string &getBirthSign() const {
|
|
|
|
return mSign;
|
|
|
|
}
|
|
|
|
|
2012-07-07 18:53:19 +00:00
|
|
|
void setDrawState (MWMechanics::DrawState_ state);
|
2012-04-08 10:25:33 +00:00
|
|
|
|
2012-06-06 18:29:30 +00:00
|
|
|
bool getAutoMove() const
|
2011-01-18 14:20:36 +00:00
|
|
|
{
|
|
|
|
return mAutoMove;
|
|
|
|
}
|
|
|
|
|
2012-07-07 18:53:19 +00:00
|
|
|
MWMechanics::DrawState_ getDrawState(); /// \todo constness
|
2012-04-08 10:25:33 +00:00
|
|
|
|
2011-02-03 11:16:59 +00:00
|
|
|
void setAutoMove (bool enable);
|
2011-01-18 14:20:36 +00:00
|
|
|
|
2011-02-03 11:16:59 +00:00
|
|
|
void setLeftRight (int value);
|
2011-01-18 14:20:36 +00:00
|
|
|
|
2011-02-03 11:16:59 +00:00
|
|
|
void setForwardBackward (int value);
|
2012-06-29 16:54:23 +00:00
|
|
|
void setUpDown(int value);
|
2011-01-18 14:20:36 +00:00
|
|
|
|
2011-02-03 11:16:59 +00:00
|
|
|
void toggleRunning();
|
2011-01-18 14:20:36 +00:00
|
|
|
};
|
2010-06-21 21:39:59 +00:00
|
|
|
}
|
|
|
|
#endif
|