From: LMH Date: Wed, 17 Dec 2014 01:11:04 +0000 (-1000) Subject: Finish out stone form with some quick-and-dirty graphics X-Git-Url: https://git.octo.it/?p=supertux.git;a=commitdiff_plain;h=3cb2b7789c9f8de862cff6b1989be84a9fe8ed16 Finish out stone form with some quick-and-dirty graphics --- diff --git a/data/images/creatures/tux/earth/backflip.png b/data/images/creatures/tux/earth/backflip.png new file mode 100644 index 000000000..95e332dc9 Binary files /dev/null and b/data/images/creatures/tux/earth/backflip.png differ diff --git a/data/images/creatures/tux/earth/buttjump.png b/data/images/creatures/tux/earth/buttjump.png new file mode 100644 index 000000000..43751857f Binary files /dev/null and b/data/images/creatures/tux/earth/buttjump.png differ diff --git a/data/images/creatures/tux/earth/duck.png b/data/images/creatures/tux/earth/duck.png new file mode 100644 index 000000000..c7ceff8f6 Binary files /dev/null and b/data/images/creatures/tux/earth/duck.png differ diff --git a/data/images/creatures/tux/earth/hardhat/duck.png b/data/images/creatures/tux/earth/hardhat/duck.png new file mode 100644 index 000000000..b43f898ab Binary files /dev/null and b/data/images/creatures/tux/earth/hardhat/duck.png differ diff --git a/data/images/creatures/tux/earth/head.png b/data/images/creatures/tux/earth/head.png new file mode 100644 index 000000000..10a819bd3 Binary files /dev/null and b/data/images/creatures/tux/earth/head.png differ diff --git a/data/images/creatures/tux/earth/jump.png b/data/images/creatures/tux/earth/jump.png new file mode 100644 index 000000000..4336ddcd2 Binary files /dev/null and b/data/images/creatures/tux/earth/jump.png differ diff --git a/data/images/creatures/tux/earth/kick.png b/data/images/creatures/tux/earth/kick.png new file mode 100644 index 000000000..670c60ebe Binary files /dev/null and b/data/images/creatures/tux/earth/kick.png differ diff --git a/data/images/creatures/tux/earth/ladder.png b/data/images/creatures/tux/earth/ladder.png new file mode 100755 index 000000000..2bd09c661 Binary files /dev/null and b/data/images/creatures/tux/earth/ladder.png differ diff --git a/data/images/creatures/tux/earth/skid.png b/data/images/creatures/tux/earth/skid.png new file mode 100644 index 000000000..0b02506e3 Binary files /dev/null and b/data/images/creatures/tux/earth/skid.png differ diff --git a/data/images/creatures/tux/earth/walk.png b/data/images/creatures/tux/earth/walk.png new file mode 100644 index 000000000..c56dfd749 Binary files /dev/null and b/data/images/creatures/tux/earth/walk.png differ diff --git a/data/images/creatures/tux/powerups.sprite b/data/images/creatures/tux/powerups.sprite index b51071253..3d01fd573 100644 --- a/data/images/creatures/tux/powerups.sprite +++ b/data/images/creatures/tux/powerups.sprite @@ -205,12 +205,12 @@ (action (name "earth-duck-right") - (hitbox 16 14 32 64) - (images "earth/hardhat/stand.png")) + (hitbox 16 45 32 32) + (images "earth/hardhat/duck.png")) (action (name "earth-duck-left") - (hitbox 16 14 32 64) + (hitbox 16 45 32 32) (mirror-action "earth-duck-right")) (action diff --git a/data/images/creatures/tux/tux.sprite b/data/images/creatures/tux/tux.sprite index 33606649b..e231e5e39 100644 --- a/data/images/creatures/tux/tux.sprite +++ b/data/images/creatures/tux/tux.sprite @@ -735,7 +735,7 @@ (name "earth-walk-right-stone") (fps 15.0) (hitbox 16 14 32 64) - (images "earth/stand.png")) + (images "earth/walk.png")) (action (name "earth-walk-left-stone") @@ -759,7 +759,7 @@ (name "earth-jump-right-stone") (fps 15.0) (hitbox 16 14 32 64) - (images "earth/stand.png")) + (images "earth/jump.png")) (action (name "earth-jump-left-stone") @@ -770,7 +770,7 @@ (action (name "earth-skid-right-stone") (hitbox 16 14 32 64) - (images "earth/stand.png")) + (images "earth/skid.png")) (action (name "earth-skid-left-stone") @@ -780,7 +780,7 @@ (action (name "earth-kick-right-stone") (hitbox 16 14 32 64) - (images "earth/stand.png")) + (images "earth/kick.png")) (action (name "earth-kick-left-stone") @@ -791,7 +791,7 @@ (name "earth-idle-right-stone") (fps 5.0) (hitbox 16 14 32 64) - (images "earth/stand.png")) + (images "earth/head.png")) (action (name "earth-idle-left-stone") @@ -801,7 +801,7 @@ (action (name "earth-climbing-right-stone") (hitbox 16 14 32 64) - (images "earth/stand.png")) + (images "earth/ladder.png")) (action (name "earth-climbing-left-stone") @@ -811,7 +811,7 @@ (action (name "earth-duck-right-stone") (hitbox 16 45 32 32) - (images "earth/stand.png")) + (images "earth/duck.png")) (action (name "earth-duck-left-stone") @@ -821,7 +821,7 @@ (action (name "earth-backflip-right-stone") (hitbox 16 37 32 32) - (images "earth/stand.png")) + (images "earth/backflip.png")) (action (name "earth-backflip-left-stone") @@ -832,7 +832,7 @@ (action (name "earth-buttjump-right-stone") (hitbox 16 14 32 64) - (images "earth/stand.png")) + (images "earth/buttjump.png")) (action (name "earth-buttjump-left-stone") diff --git a/src/object/player.cpp b/src/object/player.cpp index fafe2fcd4..a891b80f7 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -416,9 +416,11 @@ Player::update(float elapsed_time) if (backflipping && (backflip_timer.get_timegone() > 0.15f)) { backflipping = false; backflip_direction = 0; - sprite->set_angle(0.0f); - powersprite->set_angle(0.0f); - lightsprite->set_angle(0.0f); + if (!stone) { + sprite->set_angle(0.0f); + powersprite->set_angle(0.0f); + lightsprite->set_angle(0.0f); + } // if controls are currently deactivated, we take care of standing up ourselves if (deactivated) @@ -644,6 +646,8 @@ Player::do_standup() { return; if (backflipping) return; + if (stone) + return; if (adjust_height(BIG_TUX_HEIGHT)) { duck = false; @@ -860,6 +864,7 @@ Player::handle_input() if (controller->pressed(Controller::DOWN) && player_status->bonus == EARTH_BONUS && !cooldown_timer.started()) { if (controller->hold(Controller::ACTION) && !ability_timer.started()) { ability_timer.start(player_status->max_earth_time * STONE_TIME_PER_FLOWER); + powersprite->stop_animation(); stone = true; physic.set_gravity_modifier(1.0f); // Undo jump_early_apex } @@ -872,6 +877,9 @@ Player::handle_input() if (stone && (!controller->hold(Controller::ACTION) || ability_timer.get_timeleft() <= 0.5f)) { cooldown_timer.start(ability_timer.get_timegone()/2.0f); //The longer stone form is used, the longer until it can be used again ability_timer.stop(); + sprite->set_angle(0.0f); + powersprite->set_angle(0.0f); + lightsprite->set_angle(0.0f); stone = false; for (int i = 0; i < 8; i++) {