"shared/iceflower-3.png"
"shared/iceflower-2.png"
"shared/iceflower-1.png"))
+
+ (sprite (name "smalltux-gameover")
+ (images "shared/smalltux-gameover-0.png"
+ "shared/smalltux-gameover-1.png"))
+
+ (sprite (name "smalltux-skid-left")
+ (x-hotspot 6)
+ (y-hotspot 8)
+ (images "shared/smalltux-skid-left.png"))
+
+ (sprite (name "smalltux-skid-right")
+ (x-hotspot 6)
+ (y-hotspot 8)
+ (images "shared/smalltux-skid-right.png"))
)
;; EOF ;;
Surface* smalltux_jump_right;
Surface* smalltux_stand_left;
Surface* smalltux_stand_right;
+Sprite* smalltux_gameover;
+Sprite* smalltux_skid_left;
+Sprite* smalltux_skid_right;
Sprite* bigtux_right;
Sprite* bigtux_left;
if (!got_coffee)
{
- if (physic.get_velocity_y() != 0)
+ if (!skidding_timer.started())
{
- if (dir == RIGHT)
- smalltux_jump_right->draw( base.x - scroll_x, base.y - 10);
- else
- smalltux_jump_left->draw( base.x - scroll_x, base.y - 10);
- }
- else
- {
- if (fabsf(physic.get_velocity_x()) < 1.0f) // standing
+ if (physic.get_velocity_y() != 0)
{
if (dir == RIGHT)
- smalltux_stand_right->draw( base.x - scroll_x, base.y - 9);
+ smalltux_jump_right->draw( base.x - scroll_x, base.y - 10);
else
- smalltux_stand_left->draw( base.x - scroll_x, base.y - 9);
+ smalltux_jump_left->draw( base.x - scroll_x, base.y - 10);
}
- else // moving
+ else
{
- if (dir == RIGHT)
- tux_right[(global_frame_counter/2) % tux_right.size()]->draw(base.x - scroll_x, base.y - 9);
- else
- tux_left[(global_frame_counter/2) % tux_left.size()]->draw(base.x - scroll_x, base.y - 9);
+ if (fabsf(physic.get_velocity_x()) < 1.0f) // standing
+ {
+ if (dir == RIGHT)
+ smalltux_stand_right->draw( base.x - scroll_x, base.y - 9);
+ else
+ smalltux_stand_left->draw( base.x - scroll_x, base.y - 9);
+ }
+ else // moving
+ {
+ if (dir == RIGHT)
+ tux_right[(global_frame_counter/2) % tux_right.size()]->draw(base.x - scroll_x, base.y - 9);
+ else
+ tux_left[(global_frame_counter/2) % tux_left.size()]->draw(base.x - scroll_x, base.y - 9);
+ }
}
}
+ else
+ {
+ if (dir == RIGHT)
+ smalltux_skid_right->draw(base.x - scroll_x, base.y);
+ else
+ smalltux_skid_left->draw(base.x - scroll_x, base.y);
+ }
}
else
{
}
}
}
- else
+ else // Large Tux
{
if (invincible_timer.started())
{
extern Surface* smalltux_jump_right;
extern Surface* smalltux_stand_left;
extern Surface* smalltux_stand_right;
+extern Sprite* smalltux_skid_left;
+extern Sprite* smalltux_skid_right;
+extern Sprite* smalltux_gameover;
extern Sprite* bigtux_right;
extern Sprite* bigtux_left;
extern Sprite* bigtux_right_jump;
sprite_manager = new SpriteManager(datadir + "/supertux.strf");
/* Tuxes: */
+ smalltux_gameover = sprite_manager->load("smalltux-gameover");
+
+ smalltux_skid_left = sprite_manager->load("smalltux-skid-left");
+ smalltux_skid_right = sprite_manager->load("smalltux-skid-right");
+
smalltux_stand_left = new Surface(datadir + "/images/shared/smalltux-left-6.png", USE_ALPHA);
smalltux_stand_right = new Surface(datadir + "/images/shared/smalltux-right-6.png", USE_ALPHA);
free_special_gfx();
+ delete smalltux_gameover;
+
for (i = 0; i < 3; i++)
{
delete tux_right[i];