1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/openmw/mwworld/player.hpp

72 lines
1.5 KiB
C++
Raw Normal View History

#ifndef GAME_MWWORLD_PLAYER_H
#define GAME_MWWORLD_PLAYER_H
#include "../mwworld/cellstore.hpp"
#include "../mwworld/refdata.hpp"
2010-07-26 12:59:50 +02:00
#include "../mwworld/ptr.hpp"
#include "../mwmechanics/drawstate.hpp"
namespace MWBase
{
class World;
}
namespace MWWorld
{
class CellStore;
/// \brief NPC object representing the player and additional player data
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
Player(const ESM::NPC *player, const MWBase::World& world);
void setCell (MWWorld::CellStore *cellStore)
2011-01-06 10:07:01 +01:00
{
mCellStore = cellStore;
}
MWWorld::Ptr getPlayer()
{
MWWorld::Ptr ptr (&mPlayer, mCellStore);
return ptr;
}
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-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
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);
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
};
}
#endif