Beispiel #1
0
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)
}
Beispiel #2
0
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)
}