fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / object / gameobjs.cpp
index 3ea669e..bcbbdd5 100644 (file)
@@ -1,8 +1,7 @@
 //  $Id$
-// 
+//
 //  SuperTux
-//  Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
-//  Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 //  GNU General Public License for more details.
-// 
+//
 //  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 <config.h>
 
 #include <algorithm>
 #include "video/drawing_context.hpp"
 #include "camera.hpp"
 #include "main.hpp"
+#include "random_generator.hpp"
 
 BouncyCoin::BouncyCoin(const Vector& pos)
   : position(pos)
 {
   timer.start(.3);
-  sprite = sprite_manager->create("coin");
+  sprite = sprite_manager->create("images/objects/coin/coin.sprite");
   sprite->set_action("still");
 }
 
@@ -62,7 +62,7 @@ BouncyCoin::update(float elapsed_time)
 void
 BouncyCoin::draw(DrawingContext& context)
 {
-  sprite->draw(context, position, LAYER_OBJECTS);
+  sprite->draw(context, position, LAYER_OBJECTS + 5);
 }
 
 //---------------------------------------------------------------------------
@@ -92,7 +92,7 @@ void
 BrokenBrick::draw(DrawingContext& context)
 {
   sprite->draw_part(context,
-      Vector(rand() % 16, rand() % 16), Vector(16, 16),
+      Vector(systemRandom.rand(16), systemRandom.rand(16)), Vector(16, 16),
       position, LAYER_OBJECTS + 1);
 }
 
@@ -175,4 +175,3 @@ SmokeCloud::draw(DrawingContext& context)
 {
   sprite->draw(context, position, LAYER_OBJECTS+1);
 }
-