diff --git a/source/game/entities/enemy.cpp b/source/game/entities/enemy.cpp index 5db37c3..518231a 100644 --- a/source/game/entities/enemy.cpp +++ b/source/game/entities/enemy.cpp @@ -23,10 +23,6 @@ Enemy::Enemy(const Data& enemy) sprite_->setPosY(enemy.y); sprite_->setVelX(enemy.vx); sprite_->setVelY(enemy.vy); - /* [DOC:29/10/2025] w i h ja no fan falta, se pilla del .ANI - sprite_->setWidth(enemy.w); - sprite_->setHeight(enemy.h); - [/DOC] */ const int FLIP = (should_flip_ && enemy.vx < 0.0F) ? SDL_FLIP_HORIZONTAL : SDL_FLIP_NONE; const int MIRROR = should_mirror_ ? SDL_FLIP_VERTICAL : SDL_FLIP_NONE; diff --git a/source/game/entities/player.cpp b/source/game/entities/player.cpp index 89d9311..83d8321 100644 --- a/source/game/entities/player.cpp +++ b/source/game/entities/player.cpp @@ -110,7 +110,7 @@ void Player::transitionToState(State state) { switch (state) { case State::ON_GROUND: - std::cout << "ON_GROUND\n"; + //std::cout << "ON_GROUND\n"; vy_ = 0; handleDeathByFalling(); jump_sound_ctrl_.reset(); @@ -118,7 +118,7 @@ void Player::transitionToState(State state) { current_slope_ = nullptr; break; case State::ON_SLOPE: - std::cout << "ON_SLOPE\n"; + //std::cout << "ON_SLOPE\n"; vy_ = 0; handleDeathByFalling(); jump_sound_ctrl_.reset(); @@ -126,7 +126,7 @@ void Player::transitionToState(State state) { updateCurrentSlope(); break; case State::JUMPING: - std::cout << "JUMPING\n"; + //std::cout << "JUMPING\n"; // Puede saltar desde ON_GROUND o ON_SLOPE if (previous_state_ == State::ON_GROUND || previous_state_ == State::ON_SLOPE) { vy_ = -MAX_VY; @@ -137,7 +137,7 @@ void Player::transitionToState(State state) { } break; case State::FALLING: - std::cout << "FALLING\n"; + //std::cout << "FALLING\n"; fall_start_position_ = static_cast(y_); last_grounded_position_ = static_cast(y_); vy_ = MAX_VY; @@ -644,14 +644,17 @@ void Player::updateCurrentSlope() { } // Debug output + /* if (current_slope_ != nullptr) { const char* TYPE = isLeftSlope() ? "Left \\" : "Right /"; std::cout << "[SLOPE] " << TYPE << " from (" << current_slope_->x1 << "," << current_slope_->y1 << ")" << " to (" << current_slope_->x2 << "," << current_slope_->y2 << ")\n"; + } else { std::cout << "[SLOPE] nullptr\n"; } + */ } // Comprueba que el jugador no toque ningun tile de los que matan