summaryrefslogtreecommitdiff
path: root/src/textmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/textmanager.cpp')
-rw-r--r--src/textmanager.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/textmanager.cpp b/src/textmanager.cpp
index f792d463..6bc8f8b6 100644
--- a/src/textmanager.cpp
+++ b/src/textmanager.cpp
@@ -61,7 +61,7 @@ TextManager::~TextManager()
{
}
-void TextManager::draw(Graphics *graphics, int xOff, int yOff)
+void TextManager::draw(gcn::Graphics *graphics, int xOff, int yOff)
{
for (TextList::iterator bPtr = mTextList.begin(), ePtr = mTextList.end();
bPtr != ePtr; ++bPtr)
@@ -91,21 +91,13 @@ void TextManager::place(const Text *textObj, const Text *omit,
int from = (*ptr)->mY - occupiedTop;
int to = from + (*ptr)->mHeight - 1;
if (to < 0 || from >= TEST) // out of range considered
- {
continue;
- }
if (from < 0)
- {
from = 0;
- }
if (to >= TEST)
- {
to = TEST - 1;
- }
for (int i = from; i <= to; ++i)
- {
occupied[i] = true;
- }
}
}
bool ok = true;
@@ -113,10 +105,10 @@ void TextManager::place(const Text *textObj, const Text *omit,
{
ok = ok && !occupied[i];
}
+
if (ok)
- {
return;
- }
+
// Have to move it up or down, so find nearest spaces either side
int consec = 0;
int upSlot = -1; // means not found