config

package
v0.0.0-...-a4a601d Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNotAllowed = errors.New("error not allowed")

Functions

func AmsdosFilename

func AmsdosFilename(inputPath, ext string) string

func MaskIsAllowed

func MaskIsAllowed(mode uint8, value uint8) bool

func ModeMaskSprite

func ModeMaskSprite(mode uint8) ([]uint8, error)

func RemoveUnsupportedChar

func RemoveUnsupportedChar(s string) string

Types

type ContainerConfig

type ContainerConfig struct {
	Type []ContainerFormat
	Path string
}

func (*ContainerConfig) AddExport

func (cc *ContainerConfig) AddExport(c ContainerFormat)

func (ContainerConfig) HasExport

func (cc ContainerConfig) HasExport(c ContainerFormat) bool

func (*ContainerConfig) RemoveExport

func (cc *ContainerConfig) RemoveExport(c ContainerFormat)

func (*ContainerConfig) Reset

func (c *ContainerConfig) Reset()

type ContainerFormat

type ContainerFormat string
var (
	DskContainer         ContainerFormat = "dsk"
	ExtendedDskContainer ContainerFormat = "edsk"
	SnaContainer         ContainerFormat = "sna"
	M4Container          ContainerFormat = "m4"
)

type Dither

type Dither struct {
	Algo               int
	Matrix             [][]float32
	Multiplier         float64
	WithQuantification bool
	Type               constants.DitheringType
}

type Kmeans

type Kmeans struct {
	Threshold float64
	Used      bool
}

type M4Config

type M4Config struct {
	Host       string
	RemotePath string
	Autoexec   bool
	Enabled    bool
}

type MartineConfig

type MartineConfig struct {
	PalCfg       PaletteConfig
	M4cfg        M4Config
	ContainerCfg ContainerConfig
	ScrCfg       ScreenConfig
	RotateCfg    RotateConfig

	TileMode        bool
	TileIterationX  int
	TileIterationY  int
	CustomDimension bool
	DskFiles        []string
	Tiles           *export.JsonSlice
	DeltaMode       bool

	Flash                  bool
	FlashScreenFilepath1   string
	FlashScreenFilepath2   string
	FlashPaletteFilepath1  string
	FlashPaletteFilepath2  string
	EgxMode1               uint8
	EgxMode2               uint8
	SplitRaster            bool
	ScanlineSequence       []int
	CustomScanlineSequence bool

	ZigZag  bool
	Animate bool

	InkSwapper          map[int]int
	LineWidth           int
	FilloutGif          bool
	DoubleScreenAddress bool
}

func NewMartineConfig

func NewMartineConfig(input, output string) *MartineConfig

func (*MartineConfig) AddFile

func (e *MartineConfig) AddFile(file string)

func (*MartineConfig) AmsdosFilename

func (e *MartineConfig) AmsdosFilename() []byte

func (*MartineConfig) AmsdosFullPath

func (e *MartineConfig) AmsdosFullPath(filePath string, newExtension string) string

func (*MartineConfig) Filename

func (e *MartineConfig) Filename() string

func (*MartineConfig) Fullpath

func (e *MartineConfig) Fullpath(ext string) string

func (*MartineConfig) GetAmsdosFilename

func (e *MartineConfig) GetAmsdosFilename(filePath string, ext string) string

func (MartineConfig) HasContainerExport

func (m MartineConfig) HasContainerExport(c ContainerFormat) bool

func (*MartineConfig) ImportInkSwap

func (e *MartineConfig) ImportInkSwap(s string) error

func (*MartineConfig) OsFilename

func (e *MartineConfig) OsFilename(ext string) string

func (*MartineConfig) OsFullPath

func (e *MartineConfig) OsFullPath(filePath string, newExtension string) string

func (*MartineConfig) Reset

func (m *MartineConfig) Reset()

func (*MartineConfig) ResetDskFiles

func (e *MartineConfig) ResetDskFiles()

func (*MartineConfig) SetLineWith

func (e *MartineConfig) SetLineWith(i string) error

func (*MartineConfig) SwapInk

func (e *MartineConfig) SwapInk(inkIndex int) int

func (*MartineConfig) TransformToAmsdosFile

func (e *MartineConfig) TransformToAmsdosFile(filePath string) string

type MaskBit

type MaskBit struct {
	Sprite       uint8
	OrOperation  bool
	AndOperation bool
}

type PaletteConfig

type PaletteConfig struct {
	Path    string
	Type    PaletteType
	Palette color.Palette
}

type PaletteType

