示例#1
0
func ripPokemon(rip *sprites.Ripper, number int, form string, outname string) error {
	var m *image.Paletted
	var err error
	if number == 201 && form != "" {
		m, err = rip.Unown(form)
	} else {
		m, err = rip.Pokemon(number)
	}
	if err != nil {
		return err
	}
	return write(m, outname)
}
示例#2
0
func ripShinyPokemon(rip *sprites.Ripper, number int, form string, outname string) error {
	var m *image.Paletted
	var err error
	if number == 201 && form != "" {
		m, err = rip.Unown(form)
	} else {
		m, err = rip.Pokemon(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)
}