]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Animation.h
switched some (x,y) and (w,h) pairs to vectors
[l2e.git] / src / graphics / Animation.h
index e26bca9c2cc889b9c39ef466442394dfa798d04c..208f6bdb19e7b95d9dbc20a417498608f14dc64b 100644 (file)
@@ -97,8 +97,7 @@ public:
                Draw(dest, position + offset);
        }
        void DrawCenter(SDL_Surface *dest, geometry::Vector<int> position) const {
-               geometry::Vector<int> offset(-sprite->Width() / 2, -sprite->Height() / 2);
-               Draw(dest, position + offset);
+               Draw(dest, position - (sprite->Size() / 2));
        }
        void DrawCenterBottom(SDL_Surface *dest, geometry::Vector<int> position) const {
                geometry::Vector<int> offset(-sprite->Width() / 2, -sprite->Height());