本文整理汇总了C++中serializer::Reader::Bool方法的典型用法代码示例。如果您正苦于以下问题:C++ Reader::Bool方法的具体用法?C++ Reader::Bool怎么用?C++ Reader::Bool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类serializer::Reader
的用法示例。
在下文中一共展示了Reader::Bool方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadMaterials
void BinaryConverter::LoadMaterials(Serializer::Reader &rd)
{
for (Uint32 numMats = rd.Int32(); numMats > 0; numMats--) {
MaterialDefinition m("");
m.name = rd.String();
m.tex_diff = rd.String();
m.tex_spec = rd.String();
m.tex_glow = rd.String();
m.tex_ambi = rd.String();
m.tex_norm = rd.String();
m.diffuse = rd.Color4UB();
m.specular = rd.Color4UB();
m.ambient = rd.Color4UB();
m.emissive = rd.Color4UB();
m.shininess = rd.Int16();
m.opacity = rd.Int16();
m.alpha_test = rd.Bool();
m.unlit = rd.Bool();
m.use_pattern = rd.Bool();
if (m.use_pattern) m_patternsUsed = true;
ConvertMaterialDefinition(m);
}
}
示例2: Load
void Body::Load(Serializer::Reader &rd, Space *space)
{
m_frame = space->GetFrameByIndex(rd.Int32());
m_label = rd.String();
m_dead = rd.Bool();
m_hasDoubleFrame = rd.Bool();
}
示例3: 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);
}
示例4: Load
void Body::Load(Serializer::Reader &rd)
{
m_frame = Serializer::LookupFrame(rd.Int32());
m_label = rd.String();
m_onscreen = rd.Bool();
m_projectedPos = rd.Vector3d();
m_dead = rd.Bool();
m_hasDoubleFrame = rd.Bool();
}
示例5: 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));
}
}
示例6: AICommand
AIParagonCmdGoTo::AIParagonCmdGoTo(Serializer::Reader &rd) : AICommand(rd, CMD_PARAGON_GOTO)
{
m_targetFrameIndex = rd.Int32();
m_targetPosition = rd.Vector3d();
m_toTransit = rd.Bool();
if(Game::s_loadedGameVersion >= 77) { // Save game upgrade: 76 -> 77
m_targetOrient = matrix3x3d::FromVectors(
rd.Vector3d(), rd.Vector3d(), rd.Vector3d());
m_startPO.pos = rd.Vector3d();
m_startPO.xaxis = rd.Vector3d();
m_startPO.yaxis = rd.Vector3d();
m_startPO.zaxis = rd.Vector3d();
m_endPO.pos = rd.Vector3d();
m_endPO.xaxis = rd.Vector3d();
m_endPO.yaxis = rd.Vector3d();
m_endPO.zaxis = rd.Vector3d();
m_speedLimit = rd.Double();
m_arrivalSpeed = rd.Double();
m_mode = static_cast<EGoToMode>(rd.Int32());
}
}
示例7: Load
void SpaceStation::Load(Serializer::Reader &rd, Space *space)
{
ModelBody::Load(rd, space);
MarketAgent::Load(rd);
int num = rd.Int32();
if (num > Equip::TYPE_MAX) throw SavedGameCorruptException();
for (int i=0; i<Equip::TYPE_MAX; i++) {
m_equipmentStock[i] = 0;
}
for (int i=0; i<num; i++) {
m_equipmentStock[i] = static_cast<Equip::Type>(rd.Int32());
}
// load shityard
int numShipsForSale = rd.Int32();
for (int i=0; i<numShipsForSale; i++) {
ShipFlavour s;
s.Load(rd);
m_shipsOnSale.push_back(s);
}
for (int i=0; i<MAX_DOCKING_PORTS; i++) {
m_shipDocking[i].shipIndex = rd.Int32();
m_shipDocking[i].stage = rd.Int32();
m_shipDocking[i].stagePos = rd.Float();
m_shipDocking[i].fromPos = rd.Vector3d();
m_shipDocking[i].fromRot = rd.RdQuaternionf();
m_openAnimState[i] = rd.Float();
m_dockAnimState[i] = rd.Float();
}
m_bbCreated = rd.Bool();
m_lastUpdatedShipyard = rd.Double();
m_sbody = space->GetSystemBodyByIndex(rd.Int32());
m_numPoliceDocked = rd.Int32();
InitStation();
}
示例8: Load
void Missile::Load(Serializer::Reader &rd, Space *space)
{
Ship::Load(rd, space);
m_ownerIndex = rd.Int32();
m_power = rd.Int32();
m_armed = rd.Bool();
}
示例9: 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));
}
}
示例10:
SectorView::SectorView(Serializer::Reader &rd)
{
InitDefaults();
m_pos.x = m_posMovingTo.x = rd.Float();
m_pos.y = m_posMovingTo.y = rd.Float();
m_pos.z = m_posMovingTo.z = rd.Float();
m_rotX = m_rotXMovingTo = rd.Float();
m_rotZ = m_rotZMovingTo = rd.Float();
m_zoom = m_zoomMovingTo = rd.Float();
m_inSystem = rd.Bool();
m_current = SystemPath::Unserialize(rd);
m_selected = SystemPath::Unserialize(rd);
m_hyperspaceTarget = SystemPath::Unserialize(rd);
m_matchTargetToSelection = rd.Bool();
m_selectionFollowsMovement = rd.Bool();
m_detailBoxVisible = rd.Byte();
InitObject();
}
示例11: Load
void PlayerShipController::Load(Serializer::Reader &rd)
{
m_flightControlState = static_cast<FlightControlState>(rd.Int32());
m_setSpeed = rd.Double();
m_lowThrustPower = rd.Float();
m_rotationDamping = rd.Bool();
//figure out actual bodies in PostLoadFixup - after Space body index has been built
m_combatTargetIndex = rd.Int32();
m_navTargetIndex = rd.Int32();
m_setSpeedTargetIndex = rd.Int32();
}
示例12: Load
void Body::Load(Serializer::Reader &rd, Space *space)
{
m_frame = space->GetFrameByIndex(rd.Int32());
m_label = rd.String();
Properties().Set("label", m_label);
m_dead = rd.Bool();
m_pos = rd.Vector3d();
for (int i=0; i<9; i++) m_orient[i] = rd.Double();
m_physRadius = rd.Double();
m_clipRadius = rd.Double();
}
示例13: Load
void DynamicBody::Load(Serializer::Reader &rd, Space *space)
{
ModelBody::Load(rd, space);
m_force = rd.Vector3d();
m_torque = rd.Vector3d();
m_vel = rd.Vector3d();
m_angVel = rd.Vector3d();
m_mass = rd.Double();
m_massRadius = rd.Double();
m_angInertia = rd.Double();
m_isMoving = rd.Bool();
}
示例14: Load
void SpaceStation::Load(Serializer::Reader &rd, Space *space)
{
ModelBody::Load(rd, space);
MarketAgent::Load(rd);
int num = rd.Int32();
if (num > Equip::TYPE_MAX) throw SavedGameCorruptException();
for (int i=0; i<Equip::TYPE_MAX; i++) {
m_equipmentStock[i] = 0;
}
for (int i=0; i<num; i++) {
m_equipmentStock[i] = static_cast<Equip::Type>(rd.Int32());
}
// load shityard
int numShipsForSale = rd.Int32();
for (int i=0; i<numShipsForSale; i++) {
ShipType::Id id(rd.String());
std::string regId(rd.String());
SceneGraph::ModelSkin skin;
skin.Load(rd);
ShipOnSale sos(id, regId, skin);
m_shipsOnSale.push_back(sos);
}
for (int i=0; i<MAX_DOCKING_PORTS; i++) {
m_shipDocking[i].shipIndex = rd.Int32();
m_shipDocking[i].stage = rd.Int32();
m_shipDocking[i].stagePos = rd.Float();
m_shipDocking[i].fromPos = rd.Vector3d();
m_shipDocking[i].fromRot = rd.RdQuaternionf();
}
m_dockingLock = rd.Bool();
m_bbCreated = rd.Bool();
m_lastUpdatedShipyard = rd.Double();
m_sbody = space->GetSystemBodyByIndex(rd.Int32());
m_numPoliceDocked = rd.Int32();
InitStation();
m_navLights->Load(rd);
}
示例15: Load
void DynamicBody::Load(Serializer::Reader &rd)
{
ModelBody::Load(rd);
for (int i=0; i<16; i++) m_orient[i] = rd.Double();
m_oldOrient = m_orient;
m_force = rd.Vector3d();
m_torque = rd.Vector3d();
m_vel = rd.Vector3d();
m_angVel = rd.Vector3d();
m_mass = rd.Double();
m_massRadius = rd.Double();
m_angInertia = rd.Double();
m_enabled = rd.Bool();
}