]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Animation.cpp
initialize objects after loading
[l2e.git] / src / graphics / Animation.cpp
index f55a9aa9fc6520b7c46e1532f8c83fccd9dece55..bdd4b2905e75728c3d64523156203a714e4acff2 100644 (file)
@@ -14,6 +14,11 @@ using loader::TypeDescription;
 
 namespace graphics {
 
+Animation::Animation(loader::noinit_t) {
+
+}
+
+
 void Animation::CreateTypeDescription() {
        TypeDescription &td(TypeDescription::Create(TYPE_ID, "Animation"));
        td.SetDescription("Abstract base type for animations.");
@@ -63,24 +68,24 @@ bool AnimationRunner::JustFinished() const {
 }
 
 
-void AnimationRunner::Draw(SDL_Surface *dest, geometry::Vector<int> position) const {
+void AnimationRunner::Draw(SDL_Surface *dest, math::Vector<int> position) const {
        GetSprite()->Draw(dest,
                        position + animation->Offset(Frame()),
                        animation->Col(Frame()) + ColOffset(),
                        animation->Row(Frame()) + RowOffset());
 }
 
-void AnimationRunner::DrawTopRight(SDL_Surface *dest, geometry::Vector<int> position) const {
-       geometry::Vector<int> offset(-GetSprite()->Width(), 0);
+void AnimationRunner::DrawTopRight(SDL_Surface *dest, math::Vector<int> position) const {
+       math::Vector<int> offset(-GetSprite()->Width(), 0);
        Draw(dest, position + offset);
 }
 
-void AnimationRunner::DrawCenter(SDL_Surface *dest, geometry::Vector<int> position) const {
+void AnimationRunner::DrawCenter(SDL_Surface *dest, math::Vector<int> position) const {
        Draw(dest, position - (GetSprite()->Size() / 2));
 }
 
-void AnimationRunner::DrawCenterBottom(SDL_Surface *dest, geometry::Vector<int> position) const {
-       geometry::Vector<int> offset(-GetSprite()->Width() / 2, -GetSprite()->Height());
+void AnimationRunner::DrawCenterBottom(SDL_Surface *dest, math::Vector<int> position) const {
+       math::Vector<int> offset(-GetSprite()->Width() / 2, -GetSprite()->Height());
        Draw(dest, position + offset);
 }