forked from jaildesigner-jailgames/jaildoctors_dilemma
Preparandose para añadir gravedad y colisiones y pasarle el mapa al jugador
This commit is contained in:
@@ -301,9 +301,24 @@ std::string Room::getRoom(int border)
|
||||
case BORDER_LEFT:
|
||||
return room_left;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
// Dice si el tile al que pertenece el pixel es sólido o no
|
||||
bool Room::isSolid(int x, int y)
|
||||
{
|
||||
int tile = ((y / 8) * 32) + (x / 8);
|
||||
if (tile < 512)
|
||||
{
|
||||
if (tilemap[tile] != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user