From: Arvid Sjöblom Date: Mon, 11 Dec 2023 08:50:34 +0000 (+0100) Subject: cleanup Bottle.cc X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=23c3a65aff7dfa01fe5bc0e87d124ac30f701249;p=TDDC76_proj.git cleanup Bottle.cc --- diff --git a/src/Bottle.cc b/src/Bottle.cc index b432bc7..61a9be4 100644 --- a/src/Bottle.cc +++ b/src/Bottle.cc @@ -9,7 +9,8 @@ Bottle::Bottle(sf::Texture& txtr, json& params) { texture = txtr; sprite.setTexture(texture); - position ={rand()%static_cast(S_WIDTH*5/7.0f - S_WIDTH/5.0f +1) + S_WIDTH/5.0f, + position ={rand()% + static_cast(S_WIDTH*5/7.0f - S_WIDTH/5.0f +1) + S_WIDTH/5.0f, static_cast(rand()%static_cast(S_HEIGHT+1))}; sprite.setScale(params["scale"][0], params["scale"][1]); sf::FloatRect gb {sprite.getGlobalBounds()};