Documentation
¶
Index ¶
- Variables
- func CacheFilename(filename ...string) string
- func DoodadPath(filename string) string
- func LevelPackPath(filename string) string
- func LevelPath(filename string) string
- func ListCampaigns() ([]string, error)
- func ListDoodads() ([]string, error)
- func ListLevels() ([]string, error)
- func ResolvePath(filename, extension string, one bool) string
Constants ¶
This section is empty.
Variables ¶
var ( ConfigDirectoryName = "doodle" ProfileDirectory string LevelDirectory string LevelPackDirectory string DoodadDirectory string CampaignDirectory string ScreenshotDirectory string SaveFile string LogFile string CacheDirectory string FontDirectory string )
Profile Directory settings.
Functions ¶
func CacheFilename ¶
CacheFilename returns a path to a file in the cache folder. Send in path components and not literal slashes, like CacheFilename("images", "chunks", "id.bmp")
func DoodadPath ¶
DoodadPath is like LevelPath but for Doodad files.
func LevelPackPath ¶
LevelPackPath returns the user's levelpacks directory.
func LevelPath ¶
LevelPath will turn a "simple" filename into an absolute path in the user's local levels folder. If the filename already contains slashes, it is returned as-is as an absolute or relative path.
func ListCampaigns ¶
ListCampaigns returns a listing of all available campaigns.
func ListDoodads ¶
ListDoodads returns a listing of all available doodads.
func ListLevels ¶
ListLevels returns a listing of all available levels.
func ResolvePath ¶
ResolvePath takes an ambiguous simple filename and searches for a Level or Doodad that matches. Returns a blank string if no files found.
Pass a true value for `one` if you are intending to create the file. It will only test one filepath and return the first one, regardless if the file existed. So the filename should have a ".level" or ".doodad" extension and then this path will resolve the ProfileDirectory of the file.
Types ¶
This section is empty.