naming

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package naming provides asset name mappings for EVR assets.

Package naming provides type symbol and asset name mappings.

Index

Constants

View Source
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

func AddGlobalMapping(fileSymbol int64, name string)

AddGlobalMapping adds a mapping to the global mapper.

func AddGlobalMappings

func AddGlobalMappings(mappings map[int64]string)

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

func GetAssetName(fileSymbol int64) string

GetAssetName returns the name for a file symbol using the global mapper.

func HasAssetName

func HasAssetName(fileSymbol int64) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL