func ripAnimation(rip *sprites.Ripper, number int, form string, outname string) error { var g *gif.GIF var err error if number == 201 && form != "" { g, err = rip.UnownAnimation(form) } else { g, err = rip.PokemonAnimation(number) } if err != nil { return err } return write(g, outname) }
func ripShinyAnimation(rip *sprites.Ripper, number int, form string, outname string) error { var g *gif.GIF var err error if number == 201 && form != "" { g, err = rip.UnownAnimation(form) } else { g, err = rip.PokemonAnimation(number) } if err != nil { return err } pal := rip.ShinyPalette(number) if pal == nil { return errors.New("couldn't get palette") } for _, m := range g.Image { m.Palette = pal } return write(g, outname) }