Huge refactoring v3

master
Vectozavr 2021-10-30 16:24:19 +07:00
parent b7555431de
commit 30ff702609
2 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,7 @@ void Shooter::gui() {
sprite.setTexture(*ResourceManager::loadTexture(ShooterConsts::MAIN_MENU_GUI)); sprite.setTexture(*ResourceManager::loadTexture(ShooterConsts::MAIN_MENU_GUI));
sprite.setTextureRect(sf::IntRect(243, 3, 9, 9)); sprite.setTextureRect(sf::IntRect(243, 3, 9, 9));
sprite.scale(3, 3); sprite.scale(3, 3);
sprite.setPosition(screen->width() / 2.0f - 27.0f/2.0f, screen->height() / 2.0f - 27.0f/2.0f); sprite.setPosition(static_cast<float>(screen->width()) / 2.0f - 27.0f/2.0f, static_cast<float>(screen->height()) / 2.0f - 27.0f/2.0f);
sprite.setColor(sf::Color(0, 0, 0, 250)); sprite.setColor(sf::Color(0, 0, 0, 250));
screen->drawSprite(sprite); screen->drawSprite(sprite);

View File

@ -33,6 +33,7 @@ double Interpolation::Cos(double t) {
} }
double Interpolation::Bezier(const Vec2D &p1, const Vec2D &p2, double t) { double Interpolation::Bezier(const Vec2D &p1, const Vec2D &p2, double t) {
// TODO: implement bezier curve without finding the root of equation
t = Interpolation::Linear(t); t = Interpolation::Linear(t);
double h = Consts::EPS; double h = Consts::EPS;