Implement conversion of Unit to String and back

This commit is contained in:
Marc Di Luzio 2014-12-16 13:13:02 +00:00
parent 7a75fbd369
commit b77411121a
6 changed files with 188 additions and 31 deletions

View file

@ -6,8 +6,6 @@
#include "gametypes.h"
#define ORDER_DELIMITER ' '
// Type for all orders ( as a char )
enum class order_c : char
{
@ -47,7 +45,7 @@ inline bool COrder::operator== ( const COrder& rhs ) const
// Typedef a vector of orders
typedef std::vector<COrder> COrderVector;
// Order strings stored as simply "[unit id] [order char]"
// Order strings stored as simply "O:[order char] U:[unit id]"
// string <--> order conversion functions
std::string GetStringFromOrder(const COrder& order );
COrder GetOrderFromString( const std::string& order );