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
|
|
|
|
2010-07-05 12:09:04 +02:00
|
|
|
#include "../mwworld/refdata.hpp"
|
2013-04-04 11:23:17 +02:00
|
|
|
#include "../mwworld/livecellref.hpp"
|
2010-07-05 12:09:04 +02:00
|
|
|
|
2012-04-08 12:25:33 +02:00
|
|
|
#include "../mwmechanics/drawstate.hpp"
|
|
|
|
|
2013-04-04 11:23:17 +02:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
struct NPC;
|
|
|
|
}
|
|
|
|
|
2012-07-03 12:30:50 +02:00
|
|
|
namespace MWBase
|
|
|
|
{
|
|
|
|
class World;
|
2013-04-04 11:23:17 +02:00
|
|
|
class Ptr;
|
2012-07-03 12:30:50 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2013-05-15 17:54:18 +02:00
|
|
|
void set (const ESM::NPC *player);
|
|
|
|
|
2013-04-04 11:23:17 +02:00
|
|
|
void setCell (MWWorld::CellStore *cellStore);
|
2010-06-21 23:39:59 +02:00
|
|
|
|
2013-04-04 11:23:17 +02:00
|
|
|
MWWorld::Ptr getPlayer();
|
2010-09-15 12:22:06 +02:00
|
|
|
|
2013-04-04 11:23:17 +02:00
|
|
|
void setBirthSign(const std::string &sign);
|
2012-11-08 18:50:18 +04:00
|
|
|
|
2013-04-04 11:23:17 +02:00
|
|
|
const std::string &getBirthSign() const;
|
2012-11-08 18:50:18 +04:00
|
|
|
|
2012-07-07 20:53:19 +02:00
|
|
|
void setDrawState (MWMechanics::DrawState_ state);
|
2012-04-08 12:25:33 +02:00
|
|
|
|
2013-04-04 11:23:17 +02:00
|
|
|
bool getAutoMove() const;
|
2011-01-18 15:20:36 +01:00
|
|
|
|
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
|
|
|
|
2013-02-06 17:51:47 -08:00
|
|
|
void setRunState(bool run);
|
2013-03-06 16:58:56 +01:00
|
|
|
void setSneak(bool sneak);
|
2013-03-31 02:57:22 -07:00
|
|
|
|
2013-06-12 16:07:46 +02:00
|
|
|
void yaw(float yaw);
|
|
|
|
void pitch(float pitch);
|
|
|
|
void roll(float roll);
|
2011-01-18 15:20:36 +01:00
|
|
|
};
|
2010-06-21 23:39:59 +02:00
|
|
|
}
|
|
|
|
#endif
|