summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-14 19:27:32 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-14 19:27:32 +0100
commit7a368588910a3eba156e1d3af60f013a5315723b (patch)
tree9376fb4cc193f5d52f815827a33277e885b56399
parent98cefca2ae887162d0b2eccc0d37e5dd30088481 (diff)
downloadmana-7a368588910a3eba156e1d3af60f013a5315723b.tar.gz
mana-7a368588910a3eba156e1d3af60f013a5315723b.tar.bz2
mana-7a368588910a3eba156e1d3af60f013a5315723b.tar.xz
mana-7a368588910a3eba156e1d3af60f013a5315723b.zip
Removed the unused NewSkillDialog
Won't be introduced based on eAthena anyway, I think even with tmwserv we have different plans now. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl> (cherry picked from eAthena branch, commit bab09df7a8347f39221b2a87487dcd128a686def) Conflicts: src/game.cpp
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/game.cpp5
-rw-r--r--src/gui/newskill.cpp193
-rw-r--r--src/gui/newskill.h69
5 files changed, 0 insertions, 271 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a568270a..60eaff74 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -136,8 +136,6 @@ SET(SRCS
gui/minimap.h
gui/ministatus.cpp
gui/ministatus.h
- gui/newskill.cpp
- gui/newskill.h
gui/npclistdialog.cpp
gui/npclistdialog.h
gui/npcpostdialog.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 09593659..6acf9d18 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -88,8 +88,6 @@ tmw_SOURCES = gui/widgets/avatar.cpp \
gui/minimap.h \
gui/ministatus.cpp \
gui/ministatus.h \
- gui/newskill.cpp \
- gui/newskill.h \
gui/npclistdialog.cpp \
gui/npclistdialog.h \
gui/npcpostdialog.cpp \
diff --git a/src/game.cpp b/src/game.cpp
index ee1efb66..2e0a3cb5 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -118,7 +118,6 @@ NpcTextDialog *npcTextDialog;
NpcPostDialog *npcPostDialog;
SkillDialog *skillDialog;
MagicDialog *magicDialog;
-//NewSkillDialog *newSkillWindow;
Setup* setupWindow;
Minimap *minimap;
EquipmentWindow *equipmentWindow;
@@ -205,7 +204,6 @@ void createGuiWindows()
npcPostDialog = new NpcPostDialog();
skillDialog = new SkillDialog();
magicDialog = new MagicDialog();
- //newSkillWindow = new NewSkillDialog();
setupWindow = new Setup();
minimap = new Minimap();
equipmentWindow = new EquipmentWindow(player_node->mEquipment.get());
@@ -253,7 +251,6 @@ void destroyGuiWindows()
delete setupWindow;
delete minimap;
delete equipmentWindow;
- //delete newSkillWindow;
delete tradeWindow;
//delete buddyWindow;
delete guildWindow;
@@ -519,8 +516,6 @@ void Game::handleInput()
used = true;
break;
- //case SDLK_F11: requestedWindow = newSkillWindow; break;
-
case SDLK_RETURN:
// Input chat window
if (chatWindow->isInputFocused() ||
diff --git a/src/gui/newskill.cpp b/src/gui/newskill.cpp
deleted file mode 100644
index 20fc01bd..00000000
--- a/src/gui/newskill.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * The Mana World
- * Copyright 2004 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * The Mana World is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * The Mana World is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Mana World; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- /* This file implements the new skill dialog for use under the latest
- * version of the skill system as of 2005/02/20
- */
-
-#include "newskill.h"
-
-#include <guichan/widgets/label.hpp>
-
-#include "button.h"
-#include "progressbar.h"
-
-#include "../graphics.h"
-
-const char *skill_name[] = {
- // 0-99
- // weapon skills 0-9
- "Short Blades", "Long Blades", "Hammers", "Archery", "Whip",
- "Staves", "Throwing", "Piercing", "Hand to Hand", NULL,
- // magic skills 10-19
- "Epyri (Fire)", "Merene (Water)", "Geon (Earth)", "Izurial (Air)",
- "Lumine (Light)", "Tenebrae (Dark)", "Chronos (Time)", "Teless (Space)",
- "Gen (Mana)", NULL,
- // craft skills 20-29
- "Metalworking", "Woodworking", "Jeweler", "Cook", "Tailor",
- "Alchemist", "Artisan", "Synthesis", NULL, NULL,
- // general skills 30-39
- "Running", "Searching", "Sneak", "Trading", "Intimidate",
- "Athletics", NULL, NULL, NULL,NULL,
- // combat skills 40-49
- "Dodge", "Accuracy", "Critical", "Block", "Parry", "Diehard", "Magic Aura",
- "Counter", NULL, NULL,
- // resistance skills 50-59
- "Poison", "Silence", "Petrify", "Paralyze", "Blind", "Slow", "Zombie",
- "Critical", NULL, NULL,
- // element reistance 60-69
- "Heat (Fire)", "Chill (Water)", "Stone (Earth)", "Wind (Air)",
- "Shine (Light)", "Shadow (Dark)", "Decay (Time)", "Chaos (Space)", NULL,
- NULL,
- // hunting skills 70-79
- "Insects", "Birds", "Lizards", "Amorphs", "Undead", "Machines", "Arcana",
- "Humanoids", "Plantoids", NULL,
- // stats 80-89
- "Strength", "Fortitude", "Vitality", "Menality", "Awareness", "Mana",
- "Dexterity", NULL, NULL, NULL,
- // unused (reserved) 90-99
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
-};
-
-
-NewSkillDialog::NewSkillDialog():
- Window("Skills")
-{
- startPoint = 0;
- for (int i = 0; i < N_SKILL_CAT_SIZE; i++)
- {
- mSkillLabel[i] = new gcn::Label("Empty ");
- mSkillLevel[i] = new gcn::Label("00000");
- mSkillbar[i] = new ProgressBar(0.0f,100,15,0,0,255);
- mSkillLevel[i]->setAlignment(Graphics::RIGHT);
- add(mSkillLabel[i],40,5+i*25);
- add(mSkillLevel[i],150,5+i*25);
- add(mSkillbar[i],180,5+i*25);
- }
- // initialize the skills
- for (int i = 0; i < N_SKILL; i++)
- {
- mPlayerSkill[i].level = 0;
- mPlayerSkill[i].exp = 0;
- }
- resetNSD();
-
- // create controls
- Button *catButton[N_SKILL_CAT];
- catButton[0] = new Button("Weapons", "g1", this);
- catButton[1] = new Button("Magic", "g2", this);
- catButton[2] = new Button("Craft", "g3", this);
- catButton[3] = new Button("General", "g4", this);
- catButton[4] = new Button("Combat", "g5", this);
- catButton[5] = new Button("E. Resist", "g6", this);
- catButton[6] = new Button("S. Resist", "g7", this);
- catButton[7] = new Button("Hunting", "g8", this);
- catButton[8] = new Button("Stat", "g9", this);
-
- setContentSize(350, 250);
-
- for (int i = 0; i < 9; ++i) {
- catButton[i]->setDimension(gcn::Rectangle(0, 0, 60, 20));
- catButton[i]->setPosition(290, 20 * i);
- add(catButton[i]);
- }
-
- Button *closeButton = new Button("Close", "close", this);
- closeButton->setDimension(gcn::Rectangle(0,0,60,20));
- closeButton->setPosition(290, 230);
- add(closeButton);
-
- // finsihing touches
- setLocationRelativeTo(getParent());
-}
-
-void NewSkillDialog::action(const gcn::ActionEvent &event)
-{
- int osp = startPoint;
- if (event.getId() == "close")
- {
- setVisible(false);
- }
- else if (event.getId() == "g1") // weapons group 0-9
- {
- startPoint =0;
- }
- else if (event.getId() == "g2") // magic group 10-19
- {
- startPoint =10;
- }
- else if (event.getId() == "g3") // craft group 20-29
- {
- startPoint =20;
- }
- else if (event.getId() == "g4") // general group 30-39
- {
- startPoint =30;
- }
- else if (event.getId() == "g5") // combat group 40-49
- {
- startPoint =40;
- }
- else if (event.getId() == "g6") // e. resist group 50-59
- {
- startPoint =50;
- }
- else if (event.getId() == "g7") // s resist group 60-69
- {
- startPoint =60;
- }
- else if (event.getId() == "g8") // hunting group 70-79
- {
- startPoint =70;
- }
- else if (event.getId() == "g9") // stats group 80-89
- {
- startPoint =80;
- }
- if (osp != startPoint)
- {
- resetNSD();
- }
-}
-
-void NewSkillDialog::resetNSD()
-{
- for (int a = 0; a < N_SKILL_CAT_SIZE; a++)
- {
- if (skill_name[a + startPoint])
- {
- mSkillLabel[a]->setCaption(skill_name[a + startPoint]);
- mSkillLabel[a]->setVisible(true);
- char tmp[5];
- sprintf(tmp, "%d", mPlayerSkill[a+startPoint].level);
- mSkillLevel[a]->setCaption(tmp);
- mSkillLevel[a]->setVisible(true);
- mSkillbar[a]->setProgress(0.0f);
- mSkillbar[a]->setVisible(true);
- }
- else
- {
- mSkillLevel[a]->setVisible(false);
- mSkillLabel[a]->setVisible(false);
- mSkillbar[a]->setVisible(false);
- }
- }
-}
diff --git a/src/gui/newskill.h b/src/gui/newskill.h
deleted file mode 100644
index 49476e5e..00000000
--- a/src/gui/newskill.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * The Mana World
- * Copyright 2004 The Mana World Development Team
- *
- * This file is part of The Mana World.
- *
- * The Mana World is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * The Mana World is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Mana World; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef _TMW_NSKILL_H
-#define _TMW_NSKILL_H
-
-#include <guichan/actionlistener.hpp>
-
-#include "window.h"
-
-#include "../guichanfwd.h"
-
-class ProgressBar;
-
-#define N_SKILL 100 // skill count constant
-#define N_SKILL_CAT 9 // skill category count
-#define N_SKILL_CAT_SIZE 10 // skill category maximum size
-
-struct nSkill {
- short level;
- short exp;
-};
-
-/**
- * Dialog showing the skills in the planned skill model.
- *
- * \ingroup Interface
- */
-class NewSkillDialog : public Window, public gcn::ActionListener
-{
- public:
- /**
- * Constructor.
- */
- NewSkillDialog();
-
- // action listener
- void action(const gcn::ActionEvent &event);
-
- private:
- void resetNSD(); // updates the values in the dialog box
-
- // members
- int startPoint; // starting point of skill listing
- ProgressBar *mSkillbar[N_SKILL_CAT_SIZE];
- gcn::Label *mSkillLabel[N_SKILL_CAT_SIZE];
- gcn::Label *mSkillLevel[N_SKILL_CAT_SIZE];
- nSkill mPlayerSkill[N_SKILL]; // pointer to an array of skill values
-};
-
-#endif