本文整理汇总了C++中CInifile::fname方法的典型用法代码示例。如果您正苦于以下问题:C++ CInifile::fname方法的具体用法?C++ CInifile::fname怎么用?C++ CInifile::fname使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CInifile
的用法示例。
在下文中一共展示了CInifile::fname方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void CEnvAmbient::load(
CInifile& ambients_config,
CInifile& sound_channels_config,
CInifile& effects_config,
const shared_str& sect
)
{
m_ambients_config_filename = ambients_config.fname();
m_load_section = sect;
string_path tmp;
// sounds
LPCSTR channels = ambients_config.r_string(sect, "sound_channels");
u32 cnt = _GetItemCount(channels);
// R_ASSERT3 (cnt,"sound_channels empty", sect.c_str());
m_sound_channels.resize(cnt);
for (u32 i = 0; i < cnt; ++i)
m_sound_channels[i] = create_sound_channel(sound_channels_config, _GetItem(channels, i, tmp));
// effects
m_effect_period.set(
iFloor(
ambients_config.r_float(sect, "min_effect_period")*1000.f
),
iFloor(
ambients_config.r_float(sect, "max_effect_period")*1000.f
)
);
LPCSTR effs = ambients_config.r_string(sect, "effects");
cnt = _GetItemCount(effs);
// R_ASSERT3 (cnt,"effects empty", sect.c_str());
m_effects.resize(cnt);
for (u32 k = 0; k < cnt; ++k)
m_effects[k] = create_effect(effects_config, _GetItem(effs, k, tmp));
R_ASSERT(!m_sound_channels.empty() || !m_effects.empty());
}