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


C++ CInifile::w_u32方法代码示例

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


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

示例1: SaveLTX

void ESceneAIMapTool::SaveLTX(CInifile& ini)
{
	inherited::SaveLTX	(ini);

	ini.w_u32			("main", "version", AIMAP_VERSION);
	ini.w_u32			("main", "flags", m_Flags.get());

    ini.w_fvector3		("main", "bbox_min", m_AIBBox.min);
    ini.w_fvector3		("main", "bbox_max", m_AIBBox.max);

    ini.w_float			("params", "patch_size", m_Params.fPatchSize);
    ini.w_float			("params", "test_height", m_Params.fTestHeight);
    ini.w_float			("params", "can_up", m_Params.fCanUP);
    ini.w_float			("params", "can_down", m_Params.fCanDOWN);

    EnumerateNodes		();
    ini.w_u32			("main", "nodes_count", m_Nodes.size());

    u32 i 				= 0;
    string128			buff;
	for (AINodeIt it=m_Nodes.begin(); it!=m_Nodes.end(); ++it, ++i)
    {
    	sprintf			(buff,"n_%d", i);
    	(*it)->SaveLTX	(ini, buff, this);
    }

    ini.w_float			("main", "vis_radius", m_VisRadius);
    ini.w_u32			("main", "brush_size", m_BrushSize);

    ini.w_float			("main", "smooth_height", m_SmoothHeight);

    for (ObjectIt o_it=m_SnapObjects.begin(); o_it!=m_SnapObjects.end(); ++o_it)
    	ini.w_string	("snap_objects", (*o_it)->Name, NULL);
}
开发者ID:2asoft,项目名称:xray,代码行数:34,代码来源:ESceneAIMapTools.cpp

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

示例3: SaveLTX

