Skip to content

Commit

Permalink
Finish out stone form with some quick-and-dirty graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
LMH0013 committed Dec 17, 2014
1 parent 5d5f1fd commit 3cb2b77
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 15 deletions.
Binary file added data/images/creatures/tux/earth/backflip.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/buttjump.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/duck.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/hardhat/duck.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/head.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/jump.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/kick.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/ladder.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/skid.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/creatures/tux/earth/walk.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions data/images/creatures/tux/powerups.sprite
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions data/images/creatures/tux/tux.sprite
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
14 changes: 11 additions & 3 deletions src/object/player.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -644,6 +646,8 @@ Player::do_standup() {
return;
if (backflipping)
return;
if (stone)
return;

if (adjust_height(BIG_TUX_HEIGHT)) {
duck = false;
Expand Down Expand Up @@ -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
}
Expand All @@ -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++)
{
Expand Down

0 comments on commit 3cb2b77

Please sign in to comment.