}
void
+Sprite::draw_part(float sx, float sy, float x, float y, float w, float h)
+{
+ time = SDL_GetTicks();
+ unsigned int frame = get_current_frame();
+
+ if (frame < surfaces.size())
+ surfaces[frame]->draw_part(sx, sy, x - x_hotspot, y - y_hotspot, w, h);
+}
+
+void
Sprite::reset()
{
time = 0;
/** Update the sprite and process to the next frame */
void update(float delta);
void draw(float x, float y);
-
+ void draw_part(float sx, float sy, float x, float y, float w, float h);
int get_current_frame() const;
std::string get_name() const { return name; }