summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp10
-rw-r--r--src/engine.cpp18
-rw-r--r--src/game.cpp5
3 files changed, 12 insertions, 21 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 9f9c7834..9dccb5f6 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -427,6 +427,16 @@ void Being::drawSpeech(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
gcn::Graphics::CENTER);
}
+ // Potentially draw [TARGET] above this being
+ if (this == autoTarget)
+ {
+ graphics->setFont(speechFont);
+ int dy = (getType() == PLAYER) ? 90 : 52;
+
+ graphics->drawText("[TARGET]", px + 15, py - dy,
+ gcn::Graphics::CENTER);
+ }
+
// Draw player name
if (getType() == PLAYER && this != player_node)
{
diff --git a/src/engine.cpp b/src/engine.cpp
index dda6896c..73974edc 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -340,24 +340,6 @@ void Engine::draw()
(*i)->drawSpeech(graphics, -map_x, -map_y);
}
- if (autoTarget)
- {
- if (autoTarget->getType() == Being::PLAYER)
- {
- graphics->drawText("[TARGET]",
- autoTarget->getPixelX() + 15,
- autoTarget->getPixelY() - 60,
- gcn::Graphics::CENTER);
- }
- else
- {
- graphics->drawText("[TARGET]",
- autoTarget->getPixelX() + 60,
- autoTarget->getPixelY(),
- gcn::Graphics::CENTER);
- }
- }
-
#ifdef DEBUG
std::stringstream debugStream;
debugStream << "[" << fps << " fps] " << mouseTileX << ", " << mouseTileY;
diff --git a/src/game.cpp b/src/game.cpp
index e8692fd9..9cac4df0 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -647,7 +647,7 @@ void do_input()
}
SDL_FreeSurface(screenshot);
}
- break;
+ break;
default:
break;
@@ -655,7 +655,7 @@ void do_input()
if (requestedWindow)
{
- requestedWindow->setVisible(requestedWindow->isVisible());
+ requestedWindow->setVisible(!requestedWindow->isVisible());
if (requestedWindow->isVisible())
{
requestedWindow->requestMoveToTop();
@@ -1492,7 +1492,6 @@ void do_parse()
player_node->mFrame = 0;
player_node->x = x;
player_node->y = y;
- player_node->setMap(tiledMap);
// Send "map loaded"
MessageOut outMsg;