Beispiel #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);
}
Beispiel #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);
}
Beispiel #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);
}
Beispiel #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]);
}
Beispiel #5
0
void noBase::Serialize_noBase(SerializedGameData* sgd) const
{
    Serialize_GameObject(sgd);

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