From 294ebc3dc930208bce62f92abdd0255049a8593c Mon Sep 17 00:00:00 2001 From: Deskull Date: Wed, 12 Mar 2014 22:27:25 +0900 Subject: [PATCH] Add SetDammyData() to GameElement and Feature class. --- Deeangband/Feature.cpp | 35 ++++++++++++++++++++--------------- Deeangband/Feature.h | 21 +++++++++++++++------ Deeangband/GameElement.h | 5 +++++ 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/Deeangband/Feature.cpp b/Deeangband/Feature.cpp index abbe9f5..cf50a30 100644 --- a/Deeangband/Feature.cpp +++ b/Deeangband/Feature.cpp @@ -12,43 +12,48 @@ Feature::Feature(ID id, TAG tag, GameWorld *gameWorld) : GameElement(id, tag, gameWorld) { - name = "–¢’m‚Ì’nŒ`"; - symbol = 'X'; - symColor.r = 40; - symColor.g = 40; - symColor.b = 40; - symColor.a = 255; - backColor.r = 0; - backColor.g = 0; - backColor.b = 0; - backColor.a = 255; - + SetDammyData(); } Feature::Feature(void) { + SetDammyData(); } Feature::~Feature(void) { } -const ID Feature::GetTileID(void) +void Feature::SetDammyData(void) +{ + this->name = "–¢’m‚Ì’nŒ`"; + this->symbol = 'X'; + this->symColor.r = 40; + this->symColor.g = 40; + this->symColor.b = 40; + this->symColor.a = 255; + this->backColor.r = 0; + this->backColor.g = 0; + this->backColor.b = 0; + this->backColor.a = 255; +} + +ID Feature::GetTileID(void) { return this->tileID; } -const ID Feature::GetSymbol(void) +ID Feature::GetSymbol(void) { return this->symbol; } -const Color Feature::GetSymColor(void) +Color Feature::GetSymColor(void) { return this->symColor; } -const Color Feature::GetBackColor(void) +Color Feature::GetBackColor(void) { return this->backColor; } diff --git a/Deeangband/Feature.h b/Deeangband/Feature.h index b2bc3b9..0b50034 100644 --- a/Deeangband/Feature.h +++ b/Deeangband/Feature.h @@ -40,29 +40,38 @@ public: Feature::Feature(void); /*! - * @brief ƒ^ƒCƒ‹ID‚ð•Ô‚· - * @brief ƒ^ƒCƒ‹ID + * @brief ƒ_ƒ~[ƒf[ƒ^‚É‚æ‚鏉Šú‰» + * @return ‚È‚µ + */ + void Feature::SetDammyData(void); + + /*! + * @brief FeatureƒNƒ‰ƒXƒfƒXƒgƒ‰ƒNƒ^ */ Feature::~Feature(void); - const ID Feature::GetTileID(void); + /*! + * @brief ƒ^ƒCƒ‹ID‚ð•Ô‚· + * @brief ƒ^ƒCƒ‹ID + */ + ID Feature::GetTileID(void); /*! * @brief ’nŒ`‹L†‚ð•Ô‚· * @return ’nŒ`‹L† */ - const ID Feature::GetSymbol(void); + ID Feature::GetSymbol(void); /*! * @brief ƒVƒ“ƒ{ƒ‹ƒJƒ‰[‚ð•Ô‚· * @brief ƒVƒ“ƒ{ƒ‹ƒJƒ‰[ */ - const Color Feature::GetSymColor(void); + Color Feature::GetSymColor(void); /*! * @brief ”wŒiƒJƒ‰[‚ð•Ô‚· * @brief ”wŒiƒJƒ‰[ */ - const Color Feature::GetBackColor(void); + Color Feature::GetBackColor(void); }; diff --git a/Deeangband/GameElement.h b/Deeangband/GameElement.h index a8c67ae..1f3ae85 100644 --- a/Deeangband/GameElement.h +++ b/Deeangband/GameElement.h @@ -48,6 +48,11 @@ public: virtual GameElement::~GameElement(void); + /*! + * @brief ƒ_ƒ~[ƒf[ƒ^‚É‚æ‚鏉Šú‰» + * @return ‚È‚µ + */ + virtual void GameElement::SetDammyData(void) {} /*! * @brief ID‚ðÝ’è‚·‚é -- 2.11.0