fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / object / gameobjs.cpp
index 78adbbe..bcbbdd5 100644 (file)
@@ -35,6 +35,7 @@
 #include "video/drawing_context.hpp"
 #include "camera.hpp"
 #include "main.hpp"
+#include "random_generator.hpp"
 
 BouncyCoin::BouncyCoin(const Vector& pos)
   : position(pos)
@@ -61,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);
 }
 
 //---------------------------------------------------------------------------
@@ -91,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);
 }
 
@@ -174,4 +175,3 @@ SmokeCloud::draw(DrawingContext& context)
 {
   sprite->draw(context, position, LAYER_OBJECTS+1);
 }
-