From 23c3a65aff7dfa01fe5bc0e87d124ac30f701249 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arvid=20Sj=C3=B6blom?= Date: Mon, 11 Dec 2023 09:50:34 +0100 Subject: [PATCH] cleanup Bottle.cc --- src/Bottle.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()}; -- 2.30.2