sprites

package module
v0.0.0-...-36966ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Pokemon Gold/Silver/Crystal sprite ripper.

Index

Constants

View Source
const MaxPokemon = 251
View Source
const MaxTrainer = 67

Variables

View Source
var (
	ErrMalformed     = errors.New("malformed data")
	ErrTooLarge      = errors.New("decompressed data is suspeciously large")
	ErrTooSmall      = errors.New("decompressed data is too short")
	ErrNoSuchPokemon = errors.New("no such Pokémon")
	ErrNoSuchTrainer = errors.New("no such trainer")
)
View Source
var UnownForms = []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}

Functions

func Decode

func Decode(reader io.Reader, w, h int) (*image.Paletted, error)

Decode a GSC image of dimensions w*8 x h*8.

Types

type RGB15

type RGB15 uint16

func (RGB15) RGBA

func (rgb RGB15) RGBA() (r, g, b, a uint32)

type Reader

type Reader interface {
	io.Reader
	io.ReaderAt
	io.Seeker
}

type Ripper

type Ripper struct {
	// contains filtered or unexported fields
}

func NewRipper

func NewRipper(r Reader) (_ *Ripper, err error)

func (*Ripper) HasAnimations

func (rip *Ripper) HasAnimations() bool

func (*Ripper) Pokemon

func (rip *Ripper) Pokemon(number int) (m *image.Paletted, err error)

func (*Ripper) PokemonAnimation

func (rip *Ripper) PokemonAnimation(number int) (g *gif.GIF, err error)

func (*Ripper) PokemonBack

func (rip *Ripper) PokemonBack(number int) (m *image.Paletted, err error)

func (*Ripper) PokemonFrames

func (rip *Ripper) PokemonFrames(number int) ([]*image.Paletted, error)

func (*Ripper) PokemonPalette

func (rip *Ripper) PokemonPalette(number int) color.Palette

PokemonPalette returns the color palette for a Pokémon, or nil if there is an error.

func (*Ripper) ShinyPalette

func (rip *Ripper) ShinyPalette(number int) color.Palette

func (*Ripper) Trainer

func (rip *Ripper) Trainer(number int) (m *image.Paletted, err error)

func (*Ripper) Unown

func (rip *Ripper) Unown(form string) (m *image.Paletted, err error)

func (*Ripper) UnownAnimation

func (rip *Ripper) UnownAnimation(form string) (g *gif.GIF, err error)

func (*Ripper) UnownBack

func (rip *Ripper) UnownBack(form string) (m *image.Paletted, err error)

func (*Ripper) Version

func (rip *Ripper) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL