本文整理汇总了C++中serializer::Reader类的典型用法代码示例。如果您正苦于以下问题:C++ Reader类的具体用法?C++ Reader怎么用?C++ Reader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Reader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
void ShipFlavour::Load(Serializer::Reader &rd)
{
id = rd.String();
price = rd.Int32();
regid = rd.String();
LoadLmrMaterial(rd, &primaryColor);
LoadLmrMaterial(rd, &secondaryColor);
}
示例2: Load
void Player::Load(Serializer::Reader &rd, Space *space)
{
Pi::player = this;
Ship::Load(rd, space);
MarketAgent::Load(rd);
m_killCount = rd.Int32();
m_knownKillCount = rd.Int32();
}
示例3: Load
void Missile::Load(Serializer::Reader &rd)
{
Ship::Load(rd);
m_ownerIndex = rd.Int32();
m_targetIndex = rd.Int32();
m_distToTarget = rd.Double();
m_power = rd.Int32();
}
示例4: Load
void Projectile::Load(Serializer::Reader &rd, Space *space)
{
Body::Load(rd, space);
m_baseVel = rd.Vector3d();
m_dirVel = rd.Vector3d();
m_age = rd.Float();
m_type = rd.Int32();
m_parentIndex = rd.Int32();
}
示例5: Load
void Player::Load(Serializer::Reader &rd)
{
Pi::player = this;
Ship::Load(rd);
m_flightControlState = static_cast<FlightControlState>(rd.Int32());
m_setSpeed = rd.Double();
m_killCount = rd.Int32();
m_knownKillCount = rd.Int32();
}
示例6: Load
void ModelBody::Load(Serializer::Reader &rd, Space *space)
{
Body::Load(rd, space);
m_isStatic = rd.Bool();
m_colliding = rd.Bool();
SetModel(rd.String().c_str());
m_model->Load(rd);
m_shields->Load(rd);
}
示例7: Unserialize
void Unserialize(Serializer::Reader &rd)
{
Init();
PersistSystemData<Sint64>::Unserialize(rd, &s_criminalRecord);
PersistSystemData<Sint64>::Unserialize(rd, &s_outstandingFine);
for (int i=0; i<BLOC_MAX; i++) {
s_playerPerBlocCrimeRecord[i].record = rd.Int64();
s_playerPerBlocCrimeRecord[i].fine = rd.Int64();
}
}
示例8: ScannerMode
ScannerWidget::ScannerWidget(Graphics::Renderer *r, Serializer::Reader &rd) :
m_renderer(r)
{
m_mode = ScannerMode(rd.Int32());
m_currentRange = rd.Float();
m_manualRange = rd.Float();
m_targetRange = rd.Float();
InitObject();
}
示例9: Load
void Model::Load(Serializer::Reader &rd)
{
LoadVisitor lv(&rd);
m_root->Accept(lv);
for (AnimationContainer::const_iterator i = m_animations.begin(); i != m_animations.end(); ++i)
(*i)->SetProgress(rd.Double());
UpdateAnimations();
SetPattern(rd.Int32());
}
示例10: Load
void HyperspaceCloud::Load(Serializer::Reader &rd, Space *space)
{
Body::Load(rd, space);
m_vel = rd.Vector3d();
m_birthdate = rd.Double();
m_due = rd.Double();
m_isArrival = rd.Bool();
if (rd.Bool()) {
m_ship = static_cast<Ship*>(Body::Unserialize(rd, space));
}
}
示例11: Load
void NavLights::Load(Serializer::Reader &rd)
{
m_time = rd.Float();
m_enabled = rd.Bool();
RefCountedPtr<Graphics::Material> mat;
for (LightIterator it = m_lights.begin(); it != m_lights.end(); ++it) {
Uint8 c = rd.Byte();
it->billboard->SetMaterial(get_material(c));
}
}
示例12: Load
void ModelSkin::Load(Serializer::Reader &rd)
{
for (unsigned int i = 0; i < 3; i++) {
m_colors[i].r = rd.Byte();
m_colors[i].g = rd.Byte();
m_colors[i].b = rd.Byte();
}
for (unsigned int i = 0; i < MAX_DECAL_MATERIALS; i++)
m_decals[i] = rd.String();
m_label = rd.String();
}
示例13: Unserialize
void Unserialize(Serializer::Reader &rd)
{
Init();
PersistSystemData<Sint64>::Unserialize(rd, &s_criminalRecord);
PersistSystemData<Sint64>::Unserialize(rd, &s_outstandingFine);
const Uint32 numFactions = rd.Int32();
assert(s_playerPerBlocCrimeRecord.size() == numFactions);
for (Uint32 i=0; i < numFactions; i++) {
s_playerPerBlocCrimeRecord[i].record = rd.Int64();
s_playerPerBlocCrimeRecord[i].fine = rd.Int64();
}
}
示例14: Unserialize
void Pi::Unserialize(Serializer::Reader &rd)
{
Serializer::Reader section;
SetTimeAccel(0);
requestedTimeAccelIdx = 0;
Space::Clear();
if (Pi::player) {
Pi::player->MarkDead();
Space::bodies.remove(Pi::player);
delete Pi::player;
Pi::player = 0;
}
section = rd.RdSection("PiMisc");
gameTime = section.Double();
selectedSystem = StarSystem::Unserialize(section);
currentSystem = StarSystem::Unserialize(section);
section = rd.RdSection("Space");
Space::Unserialize(section);
section = rd.RdSection("Polit");
Polit::Unserialize(section);
section = rd.RdSection("SectorView");
sectorView->Load(section);
section = rd.RdSection("WorldView");
worldView->Load(section);
section = rd.RdSection("LuaModules");
PiLuaModules::Unserialize(section);
}
示例15: Load
void CollMesh::Load(Serializer::Reader &rd)
{
m_aabb.max = rd.Vector3d();
m_aabb.min = rd.Vector3d();
m_aabb.radius = rd.Double();
m_geomTree = new GeomTree(rd);
const Uint32 numDynGeomTrees = rd.Int32();
m_dynGeomTrees.reserve(numDynGeomTrees);
for (Uint32 it = 0; it < numDynGeomTrees; ++it) {
m_dynGeomTrees.push_back(new GeomTree(rd));
}
m_totalTris = rd.Int32();
}