summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/buy.cpp7
-rw-r--r--src/gui/buy.h10
-rw-r--r--src/gui/buysell.cpp4
-rw-r--r--src/gui/buysell.h7
-rw-r--r--src/gui/char_select.cpp17
-rw-r--r--src/gui/char_select.h14
-rw-r--r--src/gui/chat.cpp7
-rw-r--r--src/gui/chat.h8
-rw-r--r--src/gui/npc_text.cpp7
-rw-r--r--src/gui/npc_text.h10
-rw-r--r--src/gui/npcintegerdialog.cpp7
-rw-r--r--src/gui/npcintegerdialog.h10
-rw-r--r--src/gui/npclistdialog.cpp7
-rw-r--r--src/gui/npclistdialog.h11
-rw-r--r--src/gui/npcstringdialog.cpp7
-rw-r--r--src/gui/npcstringdialog.h11
-rw-r--r--src/gui/sell.cpp6
-rw-r--r--src/gui/sell.h10
-rw-r--r--src/gui/storagewindow.cpp3
-rw-r--r--src/gui/storagewindow.h4
-rw-r--r--src/gui/trade.cpp5
-rw-r--r--src/gui/trade.h11
22 files changed, 15 insertions, 168 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index 003e730e..6d336e4c 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -46,15 +46,8 @@
#include "utils/gettext.h"
#include "utils/strprintf.h"
-#ifdef TMWSERV_SUPPORT
BuyDialog::BuyDialog():
-#else
-BuyDialog::BuyDialog(Network *network):
-#endif
Window(_("Buy")),
-#ifndef TMWSERV_SUPPORT
- mNetwork(network),
-#endif
mMoney(0), mAmountItems(0), mMaxItems(0)
{
setWindowName("Buy");
diff --git a/src/gui/buy.h b/src/gui/buy.h
index 200394b9..1e022652 100644
--- a/src/gui/buy.h
+++ b/src/gui/buy.h
@@ -29,9 +29,6 @@
#include "../guichanfwd.h"
-#ifndef TMWSERV_SUPPORT
-class Network;
-#endif
class ShopItems;
class ShopListBox;
class ListBox;
@@ -50,11 +47,7 @@ class BuyDialog : public Window, public gcn::ActionListener,
*
* @see Window::Window
*/
-#ifdef TMWSERV_SUPPORT
BuyDialog();
-#else
- BuyDialog(Network *network);
-#endif
/**
* Destructor
@@ -116,9 +109,6 @@ class BuyDialog : public Window, public gcn::ActionListener,
*/
void close();
private:
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
gcn::Button *mBuyButton;
gcn::Button *mQuitButton;
gcn::Button *mAddMaxButton;
diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp
index f45a5adb..8fffd3d5 100644
--- a/src/gui/buysell.cpp
+++ b/src/gui/buysell.cpp
@@ -31,8 +31,8 @@
#include "../utils/gettext.h"
-BuySellDialog::BuySellDialog(Network *network):
- Window(_("Shop")), mNetwork(network)
+BuySellDialog::BuySellDialog():
+ Window(_("Shop"))
{
setWindowName("BuySell");
Button *buyButton = 0;
diff --git a/src/gui/buysell.h b/src/gui/buysell.h
index 4b137554..ff956e09 100644
--- a/src/gui/buysell.h
+++ b/src/gui/buysell.h
@@ -26,8 +26,6 @@
#include "window.h"
-class Network;
-
/**
* A dialog to choose between buying or selling at a shop.
*
@@ -42,7 +40,7 @@ class BuySellDialog : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
- BuySellDialog(Network *network);
+ BuySellDialog();
/**
* Check for current NPC
@@ -55,9 +53,6 @@ class BuySellDialog : public Window, public gcn::ActionListener
* Called when receiving actions from the widgets.
*/
void action(const gcn::ActionEvent &event);
-
- private:
- Network *mNetwork;
};
extern BuySellDialog *buySellDialog;
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index b6cd47d4..a0f7230e 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -100,12 +100,13 @@ void CharDeleteConfirm::action(const gcn::ActionEvent &event)
CharSelectDialog::CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
LoginData *loginData):
Window(_("Account and Character Management")),
- mCharInfo(charInfo), mCharSelected(false), mLoginData(loginData)
+ mCharInfo(charInfo),
+ mCharSelected(false),
+ mLoginData(loginData)
#else
-CharSelectDialog::CharSelectDialog(Network *network,
- LockedArray<LocalPlayer*> *charInfo,
+CharSelectDialog::CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
Gender gender):
- Window(_("Select Character")), mNetwork(network),
+ Window(_("Select Character")),
mCharInfo(charInfo),
mCharSelected(false),
mGender(gender)
@@ -261,8 +262,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event)
{
// Start new character dialog
CharCreateDialog *charCreateDialog =
- new CharCreateDialog(this, mCharInfo->getPos(),
- mNetwork, mGender);
+ new CharCreateDialog(this, mCharInfo->getPos(), mGender);
charServerHandler.setCharCreateDialog(charCreateDialog);
}
}
@@ -398,13 +398,10 @@ bool CharSelectDialog::selectByName(const std::string &name)
#ifdef TMWSERV_SUPPORT
CharCreateDialog::CharCreateDialog(Window *parent, int slot):
#else
-CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network,
+CharCreateDialog::CharCreateDialog(Window *parent, int slot,
Gender gender):
#endif
Window(_("Create Character"), true, parent),
-#ifndef TMWSERV_SUPPORT
- mNetwork(network),
-#endif
mSlot(slot)
{
mPlayer = new Player(0, 0, NULL);
diff --git a/src/gui/char_select.h b/src/gui/char_select.h
index b29953d3..cf770010 100644
--- a/src/gui/char_select.h
+++ b/src/gui/char_select.h
@@ -32,8 +32,6 @@
#ifdef TMWSERV_SUPPORT
#include "../logindata.h"
-#else
-class Network;
#endif
class LocalPlayer;
@@ -56,8 +54,7 @@ class CharSelectDialog : public Window, public gcn::ActionListener
CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
LoginData *loginData);
#else
- CharSelectDialog(Network *network,
- LockedArray<LocalPlayer*> *charInfo,
+ CharSelectDialog(LockedArray<LocalPlayer*> *charInfo,
Gender gender);
#endif
@@ -70,9 +67,6 @@ class CharSelectDialog : public Window, public gcn::ActionListener
bool selectByName(const std::string &name);
private:
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
LockedArray<LocalPlayer*> *mCharInfo;
gcn::Button *mSelectButton;
@@ -129,8 +123,7 @@ class CharCreateDialog : public Window, public gcn::ActionListener
#ifdef TMWSERV_SUPPORT
CharCreateDialog(Window *parent, int slot);
#else
- CharCreateDialog(Window *parent, int slot, Network *network,
- Gender gender);
+ CharCreateDialog(Window *parent, int slot, Gender gender);
#endif
/**
@@ -162,9 +155,6 @@ class CharCreateDialog : public Window, public gcn::ActionListener
*/
void attemptCharCreate();
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
gcn::TextField *mNameField;
gcn::Label *mNameLabel;
gcn::Button *mNextHairColorButton;
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 5b07980b..987de11e 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -40,13 +40,8 @@
#include <guichan/focushandler.hpp>
-#ifdef TMWSERV_SUPPORT
ChatWindow::ChatWindow():
- Window("Chat"),
-#else
-ChatWindow::ChatWindow(Network * network):
- Window(""), mNetwork(network),
-#endif
+ Window(_("Chat")),
mTmpVisible(false)
{
setWindowName("Chat");
diff --git a/src/gui/chat.h b/src/gui/chat.h
index ac4e491e..54270055 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -40,9 +40,6 @@ class Recorder;
class ScrollArea;
class TabbedArea;
class ItemLinkHandler;
-#ifdef EATHENA_SUPPORT
-class Network;
-#endif
class Tab;
class WhisperTab;
@@ -69,11 +66,7 @@ class ChatWindow : public Window,
/**
* Constructor.
*/
-#ifdef TMWSERV_SUPPORT
ChatWindow();
-#else
- ChatWindow(Network *network);
-#endif
/**
* Destructor: used to write back values to the config file
@@ -190,7 +183,6 @@ class ChatWindow : public Window,
void adjustTabSize();
#ifdef EATHENA_SUPPORT
- Network *mNetwork;
char mPartyPrefix; /**< Messages beginning with the prefix are sent to
the party */
#endif
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp
index bf7b60ed..31f48486 100644
--- a/src/gui/npc_text.cpp
+++ b/src/gui/npc_text.cpp
@@ -37,15 +37,8 @@
#include "../utils/gettext.h"
-#ifdef TMWSERV_SUPPORT
NpcTextDialog::NpcTextDialog()
-#else
-NpcTextDialog::NpcTextDialog(Network *network)
-#endif
: Window(_("NPC"))
-#ifdef EATHENA_SUPPORT
- , mNetwork(network)
-#endif
, mState(NPC_TEXT_STATE_WAITING)
{
setWindowName("NPCText");
diff --git a/src/gui/npc_text.h b/src/gui/npc_text.h
index 16c1d5fd..231ac684 100644
--- a/src/gui/npc_text.h
+++ b/src/gui/npc_text.h
@@ -30,9 +30,6 @@
#include "../npc.h"
-#ifdef EATHENA_SUPPORT
-class Network;
-#endif
class TextBox;
/**
@@ -48,11 +45,7 @@ class NpcTextDialog : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
-#ifdef TMWSERV_SUPPORT
NpcTextDialog();
-#else
- NpcTextDialog(Network *network);
-#endif
/**
* Called when receiving actions from the widgets.
@@ -101,9 +94,6 @@ class NpcTextDialog : public Window, public gcn::ActionListener
void widgetResized(const gcn::Event &event);
private:
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
gcn::ScrollArea *mScrollArea;
TextBox *mTextBox;
gcn::Button *mButton;
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp
index 4dae8d83..4d2ae1ce 100644
--- a/src/gui/npcintegerdialog.cpp
+++ b/src/gui/npcintegerdialog.cpp
@@ -36,15 +36,8 @@
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
-#ifdef TMWSERV_SUPPORT
NpcIntegerDialog::NpcIntegerDialog()
-#else
-NpcIntegerDialog::NpcIntegerDialog(Network *network)
-#endif
: Window(_("NPC Number Request"))
-#ifdef EATHENA_SUPPORT
- , mNetwork(network)
-#endif
{
setWindowName("NPCInteger");
mValueField = new IntTextField;
diff --git a/src/gui/npcintegerdialog.h b/src/gui/npcintegerdialog.h
index df74c904..bb3a8e20 100644
--- a/src/gui/npcintegerdialog.h
+++ b/src/gui/npcintegerdialog.h
@@ -26,9 +26,6 @@
#include "window.h"
-#ifdef EATHENA_SUPPORT
-class Network;
-#endif
class IntTextField;
/**
@@ -44,11 +41,7 @@ class NpcIntegerDialog : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
-#ifdef TMWSERV_SUPPORT
NpcIntegerDialog();
-#else
- NpcIntegerDialog(Network *network);
-#endif
/**
* Called when receiving actions from the widgets.
@@ -93,9 +86,6 @@ class NpcIntegerDialog : public Window, public gcn::ActionListener
void setVisible(bool visible);
private:
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
gcn::Button *mDecButton;
gcn::Button *mIncButton;
IntTextField *mValueField;
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index 6df0979f..efac8954 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -41,15 +41,8 @@
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
-#ifdef TMWSERV_SUPPORT
NpcListDialog::NpcListDialog()
-#else
-NpcListDialog::NpcListDialog(Network *network)
-#endif
: Window("NPC")
-#ifdef EATHENA_SUPPORT
- , mNetwork(network)
-#endif
{
setWindowName("NPCList");
setResizable(true);
diff --git a/src/gui/npclistdialog.h b/src/gui/npclistdialog.h
index 6c1e02e3..fa297304 100644
--- a/src/gui/npclistdialog.h
+++ b/src/gui/npclistdialog.h
@@ -29,10 +29,6 @@
#include <vector>
-#ifdef EATHENA_SUPPORT
-class Network;
-#endif
-
/**
* The npc list dialog.
*
@@ -47,11 +43,7 @@ class NpcListDialog : public Window, public gcn::ActionListener,
*
* @see Window::Window
*/
-#ifdef TMWSERV_SUPPORT
NpcListDialog();
-#else
- NpcListDialog(Network *network);
-#endif
/**
* Called when receiving actions from the widgets.
@@ -94,9 +86,6 @@ class NpcListDialog : public Window, public gcn::ActionListener,
void requestFocus();
private:
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
gcn::ListBox *mItemList;
std::vector<std::string> mItems;
diff --git a/src/gui/npcstringdialog.cpp b/src/gui/npcstringdialog.cpp
index 7297d7e8..e5137d9c 100644
--- a/src/gui/npcstringdialog.cpp
+++ b/src/gui/npcstringdialog.cpp
@@ -36,15 +36,8 @@
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
-#ifdef TMWSERV_SUPPORT
NpcStringDialog::NpcStringDialog()
-#else
-NpcStringDialog::NpcStringDialog(Network *network)
-#endif
: Window(_("NPC Text Request"))
-#ifdef EATHENA_SUPPORT
- , mNetwork(network)
-#endif
{
setWindowName("NPCString");
mValueField = new TextField("");
diff --git a/src/gui/npcstringdialog.h b/src/gui/npcstringdialog.h
index 94cd59b2..37d46cc0 100644
--- a/src/gui/npcstringdialog.h
+++ b/src/gui/npcstringdialog.h
@@ -26,10 +26,6 @@
#include <guichan/actionlistener.hpp>
-#ifdef EATHENA_SUPPORT
-class Network;
-#endif
-
/**
* The npc integer input dialog.
*
@@ -43,11 +39,7 @@ class NpcStringDialog : public Window, public gcn::ActionListener
*
* @see Window::Window
*/
-#ifdef TMWSERV_SUPPORT
NpcStringDialog();
-#else
- NpcStringDialog(Network *network);
-#endif
/**
* Called when receiving actions from the widgets.
@@ -79,9 +71,6 @@ class NpcStringDialog : public Window, public gcn::ActionListener
void setVisible(bool visible);
private:
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
gcn::TextField *mValueField;
std::string mDefault;
};
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 648bff08..1e1155a7 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -46,14 +46,8 @@
#include "utils/gettext.h"
#include "utils/strprintf.h"
-#ifdef TMWSERV_SUPPORT
SellDialog::SellDialog():
Window(_("Sell")),
-#else
-SellDialog::SellDialog(Network *network):
- Window(_("Sell")),
- mNetwork(network),
-#endif
mMaxItems(0), mAmountItems(0)
{
setWindowName("Sell");
diff --git a/src/gui/sell.h b/src/gui/sell.h
index b6388a1f..b3e59b4f 100644
--- a/src/gui/sell.h
+++ b/src/gui/sell.h
@@ -30,9 +30,6 @@
#include "window.h"
class Item;
-#ifdef EATHENA_SUPPORT
-class Network;
-#endif
class ShopItems;
class ShopListBox;
@@ -49,11 +46,7 @@ class SellDialog : public Window, gcn::ActionListener, gcn::SelectionListener
*
* @see Window::Window
*/
-#ifdef TMWSERV_SUPPORT
SellDialog();
-#else
- SellDialog(Network *network);
-#endif
/**
* Destructor
@@ -111,9 +104,6 @@ class SellDialog : public Window, gcn::ActionListener, gcn::SelectionListener
*/
void updateButtonsAndLabels();
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
gcn::Button *mSellButton;
gcn::Button *mQuitButton;
gcn::Button *mAddMaxButton;
diff --git a/src/gui/storagewindow.cpp b/src/gui/storagewindow.cpp
index 847886cb..690758ed 100644
--- a/src/gui/storagewindow.cpp
+++ b/src/gui/storagewindow.cpp
@@ -51,9 +51,8 @@
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
-StorageWindow::StorageWindow(Network *network, int invSize):
+StorageWindow::StorageWindow(int invSize):
Window(_("Storage")),
- mNetwork(network),
mMaxSlots(invSize),
mItemDesc(false)
{
diff --git a/src/gui/storagewindow.h b/src/gui/storagewindow.h
index cc0df2af..de0937b5 100644
--- a/src/gui/storagewindow.h
+++ b/src/gui/storagewindow.h
@@ -31,7 +31,6 @@
class Item;
class ItemContainer;
-class Network;
class ProgressBar;
class TextBox;
@@ -47,7 +46,7 @@ class StorageWindow : public Window, gcn::ActionListener,
/**
* Constructor.
*/
- StorageWindow(Network *network, int invSize = (STORAGE_SIZE - 1));
+ StorageWindow(int invSize = (STORAGE_SIZE - 1));
/**
* Destructor.
@@ -88,7 +87,6 @@ class StorageWindow : public Window, gcn::ActionListener,
void close();
private:
- Network *mNetwork;
ItemContainer *mItems;
int mSlots;
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 6cba1c41..6926eb82 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -51,14 +51,9 @@
#include "../utils/stringutils.h"
#include "../utils/strprintf.h"
-#ifdef TMWSERV_SUPPORT
TradeWindow::TradeWindow():
-#else
-TradeWindow::TradeWindow(Network *network):
-#endif
Window(_("Trade: You")),
#ifdef EATHENA_SUPPORT
- mNetwork(network),
mMyInventory(new Inventory(INVENTORY_SIZE, 2)),
mPartnerInventory(new Inventory(INVENTORY_SIZE, 2))
#else
diff --git a/src/gui/trade.h b/src/gui/trade.h
index 4c215ba6..e2767c5b 100644
--- a/src/gui/trade.h
+++ b/src/gui/trade.h
@@ -34,9 +34,6 @@
class Inventory;
class Item;
class ItemContainer;
-#ifdef EATHENA_SUPPORT
-class Network;
-#endif
class ScrollArea;
/**
@@ -50,11 +47,7 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener
/**
* Constructor.
*/
-#ifdef TMWSERV_SUPPORT
TradeWindow();
-#else
- TradeWindow(Network *network);
-#endif
/**
* Destructor.
@@ -139,10 +132,6 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener
void setStatus(Status);
#endif
-#ifdef EATHENA_SUPPORT
- Network *mNetwork;
-#endif
-
typedef const std::auto_ptr<Inventory> InventoryPtr;
InventoryPtr mMyInventory;
InventoryPtr mPartnerInventory;