- new star tux, still rather pure, but useable
authorIngo Ruhnke <grumbel@gmx.de>
Sat, 24 Apr 2004 13:12:12 +0000 (13:12 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Sat, 24 Apr 2004 13:12:12 +0000 (13:12 +0000)
SVN-Revision: 681

12 files changed:
data/images/shared/largetux-grab-left-0.png
data/images/shared/largetux-grab-right-0.png
data/images/shared/largetux-star-0.png [new file with mode: 0644]
data/images/shared/largetux-star-1.png [new file with mode: 0644]
data/images/shared/largetux-star-2.png [new file with mode: 0644]
data/images/shared/smalltux-star-0.png [new file with mode: 0644]
data/images/shared/smalltux-star-1.png [new file with mode: 0644]
data/images/shared/smalltux-star-2.png [new file with mode: 0644]
data/supertux.strf
src/player.cpp
src/player.h
src/resources.cpp

index 080f24f..e7a6c5b 100644 (file)
Binary files a/data/images/shared/largetux-grab-left-0.png and b/data/images/shared/largetux-grab-left-0.png differ
index 20bd308..21b6339 100644 (file)
Binary files a/data/images/shared/largetux-grab-right-0.png and b/data/images/shared/largetux-grab-right-0.png differ
diff --git a/data/images/shared/largetux-star-0.png b/data/images/shared/largetux-star-0.png
new file mode 100644 (file)
index 0000000..2ce2aa5
Binary files /dev/null and b/data/images/shared/largetux-star-0.png differ
diff --git a/data/images/shared/largetux-star-1.png b/data/images/shared/largetux-star-1.png
new file mode 100644 (file)
index 0000000..5267b82
Binary files /dev/null and b/data/images/shared/largetux-star-1.png differ
diff --git a/data/images/shared/largetux-star-2.png b/data/images/shared/largetux-star-2.png
new file mode 100644 (file)
index 0000000..76acab7
Binary files /dev/null and b/data/images/shared/largetux-star-2.png differ
diff --git a/data/images/shared/smalltux-star-0.png b/data/images/shared/smalltux-star-0.png
new file mode 100644 (file)
index 0000000..c1a6c30
Binary files /dev/null and b/data/images/shared/smalltux-star-0.png differ
diff --git a/data/images/shared/smalltux-star-1.png b/data/images/shared/smalltux-star-1.png
new file mode 100644 (file)
index 0000000..6dd8edf
Binary files /dev/null and b/data/images/shared/smalltux-star-1.png differ
diff --git a/data/images/shared/smalltux-star-2.png b/data/images/shared/smalltux-star-2.png
new file mode 100644 (file)
index 0000000..0b0dafb
Binary files /dev/null and b/data/images/shared/smalltux-star-2.png differ
index 9f1bb35..139ea4d 100644 (file)
          (y-hotspot 1)
          (images "shared/largetux-grab-right-0.png"))
 
+ (sprite (name "largetux-star")
+         (x-hotspot 8)
+         (y-hotspot 8)
+         (images "shared/largetux-star-0.png"
+                 "shared/largetux-star-1.png"
+                 "shared/largetux-star-2.png"
+                 ))
+
+ (sprite (name "smalltux-star")
+         (x-hotspot 5)
+         (y-hotspot 15)
+         (images "shared/smalltux-star-0.png"
+                 "shared/smalltux-star-1.png"
+                 "shared/smalltux-star-2.png"
+                 ))
+
  )
 
 ;; EOF ;;
index 9f950c8..ec49ff4 100644 (file)
@@ -44,6 +44,9 @@ Sprite*  smalltux_kick_right;
 Sprite*  smalltux_grab_left;
 Sprite*  smalltux_grab_right;
 
+Sprite*  smalltux_star;
+Sprite*  largetux_star;
+
 Sprite*  largetux_kick_left;
 Sprite*  largetux_kick_right;
 Sprite*  largetux_grab_left;
@@ -72,8 +75,6 @@ Surface* skidfiretux_right;
 Surface* skidfiretux_left;
 Surface* cape_right[2];
 Surface* cape_left[2];
-Surface* bigcape_right[2];
-Surface* bigcape_left[2];
 
 PlayerKeymap keymap;
 
