Ejemplo n.º 1
0
void EventManager::Event::Serialize_Event(SerializedGameData* sgd) const
{
    Serialize_GameObject(sgd);

    sgd->PushObject(obj, false);
    sgd->PushUnsignedInt(gf);
    sgd->PushUnsignedInt(gf_length);
    sgd->PushUnsignedInt(id);
}
Ejemplo n.º 2
0
void Ware::Serialize_Ware(SerializedGameData& sgd) const
{
    Serialize_GameObject(sgd);

    sgd.PushUnsignedChar(next_dir);
    sgd.PushUnsignedChar(static_cast<unsigned char>(state));
    sgd.PushObject(location, false);
    sgd.PushUnsignedChar(static_cast<unsigned char>(type));
    sgd.PushObject(goal, false);
    sgd.PushMapPoint(next_harbor);
}
Ejemplo n.º 3
0
void Ware::Serialize_Ware(SerializedGameData * sgd) const
{
    Serialize_GameObject(sgd);

    sgd->PushUnsignedChar(next_dir);
    sgd->PushUnsignedChar(static_cast<unsigned char>(state));
    sgd->PushObject(location,false);
    sgd->PushUnsignedChar(static_cast<unsigned char>(type));
    sgd->PushObject(goal,false);
    sgd->PushUnsignedShort(next_harbor.x);
    sgd->PushUnsignedShort(next_harbor.y);
}
Ejemplo n.º 4
0
/**
 *
 *
 *  @author OLiver
 */
void RoadSegment::Serialize_RoadSegment(SerializedGameData* sgd) const
{
    Serialize_GameObject(sgd);

    sgd->PushUnsignedChar(static_cast<unsigned char>(rt));
    sgd->PushObject(f1, false);
    sgd->PushObject(f2, false);
    sgd->PushUnsignedShort(route.size());
    sgd->PushObject(carrier[0], true);
    sgd->PushObject(carrier[1], true);

    for(unsigned short i = 0; i < route.size(); ++i)
        sgd->PushUnsignedChar(route[i]);
}
Ejemplo n.º 5
0
void noBase::Serialize_noBase(SerializedGameData* sgd) const
{
    Serialize_GameObject(sgd);

    sgd->PushUnsignedChar(static_cast<unsigned char>(nop));
}