Documentation ¶
Index ¶
- type Unpacker
- func (u *Unpacker) From6to16Terrain1() (*image.NRGBA, error)
- func (u *Unpacker) From6to16Terrain2() (*image.NRGBA, error)
- func (u *Unpacker) From6to28() (*image.NRGBA, error)
- func (u *Unpacker) From6to48Terrain1() (*image.NRGBA, error)
- func (u *Unpacker) From6to48Terrain2() (*image.NRGBA, error)
- func (u *Unpacker) Init(tileSideSegments int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Unpacker ¶
type Unpacker struct {
// contains filtered or unexported fields
}
func (*Unpacker) From6to16Terrain1 ¶
From6to16Terrain1 generates a 16x1 tileset image from a 2x3 tileset using terrain 1 pattern. It uses the exported 6x6 to 28 tileset and appends specific tiles to create the terrain 1 pattern.
Parameters:
none
Returns:
*image.NRGBA - a pointer to the generated image error - an error if the pack type is invalid
func (*Unpacker) From6to16Terrain2 ¶
From6to16Terrain2 generates a 16x1 image from a 2x3 tileset using terrain 2 pattern. It uses the exported 6x6 tileset and appends specific tiles to create the terrain 2 pattern.
Parameters:
none
Returns:
*image.NRGBA - a pointer to the generated image error - an error if the pack type is invalid
func (*Unpacker) From6to28 ¶
From6to28 generates a 14x2 canvas with 28 tiles from a 2x3 tileset. It uses the quadMap generated by the export6to28TileSet function to draw each tile.
Parameters:
none
Returns:
*image.NRGBA - a pointer to the generated image error - an error if the pack type is invalid
func (*Unpacker) From6to48Terrain1 ¶
From6to48Terrain1 generates a 12x4 tile set image from a 2x3 tile set using terrain 1 pattern. It uses the provided quadMap to determine the tile pattern for each tile.
Parameters:
none
Returns:
*image.NRGBA - a pointer to the generated image error - an error if the pack type is invalid
func (*Unpacker) From6to48Terrain2 ¶
From6to48Terrain2 generates a 12x4 tile set image from a 2x3 tile set using terrain 2 pattern. It draws the 48 tiles on the canvas using the quadMap to determine the tile pattern for each tile.
Parameters:
None
Returns:
*image.NRGBA - a pointer to the generated image error - an error if the pack type is invalid