Skip to content

Commit

Permalink
fixed density alpha value + tweaked values
Browse files Browse the repository at this point in the history
  • Loading branch information
Driema committed Mar 8, 2021
1 parent d6988fd commit 06f8f43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion header/const.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
const int SIZE = 100;
const int SIZE = 70;
const int SCALE = 8;
2 changes: 1 addition & 1 deletion src/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void Container::Render(sf::RenderWindow& win, Color color) {

switch (color) {
case Color::Default:
rect.setFillColor(sf::Color(255, 255, 255, this->density[IX(i,j,this->size)]));
rect.setFillColor(sf::Color(255, 255, 255, (this->density[IX(i,j,this->size)] > 255) ? 255 : this->density[IX(i,j,this->size)]));
break;
case Color::Hsb:
rect.setFillColor(this->Hsv((this->density[IX(i,j,this->size)]), 1, 1, 255));
Expand Down
2 changes: 1 addition & 1 deletion src/sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void Sim::Run() {
}

if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
this->container.AddDensity(currentMouse.y/SCALE, currentMouse.x/SCALE, 255);
this->container.AddDensity(currentMouse.y/SCALE, currentMouse.x/SCALE, 200);

currentMouse = sf::Mouse::getPosition(this->win);

Expand Down

0 comments on commit 06f8f43

Please sign in to comment.