mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 15:26:49 +01: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");
|
||||
|
||||
@@ -530,7 +530,7 @@ void ProtocolGame::parseMagicEffect(InputMessage& msg)
|
||||
tile->addEffect(effect);
|
||||
|
||||
// TODO: check if particles effect exists, if not, play standard sprite effect.
|
||||
g_particleManager.load("particle.otpa");
|
||||
//g_particleManager.load("particle.otpa");
|
||||
}
|
||||
|
||||
void ProtocolGame::parseAnimatedText(InputMessage& msg)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "uigame.h"
|
||||
#include <otclient/core/game.h>
|
||||
#include <framework/ui/uilineedit.h>
|
||||
#include <framework/graphics/particlemanager.h>
|
||||
|
||||
bool UIGame::onKeyPress(uchar keyCode, std::string keyText, int keyboardModifiers)
|
||||
{
|
||||
@@ -82,6 +83,7 @@ bool UIGame::onKeyPress(uchar keyCode, std::string keyText, int keyboardModifier
|
||||
return true;
|
||||
} else if(keyCode == Fw::KeyRight || keyCode == Fw::KeyNumpad6) {
|
||||
g_game.turn(Otc::East);
|
||||
g_particleManager.load("particle.otpa");
|
||||
return true;
|
||||
} else if(keyCode == Fw::KeyDown || keyCode == Fw::KeyNumpad2) {
|
||||
g_game.turn(Otc::South);
|
||||
|
||||
Reference in New Issue
Block a user