メインページ | ネームスペース一覧 | クラス階層 | アルファベット順一覧 | 構成 | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ

character.hxx

説明を見る。
00001 #ifndef CHARACTER_HXX_
00002 # define CHARACTER_HXX_
00003 
00004 namespace objects
00005 {
00006   inline int Character::get_id() const
00007   {
00008     return _id;
00009   }
00010 
00011   inline const std::string &Character::get_name() const
00012   {
00013     return _name;
00014   }
00015 
00016   inline void Character::set_name(const std::string &name)
00017   {
00018     _name = name;
00019   }
00020   
00021   inline int Character::get_pos_x() const
00022   {
00023     return _pos_x;
00024   }
00025 
00026   inline int Character::get_pos_y() const
00027   {
00028     return _pos_y;
00029   }
00030 
00031   inline int Character::get_pos_z() const
00032   {
00033     return _pos_z;
00034   }
00035 
00036   inline void Character::set_pos_x(int x)
00037   {
00038     _pos_x = x;
00039   }
00040   
00041   inline void Character::set_pos_y(int y)
00042   {
00043     _pos_y = y;
00044   }
00045   
00046   inline void Character::set_pos_z(int z)
00047   {
00048     _pos_z = z;
00049   }
00050 
00051   inline int Character::get_class() const
00052   {
00053     return _class;
00054   }
00055   
00056   inline void Character::set_class(int character_class)
00057   {
00058     _class = character_class;
00059   }
00060 
00061   inline Character *Character::get_target() const
00062   {
00063     return _target;
00064   }
00065   
00066   inline void Character::set_target(Character *c)
00067   {
00068     _target = c;
00069   }
00070 
00071   inline bool Character::is_player()
00072   {
00073     return _id > 0;
00074   }
00075   
00076   inline bool Character::is_monster()
00077   {
00078     return _id < 0 && _class > 0x0200;
00079   }
00080   
00081   inline bool Character::is_npc()
00082   {
00083     return _id < 0 && _class < 0x0200;
00084   }
00085 
00086   inline int Character::get_hp() const
00087   {
00088     return _hp;
00089   }
00090 
00091   inline void Character::set_hp(int hp)
00092   {
00093     _hp = hp;
00094   }
00095 
00096   inline bool Character::is_dead() const
00097   {
00098     return _dead || _hp <= 0;
00099   }
00100 
00101   inline void Character::set_dead(bool dead)
00102   {
00103     _dead = dead;
00104   }
00105 
00106   inline int Character::get_status_flag() const
00107   {
00108     return _status_flag;
00109   }
00110 
00111   inline void Character::set_status_flag(int i)
00112   {
00113     _status_flag = i;
00114   }
00115 }
00116 
00117 #endif

Cronous Emulatorに対してWed Aug 17 06:01:21 2005に生成されました。  doxygen 1.4.2-20050421