diff --git a/data/images/creatures/tux/big/run-0.png b/data/images/creatures/tux/big/run-0.png new file mode 100644 index 00000000000..5a3d9243c8c Binary files /dev/null and b/data/images/creatures/tux/big/run-0.png differ diff --git a/data/images/creatures/tux/big/run-1.png b/data/images/creatures/tux/big/run-1.png new file mode 100644 index 00000000000..f9b8798a8a9 Binary files /dev/null and b/data/images/creatures/tux/big/run-1.png differ diff --git a/data/images/creatures/tux/big/run-2.png b/data/images/creatures/tux/big/run-2.png new file mode 100644 index 00000000000..b6c9bfe5dff Binary files /dev/null and b/data/images/creatures/tux/big/run-2.png differ diff --git a/data/images/creatures/tux/big/run-3.png b/data/images/creatures/tux/big/run-3.png new file mode 100644 index 00000000000..346cbf6e8ad Binary files /dev/null and b/data/images/creatures/tux/big/run-3.png differ diff --git a/data/images/creatures/tux/big/run-4.png b/data/images/creatures/tux/big/run-4.png new file mode 100644 index 00000000000..8bdc35c9012 Binary files /dev/null and b/data/images/creatures/tux/big/run-4.png differ diff --git a/data/images/creatures/tux/big/run-5.png b/data/images/creatures/tux/big/run-5.png new file mode 100644 index 00000000000..04f24702c64 Binary files /dev/null and b/data/images/creatures/tux/big/run-5.png differ diff --git a/data/images/creatures/tux/big/run-6.png b/data/images/creatures/tux/big/run-6.png new file mode 100644 index 00000000000..60741bd2ecf Binary files /dev/null and b/data/images/creatures/tux/big/run-6.png differ diff --git a/data/images/creatures/tux/big/run-7.png b/data/images/creatures/tux/big/run-7.png new file mode 100644 index 00000000000..59c25a04838 Binary files /dev/null and b/data/images/creatures/tux/big/run-7.png differ diff --git a/data/images/creatures/tux/big/run_transition-0.png b/data/images/creatures/tux/big/run_transition-0.png new file mode 100644 index 00000000000..77a2d1ee7c8 Binary files /dev/null and b/data/images/creatures/tux/big/run_transition-0.png differ diff --git a/data/images/creatures/tux/big/walk_transition-0.png b/data/images/creatures/tux/big/walk_transition-0.png new file mode 100644 index 00000000000..5c4fd704dbc Binary files /dev/null and b/data/images/creatures/tux/big/walk_transition-0.png differ diff --git a/data/images/creatures/tux/small/run-0.png b/data/images/creatures/tux/small/run-0.png new file mode 100644 index 00000000000..7425c0ea8ac Binary files /dev/null and b/data/images/creatures/tux/small/run-0.png differ diff --git a/data/images/creatures/tux/small/run-1.png b/data/images/creatures/tux/small/run-1.png new file mode 100644 index 00000000000..d7630a97d11 Binary files /dev/null and b/data/images/creatures/tux/small/run-1.png differ diff --git a/data/images/creatures/tux/small/run-2.png b/data/images/creatures/tux/small/run-2.png new file mode 100644 index 00000000000..e5f42a7d8e0 Binary files /dev/null and b/data/images/creatures/tux/small/run-2.png differ diff --git a/data/images/creatures/tux/small/run-3.png b/data/images/creatures/tux/small/run-3.png new file mode 100644 index 00000000000..c2dd8962c58 Binary files /dev/null and b/data/images/creatures/tux/small/run-3.png differ diff --git a/data/images/creatures/tux/small/run-4.png b/data/images/creatures/tux/small/run-4.png new file mode 100644 index 00000000000..0f71a8d808e Binary files /dev/null and b/data/images/creatures/tux/small/run-4.png differ diff --git a/data/images/creatures/tux/small/run-5.png b/data/images/creatures/tux/small/run-5.png new file mode 100644 index 00000000000..91095245067 Binary files /dev/null and b/data/images/creatures/tux/small/run-5.png differ diff --git a/data/images/creatures/tux/small/run-6.png b/data/images/creatures/tux/small/run-6.png new file mode 100644 index 00000000000..165eabb5602 Binary files /dev/null and b/data/images/creatures/tux/small/run-6.png differ diff --git a/data/images/creatures/tux/small/run-7.png b/data/images/creatures/tux/small/run-7.png new file mode 100644 index 00000000000..9c8393592d1 Binary files /dev/null and b/data/images/creatures/tux/small/run-7.png differ diff --git a/data/images/creatures/tux/small/run_transition-0.png b/data/images/creatures/tux/small/run_transition-0.png new file mode 100644 index 00000000000..45084c4b4d2 Binary files /dev/null and b/data/images/creatures/tux/small/run_transition-0.png differ diff --git a/data/images/creatures/tux/small/walk_transition-0.png b/data/images/creatures/tux/small/walk_transition-0.png new file mode 100644 index 00000000000..909c3af99a0 Binary files /dev/null and b/data/images/creatures/tux/small/walk_transition-0.png differ diff --git a/data/images/creatures/tux/tux.sprite b/data/images/creatures/tux/tux.sprite index c08c3e6a624..8bd0bc704ee 100644 --- a/data/images/creatures/tux/tux.sprite +++ b/data/images/creatures/tux/tux.sprite @@ -141,9 +141,11 @@ (action (name "small-walk-right") - (fps 15.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 26 32 32) - (images "small/walk-0.png" + (images "small/walk_transition-0.png" + "small/walk-0.png" "small/walk-1.png" "small/walk-2.png" "small/walk-3.png" @@ -154,10 +156,33 @@ (action (name "small-walk-left") - (fps 15.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 26 32 32) (mirror-action "small-walk-right")) + (action + (name "small-run-right") + (fps 15.0) + (loop-frame 2) + (hitbox 18 26 32 32) + (images "small/run_transition-0.png" + "small/run-0.png" + "small/run-1.png" + "small/run-2.png" + "small/run-3.png" + "small/run-4.png" + "small/run-5.png" + "small/run-6.png" + "small/run-7.png")) + + (action + (name "small-run-left") + (fps 15.0) + (loop-frame 2) + (hitbox 20 26 32 32) + (mirror-action "small-run-right")) + (action (name "small-jump-right") (fps 15.0) @@ -604,9 +629,11 @@ (action (name "big-walk-right") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) - (images "big/walk-0.png" + (images "big/walk_transition-0.png" + "big/walk-0.png" "big/walk-1.png" "big/walk-2.png" "big/walk-3.png" @@ -617,10 +644,33 @@ (action (name "big-walk-left") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) (mirror-action "big-walk-right")) + (action + (name "big-run-right") + (fps 15.0) + (loop-frame 2) + (hitbox 18 14 32 64) + (images "big/run_transition-0.png" + "big/run-0.png" + "big/run-1.png" + "big/run-2.png" + "big/run-3.png" + "big/run-4.png" + "big/run-5.png" + "big/run-6.png" + "big/run-7.png")) + + (action + (name "big-run-left") + (fps 15.0) + (loop-frame 2) + (hitbox 20 14 32 64) + (mirror-action "big-run-right")) + (action (name "big-jump-right") (fps 15.0) @@ -1075,9 +1125,11 @@ (action (name "fire-walk-right") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) - (images "big/walk-0.png" + (images "big/walk_transition-0.png" + "big/walk-0.png" "big/walk-1.png" "big/walk-2.png" "big/walk-3.png" @@ -1088,11 +1140,34 @@ (action (name "fire-walk-left") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) (mirror-action "fire-walk-right")) (action + (name "fire-run-right") + (fps 15.0) + (loop-frame 2) + (hitbox 18 14 32 64) + (images "big/run_transition-0.png" + "big/run-0.png" + "big/run-1.png" + "big/run-2.png" + "big/run-3.png" + "big/run-4.png" + "big/run-5.png" + "big/run-6.png" + "big/run-7.png")) + + (action + (name "fire-run-left") + (fps 15.0) + (loop-frame 2) + (hitbox 20 14 32 64) + (mirror-action "fire-run-right")) + + (action (name "fire-jump-right") (fps 15.0) (loops 1) @@ -1546,9 +1621,11 @@ (action (name "ice-walk-right") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) - (images "big/walk-0.png" + (images "big/walk_transition-0.png" + "big/walk-0.png" "big/walk-1.png" "big/walk-2.png" "big/walk-3.png" @@ -1559,11 +1636,34 @@ (action (name "ice-walk-left") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) (mirror-action "ice-walk-right")) (action + (name "ice-run-right") + (fps 15.0) + (loop-frame 2) + (hitbox 18 14 32 64) + (images "big/run_transition-0.png" + "big/run-0.png" + "big/run-1.png" + "big/run-2.png" + "big/run-3.png" + "big/run-4.png" + "big/run-5.png" + "big/run-6.png" + "big/run-7.png")) + + (action + (name "ice-run-left") + (fps 15.0) + (loop-frame 2) + (hitbox 20 14 32 64) + (mirror-action "ice-run-right")) + + (action (name "ice-jump-right") (fps 15.0) (loops 1) @@ -2017,9 +2117,11 @@ (action (name "earth-walk-right") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) - (images "big/walk-0.png" + (images "big/walk_transition-0.png" + "big/walk-0.png" "big/walk-1.png" "big/walk-2.png" "big/walk-3.png" @@ -2030,11 +2132,34 @@ (action (name "earth-walk-left") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) (mirror-action "earth-walk-right")) (action + (name "earth-run-right") + (fps 15.0) + (loop-frame 2) + (hitbox 18 14 32 64) + (images "big/run_transition-0.png" + "big/run-0.png" + "big/run-1.png" + "big/run-2.png" + "big/run-3.png" + "big/run-4.png" + "big/run-5.png" + "big/run-6.png" + "big/run-7.png")) + + (action + (name "earth-run-left") + (fps 15.0) + (loop-frame 2) + (hitbox 20 14 32 64) + (mirror-action "earth-run-right")) + + (action (name "earth-jump-right") (fps 15.0) (loops 1) @@ -2487,9 +2612,11 @@ (action (name "air-walk-right") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) - (images "big/walk-0.png" + (images "big/walk_transition-0.png" + "big/walk-0.png" "big/walk-1.png" "big/walk-2.png" "big/walk-3.png" @@ -2500,11 +2627,34 @@ (action (name "air-walk-left") - (fps 16.0) + (fps 14.0) + (loop-frame 2) (hitbox 16 14 32 64) (mirror-action "air-walk-right")) (action + (name "air-run-right") + (fps 15.0) + (loop-frame 2) + (hitbox 18 14 32 64) + (images "big/run_transition-0.png" + "big/run-0.png" + "big/run-1.png" + "big/run-2.png" + "big/run-3.png" + "big/run-4.png" + "big/run-5.png" + "big/run-6.png" + "big/run-7.png")) + + (action + (name "air-run-left") + (fps 15.0) + (loop-frame 2) + (hitbox 20 14 32 64) + (mirror-action "air-run-right")) + + (action (name "air-jump-right") (fps 15.0) (loops 1) @@ -2903,8 +3053,8 @@ "cutscene/credits-0.png")) (action - (name "credits-left") - (fps 10.0) - (hitbox 16 14 32 64) - (mirror-action "credits-right")) + (name "credits-left") + (fps 10.0) + (hitbox 16 14 32 64) + (mirror-action "credits-right")) ) diff --git a/src/object/player.cpp b/src/object/player.cpp index 5c5122f1d17..a3739d3dfe2 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -2044,8 +2044,16 @@ Player::draw(DrawingContext& context) m_sprite->set_action(sa_prefix+("-" + IDLE_STAGES[m_idle_stage])+sa_postfix, Sprite::LOOPS_CONTINUED); } } - else { + else + { + if (std::abs(m_physic.get_velocity_x()) >= MAX_RUN_XM-3) + { + m_sprite->set_action(sa_prefix+"-run"+sa_postfix); + } + else + { m_sprite->set_action(sa_prefix+"-walk"+sa_postfix); + } } }