Documentation
¶
Index ¶
- Constants
- func GetFile(filename string) (io.Reader, error)
- func NormalisePath(filePath string) string
- func RegisterGameResourcePaths(basePath string, gameInfo *keyvalues.KeyValue)
- func RegisterLocalDirectory(directory string)
- func RegisterPakfile(pakfile *lumps.Pakfile)
- func RegisterVpk(vpkFile *vpk.VPK)
- func UnregisterLocalDirectory(directory string)
- func UnregisterPakfile()
- func UnregisterVpk(vpkFile *vpk.VPK)
Constants ¶
const BasePathMaterial = "materials/"
FilePath prefixes BasePathMaterial is path prefix for all materials/textures
const ExtensionVmt = ".vmt"
File Extensions ExtensionVmt Material file extension
const ExtensionVtf = ".vtf"
ExtensionVtf Texture file extension
Variables ¶
This section is empty.
Functions ¶
func NormalisePath ¶
NormalisePath ensures that the same filepath format is used for paths, regardless of platform.
func RegisterGameResourcePaths ¶
func RegisterGameResourcePaths(basePath string, gameInfo *keyvalues.KeyValue)
Read game resource data paths from gameinfo.txt All games should ship with a gameinfo.txt, but it isn't actually mandatory
func RegisterLocalDirectory ¶
func RegisterLocalDirectory(directory string)
RegisterLocalDirectory register a filesystem path as a valid asset directory
func RegisterPakfile ¶
RegisterPakfile Set a pakfile to be used as an asset directory. This would normally be called during each map load
func RegisterVpk ¶
func RegisterVpk(vpkFile *vpk.VPK)
RegisterVpk registers a vpk package as a valid asset directory
func UnregisterLocalDirectory ¶
func UnregisterLocalDirectory(directory string)
func UnregisterPakfile ¶
func UnregisterPakfile()
UnregisterPakfile removes the current pakfile from available search locations
func UnregisterVpk ¶
func UnregisterVpk(vpkFile *vpk.VPK)
Types ¶
This section is empty.