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


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

本文整理汇总了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);
	}
}
开发者ID:Ash-Bash,项目名称:pioneer-horizons,代码行数:25,代码来源:BinaryConverter.cpp

示例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();
}	
开发者ID:AaronSenese,项目名称:pioneer,代码行数:7,代码来源:Body.cpp

示例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);
}
开发者ID:rawbug,项目名称:pioneer,代码行数:8,代码来源:ModelBody.cpp

示例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();
}	
开发者ID:GAlexx,项目名称:pioneer,代码行数:9,代码来源:Body.cpp

示例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));
	}
}
开发者ID:AmesianX,项目名称:pioneer,代码行数:11,代码来源:HyperspaceCloud.cpp

示例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());
	}
}
开发者ID:MeteoricGames,项目名称:pioneer,代码行数:25,代码来源:ShipAICmdParagon.cpp

示例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();
}
开发者ID:Nikoraito,项目名称:pioneer,代码行数:35,代码来源:SpaceStation.cpp

示例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();
}
开发者ID:lwho,项目名称:pioneer,代码行数:7,代码来源:Missile.cpp

示例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));
	}
}
开发者ID:Faiva78,项目名称:pioneer,代码行数:11,代码来源:NavLights.cpp

示例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();
}
开发者ID:Mike-Cowley,项目名称:pioneer,代码行数:20,代码来源:SectorView.cpp

示例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();
}
开发者ID:arcadia-xenos,项目名称:pioneer,代码行数:11,代码来源:ShipController.cpp

示例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();
}
开发者ID:MeteoricGames,项目名称:pioneer,代码行数:12,代码来源:Body.cpp

示例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();
}
开发者ID:dreadk2002,项目名称:pioneer,代码行数:12,代码来源:DynamicBody.cpp

示例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);
}
开发者ID:abramhindle,项目名称:pioneer,代码行数:39,代码来源:SpaceStation.cpp

示例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();
}
开发者ID:dewasha,项目名称:pioneer,代码行数:14,代码来源:DynamicBody.cpp


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