@@ -535,14 +536,6 @@ Player::draw()
         {
           if (size == SMALL)
             {
-              if (invincible_timer.started())
-                {
-                  if (dir == RIGHT)
-                    cape_right[global_frame_counter % 2]->draw(base.x- scroll_x, base.y);
-                  else
-                    cape_left[global_frame_counter % 2]->draw(base.x- scroll_x, base.y);
-                }
-
               if (!skidding_timer.started())
                 {
                   if (physic.get_velocity_y() != 0)
@@ -585,22 +578,12 @@ Player::draw()
                   else
                     smalltux_grab_left->draw(base.x - scroll_x, base.y);
                 }
+
+              if (invincible_timer.started())
+                smalltux_star->draw(base.x - scroll_x, base.y);
             }
           else // Large Tux
             {
-              if (invincible_timer.started())
-                {
-                  float capex = base.x + (base.width - bigcape_right[0]->w) / 2;
-                  capex -= scroll_x;
-                  float capey = base.y + (base.height - bigcape_right[0]->h) / 2;
-                
-                  /* Draw cape (just not in ducked mode since that looks silly): */
-                  if (dir == RIGHT)
-                    bigcape_right[global_frame_counter % 2]->draw(capex, capey);
-                  else
-                    bigcape_left[global_frame_counter % 2]->draw(capex, capey);
-                }
-
               if (!got_coffee)
                 {
                   if (!duck)
@@ -694,6 +677,9 @@ Player::draw()
                   else
                     largetux_grab_left->draw(base.x - scroll_x, base.y);
                 }
+
+              if (invincible_timer.started())
+                largetux_star->draw(base.x - scroll_x, base.y);
             }
         }     
     }
index 15291d3..541f179 100644 (file)
@@ -91,6 +91,8 @@ extern Sprite*  smalltux_kick_left;
 extern Sprite*  smalltux_kick_right;
 extern Sprite*  smalltux_grab_left;
 extern Sprite*  smalltux_grab_right;
+extern Sprite*  smalltux_star;
+extern Sprite*  largetux_star;
 
 extern Sprite*  largetux_kick_left;
 extern Sprite*  largetux_kick_right;
index 8dce0ad..30707e6 100644 (file)
@@ -46,6 +46,9 @@ void loadshared()
   sprite_manager = new SpriteManager(datadir + "/supertux.strf");
 
   /* Tuxes: */
+  smalltux_star = sprite_manager->load("smalltux-star");
+  largetux_star = sprite_manager->load("largetux-star");
+
   smalltux_kick_left  = sprite_manager->load("smalltux-kick-left");
   smalltux_kick_right = sprite_manager->load("smalltux-kick-right");
   smalltux_grab_left  = sprite_manager->load("smalltux-grab-left");
@@ -117,18 +120,6 @@ void loadshared()
   bigtux_left_jump  = sprite_manager->load("largetux-jump-left");
   bigtux_right_jump = sprite_manager->load("largetux-jump-right");
 
-  bigcape_right[0] = new Surface(datadir + "/images/shared/bigcape-right-0.png",
-               USE_ALPHA);
-
-  bigcape_right[1] = new Surface(datadir + "/images/shared/bigcape-right-1.png",
-               USE_ALPHA);
-
-  bigcape_left[0] = new Surface(datadir + "/images/shared/bigcape-left-0.png",
-               USE_ALPHA);
-
-  bigcape_left[1] = new Surface(datadir + "/images/shared/bigcape-left-1.png",
-               USE_ALPHA);
-
   bigfiretux_right[0] = new Surface(datadir + "/images/shared/bigfiretux-right-0.png",
                USE_ALPHA);
 
@@ -151,19 +142,6 @@ void loadshared()
 
   bigfiretux_left_jump = new Surface(datadir + "/images/shared/bigfiretux-left-jump.png", USE_ALPHA);
 
-  bigcape_right[0] = new Surface(datadir + "/images/shared/bigcape-right-0.png",
-               USE_ALPHA);
-
-  bigcape_right[1] = new Surface(datadir + "/images/shared/bigcape-right-1.png",
-               USE_ALPHA);
-
-  bigcape_left[0] = new Surface(datadir + "/images/shared/bigcape-left-0.png",
-               USE_ALPHA);
-
-  bigcape_left[1] = new Surface(datadir + "/images/shared/bigcape-left-1.png",
-               USE_ALPHA);
-
-
   ducktux_left  = sprite_manager->load("largetux-duck-left");
   ducktux_right = sprite_manager->load("largetux-duck-right");
 
@@ -322,8 +300,6 @@ void unloadshared(void)
     {
       delete cape_right[i];
       delete cape_left[i];
-      delete bigcape_right[i];
-      delete bigcape_left[i];
     }
 
   delete ducktux_left;