From: LMH Date: Sun, 9 Nov 2014 21:14:32 +0000 (-1000) Subject: Graphics for powerups: airflower and earthflower X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4869b1d4c19ab08f0daa776bff7f820608cfc881;p=supertux.git Graphics for powerups: airflower and earthflower --- diff --git a/data/images/powerups/airflower/air_flower-0.png b/data/images/powerups/airflower/air_flower-0.png new file mode 100644 index 000000000..bf51d84c3 Binary files /dev/null and b/data/images/powerups/airflower/air_flower-0.png differ diff --git a/data/images/powerups/airflower/air_flower-1.png b/data/images/powerups/airflower/air_flower-1.png new file mode 100644 index 000000000..3e1c3cb2a Binary files /dev/null and b/data/images/powerups/airflower/air_flower-1.png differ diff --git a/data/images/powerups/airflower/air_flower-2.png b/data/images/powerups/airflower/air_flower-2.png new file mode 100644 index 000000000..a5d50e3b5 Binary files /dev/null and b/data/images/powerups/airflower/air_flower-2.png differ diff --git a/data/images/powerups/airflower/air_flower-3.png b/data/images/powerups/airflower/air_flower-3.png new file mode 100644 index 000000000..20cf44082 Binary files /dev/null and b/data/images/powerups/airflower/air_flower-3.png differ diff --git a/data/images/powerups/airflower/airflower.sprite b/data/images/powerups/airflower/airflower.sprite new file mode 100644 index 000000000..dda2e51b8 --- /dev/null +++ b/data/images/powerups/airflower/airflower.sprite @@ -0,0 +1,9 @@ +(supertux-sprite + (action + (name "default") + (images "air_flower-0.png" + "air_flower-1.png" + "air_flower-2.png" + "air_flower-3.png" + "air_flower-2.png" + "air_flower-1.png"))) diff --git a/data/images/powerups/earthflower/earth_flower-0.png b/data/images/powerups/earthflower/earth_flower-0.png new file mode 100644 index 000000000..0237a1983 Binary files /dev/null and b/data/images/powerups/earthflower/earth_flower-0.png differ diff --git a/data/images/powerups/earthflower/earth_flower-1.png b/data/images/powerups/earthflower/earth_flower-1.png new file mode 100644 index 000000000..5a81cb181 Binary files /dev/null and b/data/images/powerups/earthflower/earth_flower-1.png differ diff --git a/data/images/powerups/earthflower/earth_flower-2.png b/data/images/powerups/earthflower/earth_flower-2.png new file mode 100644 index 000000000..0b3d6be32 Binary files /dev/null and b/data/images/powerups/earthflower/earth_flower-2.png differ diff --git a/data/images/powerups/earthflower/earth_flower-3.png b/data/images/powerups/earthflower/earth_flower-3.png new file mode 100644 index 000000000..5129684fa Binary files /dev/null and b/data/images/powerups/earthflower/earth_flower-3.png differ diff --git a/data/images/powerups/earthflower/earthflower.sprite b/data/images/powerups/earthflower/earthflower.sprite new file mode 100644 index 000000000..213993e15 --- /dev/null +++ b/data/images/powerups/earthflower/earthflower.sprite @@ -0,0 +1,9 @@ +(supertux-sprite + (action + (name "default") + (images "earth_flower-0.png" + "earth_flower-1.png" + "earth_flower-2.png" + "earth_flower-3.png" + "earth_flower-2.png" + "earth_flower-1.png"))) diff --git a/data/images/powerups/iceflower/ice_flower-3.png b/data/images/powerups/iceflower/ice_flower-3.png new file mode 100644 index 000000000..4cf9a8cbd Binary files /dev/null and b/data/images/powerups/iceflower/ice_flower-3.png differ diff --git a/data/images/powerups/iceflower/iceflower.sprite b/data/images/powerups/iceflower/iceflower.sprite index 85b926baf..e9812899a 100644 --- a/data/images/powerups/iceflower/iceflower.sprite +++ b/data/images/powerups/iceflower/iceflower.sprite @@ -3,4 +3,7 @@ (name "default") (images "ice_flower-0.png" "ice_flower-1.png" - "ice_flower-2.png"))) + "ice_flower-2.png" + "ice_flower-3.png" + "ice_flower-2.png" + "ice_flower-1.png"))) diff --git a/src/object/bonus_block.cpp b/src/object/bonus_block.cpp index fb881b8aa..5f067766d 100644 --- a/src/object/bonus_block.cpp +++ b/src/object/bonus_block.cpp @@ -415,7 +415,7 @@ BonusBlock::try_drop(Player *player) case CONTENT_AIRGROW: { - sector->add_object(std::make_shared(get_pos() + Vector(0, 32), "images/powerups/iceflower/iceflower.sprite")); + sector->add_object(std::make_shared(get_pos() + Vector(0, 32), "images/powerups/airflower/airflower.sprite")); SoundManager::current()->play("sounds/upgrade.wav"); countdown = true; break; @@ -423,7 +423,7 @@ BonusBlock::try_drop(Player *player) case CONTENT_EARTHGROW: { - sector->add_object(std::make_shared(get_pos() + Vector(0, 32), "images/powerups/fireflower/fireflower.sprite")); + sector->add_object(std::make_shared(get_pos() + Vector(0, 32), "images/powerups/earthflower/earthflower.sprite")); SoundManager::current()->play("sounds/upgrade.wav"); countdown = true; break; diff --git a/src/object/flower.cpp b/src/object/flower.cpp index e367484b2..4d3fade4a 100644 --- a/src/object/flower.cpp +++ b/src/object/flower.cpp @@ -41,12 +41,12 @@ Flower::Flower(BonusType _type) : lightsprite->set_color(Color(0.0f, 0.1f, 0.2f)); } else if(type == AIR_BONUS) { - sprite = SpriteManager::current()->create("images/powerups/iceflower/iceflower.sprite"); + sprite = SpriteManager::current()->create("images/powerups/airflower/airflower.sprite"); SoundManager::current()->preload("sounds/fire-flower.wav"); lightsprite->set_color(Color(0.15f, 0.0f, 0.15f)); } else if(type == EARTH_BONUS) { - sprite = SpriteManager::current()->create("images/powerups/fireflower/fireflower.sprite"); + sprite = SpriteManager::current()->create("images/powerups/earthflower/earthflower.sprite"); SoundManager::current()->preload("sounds/fire-flower.wav"); lightsprite->set_color(Color(0.0f, 0.3f, 0.0f)); } else { diff --git a/src/object/powerup.cpp b/src/object/powerup.cpp index 0ac73fdca..f376d7466 100644 --- a/src/object/powerup.cpp +++ b/src/object/powerup.cpp @@ -51,6 +51,10 @@ PowerUp::PowerUp(const Reader& lisp) : lightsprite->set_color(Color(0.3f, 0.0f, 0.0f)); } else if (sprite_name == "images/powerups/iceflower/iceflower.sprite") { lightsprite->set_color(Color(0.0f, 0.1f, 0.2f)); + } else if (sprite_name == "images/powerups/airflower/airflower.sprite") { + lightsprite->set_color(Color(0.15f, 0.0f, 0.15f)); + } else if (sprite_name == "images/powerups/earthflower/earthflower.sprite") { + lightsprite->set_color(Color(0.0f, 0.3f, 0.0f)); } else if (sprite_name == "images/powerups/star/star.sprite") { lightsprite->set_color(Color(0.4f, 0.4f, 0.4f)); } @@ -77,6 +81,10 @@ PowerUp::PowerUp(const Vector& pos, const std::string& sprite_name_) : lightsprite->set_color(Color(0.3f, 0.0f, 0.0f)); } else if (sprite_name == "images/powerups/iceflower/iceflower.sprite") { lightsprite->set_color(Color(0.0f, 0.1f, 0.2f)); + } else if (sprite_name == "images/powerups/airflower/airflower.sprite") { + lightsprite->set_color(Color(0.15f, 0.0f, 0.15f)); + } else if (sprite_name == "images/powerups/earthflower/earthflower.sprite") { + lightsprite->set_color(Color(0.0f, 0.3f, 0.0f)); } else if (sprite_name == "images/powerups/star/star.sprite") { lightsprite->set_color(Color(0.4f, 0.4f, 0.4f)); } @@ -120,6 +128,14 @@ PowerUp::collision(GameObject& other, const CollisionHit&) if(!player->add_bonus(ICE_BONUS, true)) return FORCE_MOVE; SoundManager::current()->play("sounds/fire-flower.wav"); + } else if (sprite_name == "images/powerups/airflower/airflower.sprite") { + if(!player->add_bonus(AIR_BONUS, true)) + return FORCE_MOVE; + SoundManager::current()->play("sounds/fire-flower.wav"); + } else if (sprite_name == "images/powerups/earthflower/earthflower.sprite") { + if(!player->add_bonus(EARTH_BONUS, true)) + return FORCE_MOVE; + SoundManager::current()->play("sounds/fire-flower.wav"); } else if (sprite_name == "images/powerups/star/star.sprite") { player->make_invincible(); } else if (sprite_name == "images/powerups/1up/1up.sprite") {