type PaletteType string
var (
	InkPalette PaletteType = "ink"
	PalPalette PaletteType = "pal"
	KitPalette PaletteType = "kit"
)

type RotateConfig

type RotateConfig struct {
	RotationRraBit      int
	RotationRlaBit      int
	RotationSraBit      int
	RotationSlaBit      int
	RotationLosthighBit int
	RotationLostlowBit  int
	RotationKeephighBit int
	RotationKeeplowBit  int
	RotationIterations  int
	RotationMode        bool
	Rotation3DMode      bool
	Rotation3DX0        int
	Rotation3DY0        int
	Rotation3DType      Rotation3d
	RollMode            bool
	RollIteration       int
}

type Rotation3d

type Rotation3d string
var (
	RotateXAxis            Rotation3d = "rotate_x_axis"
	RotateYAxis            Rotation3d = "rotate_y_axis"
	ReverseRotateXAxis     Rotation3d = "reverse_rotate_x_axis"
	RotateLeftToRightYAxis Rotation3d = "rotate_left_to_right_y_axis"
	RotateDiagonalXAxis    Rotation3d = "rotate_diagonal_x_axis"
	RotateDiagonalYAxis    Rotation3d = "rotate_diagonal_y_Axis"
)

func Rotation3DType

func Rotation3DType(v int) Rotation3d

type ScreenConfig

type ScreenConfig struct {
	InputPath      string
	OutputPath     string
	IsPlus         bool
	Type           ScreenFormat
	NoAmsdosHeader bool
	Compression    compression.CompressionMethod
	Export         []ScreenExport
	Size           constants.Size

	Process ScreenProcessing
	Mode    uint8
	// contains filtered or unexported fields
}

func (*ScreenConfig) AddExport

func (s *ScreenConfig) AddExport(c ScreenExport)

func (ScreenConfig) IsExport

func (s ScreenConfig) IsExport(c ScreenExport) bool

func (*ScreenConfig) RemoveExport

func (s *ScreenConfig) RemoveExport(c ScreenExport)

func (*ScreenConfig) Reset

func (s *ScreenConfig) Reset()

func (*ScreenConfig) ResetExport

func (s *ScreenConfig) ResetExport()

type ScreenExport

type ScreenExport string
var (
	Overscan               ScreenExport = "overscan" // fichier fullscreen .scr
	OcpScreenExport        ScreenExport = "screen"   // fichier classique .scr
	SpriteExport           ScreenExport = "sprite"
	SpriteHardExport       ScreenExport = "sprite_hard"
	SpriteCompiledExport   ScreenExport = "sprite_compiled"
	GoImpdrawExport        ScreenExport = "go_impdraw" // deux fichiers .go1 et .go2
	AssemblyExport         ScreenExport = "asm"        // texte assembleur
	JsonExport             ScreenExport = "json"       // json
	ImpdrawTileExport      ScreenExport = "tile"
	OcpWindowExport        ScreenExport = "window"
	SpriteImpCatcherExport ScreenExport = "impcatcher"
	SpriteFlatExport       ScreenExport = "flat_sprite"
)

type ScreenFormat

type ScreenFormat string
var (
	FullscreenFormat     ScreenFormat = "fullscreen"
	SpriteFormat         ScreenFormat = "sprite"
	SpriteHardFormat     ScreenFormat = "sprite_hard"
	OcpScreenFormat      ScreenFormat = "screen"
	WindowFormat         ScreenFormat = "window"
	Egx1Format           ScreenFormat = "egx1"
	Egx2Format           ScreenFormat = "egx2"
	Egx1FullscreenFormat ScreenFormat = "egx1_fullscreen"
	Egx2FullscreenFormat ScreenFormat = "egx2_fullscreen"
	ImpdrawTile          ScreenFormat = "tile"
)

func (ScreenFormat) IsFullScreen

func (f ScreenFormat) IsFullScreen() bool

func (ScreenFormat) IsScreen

func (f ScreenFormat) IsScreen() bool

func (ScreenFormat) IsSprite

func (f ScreenFormat) IsSprite() bool

func (ScreenFormat) IsSpriteHard

func (f ScreenFormat) IsSpriteHard() bool

func (ScreenFormat) IsWindow

func (f ScreenFormat) IsWindow() bool

type ScreenProcessing

type ScreenProcessing struct {
	Saturation     float64
	Brightness     float64
	Kmeans         Kmeans
	ResizingAlgo   imaging.ResampleFilter
	ApplyDithering bool
	Dithering      Dither
	OneLine        bool
	OneRow         bool
	Mask           MaskBit
	Reducer        int
}

Jump to

Keyboard shortcuts

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