clang-tidy (amb el fuck de que no feien bona parella el clang de macos i el tidy de llvm)
This commit is contained in:
@@ -130,7 +130,7 @@ void Tabe::enable() {
|
||||
void Tabe::setRandomFlyPath(Direction direction, int length) {
|
||||
direction_ = direction;
|
||||
fly_distance_ = length;
|
||||
waiting_counter_ = 0.083F + (rand() % 15) * 0.0167F; // 5-20 frames converted to seconds (5/60 to 20/60)
|
||||
waiting_counter_ = 0.083F + ((rand() % 15) * 0.0167F); // 5-20 frames converted to seconds (5/60 to 20/60)
|
||||
Audio::get()->playSound("tabe.wav");
|
||||
|
||||
constexpr float SPEED = 120.0F; // 2 pixels/frame * 60fps = 120 pixels/second
|
||||
@@ -138,14 +138,14 @@ void Tabe::setRandomFlyPath(Direction direction, int length) {
|
||||
switch (direction) {
|
||||
case Direction::TO_THE_LEFT: {
|
||||
speed_ = -1.0F * SPEED;
|
||||
accel_ = -1.0F * (1 + rand() % 10) * 2.0F; // Converted from frame-based to seconds
|
||||
accel_ = -1.0F * (1 + (rand() % 10)) * 2.0F; // Converted from frame-based to seconds
|
||||
sprite_->setFlip(SDL_FLIP_NONE);
|
||||
break;
|
||||
}
|
||||
|
||||
case Direction::TO_THE_RIGHT: {
|
||||
speed_ = SPEED;
|
||||
accel_ = (1 + rand() % 10) * 2.0F; // Converted from frame-based to seconds
|
||||
accel_ = (1 + (rand() % 10)) * 2.0F; // Converted from frame-based to seconds
|
||||
sprite_->setFlip(SDL_FLIP_HORIZONTAL);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user