(self, current_attr, back, pal, override)
return None, None
Helper function for COLOR in SCREEN 1.
Helper function for COLOR in SCREEN 1.
Helper function for COLOR in SCREEN 1 .
def color(self, current_attr, back, pal, override):
        """Helper function for COLOR in SCREEN 1."""
        back = self.get_entry(0) if back is None else back
        if override is not None:
            # uses last entry as palette if given
            pal = override
        error.range_check(0, 255, back)
        if pal is not None:
            error.range_check(0, 255, pal)
            self.set_cga4_palette(pal % 2)
            palette = list(self.default_palette)
            palette[0] = back & 0xf
            self.set_all(palette, force=True)
        else:
            self.set_entry(0, back & 0xf, force=True)
        return None, None
def color ( self , current_attr , back , pal , override ) : back = self . get_entry ( 0 ) if back is None else back if override is not None : # uses last entry as palette if given pal = override error . range_check ( 0 , 255 , back ) if pal is not None : error . range_check ( 0 , 255 , pal ) self . set_cga4_palette ( pal % 2 ) palette = list ( self . default_palette ) palette [ 0 ] = back & 0xf self . set_all ( palette , force = True ) else : self . set_entry ( 0 , back & 0xf , force = True ) return None , None