ase

package
v0.0.0-...-c55b4f9 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChunkTypeOldPalette    = 0x0004
	ChunkTypeAltPalette    = 0x0011
	ChunkTypeLayer         = 0x2004
	ChunkTypeCel           = 0x2005
	ChunkTypeCelExtra      = 0x2006
	ChunkTypeColorProfile  = 0x2007
	ChunkTypeExternalFiles = 0x2008
	ChunkTypeMask          = 0x2016
	ChunkTypeTags          = 0x2018
	ChunkTypePalette       = 0x2019
	ChunkTypeUserData      = 0x2020
	ChunkTypeSlice         = 0x2022
	ChunkTypeTileset       = 0x2023
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CelChunk

type CelChunk struct {
	Index     uint16 `label:"Layer Index"`
	XPosition int16  `label:"X Position"`
	YPosition int16  `label:"Y Position"`
	Opacity   byte   `label:"Opacity"`
	Type      uint16 `label:"Cel Type"`
	ZIndex    int16  `label:"Z-Index"`
	// contains filtered or unexported fields
}

type CelExtraChunk

type CelExtraChunk struct {
	Flags     uint32  `label:"Flags"`
	XPosition [4]byte `label:"Precise X position"`
	YPosition [4]byte `label:"Precise Y position"`
	Width     [4]byte `label:"Width of the cel in the sprite"`
	Height    [4]byte `label:"Height of the cel in the sprite"`
	// contains filtered or unexported fields
}

type ChunkHeader

type ChunkHeader struct {
	ChunkSize uint32 `label:"Chunk Size"`
	ChunkType uint16 `label:"Chunk Type"`
}

type ColorProfileChunk

type ColorProfileChunk struct {
	Type  uint16  `label:"Type"`
	Flags uint16  `label:"Flags"`
	Gamma [4]byte `label:"Fixed Gamma"`
	// contains filtered or unexported fields
}

type ColorProfileICC

type ColorProfileICC struct {
	Length uint32 `label:"ICC Profile Data Length"`
	Data   []byte `label:"ICC Profile Data"`
}

type CompressedImage

type CompressedImage struct {
	CompressedImageCel
	Data []byte `label:"Compressed image data"`
}

type CompressedImageCel

type CompressedImageCel struct {
	Width  uint16 `label:"Width"`
	Height uint16 `label:"Height"`
}

type CompressedTilemap

type CompressedTilemap struct {
	CompressedTilemapCel
	Data []byte `label:"Compressed tilemap data"`
}

type CompressedTilemapCel

type CompressedTilemapCel struct {
	Width       uint16 `label:"Width in number of tiles"`
	Height      uint16 `label:"Height in number of tiles"`
	BitsPerTile uint16 `label:"Bits per tile (at the moment it's always 32-bit per tile)"`
	TileIDMask  uint32 `label:"Bitmask for tile ID"`
	XFlipMask   uint32 `label:"Bitmask for X flip"`
	YFlipMask   uint32 `label:"Bitmask for Y flip"`
	DFlipMask   uint32 `label:"Bitmask for diagonal flip"`
	// contains filtered or unexported fields
}

type Element

type Element struct {
	Type  uint16 `label:"Element type"`
	Value []byte `label:"Element value"`
}

type ExternalFileEntry

type ExternalFileEntry struct {
	EntryID uint32 `label:"Entry ID"`
	Type    byte   `label:"Type"`
	// contains filtered or unexported fields
}

type ExternalFilesChunk

type ExternalFilesChunk struct {
	Entries uint32 `label:"Number of entries"`
	// contains filtered or unexported fields
}

type FileHeader

type FileHeader struct {
	FileSize   uint32 `label:"File Size"`
	Magic      uint16 `label:"Magic Number"`
	Frames     uint16 `label:"Number of Frames"`
	Width      uint16 `label:"Width in pixels"`
	Height     uint16 `label:"Height in pixels"`
	ColorDepth uint16 `label:"Color depth (bits per pixel)"`
	Flags      uint32 `label:"Flags"`
	Speed      uint16 `label:"Speed (deprecated)"`

	PaletteIndex byte `label:"Palette Entry Index"`

	NumberOfColors uint16 `label:"Number of colors"`
	PixelWidth     byte   `label:"Pixel Width"`
	PixelHeight    byte   `label:"Pixel Height"`
	XGridPosition  int16  `label:"X Grid Position"`
	YGridPosition  int16  `label:"Y Grid Position"`
	GridWidth      uint16 `label:"Grid Width"`
	GridHeight     uint16 `label:"Grid Height"`
	// contains filtered or unexported fields
}

type FrameHeader

type FrameHeader struct {
	FrameSize     uint32 `label:"Frame Size"`
	Magic         uint16 `label:"Magic Number"`
	OldNumChunks  uint16 `label:"Old Number of Chunks"`
	FrameDuration uint16 `label:"Frame Duration"`

	NewNumChunks uint32 `label:"New Number of Chunks"`
	// contains filtered or unexported fields
}

type GrayscalePixel

type GrayscalePixel [2]byte

type IndexedPixel

type IndexedPixel byte

type LayerChunk

type LayerChunk struct {
	Flags         uint16 `label:"Flags"`
	Type          uint16 `label:"Layer Type"`
	ChildLevel    uint16 `label:"Child Level"`
	DefaultWidth  uint16 `label:"Default Layer Width"`
	DefaultHeight uint16 `label:"Default Layer Height"`
	BlendMode     uint16 `label:"Blend Mode"`
	Opacity       byte   `label:"Opacity"`
	// contains filtered or unexported fields
}

