diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-07 21:51:35 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-07 21:51:35 -0700 |
commit | 450edb5900a46ada0cc6292f0079a31ea5d04573 (patch) | |
tree | a8b110ef8c1057da3c7d8fb9f1fbcdf88327db88 /src/textmanager.cpp | |
parent | 303609031d8b70f0b20002b28e2de450e0ad7fb7 (diff) | |
download | mana-client-450edb5900a46ada0cc6292f0079a31ea5d04573.tar.gz mana-client-450edb5900a46ada0cc6292f0079a31ea5d04573.tar.bz2 mana-client-450edb5900a46ada0cc6292f0079a31ea5d04573.tar.xz mana-client-450edb5900a46ada0cc6292f0079a31ea5d04573.zip |
Some more include cleanups.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/textmanager.cpp')
-rw-r--r-- | src/textmanager.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/textmanager.cpp b/src/textmanager.cpp index 7c5d2713..d40ba4d2 100644 --- a/src/textmanager.cpp +++ b/src/textmanager.cpp @@ -59,7 +59,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) @@ -89,21 +89,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; @@ -111,10 +103,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 |