(self, x, y, width=1, height=1)
return result
Gets a rectangle of map tiles.

        The map is a grid of 128x32 tiles, or 128x64 if using the
        gfx/map shared memory for map data. This method returns a
        rectangle of tile IDs on the map, as a list of bytearrays.

        If the requested rectangle size goes off the edge of the map,
        the off-edge tiles are returned as 0. The bottom edge is
        always assumed to be beyond the 64th row in the gfx/map shared
        memory region.

        Args:
          x: The map cell x (column) coordinate. (0-127)
          y: The map cell y (row) coordinate. (0-63) If y + height > 31, Map
            must have a Gfx.
          width: The width of the rectangle, as a number of tiles.
          height: The height of the rectangle, as a number of tiles.

        Returns:
          The rectangle of tile IDs, as a list of bytearrays.
Gets a rectangle of map tiles.
Gets a rectangle of map tiles .
def get_rect_tiles(self, x, y, width=1, height=1):
        """Gets a rectangle of map tiles.

        The map is a grid of 128x32 tiles, or 128x64 if using the
        gfx/map shared memory for map data. This method returns a
        rectangle of tile IDs on the map, as a list of bytearrays.

        If the requested rectangle size goes off the edge of the map,
        the off-edge tiles are returned as 0. The bottom edge is
        always assumed to be beyond the 64th row in the gfx/map shared
        memory region.

        Args:
          x: The map cell x (column) coordinate. (0-127)
          y: The map cell y (row) coordinate. (0-63) If y + height > 31, Map
            must have a Gfx.
          width: The width of the rectangle, as a number of tiles.
          height: The height of the rectangle, as a number of tiles.

        Returns:
          The rectangle of tile IDs, as a list of bytearrays.
        """
        assert 0 <= x <= 127
        assert 1 <= width
        assert 1 <= height
        assert ((0 <= y + height <= 32) or
                ((0 <= y + height <= 64) and self._gfx is not None))
        result = []
        for tile_y in range(y, y + height):
            row = bytearray()
            for tile_x in range(x, x + width):
                if (tile_y > 63) or (tile_x > 127):
                    row.append(0)
                else:
                    row.append(self.get_cell(tile_x, tile_y))
            result.append(row)
        return result
def get_rect_tiles ( self , x , y , width = 1 , height = 1 ) : assert 0 <= x <= 127 assert 1 <= width assert 1 <= height assert ( ( 0 <= y + height <= 32 ) or ( ( 0 <= y + height <= 64 ) and self . _gfx is not None ) ) result = [ ] for tile_y in range ( y , y + height ) : row = bytearray ( ) for tile_x in range ( x , x + width ) : if ( tile_y > 63 ) or ( tile_x > 127 ) : row . append ( 0 ) else : row . append ( self . get_cell ( tile_x , tile_y ) ) result . append ( row ) return result