Eliminados todos los std:: del código

This commit is contained in:
2023-09-16 12:44:40 +02:00
parent 71be364141
commit 4a2d27dc59
35 changed files with 539 additions and 504 deletions

View File

@@ -533,7 +533,7 @@ void Player::move()
#endif
// Comprueba la colisión con las superficies normales y las automáticas
const int pos = std::max(room->checkTopSurfaces(&proj), room->checkAutoSurfaces(&proj));
const int pos = max(room->checkTopSurfaces(&proj), room->checkAutoSurfaces(&proj));
if (pos > -1)
{ // Si hay colisión lo mueve hasta donde no colisiona y pasa a estar sobre la superficie
y = pos - h;
@@ -548,7 +548,7 @@ void Player::move()
{ // Las rampas no se miran si se está saltando
v_line_t leftSide = {proj.x, proj.y, proj.y + proj.h - 1};
v_line_t rightSide = {proj.x + proj.w - 1, proj.y, proj.y + proj.h - 1};
const int p = std::max(room->checkRightSlopes(&rightSide), room->checkLeftSlopes(&leftSide));
const int p = max(room->checkRightSlopes(&rightSide), room->checkLeftSlopes(&leftSide));
if (p > -1)
{ // No está saltando y hay colisión con una rampa
// Calcula la nueva posición
@@ -581,8 +581,8 @@ void Player::move()
sprite->setPosY(y);
#ifdef DEBUG
debug->add("RECT_X: " + std::to_string(rx.x) + "," + std::to_string(rx.y) + "," + std::to_string(rx.w) + "," + std::to_string(rx.h));
debug->add("RECT_Y: " + std::to_string(ry.x) + "," + std::to_string(ry.y) + "," + std::to_string(ry.w) + "," + std::to_string(ry.h));
debug->add("RECT_X: " + to_string(rx.x) + "," + to_string(rx.y) + "," + to_string(rx.w) + "," + to_string(rx.h));
debug->add("RECT_Y: " + to_string(ry.x) + "," + to_string(ry.y) + "," + to_string(ry.w) + "," + to_string(ry.h));
#endif
}
@@ -621,7 +621,7 @@ void Player::playJumpSound()
}
#ifdef DEBUG
debug->add("JUMP: " + std::to_string(jumpCounter / 4));
debug->add("JUMP: " + to_string(jumpCounter / 4));
#endif
}
@@ -630,11 +630,11 @@ void Player::playFallSound()
{
if (fallCounter % 4 == 0)
{
JA_PlaySound(fallSound[std::min((fallCounter / 4), (int)fallSound.size() - 1)]);
JA_PlaySound(fallSound[min((fallCounter / 4), (int)fallSound.size() - 1)]);
}
#ifdef DEBUG
debug->add("FALL: " + std::to_string(fallCounter / 4));
debug->add("FALL: " + to_string(fallCounter / 4));
#endif
}
@@ -666,12 +666,12 @@ bool Player::isOnFloor()
if (onSlopeL)
{
debug->add("ON_SLOPE_L: " + std::to_string(underFeet[0].x) + "," + std::to_string(underFeet[0].y));
debug->add("ON_SLOPE_L: " + to_string(underFeet[0].x) + "," + to_string(underFeet[0].y));
}
if (onSlopeR)
{
debug->add("ON_SLOPE_R: " + std::to_string(underFeet[1].x) + "," + std::to_string(underFeet[1].y));
debug->add("ON_SLOPE_R: " + to_string(underFeet[1].x) + "," + to_string(underFeet[1].y));
}
#endif