Documentation ¶
Overview ¶
data package contains functions for loading graphic and audio data.
data package contains functions for loading graphic and audio data.
Index ¶
- Constants
- Variables
- func DefaultAvatarData(char *character.Character) res.AvatarData
- func DirFiles(path, pattern string) ([]string, error)
- func ExportAvatars(path string, avatars ...res.AvatarData) error
- func ExportHUD(hud res.HUDData, path string) error
- func ImportAvatars(path string) ([]res.AvatarData, error)
- func ImportAvatarsDir(dirPath string) ([]res.AvatarData, error)
- func ImportEffectsGraphics(path string) ([]res.EffectGraphicData, error)
- func ImportEffectsGraphicsDir(path string) ([]res.EffectGraphicData, error)
- func ImportHUD(path string) (res.HUDData, error)
- func ImportItemsGraphics(path string) ([]res.ItemGraphicData, error)
- func ImportItemsGraphicsDir(dirPath string) ([]res.ItemGraphicData, error)
- func ImportSkillsGraphics(path string) ([]res.SkillGraphicData, error)
- func ImportSkillsGraphicsDir(path string) ([]res.SkillGraphicData, error)
- func LoadChapterData(path string) error
- func LoadModuleData(path string) (err error)
- func Map(areaDir string) (*tmx.Map, error)
- func Pictures(path string) (map[string]pixel.Picture, error)
- func Script(path string) (*ash.Script, error)
- func ScriptsDir(path string) ([]*ash.Script, error)
Constants ¶
const ( HUDDir = "hud" HUDFileExt = ".xml" ErrorIcon = "unknown.png" )
Variables ¶
var (
EffectGraphicsFileExt = ".graphic"
)
Functions ¶
func DefaultAvatarData ¶
func DefaultAvatarData(char *character.Character) res.AvatarData
DefaultAvatarData creates default avatar data for specified character.
func DirFiles ¶
DirFiles returns names of all files matching specified file name pattern in directory with specified path.
func ExportAvatars ¶
func ExportAvatars(path string, avatars ...res.AvatarData) error
ExportAvatars exports specified avatars to the new avatar data file with specified path.
func ExportHUD ¶
ExportHUD exports HUD data to file with specified name in directory with specified path.
func ImportAvatars ¶
func ImportAvatars(path string) ([]res.AvatarData, error)
ImportAvatars imports all avatars data for specified characters from avatar file with specified path.
func ImportAvatarsDir ¶
func ImportAvatarsDir(dirPath string) ([]res.AvatarData, error)
ImportAvatarsDir imports all avatars data from avatars files in directory with specified path.
func ImportEffectsGraphics ¶
func ImportEffectsGraphics(path string) ([]res.EffectGraphicData, error)
ImportEffectsGraphics imports all effects graphics from data file with specified path.
func ImportEffectsGraphicsDir ¶
func ImportEffectsGraphicsDir(path string) ([]res.EffectGraphicData, error)
ImportEffectsGraphicsDir imports all files with effects graphics from directory with specified path.
func ImportItemsGraphics ¶
func ImportItemsGraphics(path string) ([]res.ItemGraphicData, error)
ImportItemsGraphics imports all items grpahics from data file with specified path.
func ImportItemsGraphicsDir ¶
func ImportItemsGraphicsDir(dirPath string) ([]res.ItemGraphicData, error)
ImportItemsGraphicsDir imports all files with items graphics from directory with specified path.
func ImportSkillsGraphics ¶
func ImportSkillsGraphics(path string) ([]res.SkillGraphicData, error)
ImportSkillsGraphics imports all skills graphics from data file with specified path.
func ImportSkillsGraphicsDir ¶
func ImportSkillsGraphicsDir(path string) ([]res.SkillGraphicData, error)
ImportSkillsGraphicsDir imports all files with skills graphics from directory with specified path.
func LoadChapterData ¶
LoadChapterData loads all chapter graphical data from specified path.
func LoadModuleData ¶
LoadModuleData loads graphic data from specified path. Should be called by GUI before creating any in-game elements.
func Pictures ¶
Pictures loads all pictures from specified path and returns map with file names as keys and pictures as values.
Types ¶
This section is empty.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package with pre-loaded game resources like item graphic data, textures, etc.
|
Package with pre-loaded game resources like item graphic data, textures, etc. |
audio
Package with pre-loaded audio buffers.
|
Package with pre-loaded audio buffers. |
graphic
Package with pre-loaded game graphics.
|
Package with pre-loaded game graphics. |