Arreglos en la estructura i format del codi

This commit is contained in:
2025-03-01 20:39:44 +01:00
parent 5c371e7517
commit 360ebfd2e6
12 changed files with 126 additions and 156 deletions

View File

@@ -1415,11 +1415,11 @@ bool Room::checkAutoSurfaces(SDL_Point *p)
}
// Comprueba las colisiones
int Room::checkLeftSlopes(v_line_t *line)
int Room::checkLeftSlopes(const v_line_t *line)
{
for (auto s : left_slopes_)
for (auto slope : left_slopes_)
{
const SDL_Point p = checkCollision(s, *line);
const SDL_Point p = checkCollision(slope, *line);
if (p.x != -1)
{
return p.y;
@@ -1432,9 +1432,9 @@ int Room::checkLeftSlopes(v_line_t *line)
// Comprueba las colisiones
bool Room::checkLeftSlopes(SDL_Point *p)
{
for (auto s : left_slopes_)
for (auto slope : left_slopes_)
{
if (checkCollision(*p, s))
if (checkCollision(*p, slope))
{
return true;
}
@@ -1444,11 +1444,11 @@ bool Room::checkLeftSlopes(SDL_Point *p)
}
// Comprueba las colisiones
int Room::checkRightSlopes(v_line_t *line)
int Room::checkRightSlopes(const v_line_t *line)
{
for (auto s : right_slopes_)
for (auto slope : right_slopes_)
{
const SDL_Point p = checkCollision(s, *line);
const SDL_Point p = checkCollision(slope, *line);
if (p.x != -1)
{
return p.y;
@@ -1461,9 +1461,9 @@ int Room::checkRightSlopes(v_line_t *line)
// Comprueba las colisiones
bool Room::checkRightSlopes(SDL_Point *p)
{
for (auto s : right_slopes_)
for (auto slope : right_slopes_)
{
if (checkCollision(*p, s))
if (checkCollision(*p, slope))
{
return true;
}