summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-09 21:08:37 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-09 21:11:29 +0200
commitf790281b94d37f7ea2c2e8fc7b121266d88f93bb (patch)
tree8ab2f3155ef6422d0d4f6f436a356038b9b5463a /src
parent3dacb9b09622375d35d704c8ac9d7039d506026f (diff)
downloadmana-f790281b94d37f7ea2c2e8fc7b121266d88f93bb.tar.gz
mana-f790281b94d37f7ea2c2e8fc7b121266d88f93bb.tar.bz2
mana-f790281b94d37f7ea2c2e8fc7b121266d88f93bb.tar.xz
mana-f790281b94d37f7ea2c2e8fc7b121266d88f93bb.zip
Increased the distance between head and overhead text a bit
Plus some small code cleanups.
Diffstat (limited to 'src')
-rw-r--r--src/animationparticle.h4
-rw-r--r--src/being.cpp10
-rw-r--r--src/gui/npcdialog.cpp5
-rw-r--r--src/gui/widgets/window.cpp1
-rw-r--r--src/gui/widgets/window.h3
-rw-r--r--src/particlecontainer.h4
-rw-r--r--src/particleemitter.h4
-rw-r--r--src/player.cpp8
-rw-r--r--src/player.h4
-rw-r--r--src/rotationalparticle.h4
10 files changed, 24 insertions, 23 deletions
diff --git a/src/animationparticle.h b/src/animationparticle.h
index 03065eb7..57b5163a 100644
--- a/src/animationparticle.h
+++ b/src/animationparticle.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _ANIMATION_PARTICLE
-#define _ANIMATION_PARTICLE
+#ifndef ANIMATION_PARTICLE_H
+#define ANIMATION_PARTICLE_H
#include <libxml/tree.h>
diff --git a/src/being.cpp b/src/being.cpp
index 843f7da6..4c4706db 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -123,7 +123,6 @@ Being::~Being()
{
mUsedTargetCursor = NULL;
delete_all(mSprites);
- clearPath();
if (player_node && player_node->getTarget() == this)
player_node->setTarget(NULL);
@@ -146,7 +145,7 @@ void Being::setPosition(const Vector &pos)
if (mText)
mText->adviseXY(mPx,
- mPy - getHeight() - mText->getHeight());
+ mPy - getHeight() - mText->getHeight() - 6);
}
#ifdef EATHENA_SUPPORT
@@ -363,7 +362,7 @@ void Being::setSpeech(const std::string &text, int time)
// Trim whitespace
trim(mSpeech);
- // check for links
+ // Check for links
std::string::size_type start = mSpeech.find('[');
std::string::size_type end = mSpeech.find(']', start);
@@ -398,7 +397,8 @@ void Being::setSpeech(const std::string &text, int time)
mSpeechTime = time <= SPEECH_MAX_TIME ? time : SPEECH_MAX_TIME;
const int speech = (int) config.getValue("speech", NAME_IN_BUBBLE);
- if (speech == TEXT_OVERHEAD) {
+ if (speech == TEXT_OVERHEAD)
+ {
if (mText)
delete mText;
@@ -415,7 +415,7 @@ void Being::takeDamage(Being *attacker, int amount, AttackType type)
gcn::Font *font;
std::string damage = amount ? toString(amount) : type == FLEE ?
"dodge" : "miss";
- const gcn::Color* color;
+ const gcn::Color *color;
font = gui->getInfoParticleFont();
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 57c736d0..43fa6376 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -22,12 +22,13 @@
#include "gui/npcdialog.h"
#include "gui/widgets/button.h"
+#include "gui/widgets/inttextfield.h"
#include "gui/widgets/layout.h"
+#include "gui/widgets/listbox.h"
+#include "gui/widgets/resizegrip.h"
#include "gui/widgets/scrollarea.h"
#include "gui/widgets/textbox.h"
-#include "gui/widgets/listbox.h"
#include "gui/widgets/textfield.h"
-#include "gui/widgets/inttextfield.h"
#include "npc.h"
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index a34b7612..87051686 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -22,6 +22,7 @@
#include "gui/widgets/window.h"
#include "gui/widgets/layout.h"
+#include "gui/widgets/resizegrip.h"
#include "gui/widgets/windowcontainer.h"
#include "gui/gui.h"
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 563e2f2f..f980b96a 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -25,8 +25,6 @@
#include "graphics.h"
#include "guichanfwd.h"
-#include "gui/widgets/resizegrip.h"
-
#include <guichan/widgetlistener.hpp>
#include <guichan/widgets/window.hpp>
@@ -34,6 +32,7 @@
class ContainerPlacer;
class Layout;
class LayoutCell;
+class ResizeGrip;
class Skin;
class WindowContainer;
diff --git a/src/particlecontainer.h b/src/particlecontainer.h
index 90825024..eb44bde6 100644
--- a/src/particlecontainer.h
+++ b/src/particlecontainer.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _PARTICLE_CONTAINER_H
-#define _PARTICLE_CONTAINER_H
+#ifndef PARTICLE_CONTAINER_H
+#define PARTICLE_CONTAINER_H
#include <list>
#include <vector>
diff --git a/src/particleemitter.h b/src/particleemitter.h
index f58430b3..18af2dc2 100644
--- a/src/particleemitter.h
+++ b/src/particleemitter.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _PARTICLEEMITTER_H
-#define _PARTICLEEMITTER_H
+#ifndef PARTICLEEMITTER_H
+#define PARTICLEEMITTER_H
#include <list>
diff --git a/src/player.cpp b/src/player.cpp
index 478cb18b..382008e2 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -253,9 +253,9 @@ void Player::removeGuild(int id)
mGuilds.erase(id);
}
-Guild* Player::getGuild(const std::string &guildName)
+Guild *Player::getGuild(const std::string &guildName) const
{
- std::map<int, Guild*>::iterator itr, itr_end = mGuilds.end();
+ std::map<int, Guild*>::const_iterator itr, itr_end = mGuilds.end();
for (itr = mGuilds.begin(); itr != itr_end; ++itr)
{
Guild *guild = itr->second;
@@ -268,9 +268,9 @@ Guild* Player::getGuild(const std::string &guildName)
return NULL;
}
-Guild* Player::getGuild(int id)
+Guild *Player::getGuild(int id) const
{
- std::map<int, Guild*>::iterator itr;
+ std::map<int, Guild*>::const_iterator itr;
itr = mGuilds.find(id);
if (itr != mGuilds.end())
{
diff --git a/src/player.h b/src/player.h
index f30a610b..5d037b75 100644
--- a/src/player.h
+++ b/src/player.h
@@ -105,12 +105,12 @@ class Player : public Being
/**
* Returns a pointer to the specified guild.
*/
- Guild *getGuild(const std::string &guildName);
+ Guild *getGuild(const std::string &guildName) const;
/**
* Returns a pointer to the guild with matching id.
*/
- Guild *getGuild(int id);
+ Guild *getGuild(int id) const;
/**
* Get number of guilds the player belongs to.
diff --git a/src/rotationalparticle.h b/src/rotationalparticle.h
index 07c95e9c..464cb7bc 100644
--- a/src/rotationalparticle.h
+++ b/src/rotationalparticle.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef _ROTATIONAL_PARTICLE_H
-#define _ROTATIONAL_PARTICLE_H
+#ifndef ROTATIONAL_PARTICLE_H
+#define ROTATIONAL_PARTICLE_H
#include <libxml/tree.h>