Graphics for powerups: airflower and earthflower
authorLMH <lmh.0013@gmail.com>
Sun, 9 Nov 2014 21:14:32 +0000 (11:14 -1000)
committerLMH <lmh.0013@gmail.com>
Sun, 9 Nov 2014 21:14:32 +0000 (11:14 -1000)
15 files changed:
data/images/powerups/airflower/air_flower-0.png [new file with mode: 0644]
data/images/powerups/airflower/air_flower-1.png [new file with mode: 0644]
data/images/powerups/airflower/air_flower-2.png [new file with mode: 0644]
data/images/powerups/airflower/air_flower-3.png [new file with mode: 0644]
data/images/powerups/airflower/airflower.sprite [new file with mode: 0644]
data/images/powerups/earthflower/earth_flower-0.png [new file with mode: 0644]
data/images/powerups/earthflower/earth_flower-1.png [new file with mode: 0644]
data/images/powerups/earthflower/earth_flower-2.png [new file with mode: 0644]
data/images/powerups/earthflower/earth_flower-3.png [new file with mode: 0644]
data/images/powerups/earthflower/earthflower.sprite [new file with mode: 0644]
data/images/powerups/iceflower/ice_flower-3.png [new file with mode: 0644]
data/images/powerups/iceflower/iceflower.sprite
src/object/bonus_block.cpp
src/object/flower.cpp
src/object/powerup.cpp

diff --git a/data/images/powerups/airflower/air_flower-0.png b/data/images/powerups/airflower/air_flower-0.png
new file mode 100644 (file)
index 0000000..bf51d84
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 (file)
index 0000000..3e1c3cb
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 (file)
index 0000000..a5d50e3
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 (file)
index 0000000..20cf440
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 (file)
index 0000000..dda2e51
--- /dev/null
@@ -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 (file)
index 0000000..0237a19
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 (file)
index 0000000..5a81cb1
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 (file)
index 0000000..0b3d6be
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 (file)
index 0000000..5129684
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 (file)
index 0000000..213993e
--- /dev/null
@@ -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 (file)
index 0000000..4cf9a8c
Binary files /dev/null and b/data/images/powerups/iceflower/ice_flower-3.png differ
index 85b926b..e981289 100644 (file)
@@ -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")))
index fb881b8..5f06776 100644 (file)
@@ -415,7 +415,7 @@ BonusBlock::try_drop(Player *player)
 
     case CONTENT_AIRGROW:
     {
-      sector->add_object(std::make_shared<PowerUp>(get_pos() + Vector(0, 32), "images/powerups/iceflower/iceflower.sprite"));
+      sector->add_object(std::make_shared<PowerUp>(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<PowerUp>(get_pos() + Vector(0, 32), "images/powerups/fireflower/fireflower.sprite"));
+      sector->add_object(std::make_shared<PowerUp>(get_pos() + Vector(0, 32), "images/powerups/earthflower/earthflower.sprite"));
       SoundManager::current()->play("sounds/upgrade.wav");
       countdown = true;
       break;
index e367484..4d3fade 100644 (file)
@@ -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 {
index 0ac73fd..f376d74 100644 (file)
@@ -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") {