(
            self, name, width, height, rows, columns,
            attr, bitsperpixel, interleave_times, bank_size, video_mem_size, max_pages,
            cursor_attr, colourmap, is_cga_hires=False
        )
Initialise video mode settings.
Initialise video mode settings.
Initialise video mode settings .
def __init__(
            self, name, width, height, rows, columns,
            attr, bitsperpixel, interleave_times, bank_size, video_mem_size, max_pages,
            cursor_attr, colourmap, is_cga_hires=False
        ):
        """Initialise video mode settings."""
        font_width = width // columns
        # ceildiv for hercules (14-px font on 348 lines)
        font_height = -(-height // rows)
        # block cursor in graphics mode
        cursor_shape = (0, font_height-1)
        VideoMode.__init__(
            self, name, rows, columns, font_height, font_width, attr, cursor_shape, colourmap
        )
        self.is_cga_hires = is_cga_hires
        # override pixel dimensions
        self.pixel_height = height
        self.pixel_width = width
        # used in display.py to initialise pixelbuffer
        self.bitsperpixel = bitsperpixel
        self.memorymap = self._memorymapper(
            height, width, video_mem_size, max_pages, interleave_times, bank_size, bitsperpixel
        )
        # cursor attribute
        self.cursor_attr = cursor_attr
        # sprite and tile builders
        self.build_tile = self._tile_builder(self.bitsperpixel)
        self.sprite_builder = self._sprite_builder(self.bitsperpixel)
def __init__ ( self , name , width , height , rows , columns , attr , bitsperpixel , interleave_times , bank_size , video_mem_size , max_pages , cursor_attr , colourmap , is_cga_hires = False ) : font_width = width // columns # ceildiv for hercules (14-px font on 348 lines) font_height = - ( - height // rows ) # block cursor in graphics mode cursor_shape = ( 0 , font_height - 1 ) VideoMode . __init__ ( self , name , rows , columns , font_height , font_width , attr , cursor_shape , colourmap ) self . is_cga_hires = is_cga_hires # override pixel dimensions self . pixel_height = height self . pixel_width = width # used in display.py to initialise pixelbuffer self . bitsperpixel = bitsperpixel self . memorymap = self . _memorymapper ( height , width , video_mem_size , max_pages , interleave_times , bank_size , bitsperpixel ) # cursor attribute self . cursor_attr = cursor_attr # sprite and tile builders self . build_tile = self . _tile_builder ( self . bitsperpixel ) self . sprite_builder = self . _sprite_builder ( self . bitsperpixel )