diff options
Diffstat (limited to 'Stars45/Sprite.cpp')
-rw-r--r-- | Stars45/Sprite.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Stars45/Sprite.cpp b/Stars45/Sprite.cpp index 4fd565c..65de662 100644 --- a/Stars45/Sprite.cpp +++ b/Stars45/Sprite.cpp @@ -128,7 +128,7 @@ Sprite::Scale(double scale) if (scale >= 0) { w = (int) (scale * w); h = (int) (scale * h); - + radius = (float) ((w>h) ? w : h) / 2.0f; } } @@ -141,7 +141,7 @@ Sprite::Rescale(double scale) if (scale >= 0 && Frame()) { w = (int) (scale * Frame()->Width()); h = (int) (scale * Frame()->Height()); - + radius = (float) ((w>h) ? w : h) / 2.0f; } } @@ -154,7 +154,7 @@ Sprite::Reshape(int w1, int h1) if (w1 >= 0 && h1 >= 0 && Frame()) { w = w1; h = h1; - + radius = (float) ((w>h) ? w : h) / 2.0f; } } @@ -184,7 +184,7 @@ Sprite::SetAnimation(Bitmap* animation, int length, int repeat, int share) nframes = length; frames = animation; frame_index = 0; - + if (repeat) { loop = 1; life = -1; @@ -193,7 +193,7 @@ Sprite::SetAnimation(Bitmap* animation, int length, int repeat, int share) loop = 0; life = nframes; } - + last_time = Game::RealTime() - frame_time; } } @@ -396,7 +396,7 @@ Sprite::Update() last_time += frame_time; } - + if (life < 0 && !loop) life = 0; } |