diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-23 12:08:44 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-23 12:08:44 +0000 |
commit | 5b70e7729229317acfd1b8f79e8eb1b90870827b (patch) | |
tree | 1a5e5c2ef5390a2ec48324ffe351d5eb425863e8 /src | |
parent | 7a88c394584cb02cec8d1d7eb70ac2020e033d41 (diff) | |
download | mana-5b70e7729229317acfd1b8f79e8eb1b90870827b.tar.gz mana-5b70e7729229317acfd1b8f79e8eb1b90870827b.tar.bz2 mana-5b70e7729229317acfd1b8f79e8eb1b90870827b.tar.xz mana-5b70e7729229317acfd1b8f79e8eb1b90870827b.zip |
Removed a few compiler warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 6 | ||||
-rw-r--r-- | src/text.cpp | 11 | ||||
-rw-r--r-- | src/text.h | 7 |
3 files changed, 20 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp index 07c0716d..519be4cc 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -69,6 +69,8 @@ Being::Being(int id, int job, Map *map): mWalkSpeed(150), mDirection(DOWN), mMap(NULL), + mIsGM(false), + mParticleEffects(config.getValue("particleeffects", 1)), mEquippedWeapon(NULL), mHairStyle(1), mHairColor(0), mGender(2), @@ -76,8 +78,7 @@ Being::Being(int id, int job, Map *map): mPx(0), mPy(0), mSprites(VECTOREND_SPRITE, NULL), mSpriteIDs(VECTOREND_SPRITE, 0), - mSpriteColors(VECTOREND_SPRITE, ""), - mParticleEffects(config.getValue("particleeffects", 1)) + mSpriteColors(VECTOREND_SPRITE, "") { setMap(map); @@ -93,7 +94,6 @@ Being::Being(int id, int job, Map *map): instances++; mSpeech = ""; - mIsGM = false; mText = 0; } diff --git a/src/text.cpp b/src/text.cpp index 545c1c0e..7967b56f 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -100,3 +100,14 @@ void FlashText::draw(Graphics *graphics, int xOff, int yOff) } Text::draw(graphics, xOff, yOff); } + +FlashText::~FlashText() +{ + mTime = 0; + textManager->removeText(this); + if (--mInstances == 0) + { + delete textManager; + textManager = 0; + } +} @@ -57,7 +57,7 @@ class Text virtual void draw(Graphics *graphics, int xOff, int yOff); - private: + protected: int mX; /**< Actual x-value of left of text written */ int mY; /**< Actual y-value of top of text written */ @@ -78,6 +78,11 @@ class FlashText : public Text gcn::Color colour); /** + * Remove the text from the screen + */ + ~FlashText(); + + /** * Flash the text for so many refreshes */ void flash(int time) {mTime = time; } |