(self)
Sprite tile checks for extract command
Sprite tile checks for extract command
Sprite tile checks for extract command
def validate_extract(self):
        """Sprite tile checks for extract command"""
        if len(self.args.FILE) != 2:
            sys.exit("error: expected two ROM files, given: %s" %
                     " ".join(self.args.FILE))
        self.in1 = self.args.FILE[0]
        self.in2 = self.args.FILE[1]

        self.size = self.args.size
        if not self.size:
            sizein1 = os.path.getsize(self.in1)
            sizein2 = os.path.getsize(self.in2)
            if sizein1 != sizein2:
                sys.exit("error: ROM files must have the same size")
            self.size = sizein1

        super(sprite_converter, self).validate_extract()
def validate_extract ( self ) : if len ( self . args . FILE ) != 2 : sys . exit ( "error: expected two ROM files, given: %s" % " " . join ( self . args . FILE ) ) self . in1 = self . args . FILE [ 0 ] self . in2 = self . args . FILE [ 1 ] self . size = self . args . size if not self . size : sizein1 = os . path . getsize ( self . in1 ) sizein2 = os . path . getsize ( self . in2 ) if sizein1 != sizein2 : sys . exit ( "error: ROM files must have the same size" ) self . size = sizein1 super ( sprite_converter , self ) . validate_extract ( )