本文整理汇总了C++中serializer::Reader类的典型用法代码示例。如果您正苦于以下问题:C++ Reader类的具体用法?C++ Reader怎么用?C++ Reader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Reader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Load
void ShipFlavour::Load(Serializer::Reader &rd)
{
id = rd.String();
price = rd.Int32();
regid = rd.String();
LoadLmrMaterial(rd, &primaryColor);
LoadLmrMaterial(rd, &secondaryColor);
}
开发者ID:GizmoR13,项目名称:pioneer,代码行数:8,代码来源:ShipFlavour.cpp
示例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();
}
开发者ID:GizmoR13,项目名称:pioneer,代码行数:8,代码来源:Player.cpp
示例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();
}
开发者ID:Sunsetjoy,项目名称:pioneer,代码行数:8,代码来源:Missile.cpp
示例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();
}
开发者ID:AmesianX,项目名称:pioneer,代码行数:9,代码来源:Projectile.cpp
示例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();
}
开发者ID:Snaar,项目名称:pioneer,代码行数:9,代码来源:Player.cpp
示例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);
}
开发者ID:lwho,项目名称:pioneer,代码行数:9,代码来源:ModelBody.cpp
示例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();
}
}
开发者ID:jbuck,项目名称:pioneer,代码行数:10,代码来源:Polit.cpp
示例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();
}
开发者ID:lwho,项目名称:pioneer,代码行数:10,代码来源:ShipCpanelMultiFuncDisplays.cpp
示例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());
}
开发者ID:Brooking,项目名称:pioneer,代码行数:11,代码来源:Model.cpp
示例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));
}
}
开发者ID:AmesianX,项目名称:pioneer,代码行数:11,代码来源:HyperspaceCloud.cpp
示例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));
}
}
开发者ID:Faiva78,项目名称:pioneer,代码行数:11,代码来源:NavLights.cpp
示例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();
}
开发者ID:christiank,项目名称:pioneer,代码行数:11,代码来源:ModelSkin.cpp
示例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();
}
}
开发者ID:tnicoll,项目名称:pioneer,代码行数:12,代码来源:Polit.cpp
示例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);
}
开发者ID:Snaar,项目名称:pioneer,代码行数:34,代码来源:Pi.cpp
示例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();
}
开发者ID:emptyhead,项目名称:pioneer,代码行数:16,代码来源:CollMesh.cpp
示例16: ScannerWidget
ShipCpanel::ShipCpanel(Serializer::Reader &rd, Graphics::Renderer *r): Gui::Fixed(float(Gui::Screen::GetWidth()), 80)
{
m_scanner = new ScannerWidget(r, rd);
InitObject();
m_camButton->SetActiveState(rd.Int32());
}
开发者ID:Luomu,项目名称:pioneer,代码行数:8,代码来源:ShipCpanel.cpp
示例17: Load
/*
* Should have initialised with EquipSet(ShipType::Type) first
*/
void EquipSet::Load(Serializer::Reader &rd)
{
const int numSlots = rd.Int32();
assert(numSlots <= Equip::SLOT_MAX);
for (int i=0; i<numSlots; i++) {
const int numItems = rd.Int32();
for (int j=0; j<numItems; j++) {
if (j < signed(equip[i].size())) {
equip[i][j] = static_cast<Equip::Type>(rd.Int32());
} else {
// equipment slot sizes have changed. just
// dump the difference
rd.Int32();
}
}
}
onChange.emit();
}
开发者ID:unavowed,项目名称:pioneer,代码行数:21,代码来源:ShipType.cpp
示例18:
Space::Space(Game *game, Serializer::Reader &rd) : m_game(game), m_frameIndexValid(false), m_bodyIndexValid(false), m_sbodyIndexValid(false)
{
m_starSystem = StarSystem::Unserialize(rd);
m_background.Refresh(m_starSystem->m_seed);
RebuildSBodyIndex();
Serializer::Reader section = rd.RdSection("Frames");
m_rootFrame.Reset(Frame::Unserialize(section, this, 0));
RebuildFrameIndex();
Uint32 nbodies = rd.Int32();
for (Uint32 i = 0; i < nbodies; i++)
m_bodies.push_back(Body::Unserialize(rd, this));
RebuildBodyIndex();
for (BodyIterator i = m_bodies.begin(); i != m_bodies.end(); ++i)
(*i)->PostLoadFixup(this);
Frame::PostUnserializeFixup(m_rootFrame.Get(), this);
}
开发者ID:RonLosey,项目名称:pioneer,代码行数:19,代码来源:Space.cpp
示例19: Load
void Shields::Load(Serializer::Reader &rd)
{
m_enabled = rd.Bool();
const Uint32 NumShields = rd.Int32();
assert(NumShields == m_shields.size());
for (Uint32 iRead = 0; iRead < NumShields; iRead++ ) {
const Uint8 r = rd.Byte();
const Uint8 g = rd.Byte();
const Uint8 b = rd.Byte();
const std::string name = rd.String();
for (ShieldIterator it = m_shields.begin(); it != m_shields.end(); ++it) {
if(name==it->m_mesh->GetName()) {
it->m_colour = Color3ub(r, g, b);
break;
}
}
}
}
开发者ID:lwho,项目名称:pioneer,代码行数:19,代码来源:Shields.cpp
示例20: Star
Body *Body::Unserialize(Serializer::Reader &_rd, Space *space)
{
Serializer::Reader rd = _rd.RdSection("Body");
Body *b = 0;
Object::Type type = Object::Type(rd.Int32());
switch (type) {
case Object::STAR:
b = new Star(); break;
case Object::PLANET:
b = new Planet();
break;
case Object::SPACESTATION:
b = new SpaceStation(); break;
case Object::SHIP:
b = new Ship(); break;
case Object::PLAYER:
b = new Player(); break;
case Object::MISSILE:
b = new Missile(); break;
case Object::PROJECTILE:
b = new Projectile(); break;
case Object::CARGOBODY:
b = new CargoBody(); break;
case Object::HYPERSPACECLOUD:
b = new HyperspaceCloud(); break;
default:
assert(0);
}
b->Load(rd, space);
// must SetFrame() correctly so ModelBodies can add geom to space
Frame *f = b->m_frame;
b->m_frame = 0;
b->SetFrame(f);
//
b->SetPosition(rd.Vector3d());
matrix4x4d m;
for (int i=0; i<16; i++) m[i] = rd.Double();
b->SetRotMatrix(m);
return b;
}
开发者ID:AaronSenese,项目名称:pioneer,代码行数:40,代码来源:Body.cpp
注:本文中的serializer::Reader类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论