void ESceneSpawnTool::SaveLTX(CInifile& ini, int id)
{
	inherited::SaveLTX	(ini, id);

	ini.w_u32		("main", "version", SPAWN_TOOLS_VERSION);

    ini.w_u32		("main", "flags", m_Flags.get());
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:8,代码来源:ESceneSpawnToolsIO.cpp

示例4: SaveLTX

void ESceneSectorTool::SaveLTX(CInifile& ini)
{
	inherited::SaveLTX	(ini);

	ini.w_u32		("main", "version", SECTOR_TOOLS_VERSION);

    ini.w_u32		("main", "flags", m_Flags.get());
}
开发者ID:2asoft,项目名称:xray,代码行数:8,代码来源:ESceneSectorToolsIO.cpp

示例5: sizeof

void CPEDef::Save2(CInifile& ini)
{
	ini.w_u16		("_effect", "version",			PED_VERSION);
//.	ini.w_string	("_effect", "name",				m_Name.c_str());
	ini.w_u32		("_effect", "max_particles",	m_MaxParticles);
//.!!	F.w				(m_Actions.pointer(),m_Actions.size());
	ini.w_u32		("_effect", "flags",				m_Flags.get());

	if (m_Flags.is(dfSprite))
	{
		ini.w_string	("sprite", "shader", m_ShaderName.c_str());
		ini.w_string	("sprite", "texture", m_TextureName.c_str());
	}

	if (m_Flags.is(dfFramed))
	{
		ini.w_fvector2		("frame",	"tex_size", 	m_Frame.m_fTexSize);
		ini.w_fvector2		("frame",	"reserved", 	m_Frame.reserved);
		ini.w_s32			("frame",	"dim_x", 		m_Frame.m_iFrameDimX);
		ini.w_s32			("frame",	"frame_count",	m_Frame.m_iFrameCount);
		ini.w_float			("frame",	"speed",		m_Frame.m_fSpeed);
	}

	if (m_Flags.is(dfTimeLimit))
	{
		ini.w_float		("timelimit", "value", m_fTimeLimit);
	}

	if (m_Flags.is(dfCollision))
	{
		ini.w_float		("collision", "one_minus_friction", m_fCollideOneMinusFriction);	
		ini.w_float		("collision", "collide_resilence", m_fCollideResilience);
		ini.w_float		("collision", "collide_sqr_cutoff", m_fCollideSqrCutoff);
	}

	if (m_Flags.is(dfVelocityScale))
	{
		ini.w_fvector3	("velocity_scale", "value", m_VelocityScale);
	}

	if (m_Flags.is(dfAlignToPath))
	{
		ini.w_fvector3	("align_to_path", "default_rotation", m_APDefaultRotation);
	}
#ifdef _EDITOR
    ini.w_u32			("_effect", "action_count", m_EActionList.size());
    u32					action_id = 0;
	for (EPAVecIt it=m_EActionList.begin(); it!=m_EActionList.end(); ++it,++action_id)
	{
		string256		sect;
		xr_sprintf		(sect, sizeof(sect), "action_%04d", action_id);
		ini.w_u32		(sect, "action_type", (*it)->type);
    	(*it)->Save2	(ini, sect);
    }
#endif
}
开发者ID:2asoft,项目名称:xray-16,代码行数:56,代码来源:ParticleEffectDef.cpp

示例6:

void PDomain::Save2(CInifile& ini, const shared_str& sect)
{
	ini.w_u32		(sect.c_str(), "type", type);
	ini.w_fvector3	(sect.c_str(), "v0", v[0]);
	ini.w_fvector3	(sect.c_str(), "v1", v[1]);
	ini.w_fvector3	(sect.c_str(), "v2", v[2]);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:7,代码来源:pDomain.cpp

示例7: WriteLtx

void WeaponUsageStatistic::WriteLtx(CInifile& ini)
{
	LPCSTR sect = "wpn_usage";

	ini.w_u32(sect, "dwTotalPlayersAliveTime_0_sec",m_dwTotalPlayersAliveTime[0]/1000);
	ini.w_u32(sect, "dwTotalPlayersAliveTime_1_sec",m_dwTotalPlayersAliveTime[1]/1000);
	ini.w_u32(sect, "dwTotalPlayersAliveTime_2_sec",m_dwTotalPlayersAliveTime[2]/1000);

	ini.w_u32(sect, "dwTotalPlayersMoneyRound_0",m_dwTotalPlayersMoneyRound[0]);
	ini.w_u32(sect, "dwTotalPlayersMoneyRound_1",m_dwTotalPlayersMoneyRound[1]);
	ini.w_u32(sect, "dwTotalPlayersMoneyRound_2",m_dwTotalPlayersMoneyRound[2]);

	ini.w_u32(sect, "dwTotalNumRespawns_0",m_dwTotalNumRespawns[0]);
	ini.w_u32(sect, "dwTotalNumRespawns_1",m_dwTotalNumRespawns[1]);
	ini.w_u32(sect, "dwTotalNumRespawns_2",m_dwTotalNumRespawns[2]);

	u32 NumPlayers = aPlayersStatistic.size();

	ini.w_u32(sect, "NumPlayers",NumPlayers);

	for (u32 i=0; i<NumPlayers; i++)
	{
		Player_Statistic& PS = aPlayersStatistic[i];
		string512			save_sect;
		sprintf_s			(save_sect,"%s_player_%d",sect,i);
		PS.WriteLtx			(ini,save_sect);
	}
}
开发者ID:Karlan88,项目名称:xray,代码行数:28,代码来源:game_cl_base_weapon_usage_statistic_save.cpp

示例8: SaveLTX

void ESoundEnvironment::SaveLTX(CInifile& ini, LPCSTR sect_name)
{
	inherited::SaveLTX	(ini, sect_name);

	ini.w_u32		(sect_name, "version", SOUND_ENV_VERSION);

    ini.w_string	(sect_name, "env_inner", m_EnvInner.c_str());
    ini.w_string	(sect_name, "env_outer", m_EnvOuter.c_str());
}
开发者ID:2asoft,项目名称:xray,代码行数:9,代码来源:ESound_Environment.cpp

示例9: WriteGameState

void game_sv_TeamDeathmatch::WriteGameState(CInifile& ini, LPCSTR sect, bool bRoundResult)
{
    inherited::WriteGameState(ini, sect, bRoundResult);

    for(u32 i=0; i<teams.size(); ++i )
    {
        string16		buf_name;
        sprintf_s		(buf_name,"team_%d_score",i);
        ini.w_u32		(sect,buf_name, GetTeamScore(i));
    }
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:11,代码来源:game_sv_teamdeathmatch.cpp

示例10: SaveObjectsLTX

void EScene::SaveObjectsLTX(ObjectList& lst, LPCSTR sect_name_parent, LPCSTR sect_name_prefix, CInifile& ini)
{
    u32 i 				= 0;
    string256			buff;
    for(ObjectIt _F = lst.begin(); _F!=lst.end(); ++_F, ++i)
    {
    	sprintf				(buff,"%s_%s_%d",sect_name_parent,sect_name_prefix,i);
        SaveObjectLTX		(*_F,buff,ini);
    }
	sprintf					(buff,"%s_count",sect_name_prefix);
    ini.w_u32				(sect_name_parent, buff, lst.size());
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:12,代码来源:SceneIO.cpp

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

示例12: WriteLtx

void Weapon_Statistic::WriteLtx(CInifile& ini, LPCSTR sect)
{
	ini.w_string(sect,"wpn_name",WName.c_str());

	ini.w_string(sect,"wpn_inv_name",InvName.c_str());

	ini.w_u32(sect,"wpn_dwNumBought",NumBought);

	ini.w_u32(sect,"wpn_dwRoundsFired",m_dwRoundsFired);

	ini.w_u32(sect,"wpn_dwBulletsFired",m_dwBulletsFired);

	ini.w_u32(sect,"wpn_dwHitsScored",m_dwHitsScored);

	ini.w_u32(sect,"wpn_dwKillsScored",m_dwKillsScored);

	ini.w_u16(sect,"wpn_dwExplosionKills", m_explosion_kills);

	ini.w_u16(sect,"wpn_dwBleedKills", m_bleed_kills);

	//----------------------------------------------
	u32 NumHits = 0;
	u32 i = 0;
	for (i=0; i<m_Hits.size(); i++)
	{
		HitData& Hit = m_Hits[i];
		if (Hit.Completed && Hit.count) NumHits++;
	};

	ini.w_u32(sect,"NumHits",NumHits);

	u32 hits_size = m_Hits.size();
	i = 0;
	u32 hit_number = 0;
	u8 hit_index = 0;
	while (i < hits_size)
	{
		HitData& Hit		= m_Hits[i];
		if (!Hit.Completed)
		{
			++i;
			hit_index = 0;
			continue;
		}
		
		string512				save_prefix;
		xr_sprintf				(save_prefix,"hit_%d_", hit_number);

		Hit.WriteLtx			(ini, sect, save_prefix);
		
		++hit_index;
		if (hit_index >= Hit.count)
		{
			hit_index = 0;
			++i;
		}
		++hit_number;
	};
};
开发者ID:AntonioModer,项目名称:xray-16,代码行数:59,代码来源:game_cl_base_weapon_usage_statistic_save.cpp

示例13: SaveLTX

void ESoundSource::SaveLTX(CInifile& ini, LPCSTR sect_name)
{
	inherited::SaveLTX	(ini, sect_name);

	ini.w_u32			(sect_name, "version", SOUND_SOURCE_VERSION);

    ini.w_u32			(sect_name, "snd_type", m_Type);

    ini.w_string		(sect_name, "snd_name", m_WAVName.c_str());

    ini.w_u32			(sect_name, "flags", m_Flags.get());

    ini.w_fvector3		(sect_name, "snd_position", m_Params.position);
    ini.w_float			(sect_name, "volume", m_Params.volume);
    ini.w_float			(sect_name, "freq", m_Params.freq);
    ini.w_float			(sect_name, "min_dist", m_Params.min_distance);
    ini.w_float			(sect_name, "max_dist", m_Params.max_distance);
    ini.w_float			(sect_name, "max_ai_dist", m_Params.max_ai_distance);

    ini.w_fvector2		(sect_name, "random_pause", m_RandomPause);
    ini.w_fvector2		(sect_name, "active_time", m_ActiveTime);
    ini.w_fvector2		(sect_name, "play_time", m_PlayTime);
}
开发者ID:2asoft,项目名称:xray,代码行数:23,代码来源:ESound_Source.cpp

示例14: SaveLTX

void CGroupObject::SaveLTX(CInifile& ini, LPCSTR sect_name)
{
	CCustomObject::SaveLTX(ini, sect_name);

	ini.w_u32			(sect_name, "version", GROUPOBJ_CURRENT_VERSION);

    ObjectList		grp_lst;
    GetObjects		(grp_lst);
    ObjectList::iterator it;
    for(it=grp_lst.begin(); it!=grp_lst.end(); ++it)
        (*it)->m_CO_Flags.set(CCustomObject::flObjectInGroup, FALSE);
        
    Scene->SaveObjectsLTX(grp_lst, sect_name, "ingroup", ini);

    for(it=grp_lst.begin(); it!=grp_lst.end(); ++it)
        (*it)->m_CO_Flags.set(CCustomObject::flObjectInGroup, TRUE);

    ini.w_string		(sect_name, "ref_name", m_ReferenceName_.c_str());
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:19,代码来源:GroupObject.cpp

示例15: ebSyncTypesClick

void __fastcall TfrmImageLib::ebSyncTypesClick(TObject *Sender)
{
	if (ELog.DlgMsg(mtConfirmation,TMsgDlgButtons()<<mbYes<<mbNo,"Are you sure to sync types?")==mrNo) return;

    if (!modif_map.empty()){
        int res = ELog.DlgMsg(mtConfirmation,TMsgDlgButtons()<<mbYes<<mbNo<<mbCancel,"Save modified properties?");
        switch (res){
        case mrYes: 	UpdateLib();	break;
        case mrNo: 			  			break;
        case mrCancel: 		  			return;
        }
    }

	string_path nm;
    FS.update_path	 	(nm,_game_textures_,"textures.ltx");
	CInifile* ini 	 	= xr_new<CInifile>(nm, FALSE, FALSE, TRUE);

	LockForm				();

    FS_FileSetIt it		= texture_map.begin();
    FS_FileSetIt _E		= texture_map.end();
	SPBItem* pb = UI->ProgressStart(texture_map.size(),"Syncronising types");
    bool bRes=true;
    for (;it!=_E; it++){
        ETextureThumbnail* m_Thm = xr_new<ETextureThumbnail>(it->name.c_str());
	    pb->Inc				(it->name.c_str());
        AnsiString base_name= ChangeFileExt(it->name.c_str(),"");
        ini->w_u32			("types", base_name.c_str(),m_Thm->_Format().type);
        xr_delete			(m_Thm);
		if (UI->NeedAbort()){ bRes=false; break; }
    }
	UI->ProgressEnd(pb);

	UnlockForm();

    if (!bRes) ini->bSaveAtEnd = false;
	xr_delete(ini);
}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:38,代码来源:ImageEditor.cpp


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