D'angband  0.0.0
Deeangband
 全て クラス 名前空間 ファイル 関数 変数 型定義 列挙型 列挙値 フレンド マクロ定義 ページ
GameElement.cpp
[詳解]
1 
9 #include "stdafx.h"
10 #include "GameElement.h"
11 
12 namespace Deeangband
13 {
14  GameElement::GameElement(void)
15  {
16  this->WipeData();
17  return;
18  }
19 
20  GameElement::‾GameElement(void)
21  {
22  this->WipeData();
23  return;
24  }
25 
26  void GameElement::WipeData(void)
27  {
28  this->name = "";
29  this->description = "";
30  this->validGenerated = false;
31  }
32 
33  NAME GameElement::GetName()
34  {
35  return this->name;
36  }
37 
38  DESCRIPTION GameElement::GetDescription()
39  {
40  return this->description;
41  }
42 
43  bool GameElement::IsValidGenerated(void)
44  {
45  return this->validGenerated;
46  }
47 
48  std::string GameElement::WeightFormat(WEIGHT weight)
49  {
50  char buf[20];
51  sprintf_s(buf, "%6.1fkg", weight);
52  return std::string(&buf[0]);
53  }
54 
55  std::string GameElement::HeightFormat(HEIGHT height)
56  {
57  char buf[20];
58  sprintf_s(buf, "%6.2fm", height / 100.0f);
59  return std::string(&buf[0]);
60  }
61 
62 }
double WEIGHT
重量
Definition: Deeangband.h:149
std::string NAME
名称
Definition: Deeangband.h:145
std::string DESCRIPTION
解説
Definition: Deeangband.h:146
標準のシステム インクルード ファイルのインクルード ファイル、または 参照回数が多く、かつあまり変更さ...
double HEIGHT
長さ
Definition: Deeangband.h:148
bool validGenerated
正しく生成されたかの判定フラグ
Definition: GameElement.h:47
GameElementクラスと付随要素のプロトタイプ
DESCRIPTION description
解説
Definition: GameElement.h:46