début de qqch

This commit is contained in:
2025-03-30 13:07:17 +02:00
parent 314b7a8488
commit 5d73e751d7
6 changed files with 48 additions and 13 deletions

View File

@@ -271,13 +271,6 @@ void GamePlayingAppMenu::drawFrame() const {
this->renderWindow->display();
}
sf::Color GamePlayingAppMenu::getColorOfBlock(Block block, int luminosityShift) const {
Color rgbColor = BLOCKS_COLOR[block];
return sf::Color(std::clamp(rgbColor.red + luminosityShift, 0, 255),
std::clamp(rgbColor.green + luminosityShift, 0, 255),
std::clamp(rgbColor.blue + luminosityShift, 0, 255));
}
sf::Vector2f GamePlayingAppMenu::getBoardBlockPosition(int x, int y) const {
return sf::Vector2f(this->boardPosition.position.x + (x * this->cellSizeZoom),
this->boardPosition.position.y + ((this->game.getBoard().getBaseHeight() + 9 - y) * this->cellSizeZoom));