uint32 RoadTypeIdentifier::Pack() const
{
assert(this->basetype < ROADTYPE_END);
assert(this->subtype < ROADSUBTYPE_END);
return (this->basetype << ROADSUBTYPE_END) | this->subtype;
}
bool RoadTypeIdentifier::Unpack(uint32 data) {
this->basetype = (RoadType)GB(data, 0, ROADTYPE_END);
this->subtype = (RoadType)GB(data, ROADTYPE_END, ROADSUBTYPE_END);
return (this->subtype < ROADSUBTYPE_END) && (this->basetype < ROADTYPE_END);
}