projects
/
TDDC76_proj.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d14b919
)
cleanup Bottle.cc
author
Arvid Sjöblom
<arvsj277@student.liu.se>
Mon, 11 Dec 2023 08:50:34 +0000
(09:50 +0100)
committer
Arvid Sjöblom
<arvsj277@student.liu.se>
Mon, 11 Dec 2023 08:50:34 +0000
(09:50 +0100)
src/Bottle.cc
patch
|
blob
|
history
diff --git
a/src/Bottle.cc
b/src/Bottle.cc
index b432bc7f9a494435b8e3b0e5771caca4509e0b97..61a9be4bfbff91eac4b667306548a03b972e6415 100644
(file)
--- 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<int>(S_WIDTH*5/7.0f - S_WIDTH/5.0f +1) + S_WIDTH/5.0f,
+ position ={rand()%
+ static_cast<int>(S_WIDTH*5/7.0f - S_WIDTH/5.0f +1) + S_WIDTH/5.0f,
static_cast<float>(rand()%static_cast<int>(S_HEIGHT+1))};
sprite.setScale(params["scale"][0], params["scale"][1]);
sf::FloatRect gb {sprite.getGlobalBounds()};