X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fgameobjs.cpp;h=bcbbdd503bb07bdd7766653f687329e6a7c69052;hb=ab9eab4c870195c2b60ce76b77044c35b31e8806;hp=78adbbed9211b1e0bb30cbde86fdbeb77ffac6df;hpb=07ddaed2a657e4d2a3d038fed223fc5827159caf;p=supertux.git diff --git a/src/object/gameobjs.cpp b/src/object/gameobjs.cpp index 78adbbed9..bcbbdd503 100644 --- a/src/object/gameobjs.cpp +++ b/src/object/gameobjs.cpp @@ -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); } -