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