projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed code variables, as well.
[supertux.git]
/
lib
/
special
/
sprite.h
diff --git
a/lib/special/sprite.h
b/lib/special/sprite.h
index
f848945
..
184e2f6
100644
(file)
--- a/
lib/special/sprite.h
+++ b/
lib/special/sprite.h
@@
-39,8
+39,8
@@
namespace SuperTux
{
std::string name;
{
std::string name;
- int x_
hotspo
t;
- int y_
hotspo
t;
+ int x_
offse
t;
+ int y_
offse
t;
/** Frames per second */
float fps;
/** Frames per second */
float fps;
@@
-49,8
+49,8
@@
namespace SuperTux
};
public:
};
public:
- /** cur has to be a pointer to data in the form of ((x-
hotspo
t 5)
- (y-
hotspo
t 10) ...) */
+ /** cur has to be a pointer to data in the form of ((x-
offse
t 5)
+ (y-
offse
t 10) ...) */
Sprite(lisp_object_t* cur);
~Sprite();
Sprite(lisp_object_t* cur);
~Sprite();
@@
-66,10
+66,13
@@
namespace SuperTux
0 - stopped
1,2,3 - one, two, three times... */
void start_animation(int loops);
0 - stopped
1,2,3 - one, two, three times... */
void start_animation(int loops);
+ /* Stop animation */
+ void stop_animation()
+ { start_animation(0); }
/** Check if animation is stopped or not */
bool check_animation();
/** Reverse the animation */
/** Check if animation is stopped or not */
bool check_animation();
/** Reverse the animation */
- void reverse_animation();
+ void reverse_animation(
bool reverse
);
float get_fps()
{ return action->fps; }
float get_fps()
{ return action->fps; }
@@
-90,7
+93,7
@@
namespace SuperTux
{ return (int)frame; }
/** Set current frame */
void set_frame(int frame_)
{ return (int)frame; }
/** Set current frame */
void set_frame(int frame_)
- { frame = frame_; }
+ {
if(frame_ > get_frames()) frame = 0; else
frame = frame_; }
Surface* get_frame(unsigned int frame)
{
if(frame < action->surfaces.size())
Surface* get_frame(unsigned int frame)
{
if(frame < action->surfaces.size())
@@
-116,6
+119,7
@@
namespace SuperTux
Actions actions;
Action* action;
Actions actions;
Action* action;
+ std::string next_action;
};
} //namespace SuperTux
};
} //namespace SuperTux