mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
particles test
This commit is contained in:
@@ -111,11 +111,8 @@ void Application::init(const std::vector<std::string>& args, int appFlags)
|
||||
|
||||
if(m_appFlags & Fw::AppEnableModules)
|
||||
g_modules.discoverModulesPath();
|
||||
|
||||
g_particleManager.load("particle.otpa");
|
||||
}
|
||||
|
||||
|
||||
void Application::terminate()
|
||||
{
|
||||
// hide the window because there is no render anymore
|
||||
|
@@ -49,9 +49,9 @@ void Particle::render()
|
||||
if(!m_texture)
|
||||
g_painter.drawFilledRect(m_rect);
|
||||
else {
|
||||
//g_painter.setCompositionMode(Painter::CompositionMode_AdditiveSource);
|
||||
g_painter.setCompositionMode(Painter::CompositionMode_AdditiveSource);
|
||||
g_painter.drawTexturedRect(m_rect, m_texture);
|
||||
//g_painter.setCompositionMode(Painter::CompositionMode_SourceOver);
|
||||
g_painter.setCompositionMode(Painter::CompositionMode_SourceOver);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -163,7 +163,8 @@ bool ParticleEmitter::load(const OTMLNodePtr& node)
|
||||
|
||||
if(m_pColors.empty())
|
||||
m_pColors.push_back(Color(255, 255, 255, 128));
|
||||
m_pColorsStops.insert(m_pColorsStops.begin(), 0);
|
||||
if(m_pColorsStops.empty())
|
||||
m_pColorsStops.push_back(0);
|
||||
|
||||
if(m_pColors.size() != m_pColorsStops.size()) {
|
||||
logError("particle colors must be equal to colorstops-1");
|
||||
|
Reference in New Issue
Block a user