summaryrefslogtreecommitdiff
path: root/src/enums
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-16 22:35:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-16 22:35:17 +0300
commitb3d17866a3c5700b52c2b0b954fce132a52c1dbf (patch)
tree7ba07c98a1842eb766de35e172f559dcf5ac6fb4 /src/enums
parent5e8e53f6e795a84ab5ca6cfe0d08672878044707 (diff)
downloadmv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.gz
mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.bz2
mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.xz
mv-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.zip
Convert State enum into strong typed.
Diffstat (limited to 'src/enums')
-rw-r--r--src/enums/state.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/enums/state.h b/src/enums/state.h
index ed16cf4f2..581f6a352 100644
--- a/src/enums/state.h
+++ b/src/enums/state.h
@@ -23,49 +23,49 @@
#ifndef ENUMS_STATE_H
#define ENUMS_STATE_H
-/**
- * All client states.
- */
-enum State
+#include "enums/simpletypes/enumdefines.h"
+
+enumStart(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
-};
+ ERROR = -1,
+ START = 0,
+ CHOOSE_SERVER,
+ CONNECT_SERVER,
+ PRE_LOGIN,
+ LOGIN,
+ LOGIN_ATTEMPT,
+ WORLD_SELECT, // 5
+ WORLD_SELECT_ATTEMPT,
+ UPDATE,
+ LOAD_DATA,
+ GET_CHARACTERS,
+ CHAR_SELECT, // 10
+ CONNECT_GAME,
+ GAME,
+ CHANGE_MAP, // Switch map-server/gameserver
+ LOGIN_ERROR,
+ ACCOUNTCHANGE_ERROR, // 15
+ REGISTER_PREP,
+ REGISTER,
+ REGISTER_ATTEMPT,
+ CHANGEPASSWORD,
+ CHANGEPASSWORD_ATTEMPT, // 20
+ CHANGEPASSWORD_SUCCESS,
+ CHANGEEMAIL,
+ CHANGEEMAIL_ATTEMPT,
+ CHANGEEMAIL_SUCCESS,
+ UNREGISTER, // 25
+ UNREGISTER_ATTEMPT,
+ UNREGISTER_SUCCESS,
+ SWITCH_SERVER,
+ SWITCH_LOGIN,
+ SWITCH_CHARACTER, // 30
+ LOGOUT_ATTEMPT,
+ WAIT,
+ EXIT,
+ FORCE_QUIT,
+ AUTORECONNECT_SERVER = 1000
+}
+enumEnd(State);
#endif // ENUMS_STATE_H