Exemplo n.º 1
0
//------------------------------------------------------------------------
bool CItem::ReadItemParams(const IItemParamsNode *root)
{
	if(!root)
	{
		GameWarning("Warning: ItemParams for item <%s> NULL", GetEntity()->GetName());
		return false;
	}

	const IItemParamsNode *params = root->GetChild("params");
	const IItemParamsNode *geometry = root->GetChild("geometry");
	const IItemParamsNode *actions = root->GetChild("actions");
	const IItemParamsNode *layers = root->GetChild("layers");
	const IItemParamsNode *accessories = root->GetChild("accessories");
	const IItemParamsNode *damagelevels = root->GetChild("damagelevels");
	const IItemParamsNode *accessoryAmmo = root->GetChild("accessoryAmmo");

	if(params) ReadParams(params);

	if(actions) ReadActions(actions);

	if(geometry) ReadGeometry(geometry);

	if(layers) ReadLayers(layers);

	if(accessories) ReadAccessories(accessories);

	if(damagelevels) ReadDamageLevels(damagelevels);

	if(accessoryAmmo) ReadAccessoryAmmo(accessoryAmmo);

	m_sharedparams->SetValid(true);

	return true;
}
Exemplo n.º 2
0
SkLayerRasterizer::SkLayerRasterizer(SkReadBuffer& buffer)
    : SkRasterizer(buffer), fLayers(ReadLayers(buffer)) {}