You can marshal enum type by the following functions.
enum type { ... } ;
namespace Proud
{
inline CMessage& operator<<(CMessage& a,type b)
{
a<<(int)b;
return a;
}
inline CMessage& operator>>(CMessage& a,type& b)
{
int x;
a>>x;
b=(type)x;
return a;
}
inline void AppendTextOut(
String &a,type b)
{
a+=txt;
}
}
It is much easier to create the above setup if you use the already defined macros of ProudNet, PROUDNET_SERIALIZE_ENUM.
PROUDNET_SERIALIZE_ENUM(type)