Sprite has been cleaned
authorIvan Hernandez <iturtleman128@gmail.com>
Sun, 12 Jul 2009 21:51:18 +0000 (16:51 -0500)
committerIvan Hernandez <iturtleman128@gmail.com>
Sun, 12 Jul 2009 21:51:18 +0000 (16:51 -0500)
Sprite.cpp
Sprite.h

index 97c2a67..4aa38ba 100644 (file)
@@ -16,7 +16,6 @@ Sprite::Sprite(SDL_Surface *screen, std::string name, Animation *anim) :
        if(mSpriteAnimation -> mBuilt)
        {
                if (mSpriteAnimation->mNumFrames > 1) mAnimating = 1;
-               mBackReplacement = SDL_DisplayFormat(mSpriteAnimation->mAnim[0].image);
        }
 }
 
@@ -29,10 +28,6 @@ void Sprite::draw()
                        mLastUpdate = SDL_GetTicks();
                }
        }
-       if(mDrawn == 0) {
-               mDrawn=1;
-               mFrame=0;
-       }
        SDL_Rect dest;
        dest.x = mX;
        dest.y = mY;
index 4702b6c..80349e4 100644 (file)
--- a/Sprite.h
+++ b/Sprite.h
@@ -35,7 +35,6 @@ class Sprite
        float mSpeed;
        long mLastUpdate;
        Animation *mSpriteAnimation;
-       SDL_Surface *mBackReplacement;
        SDL_Surface *mScreen;
        int ZOrder;
 };