本文整理汇总了C++中SerializedGameData类的典型用法代码示例。如果您正苦于以下问题:C++ SerializedGameData类的具体用法?C++ SerializedGameData怎么用?C++ SerializedGameData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SerializedGameData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Serialize
void TradeGraph::Serialize(SerializedGameData& sgd) const
{
sgd.PushUnsignedChar(player);
sgd.PushMapPoint(size);
for(unsigned i = 0; i < trade_graph.size(); ++i)
trade_graph[i].Serialize(sgd);
}
开发者ID:kumzugloom,项目名称:s25client,代码行数:7,代码来源:TradeGraph.cpp
示例2: gwg
TradeGraph::TradeGraph(SerializedGameData& sgd, const GameWorldGame* const gwg) :
gwg(gwg), player(sgd.PopUnsignedChar()), size(sgd.PopMapPoint()),
trade_graph(size.x* size.y)
{
for(unsigned i = 0; i < trade_graph.size(); ++i)
trade_graph[i].Deserialize(sgd);
}
开发者ID:kumzugloom,项目名称:s25client,代码行数:7,代码来源:TradeGraph.cpp
示例3: nobBaseMilitary
nobBaseWarehouse::nobBaseWarehouse(SerializedGameData& sgd, const unsigned obj_id) : nobBaseMilitary(sgd, obj_id)
{
sgd.PopObjectContainer(waiting_wares, GOT_WARE);
fetch_double_protection = sgd.PopBool();
sgd.PopObjectContainer(dependent_figures, GOT_UNKNOWN);
sgd.PopObjectContainer(dependent_wares, GOT_WARE);
producinghelpers_event = sgd.PopObject<EventManager::Event>(GOT_EVENT);
recruiting_event = sgd.PopObject<EventManager::Event>(GOT_EVENT);
empty_event = sgd.PopObject<EventManager::Event>(GOT_EVENT);
store_event = sgd.PopObject<EventManager::Event>(GOT_EVENT);
for(unsigned i = 0; i < 5; ++i)
{
reserve_soldiers_available[i] = sgd.PopUnsignedInt();
reserve_soldiers_claimed_visual[i] = reserve_soldiers_claimed_real[i] = sgd.PopUnsignedInt();
}
for(unsigned i = 0; i < WARE_TYPES_COUNT; ++i)
{
inventory.visual.goods[i] = sgd.PopUnsignedInt();
inventory.real.goods[i] = sgd.PopUnsignedInt();
inventorySettings.wares[i] = inventorySettingsVisual.wares[i] = static_cast<InventorySetting>(sgd.PopUnsignedChar());
}
for(unsigned i = 0; i < JOB_TYPES_COUNT; ++i)
{
inventory.visual.people[i] = sgd.PopUnsignedInt();
inventory.real.people[i] = sgd.PopUnsignedInt();
inventorySettings.figures[i] = inventorySettingsVisual.figures[i] = static_cast<InventorySetting>(sgd.PopUnsignedChar());
}
}
开发者ID:jonathan-reisdorf,项目名称:s25client,代码行数:31,代码来源:nobBaseWarehouse.cpp
示例4: Serialize_nofFlagWorker
void nofFlagWorker::Serialize_nofFlagWorker(SerializedGameData& sgd) const
{
Serialize_noFigure(sgd);
sgd.PushObject(flag, true);
sgd.PushUnsignedChar(static_cast<unsigned char>(state));
}
开发者ID:Flow86,项目名称:s25client,代码行数:7,代码来源:nofFlagWorker.cpp
示例5:
void nobHarborBuilding::ExpeditionInfo::Serialize(SerializedGameData& sgd) const
{
sgd.PushUnsignedInt(boards);
sgd.PushUnsignedInt(stones);
sgd.PushBool(active);
sgd.PushBool(builder);
}
开发者ID:polemon,项目名称:s25client,代码行数:7,代码来源:nobHarborBuilding.cpp
示例6: Serialize_noFire
void noFire::Serialize_noFire(SerializedGameData& sgd) const
{
Serialize_noCoordBase(sgd);
sgd.PushBool(isBig);
sgd.PushEvent(dead_event);
}
开发者ID:Return-To-The-Roots,项目名称:s25client,代码行数:7,代码来源:noFire.cpp
示例7: Serialize_noSign
void noSign::Serialize_noSign(SerializedGameData& sgd) const
{
Serialize_noDisappearingEnvObject(sgd);
sgd.PushUnsignedChar(type);
sgd.PushUnsignedChar(quantity);
}
开发者ID:Ribosom,项目名称:s25client,代码行数:7,代码来源:noSign.cpp
示例8: Serialize_nofFisher
void nofFisher::Serialize_nofFisher(SerializedGameData& sgd) const
{
Serialize_nofFarmhand(sgd);
sgd.PushUnsignedChar(fishing_dir);
sgd.PushBool(successful);
}
开发者ID:kumzugloom,项目名称:s25client,代码行数:7,代码来源:nofFisher.cpp
示例9: Serialize
void noShipBuildingSite::Serialize(SerializedGameData& sgd) const
{
Serialize_noCoordBase(sgd);
sgd.PushUnsignedChar(player);
sgd.PushUnsignedChar(progress);
}
开发者ID:Flow86,项目名称:s25client,代码行数:7,代码来源:noShipBuildingSite.cpp
示例10: Serialize
void nofCharburner::Serialize(SerializedGameData& sgd) const
{
Serialize_nofFarmhand(sgd);
sgd.PushBool(harvest);
sgd.PushUnsignedChar(static_cast<unsigned char>(wt));
}
开发者ID:vader1986,项目名称:s25client,代码行数:7,代码来源:nofCharburner.cpp
示例11: Serialize
void fowBuildingSite::Serialize(SerializedGameData& sgd) const
{
sgd.PushBool(planing);
sgd.PushUnsignedChar(static_cast<unsigned char>(type));
sgd.PushUnsignedChar(static_cast<unsigned char>(nation));
sgd.PushUnsignedChar(build_progress);
}
开发者ID:jonathan-reisdorf,项目名称:s25client,代码行数:7,代码来源:FOWObjects.cpp
示例12: Serialize_nofPlaner
void nofPlaner::Serialize_nofPlaner(SerializedGameData& sgd) const
{
Serialize_noFigure(sgd);
sgd.PushUnsignedChar(static_cast<unsigned char>(state));
sgd.PushObject(building_site, true);
sgd.PushUnsignedChar(static_cast<unsigned char>(pd));
}
开发者ID:Ribosom,项目名称:s25client,代码行数:8,代码来源:nofPlaner.cpp
示例13: Serialize_noStaticObject
void noStaticObject::Serialize_noStaticObject(SerializedGameData& sgd) const
{
Serialize_noCoordBase(sgd);
sgd.PushUnsignedShort(id);
sgd.PushUnsignedShort(file);
sgd.PushUnsignedChar(size);
}
开发者ID:vader1986,项目名称:s25client,代码行数:8,代码来源:noStaticObject.cpp
示例14: GameObject
Ware::Ware(SerializedGameData& sgd, const unsigned obj_id) : GameObject(sgd, obj_id),
next_dir(sgd.PopUnsignedChar()),
state(State(sgd.PopUnsignedChar())),
location(sgd.PopObject<noRoadNode>(GOT_UNKNOWN)),
type(GoodType(sgd.PopUnsignedChar())),
goal(sgd.PopObject<noBaseBuilding>(GOT_UNKNOWN)),
next_harbor(sgd.PopMapPoint())
{}
开发者ID:aidevn,项目名称:s25client,代码行数:8,代码来源:Ware.cpp
示例15: Serialize_nofWarehouseWorker
void nofWarehouseWorker::Serialize_nofWarehouseWorker(SerializedGameData& sgd) const
{
Serialize_noFigure(sgd);
sgd.PushObject(carried_ware, true);
sgd.PushBool(shouldBringWareIn);
sgd.PushBool(fat);
}
开发者ID:aidevn,项目名称:s25client,代码行数:8,代码来源:nofWarehouseWorker.cpp
示例16: noMovable
noAnimal::noAnimal(SerializedGameData& sgd, const unsigned obj_id) : noMovable(sgd, obj_id),
species(Species(sgd.PopUnsignedChar())),
state(State(sgd.PopUnsignedChar())),
pause_way(sgd.PopUnsignedShort()),
hunter(sgd.PopObject<nofHunter>(GOT_NOF_HUNTER)),
sound_moment(0)
{
}
开发者ID:kumzugloom,项目名称:s25client,代码行数:8,代码来源:noAnimal.cpp
示例17: Serialize_nofActiveSoldier
void nofActiveSoldier::Serialize_nofActiveSoldier(SerializedGameData& sgd) const
{
Serialize_nofSoldier(sgd);
sgd.PushUnsignedChar(static_cast<unsigned char>(state));
sgd.PushObject(enemy, false);
sgd.PushMapPoint(fightSpot_);
}
开发者ID:vader1986,项目名称:s25client,代码行数:8,代码来源:nofActiveSoldier.cpp
示例18: Serialize_noAnimal
void noAnimal::Serialize_noAnimal(SerializedGameData& sgd) const
{
Serialize_noMovable(sgd);
sgd.PushUnsignedChar(static_cast<unsigned char>(species));
sgd.PushUnsignedChar(static_cast<unsigned char>(state));
sgd.PushUnsignedShort(pause_way);
sgd.PushObject(hunter, true);
}
开发者ID:kumzugloom,项目名称:s25client,代码行数:9,代码来源:noAnimal.cpp
示例19: noCoordBase
noTree::noTree(SerializedGameData& sgd, const unsigned obj_id) : noCoordBase(sgd, obj_id),
type(sgd.PopUnsignedChar()),
size(sgd.PopUnsignedChar()),
state(State(sgd.PopUnsignedChar())),
event(sgd.PopObject<EventManager::Event>(GOT_EVENT)),
produce_animal_event(sgd.PopObject<EventManager::Event>(GOT_EVENT)),
produce_animals(sgd.PopBool())
{
}
开发者ID:Ribosom,项目名称:s25client,代码行数:9,代码来源:noTree.cpp
示例20: Serialize
void BuildingRegister::Serialize(SerializedGameData& sgd) const
{
sgd.PushObjectContainer(warehouses, false);
sgd.PushObjectContainer(harbors, true);
for(const auto& building : buildings)
sgd.PushObjectContainer(building, true);
sgd.PushObjectContainer(building_sites, true);
sgd.PushObjectContainer(military_buildings, true);
}
开发者ID:Return-To-The-Roots,项目名称:s25client,代码行数:9,代码来源:BuildingRegister.cpp
注:本文中的SerializedGameData类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论