public Point getTileCollision(Secundarios s,
        double newX, double newY)
    {
        double fromX = Math.min(s.getPosX(), newX);
        double fromY = Math.min(s.getPosY(), newY);
        double toX = Math.max(s.getPosX(), newX);
        double toY = Math.max(s.getPosY(), newY);

        // get the tile locations
        int fromTileX = TileMapRenderer.pixelsToTiles(fromX);
        int fromTileY = TileMapRenderer.pixelsToTiles(fromY);
        int toTileX = TileMapRenderer.pixelsToTiles(
            toX + s.getAncho() - 1);
        int toTileY = TileMapRenderer.pixelsToTiles(
            toY + s.getAlto() - 1);

        // check each tile for a collision
        for (int x=fromTileX; x<=toTileX; x++) {
            for (int y=fromTileY; y<=toTileY; y++) {
                if (x < 0 || x >= map.getWidth() ||
                    map.getTile(x, y) != null)
                {
                    // collision found, return the tile
                    //pointCache.setLocation(x, y);
                    //return pointCache;
					return new Point(x,y);
                }
            }
        }

        // no collision found
        return null;
    }