本文整理汇总了C++中CInifile::line_count方法的典型用法代码示例。如果您正苦于以下问题:C++ CInifile::line_count方法的具体用法?C++ CInifile::line_count怎么用?C++ CInifile::line_count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CInifile
的用法示例。
在下文中一共展示了CInifile::line_count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: net_Spawn
BOOL CHelicopter::net_Spawn(CSE_Abstract* DC)
{
SetfHealth(100.0f);
setState(CHelicopter::eAlive);
m_flame_started =false;
m_light_started =false;
m_exploded =false;
m_ready_explode =false;
m_dead =false;
if (!inherited::net_Spawn(DC))
return (FALSE);
CPHSkeleton::Spawn((CSE_Abstract*)(DC));
for(u32 i=0; i<4; ++i)
CRocketLauncher::SpawnRocket(*m_sRocketSection, smart_cast<CGameObject*>(this));
// assigning m_animator here
CSE_Abstract *abstract =(CSE_Abstract*)(DC);
CSE_ALifeHelicopter *heli = smart_cast<CSE_ALifeHelicopter*>(abstract);
VERIFY (heli);
R_ASSERT (Visual()&&smart_cast<IKinematics*>(Visual()));
IKinematics* K = smart_cast<IKinematics*>(Visual());
CInifile* pUserData = K->LL_UserData();
m_rotate_x_bone = K->LL_BoneID (pUserData->r_string("helicopter_definition","wpn_rotate_x_bone"));
m_rotate_y_bone = K->LL_BoneID (pUserData->r_string("helicopter_definition","wpn_rotate_y_bone"));
m_fire_bone = K->LL_BoneID (pUserData->r_string("helicopter_definition","wpn_fire_bone"));
m_death_bones_to_hide = pUserData->r_string("on_death_mode","scale_bone");
m_left_rocket_bone = K->LL_BoneID (pUserData->r_string("helicopter_definition","left_rocket_bone"));
m_right_rocket_bone = K->LL_BoneID (pUserData->r_string("helicopter_definition","right_rocket_bone"));
m_smoke_bone = K->LL_BoneID (pUserData->r_string("helicopter_definition","smoke_bone"));
m_light_bone = K->LL_BoneID (pUserData->r_string("helicopter_definition","light_bone"));
CExplosive::Load (pUserData,"explosion");
CExplosive::SetInitiator(ID());
LPCSTR s = pUserData->r_string("helicopter_definition","hit_section");
if( pUserData->section_exist(s) ) {
int lc = pUserData->line_count(s);
LPCSTR name;
LPCSTR value;
s16 boneID;
for (int i=0 ; i<lc; ++i) {
pUserData->r_line( s, i, &name, &value);
boneID =K->LL_BoneID(name);
m_hitBones.insert( std::make_pair(boneID, (float)atof(value)) );
}
}
CBoneInstance& biX = smart_cast<IKinematics*>(Visual())->LL_GetBoneInstance(m_rotate_x_bone);
biX.set_callback (bctCustom,BoneMGunCallbackX,this);
CBoneInstance& biY = smart_cast<IKinematics*>(Visual())->LL_GetBoneInstance(m_rotate_y_bone);
biY.set_callback (bctCustom,BoneMGunCallbackY,this);
CBoneData& bdX = K->LL_GetData(m_rotate_x_bone);
VERIFY(bdX.IK_data.type==jtJoint);
m_lim_x_rot.set (bdX.IK_data.limits[0].limit.x,bdX.IK_data.limits[0].limit.y);
CBoneData& bdY = K->LL_GetData(m_rotate_y_bone);
VERIFY(bdY.IK_data.type==jtJoint);
m_lim_y_rot.set (bdY.IK_data.limits[1].limit.x,bdY.IK_data.limits[1].limit.y);
xr_vector<Fmatrix> matrices;
K->LL_GetBindTransform (matrices);
m_i_bind_x_xform.invert (matrices[m_rotate_x_bone]);
m_i_bind_y_xform.invert (matrices[m_rotate_y_bone]);
m_bind_rot.x = matrices[m_rotate_x_bone].k.getP();
m_bind_rot.y = matrices[m_rotate_y_bone].k.getH();
m_bind_x.set (matrices[m_rotate_x_bone].c);
m_bind_y.set (matrices[m_rotate_y_bone].c);
IKinematicsAnimated *A = smart_cast<IKinematicsAnimated*>(Visual());
if (A) {
A->PlayCycle (*heli->startup_animation);
K->CalculateBones (TRUE);
}
m_engineSound.create (*heli->engine_sound,st_Effect,sg_SourceType);
m_engineSound.play_at_pos (0,XFORM().c,sm_Looped);
CShootingObject::Light_Create ();
setVisible (TRUE);
setEnabled (TRUE);
m_stepRemains = 0.0f;
//lighting
m_light_render = ::Render->light_create();
m_light_render->set_shadow (false);
m_light_render->set_type (IRender_Light::POINT);
m_light_render->set_range (m_light_range);
m_light_render->set_color (m_light_color);
//.........这里部分代码省略.........