Added Marek music to cvs and play it in the main menu.
[supertux.git] / src / gameobjs.cpp
index 8c6bf66..fd13a77 100644 (file)
@@ -1,7 +1,8 @@
 //  $Id$
 // 
 //  SuperTux
-//  Copyright (C) 2004 SuperTux Development Team, see AUTHORS for details
+//  Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
+//  Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
@@ -15,7 +16,8 @@
 // 
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+//  02111-1307, USA.
 
 #include "world.h"
 #include "tile.h"
@@ -44,9 +46,8 @@ BouncyDistro::action(double frame_ratio)
 void
 BouncyDistro::draw()
 {
-  texture_draw(&img_distro[0],
-               base.x - scroll_x,
-               base.y);
+  img_distro[0]->draw(base.x - scroll_x,
+                      base.y);
 }
 
 
@@ -88,8 +89,7 @@ BrokenBrick::draw()
   dest.h = 16;
   
   if (tile->images.size() > 0)
-    texture_draw_part(&tile->images[0],
-                      src.x,src.y,dest.x,dest.y,dest.w,dest.h);
+    tile->images[0]->draw_part(src.x,src.y,dest.x,dest.y,dest.w,dest.h);
 }
 
 void
@@ -139,14 +139,14 @@ BouncyBrick::draw()
         {
           fillrect(base.x - scroll_x, base.y,
                    32,32, 
-                   plevel->bkgd_top_red, plevel->bkgd_top_green, plevel->bkgd_top_blue, 0);
+                   plevel->bkgd_top.red, plevel->bkgd_top.green, plevel->bkgd_top.blue, 0);
 // FIXME: doesn't respect the gradient, futhermore is this necessary at all??
         }
       else
         {
           s = (int)scroll_x / 30;
-          texture_draw_part(&plevel->img_bkgd, dest.x + s, dest.y, 
-                            dest.x, dest.y,dest.w,dest.h);
+          plevel->img_bkgd->draw_part(dest.x + s, dest.y, 
+                                      dest.x, dest.y,dest.w,dest.h);
         }
 
       Tile::draw(base.x - scroll_x,
@@ -179,7 +179,7 @@ FloatingScore::draw()
 {
   char str[10];
   sprintf(str, "%d", value);
-  text_draw(&gold_text, str, (int)base.x + 16 - strlen(str) * 8, (int)base.y, 1);
+  gold_text->draw(str, (int)base.x + 16 - strlen(str) * 8, (int)base.y, 1);
 }
 
 /* EOF */