Documentation ¶
Index ¶
- Constants
- func GetDefaultPalette() color.Palette
- func GetPaletteOverrideMap(cache *LbxCache, lbxFile *LbxFile, filename string) (map[int]color.Palette, error)
- func ReadUint16(reader io.Reader) (uint16, error)
- func ReadUint16Big(reader io.Reader) (uint16, error)
- type Help
- type HelpEntry
- type LbxCache
- type LbxFile
- func (lbx *LbxFile) GetPalette(entry int) (color.Palette, error)
- func (lbx *LbxFile) GetReader(entry int) (*bytes.Reader, error)
- func (lbxFile *LbxFile) RawData(entry int) ([]byte, error)
- func (lbx *LbxFile) ReadHelp(entry int) (Help, error)
- func (lbx *LbxFile) ReadImages(entry int) ([]*image.Paletted, error)
- func (lbx *LbxFile) ReadImagesWithPalette(entry int, palette color.Palette, forcePalette bool) ([]*image.Paletted, error)
- func (lbx *LbxFile) ReadTerrainImages(entry int) ([]image.Image, error)
- func (lbx *LbxFile) TotalEntries() int
- type PaletteInfo
Constants ¶
View Source
const LbxSignature = 0x0000fead
Variables ¶
This section is empty.
Functions ¶
func GetDefaultPalette ¶
func GetPaletteOverrideMap ¶
func GetPaletteOverrideMap(cache *LbxCache, lbxFile *LbxFile, filename string) (map[int]color.Palette, error)
some lbx images implicitly use a palette from a specific entry * return a mapping from lbx entry -> palette to be used for that entry, e.g. * lbx.ReadImagesWithPalette(3, overrideMap[3])
Types ¶
type Help ¶
type Help struct { Entries []HelpEntry // contains filtered or unexported fields }
func (*Help) GetEntries ¶
func (*Help) GetEntriesByName ¶
func (*Help) GetRawEntry ¶
type HelpEntry ¶
type HelpEntry struct { // shows up on top of scroll Headline string // lbx file to pull an icon out, shown at top left of scroll Lbx string // index of sprite in the lbx file LbxIndex int // extra text to append AppendHelpIndex int // text displayed in scroll Text string }
stuff from help.lbx
type LbxFile ¶
type LbxFile struct { Signature uint32 Version uint16 Data [][]byte // most lbx files have an extra strings section Strings []string }
func (*LbxFile) GetPalette ¶
return just the palette for a given entry, or nil if there is no custom palette
func (*LbxFile) ReadImagesWithPalette ¶
func (lbx *LbxFile) ReadImagesWithPalette(entry int, palette color.Palette, forcePalette bool) ([]*image.Paletted, error)
a nil palette means to use the default palette
func (*LbxFile) ReadTerrainImages ¶
terrain.lbx has a special format that is different from regular graphics
func (*LbxFile) TotalEntries ¶
type PaletteInfo ¶
Click to show internal directories.
Click to hide internal directories.