Documentation ¶
Index ¶
- func CpcCoordinates(address, startingAddress uint16, lineOctetWidth int) (int, int, error)
- func DeltaAddress(x, y, lineOctetWidth int) int
- func ExportDelta(filename string, dc *DeltaCollection, mode uint8, cfg *config.MartineConfig) error
- func GetTilePostion(t *Tile, refs []Tile) int
- func ProceedDelta(filespath []string, initialAddress uint16, cfg *config.MartineConfig, ...) error
- func RollLeft(rla, sla, iterations int, screenMode uint8, size constants.Size, ...) []*image.NRGBA
- func RollLow(keeplow, lostlow, iterations int, screenMode uint8, size constants.Size, ...) []*image.NRGBA
- func RollRight(rra, sra, iterations int, screenMode uint8, size constants.Size, ...) []*image.NRGBA
- func RollUp(keephigh, losthigh, iterations int, screenMode uint8, size constants.Size, ...) []*image.NRGBA
- func Rotate(in *image.NRGBA, p color.Palette, size constants.Size, mode uint8, ...) ([]*image.NRGBA, error)
- func Rotate3d(in *image.NRGBA, p color.Palette, size constants.Size, mode uint8, ...) ([]*image.NRGBA, error)
- func TileMode(ex *config.MartineConfig, mode uint8, iterationX, iterationY int) error
- func TilesAreEquals(s1, s2 *Tile) bool
- func X(offset uint16, lineOctetWidth int) uint16
- func Y(offset uint16, lineOctetWidth int) uint16
- func Zigzag(in *image.NRGBA) *image.NRGBA
- type AnalyzeBoard
- func AnalyzeTilesBoard(im image.Image, size constants.Size, tilesHistoric *exspr.TilesHistorical) *AnalyzeBoard
- func AnalyzeTilesBoardWithTiles(im image.Image, size constants.Size, tiles []Tile) *AnalyzeBoard
- func NewAnalyzeBoard(tilesize constants.Size, imgSize image.Rectangle, horizontalTileNumber int, ...) *AnalyzeBoard
- func (a *AnalyzeBoard) AddTile(sprite *Tile, x, y int)
- func (a *AnalyzeBoard) Analyse(tile *Tile, x, y int) int
- func (a *AnalyzeBoard) GetUniqTiles() []Tile
- func (a *AnalyzeBoard) Image(filePath string, bt []BoardTile, size constants.Size) error
- func (a *AnalyzeBoard) NewTile(sprite *Tile, x, y int, index int)
- func (a *AnalyzeBoard) Palette() color.Palette
- func (a *AnalyzeBoard) ReduceTilesNumber(threshold float64) []BoardTile
- func (a *AnalyzeBoard) ReplaceTileAt(row, col int, newTile image.Image, prevTile Tile) int
- func (a *AnalyzeBoard) SaveAllTiles(folderpath string, palette color.Palette, mode uint8, ...) error
- func (a *AnalyzeBoard) SaveAssemblyTiles(filePath string) error
- func (a *AnalyzeBoard) SaveBoardTile(folderpath string, bt []BoardTile) error
- func (a *AnalyzeBoard) SaveFlatFile(folderpath string, palette color.Palette, mode uint8, ...) error
- func (a *AnalyzeBoard) SaveHistoric(folderpath string) error
- func (a *AnalyzeBoard) SaveOcpWindowFile(folderpath string, palette color.Palette, mode uint8, ...) error
- func (a *AnalyzeBoard) SaveSchema(filePath string) error
- func (a *AnalyzeBoard) SaveTiles(folderpath string, palette color.Palette, mode uint8, ...) error
- func (a *AnalyzeBoard) SetAddTile(x, y, index int, tl *image.NRGBA, isNew bool) int
- func (a *AnalyzeBoard) Sort() []BoardTile
- func (a *AnalyzeBoard) String() string
- func (a *AnalyzeBoard) TileIndex(tile *Tile, tiles []BoardTile) int
- func (a *AnalyzeBoard) TilesImage() [][]image.Image
- func (a *AnalyzeBoard) TilesIndexTable() []byte
- type BoardTile
- type DeltaCollection
- func Delta(scr1, scr2 []byte, isSprite bool, size constants.Size, mode uint8, ...) *DeltaCollection
- func DeltaMode0(current *image.NRGBA, currentPalette color.Palette, next *image.NRGBA, ...) (*DeltaCollection, error)
- func DeltaMode1(current *image.NRGBA, currentPalette color.Palette, next *image.NRGBA, ...) (*DeltaCollection, error)
- func DeltaMode2(current *image.NRGBA, currentPalette color.Palette, next *image.NRGBA, ...) (*DeltaCollection, error)
- func NewDeltaCollection() *DeltaCollection
- func (dc *DeltaCollection) Add(b byte, address uint16)
- func (d *DeltaCollection) ItemsSortByByte() []DeltaItem
- func (dc *DeltaCollection) Marshall() ([]byte, error)
- func (dc *DeltaCollection) NbAdresses() int
- func (d *DeltaCollection) Occurences() int
- func (dc *DeltaCollection) Save(filename string) error
- func (dc *DeltaCollection) ToString() string
- type DeltaCollectionV2
- type DeltaItem
- type DeltaV2
- type Tile
- type TilePosition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CpcCoordinates ¶
func DeltaAddress ¶
func ExportDelta ¶
func ExportDelta(filename string, dc *DeltaCollection, mode uint8, cfg *config.MartineConfig) error
func GetTilePostion ¶
func ProceedDelta ¶
func ProceedDelta(filespath []string, initialAddress uint16, cfg *config.MartineConfig, mode uint8) error
nolint:funlen, gocognit
func TileMode ¶
func TileMode(ex *config.MartineConfig, mode uint8, iterationX, iterationY int) error
nolint: funlen
func TilesAreEquals ¶
Types ¶
type AnalyzeBoard ¶
type AnalyzeBoard struct { Tiles [][]image.Image BoardTiles []BoardTile TileSize constants.Size ImageSize constants.Size TileMap [][]int // contains filtered or unexported fields }
func AnalyzeTilesBoard ¶
func AnalyzeTilesBoard(im image.Image, size constants.Size, tilesHistoric *exspr.TilesHistorical) *AnalyzeBoard
func NewAnalyzeBoard ¶
func NewAnalyzeBoard( tilesize constants.Size, imgSize image.Rectangle, horizontalTileNumber int, verticalTileNumber int, historic *exspr.TilesHistorical, ) *AnalyzeBoard
func (*AnalyzeBoard) AddTile ¶
func (a *AnalyzeBoard) AddTile(sprite *Tile, x, y int)
func (*AnalyzeBoard) GetUniqTiles ¶
func (a *AnalyzeBoard) GetUniqTiles() []Tile
func (*AnalyzeBoard) Palette ¶
func (a *AnalyzeBoard) Palette() color.Palette
func (*AnalyzeBoard) ReduceTilesNumber ¶
func (a *AnalyzeBoard) ReduceTilesNumber(threshold float64) []BoardTile
func (*AnalyzeBoard) ReplaceTileAt ¶
func (*AnalyzeBoard) SaveAllTiles ¶
func (a *AnalyzeBoard) SaveAllTiles(folderpath string, palette color.Palette, mode uint8, cfg *config.MartineConfig) error
func (*AnalyzeBoard) SaveAssemblyTiles ¶
func (a *AnalyzeBoard) SaveAssemblyTiles(filePath string) error
func (*AnalyzeBoard) SaveBoardTile ¶
func (a *AnalyzeBoard) SaveBoardTile(folderpath string, bt []BoardTile) error
func (*AnalyzeBoard) SaveFlatFile ¶
func (a *AnalyzeBoard) SaveFlatFile(folderpath string, palette color.Palette, mode uint8, cfg *config.MartineConfig) error
func (*AnalyzeBoard) SaveHistoric ¶
func (a *AnalyzeBoard) SaveHistoric(folderpath string) error
func (*AnalyzeBoard) SaveOcpWindowFile ¶
func (a *AnalyzeBoard) SaveOcpWindowFile(folderpath string, palette color.Palette, mode uint8, cfg *config.MartineConfig) error
func (*AnalyzeBoard) SaveSchema ¶
func (a *AnalyzeBoard) SaveSchema(filePath string) error
func (*AnalyzeBoard) SaveTiles ¶
func (a *AnalyzeBoard) SaveTiles(folderpath string, palette color.Palette, mode uint8, cfg *config.MartineConfig) error
func (*AnalyzeBoard) SetAddTile ¶
func (*AnalyzeBoard) Sort ¶
func (a *AnalyzeBoard) Sort() []BoardTile
func (*AnalyzeBoard) String ¶
func (a *AnalyzeBoard) String() string
func (*AnalyzeBoard) TileIndex ¶
func (a *AnalyzeBoard) TileIndex(tile *Tile, tiles []BoardTile) int
func (*AnalyzeBoard) TilesImage ¶
func (a *AnalyzeBoard) TilesImage() [][]image.Image
return the image in tiles image
func (*AnalyzeBoard) TilesIndexTable ¶
func (a *AnalyzeBoard) TilesIndexTable() []byte
type BoardTile ¶
type BoardTile struct { New bool Occurence int TilePositions []TilePosition Index int Tile *Tile }
func (*BoardTile) AddTile ¶
func (b *BoardTile) AddTile(tp []TilePosition)
type DeltaCollection ¶
func DeltaMode0 ¶
func DeltaMode1 ¶
func DeltaMode1(current *image.NRGBA, currentPalette color.Palette, next *image.NRGBA, nextPalette color.Palette, cfg *config.MartineConfig) (*DeltaCollection, error)
nolint: funlen, gocognit
func DeltaMode2 ¶
func DeltaMode2(current *image.NRGBA, currentPalette color.Palette, next *image.NRGBA, nextPalette color.Palette, cfg *config.MartineConfig) (*DeltaCollection, error)
nolint:funlen, gocognit
func NewDeltaCollection ¶
func NewDeltaCollection() *DeltaCollection
func (*DeltaCollection) Add ¶
func (dc *DeltaCollection) Add(b byte, address uint16)
func (*DeltaCollection) ItemsSortByByte ¶
func (d *DeltaCollection) ItemsSortByByte() []DeltaItem
func (*DeltaCollection) Marshall ¶
func (dc *DeltaCollection) Marshall() ([]byte, error)
format byte value, number of occurence, offsets values.
func (*DeltaCollection) NbAdresses ¶
func (dc *DeltaCollection) NbAdresses() int
func (*DeltaCollection) Occurences ¶
func (d *DeltaCollection) Occurences() int
func (*DeltaCollection) Save ¶
func (dc *DeltaCollection) Save(filename string) error
func (*DeltaCollection) ToString ¶
func (dc *DeltaCollection) ToString() string
type DeltaCollectionV2 ¶
type DeltaCollectionV2 struct {
*DeltaCollection
}
func (*DeltaCollectionV2) Marshall ¶
func (dc *DeltaCollectionV2) Marshall() ([]byte, error)
nolint: funlen
func (*DeltaCollectionV2) Save ¶
func (dc *DeltaCollectionV2) Save(filename string) error
type TilePosition ¶
func (*TilePosition) String ¶
func (s *TilePosition) String() string
Click to show internal directories.
Click to hide internal directories.