当前位置: 首页>>代码示例>>C++>>正文


C++ Writer::Bool方法代码示例

本文整理汇总了C++中serializer::Writer::Bool方法的典型用法代码示例。如果您正苦于以下问题:C++ Writer::Bool方法的具体用法?C++ Writer::Bool怎么用?C++ Writer::Bool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在serializer::Writer的用法示例。


在下文中一共展示了Writer::Bool方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Save

void Body::Save(Serializer::Writer &wr, Space *space)
{
	wr.Int32(space->GetIndexForFrame(m_frame));
	wr.String(m_label);
	wr.Bool(m_dead);
	wr.Bool(m_hasDoubleFrame);
}
开发者ID:AaronSenese,项目名称:pioneer,代码行数:7,代码来源:Body.cpp

示例2: Save

void SpaceStation::Save(Serializer::Writer &wr, Space *space)
{
	ModelBody::Save(wr, space);
	MarketAgent::Save(wr);
	wr.Int32(Equip::TYPE_MAX);
	for (int i=0; i<Equip::TYPE_MAX; i++) {
		wr.Int32(int(m_equipmentStock[i]));
	}
	// save shipyard
	wr.Int32(m_shipsOnSale.size());
	for (std::vector<ShipOnSale>::iterator i = m_shipsOnSale.begin();
			i != m_shipsOnSale.end(); ++i) {
		wr.String((*i).id);
		wr.String((*i).regId);
		(*i).skin.Save(wr);
	}
	for (int i=0; i<MAX_DOCKING_PORTS; i++) {
		wr.Int32(space->GetIndexForBody(m_shipDocking[i].ship));
		wr.Int32(m_shipDocking[i].stage);
		wr.Float(float(m_shipDocking[i].stagePos));
		wr.Vector3d(m_shipDocking[i].fromPos);
		wr.WrQuaternionf(m_shipDocking[i].fromRot);
	}
	wr.Bool(m_dockingLock);

	wr.Bool(m_bbCreated);
	wr.Double(m_lastUpdatedShipyard);
	wr.Int32(space->GetIndexForSystemBody(m_sbody));
	wr.Int32(m_numPoliceDocked);

	m_navLights->Save(wr);
}
开发者ID:abramhindle,项目名称:pioneer,代码行数:32,代码来源:SpaceStation.cpp

示例3: SaveMaterials

void BinaryConverter::SaveMaterials(Serializer::Writer& wr, Model* model)
{
	//Look for the .model definition and parse it
	//for material definitions
	const ModelDefinition &modelDef = FindModelDefinition(model->GetName());

	wr.Int32(modelDef.matDefs.size());

	for (const auto& m : modelDef.matDefs) {
		wr.String(m.name);
		wr.String(m.tex_diff);
		wr.String(m.tex_spec);
		wr.String(m.tex_glow);
		wr.String(m.tex_ambi);
		wr.String(m.tex_norm);
		wr.Color4UB(m.diffuse);
		wr.Color4UB(m.specular);
		wr.Color4UB(m.ambient);
		wr.Color4UB(m.emissive);
		wr.Int16(m.shininess);
		wr.Int16(m.opacity);
		wr.Bool(m.alpha_test);
		wr.Bool(m.unlit);
		wr.Bool(m.use_pattern);
	}
}
开发者ID:Ash-Bash,项目名称:pioneer-horizons,代码行数:26,代码来源:BinaryConverter.cpp

示例4: Save

void ModelBody::Save(Serializer::Writer &wr, Space *space)
{
	Body::Save(wr, space);
	wr.Bool(m_isStatic);
	wr.Bool(m_colliding);
	wr.String(m_modelName);
	m_model->Save(wr);
}
开发者ID:rawbug,项目名称:pioneer,代码行数:8,代码来源:ModelBody.cpp

示例5: Save

void Body::Save(Serializer::Writer &wr)
{
	wr.Int32(Serializer::LookupFrame(m_frame));
	wr.String(m_label);
	wr.Bool(m_onscreen);
	wr.Vector3d(m_projectedPos);
	wr.Bool(m_dead);
	wr.Bool(m_hasDoubleFrame);
}
开发者ID:GAlexx,项目名称:pioneer,代码行数:9,代码来源:Body.cpp

示例6: Save

