diff options
author | David Athay <ko2fan@gmail.com> | 2009-02-11 22:17:47 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2009-02-11 22:17:47 +0000 |
commit | 5e01985ee82007307c96f900057679485b977196 (patch) | |
tree | 818ee5c5ae3b02708c0fe5d75aad1ef25906e3f4 /src | |
parent | 91111ca5d13072ea3b834e23835df9c077329e39 (diff) | |
parent | 7b007058afab8ea920a5d60b31f45958e5622878 (diff) | |
download | mana-5e01985ee82007307c96f900057679485b977196.tar.gz mana-5e01985ee82007307c96f900057679485b977196.tar.bz2 mana-5e01985ee82007307c96f900057679485b977196.tar.xz mana-5e01985ee82007307c96f900057679485b977196.zip |
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 17 | ||||
-rw-r--r-- | src/gui/color.cpp | 2 | ||||
-rw-r--r-- | src/gui/gui.cpp | 4 | ||||
-rw-r--r-- | src/gui/listbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/progressbar.cpp | 2 | ||||
-rw-r--r-- | src/gui/shoplistbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/table.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 2 | ||||
-rw-r--r-- | src/net/beinghandler.cpp | 1 |
9 files changed, 12 insertions, 26 deletions
diff --git a/src/being.cpp b/src/being.cpp index 0ccf675c..dcb45a9d 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -250,26 +250,13 @@ void Being::takeDamage(int amount) // Show damage number particleEngine->addTextSplashEffect(damage, 255, 255, 255, font, mPx + 16, mPy + 16); + effectManager->trigger(26, this); } void Being::showCrit() { - gcn::Font *font; - std::string text = "crit!"; + effectManager->trigger(28, this); - // Selecting the right color - if (getType() == MONSTER) - { - font = hitBlueFont; - } - else - { - font = hitRedFont; - } - - // Show crit notice - particleEngine->addTextSplashEffect(text, 255, 255, 255, font, - mPx + 16, mPy + 16); } void Being::handleAttack(Being *victim, int damage) diff --git a/src/gui/color.cpp b/src/gui/color.cpp index e37affda..e4372806 100644 --- a/src/gui/color.cpp +++ b/src/gui/color.cpp @@ -104,7 +104,7 @@ char Color::getColorCharAt(int i) void Color::addColor(const char c, const int rgb, const std::string &text) { - int trueRgb = config.getValue("color" + text, rgb); + int trueRgb = (int)config.getValue("color" + text, rgb); mColVector.push_back(colorElem(c, trueRgb, text)); } diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 87304bd1..a7946993 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -110,7 +110,7 @@ Gui::Gui(Graphics *graphics): std::string path = resman->getPath("fonts/dejavusans.ttf"); try { - const int fontSize = config.getValue("fontSize", 11); + const int fontSize = (int)config.getValue("fontSize", 11); mGuiFont = new TrueTypeFont(path, fontSize); } catch (gcn::Exception e) @@ -123,7 +123,7 @@ Gui::Gui(Graphics *graphics): path = resman->getPath("fonts/dejavusans-bold.ttf"); try { - const int fontSize = config.getValue("fontSize", 11); + const int fontSize = (int)config.getValue("fontSize", 11); boldFont = new TrueTypeFont(path, fontSize); } catch (gcn::Exception e) diff --git a/src/gui/listbox.cpp b/src/gui/listbox.cpp index 63e55e24..74d0b9ad 100644 --- a/src/gui/listbox.cpp +++ b/src/gui/listbox.cpp @@ -47,7 +47,7 @@ void ListBox::draw(gcn::Graphics *graphics) const int red = (textColor->getColor('H', valid) >> 16) & 0xFF; const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->setFont(getFont()); diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index 867477e0..c7ccfe39 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -116,7 +116,7 @@ void ProgressBar::draw(gcn::Graphics *graphics) static_cast<Graphics*>(graphics)-> drawImageRect(0, 0, getWidth(), getHeight(), mBorder); - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); // The bar if (mProgress > 0) { diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index 94187818..8aed3c77 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -67,7 +67,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) const int red = (textColor->getColor('H', valid) >> 16) & 0xFF; const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); Graphics *graphics = static_cast<Graphics*>(gcnGraphics); diff --git a/src/gui/table.cpp b/src/gui/table.cpp index 8dd546d9..567272f0 100644 --- a/src/gui/table.cpp +++ b/src/gui/table.cpp @@ -275,7 +275,7 @@ void GuiTable::draw(gcn::Graphics* graphics) const int red = getBackgroundColor().r; const int green = getBackgroundColor().g; const int blue = getBackgroundColor().b; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); } @@ -329,7 +329,7 @@ void GuiTable::draw(gcn::Graphics* graphics) const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 127; + const int alpha = (int)(mAlpha * 127.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->fillRectangle(bounds); @@ -351,7 +351,7 @@ void GuiTable::draw(gcn::Graphics* graphics) const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 127; + const int alpha = (int)(mAlpha * 127.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->fillRectangle(gcn::Rectangle(0, y_offset, diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 29c6c69c..79d9ff06 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -135,7 +135,7 @@ void DropDown::draw(gcn::Graphics* graphics) } bool valid; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); gcn::Color faceColor = getBaseColor(); faceColor.a = alpha; gcn::Color highlightColor = textColor->getColor('H', valid); diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 0db8fcbf..d3ba4b03 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -33,7 +33,6 @@ #include "../localplayer.h" #include "../log.h" #include "../npc.h" -#include "../particle.h" #include "../player_relations.h" #include "../sound.h" |