示例#1
0
void TraineeWalker::serialize(OutputSerialStream &stream)
{
   Walker::serialize(stream);
   stream.write_int((int) _traineeType, 1, 0, WTT_MAX);
   stream.write_objectID(_originBuilding);
   stream.write_objectID(_destinationBuilding);
   stream.write_int(_maxDistance, 2, 0, 65535);
}
示例#2
0
void LandOverlay::serialize(OutputSerialStream &stream)
{
   stream.write_objectID(this);
   stream.write_int((int) _buildingType, 1, 0, B_MAX);
   stream.write_int(getTile().getI(), 2, 0, 1000);
   stream.write_int(getTile().getJ(), 2, 0, 1000);
}
示例#3
0
void Market::serialize(OutputSerialStream &stream)
{
   ServiceBuilding::serialize(stream);
   _goodStore.serialize(stream);
   stream.write_objectID(_marketBuyer);
   stream.write_int(_buyerDelay, 2, 0, 65535);
}
示例#4
0
void ServiceWalker::serialize(OutputSerialStream &stream)
{
   Walker::serialize(stream);
   stream.write_int((int) _service, 1, 0, S_MAX);
   stream.write_objectID(_building);
   stream.write_int(_maxDistance, 2, 0, 65535);
}
示例#5
0
void Walker::serialize(OutputSerialStream &stream)
{
   stream.write_objectID(this);
   stream.write_int((int) _walkerType, 1, 0, WT_MAX);
   _pathWay.serialize(stream);
   stream.write_int((int) _action._action, 1, 0, WA_MAX);
   stream.write_int((int) _action._direction, 1, 0, D_MAX);
   stream.write_int(_i, 2, 0, 1000);
   stream.write_int(_j, 2, 0, 1000);
   stream.write_int(_si, 1, 0, 50);
   stream.write_int(_sj, 1, 0, 50);
   stream.write_int(_ii, 4, 0, 1000000);
   stream.write_int(_jj, 4, 0, 1000000);
   stream.write_int(_speed, 1, 0, 50);
   stream.write_int(_midTileI, 1, 0, 50);
   stream.write_int(_midTileJ, 1, 0, 50);
   stream.write_int(_animIndex, 1, 0, 50);
}
示例#6
0
void TerrainTile::serialize(OutputSerialStream &stream)
{
   int terrainBitset = encode();
   stream.write_int(terrainBitset, 2, 0, 65535);
   stream.write_objectID(_overlay);
}