summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-02-11 22:17:47 +0000
committerDavid Athay <ko2fan@gmail.com>2009-02-11 22:17:47 +0000
commit5e01985ee82007307c96f900057679485b977196 (patch)
tree818ee5c5ae3b02708c0fe5d75aad1ef25906e3f4
parent91111ca5d13072ea3b834e23835df9c077329e39 (diff)
parent7b007058afab8ea920a5d60b31f45958e5622878 (diff)
downloadmana-5e01985ee82007307c96f900057679485b977196.tar.gz
mana-5e01985ee82007307c96f900057679485b977196.tar.bz2
mana-5e01985ee82007307c96f900057679485b977196.tar.xz
mana-5e01985ee82007307c96f900057679485b977196.zip
Merge branch 'master' of git@gitorious.org:tmw/eathena
-rw-r--r--data/graphics/gui/CMakeLists.txt3
-rw-r--r--data/graphics/gui/Makefile.am1
-rw-r--r--data/graphics/gui/speech_bubble.pngbin2031 -> 0 bytes
-rw-r--r--data/graphics/gui/speechbubble.xml24
-rw-r--r--src/being.cpp17
-rw-r--r--src/gui/color.cpp2
-rw-r--r--src/gui/gui.cpp4
-rw-r--r--src/gui/listbox.cpp2
-rw-r--r--src/gui/progressbar.cpp2
-rw-r--r--src/gui/shoplistbox.cpp2
-rw-r--r--src/gui/table.cpp6
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/net/beinghandler.cpp1
13 files changed, 25 insertions, 41 deletions
diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt
index 6351d5ba..f564253a 100644
--- a/data/graphics/gui/CMakeLists.txt
+++ b/data/graphics/gui/CMakeLists.txt
@@ -26,8 +26,7 @@ SET (FILES
resize.png
selection.png
slider.png
- speech_bubble.png
- speech_bubble.xml
+ speechbubble.xml
tab.png
tabselected.png
target-cursor-blue-l.png
diff --git a/data/graphics/gui/Makefile.am b/data/graphics/gui/Makefile.am
index eb4c7365..e78018b7 100644
--- a/data/graphics/gui/Makefile.am
+++ b/data/graphics/gui/Makefile.am
@@ -29,7 +29,6 @@ gui_DATA = \
resize.png \
selection.png \
slider.png \
- speech_bubble.png \
speechbubble.xml \
tab.png \
tabselected.png \
diff --git a/data/graphics/gui/speech_bubble.png b/data/graphics/gui/speech_bubble.png
deleted file mode 100644
index 3e678099..00000000
--- a/data/graphics/gui/speech_bubble.png
+++ /dev/null
Binary files differ
diff --git a/data/graphics/gui/speechbubble.xml b/data/graphics/gui/speechbubble.xml
index 1b11ea85..8715027d 100644
--- a/data/graphics/gui/speechbubble.xml
+++ b/data/graphics/gui/speechbubble.xml
@@ -1,18 +1,18 @@
-<skinset name="SpeechBubble" image="speech_bubble.png">
+<skinset name="SpeechBubble" image="bubble.png">
<widget type="Window">
<!-- Top Row -->
- <part type="top-left-corner" xpos="0" ypos="0" width="14" height="14" />
- <part type="top-edge" xpos="15" ypos="0" width="1" height="14" />
- <part type="top-right-corner" xpos="17" ypos="0" width="17" height="14" />
+ <part type="top-left-corner" xpos="0" ypos="0" width="5" height="5" />
+ <part type="top-edge" xpos="5" ypos="0" width="5" height="5" />
+ <part type="top-right-corner" xpos="10" ypos="0" width="5" height="5" />
- <!-- Middle Row -->
- <part type="left-edge" xpos="0" ypos="15" width="14" height="1" />
- <part type="bg-quad" xpos="34" ypos="0" width="32" height="32" />
- <part type="right-edge" xpos="17" ypos="15" width="17" height="1" />
+ <!-- Middle Row -->
+ <part type="left-edge" xpos="0" ypos="5" width="5" height="5" />
+ <part type="bg-quad" xpos="5" ypos="5" width="5" height="5" />
+ <part type="right-edge" xpos="10" ypos="5" width="5" height="5" />
- <!-- Bottom Row -->
- <part type="bottom-left-corner" xpos="0" ypos="17" width="14" height="17" />
- <part type="bottom-edge" xpos="15" ypos="17" width="1" height="17" />
- <part type="bottom-right-corner" xpos="17" ypos="17" width="17" height="17" />
+ <!-- Bottom Row -->
+ <part type="bottom-left-corner" xpos="0" ypos="10" width="5" height="5" />
+ <part type="bottom-edge" xpos="5" ypos="10" width="5" height="5" />
+ <part type="bottom-right-corner" xpos="10" ypos="10" width="5" height="5" />
</widget>
</skinset> \ No newline at end of file
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"