本文整理汇总了C++中CInifile::w_u8方法的典型用法代码示例。如果您正苦于以下问题:C++ CInifile::w_u8方法的具体用法?C++ CInifile::w_u8怎么用?C++ CInifile::w_u8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CInifile
的用法示例。
在下文中一共展示了CInifile::w_u8方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveLTX
void CEditShape::SaveLTX(CInifile& ini, LPCSTR sect_name)
{
inherited::SaveLTX (ini, sect_name);
ini.w_u32 (sect_name, "version", SHAPE_CURRENT_VERSION);
ini.w_u32 (sect_name, "shapes_count", shapes.size());
ini.w_u8 (sect_name, "shape_type", m_shape_type);
string128 buff;
for(u32 i=0; i<shapes.size(); ++i)
{
sprintf (buff,"shape_type_%d", i);
ini.w_u8 (sect_name, buff, shapes[i].type);
if(shapes[i].type==CShapeData::cfSphere)
{
sprintf (buff,"shape_center_%d", i);
ini.w_fvector3 (sect_name, buff, shapes[i].data.sphere.P);
sprintf (buff,"shape_radius_%d", i);
ini.w_float (sect_name, buff, shapes[i].data.sphere.R);
}else
{
R_ASSERT (shapes[i].type==CShapeData::cfBox);
sprintf (buff,"shape_matrix_i_%d", i);
ini.w_fvector3 (sect_name, buff, shapes[i].data.box.i);
sprintf (buff,"shape_matrix_j_%d", i);
ini.w_fvector3 (sect_name, buff, shapes[i].data.box.j);
sprintf (buff,"shape_matrix_k_%d", i);
ini.w_fvector3 (sect_name, buff, shapes[i].data.box.k);
sprintf (buff,"shape_matrix_c_%d", i);
ini.w_fvector3 (sect_name, buff, shapes[i].data.box.c);
}
}
}
示例2: SaveLTX
void SAINode::SaveLTX(CInifile& ini, LPCSTR sect_name, ESceneAIMapTool* tools)
{
R_ASSERT2 (0, "dont use it !!!");
u32 id;
u16 pl;
NodePosition np;
id = n1?(u32)n1->idx:InvalidNode;
ini.w_u32 (sect_name,"n1", id);
id = n2?(u32)n2->idx:InvalidNode;
ini.w_u32 (sect_name,"n2", id);
id = n3?(u32)n3->idx:InvalidNode;
ini.w_u32 (sect_name,"n3", id);
id = n4?(u32)n4->idx:InvalidNode;
ini.w_u32 (sect_name,"n4", id);
pl = pvCompress (Plane.n);
ini.w_u16 (sect_name, "plane", pl);
tools->PackPosition(np,Pos,tools->m_AIBBox,tools->m_Params);
string256 buff;
s16 x;
u16 y;
s16 z;
sprintf (buff,"%i,%u,%i",np.x,np.y,np.z);
ini.w_string (sect_name, "np", buff);
ini.w_u8 (sect_name, "flag", flags.get());
}
示例3: SaveLTX
//------------------------------------------------------------------------------------------------
// Level Options
//------------------------------------------------------------------------------------------------
void st_LevelOptions::SaveLTX( CInifile& ini )
{
LPCSTR section = "level_options";
ini.w_u32 (section, "version", CURRENT_LEVELOP_VERSION);
ini.w_string (section, "level_path", m_FNLevelPath.c_str());
ini.w_string (section, "level_prefix", m_LevelPrefix.c_str());
xr_string s = "\"";
s += m_BOPText.c_str();
s += "\"";
ini.w_string (section, "bop", s.c_str());
ini.w_string (section, "map_version", m_map_version.c_str());
ini.w_u32 (section, "version_bp", CURRENT_LEVELOP_BP_VERSION);
m_BuildParams.SaveLTX (ini);
ini.w_u8 (section, "light_hemi_quality", m_LightHemiQuality );
ini.w_u8 (section, "light_sun_quality", m_LightSunQuality );
m_mapUsage.SaveLTX(ini,section);
}
示例4: WriteLtx
void Player_Statistic::WriteLtx(CInifile& ini, LPCSTR sect)
{
ini.w_string(sect, "name", PName.c_str());
ini.w_string(sect, "player_unique_digest", PDigest.c_str());
ini.w_u32(sect, "player_profile_id", PID);
ini.w_u32(sect,"TotalShots",m_dwTotalShots);
ini.w_u32(sect,"dwTotalAliveTime_0_sec",m_dwTotalAliveTime[0]/1000);
ini.w_u32(sect,"dwTotalAliveTime_1_sec",m_dwTotalAliveTime[1]/1000);
ini.w_u32(sect,"dwTotalAliveTime_2_sec",m_dwTotalAliveTime[2]/1000);
ini.w_u32(sect,"dwTotalMoneyRound_0",m_dwTotalMoneyRound[0]);
ini.w_u32(sect,"dwTotalMoneyRound_1",m_dwTotalMoneyRound[1]);
ini.w_u32(sect,"dwTotalMoneyRound_2",m_dwTotalMoneyRound[2]);
ini.w_u32(sect,"dwNumRespawned_0",m_dwNumRespawned[0]);
ini.w_u32(sect,"dwNumRespawned_1",m_dwNumRespawned[1]);
ini.w_u32(sect,"dwNumRespawned_2",m_dwNumRespawned[2]);
ini.w_u8(sect,"m_dwArtefacts_0",m_dwArtefacts[0]);
ini.w_u8(sect,"m_dwArtefacts_1",m_dwArtefacts[1]);
ini.w_u8(sect,"m_dwArtefacts_2",m_dwArtefacts[2]);
ini.w_u8(sect,"dwCurrentTeam",m_dwCurrentTeam);
u32 NumWeapons = aWeaponStats.size();
ini.w_u32(sect,"NumWeapons",NumWeapons);
for (u32 i=0; i<aWeaponStats.size(); i++)
{
string512 save_sect;
xr_sprintf (save_sect,"%s_wpn_%d",sect,i);
Weapon_Statistic& WS = aWeaponStats[i];
WS.WriteLtx (ini, save_sect);
}
}