Example #1
0
 def generator(chunks):
     for chunk in chunks:
         if len(chunk) < 4:
             yield None
         elif chunk[0:4] == 'RLCN':
             yield Palette(chunk)
         elif chunk[0:4] == 'RGCN':
             yield Sprite.from_pokemon(chunk)
         else:
             yield None
Example #2
0
 def generator(chunks):
     for chunk in chunks:
         if len(chunk) < 4:
             yield None
         elif chunk[0:4] == 'RLCN':
             yield Palette(chunk)
         elif chunk[0:4] == 'RGCN':
             yield Sprite.from_pokemon(chunk)
         else:
             yield None
Example #3
0
 def generator(chunks):
     for chunk in chunks:
         if len(chunk) < 4:
             yield None
         elif chunk[0:4] == 'RLCN':
             yield Palette(chunk)
         elif chunk[0:4] == 'RGCN':
             try:
                 yield Sprite.from_standard(chunk)
             except:
                 yield None
         else:
             yield None
Example #4
0
 def generator(chunks):
     for chunk in chunks:
         if len(chunk) < 4:
             yield None
         elif chunk[0:4] == 'RLCN':
             yield Palette(chunk)
         elif chunk[0:4] == 'RGCN':
             try:
                 yield Sprite.from_standard(chunk)
             except:
                 yield None
         else:
             yield None