From: LMH Date: Sun, 30 Nov 2014 01:07:32 +0000 (-1000) Subject: Crude attempt at a hat for airflower. X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=a21d6147d2afc52f8a41588704cd2f874d31ffd0;p=supertux.git Crude attempt at a hat for airflower. At least it gets the idea across. --- diff --git a/data/images/creatures/tux/air/hat/spin-1.png b/data/images/creatures/tux/air/hat/spin-1.png new file mode 100644 index 000000000..95de76c5b Binary files /dev/null and b/data/images/creatures/tux/air/hat/spin-1.png differ diff --git a/data/images/creatures/tux/air/hat/spin-2.png b/data/images/creatures/tux/air/hat/spin-2.png new file mode 100644 index 000000000..a8b29b6eb Binary files /dev/null and b/data/images/creatures/tux/air/hat/spin-2.png differ diff --git a/data/images/creatures/tux/air/hat/spin-3.png b/data/images/creatures/tux/air/hat/spin-3.png new file mode 100644 index 000000000..e2d3044ac Binary files /dev/null and b/data/images/creatures/tux/air/hat/spin-3.png differ diff --git a/data/images/creatures/tux/air/hat/stand.png b/data/images/creatures/tux/air/hat/stand.png new file mode 100644 index 000000000..edabf830b Binary files /dev/null and b/data/images/creatures/tux/air/hat/stand.png differ diff --git a/data/images/creatures/tux/air/hat/walk-0.png b/data/images/creatures/tux/air/hat/walk-0.png new file mode 100644 index 000000000..8e1db06fa Binary files /dev/null and b/data/images/creatures/tux/air/hat/walk-0.png differ diff --git a/data/images/creatures/tux/air/hat/walk-1.png b/data/images/creatures/tux/air/hat/walk-1.png new file mode 100644 index 000000000..0337b3ae9 Binary files /dev/null and b/data/images/creatures/tux/air/hat/walk-1.png differ diff --git a/data/images/creatures/tux/air/hat/walk-2.png b/data/images/creatures/tux/air/hat/walk-2.png new file mode 100644 index 000000000..20ba9b55a Binary files /dev/null and b/data/images/creatures/tux/air/hat/walk-2.png differ diff --git a/data/images/creatures/tux/earth/hardhat/walk-0.png b/data/images/creatures/tux/earth/hardhat/walk-0.png index 43005c24c..2b13056d0 100644 Binary files a/data/images/creatures/tux/earth/hardhat/walk-0.png and b/data/images/creatures/tux/earth/hardhat/walk-0.png differ diff --git a/data/images/creatures/tux/earth/hardhat/walk-1.png b/data/images/creatures/tux/earth/hardhat/walk-1.png index 732384239..b8e924d70 100644 Binary files a/data/images/creatures/tux/earth/hardhat/walk-1.png and b/data/images/creatures/tux/earth/hardhat/walk-1.png differ diff --git a/data/images/creatures/tux/earth/hardhat/walk-2.png b/data/images/creatures/tux/earth/hardhat/walk-2.png index 67c0d3437..b2369de59 100644 Binary files a/data/images/creatures/tux/earth/hardhat/walk-2.png and b/data/images/creatures/tux/earth/hardhat/walk-2.png differ diff --git a/data/images/creatures/tux/earth/hardhat/walk-4.png b/data/images/creatures/tux/earth/hardhat/walk-4.png deleted file mode 100644 index 34bdefe3f..000000000 Binary files a/data/images/creatures/tux/earth/hardhat/walk-4.png and /dev/null differ diff --git a/data/images/creatures/tux/powerups.sprite b/data/images/creatures/tux/powerups.sprite index c9033e894..ada2ecc34 100644 --- a/data/images/creatures/tux/powerups.sprite +++ b/data/images/creatures/tux/powerups.sprite @@ -3,14 +3,130 @@ ; Earth Tux (action + (name "air-walk-right") + (fps 15) + (hitbox 16 14 32 64) + (images "air/hat/walk-0.png" + "air/hat/walk-1.png" + "air/hat/walk-2.png" + "air/hat/walk-0.png" + "air/hat/walk-1.png" + "air/hat/walk-2.png")) + + (action + (name "air-walk-left") + (fps 15) + (hitbox 16 14 32 64) + (mirror-action "air-walk-right")) + + (action + (name "air-stand-right") + (hitbox 16 14 32 64) + (images "air/hat/stand.png")) + + (action + (name "air-stand-left") + (hitbox 16 14 32 64) + (mirror-action "air-stand-right")) + + (action + (name "air-jump-right") + (fps 10) + (hitbox 16 14 32 64) + (images "air/hat/stand.png" + "air/hat/spin-1.png" + "air/hat/spin-2.png" + "air/hat/spin-3.png")) + + (action + (name "air-jump-left") + (hitbox 16 14 32 64) + (mirror-action "air-jump-right")) + + (action + (name "air-skid-right") + (hitbox 16 14 32 64) + (images "air/hat/stand.png")) + + (action + (name "air-skid-left") + (hitbox 16 14 32 64) + (mirror-action "air-skid-right")) + + (action + (name "air-kick-right") + (hitbox 16 14 32 64) + (images "air/hat/stand.png")) + + (action + (name "air-kick-left") + (hitbox 16 14 32 64) + (mirror-action "air-kick-right")) + + (action + (name "air-idle-right") + (fps 5) + (hitbox 16 14 32 64) + (images "air/hat/spin-1.png" + "air/hat/spin-2.png" + "air/hat/spin-3.png")) + + (action + (name "air-idle-left") + (hitbox 16 14 32 64) + (mirror-action "air-idle-right")) + + (action + (name "air-climbing-right") + (hitbox 16 14 32 64) + (images "air/hat/stand.png")) + + (action + (name "air-climbing-left") + (hitbox 16 14 32 64) + (mirror-action "air-climbing-right")) + + (action + (name "air-duck-right") + (hitbox 16 14 32 64) + (images "air/hat/stand.png")) + + (action + (name "air-duck-left") + (hitbox 16 14 32 64) + (mirror-action "air-duck-right")) + + (action + (name "air-backflip-right") + (hitbox 16 14 32 64) + (images "air/hat/stand.png")) + + (action + (name "air-backflip-left") + (hitbox 16 14 32 64) + (mirror-action "air-backflip-right")) + + (action + (name "air-buttjump-right") + (hitbox 16 14 32 64) + (images "air/hat/stand.png")) + + (action + (name "air-buttjump-left") + (hitbox 16 14 32 64) + (mirror-action "air-buttjump-right")) + +; Earth Tux + + (action (name "earth-walk-right") (fps 15) (hitbox 16 14 32 64) (images "earth/hardhat/walk-0.png" "earth/hardhat/walk-1.png" "earth/hardhat/walk-2.png" + "earth/hardhat/walk-0.png" "earth/hardhat/walk-1.png" - "earth/hardhat/walk-4.png" "earth/hardhat/walk-2.png")) (action diff --git a/data/images/creatures/tux/tux.sprite b/data/images/creatures/tux/tux.sprite index 742e71edf..33606649b 100644 --- a/data/images/creatures/tux/tux.sprite +++ b/data/images/creatures/tux/tux.sprite @@ -485,6 +485,128 @@ (hitbox 16 14 32 64) (mirror-action "ice-buttjump-right")) +; Air Tux + + (action + (name "air-walk-right") + (fps 15.0) + (hitbox 16 14 32 64) + (images "big/walk-0.png" + "big/walk-1.png" + "big/walk-2.png" + "big/walk-3.png" + "big/walk-4.png" + "big/walk-5.png")) + + (action + (name "air-walk-left") + (fps 15.0) + (hitbox 16 14 32 64) + (mirror-action "air-walk-right")) + + (action + (name "air-stand-right") + (fps 15.0) + (hitbox 16 14 32 64) + (images "big/stand-0.png")) + + (action + (name "air-stand-left") + (fps 15.0) + (hitbox 16 14 32 64) + (mirror-action "air-stand-right")) + + (action + (name "air-jump-right") + (fps 15.0) + (hitbox 16 14 32 64) + (images "big/jump-0.png")) + + (action + (name "air-jump-left") + (fps 15.0) + (hitbox 16 14 32 64) + (mirror-action "air-jump-right")) + + (action + (name "air-skid-right") + (hitbox 16 14 32 64) + (images "big/skid-0.png")) + + (action + (name "air-skid-left") + (hitbox 16 14 32 64) + (mirror-action "air-skid-right")) + + (action + (name "air-kick-right") + (hitbox 16 14 32 64) + (images "big/kick-0.png")) + + (action + (name "air-kick-left") + (hitbox 16 14 32 64) + (mirror-action "air-kick-right")) + + (action + (name "air-idle-right") + (fps 5.0) + (hitbox 16 14 32 64) + (images "big/idle-0.png" + "big/idle-1.png" + "big/idle-0.png")) + + (action + (name "air-idle-left") + (hitbox 16 14 32 64) + (mirror-action "air-idle-right")) + + (action + (name "air-climbing-right") + (hitbox 16 14 32 64) + (images "big/ladder-0.png" + "big/ladder-1.png" + "big/ladder-2.png" + "big/ladder-3.png" + "big/ladder-2.png" + "big/ladder-1.png")) + + (action + (name "air-climbing-left") + (hitbox 16 14 32 64) + (mirror-action "air-climbing-right")) + + (action + (name "air-duck-right") + (hitbox 16 45 32 32) + (images "big/duck-0.png")) + + (action + (name "air-duck-left") + (hitbox 16 45 32 32) + (mirror-action "air-duck-right")) + + (action + (name "air-backflip-right") + (hitbox 16 37 32 32) + (images "big/backflip.png")) + + (action + (name "air-backflip-left") + (hitbox 16 37 32 32) + (fps 18.0) + (mirror-action "air-backflip-right")) + + (action + (name "air-buttjump-right") + (hitbox 16 14 32 64) + (images "big/buttjump-0.png")) + + (action + (name "air-buttjump-left") + (hitbox 16 14 32 64) + (mirror-action "air-buttjump-right")) + ; Earth Tux (action diff --git a/data/images/objects/particles/airtux-hat.sprite b/data/images/objects/particles/airtux-hat.sprite index 772fc3e7f..1a04643a6 100644 --- a/data/images/objects/particles/airtux-hat.sprite +++ b/data/images/objects/particles/airtux-hat.sprite @@ -2,8 +2,8 @@ (action (name "right") (fps 1) - (images - "icetux-cap.png" + (images + "airtux-hat.png" ) ) (action diff --git a/src/object/player.cpp b/src/object/player.cpp index 5f38c7fc8..ad9bdde83 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -1174,7 +1174,7 @@ Player::draw(DrawingContext& context) else if (player_status->bonus == ICE_BONUS) sa_prefix = "ice"; else if (player_status->bonus == AIR_BONUS) - sa_prefix = "ice"; + sa_prefix = "air"; else if (player_status->bonus == EARTH_BONUS) sa_prefix = "earth"; else @@ -1255,7 +1255,8 @@ Player::draw(DrawingContext& context) if (player_status->bonus == EARTH_BONUS) { powersprite->set_action(sprite->get_action()); lightsprite->set_action(sprite->get_action()); - } + } else if (player_status->bonus == AIR_BONUS) + powersprite->set_action(sprite->get_action()); /* // Tux is holding something @@ -1291,8 +1292,11 @@ Player::draw(DrawingContext& context) ppos, ANCHOR_MIDDLE, Vector(0, 0), Vector(0, 0), LAYER_OBJECTS+1+5)); } } - else + else { sprite->draw(context, get_pos(), LAYER_OBJECTS + 1); + if (player_status->bonus == AIR_BONUS) + powersprite->draw(context, get_pos(), LAYER_OBJECTS + 1); + } }