type LinkedCel

type LinkedCel struct {
	LinkFrame uint16 `label:"Frame position to link with"`
}

type MaskChunk

type MaskChunk struct {
	X      int16  `label:"X position"`
	Y      int16  `label:"Y position"`
	Width  uint16 `label:"Width"`
	Height uint16 `label:"Height"`
	// contains filtered or unexported fields
}

type NestedPropertyMap

type NestedPropertyMap struct {
	Count uint32 `label:"Number of properties"`
	Data  []byte `label:"Nested properties data"`
}

type OldPacketColor

type OldPacketColor struct {
	Red   byte `label:"Red"`
	Green byte `label:"Green"`
	Blue  byte `label:"Blue"`
}

type OldPaletteHeader

type OldPaletteHeader struct {
	NumberOfPackets uint16 `label:"Number of Packets"`
}

type OldPalettePacket

type OldPalettePacket struct {
	Skip           byte `label:"Number of palette entries to skip from the last packet (start from 0)"`
	NumberOfColors byte `label:"Number of colors in the packet (0 means 256)"`
}

type PaletteChunk

type PaletteChunk struct {
	Size       uint32 `label:"New palette size (total number of entries)"`
	FirstIndex uint32 `label:"Fist color index to change"`
	LastIndex  uint32 `label:"Last color index to change"`
	// contains filtered or unexported fields
}

type PaletteEntry

type PaletteEntry struct {
	Flags uint16 `label:"Entry flags"`
	Red   byte   `label:"Red"`
	Green byte   `label:"Green"`
	Blue  byte   `label:"Blue"`
	Alpha byte   `label:"Alpha"`
}

type Point

type Point struct {
	X int32 `label:"X coordinate value"`
	Y int32 `label:"Y coordinate value"`
}

type RGBAPixel

type RGBAPixel [4]byte

type RawImage

type RawImage[T IndexedPixel | GrayscalePixel | RGBAPixel] struct {
	RawImageCel
	Data []T `label:"Pixel data"`
}

type RawImageCel

type RawImageCel struct {
	Width  uint16 `label:"Width"`
	Height uint16 `label:"Height"`
}

type Rect

type Rect struct {
	Origin Point `label:"Origin coordinates"`
	Size   Size  `label:"Rectangle size"`
}

type Size

type Size struct {
	Width  int32 `label:"Width value"`
	Height int32 `label:"Height value"`
}

type Slice9Patches

type Slice9Patches struct {
	X      int32  `label:"Center X position (relative to slice bounds)"`
	Y      int32  `label:"Center Y position"`
	Width  uint32 `label:"Center width"`
	Height uint32 `label:"Center height"`
}

type SliceChunk

type SliceChunk struct {
	Keys  uint32 `label:"Number of slice keys"`
	Flags uint32 `label:"Flags"`
	// contains filtered or unexported fields
}

type SliceKey

type SliceKey struct {
	Frame  uint32 `label:"Frame number"`
	X      int32  `label:"Slice X origin coordinate in the sprite"`
	Y      int32  `label:"Slice Y origin coordinate in the sprite"`
	Width  uint32 `label:"Slice width"`
	Height uint32 `label:"Slice height"`
}

type SlicePivot

type SlicePivot struct {
	X int32 `label:"Pivot X position (relative to the slice origin)"`
	Y int32 `label:"Pivot Y position"`
}

type String

type String struct {
	Length uint16 `label:"Length"`
	Value  string
}

type Tag

type Tag struct {
	From                   uint16 `label:"From frame"`
	To                     uint16 `label:"To frame"`
	LoopAnimationDirection byte   `label:"Loop animation direction"`
	Repeat                 uint16 `label:"Repeat N Times"`

	Color [3]byte `label:"RGB values of the tag color"`
	// contains filtered or unexported fields
}

type TagsChunk

type TagsChunk struct {
	Tags uint16 `label:"Number of tags"`
	// contains filtered or unexported fields
}

type TilesetChunk

type TilesetChunk struct {
	ID     uint32 `label:"Tileset ID"`
	Flags  uint32 `label:"Tileset flags"`
	Tiles  uint32 `label:"Number of tiles"`
	Width  uint16 `label:"Tile width"`
	Height uint16 `label:"Tile height"`
	Index  int16  `label:"Base index"`
	// contains filtered or unexported fields
}

type TilesetCompressedData

type TilesetCompressedData struct {
	Length uint32 `label:"Compressed data length"`
	Image  []byte `label:"Compressed image data"`
}

type TilesetExternalData

type TilesetExternalData struct {
	ID        uint32 `label:"ID of the external file"`
	TilesetID uint32 `label:"Tileset ID in the external file"`
}

type UserDataChunk

type UserDataChunk struct {
	Flags uint32 `label:"Flags"`
}

type UserDataProperty

type UserDataProperty struct {
	Name String `label:"Name"`
	Type uint16 `label:"Type"`
}

type UserDataPropertyMap

type UserDataPropertyMap struct {
	Key   uint32 `label:"Property map key"`
	Count uint32 `label:"Number of properties"`
}

type UserDataPropertyMaps

type UserDataPropertyMaps struct {
	Size  uint32 `label:"Size in bytes of all properties maps stored in this chunk"`
	Count uint32 `label:"Number of properties maps"`
}

type VectorHeader

type VectorHeader struct {
	Size uint32 `label:"Number of elements"`
	Type uint16 `label:"Element's type"`
}

Jump to

Keyboard shortcuts

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