projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d91dd60
)
Round frame on checking for last frame, so that the last frame is used.
author
Ricardo Cruz
<rick2@aeiou.pt>
Wed, 18 Aug 2004 18:26:40 +0000
(18:26 +0000)
committer
Ricardo Cruz
<rick2@aeiou.pt>
Wed, 18 Aug 2004 18:26:40 +0000
(18:26 +0000)
SVN-Revision: 1810
lib/special/sprite.cpp
patch
|
blob
|
history
diff --git
a/lib/special/sprite.cpp
b/lib/special/sprite.cpp
index
7387e3d
..
0e5fddf
100644
(file)
--- a/
lib/special/sprite.cpp
+++ b/
lib/special/sprite.cpp
@@
-119,7
+119,7
@@
Sprite::reset()
{
frame = 0;
last_tick = SDL_GetTicks();
{
frame = 0;
last_tick = SDL_GetTicks();
-animation_reversed =
tru
e;
+animation_reversed =
fals
e;
next_action.clear();
}
next_action.clear();
}
@@
-157,7
+157,7
@@
else
if(animation_reversed)
{
float excedent = frame - 0;
if(animation_reversed)
{
float excedent = frame - 0;
- if(excedent < 0 || excedent >= get_frames())
+ if(
(int)
excedent < 0 || excedent >= get_frames())
{ // last case can happen when not used reverse_animation()
frame = get_frames() - 1;
if(animation_loops > 0)
{ // last case can happen when not used reverse_animation()
frame = get_frames() - 1;
if(animation_loops > 0)
@@
-177,7
+177,7
@@
if(animation_reversed)
else
{
float excedent = frame - action->surfaces.size();
else
{
float excedent = frame - action->surfaces.size();
- if(excedent >= 0)
+ if(
(int)
excedent >= 0)
{
frame = 0;
if(animation_loops > 0)
{
frame = 0;
if(animation_loops > 0)