本文整理汇总了C++中SerializedGameData::PopBool方法的典型用法代码示例。如果您正苦于以下问题:C++ SerializedGameData::PopBool方法的具体用法?C++ SerializedGameData::PopBool怎么用?C++ SerializedGameData::PopBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerializedGameData
的用法示例。
在下文中一共展示了SerializedGameData::PopBool方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nofFlagWorker
nofGeologist::nofGeologist(SerializedGameData& sgd, const unsigned obj_id) : nofFlagWorker(sgd, obj_id), signs(sgd.PopUnsignedShort())
{
unsigned available_nodes_count = sgd.PopUnsignedInt();
for(unsigned i = 0; i < available_nodes_count; ++i)
{
MapPoint p = sgd.PopMapPoint();
available_nodes.push_back(p);
}
node_goal = sgd.PopMapPoint();
for(unsigned i = 0; i < 5; ++i)
resAlreadyFound[i] = sgd.PopBool();
}
示例2: noFigure
nofBuildingWorker::nofBuildingWorker(SerializedGameData& sgd, const unsigned obj_id)
: noFigure(sgd, obj_id), state(State(sgd.PopUnsignedChar()))
{
if(fs != FS_GOHOME && fs != FS_WANDER)
{
workplace = sgd.PopObject<nobUsual>(GOT_UNKNOWN);
ware = GoodType(sgd.PopUnsignedChar());
was_sounding = sgd.PopBool();
} else
{
workplace = nullptr;
ware = GD_NOTHING;
was_sounding = false;
}
}
示例3: noMovable
noShip::noShip(SerializedGameData& sgd, const unsigned obj_id) :
noMovable(sgd, obj_id),
player(sgd.PopUnsignedChar()),
state(State(sgd.PopUnsignedChar())),
seaId_(sgd.PopUnsignedShort()),
goal_harbor_id(sgd.PopUnsignedInt()),
goal_dir(sgd.PopUnsignedChar()),
name(sgd.PopString()),
curRouteIdx(sgd.PopUnsignedInt()),
route_(sgd.PopUnsignedInt()),
lost(sgd.PopBool()),
remaining_sea_attackers(sgd.PopUnsignedInt()),
home_harbor(sgd.PopUnsignedInt()),
covered_distance(sgd.PopUnsignedInt())
{
for(unsigned i = 0; i < route_.size(); ++i)
route_[i] = sgd.PopUnsignedChar();
sgd.PopObjectContainer(figures, GOT_UNKNOWN);
sgd.PopObjectContainer(wares, GOT_WARE);
}
示例4: noFigure
nofCarrier::nofCarrier(SerializedGameData& sgd, unsigned int obj_id)
: noFigure(sgd, obj_id),
ct( CarrierType(sgd.PopUnsignedChar()) ),
state( CarrierState(sgd.PopUnsignedChar()) ),
fat( sgd.PopBool() ),
workplace( sgd.PopObject<RoadSegment>(GOT_ROADSEGMENT) ),
carried_ware( sgd.PopObject<Ware>(GOT_WARE) ),
productivity_ev(sgd.PopEvent()),
productivity(sgd.PopUnsignedInt()),
worked_gf(sgd.PopUnsignedInt()),
since_working_gf(sgd.PopUnsignedInt()),
next_animation(0)
{
if(state == CARRS_BOATCARRIER_WANDERONWATER)
{
shore_path.resize(sgd.PopUnsignedInt());
for(std::vector<unsigned char>::iterator it = shore_path.begin(); it != shore_path.end(); ++it)
*it = sgd.PopUnsignedChar();
}
}
示例5: planing
fowBuildingSite::fowBuildingSite(SerializedGameData& sgd) :
planing(sgd.PopBool()),
type(BuildingType(sgd.PopUnsignedChar())),
nation(Nation(sgd.PopUnsignedChar())),
build_progress(sgd.PopUnsignedChar())
{}
示例6: noFigure
nofWarehouseWorker::nofWarehouseWorker(SerializedGameData& sgd, const unsigned obj_id) : noFigure(sgd, obj_id),
carried_ware(sgd.PopObject<Ware>(GOT_WARE)),
shouldBringWareIn(sgd.PopBool()),
fat(sgd.PopBool())
{
}
示例7: noCoordBase
noFire::noFire(SerializedGameData& sgd, const unsigned obj_id)
: noCoordBase(sgd, obj_id), isBig(sgd.PopBool()), dead_event(sgd.PopEvent()), was_sounding(false), last_sound(0), next_interval(0)
{}
示例8: Deserialize
void GameWorld::Deserialize(SerializedGameData& sgd)
{
// Headinformationen
width_ = sgd.PopUnsignedShort();
height_ = sgd.PopUnsignedShort();
lt = LandscapeType(sgd.PopUnsignedChar());
// Initialisierungen
Init();
// Obj-ID-Counter setzen
GameObject::SetObjIDCounter(sgd.PopUnsignedInt());
// Trade graphs
// Only if trade is enabled
if(GAMECLIENT.GetGGS().isEnabled(ADDON_TRADE))
{
tgs.resize(sgd.PopUnsignedChar());
for(unsigned i = 0; i < tgs.size(); ++i)
tgs[i] = new TradeGraph(sgd, this);
}
// Alle Weltpunkte serialisieren
for(unsigned i = 0; i < map_size; ++i)
{
for(unsigned z = 0; z < 3; ++z)
{
nodes[i].roads[z] = sgd.PopUnsignedChar();
nodes[i].roads_real[z] = nodes[i].roads[z] ? true : false;
}
nodes[i].altitude = sgd.PopUnsignedChar();
nodes[i].shadow = sgd.PopUnsignedChar();
nodes[i].t1 = TerrainType(sgd.PopUnsignedChar());
nodes[i].t2 = TerrainType(sgd.PopUnsignedChar());
nodes[i].resources = sgd.PopUnsignedChar();
nodes[i].reserved = sgd.PopBool();
nodes[i].owner = sgd.PopUnsignedChar();
for(unsigned b = 0; b < 4; ++b)
nodes[i].boundary_stones[b] = sgd.PopUnsignedChar();
nodes[i].bq = BuildingQuality(sgd.PopUnsignedChar());
for(unsigned z = 0; z < GAMECLIENT.GetPlayerCount(); ++z)
{
MapNode::FoWData& fow = nodes[i].fow[z];
fow.visibility = Visibility(sgd.PopUnsignedChar());
// Nur im FoW können FOW-Objekte stehen
if(fow.visibility == VIS_FOW)
{
fow.last_update_time = sgd.PopUnsignedInt();
fow.object = sgd.PopFOWObject();
for(unsigned r = 0; r < 3; ++r)
fow.roads[r] = sgd.PopUnsignedChar();
fow.owner = sgd.PopUnsignedChar();
for(unsigned b = 0; b < 4; ++b)
fow.boundary_stones[b] = sgd.PopUnsignedChar();
}
else
{
fow.last_update_time = 0;
fow.object = NULL;
for(unsigned r = 0; r < 3; ++r)
fow.roads[r] = 0;
fow.owner = 0;
for(unsigned b = 0; b < 4; ++b)
fow.boundary_stones[b] = 0;
}
}
nodes[i].obj = sgd.PopObject<noBase>(GOT_UNKNOWN);
sgd.PopObjectContainer(nodes[i].figures, GOT_UNKNOWN);
nodes[i].sea_id = sgd.PopUnsignedShort();
nodes[i].harbor_id = sgd.PopUnsignedInt();
if (nodes[i].harbor_id)
{
GameWorldBase::HarborPos p(MapPoint((MapCoord) (i % width_), (MapCoord) (i / width_)));
harbor_pos.push_back(p);
}
}
// Katapultsteine deserialisieren
sgd.PopObjectContainer(catapult_stones, GOT_CATAPULTSTONE);
// Meeresinformationen deserialisieren
seas.resize(sgd.PopUnsignedInt());
for(unsigned i = 0; i < seas.size(); ++i)
{
seas[i].nodes_count = sgd.PopUnsignedInt();
}
// Hafenpositionen serialisieren
harbor_pos.resize(sgd.PopUnsignedInt());
for(unsigned i = 0; i < harbor_pos.size(); ++i)
{
harbor_pos[i].pos = sgd.PopMapPoint();
for(unsigned z = 0; z < 6; ++z)
harbor_pos[i].cps[z].sea_id = sgd.PopUnsignedShort();
for(unsigned z = 0; z < 6; ++z)
{
harbor_pos[i].neighbors[z].resize(sgd.PopUnsignedInt());
//.........这里部分代码省略.........
示例9: nofFarmhand
nofFisher::nofFisher(SerializedGameData& sgd, const unsigned obj_id) : nofFarmhand(sgd, obj_id),
fishing_dir(sgd.PopUnsignedChar()),
successful(sgd.PopBool())
{
}
示例10: nofFarmhand
nofCharburner::nofCharburner(SerializedGameData& sgd, const unsigned obj_id) : nofFarmhand(sgd, obj_id),
harvest(sgd.PopBool()),
wt(WareType(sgd.PopUnsignedChar()))
{
}
示例11: active
nobHarborBuilding::ExplorationExpeditionInfo::ExplorationExpeditionInfo(SerializedGameData& sgd) :
active(sgd.PopBool()),
scouts(sgd.PopUnsignedInt())
{
}
示例12: boards
nobHarborBuilding::ExpeditionInfo::ExpeditionInfo(SerializedGameData& sgd) :
boards(sgd.PopUnsignedInt()),
stones(sgd.PopUnsignedInt()),
active(sgd.PopBool()),
builder(sgd.PopBool())
{}
示例13: nofWorkman
nofArmorer::nofArmorer(SerializedGameData& sgd, const unsigned obj_id) : nofWorkman(sgd, obj_id),
sword_shield(sgd.PopBool())
{
}
示例14: nobBaseWarehouse
nobHQ::nobHQ(SerializedGameData& sgd, const unsigned obj_id) : nobBaseWarehouse(sgd, obj_id), isTent_(sgd.PopBool())
{
gwg->GetMilitarySquares().Add(this);
}
示例15: nobBaseWarehouse
nobHQ::nobHQ(SerializedGameData& sgd, const unsigned obj_id) : nobBaseWarehouse(sgd, obj_id), isTent_(sgd.PopBool())
{
gwg->GetMilitarySquares().Add(this);
// Startpos setzen
GAMECLIENT.GetPlayer(player).hqPos = this->pos;
}