void SpaceStation::Save(Serializer::Writer &wr, Space *space)
{
	ModelBody::Save(wr, space);
	wr.Int32(Equip::TYPE_MAX);
	wr.Int32(m_shipDocking.size());
	for (Uint32 i=0; i<m_shipDocking.size(); i++) {
		wr.Int32(space->GetIndexForBody(m_shipDocking[i].ship));
		wr.Int32(m_shipDocking[i].stage);
		wr.Float(float(m_shipDocking[i].stagePos));
		wr.Vector3d(m_shipDocking[i].fromPos);
		wr.WrQuaternionf(m_shipDocking[i].fromRot);
	}
	// store each of the bay groupings
	wr.Int32(mBayGroups.size());
	for (Uint32 i=0; i<mBayGroups.size(); i++) {
		wr.Int32(mBayGroups[i].minShipSize);
		wr.Int32(mBayGroups[i].maxShipSize);
		wr.Bool(mBayGroups[i].inUse);
		wr.Int32(mBayGroups[i].bayIDs.size());
		for (Uint32 j=0; j<mBayGroups[i].bayIDs.size(); j++) {
			wr.Int32(mBayGroups[i].bayIDs[j]);
		}
	}

	wr.Int32(space->GetIndexForSystemBody(m_sbody));
	wr.Int32(m_numPoliceDocked);

	wr.Double(m_doorAnimationStep);
	wr.Double(m_doorAnimationState);

	m_navLights->Save(wr);
}
开发者ID:AmesianX,项目名称:pioneer,代码行数:32,代码来源:SpaceStation.cpp

示例7: Save

void SectorView::Save(Serializer::Writer &wr)
{
    wr.Float(m_pos.x);
    wr.Float(m_pos.y);
    wr.Float(m_pos.z);
    wr.Float(m_rotX);
    wr.Float(m_rotZ);
    wr.Float(m_zoom);
    wr.Bool(m_inSystem);
    m_current.Serialize(wr);
    m_selected.Serialize(wr);
    m_hyperspaceTarget.Serialize(wr);
    wr.Bool(m_matchTargetToSelection);
    wr.Bool(m_selectionFollowsMovement);
    wr.Byte(m_detailBoxVisible);
}
开发者ID:Luomu,项目名称:pioneer,代码行数:16,代码来源:SectorView.cpp

示例8: Save

void Missile::Save(Serializer::Writer &wr, Space *space)
{
	Ship::Save(wr, space);
	wr.Int32(space->GetIndexForBody(m_owner));
	wr.Int32(m_power);
	wr.Bool(m_armed);
}
开发者ID:lwho,项目名称:pioneer,代码行数:7,代码来源:Missile.cpp

示例9: Save

void Ship::Save(Serializer::Writer &wr)
{
	DynamicBody::Save(wr);
	wr.Vector3d(m_angThrusters);
	wr.Vector3d(m_thrusters);
	wr.Int32(m_wheelTransition);
	wr.Float(m_wheelState);
	wr.Float(m_launchLockTimeout);
	wr.Bool(m_testLanded);
	wr.Int32(int(m_flightState));
	wr.Int32(int(m_alertState));
	wr.Float(m_lastFiringAlert);

	m_hyperspace.dest.Serialize(wr);
	wr.Float(m_hyperspace.countdown);

	for (int i=0; i<ShipType::GUNMOUNT_MAX; i++) {
		wr.Int32(m_gunState[i]);
		wr.Float(m_gunRecharge[i]);
		wr.Float(m_gunTemperature[i]);
	}
	wr.Float(m_ecmRecharge);
	m_shipFlavour.Save(wr);
	wr.Int32(m_dockedWithPort);
	wr.Int32(Serializer::LookupBody(m_dockedWith));
	m_equipment.Save(wr);
	wr.Float(m_stats.hull_mass_left);
	wr.Float(m_stats.shield_mass_left);
	if(m_curAICmd) { wr.Int32(1); m_curAICmd->Save(wr); }
	else wr.Int32(0);
}
开发者ID:GAlexx,项目名称:pioneer,代码行数:31,代码来源:Ship.cpp

示例10: Save

void NavLights::Save(Serializer::Writer &wr)
{
	wr.Float(m_time);
	wr.Bool(m_enabled);

	for (LightIterator it = m_lights.begin(); it != m_lights.end(); ++it)
		wr.Byte(it->color);
}
开发者ID:Faiva78,项目名称:pioneer,代码行数:8,代码来源:NavLights.cpp

示例11: Save

