|
@@ -11,25 +11,25 @@
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
#include "train.h"
|
|
|
#include "vehiclelist.h"
|
|
|
#include "group.h"
|
|
|
|
|
|
#include "safeguards.h"
|
|
|
|
|
|
/**
|
|
|
* Pack a VehicleListIdentifier in a single uint32.
|
|
|
* @return The packed identifier.
|
|
|
*/
|
|
|
uint32 VehicleListIdentifier::Pack()
|
|
|
uint32 VehicleListIdentifier::Pack() const
|
|
|
{
|
|
|
byte c = this->company == OWNER_NONE ? 0xF : (byte)this->company;
|
|
|
assert(c < (1 << 4));
|
|
|
assert(this->vtype < (1 << 2));
|
|
|
assert(this->index < (1 << 20));
|
|
|
assert(this->type < VLT_END);
|
|
|
assert_compile(VLT_END <= (1 << 3));
|
|
|
|
|
|
return c << 28 | this->type << 23 | this->vtype << 26 | this->index;
|
|
|
}
|
|
|
|
|
|
/**
|