Пример #1
0
void noShipBuildingSite::Serialize(SerializedGameData& sgd) const
{
    Serialize_noCoordBase(sgd);

    sgd.PushUnsignedChar(player);
    sgd.PushUnsignedChar(progress);
}
Пример #2
0
void noFire::Serialize_noFire(SerializedGameData& sgd) const
{
    Serialize_noCoordBase(sgd);

    sgd.PushBool(isBig);
    sgd.PushEvent(dead_event);
}
Пример #3
0
void noRoadNode::Serialize_noRoadNode(SerializedGameData* sgd) const
{
    Serialize_noCoordBase(sgd);

    sgd->PushUnsignedChar(player);

    // the trick only seems to work for flags
    if (this->GetGOT() == GOT_FLAG)
    {
        // this is a trick:
        // -> initialize routes for flag with NULL
        // -> RoadSegment will set these later
        for (unsigned i = 0; i < 6; ++i)
        {
            sgd->PushObject(NULL, true);
        }
    }
    else
    {
        for (unsigned i = 0; i < 6; ++i)
        {
            sgd->PushObject(routes[i], true);
        }
    }
}
Пример #4
0
void noFire::Serialize_noFire(SerializedGameData* sgd) const
{
    Serialize_noCoordBase(sgd);

    sgd->PushUnsignedChar(size);
    sgd->PushObject(dead_event, true);
}
void noDisappearingEnvObject::Serialize_noDisappearingEnvObject(SerializedGameData* sgd) const
{
    Serialize_noCoordBase(sgd);

    sgd->PushBool(disappearing);
    sgd->PushObject(dead_event, true);
}
Пример #6
0
void noStaticObject::Serialize_noStaticObject(SerializedGameData* sgd) const
{
    Serialize_noCoordBase(sgd);

    sgd->PushUnsignedShort(id);
    sgd->PushUnsignedShort(file);
    sgd->PushUnsignedChar(size);
}
Пример #7
0
void noTree::Serialize_noTree(SerializedGameData * sgd) const
{
	Serialize_noCoordBase(sgd);

	sgd->PushUnsignedChar(type);
	sgd->PushUnsignedChar(size);
	sgd->PushUnsignedChar(static_cast<unsigned char>(state));
	sgd->PushObject(event,true);
	sgd->PushObject(produce_animal_event,true);
	sgd->PushBool(produce_animals);
}
Пример #8
0
void noMovable::Serialize_noMovable(SerializedGameData& sgd) const
{
    Serialize_noCoordBase(sgd);

    sgd.PushUnsignedChar(curMoveDir);
    sgd.PushUnsignedChar(ascent);
    sgd.PushObject(current_ev, true);
    sgd.PushUnsignedInt(pause_walked_gf);
    sgd.PushUnsignedInt(pause_event_length);
    sgd.PushBool(moving);
}