void SpaceStation::Save(Serializer::Writer &wr, Space *space)
{
	ModelBody::Save(wr, space);
	MarketAgent::Save(wr);
	wr.Int32(Equip::TYPE_MAX);
	for (int i=0; i<Equip::TYPE_MAX; i++) {
		wr.Int32(int(m_equipmentStock[i]));
	}
	// save shipyard
	wr.Int32(m_shipsOnSale.size());
	for (std::vector<ShipOnSale>::iterator i = m_shipsOnSale.begin();
			i != m_shipsOnSale.end(); ++i) {
		wr.String((*i).id);
		wr.String((*i).regId);
		(*i).skin.Save(wr);
	}
	wr.Int32(m_shipDocking.size());
	for (uint32_t i=0; i<m_shipDocking.size(); i++) {
		wr.Int32(space->GetIndexForBody(m_shipDocking[i].ship));
		wr.Int32(m_shipDocking[i].stage);
		wr.Float(float(m_shipDocking[i].stagePos));
		wr.Vector3d(m_shipDocking[i].fromPos);
		wr.WrQuaternionf(m_shipDocking[i].fromRot);
	}
	// store each of the bay groupings
	wr.Int32(mBayGroups.size());
	for (uint32_t i=0; i<mBayGroups.size(); i++) {
		wr.Int32(mBayGroups[i].minShipSize);
		wr.Int32(mBayGroups[i].maxShipSize);
		wr.Bool(mBayGroups[i].inUse);
		wr.Int32(mBayGroups[i].bayIDs.size());
		for (uint32_t j=0; j<mBayGroups[i].bayIDs.size(); j++) {
			wr.Int32(mBayGroups[i].bayIDs[j]);
		}
	}

	wr.Bool(m_bbCreated);
	wr.Double(m_lastUpdatedShipyard);
	wr.Int32(space->GetIndexForSystemBody(m_sbody));
	wr.Int32(m_numPoliceDocked);

	wr.Double(m_doorAnimationStep);
	wr.Double(m_doorAnimationState);

	m_navLights->Save(wr);
}
开发者ID:rawbug,项目名称:pioneer,代码行数:46,代码来源:SpaceStation.cpp

示例12: Save

void PlayerShipController::Save(Serializer::Writer &wr, Space *space)
{
	wr.Int32(static_cast<int>(m_flightControlState));
	wr.Double(m_setSpeed);
	wr.Float(m_lowThrustPower);
	wr.Bool(m_rotationDamping);
	wr.Int32(space->GetIndexForBody(m_combatTarget));
	wr.Int32(space->GetIndexForBody(m_navTarget));
	wr.Int32(space->GetIndexForBody(m_setSpeedTarget));
}
开发者ID:arcadia-xenos,项目名称:pioneer,代码行数:10,代码来源:ShipController.cpp

示例13: Save

void HyperspaceCloud::Save(Serializer::Writer &wr, Space *space)
{
	Body::Save(wr, space);
	wr.Vector3d(m_vel);
	wr.Double(m_birthdate);
	wr.Double(m_due);
	wr.Bool(m_isArrival);
	wr.Bool(m_ship != 0);
	if (m_ship) m_ship->Serialize(wr, space);
}
开发者ID:AmesianX,项目名称:pioneer,代码行数:10,代码来源:HyperspaceCloud.cpp

示例14: Save

void Body::Save(Serializer::Writer &wr, Space *space)
{
	wr.Int32(space->GetIndexForFrame(m_frame));
	wr.String(m_label);
	wr.Bool(m_dead);

	wr.Vector3d(m_pos);
	for (int i=0; i<9; i++) wr.Double(m_orient[i]);
	wr.Double(m_physRadius);
	wr.Double(m_clipRadius);
}
开发者ID:MeteoricGames,项目名称:pioneer,代码行数:11,代码来源:Body.cpp

示例15: Save

void DynamicBody::Save(Serializer::Writer &wr, Space *space)
{
    ModelBody::Save(wr, space);
    wr.Vector3d(m_force);
    wr.Vector3d(m_torque);
    wr.Vector3d(m_vel);
    wr.Vector3d(m_angVel);
    wr.Double(m_mass);
    wr.Double(m_massRadius);
    wr.Double(m_angInertia);
    wr.Bool(m_isMoving);
}
开发者ID:dreadk2002,项目名称:pioneer,代码行数:12,代码来源:DynamicBody.cpp


注:本文中的serializer::Writer::Bool方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。