From 96c42525c1f214323838a61cc86f6599da133460 Mon Sep 17 00:00:00 2001 From: Kiyoshi Kyokai Date: Sun, 20 Feb 2005 08:50:16 +0000 Subject: skill system started. Skill Dialog down for now --- src/gui/skill.h | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'src/gui/skill.h') diff --git a/src/gui/skill.h b/src/gui/skill.h index 5db90f04..b0c9b901 100644 --- a/src/gui/skill.h +++ b/src/gui/skill.h @@ -24,19 +24,26 @@ #ifndef _TMW_SKILL_H #define _TMW_SKILL_H + #include #include "window.h" - -struct SKILL { - short id; /**< Index into "skill_db" array */ - short lv, sp; -}; - +#include /** * The skill dialog. * * \ingroup GUI */ + +// skill struct, by Kyokai +// skill names are stored in a table elsewhere. (SkillDialog.cpp) +typedef struct { + short level; // level of the skill + short exp; // exp value + double mod; // value of the modifier (0,0.5,1,2,4) + // next value can be calculated when needed by the function: + // 20 * level^1.2 + } SKILL; + class SkillDialog : public Window, public gcn::ActionListener, public gcn::ListModel { @@ -47,8 +54,6 @@ class SkillDialog : public Window, public gcn::ActionListener, gcn::Button *incButton; gcn::Button *closeButton; - std::vector skillList; - public: /** * Constructor. @@ -61,15 +66,6 @@ class SkillDialog : public Window, public gcn::ActionListener, ~SkillDialog(); void action(const std::string&); - - void setPoints(int i); - - int getNumberOfElements(); - std::string getElementAt(int); - - bool hasSkill(int id); - void addSkill(int id, int lv, int sp); - void setSkill(int id, int lv, int sp); }; #endif -- cgit v1.2.3-70-g09d2