diff options
Diffstat (limited to 'src/mmo')
-rw-r--r-- | src/mmo/enums.hpp | 13 | ||||
-rw-r--r-- | src/mmo/mmo.hpp | 2 | ||||
-rw-r--r-- | src/mmo/version.hpp | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/mmo/enums.hpp b/src/mmo/enums.hpp index a7dcc89..52e1009 100644 --- a/src/mmo/enums.hpp +++ b/src/mmo/enums.hpp @@ -145,4 +145,17 @@ SEX sex_from_char(char c) } } +inline +bool native_to_network(char *network, SEX native) +{ + *network = sex_to_char(native); + return true; +} +inline +bool network_to_native(SEX *native, char network) +{ + *native = sex_from_char(network); + return true; +} + #endif // TMWA_MMO_ENUMS_HPP diff --git a/src/mmo/mmo.hpp b/src/mmo/mmo.hpp index a0cee57..d96e619 100644 --- a/src/mmo/mmo.hpp +++ b/src/mmo/mmo.hpp @@ -45,7 +45,7 @@ constexpr int TRADE_MAX = 10; constexpr int GLOBAL_REG_NUM = 96; constexpr int ACCOUNT_REG_NUM = 16; -constexpr int ACCOUNT_REG2_NUM = 16; +constexpr size_t ACCOUNT_REG2_NUM = 16; constexpr interval_t DEFAULT_WALK_SPEED = std::chrono::milliseconds(150); constexpr interval_t MIN_WALK_SPEED = interval_t::zero(); constexpr interval_t MAX_WALK_SPEED = std::chrono::seconds(1); diff --git a/src/mmo/version.hpp b/src/mmo/version.hpp index 9e20bf1..5d28b5d 100644 --- a/src/mmo/version.hpp +++ b/src/mmo/version.hpp @@ -35,6 +35,7 @@ # define TMWA_SERVER_INTER 0x04 # define TMWA_SERVER_MAP 0x08 +// TODO now that I generate the protocol, split 'flags' out of the struct struct Version { uint8_t major; |