From b3fb470b1c14f2ca7832531df1f99c9fd730c317 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jan 2015 15:30:44 +0300 Subject: Move state.h into enums directory. --- src/CMakeLists.txt | 2 +- src/Makefile.am | 2 +- src/being/playerinfo.h | 3 +- src/client.h | 2 +- src/enums/state.h | 71 ++++++++++++++++++++++++++++++++++++++ src/gui/windows/connectiondialog.h | 2 +- src/state.h | 71 -------------------------------------- 7 files changed, 77 insertions(+), 76 deletions(-) create mode 100644 src/enums/state.h delete mode 100644 src/state.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 42d34a1b4..752bc9fe6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1054,7 +1054,7 @@ SET(SRCS soundmanager.cpp soundmanager.h sprite.h - state.h + enums/state.h statuseffect.cpp statuseffect.h render/surfacegraphics.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 6052be132..82d94ac2d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1174,7 +1174,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ soundmanager.cpp \ soundmanager.h \ sprite.h \ - state.h \ + enums/state.h \ statuseffect.cpp \ statuseffect.h \ render/surfacegraphics.cpp \ diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index a2a2255c4..298005ed5 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -24,7 +24,8 @@ #include "equipment.h" #include "guildpositionflags.h" -#include "state.h" + +#include "enums/state.h" #include diff --git a/src/client.h b/src/client.h index b6e92fa90..29dca9ad7 100644 --- a/src/client.h +++ b/src/client.h @@ -23,7 +23,7 @@ #ifndef CLIENT_H #define CLIENT_H -#include "state.h" +#include "enums/state.h" #include "listeners/actionlistener.h" #include "listeners/configlistener.h" diff --git a/src/enums/state.h b/src/enums/state.h new file mode 100644 index 000000000..ed16cf4f2 --- /dev/null +++ b/src/enums/state.h @@ -0,0 +1,71 @@ +/* + * The ManaPlus Client + * Copyright (C) 2004-2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program 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. + * + * This program 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 this program. If not, see . + */ + +#ifndef ENUMS_STATE_H +#define ENUMS_STATE_H + +/** + * All client states. + */ +enum State +{ + STATE_ERROR = -1, + STATE_START = 0, + STATE_CHOOSE_SERVER, + STATE_CONNECT_SERVER, + STATE_PRE_LOGIN, + STATE_LOGIN, + STATE_LOGIN_ATTEMPT, + STATE_WORLD_SELECT, // 5 + STATE_WORLD_SELECT_ATTEMPT, + STATE_UPDATE, + STATE_LOAD_DATA, + STATE_GET_CHARACTERS, + STATE_CHAR_SELECT, // 10 + STATE_CONNECT_GAME, + STATE_GAME, + STATE_CHANGE_MAP, // Switch map-server/gameserver + STATE_LOGIN_ERROR, + STATE_ACCOUNTCHANGE_ERROR, // 15 + STATE_REGISTER_PREP, + STATE_REGISTER, + STATE_REGISTER_ATTEMPT, + STATE_CHANGEPASSWORD, + STATE_CHANGEPASSWORD_ATTEMPT, // 20 + STATE_CHANGEPASSWORD_SUCCESS, + STATE_CHANGEEMAIL, + STATE_CHANGEEMAIL_ATTEMPT, + STATE_CHANGEEMAIL_SUCCESS, + STATE_UNREGISTER, // 25 + STATE_UNREGISTER_ATTEMPT, + STATE_UNREGISTER_SUCCESS, + STATE_SWITCH_SERVER, + STATE_SWITCH_LOGIN, + STATE_SWITCH_CHARACTER, // 30 + STATE_LOGOUT_ATTEMPT, + STATE_WAIT, + STATE_EXIT, + STATE_FORCE_QUIT, + STATE_AUTORECONNECT_SERVER = 1000 +}; + +#endif // ENUMS_STATE_H diff --git a/src/gui/windows/connectiondialog.h b/src/gui/windows/connectiondialog.h index c1a3ece72..39c802c3a 100644 --- a/src/gui/windows/connectiondialog.h +++ b/src/gui/windows/connectiondialog.h @@ -23,7 +23,7 @@ #ifndef GUI_WINDOWS_CONNECTIONDIALOG_H #define GUI_WINDOWS_CONNECTIONDIALOG_H -#include "state.h" +#include "enums/state.h" #include "gui/widgets/window.h" diff --git a/src/state.h b/src/state.h deleted file mode 100644 index 63d3df6d2..000000000 --- a/src/state.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2004-2009 The Mana World Development Team - * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2015 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program 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. - * - * This program 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 this program. If not, see . - */ - -#ifndef STATE_H -#define STATE_H - -/** - * All client states. - */ -enum State -{ - STATE_ERROR = -1, - STATE_START = 0, - STATE_CHOOSE_SERVER, - STATE_CONNECT_SERVER, - STATE_PRE_LOGIN, - STATE_LOGIN, - STATE_LOGIN_ATTEMPT, - STATE_WORLD_SELECT, // 5 - STATE_WORLD_SELECT_ATTEMPT, - STATE_UPDATE, - STATE_LOAD_DATA, - STATE_GET_CHARACTERS, - STATE_CHAR_SELECT, // 10 - STATE_CONNECT_GAME, - STATE_GAME, - STATE_CHANGE_MAP, // Switch map-server/gameserver - STATE_LOGIN_ERROR, - STATE_ACCOUNTCHANGE_ERROR, // 15 - STATE_REGISTER_PREP, - STATE_REGISTER, - STATE_REGISTER_ATTEMPT, - STATE_CHANGEPASSWORD, - STATE_CHANGEPASSWORD_ATTEMPT, // 20 - STATE_CHANGEPASSWORD_SUCCESS, - STATE_CHANGEEMAIL, - STATE_CHANGEEMAIL_ATTEMPT, - STATE_CHANGEEMAIL_SUCCESS, - STATE_UNREGISTER, // 25 - STATE_UNREGISTER_ATTEMPT, - STATE_UNREGISTER_SUCCESS, - STATE_SWITCH_SERVER, - STATE_SWITCH_LOGIN, - STATE_SWITCH_CHARACTER, // 30 - STATE_LOGOUT_ATTEMPT, - STATE_WAIT, - STATE_EXIT, - STATE_FORCE_QUIT, - STATE_AUTORECONNECT_SERVER = 1000 -}; - -#endif // STATE_H -- cgit v1.2.3-60-g2f50