func ripPokemonBack(rip *sprites.Ripper, number int, form string, outname string) error { var m *image.Paletted var err error if number == 201 && form != "" { m, err = rip.UnownBack(form) } else { m, err = rip.PokemonBack(number) } if err != nil { return err } return write(m, outname) }
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 ripShinyPokemonBack(rip *sprites.Ripper, number int, form string, outname string) error { var m *image.Paletted var err error if number == 201 && form != "" { m, err = rip.UnownBack(form) } else { m, err = rip.PokemonBack(number) } if err != nil { return err } m.Palette = rip.ShinyPalette(number) if m.Palette == nil { return errors.New("couldn't get palette") } return write(m, 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) }