本文整理汇总了C++中platform::FileManagerPtr::IsPacked方法的典型用法代码示例。如果您正苦于以下问题:C++ FileManagerPtr::IsPacked方法的具体用法?C++ FileManagerPtr::IsPacked怎么用?C++ FileManagerPtr::IsPacked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类platform::FileManagerPtr
的用法示例。
在下文中一共展示了FileManagerPtr::IsPacked方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateParticleSystem
bool ETHParticleManager::CreateParticleSystem(
const ETHParticleSystem& partSystem,
const Vector2& v2Pos,
const Vector3& v3Pos,
const float angle,
const float entityVolume,
const float scale)
{
GS2D_UNUSED_ARGUMENT(v3Pos);
if (partSystem.nParticles <= 0)
{
ETH_STREAM_DECL(ss) << GS_L("ETHParticleManager::CreateParticleSystem: The number of particles must be greater than 0.");
m_provider->Log(ss.str(), Platform::FileLogger::ERROR);
return false;
}
m_finished = false;
m_killed = false;
m_nActiveParticles = 0;
m_soundVolume = 1.0f;
m_isSoundLooping = false;
m_isSoundStopped = false;
m_generalVolume = 1.0f;
m_system = partSystem;
m_entityVolume = entityVolume;
m_system.Scale(scale);
if (m_system.bitmapFile.empty())
{
m_system.bitmapFile = ETH_DEFAULT_PARTICLE_BITMAP;
}
ETHGraphicResourceManagerPtr graphics = m_provider->GetGraphicResourceManager();
ETHAudioResourceManagerPtr samples = m_provider->GetAudioResourceManager();
Platform::FileIOHubPtr fileIOHub = m_provider->GetFileIOHub();
Platform::FileManagerPtr fileManager = m_provider->GetFileManager();
// if there's no resource path, search the current module's path
const str_type::string& resourcePath = fileIOHub->GetResourceDirectory();
const str_type::string& programPath = fileIOHub->GetProgramDirectory();
const str_type::string currentPath = (resourcePath.empty() && !fileManager->IsPacked()) ? programPath : resourcePath;
m_pBMP = graphics->GetPointer(m_provider->GetVideo(), m_system.bitmapFile, currentPath,
ETHDirectories::GetParticlesDirectory(), (m_system.alphaMode == Video::AM_ADD));
// find the particle sound effect
if (m_system.soundFXFile != GS_L(""))
{
m_pSound = samples->GetPointer(m_provider->GetAudio(), m_provider->GetFileIOHub(), m_system.soundFXFile,
ETHDirectories::GetSoundFXDirectory(), Audio::SOUND_EFFECT);
}
if (m_system.allAtOnce)
{
m_nActiveParticles = m_system.nParticles;
}
else
{
m_nActiveParticles = 0;
}
m_particles.resize(m_system.nParticles);
Matrix4x4 rot = RotateZ(DegreeToRadian(angle));
for (int t = 0; t < m_system.nParticles; t++)
{
m_particles[t].id = t;
m_particles[t].released = false;
ResetParticle(t, v2Pos, Vector3(v2Pos,0), angle, rot);
}
return true;
}