X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fgameobjs.cpp;h=bcbbdd503bb07bdd7766653f687329e6a7c69052;hb=ab9eab4c870195c2b60ce76b77044c35b31e8806;hp=7e4a98372f1b3f23b4fc024e19b1f645d52e2baa;hpb=39c8f41f9d46e3d2b890961814193363f0fa10c5;p=supertux.git diff --git a/src/object/gameobjs.cpp b/src/object/gameobjs.cpp index 7e4a98372..bcbbdd503 100644 --- a/src/object/gameobjs.cpp +++ b/src/object/gameobjs.cpp @@ -1,8 +1,7 @@ // $Id$ -// +// // SuperTux -// Copyright (C) 2000 Bill Kendrick -// Copyright (C) 2004 Tobias Glaesser +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -13,11 +12,11 @@ // 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 #include @@ -36,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) @@ -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); } -