Documentation
¶
Overview ¶
Package naming provides asset name mappings for EVR assets.
Package naming provides type symbol and asset name mappings.
Index ¶
- Constants
- func AddGlobalMapping(fileSymbol int64, name string)
- func AddGlobalMappings(mappings map[int64]string)
- func FileExtension(typeSymbol TypeSymbol) string
- func GetAssetName(fileSymbol int64) string
- func HasAssetName(fileSymbol int64) bool
- func IsKnownType(typeSymbol TypeSymbol) bool
- func IsTextureFormat(typeSymbol TypeSymbol) bool
- func TypeCategory(typeSymbol TypeSymbol) string
- func TypeName(typeSymbol TypeSymbol) string
- type AssetNameMapper
- func (m *AssetNameMapper) AddMapping(fileSymbol int64, name string)
- func (m *AssetNameMapper) AddMappings(mappings map[int64]string)
- func (m *AssetNameMapper) GetName(fileSymbol int64) string
- func (m *AssetNameMapper) GetSymbol(name string) int64
- func (m *AssetNameMapper) HasName(fileSymbol int64) bool
- func (m *AssetNameMapper) KnownSymbolCount() int
- type TypeSymbol
Constants ¶
const ( // Textures and related TypeDDSTexture = TypeSymbol(-4706379568332879927) // 0xbeac1969cb7b8861 TypeRawBCTexture = TypeSymbol(9152405269835556869) // 0x7f5bc1cf8ce51ffd TypeTextureMetadata = TypeSymbol(3397970254627897141) // 0x2f6e61706a2c8f35 // References TypeAudioReference = TypeSymbol(4049816316449263978) // 0x38ee951a26fb816a TypeAssetReference = TypeSymbol(-3860481509838504953) // 0xca6cd085401cbc87 )
Known type symbols for EVR assets (stored as int64 in manifests).
Variables ¶
This section is empty.
Functions ¶
func AddGlobalMapping ¶
AddGlobalMapping adds a mapping to the global mapper.
func AddGlobalMappings ¶
AddGlobalMappings adds multiple mappings to the global mapper.
func FileExtension ¶
func FileExtension(typeSymbol TypeSymbol) string
FileExtension returns a suggested file extension for a type.
func GetAssetName ¶
GetAssetName returns the name for a file symbol using the global mapper.
func HasAssetName ¶
HasAssetName returns true if a name is known using the global mapper.
func IsKnownType ¶
func IsKnownType(typeSymbol TypeSymbol) bool
IsKnownType returns true if the type symbol is recognized.
func IsTextureFormat ¶
func IsTextureFormat(typeSymbol TypeSymbol) bool
IsTextureFormat returns true if the type is texture-related.
func TypeCategory ¶
func TypeCategory(typeSymbol TypeSymbol) string
TypeCategory returns the category of a type for organizational purposes.
func TypeName ¶
func TypeName(typeSymbol TypeSymbol) string
TypeName returns the name for a given type symbol.
Types ¶
type AssetNameMapper ¶
type AssetNameMapper struct {
// contains filtered or unexported fields
}
AssetNameMapper maps file symbols to human-readable asset names. This is populated with known assets and can be extended.
func NewAssetNameMapper ¶
func NewAssetNameMapper() *AssetNameMapper
NewAssetNameMapper creates a new mapper with known assets.
func (*AssetNameMapper) AddMapping ¶
func (m *AssetNameMapper) AddMapping(fileSymbol int64, name string)
AddMapping adds or updates an asset name mapping.
func (*AssetNameMapper) AddMappings ¶
func (m *AssetNameMapper) AddMappings(mappings map[int64]string)
AddMappings adds multiple asset name mappings at once.
func (*AssetNameMapper) GetName ¶
func (m *AssetNameMapper) GetName(fileSymbol int64) string
GetName returns the name for a file symbol, or a fallback if unknown. If the symbol is unknown, returns a hex representation.
func (*AssetNameMapper) GetSymbol ¶
func (m *AssetNameMapper) GetSymbol(name string) int64
GetSymbol returns the symbol for a known name, or 0 if not found.
func (*AssetNameMapper) HasName ¶
func (m *AssetNameMapper) HasName(fileSymbol int64) bool
HasName returns true if a name is known for the given symbol.
func (*AssetNameMapper) KnownSymbolCount ¶
func (m *AssetNameMapper) KnownSymbolCount() int
KnownSymbolCount returns the number of known symbol mappings.
type TypeSymbol ¶
type TypeSymbol int64
TypeSymbol represents a file type identifier in EVR packages. Uses int64 to match manifest.FrameContent.TypeSymbol
func AllKnownTypes ¶
func AllKnownTypes() []TypeSymbol
AllKnownTypes returns a slice of all known type symbols.
func (TypeSymbol) String ¶
func (ts TypeSymbol) String() string
TypeName returns a human-readable name for a type symbol.