summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-05-13 00:33:40 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-05-13 00:33:40 +0000
commitb1b8bdc56839540492c409f7d98923c85369a478 (patch)
tree6814c8b6fba7a8c52cc2924eb307450ae111348c /src
parent6a92182d9f24f7003f634c0b6a21af418daef442 (diff)
downloadmana-client-b1b8bdc56839540492c409f7d98923c85369a478.tar.gz
mana-client-b1b8bdc56839540492c409f7d98923c85369a478.tar.bz2
mana-client-b1b8bdc56839540492c409f7d98923c85369a478.tar.xz
mana-client-b1b8bdc56839540492c409f7d98923c85369a478.zip
Specify the color in which speech and names are supposed to be drawn. Removed
unused mSpeechColor member.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp9
-rw-r--r--src/being.h1
-rw-r--r--src/player.cpp1
3 files changed, 4 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 7ce31c93..a9bbc5e1 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -45,7 +45,6 @@ Being::Being(Uint32 id, Uint16 job, Map *map):
mJob(job),
mX(0), mY(0), mDirection(DOWN),
mAction(0), mFrame(0),
- mSpeechColor(0),
mWalkTime(0),
mEmotion(0), mEmotionTime(0),
mAttackSpeed(350),
@@ -191,11 +190,8 @@ Being::logic()
}
// Update pixel coordinates
- mPx = mX * 32;
- mPy = mY * 32;
-
- mPy += getYOffset();
- mPx += getXOffset();
+ mPx = mX * 32 + getXOffset();
+ mPy = mY * 32 + getYOffset();
if (mEmotion != 0)
{
@@ -240,6 +236,7 @@ Being::drawSpeech(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
if (mShowSpeech)
{
graphics->setFont(speechFont);
+ graphics->setColor(gcn::Color(255, 255, 255));
graphics->drawText(mSpeech, px + 18, py - 60, gcn::Graphics::CENTER);
}
diff --git a/src/being.h b/src/being.h
index 0dd8cd65..fbc03456 100644
--- a/src/being.h
+++ b/src/being.h
@@ -88,7 +88,6 @@ class Being : public Sprite
Uint8 mDirection; /**< Facing direction */
Uint8 mAction;
Uint8 mFrame;
- Sint32 mSpeechColor;
Uint16 mWalkTime;
Uint8 mEmotion; /**< Currently showing emotion */
Uint8 mEmotionTime; /**< Time until emotion disappears */
diff --git a/src/player.cpp b/src/player.cpp
index 54075206..c7e2d911 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -166,5 +166,6 @@ Player::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
int py = mPy + offsetY;
graphics->setFont(speechFont);
+ graphics->setColor(gcn::Color(255, 255, 255));
graphics->drawText(mName, px + 15, py + 30, gcn::Graphics::CENTER);
}