diff options
Diffstat (limited to 'src/net')
48 files changed, 285 insertions, 281 deletions
diff --git a/src/net/messagehandler.cpp b/src/net/messagehandler.cpp index 85f10090..4cb6af0b 100644 --- a/src/net/messagehandler.cpp +++ b/src/net/messagehandler.cpp @@ -19,15 +19,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <cassert> +#include "net/messagehandler.h" -#include "messagehandler.h" #ifdef TMWSERV_SUPPORT -#include "tmwserv/network.h" +#include "net/tmwserv/network.h" #else -#include "ea/network.h" +#include "net/ea/network.h" #endif +#include <cassert> + MessageHandler::MessageHandler() #ifdef EATHENA_SUPPORT : mNetwork(0) diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index 813b440f..f365bb7f 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "messagein.h" +#include "net/messagein.h" #ifdef TMWSERV_SUPPORT #include <enet/enet.h> diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index f7ab6b41..4cb4dc36 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -19,12 +19,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "messageout.h" +#include "net/messageout.h" #ifdef TMWSERV_SUPPORT #include <enet/enet.h> #else -#include "ea/network.h" +#include "net/ea/network.h" + #include <SDL.h> #include <SDL_endian.h> #endif diff --git a/src/net/tmwserv/accountserver/account.cpp b/src/net/tmwserv/accountserver/account.cpp index 455db709..e6c1830b 100644 --- a/src/net/tmwserv/accountserver/account.cpp +++ b/src/net/tmwserv/accountserver/account.cpp @@ -21,15 +21,16 @@ #include "account.h" -#include <string> - #include "internal.h" -#include "../connection.h" -#include "../../messageout.h" -#include "../protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" + +#include "net/messageout.h" -#include "../../../utils/sha256.h" +#include "utils/sha256.h" + +#include <string> void Net::AccountServer::Account::createCharacter( const std::string &name, char hairStyle, char hairColor, char gender, diff --git a/src/net/tmwserv/accountserver/accountserver.cpp b/src/net/tmwserv/accountserver/accountserver.cpp index 0e2d3121..83895377 100644 --- a/src/net/tmwserv/accountserver/accountserver.cpp +++ b/src/net/tmwserv/accountserver/accountserver.cpp @@ -21,15 +21,16 @@ #include "accountserver.h" -#include <string> - #include "internal.h" -#include "../connection.h" -#include "../../messageout.h" -#include "../protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" + +#include "net/messageout.h" -#include "../../../utils/sha256.h" +#include "utils/sha256.h" + +#include <string> void Net::AccountServer::login(Net::Connection *connection, int version, const std::string &username, const std::string &password) diff --git a/src/net/tmwserv/beinghandler.cpp b/src/net/tmwserv/beinghandler.cpp index d001e963..1a1744cc 100644 --- a/src/net/tmwserv/beinghandler.cpp +++ b/src/net/tmwserv/beinghandler.cpp @@ -19,28 +19,27 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "beinghandler.h" +#include "net/tmwserv/beinghandler.h" -#include <SDL_types.h> +#include "net/tmwserv/protocol.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/messagein.h" -#include "../../being.h" -#include "../../beingmanager.h" -#include "../../game.h" -#include "../../localplayer.h" -#include "../../log.h" -#include "../../main.h" -#include "../../npc.h" -#include "../../particle.h" -#include "../../sound.h" +#include "being.h" +#include "beingmanager.h" +#include "game.h" +#include "localplayer.h" +#include "log.h" +#include "main.h" +#include "npc.h" +#include "particle.h" +#include "sound.h" -#include "../../gui/ok_dialog.h" +#include "gui/ok_dialog.h" -#include "../../utils/gettext.h" +#include "utils/gettext.h" -#include "gameserver/player.h" +#include "net/tmwserv/gameserver/player.h" const int EMOTION_TIME = 150; /**< Duration of emotion icon */ @@ -356,4 +355,3 @@ void BeingHandler::handleBeingDirChangeMessage(MessageIn &msg) case DIRECTION_RIGHT: being->setDirection(Being::RIGHT); break; } } - diff --git a/src/net/tmwserv/beinghandler.h b/src/net/tmwserv/beinghandler.h index 70ee3f65..0ca186f0 100644 --- a/src/net/tmwserv/beinghandler.h +++ b/src/net/tmwserv/beinghandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_BEINGHANDLER_H -#define NET_BEINGHANDLER_H +#ifndef NET_TMWSERV_BEINGHANDLER_H +#define NET_TMWSERV_BEINGHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class BeingHandler : public MessageHandler { diff --git a/src/net/tmwserv/buysellhandler.cpp b/src/net/tmwserv/buysellhandler.cpp index f12b4513..bab475d2 100644 --- a/src/net/tmwserv/buysellhandler.cpp +++ b/src/net/tmwserv/buysellhandler.cpp @@ -19,21 +19,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "buysellhandler.h" +#include "net/tmwserv/buysellhandler.h" -#include <SDL_types.h> +#include "net/tmwserv/protocol.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/messagein.h" -#include "../../beingmanager.h" -#include "../../item.h" -#include "../../localplayer.h" -#include "../../npc.h" +#include "beingmanager.h" +#include "item.h" +#include "localplayer.h" +#include "npc.h" -#include "../../gui/buy.h" -#include "../../gui/chat.h" -#include "../../gui/sell.h" +#include "gui/buy.h" +#include "gui/chat.h" +#include "gui/sell.h" extern BuyDialog *buyDialog; extern SellDialog *sellDialog; diff --git a/src/net/tmwserv/buysellhandler.h b/src/net/tmwserv/buysellhandler.h index 5bf58d8e..32f273f1 100644 --- a/src/net/tmwserv/buysellhandler.h +++ b/src/net/tmwserv/buysellhandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_BUYSELLHANDLER_H -#define NET_BUYSELLHANDLER_H +#ifndef NET_TMWSERV_BUYSELLHANDLER_H +#define NET_TMWSERV_BUYSELLHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class BuySellHandler : public MessageHandler { diff --git a/src/net/tmwserv/charserverhandler.cpp b/src/net/tmwserv/charserverhandler.cpp index 0a73ae8c..0779e499 100644 --- a/src/net/tmwserv/charserverhandler.cpp +++ b/src/net/tmwserv/charserverhandler.cpp @@ -19,20 +19,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "charserverhandler.h" +#include "net/tmwserv/charserverhandler.h" -#include "connection.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" -#include "../../game.h" -#include "../../localplayer.h" -#include "../../log.h" -#include "../../logindata.h" -#include "../../main.h" +#include "net/messagein.h" -#include "../../gui/ok_dialog.h" -#include "../../gui/char_select.h" +#include "game.h" +#include "localplayer.h" +#include "log.h" +#include "logindata.h" +#include "main.h" + +#include "gui/ok_dialog.h" +#include "gui/char_select.h" extern Net::Connection *gameServerConnection; extern Net::Connection *chatServerConnection; diff --git a/src/net/tmwserv/charserverhandler.h b/src/net/tmwserv/charserverhandler.h index dda41d0c..e1e13b55 100644 --- a/src/net/tmwserv/charserverhandler.h +++ b/src/net/tmwserv/charserverhandler.h @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_CHARSERVERHANDLER_H -#define NET_CHARSERVERHANDLER_H +#ifndef NET_TMWSERV_CHARSERVERHANDLER_H +#define NET_TMWSERV_CHARSERVERHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" -#include "../../lockedarray.h" +#include "lockedarray.h" class CharCreateDialog; class LocalPlayer; @@ -38,11 +38,9 @@ class CharServerHandler : public MessageHandler public: CharServerHandler(); - void - handleMessage(MessageIn &msg); + void handleMessage(MessageIn &msg); - void - setCharInfo(LockedArray<LocalPlayer*> *charInfo) + void setCharInfo(LockedArray<LocalPlayer*> *charInfo) { mCharInfo = charInfo; } @@ -56,11 +54,9 @@ class CharServerHandler : public MessageHandler { mCharCreateDialog = window; } protected: - void - handleCharCreateResponse(MessageIn &msg); + void handleCharCreateResponse(MessageIn &msg); - void - handleCharSelectResponse(MessageIn &msg); + void handleCharSelectResponse(MessageIn &msg); LockedArray<LocalPlayer*> *mCharInfo; CharCreateDialog *mCharCreateDialog; diff --git a/src/net/tmwserv/chathandler.cpp b/src/net/tmwserv/chathandler.cpp index 2d151472..1c537e30 100644 --- a/src/net/tmwserv/chathandler.cpp +++ b/src/net/tmwserv/chathandler.cpp @@ -19,24 +19,24 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "chathandler.h" +#include "net/tmwserv/chathandler.h" -//#include <SDL_types.h> -#include <string> -#include <iostream> +#include "net/tmwserv/protocol.h" + +#include "net/messagein.h" -#include "../messagein.h" -#include "protocol.h" +#include "being.h" +#include "beingmanager.h" +#include "game.h" +#include "channel.h" +#include "channelmanager.h" -#include "../../being.h" -#include "../../beingmanager.h" -#include "../../game.h" -#include "../../channel.h" -#include "../../channelmanager.h" +#include "gui/widgets/channeltab.h" +#include "gui/chat.h" +#include "gui/guildwindow.h" -#include "../../gui/widgets/channeltab.h" -#include "../../gui/chat.h" -#include "../../gui/guildwindow.h" +#include <string> +#include <iostream> #include "utils/gettext.h" diff --git a/src/net/tmwserv/chathandler.h b/src/net/tmwserv/chathandler.h index 013b955d..f0604da8 100644 --- a/src/net/tmwserv/chathandler.h +++ b/src/net/tmwserv/chathandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_CHATHANDLER_H -#define NET_CHATHANDLER_H +#ifndef NET_TMWSERV_CHATHANDLER_H +#define NET_TMWSERV_CHATHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class ChatHandler : public MessageHandler { diff --git a/src/net/tmwserv/chatserver/chatserver.cpp b/src/net/tmwserv/chatserver/chatserver.cpp index 1e55cbe6..49a17367 100644 --- a/src/net/tmwserv/chatserver/chatserver.cpp +++ b/src/net/tmwserv/chatserver/chatserver.cpp @@ -23,9 +23,10 @@ #include "internal.h" -#include "../connection.h" -#include "../../messageout.h" -#include "../protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" + +#include "net/messageout.h" using Net::ChatServer::connection; diff --git a/src/net/tmwserv/chatserver/guild.cpp b/src/net/tmwserv/chatserver/guild.cpp index bf758586..740e9efa 100644 --- a/src/net/tmwserv/chatserver/guild.cpp +++ b/src/net/tmwserv/chatserver/guild.cpp @@ -19,16 +19,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #include "guild.h" #include "internal.h" -#include "../connection.h" -#include "../../messageout.h" -#include "../protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" + +#include "net/messageout.h" -#include "../../../log.h" +#include "log.h" void Net::ChatServer::Guild::createGuild(const std::string &name) { diff --git a/src/net/tmwserv/chatserver/guild.h b/src/net/tmwserv/chatserver/guild.h index 0d1f5204..2e9cf9a6 100644 --- a/src/net/tmwserv/chatserver/guild.h +++ b/src/net/tmwserv/chatserver/guild.h @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #ifndef NET_CHATSERVER_GUILD_H #define NET_CHATSERVER_GUILD_H @@ -66,4 +65,3 @@ namespace Net } #endif - diff --git a/src/net/tmwserv/chatserver/party.cpp b/src/net/tmwserv/chatserver/party.cpp index be7bf390..e5bdd861 100644 --- a/src/net/tmwserv/chatserver/party.cpp +++ b/src/net/tmwserv/chatserver/party.cpp @@ -19,16 +19,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #include "party.h" #include "internal.h" -#include "../connection.h" -#include "../../messageout.h" -#include "../protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" + +#include "net/messageout.h" -#include "../../../log.h" +#include "log.h" void Net::ChatServer::Party::invitePlayer(const std::string &name) { @@ -67,4 +67,3 @@ void Net::ChatServer::Party::quitParty() Net::ChatServer::connection->send(msg); } - diff --git a/src/net/tmwserv/chatserver/party.h b/src/net/tmwserv/chatserver/party.h index a35c0df5..b3f0020b 100644 --- a/src/net/tmwserv/chatserver/party.h +++ b/src/net/tmwserv/chatserver/party.h @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #ifndef NET_CHATSERVER_PARTY_H #define NET_CHATSERVER_PARTY_H diff --git a/src/net/tmwserv/connection.cpp b/src/net/tmwserv/connection.cpp index eb2310e4..0fcd530b 100644 --- a/src/net/tmwserv/connection.cpp +++ b/src/net/tmwserv/connection.cpp @@ -19,14 +19,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "connection.h" +#include "net/tmwserv/connection.h" -#include <string> +#include "net/tmwserv/internal.h" + +#include "net/messageout.h" -#include "internal.h" -#include "../messageout.h" +#include "log.h" -#include "../../log.h" +#include <string> Net::Connection::Connection(ENetHost *client): mConnection(0), mClient(client) diff --git a/src/net/tmwserv/connection.h b/src/net/tmwserv/connection.h index 9c598363..447cf71c 100644 --- a/src/net/tmwserv/connection.h +++ b/src/net/tmwserv/connection.h @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_CONNECTION_H -#define NET_CONNECTION_H +#ifndef NET_TMWSERV_CONNECTION_H +#define NET_TMWSERV_CONNECTION_H #include <iosfwd> diff --git a/src/net/tmwserv/effecthandler.cpp b/src/net/tmwserv/effecthandler.cpp index ef8d63fb..d2b26fca 100644 --- a/src/net/tmwserv/effecthandler.cpp +++ b/src/net/tmwserv/effecthandler.cpp @@ -19,12 +19,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "effecthandler.h" +#include "net/tmwserv/effecthandler.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/tmwserv/protocol.h" -#include "../../effectmanager.h" +#include "net/messagein.h" + +#include "effectmanager.h" EffectHandler::EffectHandler() diff --git a/src/net/tmwserv/effecthandler.h b/src/net/tmwserv/effecthandler.h index 7aed9417..894ad1c8 100644 --- a/src/net/tmwserv/effecthandler.h +++ b/src/net/tmwserv/effecthandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_EFFECTSHANDLER_H -#define NET_EFFECTSHANDLER_H +#ifndef NET_TMWSERV_EFFECTSHANDLER_H +#define NET_TMWSERV_EFFECTSHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class EffectHandler : public MessageHandler { diff --git a/src/net/tmwserv/gameserver/gameserver.cpp b/src/net/tmwserv/gameserver/gameserver.cpp index 6966a5db..e70c4d19 100644 --- a/src/net/tmwserv/gameserver/gameserver.cpp +++ b/src/net/tmwserv/gameserver/gameserver.cpp @@ -23,9 +23,10 @@ #include "internal.h" -#include "../connection.h" -#include "../../messageout.h" -#include "../protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" + +#include "net/messageout.h" void Net::GameServer::connect(Net::Connection *connection, const std::string &token) diff --git a/src/net/tmwserv/gameserver/player.cpp b/src/net/tmwserv/gameserver/player.cpp index b48872ab..ec346d9f 100644 --- a/src/net/tmwserv/gameserver/player.cpp +++ b/src/net/tmwserv/gameserver/player.cpp @@ -23,9 +23,10 @@ #include "internal.h" -#include "../connection.h" -#include "../../messageout.h" -#include "../protocol.h" +#include "net/tmwserv/connection.h" +#include "net/tmwserv/protocol.h" + +#include "net/messageout.h" void RespawnRequestListener::action(const gcn::ActionEvent &event) { diff --git a/src/net/tmwserv/gameserver/player.h b/src/net/tmwserv/gameserver/player.h index 978905a2..3f33c7d5 100644 --- a/src/net/tmwserv/gameserver/player.h +++ b/src/net/tmwserv/gameserver/player.h @@ -22,7 +22,7 @@ #ifndef NET_GAMESERVER_PLAYER_H #define NET_GAMESERVER_PLAYER_H -#include "../../../being.h" +#include "being.h" #include <guichan/actionlistener.hpp> diff --git a/src/net/tmwserv/guildhandler.cpp b/src/net/tmwserv/guildhandler.cpp index 2127b730..21b43063 100644 --- a/src/net/tmwserv/guildhandler.cpp +++ b/src/net/tmwserv/guildhandler.cpp @@ -19,23 +19,25 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "net/tmwserv/guildhandler.h" + +#include "net/messagein.h" + +#include "net/tmwserv/chatserver/chatserver.h" +#include "net/tmwserv/chatserver/guild.h" +#include "net/tmwserv/protocol.h" + +#include "gui/widgets/channeltab.h" +#include "gui/chat.h" +#include "gui/guildwindow.h" + +#include "guild.h" +#include "log.h" +#include "localplayer.h" +#include "channel.h" +#include "channelmanager.h" + #include <iostream> -#include "guildhandler.h" - -#include "protocol.h" -#include "../messagein.h" - -#include "chatserver/chatserver.h" -#include "chatserver/guild.h" - -#include "../../gui/widgets/channeltab.h" -#include "../../gui/chat.h" -#include "../../gui/guildwindow.h" -#include "../../guild.h" -#include "../../log.h" -#include "../../localplayer.h" -#include "../../channel.h" -#include "../../channelmanager.h" GuildHandler::GuildHandler() { diff --git a/src/net/tmwserv/guildhandler.h b/src/net/tmwserv/guildhandler.h index 343d380b..9b900d9f 100644 --- a/src/net/tmwserv/guildhandler.h +++ b/src/net/tmwserv/guildhandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_GUILDHANDLER_H -#define NET_GUILDHANDLER_H +#ifndef NET_TMWSERV_GUILDHANDLER_H +#define NET_TMWSERV_GUILDHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" #include <string> diff --git a/src/net/tmwserv/internal.cpp b/src/net/tmwserv/internal.cpp index 5f55d0ac..253d4f5f 100644 --- a/src/net/tmwserv/internal.cpp +++ b/src/net/tmwserv/internal.cpp @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "internal.h" +#include "net/tmwserv/internal.h" namespace Net { diff --git a/src/net/tmwserv/internal.h b/src/net/tmwserv/internal.h index 6da544a5..17ee9081 100644 --- a/src/net/tmwserv/internal.h +++ b/src/net/tmwserv/internal.h @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_INTERNAL_H -#define NET_INTERNAL_H +#ifndef NET_TMWSERV_INTERNAL_H +#define NET_TMWSERV_INTERNAL_H namespace Net { diff --git a/src/net/tmwserv/inventoryhandler.cpp b/src/net/tmwserv/inventoryhandler.cpp index b86fba9d..f6522128 100644 --- a/src/net/tmwserv/inventoryhandler.cpp +++ b/src/net/tmwserv/inventoryhandler.cpp @@ -19,21 +19,21 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "inventoryhandler.h" +#include "net/tmwserv/inventoryhandler.h" -#include <SDL_types.h> +#include "net/tmwserv/protocol.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/messagein.h" -#include "../../equipment.h" -#include "../../inventory.h" -#include "../../item.h" -#include "../../itemshortcut.h" -#include "../../localplayer.h" +#include "equipment.h" +#include "inventory.h" +#include "item.h" +#include "itemshortcut.h" +#include "localplayer.h" -#include "../../gui/chat.h" -#include "../../resources/iteminfo.h" +#include "gui/chat.h" + +#include "resources/iteminfo.h" InventoryHandler::InventoryHandler() { diff --git a/src/net/tmwserv/inventoryhandler.h b/src/net/tmwserv/inventoryhandler.h index b2e469fa..4144d89c 100644 --- a/src/net/tmwserv/inventoryhandler.h +++ b/src/net/tmwserv/inventoryhandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_INVENTORYHANDLER_H -#define NET_INVENTORYHANDLER_H +#ifndef NET_TMWSERV_INVENTORYHANDLER_H +#define NET_TMWSERV_INVENTORYHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class InventoryHandler : public MessageHandler { diff --git a/src/net/tmwserv/itemhandler.cpp b/src/net/tmwserv/itemhandler.cpp index 23d210cf..4ed61266 100644 --- a/src/net/tmwserv/itemhandler.cpp +++ b/src/net/tmwserv/itemhandler.cpp @@ -19,12 +19,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "itemhandler.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/tmwserv/itemhandler.h" -#include "../../engine.h" -#include "../../flooritemmanager.h" +#include "net/tmwserv/protocol.h" + +#include "net/messagein.h" + +#include "engine.h" +#include "flooritemmanager.h" ItemHandler::ItemHandler() { diff --git a/src/net/tmwserv/itemhandler.h b/src/net/tmwserv/itemhandler.h index da93f6b4..6a2a96c8 100644 --- a/src/net/tmwserv/itemhandler.h +++ b/src/net/tmwserv/itemhandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_ITEMHANDLER_H -#define NET_ITEMHANDLER_H +#ifndef NET_TMWSERV_ITEMHANDLER_H +#define NET_TMWSERV_ITEMHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class ItemHandler : public MessageHandler { diff --git a/src/net/tmwserv/loginhandler.cpp b/src/net/tmwserv/loginhandler.cpp index e6859c72..ccba06ed 100644 --- a/src/net/tmwserv/loginhandler.cpp +++ b/src/net/tmwserv/loginhandler.cpp @@ -19,13 +19,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "loginhandler.h" +#include "net/tmwserv/loginhandler.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/tmwserv/protocol.h" -#include "../../logindata.h" -#include "../../main.h" +#include "net/messagein.h" + +#include "logindata.h" +#include "main.h" LoginHandler::LoginHandler() { diff --git a/src/net/tmwserv/loginhandler.h b/src/net/tmwserv/loginhandler.h index d26b8303..81dd273c 100644 --- a/src/net/tmwserv/loginhandler.h +++ b/src/net/tmwserv/loginhandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_LOGINHANDLER_H -#define NET_LOGINHANDLER_H +#ifndef NET_TMWSERV_LOGINHANDLER_H +#define NET_TMWSERV_LOGINHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class LoginData; @@ -44,4 +44,4 @@ class LoginHandler : public MessageHandler LoginData *mLoginData; }; -#endif // NET_LOGINHANDLER_H +#endif // NET_TMWSERV_LOGINHANDLER_H diff --git a/src/net/tmwserv/logouthandler.cpp b/src/net/tmwserv/logouthandler.cpp index e2265c5f..8b0e2d6e 100644 --- a/src/net/tmwserv/logouthandler.cpp +++ b/src/net/tmwserv/logouthandler.cpp @@ -19,16 +19,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "logouthandler.h" +#include "net/tmwserv/logouthandler.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/tmwserv/protocol.h" -#include "../../main.h" +#include "net/messagein.h" + +#include "main.h" LogoutHandler::LogoutHandler(): -mPassToken(NULL), mScenario(LOGOUT_EXIT), -mLoggedOutAccount(false), mLoggedOutGame(false), mLoggedOutChat(false) + mPassToken(NULL), + mScenario(LOGOUT_EXIT), + mLoggedOutAccount(false), + mLoggedOutGame(false), + mLoggedOutChat(false) { static const Uint16 _messages[] = { APMSG_LOGOUT_RESPONSE, @@ -197,15 +201,14 @@ void LogoutHandler::handleMessage(MessageIn &msg) } } -void -LogoutHandler::setScenario(unsigned short scenario, std::string *passToken) +void LogoutHandler::setScenario(unsigned short scenario, + std::string *passToken) { mScenario = scenario; mPassToken = passToken; } -void -LogoutHandler::reset() +void LogoutHandler::reset() { mPassToken = NULL; mScenario = LOGOUT_EXIT; diff --git a/src/net/tmwserv/logouthandler.h b/src/net/tmwserv/logouthandler.h index d5124723..6c69c8be 100644 --- a/src/net/tmwserv/logouthandler.h +++ b/src/net/tmwserv/logouthandler.h @@ -19,12 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_LOGOUTHANDLER_H -#define NET_LOGOUTHANDLER_H +#ifndef NET_TMWSERV_LOGOUTHANDLER_H +#define NET_TMWSERV_LOGOUTHANDLER_H -#include <string> +#include "net/messagehandler.h" -#include "../messagehandler.h" +#include <string> /** * The different scenarios for which LogoutHandler can be used @@ -43,13 +43,13 @@ class LogoutHandler : public MessageHandler void handleMessage(MessageIn &msg); void setScenario(unsigned short scenario, - std::string* passToken = NULL); + std::string *passToken = NULL); void reset(); - void setAccountLoggedOut(){ mLoggedOutAccount = true; } - void setGameLoggedOut(){ mLoggedOutGame = true; } - void setChatLoggedOut(){ mLoggedOutChat = true; } + void setAccountLoggedOut() { mLoggedOutAccount = true; } + void setGameLoggedOut() { mLoggedOutGame = true; } + void setChatLoggedOut() { mLoggedOutChat = true; } private: std::string* mPassToken; diff --git a/src/net/tmwserv/network.cpp b/src/net/tmwserv/network.cpp index 80a9c9b9..d353da17 100644 --- a/src/net/tmwserv/network.cpp +++ b/src/net/tmwserv/network.cpp @@ -19,18 +19,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "network.h" +#include "net/tmwserv/network.h" -#include <enet/enet.h> +#include "net/tmwserv/connection.h" +#include "net/tmwserv/internal.h" -#include <map> +#include "net/messagehandler.h" +#include "net/messagein.h" -#include "connection.h" -#include "internal.h" -#include "../messagehandler.h" -#include "../messagein.h" +#include "log.h" -#include "../../log.h" +#include <enet/enet.h> + +#include <map> /** * The local host which is shared for all outgoing connections. diff --git a/src/net/tmwserv/network.h b/src/net/tmwserv/network.h index ba58daba..1b5c7bc6 100644 --- a/src/net/tmwserv/network.h +++ b/src/net/tmwserv/network.h @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_NETWORK_H -#define NET_NETWORK_H +#ifndef NET_TMWSERV_NETWORK_H +#define NET_TMWSERV_NETWORK_H #include <iosfwd> diff --git a/src/net/tmwserv/npchandler.cpp b/src/net/tmwserv/npchandler.cpp index 8a2a16f0..bae5228c 100644 --- a/src/net/tmwserv/npchandler.cpp +++ b/src/net/tmwserv/npchandler.cpp @@ -19,21 +19,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "npchandler.h" +#include "net/tmwserv/npchandler.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/tmwserv/protocol.h" -#include "../../beingmanager.h" -#include "../../npc.h" +#include "net/messagein.h" -#include "../../gui/npclistdialog.h" -#include "../../gui/npcpostdialog.h" -#include "../../gui/npc_text.h" +#include "beingmanager.h" +#include "npc.h" -extern NpcListDialog *npcListDialog; -extern NpcTextDialog *npcTextDialog; -extern NpcPostDialog *npcPostDialog; +#include "gui/npclistdialog.h" +#include "gui/npcpostdialog.h" +#include "gui/npc_text.h" NPCHandler::NPCHandler() { diff --git a/src/net/tmwserv/npchandler.h b/src/net/tmwserv/npchandler.h index 49df20c3..905c9b01 100644 --- a/src/net/tmwserv/npchandler.h +++ b/src/net/tmwserv/npchandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_NPCHANDLER_H -#define NET_NPCHANDLER_H +#ifndef NET_TMWSERV_NPCHANDLER_H +#define NET_TMWSERV_NPCHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class NPCHandler : public MessageHandler { diff --git a/src/net/tmwserv/partyhandler.cpp b/src/net/tmwserv/partyhandler.cpp index 880674d3..dfbcea80 100644 --- a/src/net/tmwserv/partyhandler.cpp +++ b/src/net/tmwserv/partyhandler.cpp @@ -19,18 +19,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <iostream> -#include "partyhandler.h" +#include "net/tmwserv/partyhandler.h" + +#include "net/tmwserv/chatserver/chatserver.h" +#include "net/tmwserv/protocol.h" -#include "protocol.h" -#include "../messagein.h" +#include "net/messagein.h" -#include "chatserver/chatserver.h" +#include "gui/chat.h" +#include "gui/partywindow.h" -#include "../../gui/chat.h" -#include "../../gui/partywindow.h" -#include "../../log.h" -#include "../../localplayer.h" +#include "log.h" +#include "localplayer.h" + +#include <iostream> PartyHandler::PartyHandler() { diff --git a/src/net/tmwserv/partyhandler.h b/src/net/tmwserv/partyhandler.h index 6c1377ad..66e29b0d 100644 --- a/src/net/tmwserv/partyhandler.h +++ b/src/net/tmwserv/partyhandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_PARTYHANDLER_H -#define NET_PARTYHANDLER_H +#ifndef NET_TMWSERV_PARTYHANDLER_H +#define NET_TMWSERV_PARTYHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" #include <string> @@ -32,9 +32,6 @@ public: PartyHandler(); void handleMessage(MessageIn &msg); - -protected: - }; #endif diff --git a/src/net/tmwserv/playerhandler.cpp b/src/net/tmwserv/playerhandler.cpp index e8efef52..863fcb65 100644 --- a/src/net/tmwserv/playerhandler.cpp +++ b/src/net/tmwserv/playerhandler.cpp @@ -19,26 +19,27 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "playerhandler.h" - -#include "../messagein.h" -#include "protocol.h" - -#include "../../engine.h" -#include "../../localplayer.h" -#include "../../log.h" -#include "../../particle.h" -#include "../../npc.h" - -#include "../../gui/buy.h" -#include "../../gui/chat.h" -#include "../../gui/gui.h" -#include "../../gui/npclistdialog.h" -#include "../../gui/npc_text.h" -#include "../../gui/ok_dialog.h" -#include "../../gui/sell.h" -#include "../../gui/skill.h" -#include "../../gui/viewport.h" +#include "net/tmwserv/playerhandler.h" + +#include "net/tmwserv/protocol.h" + +#include "net/messagein.h" + +#include "engine.h" +#include "localplayer.h" +#include "log.h" +#include "particle.h" +#include "npc.h" + +#include "gui/buy.h" +#include "gui/chat.h" +#include "gui/gui.h" +#include "gui/npclistdialog.h" +#include "gui/npc_text.h" +#include "gui/ok_dialog.h" +#include "gui/sell.h" +#include "gui/skill.h" +#include "gui/viewport.h" // TODO Move somewhere else OkDialog *weightNotice = NULL; @@ -293,8 +294,7 @@ void PlayerHandler::handleMessage(MessageIn &msg) } } -void -PlayerHandler::handleMapChangeMessage(MessageIn &msg) +void PlayerHandler::handleMapChangeMessage(MessageIn &msg) { const std::string mapName = msg.readString(); const unsigned short x = msg.readInt16(); diff --git a/src/net/tmwserv/playerhandler.h b/src/net/tmwserv/playerhandler.h index a11109c6..c8eacc38 100644 --- a/src/net/tmwserv/playerhandler.h +++ b/src/net/tmwserv/playerhandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_PLAYERHANDLER_H -#define NET_PLAYERHANDLER_H +#ifndef NET_TMWSERV_PLAYERHANDLER_H +#define NET_TMWSERV_PLAYERHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class PlayerHandler : public MessageHandler { diff --git a/src/net/tmwserv/protocol.h b/src/net/tmwserv/protocol.h index 7a0c601f..7eb0b931 100644 --- a/src/net/tmwserv/protocol.h +++ b/src/net/tmwserv/protocol.h @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef PROTOCOL_H -#define PROTOCOL_H +#ifndef TMWSERV_PROTOCOL_H +#define TMWSERV_PROTOCOL_H /** * Enumerated type for communicated messages: diff --git a/src/net/tmwserv/tradehandler.cpp b/src/net/tmwserv/tradehandler.cpp index 525d46f0..85228355 100644 --- a/src/net/tmwserv/tradehandler.cpp +++ b/src/net/tmwserv/tradehandler.cpp @@ -19,20 +19,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "tradehandler.h" +#include "net/tmwserv/tradehandler.h" -#include "../messagein.h" -#include "protocol.h" +#include "net/tmwserv/gameserver/player.h" +#include "net/tmwserv/protocol.h" -#include "gameserver/player.h" +#include "net/messagein.h" -#include "../../beingmanager.h" -#include "../../item.h" -#include "../../localplayer.h" +#include "beingmanager.h" +#include "item.h" +#include "localplayer.h" -#include "../../gui/chat.h" -#include "../../gui/confirm_dialog.h" -#include "../../gui/trade.h" +#include "gui/chat.h" +#include "gui/confirm_dialog.h" +#include "gui/trade.h" std::string tradePartnerName; int tradePartnerID; diff --git a/src/net/tmwserv/tradehandler.h b/src/net/tmwserv/tradehandler.h index 0b634b66..a064bbce 100644 --- a/src/net/tmwserv/tradehandler.h +++ b/src/net/tmwserv/tradehandler.h @@ -19,10 +19,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NET_TRADEHANDLER_H -#define NET_TRADEHANDLER_H +#ifndef NET_TMWSERV_TRADEHANDLER_H +#define NET_TMWSERV_TRADEHANDLER_H -#include "../messagehandler.h" +#include "net/messagehandler.h" class TradeHandler : public MessageHandler { |