1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 13:49:55 +00:00
openmw-tes3mp/apps/openmw/mwworld/player.hpp

117 lines
2.2 KiB
C++
Raw Normal View History

#ifndef GAME_MWWORLD_PLAYER_H
#define GAME_MWWORLD_PLAYER_H
#include "OgreCamera.h"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/refdata.hpp"
2010-07-26 10:59:50 +00: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 10:59:50 +00:00
{
LiveCellRef<ESM::NPC> mPlayer;
MWWorld::CellStore *mCellStore;
2011-01-06 09:07:01 +00:00
std::string mName;
bool mMale;
std::string mRace;
std::string mBirthsign;
ESM::Class *mClass;
2011-01-18 14:20:36 +00:00
bool mAutoMove;
2011-02-03 11:16:59 +00:00
int mForwardBackward;
2011-01-06 09:07:01 +00:00
public:
2010-06-22 08:15:22 +00:00
Player(const ESM::NPC *player, const MWBase::World& world);
2011-01-06 09:07:01 +00:00
~Player();
void setCell (MWWorld::CellStore *cellStore)
2011-01-06 09:07:01 +00:00
{
mCellStore = cellStore;
}
MWWorld::Ptr getPlayer()
{
MWWorld::Ptr ptr (&mPlayer, mCellStore);
return ptr;
}
void setName (const std::string& name)
{
mName = name;
}
void setGender (bool male)
{
mMale = male;
}
void setRace (const std::string& race)
{
mRace = race;
}
void setBirthsign (const std::string& birthsign)
{
mBirthsign = birthsign;
}
void setClass (const ESM::Class& class_);
2012-07-07 18:53:19 +00:00
void setDrawState (MWMechanics::DrawState_ state);
std::string getName() const
{
return mName;
}
bool isMale() const
{
return mMale;
}
std::string getRace() const
{
return mRace;
}
std::string getBirthsign() const
{
return mBirthsign;
}
const ESM::Class& getClass() const
{
return *mClass;
}
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
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);
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
};
}
#endif